refactor: return complete tool results inline

This commit is contained in:
morluto
2026-09-29 07:08:46 +08:00
parent 2160d4fae5
commit 0d96275b68
535 changed files with 4084 additions and 13537 deletions
@@ -12,7 +12,6 @@ import { analyzeJavaScriptApplication } from "../../../src/application/JavaScrip
import { reconcileJavaScriptRuntime } from "../../../src/domain/javascriptRuntimeReconciliation.js";
import { inspectElectronPageInputSchema } from "../../../src/domain/electronObservation.js";
import { createWebTextArtifact } from "../../../src/domain/webContentArtifact.js";
import { permissionAuthorityForRoot } from "../../fixtures/permissionAuthority.js";
const SOURCE = `const worker = new Worker("./worker.js");\nexport const observed = worker;\n`;
const execute = promisify(execFile);
@@ -206,14 +205,8 @@ const applicationFixture = async (): Promise<string> => {
};
const analyzeFixture = async (root: string) => {
const authority = await permissionAuthorityForRoot(
root,
["investigation_input"],
["investigation_input"],
);
const result = await analyzeJavaScriptApplication(authority, {
const result = await analyzeJavaScriptApplication({
input_path: root,
approved: true,
});
if (!result.ok) throw result.error;
return result.value;
@@ -256,7 +249,6 @@ const electronRuntimeEvidence = (
"inspect_electron_page",
input,
{
schema_version: 1,
browser: {
product: "Electron/fixture",
protocol_version: "1.3",
@@ -141,7 +141,6 @@ it("renders terminal state, records shim invocations, and captures literal check
);
expect(result.ok).toBe(true);
if (!result.ok) throw result.error;
expect(result.value.schema_version).toBe(4);
expect(result.value.rendered_frames.at(-1)?.lines.join("\n")).toContain(
"probe:codex 1.2.3",
);