@e4779/pi-fabric 0.109.4-fork.24 → 0.116.0-fork.26
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/THIRD_PARTY_NOTICES.md +7 -0
- package/dist/agents/completion-inbox.d.ts.map +1 -1
- package/dist/agents/handoff.d.ts +1 -1
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +8 -0
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/provider-bridge.d.ts +64 -0
- package/dist/agents/provider-bridge.d.ts.map +1 -0
- package/dist/agents/provider-bridge.js +117 -0
- package/dist/agents/provider-bridge.js.map +7 -0
- package/dist/agents/runner-registry.d.ts +3 -0
- package/dist/agents/runner-registry.d.ts.map +1 -1
- package/dist/agents/trace-context-request.d.ts +4 -0
- package/dist/agents/trace-context-request.d.ts.map +1 -0
- package/dist/agents/trace-context.d.ts +31 -0
- package/dist/agents/trace-context.d.ts.map +1 -0
- package/dist/agents/types.d.ts +13 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents.js +5 -5
- package/dist/audit/details.d.ts +5 -2
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/capture/interceptor.d.ts.map +1 -1
- package/dist/chunks/{chunk-WHBJDTCR.js → chunk-4GGBND7V.js} +37 -10
- package/dist/chunks/chunk-4GGBND7V.js.map +7 -0
- package/dist/chunks/{chunk-N2VKKA7O.js → chunk-4GNFBZPR.js} +2 -2
- package/dist/chunks/{chunk-J2HUD36Z.js → chunk-5X35KXBV.js} +14 -2
- package/dist/chunks/{chunk-J2HUD36Z.js.map → chunk-5X35KXBV.js.map} +2 -2
- package/dist/chunks/{chunk-K7LQIEJY.js → chunk-6EVAHJAR.js} +5 -5
- package/dist/chunks/{chunk-ST36EYHN.js → chunk-6QVQXGMR.js} +1 -1
- package/dist/chunks/chunk-6QVQXGMR.js.map +7 -0
- package/dist/chunks/chunk-7C5IEIQK.js +157 -0
- package/dist/chunks/chunk-7C5IEIQK.js.map +7 -0
- package/dist/chunks/{chunk-LQSICKDK.js → chunk-A5XF3ZPJ.js} +18 -1
- package/dist/chunks/chunk-A5XF3ZPJ.js.map +7 -0
- package/dist/chunks/{chunk-CZPQTISQ.js → chunk-BQWJ5ZR7.js} +10 -6
- package/dist/chunks/chunk-BQWJ5ZR7.js.map +7 -0
- package/dist/chunks/{chunk-JJQECUUA.js → chunk-DONS3EZH.js} +2 -2
- package/dist/chunks/{chunk-W5CHVJBR.js → chunk-EQYQICUY.js} +54 -8
- package/dist/chunks/chunk-EQYQICUY.js.map +7 -0
- package/dist/chunks/{chunk-67RXNJLG.js → chunk-HITKWKYD.js} +6 -4
- package/dist/chunks/chunk-HITKWKYD.js.map +7 -0
- package/dist/chunks/{chunk-COQPGIBO.js → chunk-HZGQ7XYM.js} +2 -2
- package/dist/chunks/chunk-IQXNJNDI.js +854 -0
- package/dist/chunks/chunk-IQXNJNDI.js.map +7 -0
- package/dist/chunks/{chunk-7OFAO4HK.js → chunk-MOJBW5X2.js} +41 -2
- package/dist/chunks/chunk-MOJBW5X2.js.map +7 -0
- package/dist/chunks/{chunk-ACGEYOXM.js → chunk-O7IREHJI.js} +102 -44
- package/dist/chunks/chunk-O7IREHJI.js.map +7 -0
- package/dist/chunks/{chunk-RG2VFKR3.js → chunk-ODYU3IJU.js} +80 -17
- package/dist/chunks/chunk-ODYU3IJU.js.map +7 -0
- package/dist/chunks/{chunk-PXAICAUT.js → chunk-PBDDXBHY.js} +2 -1
- package/dist/chunks/chunk-PBDDXBHY.js.map +7 -0
- package/dist/chunks/{chunk-B54Z662X.js → chunk-PTZ5DKAB.js} +25 -5
- package/dist/chunks/chunk-PTZ5DKAB.js.map +7 -0
- package/dist/chunks/{chunk-RUO6L7RM.js → chunk-Q2JQ3RYZ.js} +3 -1
- package/dist/chunks/chunk-Q2JQ3RYZ.js.map +7 -0
- package/dist/chunks/{chunk-YKT5VLLQ.js → chunk-QCCPR3U5.js} +3 -3
- package/dist/chunks/{chunk-GYPDGW27.js → chunk-QGP7AY2R.js} +4 -2
- package/dist/chunks/{chunk-GYPDGW27.js.map → chunk-QGP7AY2R.js.map} +2 -2
- package/dist/chunks/chunk-QRN433TI.js +19 -0
- package/dist/chunks/chunk-QRN433TI.js.map +7 -0
- package/dist/chunks/{chunk-CXTTLBUV.js → chunk-R2XQ6AHT.js} +2 -2
- package/dist/chunks/{chunk-DV2JZSCI.js → chunk-SPCJXN4K.js} +14 -4
- package/dist/chunks/{chunk-DV2JZSCI.js.map → chunk-SPCJXN4K.js.map} +2 -2
- package/dist/chunks/{chunk-I5ENWRUJ.js → chunk-TNPZBMYC.js} +31 -7
- package/dist/chunks/chunk-TNPZBMYC.js.map +7 -0
- package/dist/chunks/{chunk-5SU3YXBS.js → chunk-UGYCAG6O.js} +1 -1
- package/dist/chunks/{chunk-5SU3YXBS.js.map → chunk-UGYCAG6O.js.map} +1 -1
- package/dist/chunks/{chunk-QSXZPS7F.js → chunk-V2IV4LYW.js} +2 -2
- package/dist/chunks/chunk-WJJXODAB.js +82 -0
- package/dist/chunks/chunk-WJJXODAB.js.map +7 -0
- package/dist/chunks/{chunk-RFOQPXKN.js → chunk-WQ6LC2KK.js} +2 -2
- package/dist/chunks/{chunk-3DUKKQHN.js → chunk-ZQMBS5SH.js} +5 -5
- package/dist/commands/fabric.d.ts +1 -1
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/hook.d.ts +1 -1
- package/dist/compaction/hook.d.ts.map +1 -1
- package/dist/compaction/hook.js +1 -1
- package/dist/compaction/owner.js +2 -2
- package/dist/components/configuration.js +4 -4
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +3 -3
- package/dist/core/action-result.d.ts +10 -0
- package/dist/core/action-result.d.ts.map +1 -1
- package/dist/core/agent-dir.d.ts +1 -0
- package/dist/core/agent-dir.d.ts.map +1 -1
- package/dist/core/fabric-state-paths.d.ts.map +1 -1
- package/dist/core/host-sdk-runtime.d.ts +8 -0
- package/dist/core/host-sdk-runtime.d.ts.map +1 -0
- package/dist/core/host-sdk.d.ts +28 -0
- package/dist/core/host-sdk.d.ts.map +1 -0
- package/dist/core/host-sdk.js +11 -0
- package/dist/core/host-sdk.js.map +7 -0
- package/dist/core/session-context.d.ts +5 -0
- package/dist/core/session-context.d.ts.map +1 -1
- package/dist/core/shell-inbox.d.ts.map +1 -1
- package/dist/core/shell-jobs.d.ts +2 -0
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/core/tool-ownership.d.ts.map +1 -1
- package/dist/core/tool-result-proxy.d.ts +2 -0
- package/dist/core/tool-result-proxy.d.ts.map +1 -1
- package/dist/durable/agent.d.ts +6 -0
- package/dist/durable/agent.d.ts.map +1 -1
- package/dist/durable/worker-host.d.ts.map +1 -1
- package/dist/durable/worker-host.js +48 -10
- package/dist/durable/worker-host.js.map +2 -2
- package/dist/durable.js +2 -2
- package/dist/durable.js.map +1 -1
- package/dist/extension-bootstrap.js +11 -11
- package/dist/fabric-runtime-state.d.ts +2 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +343 -83
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts +2 -0
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/jev/auth.d.ts +2 -0
- package/dist/jev/auth.d.ts.map +1 -1
- package/dist/jev/client.d.ts.map +1 -1
- package/dist/jev/client.js +3 -3
- package/dist/jev/config.d.ts +5 -0
- package/dist/jev/config.d.ts.map +1 -1
- package/dist/jev/decision-profiles.d.ts +8 -0
- package/dist/jev/decision-profiles.d.ts.map +1 -0
- package/dist/jev/decision-schema.d.ts +35 -0
- package/dist/jev/decision-schema.d.ts.map +1 -0
- package/dist/jev/decision-types.d.ts +139 -0
- package/dist/jev/decision-types.d.ts.map +1 -0
- package/dist/jev/decisions.d.ts +27 -0
- package/dist/jev/decisions.d.ts.map +1 -0
- package/dist/jev/guest-types.d.ts +1 -1
- package/dist/jev/guest-types.d.ts.map +1 -1
- package/dist/jev/manager.d.ts +7 -0
- package/dist/jev/manager.d.ts.map +1 -1
- package/dist/jev/model-key.d.ts +3 -2
- package/dist/jev/model-key.d.ts.map +1 -1
- package/dist/jev/observation.js +4 -4
- package/dist/jev/routes.d.ts +11 -1
- package/dist/jev/routes.d.ts.map +1 -1
- package/dist/jev/types.d.ts +3 -2
- package/dist/jev/types.d.ts.map +1 -1
- package/dist/jev/validation.d.ts +34 -0
- package/dist/jev/validation.d.ts.map +1 -1
- package/dist/jev-fabric/resolve.d.ts +4 -0
- package/dist/jev-fabric/resolve.d.ts.map +1 -1
- package/dist/jev-fabric/resolve.js +1 -0
- package/dist/jev-fabric/resolve.js.map +2 -2
- package/dist/jev-fabric/serve.d.ts +5 -15
- package/dist/jev-fabric/serve.d.ts.map +1 -1
- package/dist/jev-fabric/serve.js +87 -56
- package/dist/jev-fabric/serve.js.map +2 -2
- package/dist/jev.d.ts +6 -2
- package/dist/jev.d.ts.map +1 -1
- package/dist/jev.js +33 -11
- package/dist/memory/extractive-history.d.ts +3 -0
- package/dist/memory/extractive-history.d.ts.map +1 -1
- package/dist/memory/extractive-history.js +36 -7
- package/dist/memory/extractive-history.js.map +3 -3
- package/dist/memory/extractive-index.d.ts.map +1 -1
- package/dist/protocol.d.ts +3 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +3 -1
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/captured-tools-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.d.ts +2 -0
- package/dist/providers/jev-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +8 -8
- package/dist/providers/pi-bash-cwd.d.ts +1 -1
- package/dist/providers/pi-bash-cwd.d.ts.map +1 -1
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/write-preview.d.ts +1 -1
- package/dist/providers/write-preview.d.ts.map +1 -1
- package/dist/residency/host.js +10 -8
- package/dist/residency/pi-entry.js +10 -8
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/runners.js +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- 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/monty-runtime.js +3 -3
- package/dist/runtime/node-process-runtime.js +3 -3
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +2 -2
- package/dist/runtime/typescript-kernel.js +5 -5
- package/dist/storage/retention.d.ts.map +1 -1
- package/dist/topology/peer-presence.d.ts +56 -0
- package/dist/topology/peer-presence.d.ts.map +1 -0
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.js +2 -2
- package/dist/ui/conversation-host.js +1 -1
- package/dist/ui/conversation-native-reader.js +1 -1
- package/dist/ui/conversation.js +6 -6
- package/dist/ui/dashboard.js +3 -3
- package/dist/ui/settings-decision-profiles.d.ts +24 -0
- package/dist/ui/settings-decision-profiles.d.ts.map +1 -0
- package/dist/ui/settings-section-context.d.ts +1 -1
- package/dist/ui/settings-section-context.d.ts.map +1 -1
- package/dist/ui/settings-sections-agents.d.ts.map +1 -1
- package/dist/ui/settings-sections-decisions.d.ts +4 -0
- package/dist/ui/settings-sections-decisions.d.ts.map +1 -0
- package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -1
- package/dist/ui/settings-sections.d.ts +1 -1
- package/dist/ui/settings-sections.d.ts.map +1 -1
- package/dist/ui/settings-submenus.d.ts +3 -1
- package/dist/ui/settings-submenus.d.ts.map +1 -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 +224 -45
- package/dist/ui/settings.js.map +4 -4
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +15 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker.js +11 -1
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +49 -0
- package/docs/architecture.md +1 -1
- package/docs/audit-trace.md +3 -1
- package/docs/background-tasks.md +4 -0
- package/docs/compaction.md +1 -1
- package/docs/configuration.md +91 -8
- package/docs/decision-profiles.schema.json +52 -0
- package/docs/decision-test-coverage.md +77 -0
- package/docs/durable-pi.md +9 -2
- package/docs/extractive-history.md +17 -2
- package/docs/jev-decisions.md +150 -0
- package/docs/jev.md +18 -5
- package/docs/prompt-cache.md +1 -1
- package/docs/providers.md +4 -1
- package/node_modules/pi-coralbricks-provider/LICENSE +21 -0
- package/node_modules/pi-coralbricks-provider/README.md +306 -0
- package/node_modules/pi-coralbricks-provider/auth.ts +30 -0
- package/node_modules/pi-coralbricks-provider/custom-models.json +1 -0
- package/node_modules/pi-coralbricks-provider/deprecated-models.json +1 -0
- package/node_modules/pi-coralbricks-provider/guard.ts +155 -0
- package/node_modules/pi-coralbricks-provider/index.ts +662 -0
- package/node_modules/pi-coralbricks-provider/models.json +88 -0
- package/node_modules/pi-coralbricks-provider/package.json +74 -0
- package/node_modules/pi-coralbricks-provider/park.ts +122 -0
- package/node_modules/pi-coralbricks-provider/patch.json +34 -0
- package/node_modules/pi-coralbricks-provider/scripts/update-models.js +658 -0
- package/node_modules/pi-coralbricks-provider/settings.ts +143 -0
- package/node_modules/pi-coralbricks-provider/sync-policy.ts +309 -0
- package/package.json +18 -13
- package/skillsets/python/fabric-exec/SKILL.md +1 -1
- package/skillsets/python/fabric-exec/references/agents.md +1 -1
- package/skillsets/python/fabric-foreman/SKILL.md +1 -1
- package/skillsets/python/fabric-jev/SKILL.md +2 -2
- package/skillsets/typescript/fabric-exec/SKILL.md +1 -1
- package/skillsets/typescript/fabric-exec/references/agents.md +1 -0
- package/skillsets/typescript/fabric-foreman/SKILL.md +1 -1
- package/skillsets/typescript/fabric-jev/SKILL.md +2 -2
- package/dist/chunks/chunk-67RXNJLG.js.map +0 -7
- package/dist/chunks/chunk-7OFAO4HK.js.map +0 -7
- package/dist/chunks/chunk-ACGEYOXM.js.map +0 -7
- package/dist/chunks/chunk-B54Z662X.js.map +0 -7
- package/dist/chunks/chunk-CZPQTISQ.js.map +0 -7
- package/dist/chunks/chunk-I5ENWRUJ.js.map +0 -7
- package/dist/chunks/chunk-IAFI4A2I.js +0 -92
- package/dist/chunks/chunk-IAFI4A2I.js.map +0 -7
- package/dist/chunks/chunk-LQSICKDK.js.map +0 -7
- package/dist/chunks/chunk-PXAICAUT.js.map +0 -7
- package/dist/chunks/chunk-QSL5UXNW.js +0 -515
- package/dist/chunks/chunk-QSL5UXNW.js.map +0 -7
- package/dist/chunks/chunk-RG2VFKR3.js.map +0 -7
- package/dist/chunks/chunk-RUO6L7RM.js.map +0 -7
- package/dist/chunks/chunk-ST36EYHN.js.map +0 -7
- package/dist/chunks/chunk-W5CHVJBR.js.map +0 -7
- package/dist/chunks/chunk-WHBJDTCR.js.map +0 -7
- /package/dist/chunks/{chunk-N2VKKA7O.js.map → chunk-4GNFBZPR.js.map} +0 -0
- /package/dist/chunks/{chunk-K7LQIEJY.js.map → chunk-6EVAHJAR.js.map} +0 -0
- /package/dist/chunks/{chunk-JJQECUUA.js.map → chunk-DONS3EZH.js.map} +0 -0
- /package/dist/chunks/{chunk-COQPGIBO.js.map → chunk-HZGQ7XYM.js.map} +0 -0
- /package/dist/chunks/{chunk-YKT5VLLQ.js.map → chunk-QCCPR3U5.js.map} +0 -0
- /package/dist/chunks/{chunk-CXTTLBUV.js.map → chunk-R2XQ6AHT.js.map} +0 -0
- /package/dist/chunks/{chunk-QSXZPS7F.js.map → chunk-V2IV4LYW.js.map} +0 -0
- /package/dist/chunks/{chunk-RFOQPXKN.js.map → chunk-WQ6LC2KK.js.map} +0 -0
- /package/dist/chunks/{chunk-3DUKKQHN.js.map → chunk-ZQMBS5SH.js.map} +0 -0
|
@@ -28,6 +28,9 @@ import {
|
|
|
28
28
|
safeTerminalText,
|
|
29
29
|
singleCallProgressLine
|
|
30
30
|
} from "./chunk-U2UBUKNQ.js";
|
|
31
|
+
import {
|
|
32
|
+
FabricModelSelector
|
|
33
|
+
} from "./chunk-J7ZQERKA.js";
|
|
31
34
|
import {
|
|
32
35
|
configureHighlighting,
|
|
33
36
|
highlightCode,
|
|
@@ -38,9 +41,6 @@ import {
|
|
|
38
41
|
isActiveStatus,
|
|
39
42
|
orderAgentsByCreation
|
|
40
43
|
} from "./chunk-UTOBAZ5T.js";
|
|
41
|
-
import {
|
|
42
|
-
FabricModelSelector
|
|
43
|
-
} from "./chunk-J7ZQERKA.js";
|
|
44
44
|
import {
|
|
45
45
|
buildModelSource
|
|
46
46
|
} from "./chunk-CQFP2RCP.js";
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
resolveFabricIdentity,
|
|
84
84
|
setModelSafely,
|
|
85
85
|
withTrajectoryRearmDirective
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-QGP7AY2R.js";
|
|
87
87
|
import {
|
|
88
88
|
AgentTranscriptReader,
|
|
89
89
|
countNewlines,
|
|
@@ -107,19 +107,19 @@ import {
|
|
|
107
107
|
readFabricPrewalkRequestV1,
|
|
108
108
|
readFabricProviderWithdrawalV1,
|
|
109
109
|
readFabricToolPlacementRequestV1
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-Q2JQ3RYZ.js";
|
|
111
111
|
import {
|
|
112
112
|
awaitPeerSettle,
|
|
113
113
|
buildPeerCards,
|
|
114
114
|
readChildToolAllowlist
|
|
115
115
|
} from "./chunk-PYFJW3HC.js";
|
|
116
|
+
import {
|
|
117
|
+
resolveAgentDir
|
|
118
|
+
} from "./chunk-PBDDXBHY.js";
|
|
116
119
|
import {
|
|
117
120
|
closeScratch,
|
|
118
121
|
createScratch
|
|
119
122
|
} from "./chunk-5XBYFSI5.js";
|
|
120
|
-
import {
|
|
121
|
-
resolveAgentDir
|
|
122
|
-
} from "./chunk-PXAICAUT.js";
|
|
123
123
|
import {
|
|
124
124
|
DEFAULT_FABRIC_CONFIG,
|
|
125
125
|
NO_FOREGROUND,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
loadFabricConfigForScope,
|
|
130
130
|
resolveForegroundTools,
|
|
131
131
|
saveFabricConfig
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-BQWJ5ZR7.js";
|
|
133
133
|
import {
|
|
134
134
|
defaultCodePreviewSettings
|
|
135
135
|
} from "./chunk-OKOHRXGF.js";
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
fabricExecTitleHintCached,
|
|
139
139
|
normalizeRunDisplay,
|
|
140
140
|
registerCompactionHook
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-TNPZBMYC.js";
|
|
142
142
|
import {
|
|
143
143
|
fabricWriteBindings
|
|
144
144
|
} from "./chunk-SZUXWOO7.js";
|
|
@@ -155,12 +155,12 @@ import {
|
|
|
155
155
|
} from "./chunk-V73NIH6B.js";
|
|
156
156
|
import {
|
|
157
157
|
registerJevAuth
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-5X35KXBV.js";
|
|
159
159
|
import {
|
|
160
160
|
ApprovalController,
|
|
161
161
|
FabricAutoApprovalClassifier,
|
|
162
162
|
FabricSessionApprovals
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-QCCPR3U5.js";
|
|
164
164
|
import {
|
|
165
165
|
getActiveRepairCompiler,
|
|
166
166
|
setActiveCompiledSurface
|
|
@@ -180,6 +180,7 @@ var serializedBytes = (value) => Buffer.byteLength(JSON.stringify(value), "utf8"
|
|
|
180
180
|
var cloneTrace = (trace) => structuredClone(trace);
|
|
181
181
|
var persistableAudit = (audit) => structuredClone({
|
|
182
182
|
ref: audit.ref,
|
|
183
|
+
...audit.nestedToolCallId !== void 0 ? { nestedToolCallId: audit.nestedToolCallId } : {},
|
|
183
184
|
...audit.tool !== void 0 ? { tool: audit.tool } : {},
|
|
184
185
|
...audit.provider !== void 0 ? { provider: audit.provider } : {},
|
|
185
186
|
...audit.success !== void 0 ? { success: audit.success } : {},
|
|
@@ -234,6 +235,7 @@ var legacyAudit = (value) => {
|
|
|
234
235
|
if (!isRecord(value) || typeof value.ref !== "string") return void 0;
|
|
235
236
|
return {
|
|
236
237
|
ref: value.ref,
|
|
238
|
+
...typeof value.nestedToolCallId === "string" ? { nestedToolCallId: value.nestedToolCallId } : {},
|
|
237
239
|
...typeof value.tool === "string" ? { tool: value.tool } : {},
|
|
238
240
|
...typeof value.provider === "string" ? { provider: value.provider } : {},
|
|
239
241
|
...typeof value.success === "boolean" ? { success: value.success } : {},
|
|
@@ -561,6 +563,7 @@ import { createRequire } from "node:module";
|
|
|
561
563
|
import path from "node:path";
|
|
562
564
|
import { pathToFileURL } from "node:url";
|
|
563
565
|
var HUB_SYMBOL = Symbol.for("pi-fabric.registered-tool-capture.v1");
|
|
566
|
+
var HOST_RUNNERS_SYMBOL = Symbol.for("pi-fabric.host-extension-runners.v1");
|
|
564
567
|
var ANCHOR_SYMBOL = Symbol.for("pi-fabric.registered-tool-anchor.v1");
|
|
565
568
|
var definitionDelegatesTo = (definition, target) => {
|
|
566
569
|
let current = definition;
|
|
@@ -674,23 +677,49 @@ var entryRealmPackageRoot = () => {
|
|
|
674
677
|
}
|
|
675
678
|
return void 0;
|
|
676
679
|
};
|
|
680
|
+
var realPath = (file) => {
|
|
681
|
+
try {
|
|
682
|
+
return realpathSync(file);
|
|
683
|
+
} catch {
|
|
684
|
+
return file;
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
var isWithin = (directory, file) => {
|
|
688
|
+
const relative = path.relative(directory, file);
|
|
689
|
+
return relative !== "" && !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
690
|
+
};
|
|
691
|
+
var exportedExtensionRunner = async (entry) => {
|
|
692
|
+
try {
|
|
693
|
+
const module = await import(pathToFileURL(entry).href);
|
|
694
|
+
return isExtensionRunnerConstructor(module.ExtensionRunner) ? [module.ExtensionRunner] : [];
|
|
695
|
+
} catch {
|
|
696
|
+
return [];
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
var packageExtensionRunnerConstructors = async (packageRoot, entry) => {
|
|
700
|
+
const distDirectory = path.join(packageRoot, "dist");
|
|
701
|
+
const bundleDirectory = path.join(distDirectory, "bundle");
|
|
702
|
+
if (entry && isWithin(bundleDirectory, entry)) {
|
|
703
|
+
const bundled = await exportedExtensionRunner(path.join(bundleDirectory, "index.js"));
|
|
704
|
+
return bundled.length > 0 ? bundled : bundleExtensionRunnerConstructors(bundleDirectory);
|
|
705
|
+
}
|
|
706
|
+
const unbundled = await exportedExtensionRunner(path.join(distDirectory, "index.js"));
|
|
707
|
+
if (entry && isWithin(distDirectory, entry)) return unbundled;
|
|
708
|
+
return [...unbundled, ...await bundleExtensionRunnerConstructors(bundleDirectory)];
|
|
709
|
+
};
|
|
677
710
|
var extensionRunnerConstructors = async () => {
|
|
678
711
|
const constructors = /* @__PURE__ */ new Set();
|
|
712
|
+
const advertised = globalThis[HOST_RUNNERS_SYMBOL];
|
|
713
|
+
for (const Runner of advertised instanceof Set ? advertised : []) {
|
|
714
|
+
if (isExtensionRunnerConstructor(Runner)) constructors.add(Runner);
|
|
715
|
+
}
|
|
716
|
+
if (constructors.size > 0) return [...constructors];
|
|
679
717
|
const packageRoots = new Set(
|
|
680
|
-
[process.env.PI_PACKAGE_DIR, hostPackageRoot(), entryRealmPackageRoot()].filter(
|
|
681
|
-
(root) => typeof root === "string" && Boolean(root)
|
|
682
|
-
)
|
|
718
|
+
[process.env.PI_PACKAGE_DIR, hostPackageRoot(), entryRealmPackageRoot()].filter((root) => typeof root === "string" && Boolean(root)).map(realPath)
|
|
683
719
|
);
|
|
720
|
+
const entry = process.argv[1] ? realPath(process.argv[1]) : void 0;
|
|
684
721
|
for (const packageRoot of packageRoots) {
|
|
685
|
-
|
|
686
|
-
const hostEntry = path.join(packageRoot, "dist", "index.js");
|
|
687
|
-
const hostModule = await import(pathToFileURL(hostEntry).href);
|
|
688
|
-
if (hostModule.ExtensionRunner) constructors.add(hostModule.ExtensionRunner);
|
|
689
|
-
} catch {
|
|
690
|
-
}
|
|
691
|
-
for (const Runner of await bundleExtensionRunnerConstructors(
|
|
692
|
-
path.join(packageRoot, "dist", "bundle")
|
|
693
|
-
)) {
|
|
722
|
+
for (const Runner of await packageExtensionRunnerConstructors(packageRoot, entry)) {
|
|
694
723
|
constructors.add(Runner);
|
|
695
724
|
}
|
|
696
725
|
}
|
|
@@ -742,9 +771,6 @@ var installRegisteredToolCapture = async (options) => {
|
|
|
742
771
|
};
|
|
743
772
|
};
|
|
744
773
|
|
|
745
|
-
// src/commands/fabric.ts
|
|
746
|
-
import "@earendil-works/pi-coding-agent";
|
|
747
|
-
|
|
748
774
|
// src/prewalk/arm.ts
|
|
749
775
|
var armFabricPrewalkSession = async (state, context, pi, input) => {
|
|
750
776
|
const { prewalk } = state.config;
|
|
@@ -2028,7 +2054,25 @@ var unregisteredRunnerNotice = (runner, registered) => {
|
|
|
2028
2054
|
|
|
2029
2055
|
// src/core/tool-ownership.ts
|
|
2030
2056
|
import path3 from "node:path";
|
|
2031
|
-
var fabricToolLoadout = (loadout, exclusive, foreground = []) =>
|
|
2057
|
+
var fabricToolLoadout = (loadout, exclusive, foreground = []) => {
|
|
2058
|
+
if (!exclusive) return void 0;
|
|
2059
|
+
const hiddenDeclarations = loadout.registered.map((tool) => tool.name).filter((name) => name !== "fabric_exec" && !foreground.includes(name));
|
|
2060
|
+
const hidden = new Set(hiddenDeclarations);
|
|
2061
|
+
const guidelines = loadout.callable.flatMap((tool) => {
|
|
2062
|
+
const rules = typeof loadout.getPromptGuidelines === "function" ? loadout.getPromptGuidelines(tool.name) : [];
|
|
2063
|
+
return hidden.has(tool.name) && rules.length > 0 ? [`${tool.name}:`, ...rules.map((rule) => `- ${rule}`)] : [];
|
|
2064
|
+
});
|
|
2065
|
+
const fabric = loadout.declared.find((tool) => tool.name === "fabric_exec");
|
|
2066
|
+
return {
|
|
2067
|
+
hiddenDeclarations,
|
|
2068
|
+
...fabric && guidelines.length > 0 ? { descriptions: {
|
|
2069
|
+
fabric_exec: `${fabric.description}
|
|
2070
|
+
|
|
2071
|
+
Guidelines for tools called inside fabric_exec:
|
|
2072
|
+
${guidelines.join("\n")}`
|
|
2073
|
+
} } : {}
|
|
2074
|
+
};
|
|
2075
|
+
};
|
|
2032
2076
|
var fabricToolPlacement = (input) => {
|
|
2033
2077
|
const active = new Set(input.active);
|
|
2034
2078
|
const exclusive = input.mode !== "orchestration";
|
|
@@ -2044,7 +2088,16 @@ var fabricToolPlacement = (input) => {
|
|
|
2044
2088
|
return { version: 1, mode: input.mode, tools, ...programCallable.length > 0 ? { programCallable } : {} };
|
|
2045
2089
|
};
|
|
2046
2090
|
var fabricModelContext = (messages, tools) => {
|
|
2047
|
-
const
|
|
2091
|
+
const effective = /* @__PURE__ */ new Map();
|
|
2092
|
+
for (const message of messages) {
|
|
2093
|
+
if (message.role !== "system") continue;
|
|
2094
|
+
if ("replace" in message && message.replace === true) effective.clear();
|
|
2095
|
+
for (const tool of message.toolsAdded ?? []) effective.set(tool.name, tool.description);
|
|
2096
|
+
}
|
|
2097
|
+
const declared = (Array.isArray(tools) ? [...tools] : [tools]).map((tool) => ({
|
|
2098
|
+
...tool,
|
|
2099
|
+
description: effective.get(tool.name) ?? tool.description
|
|
2100
|
+
}));
|
|
2048
2101
|
let first = true;
|
|
2049
2102
|
return messages.map((message) => {
|
|
2050
2103
|
if (message.role !== "system") return message;
|
|
@@ -3845,6 +3898,16 @@ var FabricState = class {
|
|
|
3845
3898
|
this.#externalComponents.set(component.name, component);
|
|
3846
3899
|
this.#current()?.registerExternalComponent(component, options);
|
|
3847
3900
|
}
|
|
3901
|
+
/** Apply only the decision selector; existing program snapshots and policy stay intact. */
|
|
3902
|
+
setDecisionProfile(profile) {
|
|
3903
|
+
const profiles = this.config.jev.decisionProfiles?.profiles;
|
|
3904
|
+
if (profile !== void 0 && profile !== null && (typeof profile !== "string" || !/^[A-Za-z0-9_.-]{1,128}$/.test(profile) || ["__proto__", "prototype", "constructor"].includes(profile) || !profiles || !Object.hasOwn(profiles, profile))) {
|
|
3905
|
+
throw new Error("Decision profile must name a configured profile or use document default");
|
|
3906
|
+
}
|
|
3907
|
+
this.#runtime?.setDecisionProfile(profile);
|
|
3908
|
+
if (profile === void 0) delete this.config.jev.decisionProfile;
|
|
3909
|
+
else this.config.jev.decisionProfile = profile;
|
|
3910
|
+
}
|
|
3848
3911
|
reloadConfig(context) {
|
|
3849
3912
|
const next = this.#managedHost?.config() ?? loadFabricConfig({
|
|
3850
3913
|
cwd: context.cwd,
|
|
@@ -4296,7 +4359,6 @@ var piHostCompatibilityWarning = (version = detectPiHostVersion()) => {
|
|
|
4296
4359
|
|
|
4297
4360
|
// src/ui/controller.ts
|
|
4298
4361
|
import path9 from "node:path";
|
|
4299
|
-
import * as piConversationHost from "@earendil-works/pi-coding-agent";
|
|
4300
4362
|
|
|
4301
4363
|
// src/ui/snapshot.ts
|
|
4302
4364
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -5019,9 +5081,10 @@ var FabricUiController = class {
|
|
|
5019
5081
|
this.#conversationOpen = true;
|
|
5020
5082
|
const epoch = this.#epoch;
|
|
5021
5083
|
try {
|
|
5022
|
-
const { initializeConversationHost } = await import("../ui/conversation-host.js");
|
|
5084
|
+
const [{ initializeConversationHost }, { loadHostSdk }] = await Promise.all([import("../ui/conversation-host.js"), import("../core/host-sdk.js")]);
|
|
5085
|
+
const conversationHost = await loadHostSdk();
|
|
5023
5086
|
if (epoch !== this.#epoch) return;
|
|
5024
|
-
initializeConversationHost(
|
|
5087
|
+
initializeConversationHost(conversationHost);
|
|
5025
5088
|
const [{ FabricConversationView, FabricConversationState }, { conversationTargets, resolveConversationTarget }, { readConversationAppearance }, { NativeConversationReader }, { imageSafeCustom }] = await Promise.all([import("../ui/conversation.js"), import("../ui/conversation-targets.js"), import("../ui/conversation-chrome.js"), import("../ui/conversation-native-reader.js"), import("../ui/image-overlays.js")]);
|
|
5026
5089
|
if (epoch !== this.#epoch) return;
|
|
5027
5090
|
this.#refresh();
|
|
@@ -5869,7 +5932,10 @@ function createFabricExtension(entryUrl) {
|
|
|
5869
5932
|
const fabricToolLifecycle = new FabricToolLifecycle(
|
|
5870
5933
|
() => ownsFabricToolSource(pi.getAllTools(), FABRIC_EXTENSION_ENTRY_PATH),
|
|
5871
5934
|
() => state.initialized ? state.execution.authorizer : void 0,
|
|
5872
|
-
|
|
5935
|
+
// Approval needs only bootstrapped config and session grants, not the lazy
|
|
5936
|
+
// runtime: gating on activation let direct calls skip policy until the
|
|
5937
|
+
// first fabric_exec, then deny the same call afterwards.
|
|
5938
|
+
() => state.bootstrapped ? directToolApproval : void 0
|
|
5873
5939
|
);
|
|
5874
5940
|
const inactiveCapturePolicy = {
|
|
5875
5941
|
...structuredClone(DEFAULT_FABRIC_CONFIG.capture),
|
|
@@ -6388,16 +6454,8 @@ function createFabricExtension(entryUrl) {
|
|
|
6388
6454
|
const customType = "fabric-extractive-history";
|
|
6389
6455
|
const messages = event.messages.filter((message) => !(message.role === "custom" && message.customType === customType));
|
|
6390
6456
|
if (!extractiveConfig()?.enabled) invalidateExtractive(true);
|
|
6391
|
-
const
|
|
6392
|
-
|
|
6393
|
-
return { messages: [{
|
|
6394
|
-
role: "custom",
|
|
6395
|
-
customType,
|
|
6396
|
-
content: view.text,
|
|
6397
|
-
display: false,
|
|
6398
|
-
timestamp: 0,
|
|
6399
|
-
details: { advisory: true, ...view.usage ? { classifierUsage: view.usage } : {} }
|
|
6400
|
-
}, ...messages] };
|
|
6457
|
+
const projected = extractiveHistory?.inject(context, messages) ?? messages;
|
|
6458
|
+
return projected !== messages || messages.length !== event.messages.length ? { messages: projected } : void 0;
|
|
6401
6459
|
});
|
|
6402
6460
|
pi.on("before_agent_start", async (event, context) => {
|
|
6403
6461
|
const config = state.bootstrapped ? state.config : DEFAULT_FABRIC_CONFIG;
|
|
@@ -6565,4 +6623,4 @@ export {
|
|
|
6565
6623
|
FABRIC_MANAGED_HOST_VERSION,
|
|
6566
6624
|
createFabricExtension
|
|
6567
6625
|
};
|
|
6568
|
-
//# sourceMappingURL=chunk-
|
|
6626
|
+
//# sourceMappingURL=chunk-O7IREHJI.js.map
|