omp-fabric 1.25.6 → 1.25.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +18 -20
- package/dist/chunks/{chunk-6G25AUGA.js → chunk-MR5C7U5H.js} +2 -2
- package/dist/chunks/chunk-MR5C7U5H.js.map +7 -0
- package/dist/fabric-runtime-state.js +14 -4
- package/dist/fabric-runtime-state.js.map +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +2 -2
- package/dist/providers/omp-tools-provider.d.ts.map +1 -1
- package/dist/runtime/core-override-guest-types.js +1 -1
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/type-error-guidance.d.ts.map +1 -1
- package/docs/certification.md +1 -1
- package/docs/codemap.md +7 -8
- package/docs/configuration.md +1 -1
- package/docs/judgment.md +3 -3
- package/package.json +8 -8
- package/dist/chunks/chunk-6G25AUGA.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.25.7
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `omp.bash` still advertised a per-call `env` option that OMP removed in 18.4.4, so a program could pass it, typecheck, and have the host silently ignore it — commands ran without the variables the model believed it had set. The guest shell options no longer declare `env`, and the unknown-property recovery hint now says where the host moved it: inline assignments or `export` inside the command, since commands inherit the configured shell environment.
|
|
8
|
+
- The host caps bash artifacts at `tools.artifactMaxBytes` (16 MiB default, read from host settings, so this session's override cannot lift it) and keeps only a head and tail sample with the middle dropped. Fabric's truncation note promised "the complete stream is on disk" regardless, and the column-cap restore would happily read the holed file back and present it as the full output. The note now names the dropped bytes and the setting, and the restore refuses an artifact the host reports as elided.
|
|
9
|
+
- Host pins move from `18.3.4` to `18.4.10`. The declared peer floor stays `>=18.3.0`; typecheck, the full suite, and certification re-run green against the new pin, and `docs/certification.md` records the re-certified host facts.
|
|
10
|
+
|
|
3
11
|
## 1.25.6
|
|
4
12
|
|
|
5
13
|
### Fixed
|
package/README.md
CHANGED
|
@@ -28,15 +28,15 @@ Fabric gives OMP one programmable tool called `fabric_exec`, which composes core
|
|
|
28
28
|
|
|
29
29
|
## Why Fabric?
|
|
30
30
|
|
|
31
|
-
|
|
|
32
|
-
| :-: |
|
|
33
|
-
| ⚡ | **Code mode** | One
|
|
34
|
-
| 🧰 | **Capability routing** |
|
|
35
|
-
| 🧑🤝🧑 | **Agent runtime** | One-shot workers, durable resident agents, persistent
|
|
36
|
-
| 🕸️ | **Workflows + mesh** | Phased progress
|
|
37
|
-
| ⚖️ | **Typed judgment** | Calibrated choice, bool, and score answers
|
|
31
|
+
| | Capability | What it unlocks |
|
|
32
|
+
| :-: | --- | --- |
|
|
33
|
+
| ⚡ | **Code mode** | One tool schema. Branching, loops, fan-out, and data flow live in checked TypeScript. |
|
|
34
|
+
| 🧰 | **Capability routing** | OMP core tools, MCP servers, captured extension tools, and Fabric providers share one runtime. |
|
|
35
|
+
| 🧑🤝🧑 | **Agent runtime** | One-shot workers, durable resident agents, persistent actors, councils, and bounded recursive queries. |
|
|
36
|
+
| 🕸️ | **Workflows + mesh** | Phased progress, durable topics, shared tasks, and compare-and-swap state. |
|
|
37
|
+
| ⚖️ | **Typed judgment** | Calibrated choice, bool, and score answers, plus batch triage helpers and four optional gates. |
|
|
38
38
|
| 🛡️ | **Guardrails** | Approvals, isolation, timeouts, concurrency, recursion depth, and shared cost budgets. |
|
|
39
|
-
| 🎛️ | **Native TUI** | Live activity, an interactive dashboard, and settings
|
|
39
|
+
| 🎛️ | **Native TUI** | Live activity, an interactive dashboard, and settings inside OMP. |
|
|
40
40
|
|
|
41
41
|
## How it works
|
|
42
42
|
|
|
@@ -131,27 +131,25 @@ See the [interface & commands reference](docs/interface.md) for every view, keyb
|
|
|
131
131
|
|
|
132
132
|
## Measured against OMP without Fabric
|
|
133
133
|
|
|
134
|
-
A
|
|
134
|
+
A paused session with 40 prior tool turns, about 190 KB on disk, resumed three times per arm on fabric 1.25.6 with `claude-opus-5-5`. Both arms get the same fixture, prompt, and host config. A run passes only when `verify.mjs` exits zero and the forbidden files stay untouched. Measured 2026-09-28:
|
|
135
135
|
|
|
136
136
|
| | Baseline | Fabric | Delta |
|
|
137
|
-
|
|
137
|
+
| --- | ---: | ---: | ---: |
|
|
138
138
|
| Task success | 3/3 | 3/3 | equal |
|
|
139
|
-
| Tokens |
|
|
140
|
-
| Tool calls |
|
|
141
|
-
| Wall time |
|
|
142
|
-
| Cost | $
|
|
139
|
+
| Tokens | 1,182,067 | 630,932 | **-47%** |
|
|
140
|
+
| Tool calls | 6 | 9 | +3 |
|
|
141
|
+
| Wall time | 44.3 s | 72.7 s | +64% |
|
|
142
|
+
| Cost | $3.6159 | $1.0158 | **-72%** |
|
|
143
143
|
|
|
144
|
-
Per-run tokens were
|
|
145
|
-
|
|
146
|
-
Reproduce it with your own model and provider:
|
|
144
|
+
Per-run tokens were 394,130 / 394,110 / 393,827 for the baseline and 226,541 / 224,805 / 179,586 with Fabric. Each fabric run compacted the history to a 6,538-byte LCM summary before resuming, and five of its nine tool calls were memory recalls of that summary. Wall time rose because compaction runs before the resume. The smaller fixture this table replaces stays in git history.
|
|
147
145
|
|
|
148
146
|
```sh
|
|
149
147
|
OMP_FABRIC_REAL_RESUME=1 \
|
|
150
|
-
OMP_FABRIC_BENCH_MODEL
|
|
151
|
-
OMP_FABRIC_BENCH_PROVIDER
|
|
148
|
+
OMP_FABRIC_BENCH_MODEL=<model> \
|
|
149
|
+
OMP_FABRIC_BENCH_PROVIDER=<provider> \
|
|
152
150
|
OMP_FABRIC_BENCH_KEY_ENV=YOUR_KEY_VARIABLE \
|
|
153
151
|
OMP_FABRIC_BENCH_REPEATS=3 \
|
|
154
|
-
OMP_FABRIC_BENCH_MAX_USD=
|
|
152
|
+
OMP_FABRIC_BENCH_MAX_USD=50 \
|
|
155
153
|
bun run benchmark:real-resume
|
|
156
154
|
```
|
|
157
155
|
|
|
@@ -458,7 +458,7 @@ type OmpShellOptions = {
|
|
|
458
458
|
timeout?: number; timeoutMs?: number; settle?: boolean;
|
|
459
459
|
async?: boolean;
|
|
460
460
|
cwd?: string; workdir?: string; directory?: string; workingDirectory?: string;
|
|
461
|
-
|
|
461
|
+
pty?: boolean;
|
|
462
462
|
};
|
|
463
463
|
type OmpBashOptions = OmpShellOptions;
|
|
464
464
|
type OmpGrepOptions = { path?: string; glob?: string; globPattern?: string; ignoreCase?: boolean; ic?: boolean; caseInsensitive?: boolean; literal?: boolean; context?: number; ctx?: number; skip?: number; gitignore?: boolean };
|
|
@@ -1555,4 +1555,4 @@ export {
|
|
|
1555
1555
|
GUEST_TYPE_DECLARATIONS,
|
|
1556
1556
|
guestTypeDeclarations
|
|
1557
1557
|
};
|
|
1558
|
-
//# sourceMappingURL=chunk-
|
|
1558
|
+
//# sourceMappingURL=chunk-MR5C7U5H.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/runtime/guest-types.ts"],
|
|
4
|
+
"sourcesContent": ["import type { FabricDynamicGuestDeclarations } from \"../protocol.js\";\n\n// These names and compatibility fields are the single source of truth for\n// generated core-override overloads. Keep them beside OmpToolsApi below so an\n// override extends the same guest contract rather than copying its signatures.\n// Numeric fields widen to `number | string` in generated overloads too,\n// mirroring built-in runtime normalization; a strict override schema still\n// rejects the string form at validation time, and the registry error wins.\nexport const OMP_CORE_COMPATIBILITY_ARGUMENT_TYPE_NAMES = {\n read: \"OmpReadCompatibilityArgument\",\n bash: \"OmpBashCompatibilityArgument\",\n edit: \"OmpEditCompatibilityArgument\",\n write: \"OmpWriteCompatibilityArgument\",\n grep: \"OmpGrepCompatibilityArgument\",\n find: \"OmpFindCompatibilityArgument\",\n ls: \"OmpLsCompatibilityArgument\",\n} as const;\n\nexport const OMP_CORE_NUMERIC_FIELDS = {\n read: [\"offset\", \"limit\"],\n bash: [\"timeout\"],\n edit: [],\n write: [],\n grep: [\"context\", \"skip\"],\n find: [\"limit\"],\n ls: [\"limit\"],\n} as const;\n\nexport const GUEST_TYPE_DECLARATIONS = `\ntype JsonPrimitive = string | number | boolean | null;\ntype JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue };\ntype FabricTransport = \"auto\" | \"process\" | \"tmux\" | \"screen\" | \"localterm\" | \"herdr\";\ntype FabricAgentRunner = \"omp\" | \"claude\" | \"veda\";\ntype FabricThinking = \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\ninterface FabricActionEffect {\n kind: \"none\" | \"scoped\" | \"transactional\" | \"emission\";\n resources?: string[];\n ordering?: \"commutative\" | \"ordered\" | \"unknown\";\n}\ninterface FabricAction {\n ref: string;\n provider: string;\n name: string;\n description: string;\n inputSchema: Record<string, unknown>;\n outputSchema?: Record<string, unknown>;\n risk: \"read\" | \"write\" | \"execute\" | \"network\" | \"agent\";\n namespace?: string;\n effect?: FabricActionEffect;\n}\ninterface FabricImageContent {\n type: \"image\";\n data: string;\n mimeType: string;\n}\ninterface FabricAgentRequest {\n task: string;\n images?: FabricImageContent[];\n name?: string;\n runner?: FabricAgentRunner;\n transport?: FabricTransport;\n model?: string;\n persona?: string;\n thinking?: FabricThinking;\n tools?: string[];\n addTools?: string[];\n timeoutMs?: number;\n extensions?: boolean;\n recursive?: boolean;\n /** Filesystem execution directory; relative paths resolve from the parent agent cwd. */\n cwd?: string;\n worktree?: boolean;\n schema?: Record<string, unknown>;\n prompt?: string;\n instructions?: string;\n timeout_ms?: number;\n residency?: FabricParticipantResidency;\n}\ninterface FabricHandoffCall {\n readonly ref: string;\n}\ninterface FabricHandoffFacts {\n readonly calls: readonly FabricHandoffCall[];\n count(ref?: string | readonly string[]): number;\n}\ntype FabricHandoffPredicate = (facts: Readonly<FabricHandoffFacts>) => boolean;\ninterface FabricHandoffRequest {\n model: string;\n task?: string;\n when?: FabricHandoffPredicate;\n name?: string;\n transport?: FabricTransport;\n thinking?: FabricThinking;\n tools?: string[];\n timeoutMs?: number;\n extensions?: boolean;\n recursive?: boolean;\n schema?: Record<string, unknown>;\n prompt?: string;\n instructions?: string;\n timeout_ms?: number;\n}\ninterface FabricHandoffResult {\n scheduled: true;\n status: \"deferred\";\n boundary: \"fabric_exec_end\";\n}\ninterface FabricMainAgentInfo {\n id: string;\n name: \"Main\";\n kind: \"main\";\n status: \"idle\" | \"running\" | \"remote\";\n runner: \"omp\";\n transport: \"host\";\n cwd?: string;\n sessionId?: string;\n model?: string;\n thinking?: string;\n startedAt?: number;\n updatedAt: number;\n pendingMessages: boolean;\n local: boolean;\n}\ninterface FabricPeerInfo {\n id: string;\n name: string;\n kind: \"peer\";\n status: \"idle\" | \"running\";\n runner: \"omp\";\n transport: \"host\";\n cwd: string;\n sessionId: string;\n model?: string;\n thinking?: string;\n startedAt: number;\n updatedAt: number;\n pendingMessages: boolean;\n local: false;\n}\ntype FabricParticipantKind = \"root\" | \"agent\" | \"actor\";\ntype FabricParticipantResidency = \"session\" | \"durable\";\ntype FabricParticipantScope = \"local\" | \"lineage\" | \"project\";\ntype FabricParticipantCapability = \"steer\" | \"followUp\" | \"stop\" | \"ask\" | \"actor-bindings\" | \"attach\" | \"fabric\";\ninterface FabricParticipantInfo {\n format: 1;\n id: string;\n kind: FabricParticipantKind;\n rootId: string;\n ownerHostId: string;\n ownerIdentityId: string;\n parentId?: string;\n name: string;\n status: string;\n runner: FabricAgentRunner;\n transport: FabricTransport | \"host\";\n capabilities: FabricParticipantCapability[];\n cwd?: string;\n sessionId?: string;\n model?: string;\n thinking?: string;\n startedAt: number;\n updatedAt: number;\n finishedAt?: number;\n pendingMessages?: boolean;\n currentTool?: string;\n turns?: number;\n toolCalls?: number;\n usage?: { input: number; output: number; cacheRead: number; cacheWrite: number; cost: number };\n actorQueued?: number;\n actorMessages?: number;\n controlProtocol: \"v1\" | \"legacy\";\n residency: FabricParticipantResidency;\n local: boolean;\n stale: boolean;\n}\ntype FabricLifecycleEventType =\n | \"omp.input\"\n | \"omp.agent_start\"\n | \"omp.agent_end\"\n | \"omp.turn_end\"\n | \"omp.tool_error\"\n | \"omp.session_compact\"\n | \"run.completed\"\n | \"run.failed\"\n | \"run.stopped\"\n | \"run.timed_out\"\n | \"tokens.usage\"\n | \"component.state\";\ntype FabricLifecycleDelivery = \"steer\" | \"followUp\";\ninterface FabricLifecycleSource {\n id: string;\n name: string;\n kind: FabricParticipantKind;\n rootId: string;\n runner: FabricAgentRunner;\n ownerHostId?: string;\n ownerIdentityId?: string;\n}\ninterface FabricLifecycleEvent {\n version: 1;\n id: string;\n sequence: number;\n event: FabricLifecycleEventType;\n source: FabricLifecycleSource;\n occurredAt: number;\n publishedAt: number;\n runId?: string;\n status?: string;\n data?: unknown;\n}\ninterface FabricLifecycleSubscription {\n format: 1;\n id: string;\n from: string;\n events: FabricLifecycleEventType[];\n to: string;\n delivery: FabricLifecycleDelivery;\n triggerTurn: boolean;\n once: boolean;\n afterSequence: number;\n createdAt: number;\n updatedAt: number;\n createdBy: { id: string; name: string; kind: \"main\" | \"agent\" | \"actor\"; sessionId?: string };\n lastDeliveredAt?: number;\n lastEventId?: string;\n lastError?: string;\n}\ninterface FabricAgentHandle {\n id: string;\n name: string;\n status: string;\n runner: FabricAgentRunner;\n transport: FabricTransport;\n cwd: string;\n model?: string;\n thinking?: FabricThinking;\n actorId?: string;\n actorName?: string;\n sessionId?: string;\n runnerSessionId?: string;\n attachCommand?: string;\n branch?: string;\n worktree?: string;\n text?: string;\n value?: unknown;\n error?: string;\n logFile?: string;\n residency?: FabricParticipantResidency;\n}\ninterface FabricRemoteControlResult {\n queued: true;\n messageId: string;\n routed: \"mesh\";\n acknowledged: true;\n}\ninterface FabricAgentResult extends FabricAgentHandle {\n task: string;\n startedAt: number;\n finishedAt?: number;\n turns: number;\n toolCalls: number;\n text: string;\n value?: unknown;\n error?: string;\n usage: { input: number; output: number; cacheRead: number; cacheWrite: number; cost: number };\n pendingMessages?: { steering: string[]; followUp: string[] };\n}\ninterface FabricModelInfo {\n runner?: FabricAgentRunner;\n provider: string;\n id: string;\n name: string;\n key: string;\n value?: string;\n resolvedModel?: string;\n displayName?: string;\n description?: string;\n supportsEffort?: boolean;\n supportedEffortLevels?: string[];\n supportsAdaptiveThinking?: boolean;\n supportsFastMode?: boolean;\n supportsAutoMode?: boolean;\n}\ninterface FabricLogLine {\n index?: number;\n offset: number;\n raw: string;\n parsed?: unknown;\n}\ninterface FabricAgentLog {\n id: string;\n runDirectory: string;\n logFile: string;\n status?: FabricAgentResult;\n events: FabricLogLine[];\n hasMore: boolean;\n before?: number;\n}\ninterface FabricActorLog {\n actorId: string;\n actorName: string;\n sessionFile: string;\n logDir: string;\n session: FabricLogLine[];\n sessionHasMore: boolean;\n sessionBefore?: number;\n run?: {\n runId: string;\n eventsFile: string;\n status?: FabricAgentResult;\n events: FabricLogLine[];\n hasMore: boolean;\n before?: number;\n };\n retainedRuns: string[];\n}\ninterface FabricCapabilityActionHead {\n key: string;\n parentKey: string;\n ref: string;\n name: string;\n description: string;\n descriptorHash: string;\n risk: \"read\" | \"write\" | \"execute\" | \"network\" | \"agent\";\n namespace?: string;\n effect?: FabricActionEffect;\n}\ninterface FabricCapabilityProviderHead {\n key: string;\n parentKey: string;\n name: string;\n description: string;\n descriptorHash: string;\n actions: FabricCapabilityActionHead[];\n}\ninterface FabricCapabilityCatalog {\n kind: \"omp-fabric.capability-catalog\";\n version: 1;\n root: {\n key: \"capability:fabric\";\n name: \"Fabric capabilities\";\n description: string;\n descriptorHash: string;\n };\n providers: FabricCapabilityProviderHead[];\n totalActions: number;\n indexedActions: number;\n complete: boolean;\n reasons: string[];\n}\ninterface FabricToolsApi {\n providers(): Promise<Array<{ name: string; description: string }>>;\n catalog(args?: { provider?: string; limit?: number }): Promise<FabricCapabilityCatalog>;\n list(args?: { provider?: string; namespace?: string; query?: string; limit?: number }): Promise<FabricAction[]>;\n search(query: string): Promise<FabricAction[]>;\n search(args: { query: string; limit?: number }): Promise<FabricAction[]>;\n describe(args: { ref: string }): Promise<FabricAction>;\n call(args: { ref: string; args?: Record<string, unknown> }): Promise<unknown>;\n progress(args: { message: string }): Promise<void>;\n models(): Promise<FabricModelInfo[]>;\n}\ninterface FabricCapturedToolResult {\n content: Array<{ type: string; text?: string; [key: string]: unknown }>;\n text: string;\n details?: unknown;\n isError: boolean;\n terminate?: boolean;\n source: { path: string; source: string; scope: string; origin: string; baseDir?: string };\n}\ninterface FabricCapturedTool {\n (args?: Record<string, unknown>): Promise<FabricCapturedToolResult>;\n}\ntype FabricExtensionsApi = Record<string, FabricCapturedTool>;\n// String-primary tools (read/bash/grep/find/ls) accept a bare string; the\n// runtime proxy coerces it to { <primaryField>: string }. Lets the model write\n// the natural form (omp.bash(\"ls\")) instead of omp.bash({ command: \"ls\" }).\n// Return shapes differ by tool: read/grep/find/ls return their text as a bare\n// string (e.g. const src: string = await omp.read({ path })); shell/edit/write\n// return { ok, output, details } (e.g. const { output } = await omp.bash(...)).\n// Common alias keys (cmd\u2192command, query\u2192pattern, file\u2192path, dir\u2192path) and a\n// flat edit shape ({ path, oldText, newText }) are also accepted; the runtime\n// proxy normalizes them to the canonical form before the host validates args.\n// Bash timeout is measured in seconds; timeoutMs is converted from milliseconds.\n// Extended near-miss repairs: find's name/filename/glob \u2192 pattern, write's\n// data \u2192 content, ls's folder \u2192 path, bash's script \u2192 command; numeric option\n// fields (limit/offset/context/timeout) also accept numeric strings, coerced\n// at runtime (2322 diagnostics are suppressed by the type-checker by design).\n// String-primary tools also take a two-arg (primary, options) form \u2014\n// omp.read(\"index.ts\", { limit: 120 }) merges to { path, ...options } at\n// runtime, the positional string winning the primary field on conflict.\n// shell/edit/write envelopes are proxy-guarded so string-method access\n// (.trim(), .split(), iteration) fails with an actionable TypeError pointing\n// at .output instead of QuickJS's context-free \"not a function\" \u2014 property-\n// miss (2339) checks are suppressed by design, so the runtime gives the hint.\ntype OmpPathArgument = {\n path?: string;\n file?: string;\n absolutePath?: string;\n file_path?: string;\n filePath?: string;\n filepath?: string;\n pathname?: string;\n target_file?: string;\n targetFile?: string;\n absolute_path?: string;\n fileAbsolutePath?: string;\n};\ntype OmpOptionalPathArgument = {\n path?: string;\n file?: string;\n absolutePath?: string;\n file_path?: string;\n filePath?: string;\n filepath?: string;\n pathname?: string;\n target_file?: string;\n targetFile?: string;\n absolute_path?: string;\n fileAbsolutePath?: string;\n dir?: string;\n folder?: string;\n directory?: string;\n directoryPath?: string;\n};\ntype OmpOldTextArgument = {\n oldText?: string;\n old?: string;\n old_string?: string;\n oldString?: string;\n old_str?: string;\n oldStr?: string;\n from?: string;\n old_value?: string;\n old_text?: string;\n oldContent?: string;\n old_content?: string;\n};\ntype OmpNewTextArgument = {\n newText?: string;\n new?: string;\n replacement?: string;\n new_string?: string;\n newString?: string;\n new_str?: string;\n newStr?: string;\n to?: string;\n new_value?: string;\n new_text?: string;\n newContent?: string;\n new_content?: string;\n};\ntype OmpEditOperation = OmpOldTextArgument & OmpNewTextArgument & { all?: boolean };\ntype OmpCommandArgument = { command?: string; cmd?: string; shell?: string; cmdline?: string; script?: string; commandLine?: string };\ntype OmpContentArgument = { content?: string; contents?: string; body?: string; text?: string; data?: string; fileContent?: string };\ntype OmpGrepPatternArgument = { pattern?: string; query?: string; regex?: string; search?: string; q?: string; expression?: string; text?: string };\ntype OmpFindPatternArgument = { pattern?: string; query?: string; regex?: string; search?: string; name?: string; filename?: string; glob?: string; expression?: string; include?: string };\n// Two-arg (primary, options) bags for the string-primary tools. Only option\n// aliases belong here (max/start/ctx/ic/...), never primary-field aliases \u2014\n// the primary field comes from the positional string.\ntype OmpReadOptions = { offset?: number; limit?: number; start?: number; max?: number };\n// cwd is honored per call by the omp provider, which binds the command to a\n// shell definition rooted there; relative paths resolve from the session cwd.\n// The alias spellings mirror the shell entries in __ompArgAliases: the\n// runtime repairs them, so the checker has to accept the same spellings or a\n// repairable call is rejected before it ever reaches the sandbox.\ntype OmpShellOptions = {\n timeout?: number; timeoutMs?: number; settle?: boolean;\n async?: boolean;\n cwd?: string; workdir?: string; directory?: string; workingDirectory?: string;\n pty?: boolean;\n};\ntype OmpBashOptions = OmpShellOptions;\ntype OmpGrepOptions = { path?: string; glob?: string; globPattern?: string; ignoreCase?: boolean; ic?: boolean; caseInsensitive?: boolean; literal?: boolean; context?: number; ctx?: number; skip?: number; gitignore?: boolean };\ntype OmpFindOptions = { path?: string; limit?: number; max?: number; gitignore?: boolean; hidden?: boolean };\ntype OmpLsOptions = { limit?: number; max?: number };\ntype OmpReadArgument = string | (OmpPathArgument & OmpReadOptions);\ntype OmpBashArgument = string | (OmpCommandArgument & OmpBashOptions);\ntype OmpEditFlatArgument = OmpPathArgument & OmpOldTextArgument & OmpNewTextArgument & { all?: boolean };\ntype OmpEditArgument = OmpPathArgument & ({ edits: OmpEditOperation[]; all?: boolean } | OmpEditFlatArgument);\ntype OmpWriteArgument = string | (OmpPathArgument & OmpContentArgument);\ntype OmpGrepArgument = string | (OmpGrepPatternArgument & OmpGrepOptions);\ntype OmpFindArgument = string | (OmpFindPatternArgument & OmpFindOptions);\ntype OmpLsArgument = string | (OmpOptionalPathArgument & OmpLsOptions);\ntype OmpNumericString<T> = T extends number ? T | string : T;\ntype OmpNumericStringOptions<T> = { [K in keyof T]: OmpNumericString<T[K]> };\ntype OmpReadCompatibilityArgument = string | (OmpPathArgument & OmpNumericStringOptions<OmpReadOptions>);\ntype OmpBashCompatibilityArgument = string | (OmpCommandArgument & OmpNumericStringOptions<OmpBashOptions>);\ntype OmpEditCompatibilityArgument = OmpEditFlatArgument;\ntype OmpWriteCompatibilityArgument = OmpWriteArgument;\ntype OmpGrepCompatibilityArgument = string | (OmpGrepPatternArgument & OmpNumericStringOptions<OmpGrepOptions>);\ntype OmpFindCompatibilityArgument = string | (OmpFindPatternArgument & OmpNumericStringOptions<OmpFindOptions>);\ntype OmpLsCompatibilityArgument = string | (OmpOptionalPathArgument & OmpNumericStringOptions<OmpLsOptions>);\ninterface OmpToolsApi {\n read(args: OmpReadArgument, options?: OmpReadOptions): Promise<string>;\n bash(args: OmpBashArgument, options?: OmpBashOptions): Promise<{ ok: true; output: string; details: unknown } | { ok: false; output: string; details: null; exitCode: number; error: string }>;\n edit(args: OmpEditArgument): Promise<{ ok: true; output: string; details: unknown }>;\n edit(path: string, oldText: string, newText: string): Promise<{ ok: true; output: string; details: unknown }>;\n write(args: OmpWriteArgument): Promise<{ ok: true; output: string; details: unknown }>;\n write(path: string, content: string): Promise<{ ok: true; output: string; details: unknown }>;\n grep(args: OmpGrepArgument): Promise<string>;\n grep(pattern: string, path?: string | OmpGrepOptions, skip?: number): Promise<string>;\n find(args: OmpFindArgument): Promise<string>;\n find(pattern: string, path?: string | OmpFindOptions, limit?: number): Promise<string>;\n ls(args?: OmpLsArgument, options?: OmpLsOptions): Promise<string>;\n wait(): Promise<{ ok: true; output: string; details: unknown } | { ok: false; output: string; details: null; exitCode: number; error: string }>;\n}\ntype FabricActorHostEvent =\n | \"resources_discover\"\n | \"session_start\"\n | \"session_before_switch\"\n | \"session_switch\"\n | \"session_before_branch\"\n | \"session_branch\"\n | \"session_before_compact\"\n | \"session.compacting\"\n | \"session_compact\"\n | \"session_shutdown\"\n | \"session_before_tree\"\n | \"session_tree\"\n | \"goal_updated\"\n | \"input\"\n | \"before_agent_start\"\n | \"agent_start\"\n | \"agent_end\"\n | \"session_stop\"\n | \"turn_start\"\n | \"turn_end\"\n | \"message_start\"\n | \"message_update\"\n | \"message_end\"\n | \"context\"\n | \"before_provider_request\"\n | \"after_provider_response\"\n | \"tool_execution_start\"\n | \"tool_call\"\n | \"tool_execution_update\"\n | \"tool_result\"\n | \"tool_execution_end\"\n | \"user_bash\"\n | \"tool_error\";\ntype FabricActorDelivery = \"mailbox\" | \"steer\" | \"followUp\" | \"nextTurn\";\ninterface FabricActorHostMediaDescriptor {\n readonly type: \"image\";\n readonly mediaIndex: number;\n readonly mimeType: string;\n}\ninterface FabricActorHostSignal {\n readonly payload: unknown;\n readonly media?: readonly FabricActorHostMediaDescriptor[];\n readonly idle: boolean;\n readonly observedAt: number;\n}\ntype FabricActorActivation =\n | { readonly kind: \"hostEvent\"; readonly id: string; readonly source: string; readonly sequence: number; readonly createdAt: number; readonly event: FabricActorHostEvent; readonly mainRevision: number; readonly taskRevision: number; readonly signal?: FabricActorHostSignal }\n | { readonly kind: \"direct\"; readonly id: string; readonly source: string; readonly sequence: number; readonly createdAt: number }\n | { readonly kind: \"mesh\"; readonly id: string; readonly source: string; readonly sequence: number; readonly createdAt: number; readonly topic: string };\ninterface FabricActorValidityFacts {\n readonly activation: Readonly<FabricActorActivation>;\n readonly current: Readonly<{ latestActivationSequence: number; mainRevision: number; taskRevision: number; idle: boolean; now: number }>;\n}\ntype FabricActorValidityDecision = boolean | { valid: boolean; reason?: string };\ntype FabricActorBindingScope = \"session\" | \"project\";\ninterface FabricActorRunBinding { model?: string; thinking?: FabricThinking }\ntype FabricActorValidWhile = (facts: Readonly<FabricActorValidityFacts>) => FabricActorValidityDecision;\ninterface FabricActorRequestBase {\n scope?: \"session\" | \"project\" | \"global\";\n name: string;\n instructions: string;\n events?: FabricActorHostEvent[];\n topics?: string[];\n responseMode?: \"text\" | \"directive\";\n coalesce?: boolean;\n runner?: FabricAgentRunner;\n model?: string;\n thinking?: FabricThinking;\n tools?: string[];\n transport?: FabricTransport;\n cwd?: string;\n timeoutMs?: number;\n timeout_ms?: number;\n extensions?: boolean;\n requires?: Array<string | { ref: string; optional?: boolean }>;\n validWhile?: FabricActorValidWhile;\n residency?: FabricParticipantResidency;\n}\ntype FabricActorRequest = FabricActorRequestBase & (\n | { delivery?: \"mailbox\"; triggerTurn?: false }\n | { delivery: \"nextTurn\"; triggerTurn?: false }\n | { delivery: \"steer\" | \"followUp\"; triggerTurn: boolean }\n);\ninterface FabricActorInfo {\n id: string;\n scope: \"session\" | \"project\";\n name: string;\n status: \"idle\" | \"queued\" | \"running\" | \"stopped\";\n runner: FabricAgentRunner;\n events: FabricActorHostEvent[];\n topics: string[];\n delivery: FabricActorDelivery;\n responseMode: \"text\" | \"directive\";\n triggerTurn: boolean;\n coalesce: boolean;\n model?: string;\n thinking?: FabricThinking;\n binding?: FabricActorRunBinding & { scope: \"session\"; sessionId: string; updatedAt?: number };\n projectDefaults?: FabricActorRunBinding & { scope: \"project\" };\n tools?: string[];\n timeoutMs?: number;\n extensions?: boolean;\n requirements?: Array<{ ref: string; optional?: boolean }>;\n capabilityDigest?: string;\n missingCapabilities?: string[];\n validWhile?: { version: 1; source: string };\n residency: FabricParticipantResidency;\n queued: number;\n messages: number;\n createdAt: number;\n updatedAt: number;\n lastRunId?: string;\n lastError?: string;\n sessionFile?: string;\n logDir?: string;\n}\ninterface FabricModelSwitchRequest {\n /** provider/id, a models.aliases name, or a search term; resolution tries aliases first, then exact matches, then the closest fuzzy match (recency from pi-model-sort breaks ties) against authenticated models. */\n model: string;\n /** Optional provider filter applied before matching (e.g. \"anthropic\"). */\n provider?: string;\n}\ninterface FabricModelSwitchResult {\n switched: boolean;\n /** Active model as provider/id after the call (unchanged when reason is \"already-active\"). */\n model: string;\n name?: string;\n /** Previously active provider/id when known. Absent for already-active results. */\n previous?: string;\n /** Set when the selector resolved through a configured models.aliases name. */\n alias?: string;\n /** How the selector resolved: the alias name, or one of closest/recent/latest for inexact picks. Absent for exact provider/id or bare-id matches. */\n via?: string;\n reason?: \"already-active\";\n}\ninterface FabricActorMessage {\n id: string;\n actorId: string;\n actorName: string;\n direction: \"in\" | \"out\";\n source: string;\n createdAt: number;\n text?: string;\n data?: unknown;\n action?: \"silent\" | \"message\" | \"stop\";\n runId?: string;\n error?: string;\n stale?: boolean;\n reason?: string;\n}\n// agentId/agent_id spellings repair to id during agent arg normalization.\ntype FabricAgentTargetArgs = { id: string; agentId?: string; agent_id?: string };\ninterface FabricAgentsApi {\n run(args: FabricAgentRequest): Promise<FabricAgentResult>;\n handoff(args: FabricHandoffRequest): Promise<FabricHandoffResult>;\n spawn(args: FabricAgentRequest): Promise<FabricAgentHandle>;\n wait(args: FabricAgentTargetArgs): Promise<FabricAgentResult>;\n status(args: FabricAgentTargetArgs): Promise<FabricAgentResult | FabricAgentHandle | FabricMainAgentInfo | FabricActorInfo | FabricParticipantInfo>;\n list(args?: { scope?: FabricParticipantScope }): Promise<Array<FabricAgentResult | FabricAgentHandle | FabricParticipantInfo>>;\n members(args?: { scope?: FabricParticipantScope; kinds?: FabricParticipantKind[]; includeStale?: boolean }): Promise<FabricParticipantInfo[]>;\n self(): Promise<FabricParticipantInfo>;\n main(): Promise<FabricMainAgentInfo>;\n sessions(): Promise<FabricParticipantInfo[]>;\n peers(): Promise<FabricPeerInfo[]>;\n subscribe(args: {\n from: string;\n events: FabricLifecycleEventType[];\n to?: string;\n delivery: FabricLifecycleDelivery;\n triggerTurn: boolean;\n once?: boolean;\n }): Promise<FabricLifecycleSubscription>;\n subscriptions(args?: { from?: string; to?: string }): Promise<FabricLifecycleSubscription[]>;\n unsubscribe(args: FabricAgentTargetArgs): Promise<{ removed: boolean }>;\n models(args?: { runner?: FabricAgentRunner; refresh?: boolean }): Promise<FabricModelInfo[]>;\n stop(args: FabricAgentTargetArgs): Promise<FabricAgentResult | FabricActorInfo | FabricRemoteControlResult>;\n cleanup(args: FabricAgentTargetArgs & { deleteBranch?: boolean; delete_branch?: boolean }): Promise<{ cleaned: boolean }>;\n create(args: FabricActorRequest): Promise<FabricActorInfo>;\n setModel(args: { id: string; model?: string; scope?: FabricActorBindingScope }): Promise<FabricActorInfo>;\n switchModel(args: FabricModelSwitchRequest): Promise<FabricModelSwitchResult>;\n setThinking(args: { id: string; thinking?: FabricThinking; scope?: FabricActorBindingScope }): Promise<FabricActorInfo>;\n setTools(args: { id: string; tools: string[]; scope?: \"project\" | \"global\" }): Promise<FabricActorInfo>;\n setEvents(args: { id: string; events: FabricActorHostEvent[] }): Promise<FabricActorInfo>;\n setDeliveryPolicy(args: {\n id: string;\n delivery: FabricActorDelivery;\n triggerTurn: boolean;\n scope?: \"project\" | \"global\";\n }): Promise<FabricActorInfo>;\n setInstructions(args: {\n id: string;\n instructions: string;\n scope?: \"project\" | \"global\";\n }): Promise<FabricActorInfo>;\n ask(args: { id: string; message: string; data?: unknown; model?: string; thinking?: FabricThinking }): Promise<FabricActorMessage>;\n tell(args: { id: string; message: string; data?: unknown; model?: string; thinking?: FabricThinking }): Promise<{ queued: true; messageId: string }>;\n steer(args: { id: string; message: string; data?: unknown }): Promise<{ queued: true; messageId: string; routed?: \"local\" | \"main\" | \"mesh\"; acknowledged?: boolean }>;\n followUp(args: { id: string; message: string; data?: unknown }): Promise<{ queued: true; messageId: string; routed?: \"local\" | \"main\" | \"mesh\"; acknowledged?: boolean }>;\n setSteeringMode(args: { id: string; mode: \"all\" | \"one-at-a-time\" }): Promise<{ queued: true; messageId: string }>;\n setFollowUpMode(args: { id: string; mode: \"all\" | \"one-at-a-time\" }): Promise<{ queued: true; messageId: string }>;\n actorStatus(args: FabricAgentTargetArgs): Promise<FabricActorInfo>;\n actors(): Promise<FabricActorInfo[]>;\n messages(args: { id: string; limit?: number }): Promise<FabricActorMessage[]>;\n remove(args: { id: string }): Promise<{ removed: boolean }>;\n log(args: {\n id: string;\n type?: \"session\" | \"run\" | \"all\";\n lines?: number;\n before?: number;\n runId?: string;\n }): Promise<FabricActorLog | FabricAgentLog>;\n}\ninterface FabricMcpResult {\n text: string;\n content: unknown[];\n structuredContent: unknown;\n}\ninterface FabricMcpTool {\n (args?: Record<string, unknown>): Promise<FabricMcpResult | unknown>;\n}\ninterface FabricMcpServer {\n [tool: string]: FabricMcpTool;\n}\n// Management verbs stay members of mcp even when the declare line below is\n// replaced by generated per-server declarations (see the dynamic option on\n// guestTypeDeclarations), so generated surfaces intersect with this type\n// rather than re-declaring them.\ninterface FabricMcpManagement {\n servers(): Promise<Array<{ name: string; description: string | null; transport: \"http\" | \"stdio\" }>>;\n reload(): Promise<{ servers: string[] }>;\n register(args: {\n name: string;\n description?: string;\n command?: string;\n args?: string[];\n cwd?: string;\n baseUrl?: string;\n headers?: Record<string, string>;\n env?: Record<string, string>;\n overwrite?: boolean;\n }): Promise<{ registered: string }>;\n call(args: { server: string; tool: string; args?: Record<string, unknown>; timeoutMs?: number }): Promise<unknown>;\n}\n// Loose static surface: any server/tool name compiles and argument shapes are\n// enforced at dispatch by the registry. With descriptor data available the\n// execution service replaces the declare-const-mcp line below with a\n// schema-typed rendering of the live cache (runtime/dynamic-guest-types.ts).\ntype FabricMcpApi = Record<string, FabricMcpServer> & FabricMcpManagement;\ninterface FabricCouncilRunOptions {\n task: string;\n roles: string[];\n runner?: FabricAgentRunner;\n transport?: FabricTransport;\n model?: string;\n thinking?: FabricThinking;\n tools?: string[];\n timeoutMs?: number;\n /** Filesystem execution directory; relative paths resolve from the parent agent cwd. */\n cwd?: string;\n worktree?: boolean;\n}\ninterface FabricCouncilApi {\n run(args: FabricCouncilRunOptions & { synthesize?: true }): Promise<FabricAgentResult>;\n run(args: FabricCouncilRunOptions & { synthesize: false }): Promise<FabricAgentResult[]>;\n}\ninterface FabricMeshIdentity {\n id: string;\n name: string;\n kind: \"main\" | \"actor\" | \"agent\";\n sessionId?: string;\n}\ninterface FabricMeshEvent {\n id: string;\n sequence: number;\n topic: string;\n kind: string;\n from: FabricMeshIdentity;\n to?: string;\n text?: string;\n data?: unknown;\n createdAt: number;\n}\ninterface FabricMeshStateEntry<T = unknown> {\n key: string;\n value: T;\n version: number;\n updatedAt: number;\n updatedBy: FabricMeshIdentity;\n}\ninterface FabricMeshApi {\n self(): Promise<FabricMeshIdentity>;\n publish(args: { topic: string; kind?: string; to?: string; text?: string; data?: unknown; message?: string; body?: string }): Promise<FabricMeshEvent>;\n read(args?: { after?: number; topic?: string; to?: string; limit?: number; max?: number }): Promise<FabricMeshEvent[]>;\n members(args: { scope?: FabricParticipantScope; kinds?: FabricParticipantKind[]; includeStale?: boolean; limit?: number; max?: number; include_stale?: boolean; withTotal: true }): Promise<{ members: FabricParticipantInfo[]; total: number; truncated: boolean }>;\n members(args?: { scope?: FabricParticipantScope; kinds?: FabricParticipantKind[]; includeStale?: boolean; limit?: number; max?: number; include_stale?: boolean; withTotal?: false }): Promise<FabricParticipantInfo[]>;\n get<T = unknown>(args: { key: string }): Promise<FabricMeshStateEntry<T> | null>;\n list<T = unknown>(args: { prefix?: string; limit?: number; max?: number; withTotal: true }): Promise<{ entries: Array<FabricMeshStateEntry<T>>; total: number; truncated: boolean }>;\n list<T = unknown>(args?: { prefix?: string; limit?: number; max?: number; withTotal?: false }): Promise<Array<FabricMeshStateEntry<T>>>;\n put<T = unknown>(args: { key: string; value: T; ifVersion?: number; if_version?: number; version?: number }): Promise<FabricMeshStateEntry<T>>;\n delete(args: { key: string; ifVersion?: number; if_version?: number; version?: number }): Promise<{ deleted: boolean; version?: number }>;\n}\n// Stable-provider argument bags declare the canonical keys plus the\n// near-miss spellings repaired during argument normalization\n// (providers/arg-normalization.ts and each provider's per-action table). The\n// registry's prepare stage repairs aliases before schema validation, so a\n// call spelled with an alias typechecks instead of tripping the\n// excess-property check; the canonical key wins on conflict, and anything\n// else fails additionalProperties:false validation with the offending\n// property path named. Keep these spillover fields in sync with the provider\n// normalization tables.\ntype FabricMemoryBranches = \"active\" | \"all\";\ntype FabricMemoryQueryMode = \"literal\" | \"phrase\" | \"regex\";\ntype FabricMemoryQueryMatch = \"all\" | \"any\";\ninterface FabricMemoryEntryRange {\n first: number;\n last: number;\n}\ninterface FabricMemoryRecallArgs {\n query?: string;\n queryMode?: FabricMemoryQueryMode;\n queryMatch?: FabricMemoryQueryMatch;\n expectedSourceHash?: string;\n expectedLineageFingerprint?: string;\n branches?: FabricMemoryBranches;\n scope?: string;\n offset?: number;\n pageSize?: number;\n snippetChars?: number;\n role?: string;\n tool?: string;\n ref?: string;\n provider?: string;\n action?: string;\n outcome?: \"succeeded\" | \"failed\" | \"aborted\" | \"timed_out\";\n since?: number;\n until?: number;\n entryRange?: FabricMemoryEntryRange;\n q?: string;\n limit?: number;\n max?: number;\n page_size?: number;\n snippet_chars?: number;\n query_mode?: FabricMemoryQueryMode;\n query_match?: FabricMemoryQueryMatch;\n entry_range?: FabricMemoryEntryRange;\n}\ninterface FabricMemoryExpandArgs {\n session: string;\n expectedSourceHash?: string;\n expectedLineageFingerprint?: string;\n branches?: FabricMemoryBranches;\n indices?: number[];\n entryIds?: string[];\n operationAddresses?: string[];\n entryRange?: FabricMemoryEntryRange;\n before?: number;\n after?: number;\n entryOffset?: number;\n textOffset?: number;\n maxChars?: number;\n maxEntries?: number;\n id?: string;\n file?: string;\n path?: string;\n session_id?: string;\n index?: number;\n entry_ids?: string[];\n operation_addresses?: string[];\n entry_range?: FabricMemoryEntryRange;\n entry_offset?: number;\n text_offset?: number;\n max_chars?: number;\n max_entries?: number;\n}\ninterface FabricMemoryCall<Ref extends string, Args> {\n ref: Ref;\n args: Args;\n}\ninterface FabricMemoryRecallEntryHit {\n kind: \"entry\";\n sessionId: string;\n tier: \"hot\" | \"cold\";\n index: number;\n entryId: string | null;\n parentId: string | null;\n operationAddress: string | null;\n type: string;\n role: string | null;\n tool: string | null;\n ref: string | null;\n provider: string | null;\n action: string | null;\n timestamp: number | null;\n isError: boolean;\n outcome?: \"succeeded\" | \"failed\" | \"aborted\" | \"timed_out\";\n score: number;\n snippet: string;\n truncated: boolean;\n follow: FabricMemoryCall<\"memory.expand\", FabricMemoryExpandArgs>;\n}\ninterface FabricMemoryRecallSessionHit {\n kind: \"session\";\n sessionId: string;\n tier: \"cold\";\n cwd: string;\n lastTimestamp: number | null;\n score: number;\n matchedTerms: number;\n matchedStructuralEntries: number;\n follow: FabricMemoryCall<\"memory.recall\", FabricMemoryRecallArgs>;\n}\ninterface FabricLcmMemoryHit {\n kind: \"lcm.raw\" | \"lcm.summary\";\n sessionId: string;\n score: number;\n snippet: string;\n truncated: boolean;\n source: { kind: \"raw\" | \"summary\"; projectKey: string; sessionId: string; entryId?: string; revision?: number; contentHash?: string; nodeId?: string; sourceHash: string };\n follow: FabricMemoryCall<\"memory.expand\", FabricMemoryExpandArgs>;\n}\ntype FabricMemoryRecallHit = FabricMemoryRecallEntryHit | FabricMemoryRecallSessionHit | FabricLcmMemoryHit;\ninterface FabricMemoryError {\n code: string;\n message: string;\n [key: string]: unknown;\n}\ninterface FabricMemoryCoverage {\n complete: boolean;\n indexedSessions: number;\n eligibleSessions: number;\n staleSessions: number;\n incompleteSessions: number;\n reasons: string[];\n error?: FabricMemoryError;\n}\ninterface FabricMemoryRecallResult {\n total: number;\n hits: FabricMemoryRecallHit[];\n next: FabricMemoryCall<\"memory.recall\", FabricMemoryRecallArgs> | null;\n coverage: FabricMemoryCoverage;\n error?: FabricMemoryError;\n}\ninterface FabricMemoryExpandedEntry {\n index: number;\n entryId: string | null;\n parentId: string | null;\n type: string | null;\n role: string | null;\n timestamp: number | null;\n isError: boolean;\n anchor?: boolean;\n text: string;\n textRange: { start: number; end: number; total: number; complete: boolean };\n parentEntryId?: string | null;\n operationAddress?: string | null;\n tool?: string | null;\n ref?: string | null;\n provider?: string | null;\n action?: string | null;\n outcome?: \"succeeded\" | \"failed\" | \"aborted\" | \"timed_out\";\n filesTouched?: Array<string | null>;\n operation?: unknown;\n branchFact?: unknown;\n structuredContent?: unknown;\n structuredTruncated?: boolean;\n factAddress?: string | null;\n carrierEntryId?: string | null;\n carrierParentId?: string | null;\n carrierFromId?: string | null;\n}\ninterface FabricMemoryExpandResult {\n session?: string;\n sourceHash?: string;\n branches?: FabricMemoryBranches;\n lineageFingerprint?: string;\n entryCount?: number;\n entries: FabricMemoryExpandedEntry[];\n next?: FabricMemoryCall<\"memory.expand\", FabricMemoryExpandArgs> | null;\n error?: FabricMemoryError;\n}\ninterface FabricMemoryWalkResult {\n visited: number;\n stopped: boolean;\n error?: FabricMemoryError;\n}\ninterface FabricMemorySessionInfo {\n id: string;\n file: string;\n cwd: string;\n mtime: number;\n entryCount: number;\n tier: \"hot\" | \"cold\";\n branches: FabricMemoryBranches;\n lineageFingerprint: string | null;\n}\ninterface FabricMemoryApi {\n recall(args?: FabricMemoryRecallArgs): Promise<FabricMemoryRecallResult>;\n expand(args: FabricMemoryExpandArgs): Promise<FabricMemoryExpandResult>;\n walk(\n args: FabricMemoryExpandArgs,\n visitor: (\n entry: FabricMemoryExpandedEntry,\n index: number,\n ) => boolean | void | Promise<boolean | void>,\n ): Promise<FabricMemoryWalkResult>;\n sessions(args?: {\n scope?: string;\n branches?: FabricMemoryBranches;\n limit?: number;\n max?: number;\n offset?: number;\n }): Promise<{\n scope?: string;\n branches?: FabricMemoryBranches;\n offset?: number;\n total?: number;\n truncated?: boolean;\n sessions?: FabricMemorySessionInfo[];\n error?: FabricMemoryError;\n }>;\n}\ninterface FabricStateTransitionArgs {\n label: string;\n from?: string;\n to: string;\n summary: string;\n evidence?: string[];\n tags?: string[];\n kind?: \"state\" | \"representation\";\n complexity?: { files: string[] };\n force?: boolean;\n name?: string;\n description?: string;\n}\ninterface FabricStateComplexityFile {\n file: string;\n supported: boolean;\n language?: string;\n current?: number;\n recorded?: number;\n delta?: number;\n recordedDelta?: number;\n}\ninterface FabricStateVerificationResult {\n certified: boolean;\n violated: boolean;\n certificationStatus: \"certified\" | \"failed\";\n results: unknown[];\n failures: unknown[];\n certificate?: unknown;\n reportingError?: string;\n evidenceDigest: string;\n resultDigest: string;\n}\ninterface FabricStateApi {\n transition(args: FabricStateTransitionArgs): Promise<{ event: FabricMeshEvent; head: unknown }>;\n get(): Promise<{\n head: unknown | null;\n goal: { check: string; description?: string } | null;\n complexity: { files: number; decisionPoints: number; lastNetDelta: number };\n certification: { current: unknown | null; recent: unknown[] };\n recentLabels: string[];\n }>;\n history(args?: { label?: string; limit?: number; includeArchived?: boolean; name?: string; max?: number }): Promise<{\n transitions: unknown[];\n labels: string[];\n certifications: unknown[];\n }>;\n complexity(args?: { files?: string[]; paths?: string[] }): Promise<{ files: FabricStateComplexityFile[]; netDelta: number }>;\n verify(args?: { labels?: string[]; includeArchived?: boolean; timeoutMs?: number; label?: string }): Promise<FabricStateVerificationResult>;\n goal(args: { check: string; description?: string; command?: string; cmd?: string; predicate?: string }): Promise<FabricMeshStateEntry<{ check: string; description?: string }>>;\n checkGoal(args?: { timeoutMs?: number }): Promise<{\n passed: boolean;\n output: string;\n exitCode: number | null;\n error?: string;\n }>;\n}\ntype FabricSchemaEvidence =\n | { kind: \"file_exists\"; path: string }\n | { kind: \"file_absent\"; path: string }\n | { kind: \"file_contains\"; path: string; literal: string }\n | { kind: \"file_sha256\"; path: string; sha256: string }\n | { kind: \"trusted_command\"; name: string };\ntype FabricSchemaFileOperation =\n | { kind: \"write\"; path: string; content: string; expected: { absent: true } | { sha256: string } }\n | { kind: \"edit\"; path: string; oldText: string; newText: string; expectedSha256: string }\n | { kind: \"delete\"; path: string; expectedSha256: string };\ninterface FabricSchemaEvidenceResult {\n evidence: FabricSchemaEvidence;\n status: \"confirmed\" | \"nonconfirmed\" | \"error\";\n detail: string;\n exitCode?: number | null;\n output?: string;\n observedSha256?: string;\n}\ninterface FabricSchemaStatus {\n mode: \"off\" | \"audit\" | \"enforce\";\n certificateTtlMs: number;\n maxFiles: number;\n maxBytes: number;\n trustedCommands: string[];\n generation: number;\n lastOutcome: \"committed\" | \"rolled_back\" | \"quarantined\" | null;\n hypotheses: Array<{\n id: string;\n label: string;\n status: string;\n generation: number;\n updatedAt: number;\n }>;\n}\ninterface FabricSchemaVerificationResult {\n verified: boolean;\n hypothesisId: string;\n certificate?: string;\n issuedAt?: number;\n expiresAt?: number;\n reason?: string;\n results: FabricSchemaEvidenceResult[];\n}\ninterface FabricSchemaCommitResult {\n outcome: \"committed\" | \"rolled_back\" | \"quarantined\";\n transactionId: string;\n generation?: number;\n paths?: string[];\n postconditions?: FabricSchemaEvidenceResult[];\n complexityReductionCertified?: boolean;\n stateTransition?: unknown;\n error?: string;\n rollbackError?: string;\n}\ninterface FabricSchemaApi {\n status(): Promise<FabricSchemaStatus>;\n hypothesize(args: {\n label: string;\n summary: string;\n evidence: FabricSchemaEvidence[];\n complexityReduction?: boolean;\n name?: string;\n description?: string;\n complexity_reduction?: boolean;\n }): Promise<{\n hypothesisId: string;\n status: string;\n state: unknown;\n fingerprint: string;\n generation: number;\n }>;\n verify(args: { hypothesisId: string; id?: string; hypothesis_id?: string }): Promise<FabricSchemaVerificationResult>;\n commit(args: {\n hypothesisId: string;\n certificate: string;\n operations: FabricSchemaFileOperation[];\n postconditions: FabricSchemaEvidence[];\n id?: string;\n hypothesis_id?: string;\n }): Promise<FabricSchemaCommitResult>;\n abort(args: { hypothesisId: string; certificate?: string; id?: string; hypothesis_id?: string }): Promise<{\n aborted: true;\n hypothesisId: string;\n }>;\n}\ninterface FabricCompactPendingIntent {\n reason?: string;\n instructions?: string;\n preserve?: string[];\n requestedBy: string;\n requestedAt: number;\n}\ninterface FabricCompactLastCommit {\n at: number;\n requestedBy: string;\n status: \"committed\" | \"skipped\" | \"cancelled\" | \"failed\";\n summary?: string;\n tokensBefore?: number;\n estimatedTokensAfter?: number;\n error?: string;\n persisted?: boolean;\n}\ninterface FabricCompactContextUsage {\n known: boolean;\n tokens: number | null;\n contextWindow: number | null;\n percent: number | null;\n remainingTokens: number | null;\n}\ninterface FabricCompactStatus {\n pending?: FabricCompactPendingIntent;\n last?: FabricCompactLastCommit;\n context?: FabricCompactContextUsage;\n engine?: string;\n targetContextRatio?: number;\n model?: string;\n sessionId?: string;\n}\ntype FabricComponentState = \"waiting\" | \"loading\" | \"active\" | \"unloading\" | \"failed\" | \"quarantined\" | \"disposed\";\ninterface FabricComponentEffectInfo {\n label: string;\n kind: \"none\" | \"scoped\" | \"transactional\" | \"emission\";\n resources: string[];\n ordering: \"commutative\" | \"ordered\" | \"unknown\";\n}\ninterface FabricComponentEffectConflict {\n withComponent: string;\n resources: string[];\n reason: \"shared_resource\" | \"unknown_resource\";\n}\ninterface FabricComponentInfo {\n id: string;\n component: string;\n parentId?: string;\n state: FabricComponentState;\n guarantee: \"managed\" | \"revertible\";\n requirements: string[];\n provisions: string[];\n missing: string[];\n optionalMissing: string[];\n effects?: FabricComponentEffectInfo[];\n effectConflicts?: FabricComponentEffectConflict[];\n targetDigest?: string;\n error?: string;\n cleanupErrors?: string[];\n revision: number;\n createdAt: number;\n updatedAt: number;\n}\ninterface FabricComponentsApi {\n list(): Promise<{\n definitions: Array<{ name: string; description?: string; revision: number; requirements: string[]; provisions: string[] }>;\n components: FabricComponentInfo[];\n }>;\n status(args: { id: string }): Promise<FabricComponentInfo>;\n graph(): Promise<{\n components: FabricComponentInfo[];\n edges: Array<{ from: string; to: string; ref: string; kind?: \"dependency\" | \"ownership\" }>;\n cycles: string[][];\n }>;\n reload(args?: { id?: string }): Promise<{ components: FabricComponentInfo[] }>;\n}\n\ninterface FabricCompactApi {\n request(args?: {\n reason?: string;\n instructions?: string;\n preserve?: string[];\n requestedBy?: string;\n instruction?: string;\n requested_by?: string;\n }): Promise<{ requested: true; intent: FabricCompactPendingIntent }>;\n status(): Promise<FabricCompactStatus>;\n cancel(): Promise<{ cancelled: true }>;\n}\n\ninterface FabricCodemapSymbolCounts {\n files: number;\n symbols: number;\n languages: Record<string, number>;\n fallbackFiles: number;\n truncated: boolean;\n elapsedMs: number;\n}\ninterface FabricCodemapCascadeEdge {\n file: string;\n score: number;\n commits: number;\n}\ninterface FabricCodemapCascade {\n seeds: string[];\n edges: FabricCodemapCascadeEdge[];\n commitsScanned: number;\n truncated: boolean;\n unavailable?: string;\n}\ninterface FabricCodemapApi {\n map(args?: {\n path?: string;\n maxTokens?: number;\n glob?: string;\n focus?: string;\n seeds?: string[];\n refresh?: boolean;\n }): Promise<{\n text: string;\n root: string;\n tokensEstimated: number;\n filesShown: number;\n symbolsShown: number;\n omittedFiles: number;\n omittedSymbols: number;\n truncated: boolean;\n indexed: FabricCodemapSymbolCounts;\n cascade?: FabricCodemapCascade;\n }>;\n cascade(args: {\n path?: string;\n seeds: string[];\n limit?: number;\n maxCommits?: number;\n }): Promise<FabricCodemapCascade>;\n}\n\ninterface FabricWorkflowAgentOptions extends Omit<FabricAgentRequest, \"task\"> {\n label?: string;\n}\ntype FabricActivityStatus = \"pending\" | \"running\" | \"completed\" | \"failed\" | \"blocked\" | \"stopped\";\ntype FabricActivityKind = \"agent\" | \"actor\" | \"tool\" | \"extension\" | \"mcp\" | \"mesh\" | \"task\" | \"custom\";\ninterface FabricWorkflowDisplay {\n name?: string;\n description?: string;\n}\ninterface FabricWorkflowPhaseOptions {\n id?: string;\n description?: string;\n total?: number;\n}\ninterface FabricWorkflowPhaseInput extends FabricWorkflowPhaseOptions {\n name: string;\n}\ninterface FabricWorkflowItem {\n id: string;\n label: string;\n status?: FabricActivityStatus;\n phase?: string;\n detail?: string;\n kind?: FabricActivityKind;\n current?: string;\n total?: number;\n completed?: number;\n data?: unknown;\n}\ninterface FabricWorkflowApi {\n agent<T = string>(prompt: string, options?: FabricWorkflowAgentOptions): Promise<T>;\n parallel<T, R>(items: T[], mapper: (item: T, index: number) => Promise<R> | R, concurrency?: number | { concurrency?: number }): Promise<R[]>;\n parallel<T>(thunks: Array<() => Promise<T> | T>, concurrency?: number | { concurrency?: number }): Promise<T[]>;\n pipeline<T>(items: T[], ...stages: Array<(value: unknown, original: T, index: number) => Promise<unknown> | unknown>): Promise<unknown[]>;\n configure(display: FabricWorkflowDisplay): Promise<FabricWorkflowDisplay>;\n phase(name: string, options?: FabricWorkflowPhaseOptions): Promise<{ name: string; index: number; id?: string }>;\n phase(input: FabricWorkflowPhaseInput): Promise<{ name: string; index: number; id?: string }>;\n item(item: FabricWorkflowItem): Promise<FabricWorkflowItem>;\n event(event: { message: string; level?: \"info\" | \"success\" | \"warning\" | \"error\"; data?: unknown }): Promise<void>;\n log(...values: unknown[]): void;\n budget: { total: number; spent(): number; remaining(): number };\n}\ninterface FabricJudgmentChoiceQuestion {\n type: \"choice\";\n instructions: string;\n criteria: Record<string, string | null>;\n}\ninterface FabricJudgmentBoolQuestion {\n type: \"bool\";\n instructions: string;\n criteria?: { true?: string; false?: string };\n}\ninterface FabricJudgmentScoreQuestion {\n type: \"score\";\n instructions: string;\n criteria: [string, string, ...string[]];\n}\ntype FabricJudgmentQuestion =\n | FabricJudgmentChoiceQuestion\n | FabricJudgmentBoolQuestion\n | FabricJudgmentScoreQuestion;\ninterface FabricJudgmentChoiceAnswer {\n type: \"choice\";\n choice: string;\n probabilities: Record<string, number>;\n confidence: number;\n}\ninterface FabricJudgmentBoolAnswer {\n type: \"bool\";\n bool: number;\n}\ninterface FabricJudgmentScoreAnswer {\n type: \"score\";\n score: number;\n probabilities: Record<string, number>;\n confidence: number;\n}\ntype FabricJudgmentAnswer =\n | FabricJudgmentChoiceAnswer\n | FabricJudgmentBoolAnswer\n | FabricJudgmentScoreAnswer;\ninterface FabricJudgmentApi {\n ask(args: {\n state: unknown;\n questions: Record<string, FabricJudgmentQuestion>;\n }): Promise<\n | { ok: true; backend: string; answers: Record<string, FabricJudgmentAnswer> }\n | {\n ok: false;\n reason: \"disabled\" | \"unsupported\" | \"refused\" | \"failed\" | \"timeout\" | \"aborted\";\n detail?: string;\n }\n >;\n stats(): Promise<{\n enabled: boolean;\n requests: number;\n batched: number;\n questions: number;\n merged: number;\n failures: number;\n refusals: number;\n timeouts: number;\n lastBackend?: string;\n lastError?: string;\n }>;\n}\ninterface FabricJudgeFilterOptions {\n threshold?: number;\n onFail?: \"keep-all\" | \"empty\" | \"throw\";\n maxItems?: number;\n maxBytes?: number;\n}\ninterface FabricJudgeClassifyOptions {\n onFail?: \"keep-all\" | \"empty\" | \"throw\";\n fallbackCategory?: string;\n maxItems?: number;\n maxBytes?: number;\n}\ninterface FabricJudgeBoolOptions {\n fallback?: number;\n}\ninterface FabricJudgeChoiceOptions {\n fallback?: string;\n}\ninterface FabricJudgeScoreOptions {\n fallback?: number;\n}\ninterface FabricJudgeApi {\n ask(args: {\n state: unknown;\n questions: Record<string, FabricJudgmentQuestion>;\n }): Promise<\n | { ok: true; backend: string; answers: Record<string, FabricJudgmentAnswer> }\n | {\n ok: false;\n reason: \"disabled\" | \"unsupported\" | \"refused\" | \"failed\" | \"timeout\" | \"aborted\";\n detail?: string;\n }\n >;\n ask(\n state: unknown,\n questions: Record<string, FabricJudgmentQuestion>,\n ): Promise<\n | { ok: true; backend: string; answers: Record<string, FabricJudgmentAnswer> }\n | {\n ok: false;\n reason: \"disabled\" | \"unsupported\" | \"refused\" | \"failed\" | \"timeout\" | \"aborted\";\n detail?: string;\n }\n >;\n bool(state: unknown, instructions: string, options?: FabricJudgeBoolOptions): Promise<number | undefined>;\n choice(\n state: unknown,\n options: readonly string[] | Record<string, string | null>,\n instructions: string,\n config?: FabricJudgeChoiceOptions,\n ): Promise<string | undefined>;\n score(\n state: unknown,\n criteria: readonly string[],\n instructions: string,\n config?: FabricJudgeScoreOptions,\n ): Promise<number | undefined>;\n filter<T>(items: T[], instructions: string, options?: FabricJudgeFilterOptions): Promise<T[]>;\n classify<T, C extends string>(\n items: T[],\n categories: readonly C[],\n instructions: string,\n options?: FabricJudgeClassifyOptions,\n ): Promise<Array<{ item: T; category?: C; confidence?: number }>>;\n}\ndeclare const tools: FabricToolsApi;\ndeclare const omp: OmpToolsApi;\ndeclare const extensions: FabricExtensionsApi;\ndeclare const agents: FabricAgentsApi;\ndeclare const mesh: FabricMeshApi;\ndeclare const mcp: FabricMcpApi;\ndeclare const memory: FabricMemoryApi;\ndeclare const state: FabricStateApi;\ndeclare const schema: FabricSchemaApi;\ndeclare const components: FabricComponentsApi;\ndeclare const compact: FabricCompactApi;\ndeclare const codemap: FabricCodemapApi;\ndeclare const judgment: FabricJudgmentApi;\ndeclare const judge: FabricJudgeApi;\ndeclare const council: FabricCouncilApi;\ndeclare const workflow: FabricWorkflowApi;\ndeclare function agent<T = string>(prompt: string, options?: FabricWorkflowAgentOptions): Promise<T>;\ndeclare function parallel<T, R>(items: T[], mapper: (item: T, index: number) => Promise<R> | R, concurrency?: number | { concurrency?: number }): Promise<R[]>;\ndeclare function parallel<T>(thunks: Array<() => Promise<T> | T>, concurrency?: number | { concurrency?: number }): Promise<T[]>;\ndeclare function pipeline<T>(items: T[], ...stages: Array<(value: unknown, original: T, index: number) => Promise<unknown> | unknown>): Promise<unknown[]>;\ndeclare function phase(name: string, options?: FabricWorkflowPhaseOptions): Promise<{ name: string; index: number; id?: string }>;\ndeclare function phase(input: FabricWorkflowPhaseInput): Promise<{ name: string; index: number; id?: string }>;\ndeclare function log(...values: unknown[]): void;\ndeclare const budget: FabricWorkflowApi[\"budget\"];\ntype FabricRlmRequest = Omit<FabricAgentRequest, \"runner\" | \"recursive\" | \"cwd\"> & { runner?: \"omp\" };\ndeclare const rlm: { query(args: FabricRlmRequest): Promise<FabricAgentResult> };\ninterface FabricConsole {\n log(...args: unknown[]): void;\n info(...args: unknown[]): void;\n warn(...args: unknown[]): void;\n error(...args: unknown[]): void;\n}\ndeclare const console: FabricConsole;\ndeclare const payloads: Readonly<Record<string, string>>;\ndeclare function print(...args: unknown[]): void;\ndeclare function setTimeout(handler: (...args: any[]) => void, timeout?: number): number;\ndeclare function clearTimeout(handle: number): void;\ndeclare function setInterval(handler: (...args: any[]) => void, timeout?: number): number;\ndeclare function clearInterval(handle: number): void;\n`;\n\nconst FULL_CODE_GLOBAL_DECLARATIONS = [\n \"declare const omp: OmpToolsApi;\\n\",\n \"declare const extensions: FabricExtensionsApi;\\n\",\n];\n\nconst OMP_LOOSE_DECLARATION = \"declare const omp: OmpToolsApi;\\n\";\nconst MCP_LOOSE_DECLARATION = \"declare const mcp: FabricMcpApi;\\n\";\nconst EXTENSIONS_LOOSE_DECLARATION = \"declare const extensions: FabricExtensionsApi;\\n\";\n\nexport interface FabricGuestDeclarationOptions {\n /** Global names to omit (for example providers disabled by configuration). */\n excludeGlobals?: readonly string[];\n /**\n * Pre-rendered replacement blocks from buildDynamicGuestDeclarations().\n * Applied only when the loose anchor line is still present \u2014 excluded\n * globals (or orchestration-only mode, for extensions) keep nothing to\n * replace, and missing/undefined sections keep the loose surface.\n */\n dynamic?: FabricDynamicGuestDeclarations;\n /** Add captured core overloads to the full-code OMP declaration. */\n coreOverrides?: string;\n}\n\nconst globalDeclarationLine = (name: string): RegExp =>\n new RegExp(`^declare const ${name}: [^\\\\n]*;\\\\n`, \"m\");\n\nconst terminatedDeclaration = (block: string): string =>\n block.endsWith(\"\\n\") ? block : `${block}\\n`;\n\nexport const guestTypeDeclarations = (\n fullCodeMode: boolean,\n options: FabricGuestDeclarationOptions = {},\n): string => {\n const base = fullCodeMode\n ? GUEST_TYPE_DECLARATIONS\n : FULL_CODE_GLOBAL_DECLARATIONS.reduce(\n (declarations, declaration) => declarations.replace(declaration, \"\"),\n GUEST_TYPE_DECLARATIONS,\n );\n let result = (options.excludeGlobals ?? []).reduce(\n (declarations, name) => declarations.replace(globalDeclarationLine(name), \"\"),\n base,\n );\n if (fullCodeMode && options.coreOverrides && result.includes(OMP_LOOSE_DECLARATION)) {\n result = result.replace(\n OMP_LOOSE_DECLARATION,\n terminatedDeclaration(options.coreOverrides),\n );\n }\n if (options.dynamic?.mcp && result.includes(MCP_LOOSE_DECLARATION)) {\n result = result.replace(\n MCP_LOOSE_DECLARATION,\n terminatedDeclaration(options.dynamic.mcp),\n );\n }\n if (options.dynamic?.extensions && result.includes(EXTENSIONS_LOOSE_DECLARATION)) {\n result = result.replace(\n EXTENSIONS_LOOSE_DECLARATION,\n terminatedDeclaration(options.dynamic.extensions),\n );\n }\n return result;\n};\n"],
|
|
5
|
+
"mappings": ";AAQO,IAAM,6CAA6C;AAAA,EACxD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,IAAI;AACN;AAEO,IAAM,0BAA0B;AAAA,EACrC,MAAM,CAAC,UAAU,OAAO;AAAA,EACxB,MAAM,CAAC,SAAS;AAAA,EAChB,MAAM,CAAC;AAAA,EACP,OAAO,CAAC;AAAA,EACR,MAAM,CAAC,WAAW,MAAM;AAAA,EACxB,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MACd;AAAA,MACA,sBAAsB,QAAQ,QAAQ,GAAG;AAAA,IAC3C;AAAA,EACF;AACA,MAAI,QAAQ,SAAS,cAAc,OAAO,SAAS,4BAA4B,GAAG;AAChF,aAAS,OAAO;AAAA,MACd;AAAA,MACA,sBAAsB,QAAQ,QAAQ,UAAU;AAAA,IAClD;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -11036,8 +11036,9 @@ var unreadableReadMessage = (note, readPath) => {
|
|
|
11036
11036
|
const remedy = target ? ` Read the bytes with omp.read("${target}:raw").` : "";
|
|
11037
11037
|
return `omp.read returned no text content: ${note.trim()}${remedy}`;
|
|
11038
11038
|
};
|
|
11039
|
-
var restoreBashOutput = (artifactPath, maxChars, delivered) => {
|
|
11039
|
+
var restoreBashOutput = (artifactPath, maxChars, delivered, artifactElidedBytes) => {
|
|
11040
11040
|
if (!artifactPath || maxChars <= 0) return void 0;
|
|
11041
|
+
if (artifactElidedBytes !== void 0 && artifactElidedBytes > 0) return void 0;
|
|
11041
11042
|
let size;
|
|
11042
11043
|
try {
|
|
11043
11044
|
size = statSync4(artifactPath).size;
|
|
@@ -11226,6 +11227,7 @@ var normalizeResult = (name, result, artifactPaths, appendReadNewline = true, ex
|
|
|
11226
11227
|
const truncationRecord = truncation;
|
|
11227
11228
|
const artifactId = truncationRecord.artifactId;
|
|
11228
11229
|
const fullOutputPath = typeof artifactId === "string" ? artifactPaths?.get(artifactId) ?? extras?.bashArtifactPath : extras?.bashArtifactPath;
|
|
11230
|
+
const artifactElidedBytes = finiteNumber2(truncationRecord.artifactElidedBytes);
|
|
11229
11231
|
details = {
|
|
11230
11232
|
...detailRecord,
|
|
11231
11233
|
truncation: { ...truncationRecord, truncated: true },
|
|
@@ -11244,13 +11246,21 @@ var normalizeResult = (name, result, artifactPaths, appendReadNewline = true, ex
|
|
|
11244
11246
|
...columnCap === void 0 ? {} : { maxColumn: columnCap },
|
|
11245
11247
|
fullOutputPath: fullOutputPath ?? null,
|
|
11246
11248
|
continue: null,
|
|
11247
|
-
note: fullOutputPath ? `Output exceeded the host bash result budget; the complete stream is on disk at ${fullOutputPath}.` : "Output exceeded the host bash result budget and no full-output artifact was retained."
|
|
11249
|
+
note: fullOutputPath ? artifactElidedBytes === void 0 ? `Output exceeded the host bash result budget; the complete stream is on disk at ${fullOutputPath}.` : `Output exceeded the host bash result budget, and the on-disk artifact at ${fullOutputPath} is itself capped: ${artifactElidedBytes} bytes were dropped from its middle. Only the artifact's head and tail survive; set the host's \`tools.artifactMaxBytes\` to \`0\` for an uncapped file.` : "Output exceeded the host bash result budget and no full-output artifact was retained."
|
|
11248
11250
|
});
|
|
11249
11251
|
}
|
|
11250
11252
|
} else {
|
|
11251
11253
|
const columnCap = finiteNumber2(asRecord(asRecord(metaRecord?.limits)?.columnTruncated)?.maxColumn);
|
|
11252
11254
|
if (columnCap !== void 0) {
|
|
11253
|
-
const
|
|
11255
|
+
const columnElidedBytes = finiteNumber2(
|
|
11256
|
+
asRecord(asRecord(metaRecord?.limits)?.columnTruncated)?.artifactElidedBytes
|
|
11257
|
+
);
|
|
11258
|
+
const restored = restoreBashOutput(
|
|
11259
|
+
extras?.bashArtifactPath,
|
|
11260
|
+
extras?.maxResultChars ?? 0,
|
|
11261
|
+
text,
|
|
11262
|
+
columnElidedBytes
|
|
11263
|
+
);
|
|
11254
11264
|
if (restored === void 0) {
|
|
11255
11265
|
details = {
|
|
11256
11266
|
...detailRecord,
|
|
@@ -11264,7 +11274,7 @@ var normalizeResult = (name, result, artifactPaths, appendReadNewline = true, ex
|
|
|
11264
11274
|
maxColumn: columnCap,
|
|
11265
11275
|
fullOutputPath: extras?.bashArtifactPath ?? null,
|
|
11266
11276
|
continue: null,
|
|
11267
|
-
note: `Output lines were cut at ${columnCap} bytes by the host bash executor, which reads global settings and ignores this session's tools.outputMaxColumns.`
|
|
11277
|
+
note: columnElidedBytes !== void 0 && columnElidedBytes > 0 ? `Output lines were cut at ${columnCap} bytes by the host bash executor, and the artifact is itself capped: ${columnElidedBytes} bytes were dropped from its middle, so the full output is unrecoverable. Set the host's \`tools.artifactMaxBytes\` to \`0\` for an uncapped file.` : `Output lines were cut at ${columnCap} bytes by the host bash executor, which reads global settings and ignores this session's tools.outputMaxColumns.`
|
|
11268
11278
|
});
|
|
11269
11279
|
} else {
|
|
11270
11280
|
output = restored;
|