import { type Static, Type } from "typebox"; import type { ArtifactStore } from "../context/context-artifacts.ts"; import type { ToolDefinition } from "../extensions/types.ts"; import { type ReflexPlan } from "../toolkit/reflex-interpreter.ts"; import { type ToolkitScript } from "../toolkit/script-registry.ts"; import type { ScriptExecution } from "../toolkit/script-runner.ts"; declare const runToolkitScriptSchema: Type.TObject<{ script: Type.TString; args: Type.TOptional>; confirm: Type.TOptional; }>; export type RunToolkitScriptInput = Static; export interface RunToolkitScriptDetails { outcome: "executed" | "failed" | "ambiguous" | "not_found" | "confirmation_required" | "empty_registry"; scriptName?: string; exitCode?: number | null; durationMs?: number; shortlist?: string[]; artifactId?: string; } export interface RunToolkitScriptDependencies { getScripts: () => ToolkitScript[]; execute: (script: ToolkitScript, args: readonly string[], signal?: AbortSignal) => Promise; artifactStore?: ArtifactStore; /** * Optional reflex interpreter (local brain): consulted ONLY when the deterministic Level-0 * matcher is ambiguous, to resolve fuzzy phrasing ("prepare db" vs "update db") into a * registry pick. Its plan is advisory — the danger/confirm rules and structural execution * contract apply identically to brain-selected scripts. */ interpret?: (request: string, scripts: readonly ToolkitScript[]) => Promise; } export declare function createRunToolkitScriptToolDefinition(deps: RunToolkitScriptDependencies): ToolDefinition; export {}; //# sourceMappingURL=run-toolkit-script.d.ts.map