chore: merge main into feat/dylib-resolution

Resolve conflicts against main:
- README.md: take main's simplified English README, which no longer has
  the tool-family table.
- README_ja.md: take main's reworded table and count
  trace_dylib_resolution in the artifact graph row (5 -> 6).
- Skill: the references gain the trace_dylib_resolution paragraph, so
  the version moves to 29 (main already uses 28).
- Regenerate the product catalog, conformance manifest, skill digest and
  package metadata (135 tools). The MCP tool catalog is now built rather
  than committed (#997), so it is removed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-08 04:45:50 +00:00
co-authored by Claude Opus 5.5
581 changed files with 29516 additions and 12107 deletions
@@ -0,0 +1,62 @@
import { browserCaptureComparisonInputSchema } from "../domain/browserCaptureComparison.js";
import { browserScenarioCaptureSchema } from "../domain/browserScenarioCapture.js";
import { captureSnapshotSchema } from "../domain/webCaptureDiffSchemas.js";
// Captures are complete producer results to pass back unchanged, rather than
// analyst-authored options. Describe that boundary without embedding the entire
// inspection result schema in every comparison input. The cloned parser still
// validates every nested field using the canonical domain schemas.
const passiveCaptureInputSchema = captureSnapshotSchema.clone(
captureSnapshotSchema.def,
);
passiveCaptureInputSchema._zod.toJSONSchema = () => ({
type: "object",
properties: {
inspection: {
type: "object",
description:
"Complete result object returned by inspect_web_page. Pass the entire result unchanged, including capture identity, observations, completeness, and limitations. Every nested field is validated by REA.",
},
webmcp: {
anyOf: [{ type: "object" }, { type: "null" }],
default: null,
description:
"Complete result object returned by discover_webmcp_tools for this capture, or null when it was not recorded. Pass the entire result unchanged. Every nested field is validated by REA.",
},
},
required: ["inspection"],
});
const scenarioCaptureInputSchema = browserScenarioCaptureSchema.clone(
browserScenarioCaptureSchema.def,
);
scenarioCaptureInputSchema._zod.toJSONSchema = () => ({
type: "object",
description:
"Complete result object returned by capture_browser_scenario. Pass the entire result unchanged, including browser and scenario identity, steps, events, artifact contents and digests, completeness, and limitations. Every nested field is validated by REA.",
});
/** Advertise capture round trips while retaining full runtime validation. */
export const browserCaptureToolInputSchema =
browserCaptureComparisonInputSchema.safeExtend({
before: passiveCaptureInputSchema
.optional()
.describe(
"Earlier passive web-page capture with complete producer results.",
),
after: passiveCaptureInputSchema
.optional()
.describe(
"Later passive web-page capture with complete producer results.",
),
before_scenario: scenarioCaptureInputSchema
.optional()
.describe(
"Earlier complete result object returned by capture_browser_scenario.",
),
after_scenario: scenarioCaptureInputSchema
.optional()
.describe(
"Later complete result object returned by capture_browser_scenario.",
),
});
+4 -6
View File
@@ -17,10 +17,7 @@ import {
discoverWebMcpToolsInputSchema,
webMcpDiscoverySchema,
} from "../domain/webMcpDiscovery.js";
import {
browserCaptureComparisonInputSchema,
browserCaptureComparisonSchema,
} from "../domain/browserCaptureComparison.js";
import { browserCaptureComparisonSchema } from "../domain/browserCaptureComparison.js";
import {
captureWebScreenshotInputSchema,
compareWebScreenshotsInputSchema,
@@ -29,6 +26,7 @@ import {
} from "../domain/webScreenshot.js";
import { toolContractMetadata } from "./toolEffects.js";
import { evidenceResultOf } from "./toolOutputSchemas.js";
import { browserCaptureToolInputSchema } from "./browserCaptureToolInputSchema.js";
const evidenceResult = evidenceResultOf;
const listOutputSchema = evidenceResult(browserTargetListSchema);
@@ -215,9 +213,9 @@ export const BROWSER_TOOL_CONTRACTS = [
name: "compare_web_captures",
...toolContractMetadata("compare_web_captures"),
description:
"Compare passive web captures by providing before and after, or compare recorded scenarios by providing before_scenario and after_scenario with an optional normalization policy. Use exactly one input group. Scenario comparison aligns exact step IDs, records deterministic literal normalization, and returns every artifact-level difference plus alignment failures inline. Missing or truncated evidence never proves equality.",
"Compare passive web captures by providing before and after, each with the complete inspect_web_page result in inspection and an optional complete discover_webmcp_tools result in webmcp; or compare recorded scenarios by passing complete capture_browser_scenario results in before_scenario and after_scenario with an optional normalization policy. Use exactly one input group. Scenario comparison aligns exact step IDs, records deterministic literal normalization, and returns every artifact-level difference plus alignment failures inline. Missing or truncated evidence never proves equality.",
kind: "browser-provider",
inputSchema: browserCaptureComparisonInputSchema,
inputSchema: browserCaptureToolInputSchema,
outputSchema: captureDiffOutputSchema,
examples: [
{
+2
View File
@@ -16,6 +16,7 @@ import { ELECTRON_TOOL_CONTRACTS } from "./javascript/electronToolContracts.js";
import { JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS } from "./javascript/javascriptRuntimeObservationToolContracts.js";
import { APPLICATION_TOOL_CONTRACTS } from "./applicationToolContracts.js";
import { WEB_RUNTIME_TOOL_CONTRACTS } from "./webRuntimeToolContracts.js";
import { WEB_NETWORK_CAPTURE_TOOL_CONTRACTS } from "./webNetworkCaptureToolContracts.js";
import { WEB_SCRIPT_TOOL_CONTRACTS } from "./webScriptToolContracts.js";
import { JAVASCRIPT_RECOVERY_TOOL_CONTRACTS } from "./javascript/javascriptRecoveryToolContracts.js";
import { TOOL_EFFECTS } from "./toolEffects.js";
@@ -80,6 +81,7 @@ describe("tool contract surface", () => {
...APPLICATION_TOOL_CONTRACTS,
...WEB_SCRIPT_TOOL_CONTRACTS,
...WEB_RUNTIME_TOOL_CONTRACTS,
...WEB_NETWORK_CAPTURE_TOOL_CONTRACTS,
...JAVASCRIPT_RECOVERY_TOOL_CONTRACTS,
...SESSION_TOOL_CONTRACTS,
].map(({ name }) => name);
+5 -1
View File
@@ -1,5 +1,7 @@
import { z } from "zod";
import { jsonValueSchema } from "../domain/jsonValue.js";
const categorySchema = z.enum([
"invalid_input",
"unsupported_provider",
@@ -21,7 +23,7 @@ const common = {
retryable: z.boolean(),
remediation: remediationSchema,
};
const genericDetails = z.record(z.string(), z.json()).optional();
const genericDetails = z.record(z.string(), jsonValueSchema).optional();
const generic = <Code extends string>(code: Code) =>
z
.object({ code: z.literal(code), ...common, details: genericDetails })
@@ -30,6 +32,8 @@ const generic = <Code extends string>(code: Code) =>
/** Stable discriminated schema shared by every CLI and MCP error surface. */
export const analysisErrorProjectionSchema = z.discriminatedUnion("code", [
generic("invalid_request"),
generic("access_denied"),
generic("artifact_changed"),
generic("unreadable_output"),
generic("capability_unavailable"),
generic("provider_unavailable"),
+2 -2
View File
@@ -4,9 +4,9 @@ import { jsonValueSchema } from "../domain/jsonValue.js";
import {
compareProcessCaptures,
parseProcessCapture,
} from "../domain/processCapture.js";
} from "../domain/process/processCapture.js";
import { FUNCTION_COMPARISON_EXAMPLE } from "./functionComparisonExample.js";
import { EMPTY_PROCESS_CAPTURE_EXAMPLE } from "./processCaptureExample.js";
import { EMPTY_PROCESS_CAPTURE_EXAMPLE } from "./process/processCaptureExample.js";
const comparison = compareFunctions(
FUNCTION_COMPARISON_EXAMPLE.left,
@@ -4,16 +4,21 @@ import type { ToolContract } from "../toolContracts.js";
import { managedOutputSchemas } from "../toolOutputSchemas.js";
import { toolContractMetadata } from "../toolEffects.js";
import { requireOutputSchema } from "../toolOutputSchemaPrimitives.js";
import { isAbsoluteLocalPath } from "../../domain/localPath.js";
/** Exact caller boundary for execution-free PE/CLI triage and identity. */
const managedTargetInputSchema = z.object({
const managedTargetInputSchema = z.strictObject({
path: z
.string()
.min(1)
.optional()
.refine(isAbsoluteLocalPath, {
message:
"path must be an absolute local filesystem path (for example /tmp/Example.dll or C:\\Example.dll)",
})
.describe(
"Explicit managed PE/CLI path; omit to reuse the previously selected managed target",
),
"Explicit absolute managed PE/CLI path; omit to reuse the previously selected managed target",
)
.optional(),
});
export const managedArtifactInputSchema = managedTargetInputSchema;
+3 -2
View File
@@ -30,12 +30,13 @@ const native = <Name extends string, Schema extends z.ZodObject>(
inputSchema: Schema,
) => {
const outputSchema = requireOutputSchema(nativeOutputSchemas, name);
const strictInputSchema = inputSchema.strict();
return {
name,
...toolContractMetadata(name),
description,
kind: "native-provider",
inputSchema,
inputSchema: strictInputSchema,
outputSchema,
examples: [
{
@@ -45,7 +46,7 @@ const native = <Name extends string, Schema extends z.ZodObject>(
.parse(examples[name] ?? {}),
},
],
} satisfies ToolContract<Name, Schema, typeof outputSchema>;
} satisfies ToolContract<Name, typeof strictInputSchema, typeof outputSchema>;
};
/** Ordered single-line symbols; `swift-demangle` ends each result with LF. */
+7 -5
View File
@@ -24,16 +24,18 @@ const official = <Name extends string, Schema extends z.ZodObject>(
name: Name,
description: string,
inputSchema: Schema,
) =>
({
) => {
const strictInputSchema = inputSchema.strict();
return {
name,
...toolContractMetadata(name),
description,
kind: "official-proxy",
inputSchema,
inputSchema: strictInputSchema,
outputSchema: requireOutputSchema(officialOutputSchemas, name),
examples: examplesFor(name, inputSchema),
}) satisfies ToolContract<Name, Schema>;
examples: examplesFor(name, strictInputSchema),
} satisfies ToolContract<Name, typeof strictInputSchema>;
};
/** Bridge operations exposed without additional application composition. */
export const OFFICIAL_TOOL_CONTRACTS = [
@@ -0,0 +1,2 @@
/** Minimal valid process capture retained as a public contract example. */
export { EMPTY_PROCESS_CAPTURE_EXAMPLE } from "../../domain/process/processCaptureExample.js";
-2
View File
@@ -1,2 +0,0 @@
/** Minimal valid process capture retained as a public contract example. */
export { EMPTY_PROCESS_CAPTURE_EXAMPLE } from "../domain/processCaptureExample.js";
+30 -5
View File
@@ -1,21 +1,46 @@
import { executableFormatHintSchema } from "../domain/dosCom.js";
import { isAbsoluteLocalPath } from "../domain/localPath.js";
import { z } from "zod";
import { analysisProviderSelectorSchema } from "./providerSelection.js";
/** Caller-supplied analysis snapshot path; must name its destination absolutely. */
const snapshotPathSchema = z
.string()
.min(1)
.refine(isAbsoluteLocalPath, {
message:
"snapshot_path must be an absolute local filesystem path (for example /tmp/rea/analysis.json or C:\\rea\\analysis.json)",
})
.describe(
"Absolute local filesystem path for the analysis snapshot; relative paths are rejected.",
);
/** Caller-supplied analysis target path; must name the target absolutely. */
const binaryTargetPathSchema = z
.string()
.min(1)
.refine(isAbsoluteLocalPath, {
message:
"path must be an absolute local filesystem path (for example /tmp/fixture.bin or C:\\analysis\\fixture.bin)",
})
.describe(
"Absolute local filesystem path for the analysis target; relative paths are rejected.",
);
/** Input contract for opening a target with an optional staged snapshot. */
export const openBinaryInputSchema = z.object({
path: z.string().min(1),
export const openBinaryInputSchema = z.strictObject({
path: binaryTargetPathSchema,
format: executableFormatHintSchema
.optional()
.describe(
"Explicit headerless DOS COM interpretation; omission preserves header-based detection",
),
provider_id: analysisProviderSelectorSchema.optional(),
snapshot_path: z.string().min(1).optional(),
snapshot_path: snapshotPathSchema.optional(),
});
/** Input contract for closing a target after an optional atomic snapshot. */
export const closeBinaryInputSchema = z.object({
snapshot_path: z.string().min(1).optional(),
export const closeBinaryInputSchema = z.strictObject({
snapshot_path: snapshotPathSchema.optional(),
overwrite: z.boolean().default(false),
});
+167
View File
@@ -0,0 +1,167 @@
import { describe, expect, it } from "vitest";
import { browserScenarioBrowserSchema } from "../domain/browserScenarioValues.js";
import { firmwareInputSchemas } from "../domain/firmware/firmwareAnalysis.js";
import { electronActiveObservationInputSchema } from "../domain/javascript/electronActiveObservation.js";
import { managedArtifactInputSchema } from "./managed/managedToolContracts.js";
import { exportEvidenceBundleInputSchema } from "./sessionToolContracts.js";
import {
closeBinaryInputSchema,
openBinaryInputSchema,
} from "./sessionLifecycleInputs.js";
import { importEvidenceBundleInputSchema } from "./sessionToolSchemas.js";
import { binarySessionInputSchema } from "./sessionStatusContract.js";
type PathCase = {
readonly name: string;
readonly accepts: (value: unknown) => boolean;
readonly relative: unknown[];
readonly absolute: string;
readonly omitted?: () => boolean;
};
const cases: readonly PathCase[] = [
{
name: "open binary snapshot",
accepts: (snapshot_path) =>
openBinaryInputSchema.safeParse({ path: "/tmp/fixture", snapshot_path })
.success,
relative: ["relative/analysis.json", "../outside/analysis.json"],
absolute: "/tmp/rea/analysis.json",
omitted: () =>
openBinaryInputSchema.safeParse({ path: "/tmp/fixture" }).success,
},
{
name: "close binary snapshot",
accepts: (snapshot_path) =>
closeBinaryInputSchema.safeParse({ snapshot_path }).success,
relative: ["analysis.json"],
absolute: "/tmp/analysis.json",
omitted: () => closeBinaryInputSchema.safeParse({}).success,
},
{
name: "evidence bundle export",
accepts: (path) =>
exportEvidenceBundleInputSchema.safeParse({ path }).success,
relative: ["out/bundle.json", "../../bundle.json"],
absolute: "/tmp/bundle.json",
},
{
name: "managed target",
accepts: (path) => managedArtifactInputSchema.safeParse({ path }).success,
relative: ["bin/app.dll"],
absolute: "/tmp/app.dll",
omitted: () => managedArtifactInputSchema.safeParse({}).success,
},
{
name: "open binary target",
accepts: (path) => openBinaryInputSchema.safeParse({ path }).success,
relative: ["fixtures/app.bin"],
absolute: "/tmp/fixture.bin",
},
{
name: "evidence bundle import",
accepts: (path) =>
importEvidenceBundleInputSchema.safeParse({ path }).success,
relative: ["evidence.json"],
absolute: "/tmp/evidence.json",
},
{
name: "firmware inspection",
accepts: (path) =>
firmwareInputSchemas.inspect_firmware_regions.safeParse({ path }).success,
relative: ["firmware.bin"],
absolute: "/tmp/firmware.bin",
},
{
name: "firmware extraction",
accepts: (path) =>
firmwareInputSchemas.extract_firmware.safeParse({
path,
output_directory: "/tmp/firmware-output",
}).success,
relative: ["firmware.bin"],
absolute: "/tmp/firmware.bin",
},
{
name: "browser executable",
accepts: (executable_path) =>
browserScenarioBrowserSchema.safeParse({
mode: "launch",
executable_path,
}).success,
relative: ["chrome"],
absolute: "/opt/chromium/chrome",
},
{
name: "Electron executable",
accepts: (executable_path) =>
electronActiveObservationInputSchema.safeParse({
executable_path,
application_path: "/tmp/electron-app/main.js",
}).success,
relative: ["Electron"],
absolute: "/Applications/Electron.app/Contents/MacOS/Electron",
},
{
name: "Electron application",
accepts: (application_path) =>
electronActiveObservationInputSchema.safeParse({
executable_path: "/Applications/Electron.app/Contents/MacOS/Electron",
application_path,
}).success,
relative: ["main.js"],
absolute: "/tmp/electron-app/main.js",
},
{
name: "Electron application root",
accepts: (application_root) =>
electronActiveObservationInputSchema.safeParse({
executable_path: "/Applications/Electron.app/Contents/MacOS/Electron",
application_path: "/tmp/electron-app/main.js",
application_root,
}).success,
relative: ["app"],
absolute: "/tmp/electron-app",
omitted: () =>
electronActiveObservationInputSchema.safeParse({
executable_path: "/Applications/Electron.app/Contents/MacOS/Electron",
application_path: "/tmp/electron-app/main.js",
}).success,
},
{
name: "expected server",
accepts: (expected_server_path) =>
binarySessionInputSchema.safeParse({ expected_server_path }).success,
relative: ["dist/main.js"],
absolute: "/opt/rea/dist/main.js",
omitted: () => binarySessionInputSchema.safeParse({}).success,
},
];
it.each(cases)("$name requires an absolute local path", (pathCase) => {
for (const relative of pathCase.relative)
expect(pathCase.accepts(relative), pathCase.name).toBe(false);
expect(pathCase.accepts(pathCase.absolute), pathCase.name).toBe(true);
if (pathCase.omitted !== undefined)
expect(pathCase.omitted(), pathCase.name).toBe(true);
});
it("keeps evidence bundle export overwrite disabled by default", () => {
expect(
exportEvidenceBundleInputSchema.safeParse({ path: "/tmp/bundle.json" }),
).toMatchObject({ success: true, data: { overwrite: false } });
});
describe.runIf(process.platform === "win32")(
"Windows absolute path forms",
() => {
it.each([
[closeBinaryInputSchema, { snapshot_path: "C:\\rea\\analysis.json" }],
[closeBinaryInputSchema, { snapshot_path: "C:/rea/analysis.json" }],
[exportEvidenceBundleInputSchema, { path: "C:/rea/bundle.json" }],
])("accepts %o", (schema, input) => {
expect(schema.safeParse(input).success).toBe(true);
});
},
);
+14 -2
View File
@@ -1,11 +1,23 @@
import { z } from "zod";
import { isAbsoluteLocalPath } from "../domain/localPath.js";
/** Optional expectations used to compare the live session with its caller. */
export const binarySessionInputSchema = z.object({
export const binarySessionInputSchema = z.strictObject({
expected_package_version: z.string().min(1).optional(),
expected_catalog_digest: z
.string()
.regex(/^[a-f0-9]{64}$/u)
.optional(),
expected_server_path: z.string().min(1).optional(),
expected_server_path: z
.string()
.min(1)
.refine(isAbsoluteLocalPath, {
message:
"expected_server_path must be an absolute local filesystem path (for example /opt/rea/dist/main.js)",
})
.describe(
"Absolute local filesystem path expected for the running server; relative paths are rejected.",
)
.optional(),
});
+11 -1
View File
@@ -1,5 +1,6 @@
import { z } from "zod";
import { isAbsoluteLocalPath } from "../domain/localPath.js";
import {
sessionOutputSchemas,
requireOutputSchema,
@@ -47,7 +48,16 @@ const session = <Name extends string, Schema extends z.ZodObject>(
/** Session-owned Evidence bundle export options. */
export const exportEvidenceBundleInputSchema = z.strictObject({
path: z.string().min(1),
path: z
.string()
.min(1)
.refine(isAbsoluteLocalPath, {
message:
"path must be an absolute local filesystem path (for example /tmp/rea/evidence.json or C:\\rea\\evidence.json)",
})
.describe(
"Absolute local filesystem path for the exported evidence bundle; relative paths are rejected.",
),
overwrite: z.boolean().default(false),
});
+14 -3
View File
@@ -1,13 +1,15 @@
import { z } from "zod";
import { isAbsoluteLocalPath } from "../domain/localPath.js";
import { artifactComparisonInputSchema } from "../domain/artifactComparison.js";
import { bundleComparisonInputSchema } from "../domain/bundleComparison.js";
import { callPathInputSchema } from "../domain/callPath.js";
import { changedBehaviorInputSchema } from "../domain/changedBehavior.js";
import { functionComparisonInputSchema } from "../domain/functionComparison.js";
import { jsonValueSchema } from "../domain/jsonValue.js";
import { processScenarioSchema } from "../domain/processCapture.js";
import { processTraceSpecificationSchema } from "../domain/processTraceComparison.js";
import { processScenarioSchema } from "../domain/process/processCapture.js";
import { processTraceSpecificationSchema } from "../domain/process/processTraceComparison.js";
import { recordUnknownInputSchema } from "../domain/residualUnknown.js";
import { reconstructionVerificationInputSchema } from "../domain/reconstructionVerification.js";
import { staticRuntimeCorrelationInputSchema } from "../domain/staticRuntimeCorrelation.js";
@@ -36,7 +38,16 @@ export const addressContextInputSchema = z.strictObject({
/** Session-owned Evidence bundle import options. */
export const importEvidenceBundleInputSchema = z.strictObject({
path: z.string().min(1),
path: z
.string()
.min(1)
.refine(isAbsoluteLocalPath, {
message:
"path must be an absolute local filesystem path (for example /tmp/evidence.json or C:\\rea\\evidence.json)",
})
.describe(
"Absolute local filesystem path for the evidence bundle to import; relative paths are rejected.",
),
});
/** Evidence references for deterministic process comparison. */
+1 -1
View File
@@ -55,7 +55,7 @@ export const TOOL_EXAMPLE_OVERRIDES: Readonly<
open_binary: { path: "/tmp/fixture" },
export_evidence_bundle: { path: "/tmp/evidence.json" },
inspect_address_context: { address: "0x1000" },
import_evidence_bundle: { path: "evidence.json" },
import_evidence_bundle: { path: "/tmp/evidence.json" },
capture_process_scenario: {
executable: "/usr/bin/true",
working_directory: "/tmp",
+2
View File
@@ -17,6 +17,7 @@ import { APPLICATION_TOOL_CONTRACTS } from "./applicationToolContracts.js";
import { JAVASCRIPT_RECOVERY_TOOL_CONTRACTS } from "./javascript/javascriptRecoveryToolContracts.js";
import { WEB_SCRIPT_TOOL_CONTRACTS } from "./webScriptToolContracts.js";
import { WEB_RUNTIME_TOOL_CONTRACTS } from "./webRuntimeToolContracts.js";
import { WEB_NETWORK_CAPTURE_TOOL_CONTRACTS } from "./webNetworkCaptureToolContracts.js";
const GROUPS = {
official: OFFICIAL_TOOL_CONTRACTS,
@@ -34,6 +35,7 @@ const GROUPS = {
javascript_recovery: JAVASCRIPT_RECOVERY_TOOL_CONTRACTS,
web_script_export: WEB_SCRIPT_TOOL_CONTRACTS,
web_runtime: WEB_RUNTIME_TOOL_CONTRACTS,
web_network_capture: WEB_NETWORK_CAPTURE_TOOL_CONTRACTS,
session: SESSION_TOOL_CONTRACTS,
} as const;
+2
View File
@@ -10,6 +10,7 @@ import { JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS } from "./javascript/java
import { APPLICATION_TOOL_CONTRACTS } from "./applicationToolContracts.js";
import { WEB_SCRIPT_TOOL_CONTRACTS } from "./webScriptToolContracts.js";
import { WEB_RUNTIME_TOOL_CONTRACTS } from "./webRuntimeToolContracts.js";
import { WEB_NETWORK_CAPTURE_TOOL_CONTRACTS } from "./webNetworkCaptureToolContracts.js";
import { JAVASCRIPT_RECOVERY_TOOL_CONTRACTS } from "./javascript/javascriptRecoveryToolContracts.js";
import { OFFICIAL_TOOL_CONTRACTS } from "./officialToolContracts.js";
import { ENHANCED_TOOL_CONTRACTS } from "./enhancedToolContracts.js";
@@ -33,6 +34,7 @@ export const TOOL_CONTRACTS = [
...APPLICATION_TOOL_CONTRACTS,
...WEB_SCRIPT_TOOL_CONTRACTS,
...WEB_RUNTIME_TOOL_CONTRACTS,
...WEB_NETWORK_CAPTURE_TOOL_CONTRACTS,
...JAVASCRIPT_RECOVERY_TOOL_CONTRACTS,
...SESSION_TOOL_CONTRACTS,
] as const;
+5
View File
@@ -41,6 +41,11 @@ const sessionEvidence = effects({ mutatesSession: true });
/** Explicit effect audit for every public tool. */
export const TOOL_EFFECTS: Readonly<Record<string, ToolEffects>> = {
inspect_web_network_capture: effects({
mutatesSession: true,
writesFilesystem: true,
launchesProcess: true,
}),
observe_web_execution: effects({
mutatesTarget: true,
mutatesSession: true,
+1 -1
View File
@@ -15,7 +15,7 @@ import { evidenceBundleSchema } from "../domain/evidenceBundle.js";
import {
processCaptureComparisonSchema,
processCaptureSchema,
} from "../domain/processCapture.js";
} from "../domain/process/processCapture.js";
import {
functionInstructionWindowSchema,
referenceKindSchema,
+1 -1
View File
@@ -363,7 +363,7 @@ export const sessionProvider = z
negotiated_protocol_version: z.string().nullable(),
client: z.object({ name: z.string(), version: z.string() }).nullable(),
skill: z.object({ name: z.string(), expected_version: z.string() }),
catalog: z.record(z.string(), z.json()),
catalog: z.record(z.string(), jsonValueSchema),
protocol_features: z.object({
progress: z.boolean(),
cancellation: z.boolean(),
@@ -0,0 +1,30 @@
import {
inspectWebNetworkCaptureInputSchema,
webNetworkCaptureSchema,
} from "../domain/webNetworkCapture.js";
import type { ToolContract } from "./toolContracts.js";
import { toolContractMetadata } from "./toolEffects.js";
import { evidenceResultOf } from "./toolOutputSchemas.js";
/** Historical inspection is distinct from live browser capture and runtime authority. */
export const WEB_NETWORK_CAPTURE_TOOL_CONTRACTS = [
{
name: "inspect_web_network_capture",
...toolContractMetadata("inspect_web_network_capture"),
description:
"Inspect retained local HAR 1.2 or native mitmproxy capture records without contacting recorded URLs. Returns original ordinals, pointers/byte ranges, preserved producer fields, precise numeric representations and exact exposed binary bytes inline. Excludes known transport credentials and explicitly marked values. Decodes every record before optional ordinal selection; malformed or oversized captures return no partial success. Duplicate HAR members are invalid; prototype-named __proto__ members are unsupported by the current shared JSON boundary. Uses pinned upstream parsers, owned temporary files and bounded offline processes. Native mitmproxy requires caller-supplied mitmdump 12.2.3 on Linux. Browser transaction IDs, runtime attribution and original bytes of HAR Unicode text remain unknown.",
kind: "browser-provider",
inputSchema: inspectWebNetworkCaptureInputSchema,
outputSchema: evidenceResultOf(webNetworkCaptureSchema),
examples: [
{
title: "Inspect historical HAR entries",
input: {
capture_path: "/captures/session.har",
format: "har",
record_ordinals: [0, 2],
},
},
],
},
] as const satisfies readonly ToolContract[];