mirror of
https://github.com/morluto/rea.git
synced 2026-11-18 20:53:00 +00:00
Remove REA permission grants, scope ceilings, approval confirmations, and inert settings. Preserve selected local evidence, accept caller-chosen commands and paths, and report actual runtime failures. Harden provider results, schema serialization, snapshot evidence binding, archive paths, source maps, native screenshots, managed EH parsing, and cancellation cleanup. Regenerate tool metadata and document direct invocation. BREAKING CHANGE: Removed permission configuration and policy commands, approval fields, filesystem scope inputs, and fixed confirmation options. Process capture inherits the host environment and accepts command names; callers must refresh tool schemas and migrate removed fields.
51 lines
2.5 KiB
TypeScript
51 lines
2.5 KiB
TypeScript
import type { ToolContract } from "./toolContracts.js";
|
|
import { toolContractMetadata } from "./toolEffects.js";
|
|
import { evidenceResultOf } from "./toolOutputSchemas.js";
|
|
import {
|
|
javascriptRuntimeObservationSchema,
|
|
javascriptRuntimeTargetListSchema,
|
|
listJavaScriptRuntimeTargetsInputSchema,
|
|
observeJavaScriptRuntimeInputSchema,
|
|
} from "../domain/javascriptRuntimeObservation.js";
|
|
|
|
const endpoint = "http://127.0.0.1:9229";
|
|
|
|
/** Passive Node/Electron V8 Inspector discovery and observation contracts. */
|
|
export const JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS = [
|
|
{
|
|
name: "list_javascript_runtime_targets",
|
|
...toolContractMetadata("list_javascript_runtime_targets"),
|
|
description:
|
|
"List every eligible Node/Electron V8 Inspector target from an explicit literal-loopback endpoint. Node discovery file locations that cannot be verified are preserved as unresolved reported URLs; they do not prove filesystem identity. Listing does not attach to targets.",
|
|
kind: "runtime-provider",
|
|
inputSchema: listJavaScriptRuntimeTargetsInputSchema,
|
|
outputSchema: evidenceResultOf(javascriptRuntimeTargetListSchema),
|
|
examples: [
|
|
{
|
|
title: "List Node Inspector targets",
|
|
input: {
|
|
inspector_endpoint: endpoint,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "observe_javascript_runtime",
|
|
...toolContractMetadata("observe_javascript_runtime"),
|
|
description:
|
|
"Attach passively to one Node/Electron V8 Inspector target by supplying its loopback Inspector endpoint and target ID. The provider rechecks target presence and attachability; a Node discovery file location may remain unresolved. Loaded script locations are validated independently from Debugger.scriptParsed. Captures script and Runtime execution-context metadata. REA never evaluates, pauses, resumes, reads source, or instruments the target; require/import edges, EventEmitter activity, and Electron IPC remain explicit unknowns. Reconcile the result with static Application Graph Evidence using reconcile_javascript_runtime. The selected endpoint exposes every target it serves to this tool.",
|
|
kind: "runtime-provider",
|
|
inputSchema: observeJavaScriptRuntimeInputSchema,
|
|
outputSchema: evidenceResultOf(javascriptRuntimeObservationSchema),
|
|
examples: [
|
|
{
|
|
title: "Observe one Node runtime",
|
|
input: {
|
|
inspector_endpoint: endpoint,
|
|
target_id: "TARGET_ID_FROM_LIST_JAVASCRIPT_RUNTIME_TARGETS",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
] as const satisfies readonly ToolContract[];
|