@e4779/pi-fabric 0.105.0-fork.22 → 0.109.2-fork.23
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/README.md +3 -1
- package/dist/actors/global-registry.d.ts.map +1 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/result.d.ts.map +1 -1
- package/dist/agents/result.js +1 -1
- package/dist/agents/runner-registry.d.ts +1 -1
- package/dist/agents/runner-registry.d.ts.map +1 -1
- package/dist/agents.js +5 -5
- package/dist/chunks/{chunk-5MNLVHF5.js → chunk-3DUKKQHN.js} +28 -13
- package/dist/chunks/chunk-3DUKKQHN.js.map +7 -0
- package/dist/chunks/{chunk-GJVPP3NN.js → chunk-3SHUUBZJ.js} +4 -4
- package/dist/chunks/chunk-3SHUUBZJ.js.map +7 -0
- package/dist/chunks/{chunk-VON4TSO3.js → chunk-CZPQTISQ.js} +27 -2
- package/dist/chunks/chunk-CZPQTISQ.js.map +7 -0
- package/dist/chunks/{chunk-WLLXKS6I.js → chunk-DU6ZA44F.js} +4 -4
- package/dist/chunks/{chunk-QLFDPXK7.js → chunk-DV2JZSCI.js} +153 -27
- package/dist/chunks/chunk-DV2JZSCI.js.map +7 -0
- package/dist/chunks/{chunk-KQ6R5EWR.js → chunk-FRPNQZV2.js} +24 -22
- package/dist/chunks/chunk-FRPNQZV2.js.map +7 -0
- package/dist/chunks/{chunk-W7X4XEQU.js → chunk-GC2AUXG6.js} +2 -2
- package/dist/chunks/chunk-K6QXUGS5.js +30 -0
- package/dist/chunks/chunk-K6QXUGS5.js.map +7 -0
- package/dist/chunks/{chunk-VPRJOD4Y.js → chunk-LEDY5G2V.js} +2 -2
- package/dist/chunks/{chunk-OVBKQCYL.js → chunk-N2VKKA7O.js} +2 -2
- package/dist/chunks/{chunk-N5GUXC6F.js → chunk-P4KH4S4S.js} +2 -1
- package/dist/chunks/chunk-P4KH4S4S.js.map +7 -0
- package/dist/chunks/{chunk-TFFZVLR2.js → chunk-PF27MQY5.js} +55 -4
- package/dist/chunks/chunk-PF27MQY5.js.map +7 -0
- package/dist/chunks/{chunk-CGL7QP4A.js → chunk-PK4NIJEV.js} +10 -1
- package/dist/chunks/{chunk-CGL7QP4A.js.map → chunk-PK4NIJEV.js.map} +2 -2
- package/dist/chunks/{chunk-YRDCJZZW.js → chunk-RUO6L7RM.js} +1 -1
- package/dist/chunks/{chunk-YRDCJZZW.js.map → chunk-RUO6L7RM.js.map} +1 -1
- package/dist/chunks/{chunk-4RTHQGES.js → chunk-ST36EYHN.js} +4 -4
- package/dist/chunks/chunk-ST36EYHN.js.map +7 -0
- package/dist/chunks/{chunk-R5F6CHW2.js → chunk-UXEMIWYI.js} +12 -7
- package/dist/chunks/chunk-UXEMIWYI.js.map +7 -0
- package/dist/chunks/{chunk-SGFH5PYA.js → chunk-V2SKDVQX.js} +10 -9
- package/dist/chunks/chunk-V2SKDVQX.js.map +7 -0
- package/dist/chunks/{chunk-KYXZJNV6.js → chunk-VTK2FEH7.js} +3 -1
- package/dist/chunks/{chunk-KYXZJNV6.js.map → chunk-VTK2FEH7.js.map} +2 -2
- package/dist/chunks/{chunk-3QECYQGA.js → chunk-VYQV5JRT.js} +13 -1
- package/dist/chunks/chunk-VYQV5JRT.js.map +7 -0
- package/dist/chunks/{chunk-3KDUMDPZ.js → chunk-X3CHSIL2.js} +5 -5
- package/dist/chunks/{chunk-EXWS4ZS3.js → chunk-YJX27XBO.js} +100 -22
- package/dist/chunks/chunk-YJX27XBO.js.map +7 -0
- package/dist/components/configuration.js +2 -2
- package/dist/config.d.ts +16 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +1 -1
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +2 -2
- package/dist/core/media-sanitize.d.ts.map +1 -1
- package/dist/core/native-tool-names.d.ts +9 -0
- package/dist/core/native-tool-names.d.ts.map +1 -0
- package/dist/core/native-tool-result.d.ts +11 -0
- package/dist/core/native-tool-result.d.ts.map +1 -0
- package/dist/core/system-guidance.d.ts +3 -3
- package/dist/core/system-guidance.d.ts.map +1 -1
- package/dist/durable/agent.d.ts +77 -0
- package/dist/durable/agent.d.ts.map +1 -0
- package/dist/durable/session.d.ts +19 -0
- package/dist/durable/session.d.ts.map +1 -0
- package/dist/durable/storage.d.ts +7 -0
- package/dist/durable/storage.d.ts.map +1 -0
- package/dist/durable/worker-host.d.ts +13 -0
- package/dist/durable/worker-host.d.ts.map +1 -0
- package/dist/durable/worker-host.js +1149 -0
- package/dist/durable/worker-host.js.map +7 -0
- package/dist/durable/worker-options.d.ts +17 -0
- package/dist/durable/worker-options.d.ts.map +1 -0
- package/dist/durable/worker.d.ts +3 -0
- package/dist/durable/worker.d.ts.map +1 -0
- package/dist/durable/worker.js +110 -0
- package/dist/durable/worker.js.map +7 -0
- package/dist/durable-controls.d.ts +27 -0
- package/dist/durable-controls.d.ts.map +1 -0
- package/dist/durable-input.d.ts +13 -0
- package/dist/durable-input.d.ts.map +1 -0
- package/dist/durable.d.ts +6 -0
- package/dist/durable.d.ts.map +1 -1
- package/dist/durable.js +194 -24
- package/dist/durable.js.map +4 -4
- package/dist/execution-service.d.ts +4 -0
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +5 -5
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-exec-arguments.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +604 -284
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/index.js +5 -5
- package/dist/jev/observation.js +2 -2
- package/dist/jev.js +3 -3
- package/dist/mcp.js +1 -1
- package/dist/memory/extractive-history.d.ts +29 -0
- package/dist/memory/extractive-history.d.ts.map +1 -0
- package/dist/memory/extractive-history.js +340 -0
- package/dist/memory/extractive-history.js.map +7 -0
- package/dist/memory/extractive-index.d.ts +46 -0
- package/dist/memory/extractive-index.d.ts.map +1 -0
- package/dist/native-codemode.d.ts +34 -0
- package/dist/native-codemode.d.ts.map +1 -0
- package/dist/native-discovery.d.ts +16 -0
- package/dist/native-discovery.d.ts.map +1 -0
- package/dist/native-discovery.js +19 -0
- package/dist/native-discovery.js.map +7 -0
- package/dist/native-image-artifacts.d.ts +4 -0
- package/dist/native-image-artifacts.d.ts.map +1 -0
- package/dist/native-image-artifacts.js +18 -0
- package/dist/native-image-artifacts.js.map +7 -0
- package/dist/native-tool-catalog.d.ts +21 -0
- package/dist/native-tool-catalog.d.ts.map +1 -0
- package/dist/native-tool-catalog.js +71 -0
- package/dist/native-tool-catalog.js.map +7 -0
- package/dist/protocol.d.ts +2 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/captured-tools-provider.d.ts +1 -1
- package/dist/providers/captured-tools-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +3 -3
- package/dist/providers/mcp-provider.d.ts +1 -1
- package/dist/providers/mcp-provider.d.ts.map +1 -1
- package/dist/providers/pi-native-mcp.d.ts.map +1 -1
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/residency/host.js +7 -7
- package/dist/residency/pi-entry.js +7 -7
- package/dist/runners.js +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/dynamic-guest-types.d.ts +2 -0
- package/dist/runtime/dynamic-guest-types.d.ts.map +1 -1
- package/dist/runtime/dynamic-guest-types.js +5 -3
- 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/runtime/kernel.d.ts +5 -0
- package/dist/runtime/kernel.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.js +1 -1
- package/dist/runtime/native-codemode-guest.d.ts +2 -0
- package/dist/runtime/native-codemode-guest.d.ts.map +1 -0
- package/dist/runtime/native-codemode-types.d.ts +2 -0
- package/dist/runtime/native-codemode-types.d.ts.map +1 -0
- package/dist/runtime/node-process-child-source.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +3 -3
- package/dist/runtime/quickjs-runtime.d.ts +1 -1
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +3 -2
- package/dist/runtime/type-checker.d.ts +2 -0
- package/dist/runtime/type-checker.d.ts.map +1 -1
- package/dist/runtime/type-checker.js +5 -3
- package/dist/runtime/typescript-kernel.d.ts +1 -1
- package/dist/runtime/typescript-kernel.d.ts.map +1 -1
- package/dist/runtime/typescript-kernel.js +13 -11
- package/dist/runtime/typescript-kernel.js.map +2 -2
- package/dist/runtime-state-speculation.d.ts +4 -1
- package/dist/runtime-state-speculation.d.ts.map +1 -1
- package/dist/speculation/python-scanner.js +1 -1
- package/dist/speculation/python-scanner.js.map +2 -2
- package/dist/speculation/scanner.d.ts +2 -0
- package/dist/speculation/scanner.d.ts.map +1 -1
- package/dist/speculation/scanner.js +18 -4
- package/dist/speculation/scanner.js.map +2 -2
- package/dist/speculation/types.d.ts +1 -0
- package/dist/speculation/types.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/border-status-editor.d.ts +3 -0
- package/dist/ui/border-status-editor.d.ts.map +1 -1
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation.d.ts +1 -0
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +28 -5
- package/dist/ui/conversation.js.map +2 -2
- package/dist/ui/dashboard.d.ts +2 -0
- package/dist/ui/dashboard.d.ts.map +1 -1
- package/dist/ui/dashboard.js +20 -7
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/settings-section-context.d.ts +2 -0
- package/dist/ui/settings-section-context.d.ts.map +1 -1
- package/dist/ui/settings-sections-execution.d.ts.map +1 -1
- package/dist/ui/settings-sections-lifecycle.d.ts +1 -0
- package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -1
- package/dist/ui/settings-sections.d.ts +2 -0
- package/dist/ui/settings-sections.d.ts.map +1 -1
- package/dist/ui/settings-values.d.ts +4 -1
- package/dist/ui/settings-values.d.ts.map +1 -1
- package/dist/ui/settings.d.ts.map +1 -1
- package/dist/ui/settings.js +61 -2
- package/dist/ui/settings.js.map +2 -2
- package/dist/worker/model-control.d.ts.map +1 -1
- package/dist/worker/model-control.js.map +2 -2
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +4 -3
- package/dist/worker/options.js.map +2 -2
- package/dist/worker/result.js +12 -0
- package/dist/worker/result.js.map +2 -2
- package/dist/worker.js +95 -8
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +5 -5
- package/docs/codemode-parity.md +97 -0
- package/docs/configuration.md +31 -2
- package/docs/durable-pi.md +166 -38
- package/docs/extractive-history.md +171 -0
- package/docs/interface.md +1 -1
- package/docs/speculation.md +12 -3
- package/package.json +7 -16
- package/skillsets/typescript/fabric-exec/SKILL.md +4 -4
- package/dist/chunks/chunk-3QECYQGA.js.map +0 -7
- package/dist/chunks/chunk-4RTHQGES.js.map +0 -7
- package/dist/chunks/chunk-5MNLVHF5.js.map +0 -7
- package/dist/chunks/chunk-EXWS4ZS3.js.map +0 -7
- package/dist/chunks/chunk-GJVPP3NN.js.map +0 -7
- package/dist/chunks/chunk-KQ6R5EWR.js.map +0 -7
- package/dist/chunks/chunk-N5GUXC6F.js.map +0 -7
- package/dist/chunks/chunk-QLFDPXK7.js.map +0 -7
- package/dist/chunks/chunk-R5F6CHW2.js.map +0 -7
- package/dist/chunks/chunk-SGFH5PYA.js.map +0 -7
- package/dist/chunks/chunk-TFFZVLR2.js.map +0 -7
- package/dist/chunks/chunk-VON4TSO3.js.map +0 -7
- /package/dist/chunks/{chunk-WLLXKS6I.js.map → chunk-DU6ZA44F.js.map} +0 -0
- /package/dist/chunks/{chunk-W7X4XEQU.js.map → chunk-GC2AUXG6.js.map} +0 -0
- /package/dist/chunks/{chunk-VPRJOD4Y.js.map → chunk-LEDY5G2V.js.map} +0 -0
- /package/dist/chunks/{chunk-OVBKQCYL.js.map → chunk-N2VKKA7O.js.map} +0 -0
- /package/dist/chunks/{chunk-3KDUMDPZ.js.map → chunk-X3CHSIL2.js.map} +0 -0
package/README.md
CHANGED
|
@@ -158,12 +158,14 @@ See the [interface & commands reference](docs/interface.md) for every view, keyb
|
|
|
158
158
|
|
|
159
159
|
- [Configuration](docs/configuration.md): `fabric.json`, code modes, tool capture, approvals, and budgets.
|
|
160
160
|
- [Execution kernels](docs/kernels.md): exclusive TypeScript/Python selection, Monty sandboxing, CPython escape hatch, agent inheritance, and examples.
|
|
161
|
+
- [Native codemode APIs](docs/codemode-parity.md): additive native tool aliases or opt-in Pi-compatible scripts, collision-safe Fabric discovery, native models/images, branch-local state, and sPTC.
|
|
161
162
|
- [Prompt cache](docs/prompt-cache.md): honest cache observations and optional, time-bounded native warming leases.
|
|
162
163
|
- [Thinking control](docs/thinking.md): scoped host-session reasoning effort with configured bounds that children inherit and never widen.
|
|
163
|
-
- [
|
|
164
|
+
- [Durable Pi runner](docs/durable-pi.md): the default isolated Pi/Fabric host, checkpoint recovery, replay boundaries, and the explicit legacy `pi` option.
|
|
164
165
|
- [Durable decisions](docs/decisions.md): pending approvals and questions in the project mesh, headless approvals, routed child dialogs, `/fabric decisions`, and the `pi-fabric decisions` CLI.
|
|
165
166
|
- [Saved programs](docs/programs.md): content-addressed programs, nested `programs.run` with the caller's capabilities, `/fabric programs`, and host runs through `/fabric run` or an event.
|
|
166
167
|
- [Memory & recall](docs/memory-recall.md): compact ranked hits, uniform follow calls, lossless expansion, and guest-local `memory.walk` computation.
|
|
168
|
+
- [Extractive history](docs/extractive-history.md): opt-in native-classifier salience, source-preserving selection, bounded context, and deterministic fallback; configure it through JSON or the TUI.
|
|
167
169
|
- [Interface & commands](docs/interface.md): dashboard, settings, keybindings, slash commands, and headless runs.
|
|
168
170
|
- [Agents, actors & mesh](docs/agents.md): model handoff, `/fabric prewalk`, runners, transports, actors, councils, recursive queries, and durable coordination.
|
|
169
171
|
- [Durable residency through Pi](docs/residency-runtime.md): background host lifecycle and the Pi-runtime launcher boundary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-registry.d.ts","sourceRoot":"","sources":["../../src/actors/global-registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAGV,kBAAkB,EAElB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAsEpB;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,mBAAmB;;gBAKlB,QAAQ,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM;IAM1D,IAAI,IAAI,qBAAqB,EAAE;IAI/B,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAK5D;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,kBAAkB,EAAE,SAAS,UAAQ,GAAG,qBAAqB;IA6BzE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,qBAAqB;IAuDnF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;IAQ9C;;;;;OAKG;IACH,SAAS,CAAC,GAAG,EAAE,qBAAqB,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,kBAAkB;
|
|
1
|
+
{"version":3,"file":"global-registry.d.ts","sourceRoot":"","sources":["../../src/actors/global-registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAGV,kBAAkB,EAElB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAsEpB;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,mBAAmB;;gBAKlB,QAAQ,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM;IAM1D,IAAI,IAAI,qBAAqB,EAAE;IAI/B,OAAO,CAAC,Q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;IAIpE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,gBAAgB;IAyBvE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,gBAAgB;IAKvE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,gBAAgB;IAkBvE,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,gBAAgB;IA8B5D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAyyBvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/agents/result.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,OAqBnD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/agents/result.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,OAqBnD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAsC/J"}
|
package/dist/agents/result.js
CHANGED
|
@@ -4,7 +4,7 @@ import type { FabricKernel } from "../runtime/kernel.js";
|
|
|
4
4
|
import type { FabricThinking } from "../thinking.js";
|
|
5
5
|
import type { FabricAgentLineage, FabricWritePolicy } from "./child-env.js";
|
|
6
6
|
import type { AgentChildQuestionResponse, AgentUsage } from "./types.js";
|
|
7
|
-
export type BuiltInFabricAgentRunner = "pi" | "claude" | "veda";
|
|
7
|
+
export type BuiltInFabricAgentRunner = "pi" | "pi-durable" | "claude" | "veda";
|
|
8
8
|
/**
|
|
9
9
|
* What a runner honors. Fabric refuses a request that needs an undeclared
|
|
10
10
|
* capability before admission, budget, or worktree side effects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-registry.d.ts","sourceRoot":"","sources":["../../src/agents/runner-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,KAAK,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,MAAM,wBAAwB,GAAG,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"runner-registry.d.ts","sourceRoot":"","sources":["../../src/agents/runner-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK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mBAAmB,GAAI,SAAS,mBAAmB,KAAG,CAAC,MAAM,IAAI,CAuB7E,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,KAAG,mBAAmB,GAAG,SAA6B,CAAC;AAEhG,eAAO,MAAM,gBAAgB,QAAO,SAAS,mBAAmB,EAA4B,CAAC;AAE7F,eAAO,MAAM,kBAAkB,GAAI,IAAI,OAAO,KAAG,mBAQhD,CAAC"}
|
package/dist/agents.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
validateAgentResult
|
|
3
|
+
} from "./chunks/chunk-VYQV5JRT.js";
|
|
1
4
|
import {
|
|
2
5
|
AGENTS_ACTION_DESCRIPTORS,
|
|
3
6
|
normalizeAgentRunRequest
|
|
4
|
-
} from "./chunks/chunk-
|
|
5
|
-
import {
|
|
6
|
-
validateAgentResult
|
|
7
|
-
} from "./chunks/chunk-3QECYQGA.js";
|
|
7
|
+
} from "./chunks/chunk-3SHUUBZJ.js";
|
|
8
8
|
import {
|
|
9
9
|
AgentAdmission,
|
|
10
10
|
assertAgentTask,
|
|
@@ -21,7 +21,7 @@ import "./chunks/chunk-PYQM7KPL.js";
|
|
|
21
21
|
import {
|
|
22
22
|
actionArgNormalizer
|
|
23
23
|
} from "./chunks/chunk-NQOEHX62.js";
|
|
24
|
-
import "./chunks/chunk-
|
|
24
|
+
import "./chunks/chunk-ST36EYHN.js";
|
|
25
25
|
import "./chunks/chunk-CYMDX3XP.js";
|
|
26
26
|
|
|
27
27
|
// src/agents/service-schema.ts
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
createGuestStackMap,
|
|
3
3
|
guestSetupSource,
|
|
4
4
|
remapGuestErrorText
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DV2JZSCI.js";
|
|
6
|
+
import {
|
|
7
|
+
transpileFabricCodeWithSourceMap
|
|
8
|
+
} from "./chunk-P4KH4S4S.js";
|
|
6
9
|
import {
|
|
7
10
|
HumanWaitDeadlinePause
|
|
8
11
|
} from "./chunk-7QKKLBHJ.js";
|
|
9
|
-
import {
|
|
10
|
-
transpileFabricCodeWithSourceMap
|
|
11
|
-
} from "./chunk-N5GUXC6F.js";
|
|
12
12
|
import {
|
|
13
13
|
piBashExitMetadata
|
|
14
14
|
} from "./chunk-XOBLUZMB.js";
|
|
@@ -73,17 +73,18 @@ const run = async (message) => {
|
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
+
const emitLog = line => { logs.push(line); send({ type: "output", text: line }); };
|
|
76
77
|
const print = (...values) => {
|
|
77
78
|
if (logsTruncated) return;
|
|
78
79
|
const line = values.map(formatValue).join(" ");
|
|
79
80
|
const remaining = message.maxLogChars - logChars;
|
|
80
81
|
if (line.length > remaining) {
|
|
81
|
-
if (remaining > 0)
|
|
82
|
-
|
|
82
|
+
if (remaining > 0) emitLog(line.slice(0, remaining));
|
|
83
|
+
emitLog("[Pi Fabric log output truncated]");
|
|
83
84
|
logsTruncated = true;
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
|
-
|
|
87
|
+
emitLog(line);
|
|
87
88
|
logChars += line.length;
|
|
88
89
|
};
|
|
89
90
|
|
|
@@ -94,6 +95,7 @@ const run = async (message) => {
|
|
|
94
95
|
const __bun = await import("bun").catch(() => undefined);
|
|
95
96
|
const sandbox = {
|
|
96
97
|
__fabricHostCall: hostCall,
|
|
98
|
+
__fabricEmitImage: image => send({ type: "output", image }),
|
|
97
99
|
__fabricTokenBudget: message.tokenBudget ?? Number.POSITIVE_INFINITY,
|
|
98
100
|
// Native-module bridge for guests whose vm lacks the dynamic-import
|
|
99
101
|
// callback. Bun >= 1.4 honors importModuleDynamically on runInContext
|
|
@@ -113,7 +115,7 @@ const run = async (message) => {
|
|
|
113
115
|
|
|
114
116
|
try {
|
|
115
117
|
vm.runInContext(message.setup, context, { filename: "pi-fabric-setup.js" });
|
|
116
|
-
const promise = vm.runInContext(message.code + "\
|
|
118
|
+
const promise = vm.runInContext(message.code + "\nglobalThis.__fabricRun(__piFabricMain)", context, {
|
|
117
119
|
filename: "pi-fabric-guest.js",
|
|
118
120
|
// Node requires --experimental-vm-modules (set at spawn). Bun >= 1.4
|
|
119
121
|
// honors this option on runInContext (unlike on createContext), so
|
|
@@ -121,12 +123,13 @@ const run = async (message) => {
|
|
|
121
123
|
importModuleDynamically: (specifier) => import(specifier),
|
|
122
124
|
});
|
|
123
125
|
const value = jsonCompatible(await promise);
|
|
124
|
-
send({ type: "result", result: { value, logs, terminationReason: "completed" } });
|
|
126
|
+
send({ type: "result", result: { value, logs, emitted: jsonCompatible(context.__fabricEmitted), terminationReason: "completed" } });
|
|
125
127
|
} catch (error) {
|
|
126
128
|
send({
|
|
127
129
|
type: "result",
|
|
128
130
|
result: {
|
|
129
131
|
logs,
|
|
132
|
+
emitted: jsonCompatible(context.__fabricEmitted),
|
|
130
133
|
terminationReason: "runtime_error",
|
|
131
134
|
error: error?.stack ?? error?.message ?? String(error),
|
|
132
135
|
},
|
|
@@ -221,6 +224,9 @@ var NodeProcessRuntime = class {
|
|
|
221
224
|
let settled = false;
|
|
222
225
|
let finishing = false;
|
|
223
226
|
const hostTasks = /* @__PURE__ */ new Set();
|
|
227
|
+
const partialLogs = [];
|
|
228
|
+
const partialImages = [];
|
|
229
|
+
let partialChars = 0;
|
|
224
230
|
const guestBundle = options.transpiledCode === void 0 ? transpileFabricCodeWithSourceMap(code) : { code: options.transpiledCode, sourceMap: options.transpiledSourceMap };
|
|
225
231
|
const guestStackMap = createGuestStackMap(guestBundle.sourceMap);
|
|
226
232
|
const guestLineCount = guestBundle.code.split("\n").length;
|
|
@@ -236,7 +242,7 @@ var NodeProcessRuntime = class {
|
|
|
236
242
|
child.removeAllListeners();
|
|
237
243
|
if (child.connected) child.disconnect();
|
|
238
244
|
if (child.exitCode === null && child.signalCode === null) child.kill("SIGKILL");
|
|
239
|
-
resolve(result);
|
|
245
|
+
resolve(result.terminationReason === "completed" ? result : { ...result, logs: result.logs.length ? result.logs : partialLogs, emitted: result.emitted?.length ? result.emitted : partialImages });
|
|
240
246
|
};
|
|
241
247
|
const scheduleDeadline = () => {
|
|
242
248
|
clearTimeout(deadline);
|
|
@@ -283,10 +289,19 @@ var NodeProcessRuntime = class {
|
|
|
283
289
|
child.on("message", (raw) => {
|
|
284
290
|
if (settled || finishing || typeof raw !== "object" || raw === null) return;
|
|
285
291
|
const message = raw;
|
|
292
|
+
if (message.type === "output") {
|
|
293
|
+
const chars = typeof message.text === "string" ? message.text.length : JSON.stringify(message.image ?? null).length;
|
|
294
|
+
partialChars += chars;
|
|
295
|
+
if (partialChars <= 16777216) {
|
|
296
|
+
if (typeof message.text === "string") partialLogs.push(message.text);
|
|
297
|
+
else if (message.image !== void 0) partialImages.push(message.image);
|
|
298
|
+
}
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
286
301
|
if (message.type === "result") {
|
|
287
302
|
finishing = true;
|
|
288
303
|
if (deadline) clearTimeout(deadline);
|
|
289
|
-
if (
|
|
304
|
+
if (hostTasks.size > 0 && !hostAbortController.signal.aborted) {
|
|
290
305
|
hostAbortController.abort(new Error(message.result.error ?? "Process execution stopped"));
|
|
291
306
|
}
|
|
292
307
|
void (async () => {
|
|
@@ -368,7 +383,7 @@ var NodeProcessRuntime = class {
|
|
|
368
383
|
scheduleDeadline();
|
|
369
384
|
send(child, {
|
|
370
385
|
type: "execute",
|
|
371
|
-
setup: guestSetupSource(options.piToolCanonicalFields),
|
|
386
|
+
setup: guestSetupSource(options.piToolCanonicalFields, options.nativeStoreEnabled, options.codemodeProfile, options.nativeToolsEnabled),
|
|
372
387
|
code: guestBundle.code,
|
|
373
388
|
strings: options.strings ?? {},
|
|
374
389
|
tokenBudget: options.tokenBudget,
|
|
@@ -387,4 +402,4 @@ export {
|
|
|
387
402
|
NodeProcessRuntime,
|
|
388
403
|
BunProcessRuntime
|
|
389
404
|
};
|
|
390
|
-
//# sourceMappingURL=chunk-
|
|
405
|
+
//# sourceMappingURL=chunk-3DUKKQHN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/runtime/node-process-runtime.ts", "../../src/runtime/node-process-child-source.ts"],
|
|
4
|
+
"sourcesContent": ["import { spawn, type ChildProcess } from \"node:child_process\";\nimport { runAbortable, settleWithin } from \"../async-settlement.js\";\nimport { piBashExitMetadata } from \"../core/pi-bash-error.js\";\nimport { isPiShellRef } from \"../core/pi-tools.js\";\nimport { HumanWaitDeadlinePause } from \"./deadline-pause.js\";\nimport { guestSetupSource } from \"./quickjs-runtime.js\";\nimport type { FabricHostCall, FabricSandboxOptions, FabricSandboxResult } from \"./kernel.js\";\nimport { NODE_PROCESS_CHILD_SOURCE } from \"./node-process-child-source.js\";\nimport { createGuestStackMap, remapGuestErrorText } from \"./guest-stack-map.js\";\nimport { transpileFabricCodeWithSourceMap } from \"./type-checker.js\";\nimport {\n resolveScriptRuntime,\n resolveScriptRuntimeSync,\n} from \"../agents/transports/process-utils.js\";\n\ninterface ChildCallMessage {\n type: \"call\";\n id: number;\n ref: string;\n args: Record<string, unknown>;\n}\n\ninterface ChildResultMessage {\n type: \"result\";\n result: FabricSandboxResult;\n}\n\ntype ChildMessage = ChildCallMessage | ChildResultMessage | { type: \"output\"; text?: string; image?: unknown };\n\nconst HOST_TASK_SETTLE_GRACE_MS = 250;\n\nconst send = (child: ChildProcess, message: any): void => {\n if (!child.connected) return;\n child.send(message, () => undefined);\n};\n\nexport class NodeProcessRuntime {\n readonly #interpreter: \"node\" | \"bun\";\n\n constructor(interpreter: \"node\" | \"bun\" = \"node\") {\n this.#interpreter = interpreter;\n }\n\n async execute(\n code: string,\n hostCall: FabricHostCall,\n options: FabricSandboxOptions,\n ): Promise<FabricSandboxResult> {\n if (options.signal?.aborted) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"aborted\",\n error: \"Execution cancelled\",\n };\n }\n if (!Number.isSafeInteger(options.memoryLimitBytes) || options.memoryLimitBytes < 1) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: \"Process memory limit must be a positive safe integer\",\n };\n }\n if (!Number.isFinite(options.timeoutMs) || options.timeoutMs < 1) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: \"Process timeout must be positive\",\n };\n }\n\n // Bun evaluates --eval input as ESM and ignores V8 heap flags, so the\n // Bun child gets the guest source bare; Node needs the module + heap flags.\n // Bun resolution stays async: Pi may legitimately run under Node while bun\n // is only available on PATH, and the sync variant does no PATH lookup.\n const runtimeOptions = this.#interpreter === \"bun\" ? { requireBun: true } : { requireNode: true };\n const interpreterPath = this.#interpreter === \"bun\"\n ? await resolveScriptRuntime(runtimeOptions)\n : resolveScriptRuntimeSync(runtimeOptions);\n const child = spawn(\n interpreterPath,\n this.#interpreter === \"bun\"\n ? [\"--eval\", NODE_PROCESS_CHILD_SOURCE]\n : [\n // Guest import() through importModuleDynamically needs the vm\n // modules flag; Bun's vm ignores the option (see __fabricImport).\n \"--experimental-vm-modules\",\n `--max-old-space-size=${Math.max(16, Math.floor(options.memoryLimitBytes / (1024 * 1024)))}`,\n \"--input-type=module\",\n \"--eval\",\n NODE_PROCESS_CHILD_SOURCE,\n ],\n { stdio: [\"ignore\", \"ignore\", \"ignore\", \"ipc\"] },\n );\n // Bun resolution is async, so the signal may have aborted while resolving.\n if (options.signal?.aborted) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"aborted\",\n error: \"Execution cancelled\",\n };\n }\n const hostAbortController = new AbortController();\n const startedAt = Date.now();\n let effectiveTimeoutMs = options.timeoutMs;\n let deadlineAt = startedAt + effectiveTimeoutMs;\n let deadline: NodeJS.Timeout | undefined;\n let abortHandler: (() => void) | undefined;\n let settled = false;\n let finishing = false;\n const hostTasks = new Set<Promise<void>>();\n const partialLogs: string[] = [];\n const partialImages: unknown[] = [];\n let partialChars = 0;\n\n const guestBundle = options.transpiledCode === undefined\n ? transpileFabricCodeWithSourceMap(code)\n : { code: options.transpiledCode, sourceMap: options.transpiledSourceMap };\n const guestStackMap = createGuestStackMap(guestBundle.sourceMap);\n const guestLineCount = guestBundle.code.split(\"\\n\").length;\n\n return new Promise<FabricSandboxResult>((resolve) => {\n const finish = (result: FabricSandboxResult): void => {\n if (settled) return;\n settled = true;\n if (deadline) clearTimeout(deadline);\n if (abortHandler) options.signal?.removeEventListener(\"abort\", abortHandler);\n if (!hostAbortController.signal.aborted && hostTasks.size > 0) {\n hostAbortController.abort(new Error(result.error ?? \"Process execution stopped\"));\n }\n child.removeAllListeners();\n if (child.connected) child.disconnect();\n if (child.exitCode === null && child.signalCode === null) child.kill(\"SIGKILL\");\n resolve(result.terminationReason === \"completed\" ? result : { ...result, logs: result.logs.length ? result.logs : partialLogs, emitted: result.emitted?.length ? result.emitted : partialImages });\n };\n const scheduleDeadline = (): void => {\n clearTimeout(deadline);\n if (settled || finishing || !Number.isFinite(deadlineAt)) return;\n deadline = setTimeout(() => {\n const error = `Execution timed out after ${effectiveTimeoutMs}ms`;\n finish({ value: undefined, logs: [], terminationReason: \"timed_out\", error });\n }, Math.min(2_147_483_647, Math.max(0, deadlineAt - Date.now())));\n deadline.unref?.();\n };\n const extendDeadline = (ref: string, args: Record<string, unknown>): void => {\n const requested = options.minimumTimeoutMsForHostCall?.(ref, args);\n if (typeof requested !== \"number\" || !Number.isFinite(requested)) return;\n if (humanWait.paused) {\n humanWait.raise(requested);\n return;\n }\n const nextDeadlineAt = Date.now() + Math.max(1, Math.floor(requested));\n if (nextDeadlineAt <= deadlineAt) return;\n deadlineAt = nextDeadlineAt;\n effectiveTimeoutMs = deadlineAt - startedAt;\n scheduleDeadline();\n };\n\n const humanWait = new HumanWaitDeadlinePause({\n remainingMs: () => deadlineAt - Date.now(),\n suspend: () => {\n clearTimeout(deadline);\n deadlineAt = Infinity;\n },\n resume: (remainingMs) => {\n deadlineAt = Date.now() + remainingMs;\n scheduleDeadline();\n },\n });\n\n abortHandler = () => {\n finish({\n value: undefined,\n logs: [],\n terminationReason: \"aborted\",\n error: \"Execution cancelled\",\n });\n };\n options.signal?.addEventListener(\"abort\", abortHandler, { once: true });\n\n child.on(\"message\", (raw: unknown) => {\n if (settled || finishing || typeof raw !== \"object\" || raw === null) return;\n const message = raw as ChildMessage;\n if (message.type === \"output\") {\n const chars = typeof message.text === \"string\" ? message.text.length : JSON.stringify(message.image ?? null).length;\n partialChars += chars;\n if (partialChars <= 16_777_216) {\n if (typeof message.text === \"string\") partialLogs.push(message.text);\n else if (message.image !== undefined) partialImages.push(message.image);\n }\n return;\n }\n if (message.type === \"result\") {\n finishing = true;\n if (deadline) clearTimeout(deadline);\n if (hostTasks.size > 0 && !hostAbortController.signal.aborted) {\n hostAbortController.abort(new Error(message.result.error ?? \"Process execution stopped\"));\n }\n void (async () => {\n const completed = await settleWithin(hostTasks, HOST_TASK_SETTLE_GRACE_MS);\n if (!completed && !hostAbortController.signal.aborted) {\n hostAbortController.abort(\n new Error(\"Fabric guest execution ended before its host calls settled\"),\n );\n await settleWithin(hostTasks, HOST_TASK_SETTLE_GRACE_MS);\n }\n finish(\n message.result.error === undefined\n ? message.result\n : {\n ...message.result,\n error: remapGuestErrorText(message.result.error, guestStackMap, guestLineCount),\n },\n );\n })();\n return;\n }\n if (message.type !== \"call\") return;\n extendDeadline(message.ref, message.args);\n if (message.ref === \"fabric.$timer\") {\n const ms = Math.max(0, Number(message.args?.ms ?? 0));\n let timer: NodeJS.Timeout | undefined;\n const timerTask = new Promise<void>((resolveTask) => {\n timer = setTimeout(() => {\n if (!settled && !finishing) {\n send(child, { type: \"response\", id: message.id, ok: true, value: undefined });\n }\n resolveTask();\n }, ms);\n timer!.unref?.();\n });\n hostTasks.add(timerTask);\n void timerTask.finally(() => {\n hostTasks.delete(timerTask);\n if (timer) clearTimeout(timer);\n });\n return;\n }\n const waitsForHuman = options.isHumanWaitHostCall?.(message.ref, message.args) === true;\n if (waitsForHuman) humanWait.enter();\n const task = runAbortable(hostAbortController.signal, () =>\n hostCall(message.ref, message.args, hostAbortController.signal),\n ).finally(() => {\n if (waitsForHuman) humanWait.leave();\n }).then(\n (value) => send(child, { type: \"response\", id: message.id, ok: true, value }),\n (error) =>\n send(child, {\n type: \"response\",\n id: message.id,\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n bashExit: isPiShellRef(message.ref) ? piBashExitMetadata(error) : undefined,\n }),\n );\n hostTasks.add(task);\n void task.finally(() => hostTasks.delete(task));\n });\n child.once(\"error\", (error) => {\n finish({\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: `Process executor failed: ${error.message}`,\n });\n });\n child.once(\"exit\", (exitCode, signal) => {\n if (settled) return;\n const detail = signal ? `signal ${signal}` : `exit code ${exitCode ?? \"unknown\"}`;\n finish({\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: `Process executor exited before returning a result (${detail}); it may have exceeded its memory limit`,\n });\n });\n\n scheduleDeadline();\n send(child, {\n type: \"execute\",\n setup: guestSetupSource(options.piToolCanonicalFields, options.nativeStoreEnabled, options.codemodeProfile, options.nativeToolsEnabled),\n code: guestBundle.code,\n strings: options.strings ?? {},\n tokenBudget: options.tokenBudget,\n maxLogChars: options.maxLogChars ?? 100_000,\n });\n });\n }\n}\n\nexport class BunProcessRuntime extends NodeProcessRuntime {\n constructor() {\n super(\"bun\");\n }\n}\n", "export const NODE_PROCESS_CHILD_SOURCE = String.raw`\nimport vm from \"node:vm\";\n\nconst pending = new Map();\nlet nextCallId = 0;\n\nconst send = (message) => {\n if (process.connected) process.send?.(message);\n};\n\nconst formatValue = (value) => {\n if (typeof value === \"string\") return value;\n if (value instanceof Error) return value.stack ?? value.message;\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n};\n\nconst jsonCompatible = (value) => {\n if (value === undefined) return undefined;\n const serialized = JSON.stringify(value);\n return serialized === undefined ? undefined : JSON.parse(serialized);\n};\n\nconst run = async (message) => {\n const logs = [];\n let logChars = 0;\n let logsTruncated = false;\n const hostCall = (ref, args) => {\n const id = nextCallId++;\n return new Promise((resolve, reject) => {\n pending.set(id, { resolve, reject });\n send({\n type: \"call\",\n id,\n ref: String(ref),\n args:\n typeof args === \"object\" && args !== null && !Array.isArray(args)\n ? args\n : {},\n });\n });\n };\n const emitLog = line => { logs.push(line); send({ type: \"output\", text: line }); };\n const print = (...values) => {\n if (logsTruncated) return;\n const line = values.map(formatValue).join(\" \");\n const remaining = message.maxLogChars - logChars;\n if (line.length > remaining) {\n if (remaining > 0) emitLog(line.slice(0, remaining));\n emitLog(\"[Pi Fabric log output truncated]\");\n logsTruncated = true;\n return;\n }\n emitLog(line);\n logChars += line.length;\n };\n\n // Bun module namespace for the guest. The child resolves the specifier in\n // its own module context; under the node runtime it fails and the binding\n // stays undefined. Namespace objects come from this realm, so instanceof\n // against guest-realm classes fails (same caveat as other sandbox bridges).\n const __bun = await import(\"bun\").catch(() => undefined);\n const sandbox = {\n __fabricHostCall: hostCall,\n __fabricEmitImage: image => send({ type: \"output\", image }),\n __fabricTokenBudget: message.tokenBudget ?? Number.POSITIVE_INFINITY,\n // Native-module bridge for guests whose vm lacks the dynamic-import\n // callback. Bun >= 1.4 honors importModuleDynamically on runInContext\n // (natural import() works there), so this is mostly a fallback and an\n // explicit escape hatch. Cross-realm caveat: namespaces come from this\n // realm, so instanceof against guest-realm classes fails.\n __fabricImport: (specifier) => import(specifier),\n // Resolved above; undefined under the node runtime.\n __bun,\n print,\n \u03C0: jsonCompatible(message.strings),\n };\n const context = vm.createContext(sandbox, {\n name: \"pi-fabric-node-process\",\n codeGeneration: { strings: true, wasm: false },\n });\n\n try {\n vm.runInContext(message.setup, context, { filename: \"pi-fabric-setup.js\" });\n const promise = vm.runInContext(message.code + \"\\nglobalThis.__fabricRun(__piFabricMain)\", context, {\n filename: \"pi-fabric-guest.js\",\n // Node requires --experimental-vm-modules (set at spawn). Bun >= 1.4\n // honors this option on runInContext (unlike on createContext), so\n // natural guest import() works there; __fabricImport is a fallback.\n importModuleDynamically: (specifier) => import(specifier),\n });\n const value = jsonCompatible(await promise);\n send({ type: \"result\", result: { value, logs, emitted: jsonCompatible(context.__fabricEmitted), terminationReason: \"completed\" } });\n } catch (error) {\n send({\n type: \"result\",\n result: {\n logs,\n emitted: jsonCompatible(context.__fabricEmitted),\n terminationReason: \"runtime_error\",\n error: error?.stack ?? error?.message ?? String(error),\n },\n });\n }\n};\n\nprocess.on(\"message\", (message) => {\n if (typeof message !== \"object\" || message === null) return;\n if (message.type === \"execute\") {\n void run(message);\n return;\n }\n if (message.type !== \"response\") return;\n const operation = pending.get(message.id);\n if (!operation) return;\n pending.delete(message.id);\n if (message.ok) operation.resolve(message.value);\n else {\n const error = new Error(message.error ?? \"Host call failed\");\n if (message.bashExit) error.__fabricBashExit = message.bashExit;\n operation.reject(error);\n }\n});\n`;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAgC;;;ACAlC,IAAM,4BAA4B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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;AACA,kBAAU,IAAI,IAAI;AAClB,aAAK,KAAK,QAAQ,MAAM,UAAU,OAAO,IAAI,CAAC;AAAA,MAChD,CAAC;AACD,YAAM,KAAK,SAAS,CAAC,UAAU;AAC7B,eAAO;AAAA,UACL,OAAO;AAAA,UACP,MAAM,CAAC;AAAA,UACP,mBAAmB;AAAA,UACnB,OAAO,4BAA4B,MAAM,OAAO;AAAA,QAClD,CAAC;AAAA,MACH,CAAC;AACD,YAAM,KAAK,QAAQ,CAAC,UAAU,WAAW;AACvC,YAAI,QAAS;AACb,cAAM,SAAS,SAAS,UAAU,MAAM,KAAK,aAAa,YAAY,SAAS;AAC/E,eAAO;AAAA,UACL,OAAO;AAAA,UACP,MAAM,CAAC;AAAA,UACP,mBAAmB;AAAA,UACnB,OAAO,sDAAsD,MAAM;AAAA,QACrE,CAAC;AAAA,MACH,CAAC;AAED,uBAAiB;AACjB,WAAK,OAAO;AAAA,QACV,MAAM;AAAA,QACN,OAAO,iBAAiB,QAAQ,uBAAuB,QAAQ,oBAAoB,QAAQ,iBAAiB,QAAQ,kBAAkB;AAAA,QACtI,MAAM,YAAY;AAAA,QAClB,SAAS,QAAQ,WAAW,CAAC;AAAA,QAC7B,aAAa,QAAQ;AAAA,QACrB,aAAa,QAAQ,eAAe;AAAA,MACtC,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAEO,IAAM,oBAAN,cAAgC,mBAAmB;AAAA,EACxD,cAAc;AACZ,UAAM,KAAK;AAAA,EACb;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-PYQM7KPL.js";
|
|
19
19
|
import {
|
|
20
20
|
isFabricRunnerId
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ST36EYHN.js";
|
|
22
22
|
|
|
23
23
|
// src/providers/agents-actions.ts
|
|
24
24
|
var RUNNER_ID_SOURCE = "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$";
|
|
@@ -29,7 +29,7 @@ var runProperties = {
|
|
|
29
29
|
type: "string",
|
|
30
30
|
pattern: RUNNER_ID_SOURCE,
|
|
31
31
|
maxLength: 64,
|
|
32
|
-
description: "Execution harness: pi, claude, veda, or a runner registered through pi-fabric/runners. Defaults to agents.runner."
|
|
32
|
+
description: "Execution harness: pi-durable (default), pi, claude, veda, or a runner registered through pi-fabric/runners. Defaults to agents.runner."
|
|
33
33
|
},
|
|
34
34
|
kernel: {
|
|
35
35
|
type: "string",
|
|
@@ -783,7 +783,7 @@ var normalizeAgentRunRequest = (args, defaults, options = {}) => {
|
|
|
783
783
|
throw new Error(`Invalid Fabric agent runner: ${JSON.stringify(args.runner)}`);
|
|
784
784
|
}
|
|
785
785
|
const runner = args.runner ?? defaults.runner;
|
|
786
|
-
const inheritedModel = runner === "pi" && !defaults.model && defaults.inheritedModel ? `${defaults.inheritedModel.provider}/${defaults.inheritedModel.id}` : void 0;
|
|
786
|
+
const inheritedModel = (runner === "pi" || runner === "pi-durable") && !defaults.model && defaults.inheritedModel ? `${defaults.inheritedModel.provider}/${defaults.inheritedModel.id}` : void 0;
|
|
787
787
|
const kernel = checkedKernel(args.kernel);
|
|
788
788
|
const thinkingBounds = args.thinkingBounds === void 0 ? void 0 : normalizeThinkingBounds(args.thinkingBounds, "thinkingBounds");
|
|
789
789
|
if (args.recursive === true && args.extensions === false) {
|
|
@@ -822,4 +822,4 @@ export {
|
|
|
822
822
|
AGENTS_ACTION_DESCRIPTORS,
|
|
823
823
|
normalizeAgentRunRequest
|
|
824
824
|
};
|
|
825
|
-
//# sourceMappingURL=chunk-
|
|
825
|
+
//# sourceMappingURL=chunk-3SHUUBZJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/agents-actions.ts", "../../src/agents/request.ts"],
|
|
4
|
+
"sourcesContent": ["import { FABRIC_ACTOR_HOST_EVENTS } from \"../actors/types.js\";\nimport {\n MAX_COMPACTION_INSTRUCTIONS_CHARS,\n MAX_PRESERVE_ITEM_CHARS,\n MAX_PRESERVE_ITEMS,\n} from \"../compaction/instructions.js\";\nimport { FABRIC_LIFECYCLE_EVENTS } from \"../lifecycle/types.js\";\nimport type { FabricActionDescriptor } from \"../protocol.js\";\n\n// RUNNER_ID_PATTERN (src/agents/runner-registry.ts) as source text; kept in sync by a test.\nconst RUNNER_ID_SOURCE = \"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$\";\n\nconst runProperties = {\n task: { type: \"string\", description: \"A self-contained task for the child agent\" },\n name: { type: \"string\" },\n runner: {\n type: \"string\",\n pattern: RUNNER_ID_SOURCE,\n maxLength: 64,\n description: \"Execution harness: pi-durable (default), pi, claude, veda, or a runner registered through pi-fabric/runners. Defaults to agents.runner.\",\n },\n kernel: {\n type: \"string\",\n enum: [\"typescript\", \"python\", \"inherit\"],\n description: \"Fabric execution language. Omitted/inherit uses the caller executor.kernel; concrete choices require Pi with extensions enabled. Python uses the configured backend; CPython is native execution.\",\n },\n transport: {\n type: \"string\",\n enum: [\"auto\", \"process\", \"tmux\", \"screen\", \"localterm\", \"herdr\"],\n },\n model: {\n type: \"string\",\n description:\n \"Pi provider/id copied from agents.models({ runner: \\\"pi\\\" }), a configured models.aliases name, or a search term resolved to the closest authenticated model (recency from pi-model-sort breaks ties). Reuse returned keys; never infer version numbers from agent names. Exact keys win; near-miss IDs resolve to the closest visible model on the same provider. Handles report the canonical model. Claude runtime value or Veda backend model/alias are forwarded verbatim.\",\n },\n persona: {\n type: \"string\",\n description: \"Veda persona name for this run, such as frontend, reviewer, worker, or a custom persona.\",\n },\n thinking: {\n type: \"string\",\n enum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n },\n thinkingBounds: {\n type: \"object\",\n properties: {\n min: { type: \"string\", enum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] },\n max: { type: \"string\", enum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] },\n },\n additionalProperties: false,\n description: \"Optional child thinking bounds; must lie inside this session's bounds (omitted ends inherit). Child Fabric sessions never widen them. thinking outside the effective bounds is clamped and reported as requestedThinking.\",\n },\n tools: { type: \"array\", items: { type: \"string\" } },\n timeoutMs: {\n type: \"number\",\n description:\n \"Optional longer wall-clock limit in milliseconds. Omit to use agents.timeoutMs (60 minutes by default); values below the configured default are ignored.\",\n },\n extensions: { type: \"boolean\" },\n recursive: { type: \"boolean\" },\n cwd: {\n type: \"string\",\n description: \"Filesystem execution directory for leaf or recursive Pi runs; relative paths resolve from the caller cwd. Does not change project/mesh ownership or grant target project trust.\",\n },\n worktree: { type: \"boolean\" },\n worktreeSetup: {\n type: \"string\",\n maxLength: 8192,\n description: \"Shell command run in a new worktree before the child starts; overrides agents.worktree.setup. Non-zero exit fails the run.\",\n },\n seed: {\n type: \"string\",\n enum: [\"task\", \"branch\", \"snippet\"],\n description: \"Child context (Pi only). task (default): the task alone. branch: a non-blocking fork of this conversation up to its last completed turn, then the task. snippet: the last seedMessages user/assistant texts prefixed to the task.\",\n },\n seedMessages: { type: \"integer\", minimum: 1, maximum: 50, description: \"snippet only; default 12\" },\n readOnly: { type: \"boolean\", description: \"Pi only: refuse write/edit (and shell unless shell: \\\"unconfined\\\") in the child\" },\n writableRoots: {\n type: \"array\",\n items: { type: \"string\", maxLength: 4096 },\n maxItems: 32,\n description: \"Pi only: confine write/edit to these directories (relative to the child cwd; default the cwd). Shell is refused unless shell: \\\"unconfined\\\".\",\n },\n scope: {\n type: \"object\",\n properties: {\n grants: {\n type: \"array\",\n maxItems: 64,\n items: {\n type: \"object\",\n properties: {\n resource: { type: \"string\", minLength: 3, maxLength: 512 },\n actions: { type: \"array\", minItems: 1, maxItems: 3, items: { type: \"string\", enum: [\"read\", \"write\", \"execute\"] } },\n },\n required: [\"resource\", \"actions\"],\n additionalProperties: false,\n },\n },\n },\n required: [\"grants\"],\n additionalProperties: false,\n description: \"Narrow this session's host-issued scope for the child (each grant must be covered by a parent grant; resource <ns>:<path>, <ns>:<path>/*, <ns>:<path>/**, <ns>:*). Omit to inherit it; refused in an unscoped session.\",\n },\n shell: {\n type: \"string\",\n enum: [\"deny\", \"unconfined\"],\n description: \"With a write policy, bash is refused by default; unconfined allows it and is not a sandbox\",\n },\n schema: { type: \"object\", description: \"Optional JSON Schema for validated structured output\" },\n systemPrompt: {\n type: \"string\",\n description: \"Optional extra system prompt body for this child run. Pi runners merge it below component guidance and forward it via --system-prompt; Claude runners receive it via --append-system-prompt. Useful for reliability-focused prompt rules on models with weak behavioral defaults.\",\n },\n persistSession: {\n type: \"boolean\",\n description: \"Claude runner only: persist the Claude Code transcript for hook-based observability. Defaults to false.\",\n },\n};\n\nconst runSchema = {\n type: \"object\",\n properties: runProperties,\n required: [\"task\"],\n additionalProperties: false,\n};\n\nconst residencySchema = {\n type: \"string\",\n enum: [\"session\", \"durable\"],\n description: \"session stops with the current Pi host; durable transfers execution to Fabric's hidden resident host.\",\n};\n\nconst actorBindingScopeSchema = {\n type: \"string\",\n enum: [\"session\", \"project\"],\n description: \"session (default) changes only this Pi session; project pins the shared actor default and requires ownership.\",\n};\n\nconst actorInvocationProperties = {\n id: { type: \"string\" },\n message: { type: \"string\" },\n data: {},\n model: {\n ...runProperties.model,\n description: \"Optional model pinned only for this actor activation.\",\n },\n thinking: runProperties.thinking,\n};\n\nconst spawnSchema = {\n ...runSchema,\n properties: { ...runProperties, residency: residencySchema },\n};\n\nconst handoffCompactionSchema = {\n anyOf: [\n { type: \"boolean\" },\n {\n type: \"object\",\n properties: {\n instructions: {\n type: \"string\",\n maxLength: MAX_COMPACTION_INSTRUCTIONS_CHARS,\n description: \"Custom compaction instructions for the inherited trajectory\",\n },\n preserve: {\n type: \"array\",\n items: { type: \"string\", maxLength: MAX_PRESERVE_ITEM_CHARS },\n maxItems: MAX_PRESERVE_ITEMS,\n description: \"Explicit bounded facts the trajectory summary must preserve\",\n },\n },\n additionalProperties: false,\n },\n ],\n description:\n \"Compact the inherited trajectory with Fabric's deterministic compactor before the executor resumes it. `true` applies the default summary; an object customizes instructions and bounded preserve facts. Omitted keeps the full raw trajectory.\",\n};\n\nconst handoffSchema = {\n type: \"object\",\n properties: {\n task: {\n type: \"string\",\n description: \"Optional instructions for the executor in addition to the inherited trajectory\",\n },\n name: runProperties.name,\n kernel: runProperties.kernel,\n transport: runProperties.transport,\n model: {\n ...runProperties.model,\n description: \"Explicit Pi provider/id target that will continue the inherited trajectory\",\n },\n thinking: runProperties.thinking,\n tools: runProperties.tools,\n timeoutMs: runProperties.timeoutMs,\n extensions: runProperties.extensions,\n recursive: runProperties.recursive,\n schema: runProperties.schema,\n compact: handoffCompactionSchema,\n },\n required: [\"model\"],\n additionalProperties: false,\n};\n\nconst idSchema = {\n type: \"object\",\n properties: { id: { type: \"string\" } },\n required: [\"id\"],\n additionalProperties: false,\n};\n\nconst lifecycleEventSchema = {\n type: \"string\",\n enum: [...FABRIC_LIFECYCLE_EVENTS],\n};\n\nexport const AGENTS_ACTION_DESCRIPTORS: FabricActionDescriptor[] = [\n {\n name: \"run\",\n description: \"Run a child agent through Pi or Claude Code and wait for its final result\",\n inputSchema: runSchema,\n risk: \"agent\",\n },\n {\n name: \"handoff\",\n description:\n \"Schedule a Pi trajectory handoff after the current outer fabric_exec result, then wait for implementation at that boundary\",\n inputSchema: handoffSchema,\n risk: \"agent\",\n },\n {\n name: \"spawn\",\n description:\n \"Start a child agent through Pi or Claude Code and return a handle immediately. For independent launches, await Promise.allSettled and inspect every result so one rejection does not abort pending sibling calls at program exit. Unread detached results are batched at the next safe turn boundary (or wake idle Main) when agents.notifyOnComplete is enabled. wait/join and terminal status acknowledge results and retract pending notifications. Use wait when this program needs the result; do not poll status in a loop.\",\n inputSchema: spawnSchema,\n risk: \"agent\",\n },\n {\n name: \"wait\",\n description: \"Wait for a previously spawned child agent and acknowledge its result, suppressing a duplicate completion notification\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"join\",\n description: \"Alias for agents.wait: wait for a previously spawned child agent with the same progress and completion-notification behavior\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"status\",\n description: \"Get the latest status of any known project participant. A terminal child-agent result acknowledges its pending completion notification; running status does not.\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"list\",\n description: \"List agent participants locally, across the current lineage, or across the project\",\n inputSchema: {\n type: \"object\",\n properties: { scope: { type: \"string\", enum: [\"local\", \"lineage\", \"project\"] } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"members\",\n description: \"List the unified project topology of roots, agents, and actors\",\n inputSchema: {\n type: \"object\",\n properties: {\n scope: { type: \"string\", enum: [\"local\", \"lineage\", \"project\"] },\n kinds: {\n type: \"array\",\n items: { type: \"string\", enum: [\"root\", \"agent\", \"actor\"] },\n },\n includeStale: { type: \"boolean\" },\n },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"self\",\n description: \"Return this caller's intrinsic participant identity in the unified topology\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"main\",\n description:\n \"Return the root user-facing Main Pi agent target. The stable alias main is also accepted by agents.steer and agents.followUp.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"sessions\",\n description: \"List all live root Pi session agents in the project, including the current lineage root and peers, with symmetric participant identities.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"peers\",\n description: \"List other live root Pi sessions sharing this project mesh. The dashboard-owning session remains Main; these targets are named peers.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"subscribe\",\n description:\n \"Create a durable source-qualified participant lifecycle subscription. Events are delivered to Main by default or to another participant through steer/follow-up routing.\",\n inputSchema: {\n type: \"object\",\n properties: {\n from: { type: \"string\", description: \"Exact source participant id; main means this lineage root\" },\n events: { type: \"array\", minItems: 1, items: lifecycleEventSchema },\n to: { type: \"string\", description: \"Target participant id; defaults to main\" },\n delivery: { type: \"string\", enum: [\"steer\", \"followUp\"] },\n triggerTurn: { type: \"boolean\" },\n once: { type: \"boolean\" },\n },\n required: [\"from\", \"events\", \"delivery\", \"triggerTurn\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"subscriptions\",\n description: \"List durable participant lifecycle subscriptions, optionally filtered by source or target\",\n inputSchema: {\n type: \"object\",\n properties: { from: { type: \"string\" }, to: { type: \"string\" } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"unsubscribe\",\n description: \"Remove a participant lifecycle subscription\",\n inputSchema: idSchema,\n risk: \"agent\",\n },\n {\n name: \"models\",\n description:\n \"List models exposed by the selected runner. Claude models are enumerated from the installed Claude Code runtime, not hard-coded.\",\n inputSchema: {\n type: \"object\",\n properties: {\n runner: { type: \"string\", pattern: RUNNER_ID_SOURCE, maxLength: 64 },\n refresh: { type: \"boolean\" },\n },\n additionalProperties: false,\n },\n risk: \"execute\",\n },\n {\n name: \"switchModel\",\n description:\n \"Switch Main's live Pi session model in place. The model selector accepts an exact provider/id, a configured models.aliases name (alias chains try each target in order until one is authenticated), an exact model id, or a search term; inexact terms resolve to the closest match, preferring recently used models (via pi-model-sort usage, when present).\",\n inputSchema: {\n type: \"object\",\n properties: {\n model: {\n type: \"string\",\n description: \"provider/id, alias name, or search term\",\n },\n provider: { type: \"string\" },\n },\n required: [\"model\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"stop\",\n description: \"Stop a local or remotely owned agent or actor that advertises the stop capability\",\n inputSchema: idSchema,\n risk: \"agent\",\n },\n {\n name: \"cleanup\",\n description: \"Remove a completed agent's run files and optional Git worktree\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n deleteBranch: { type: \"boolean\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"write\",\n },\n {\n name: \"create\",\n description:\n 'Create a persistent actor with independently selected session or project storage. Use scope \"global\" to save a reusable project-independent template instead of a live actor.',\n inputSchema: {\n type: \"object\",\n properties: {\n name: { type: \"string\" },\n instructions: { type: \"string\" },\n events: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...FABRIC_ACTOR_HOST_EVENTS],\n },\n },\n topics: { type: \"array\", items: { type: \"string\" } },\n delivery: {\n type: \"string\",\n enum: [\"mailbox\", \"steer\", \"followUp\", \"nextTurn\"],\n },\n responseMode: { type: \"string\", enum: [\"text\", \"directive\"] },\n triggerTurn: { type: \"boolean\" },\n coalesce: { type: \"boolean\" },\n residency: residencySchema,\n runner: runProperties.runner,\n kernel: runProperties.kernel,\n model: runProperties.model,\n thinking: runProperties.thinking,\n tools: runProperties.tools,\n transport: runProperties.transport,\n timeoutMs: runProperties.timeoutMs,\n extensions: runProperties.extensions,\n requires: {\n type: \"array\",\n maxItems: 128,\n description: \"Exact Fabric provider.action refs committed before every actor run. Object entries may be optional.\",\n items: {\n oneOf: [\n { type: \"string\", minLength: 3, maxLength: 256 },\n {\n type: \"object\",\n properties: {\n ref: { type: \"string\", minLength: 3, maxLength: 256 },\n optional: { type: \"boolean\" },\n },\n required: [\"ref\"],\n additionalProperties: false,\n },\n ],\n },\n },\n validWhile: {\n type: \"object\",\n properties: { version: { const: 1 }, source: { type: \"string\" } },\n required: [\"version\", \"source\"],\n additionalProperties: false,\n },\n scope: {\n type: \"string\",\n enum: [\"session\", \"project\", \"global\"],\n description: \"session isolates the actor to the root Pi session; project shares it across sessions; global creates a non-live template.\",\n },\n },\n required: [\"name\", \"instructions\"],\n oneOf: [\n {\n properties: {\n delivery: { const: \"mailbox\" },\n triggerTurn: { const: false },\n },\n },\n {\n properties: {\n delivery: { const: \"nextTurn\" },\n triggerTurn: { const: false },\n },\n required: [\"delivery\"],\n },\n {\n properties: { delivery: { enum: [\"steer\", \"followUp\"] } },\n required: [\"delivery\", \"triggerTurn\"],\n },\n ],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"ask\",\n description: \"Send a message to a persistent actor through its live owner and wait for its next response. Optional model/thinking values apply only to this activation.\",\n inputSchema: {\n type: \"object\",\n properties: actorInvocationProperties,\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"tell\",\n description: \"Queue a message through a persistent actor's live owner without waiting. Optional model/thinking values apply only to this activation.\",\n inputSchema: {\n type: \"object\",\n properties: actorInvocationProperties,\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"steer\",\n description:\n \"Steer Main, a running one-shot agent between turns, or a persistent actor through its mailbox. The stable id alias main targets the root user-facing Pi session. Non-local targets route over the project mesh.\",\n inputSchema: {\n type: \"object\",\n properties: { id: { type: \"string\" }, message: { type: \"string\" }, data: {} },\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"followUp\",\n description:\n \"Queue a follow-up for Main or a running one-shot agent, or enqueue a persistent actor mailbox message. The stable id alias main targets the root user-facing Pi session. Non-local targets route over the project mesh.\",\n inputSchema: {\n type: \"object\",\n properties: { id: { type: \"string\" }, message: { type: \"string\" }, data: {} },\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setSteeringMode\",\n description:\n \"Set how queued steer messages are delivered to a running one-shot agent: all at once after the current turn, or one per turn (default). Local agent only.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n mode: { type: \"string\", enum: [\"all\", \"one-at-a-time\"] },\n },\n required: [\"id\", \"mode\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setFollowUpMode\",\n description:\n \"Set how queued follow-up messages are delivered to a one-shot agent: all when it finishes, or one per completion (default). Local agent only.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n mode: { type: \"string\", enum: [\"all\", \"one-at-a-time\"] },\n },\n required: [\"id\", \"mode\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"compact\",\n description:\n \"Request an advisory compaction of a running Pi-runner child agent's context at its next safe boundary (between its own turns), preserving the child's accumulated context. Rejected for Claude-runner children. The child pi core applies the compaction; Fabric only forwards the intent.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n instructions: {\n type: \"string\",\n description: \"Optional custom compaction instructions forwarded to the child pi\",\n },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"actorStatus\",\n description: \"Read one persistent actor's status\",\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"actors\",\n description:\n 'List persistent actors. Default scope \"project\" lists live actors in this Fabric session; scope \"global\" lists project-independent templates in the global registry.',\n inputSchema: {\n type: \"object\",\n properties: { scope: { type: \"string\", enum: [\"project\", \"global\"] } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"messages\",\n description: \"Read a persistent actor's bounded inbox and outbox history\",\n inputSchema: {\n type: \"object\",\n properties: { id: { type: \"string\" }, limit: { type: \"number\", minimum: 1 } },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"setModel\",\n description:\n \"Change or clear a persistent actor model binding. Session scope is the default; project scope explicitly pins the shared definition default.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n model: { type: \"string\" },\n scope: actorBindingScopeSchema,\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setThinking\",\n description:\n \"Change or clear a persistent actor reasoning-effort binding. Session scope is the default; project scope explicitly pins the shared definition default.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n thinking: runProperties.thinking,\n scope: actorBindingScopeSchema,\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setTools\",\n description:\n \"Replace a persistent actor's tool allowlist. Takes effect on its next queued message; an empty list disables optional tools.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n tools: runProperties.tools,\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"tools\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setEvents\",\n description: \"Replace a persistent actor's session-bound Pi and synthetic tool_error event subscriptions\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n events: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...FABRIC_ACTOR_HOST_EVENTS],\n },\n },\n },\n required: [\"id\", \"events\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setDeliveryPolicy\",\n description:\n \"Replace a project actor or global template delivery policy. steer/followUp require an explicit triggerTurn choice; mailbox/nextTurn require false.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n delivery: {\n type: \"string\",\n enum: [\"mailbox\", \"steer\", \"followUp\", \"nextTurn\"],\n },\n triggerTurn: { type: \"boolean\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"delivery\", \"triggerTurn\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"clearMessages\",\n description: \"Clear a persistent actor's recorded message history\",\n inputSchema: idSchema,\n risk: \"write\",\n },\n {\n name: \"remove\",\n description:\n 'Stop and remove a persistent actor. Default scope \"project\" removes a live project actor; scope \"global\" removes a project-independent template from the global registry.',\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setInstructions\",\n description:\n 'Replace an actor\\'s default instruction (its persona / system-prompt body). Default scope \"project\" edits a live project actor; scope \"global\" edits a project-independent template. Takes effect on the actor\\'s next queued message.',\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n instructions: { type: \"string\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"instructions\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"import\",\n description:\n \"Import a project-independent template from the global registry into the current project as a fresh live actor with no inherited history (no messages, session, or run logs). Identify the template by id or name; optionally rename the imported actor with \\\"as\\\" to avoid colliding with a live actor.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Template id or name (one of id/name required)\" },\n name: { type: \"string\", description: \"Template name (one of id/name required)\" },\n as: { type: \"string\", description: \"Optional new name for the imported live actor\" },\n },\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"export\",\n description:\n \"Export a live project actor's definition to the global registry as a project-independent template, without any history (no messages, session, or run logs). Throws on a name collision unless overwrite is true.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n overwrite: { type: \"boolean\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"write\",\n },\n {\n name: \"log\",\n description:\n \"Read an actor or agent run's LLM/agent log: the actor's session transcript (session.jsonl) and/or a retained run's event stream (events.jsonl: tool calls, model responses, usage). Actors retain their last runs so logs survive after success.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Actor ID/name or agent run ID\" },\n type: {\n type: \"string\",\n enum: [\"session\", \"run\", \"all\"],\n description:\n \"session = actor session transcript (default for actors); run = last retained run's events; all = both\",\n },\n lines: { type: \"number\", minimum: 1, description: \"Page line limit (default 200)\" },\n before: {\n type: \"number\",\n minimum: 0,\n description: \"Exclusive line cursor returned by a previous page to load older entries\",\n },\n runId: { type: \"string\", description: \"Specific retained run (default: actor's last run)\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"read\",\n },\n];\n", "import type { AgentRunRequest } from \"./types.js\";\nimport { isFabricThinking, normalizeThinkingBounds } from \"../thinking.js\";\nimport { aliasThinking, type FabricModelAliases } from \"../core/model-resolution.js\";\nimport { isFabricRunnerId } from \"./runner-registry.js\";\n\nconst stringArray = (value: unknown): string[] | undefined => Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === \"string\") : undefined;\nconst checkedKernel = (value: unknown): AgentRunRequest[\"kernel\"] => {\n if (value === undefined || value === \"inherit\" || value === \"typescript\" || value === \"python\") return value;\n throw new Error(`Invalid Fabric agent kernel: ${String(value)}`);\n};\n\nexport const normalizeAgentRunRequest = (\n args: Record<string, unknown>,\n defaults: {runner: NonNullable<AgentRunRequest[\"runner\"]>; model?: string; timeoutMs: number; inheritedModel?: {provider: string; id: string}; models?: {aliases?: FabricModelAliases}},\n options: {allowCwd?: boolean} = {},\n): AgentRunRequest => {\n const transport =\n args.transport === \"auto\" ||\n args.transport === \"process\" ||\n args.transport === \"tmux\" ||\n args.transport === \"screen\" ||\n args.transport === \"localterm\" ||\n args.transport === \"herdr\"\n ? args.transport\n : undefined;\n // An explicit call or actor level always wins; otherwise an alias can carry\n // the intended effort for the model it selects (e.g. a \"cheap\" alias that is\n // both cheaper and shallower), and the global agents.thinking default applies\n // last, inside the manager.\n const requestedModel =\n typeof args.model === \"string\"\n ? args.model\n : typeof defaults.model === \"string\"\n ? defaults.model\n : undefined;\n const thinking = isFabricThinking(args.thinking)\n ? args.thinking\n : aliasThinking(defaults.models?.aliases, requestedModel ?? \"\");\n const tools = stringArray(args.tools);\n const timeoutMs = typeof args.timeoutMs === \"number\" && Number.isFinite(args.timeoutMs) && args.timeoutMs > defaults.timeoutMs ? args.timeoutMs : undefined;\n if (args.runner !== undefined && !isFabricRunnerId(args.runner)) {\n throw new Error(`Invalid Fabric agent runner: ${JSON.stringify(args.runner)}`);\n }\n const runner = args.runner ?? defaults.runner;\n const inheritedModel =\n (runner === \"pi\" || runner === \"pi-durable\") && !defaults.model && defaults.inheritedModel\n ? `${defaults.inheritedModel.provider}/${defaults.inheritedModel.id}`\n : undefined;\n const kernel = checkedKernel(args.kernel);\n const thinkingBounds = args.thinkingBounds === undefined\n ? undefined\n : normalizeThinkingBounds(args.thinkingBounds, \"thinkingBounds\");\n if (args.recursive === true && args.extensions === false) {\n throw new Error(\"Recursive Fabric requires extensions enabled; omit recursive or extensions: false\");\n }\n return {\n task: String(args.task),\n runner,\n ...(kernel !== undefined ? { kernel } : {}),\n ...(typeof args.name === \"string\" ? { name: args.name } : {}),\n ...(transport ? { transport } : {}),\n ...(typeof args.model === \"string\"\n ? { model: args.model }\n : inheritedModel\n ? { model: inheritedModel }\n : {}),\n ...(typeof args.persona === \"string\" && args.persona.trim()\n ? { persona: args.persona.trim() }\n : {}),\n ...(thinking ? { thinking } : {}),\n ...(thinkingBounds ? { thinkingBounds } : {}),\n ...(tools ? { tools } : {}),\n ...(timeoutMs !== undefined ? { timeoutMs } : {}),\n ...(typeof args.extensions === \"boolean\"\n ? { extensions: args.extensions }\n : args.recursive === true ? { extensions: true } : {}),\n ...(typeof args.recursive === \"boolean\" ? { recursive: args.recursive } : {}),\n ...(options.allowCwd !== false && typeof args.cwd === \"string\" ? { cwd: args.cwd } : {}),\n ...(typeof args.worktree === \"boolean\" ? { worktree: args.worktree } : {}),\n ...(args.worktreeSetup !== undefined ? { worktreeSetup: args.worktreeSetup as string } : {}),\n // Shapes are checked fail-closed by the manager before launch.\n ...(args.readOnly !== undefined ? { readOnly: args.readOnly as boolean } : {}),\n ...(args.writableRoots !== undefined ? { writableRoots: args.writableRoots as string[] } : {}),\n ...(args.shell !== undefined ? { shell: args.shell as \"deny\" | \"unconfined\" } : {}),\n ...(args.scope !== undefined ? { scope: args.scope as NonNullable<AgentRunRequest[\"scope\"]> } : {}),\n ...(args.residency === \"session\" || args.residency === \"durable\"\n ? { residency: args.residency }\n : {}),\n ...(typeof args.persistSession === \"boolean\"\n ? { persistSession: args.persistSession }\n : {}),\n ...(typeof args.schema === \"object\" && args.schema !== null && !Array.isArray(args.schema)\n ? { schema: args.schema as Record<string, unknown> }\n : {}),\n ...(typeof args.systemPrompt === \"string\" && args.systemPrompt.trim()\n ? { systemPrompt: args.systemPrompt }\n : {}),\n };\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAM,mBAAmB;AAEzB,IAAM,gBAAgB;AAAA,EACpB,MAAM,EAAE,MAAM,UAAU,aAAa,4CAA4C;AAAA,EACjF,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,IACX,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM,CAAC,cAAc,UAAU,SAAS;AAAA,IACxC,aAAa;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,MAAM,CAAC,QAAQ,WAAW,QAAQ,UAAU,aAAa,OAAO;AAAA,EAClE;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,MAAM,CAAC,OAAO,WAAW,OAAO,UAAU,QAAQ,SAAS,KAAK;AAAA,EAClE;AAAA,EACA,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,YAAY;AAAA,MACV,KAAK,EAAE,MAAM,UAAU,MAAM,CAAC,OAAO,WAAW,OAAO,UAAU,QAAQ,SAAS,KAAK,EAAE;AAAA,MACzF,KAAK,EAAE,MAAM,UAAU,MAAM,CAAC,OAAO,WAAW,OAAO,UAAU,QAAQ,SAAS,KAAK,EAAE;AAAA,IAC3F;AAAA,IACA,sBAAsB;AAAA,IACtB,aAAa;AAAA,EACf;AAAA,EACA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AK,IAAI,IAAI,CAAC;AAAA,IACtF,GAAI,OAAO,KAAK,aAAa,YAAY,EAAE,UAAU,KAAK,SAAS,IAAI,CAAC;AAAA,IACxE,GAAI,KAAK,kBAAkB,SAAY,EAAE,eAAe,KAAK,cAAwB,IAAI,CAAC;AAAA;AAAA,IAE1F,GAAI,KAAK,aAAa,SAAY,EAAE,UAAU,KAAK,SAAoB,IAAI,CAAC;AAAA,IAC5E,GAAI,KAAK,kBAAkB,SAAY,EAAE,eAAe,KAAK,cAA0B,IAAI,CAAC;AAAA,IAC5F,GAAI,KAAK,UAAU,SAAY,EAAE,OAAO,KAAK,MAA+B,IAAI,CAAC;AAAA,IACjF,GAAI,KAAK,UAAU,SAAY,EAAE,OAAO,KAAK,MAA+C,IAAI,CAAC;AAAA,IACjG,GAAI,KAAK,cAAc,aAAa,KAAK,cAAc,YACnD,EAAE,WAAW,KAAK,UAAU,IAC5B,CAAC;AAAA,IACL,GAAI,OAAO,KAAK,mBAAmB,YAC/B,EAAE,gBAAgB,KAAK,eAAe,IACtC,CAAC;AAAA,IACL,GAAI,OAAO,KAAK,WAAW,YAAY,KAAK,WAAW,QAAQ,CAAC,MAAM,QAAQ,KAAK,MAAM,IACrF,EAAE,QAAQ,KAAK,OAAkC,IACjD,CAAC;AAAA,IACL,GAAI,OAAO,KAAK,iBAAiB,YAAY,KAAK,aAAa,KAAK,IAChE,EAAE,cAAc,KAAK,aAAa,IAClC,CAAC;AAAA,EACP;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -250,6 +250,16 @@ var clampCompactionRatioThreshold = (value) => Math.min(
|
|
|
250
250
|
MAX_COMPACTION_RATIO_THRESHOLD,
|
|
251
251
|
Math.max(MIN_COMPACTION_RATIO_THRESHOLD, value)
|
|
252
252
|
);
|
|
253
|
+
var DEFAULT_EXTRACTIVE_CONFIG = {
|
|
254
|
+
enabled: false,
|
|
255
|
+
provider: "typesafe",
|
|
256
|
+
model: "jev-latest",
|
|
257
|
+
maxViewBytes: 8192,
|
|
258
|
+
maxCandidates: 128,
|
|
259
|
+
maxSourceChars: 24e3,
|
|
260
|
+
maxEvaluationsPerTurn: 1,
|
|
261
|
+
timeoutMs: 3e3
|
|
262
|
+
};
|
|
253
263
|
var MAX_EXECUTOR_TIMEOUT_MS = 24 * 36e5;
|
|
254
264
|
var MIN_AGENT_TIMEOUT_MS = 1e3;
|
|
255
265
|
var MAX_AGENT_TIMEOUT_MS = 24 * 36e5;
|
|
@@ -268,6 +278,7 @@ var DEFAULT_FABRIC_CONFIG = {
|
|
|
268
278
|
cpython: { binary: "python3" },
|
|
269
279
|
jevFabric: { binary: "", home: "", timeoutMs: 36e5 },
|
|
270
280
|
runtime: "quickjs",
|
|
281
|
+
codemodeProfile: "additive",
|
|
271
282
|
timeoutMs: 12e4,
|
|
272
283
|
maxTimeoutMs: 9e5,
|
|
273
284
|
hostCallTimeouts: {},
|
|
@@ -312,7 +323,7 @@ var DEFAULT_FABRIC_CONFIG = {
|
|
|
312
323
|
},
|
|
313
324
|
agents: {
|
|
314
325
|
enabled: true,
|
|
315
|
-
runner: "pi",
|
|
326
|
+
runner: "pi-durable",
|
|
316
327
|
transport: "process",
|
|
317
328
|
claude: { binary: "claude" },
|
|
318
329
|
veda: { binary: "veda", backend: "agy", persona: "navigator-chat" },
|
|
@@ -391,6 +402,7 @@ var DEFAULT_FABRIC_CONFIG = {
|
|
|
391
402
|
aliases: {}
|
|
392
403
|
},
|
|
393
404
|
memory: {
|
|
405
|
+
extractive: { ...DEFAULT_EXTRACTIVE_CONFIG },
|
|
394
406
|
enabled: true,
|
|
395
407
|
maxSessions: 500,
|
|
396
408
|
maxEntryChars: 2e3,
|
|
@@ -557,6 +569,7 @@ var normalizeFabricConfig = (input) => {
|
|
|
557
569
|
const retention = objectValue(input.retention);
|
|
558
570
|
const mesh = objectValue(input.mesh);
|
|
559
571
|
const memory = objectValue(input.memory);
|
|
572
|
+
const extractive = objectValue(memory.extractive);
|
|
560
573
|
const memorySources = memorySourcesValue(memory.sources);
|
|
561
574
|
const entropy = objectValue(input.entropy);
|
|
562
575
|
const repairs = objectValue(input.repairs);
|
|
@@ -656,6 +669,7 @@ var normalizeFabricConfig = (input) => {
|
|
|
656
669
|
timeoutMs: boundedInteger(jevFabric.timeoutMs, DEFAULT_FABRIC_CONFIG.executor.jevFabric.timeoutMs, 1e3, MAX_EXECUTOR_TIMEOUT_MS)
|
|
657
670
|
},
|
|
658
671
|
runtime: executorRuntime,
|
|
672
|
+
codemodeProfile: executor.codemodeProfile === "native" ? "native" : "additive",
|
|
659
673
|
maxTimeoutMs: boundedInteger(
|
|
660
674
|
executor.maxTimeoutMs,
|
|
661
675
|
DEFAULT_FABRIC_CONFIG.executor.maxTimeoutMs,
|
|
@@ -994,6 +1008,16 @@ var normalizeFabricConfig = (input) => {
|
|
|
994
1008
|
aliases: normalizeModelAliases(modelsSection.aliases)
|
|
995
1009
|
},
|
|
996
1010
|
memory: {
|
|
1011
|
+
extractive: {
|
|
1012
|
+
enabled: booleanValue(extractive.enabled, false),
|
|
1013
|
+
provider: stringValue(extractive.provider) || DEFAULT_EXTRACTIVE_CONFIG.provider,
|
|
1014
|
+
model: stringValue(extractive.model) || DEFAULT_EXTRACTIVE_CONFIG.model,
|
|
1015
|
+
maxViewBytes: boundedInteger(extractive.maxViewBytes, 8192, 1024, 32768),
|
|
1016
|
+
maxCandidates: boundedInteger(extractive.maxCandidates, 128, 1, 256),
|
|
1017
|
+
maxSourceChars: boundedInteger(extractive.maxSourceChars, 24e3, 256, 1e5),
|
|
1018
|
+
maxEvaluationsPerTurn: boundedInteger(extractive.maxEvaluationsPerTurn, 1, 0, 1),
|
|
1019
|
+
timeoutMs: boundedInteger(extractive.timeoutMs, 3e3, 100, 1e4)
|
|
1020
|
+
},
|
|
997
1021
|
enabled: booleanValue(memory.enabled, DEFAULT_FABRIC_CONFIG.memory.enabled),
|
|
998
1022
|
...memoryIndexDir ? { indexDir: memoryIndexDir } : {},
|
|
999
1023
|
...memorySources ? { sources: memorySources } : {},
|
|
@@ -1327,6 +1351,7 @@ export {
|
|
|
1327
1351
|
MAX_COMPACTION_RATIO_THRESHOLD,
|
|
1328
1352
|
clampCompactionTokenThreshold,
|
|
1329
1353
|
clampCompactionRatioThreshold,
|
|
1354
|
+
DEFAULT_EXTRACTIVE_CONFIG,
|
|
1330
1355
|
MAX_EXECUTOR_TIMEOUT_MS,
|
|
1331
1356
|
MIN_AGENT_TIMEOUT_MS,
|
|
1332
1357
|
MAX_AGENT_TIMEOUT_MS,
|
|
@@ -1339,4 +1364,4 @@ export {
|
|
|
1339
1364
|
loadFabricConfig,
|
|
1340
1365
|
saveFabricConfig
|
|
1341
1366
|
};
|
|
1342
|
-
//# sourceMappingURL=chunk-
|
|
1367
|
+
//# sourceMappingURL=chunk-CZPQTISQ.js.map
|