feat(process): add deterministic capture v3
This commit is contained in:
@@ -45,12 +45,12 @@ export const FUNCTION_COMPARISON_EVIDENCE = createEvidence(
|
||||
const PROCESS_PROVIDER = {
|
||||
id: "rea-process",
|
||||
name: "REA deterministic process harness",
|
||||
version: "1",
|
||||
version: "2",
|
||||
} as const;
|
||||
const capture = processCaptureSchema.parse(EMPTY_PROCESS_CAPTURE_EXAMPLE);
|
||||
const captureEvidence = (scenario: string) =>
|
||||
createEvidence(undefined, PROCESS_PROVIDER, {
|
||||
predicateType: "rea.process-capture/v2",
|
||||
predicateType: "rea.process-capture/v3",
|
||||
operation: "capture_process_scenario",
|
||||
parameters: { scenario },
|
||||
result: jsonValueSchema.parse(capture),
|
||||
@@ -69,7 +69,7 @@ export const PROCESS_COMPARISON_EVIDENCE = createEvidence(
|
||||
undefined,
|
||||
PROCESS_PROVIDER,
|
||||
{
|
||||
predicateType: "rea.process-comparison/v1",
|
||||
predicateType: "rea.process-comparison/v2",
|
||||
operation: "compare_process_captures",
|
||||
parameters: {
|
||||
left_evidence_id: PROCESS_CAPTURE_REFERENCE.evidence_id,
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { JsonValue } from "../domain/jsonValue.js";
|
||||
|
||||
/** Minimal valid process capture used only in public contract examples. */
|
||||
export const EMPTY_PROCESS_CAPTURE_EXAMPLE = {
|
||||
schema_version: 2,
|
||||
schema_version: 3,
|
||||
normalization: {
|
||||
paths: true,
|
||||
pids: true,
|
||||
@@ -11,8 +11,12 @@ export const EMPTY_PROCESS_CAPTURE_EXAMPLE = {
|
||||
patterns: [],
|
||||
},
|
||||
frames: [],
|
||||
rendered_frames: [],
|
||||
interaction_events: [],
|
||||
exit: { code: 0, signal: null, reason: "exited" },
|
||||
process_samples: [],
|
||||
filesystem_checkpoints: [],
|
||||
shim_events: [],
|
||||
protocol_events: [],
|
||||
files_before: [],
|
||||
files_after: [],
|
||||
|
||||
@@ -432,12 +432,12 @@ export const SESSION_TOOL_CONTRACTS = [
|
||||
),
|
||||
session(
|
||||
"capture_process_scenario",
|
||||
"Run one bounded process under a PTY using operator-approved executable and working roots. Requires approved: true; unknown_registry_approved: true separately records capture residuals. Captures normalized terminal frames, descendants, filesystem snapshots, and loopback replay. Disabled unless operator policy enables it; not a security sandbox.",
|
||||
"Run one bounded process under a PTY using operator-approved executable and working roots. Requires approved: true; unknown_registry_approved: true separately records capture residuals. Captures raw and xterm-rendered terminal frames, scripted interactions, lifecycle filesystem checkpoints, process ownership, declarative command shims, and loopback replay. Disabled unless operator policy enables it; not a security sandbox.",
|
||||
processScenarioSchema,
|
||||
),
|
||||
session(
|
||||
"compare_process_captures",
|
||||
"Compare two bounded process captures across terminal, exit, sampled process, filesystem, HTTP, and WebSocket evidence. Missing or truncated observations are never treated as equivalent.",
|
||||
"Compare two Process Capture v3 observations across terminal, interaction, exit, process, filesystem, command-shim, HTTP, and WebSocket evidence, returning the first bounded divergence. Missing or truncated observations are never treated as equivalent.",
|
||||
z.object({
|
||||
left_evidence_id: z.string().regex(/^ev_[a-f0-9]{64}$/u),
|
||||
left: processCaptureSchema,
|
||||
|
||||
Reference in New Issue
Block a user