pi-fabric 0.130.2 → 0.131.0
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/dist/activity/store.d.ts +2 -1
- package/dist/activity/store.d.ts.map +1 -1
- package/dist/actors/directory.d.ts.map +1 -1
- package/dist/actors/global-registry.d.ts.map +1 -1
- package/dist/actors/manager.d.ts +4 -3
- package/dist/actors/manager.d.ts.map +1 -1
- package/dist/actors/mesh-monitor.d.ts +2 -0
- package/dist/actors/mesh-monitor.d.ts.map +1 -1
- package/dist/actors/name-policy.d.ts +3 -0
- package/dist/actors/name-policy.d.ts.map +1 -0
- package/dist/actors/registry-store.d.ts +1 -1
- package/dist/actors/registry-store.d.ts.map +1 -1
- package/dist/agents/agent-files.d.ts +8 -0
- package/dist/agents/agent-files.d.ts.map +1 -1
- package/dist/agents/agent-files.js +48 -3
- package/dist/agents/agent-files.js.map +2 -2
- package/dist/agents/child-skills.d.ts +60 -0
- package/dist/agents/child-skills.d.ts.map +1 -0
- package/dist/agents/child-skills.js +94 -0
- package/dist/agents/child-skills.js.map +7 -0
- package/dist/agents/clone-first-worktree.d.ts +6 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -1
- package/dist/agents/cow-clone.d.ts.map +1 -1
- package/dist/agents/handoff.d.ts +12 -2
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +4 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/model-pin-guard.d.ts +27 -0
- package/dist/agents/model-pin-guard.d.ts.map +1 -0
- package/dist/agents/model-pin-guard.js +86 -0
- package/dist/agents/model-pin-guard.js.map +7 -0
- package/dist/agents/model-pin.d.ts +25 -0
- package/dist/agents/model-pin.d.ts.map +1 -0
- package/dist/agents/provider-bridge.d.ts +5 -4
- package/dist/agents/provider-bridge.d.ts.map +1 -1
- package/dist/agents/provider-bridge.js +32 -4
- package/dist/agents/provider-bridge.js.map +3 -3
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/service-schema.d.ts.map +1 -1
- package/dist/agents/types.d.ts +25 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/worktree-manager.d.ts.map +1 -1
- package/dist/agents.js +6 -5
- package/dist/agents.js.map +2 -2
- package/dist/audit/details.d.ts +4 -0
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/chunks/{chunk-SBAROA4Y.js → chunk-2RWNVCFD.js} +17 -1
- package/dist/chunks/{chunk-SBAROA4Y.js.map → chunk-2RWNVCFD.js.map} +2 -2
- package/dist/chunks/{chunk-6O6UWMBO.js → chunk-36XQFTEN.js} +2 -2
- package/dist/chunks/chunk-3PKZSIRA.js +1312 -0
- package/dist/chunks/chunk-3PKZSIRA.js.map +7 -0
- package/dist/chunks/{chunk-JJXUOXI5.js → chunk-4KX6BIPL.js} +17 -2
- package/dist/chunks/chunk-4KX6BIPL.js.map +7 -0
- package/dist/chunks/{chunk-EYHTTMSM.js → chunk-4PBW54I2.js} +5 -5
- package/dist/chunks/{chunk-WTIF3MIM.js → chunk-56NMRVTV.js} +8 -8
- package/dist/chunks/{chunk-WQFG7ZVC.js → chunk-5BOTHX47.js} +48 -13
- package/dist/chunks/chunk-5BOTHX47.js.map +7 -0
- package/dist/chunks/chunk-5QJFDKPN.js +179 -0
- package/dist/chunks/chunk-5QJFDKPN.js.map +7 -0
- package/dist/chunks/chunk-6HO2IUQ5.js +104 -0
- package/dist/chunks/chunk-6HO2IUQ5.js.map +7 -0
- package/dist/chunks/{chunk-NF6W327N.js → chunk-7CIES6X2.js} +9 -2
- package/dist/chunks/chunk-7CIES6X2.js.map +7 -0
- package/dist/chunks/{chunk-KDX3762L.js → chunk-DGERP4VL.js} +4 -4
- package/dist/chunks/{chunk-K3ZWBUUL.js → chunk-IOGDTIGN.js} +13 -13
- package/dist/chunks/chunk-IOGDTIGN.js.map +7 -0
- package/dist/chunks/{chunk-UXIBKMUM.js → chunk-KIFOEBYJ.js} +4 -4
- package/dist/chunks/{chunk-D5224P2R.js → chunk-LKYLD5SN.js} +7 -7
- package/dist/chunks/chunk-NENQZCGW.js +45 -0
- package/dist/chunks/chunk-NENQZCGW.js.map +7 -0
- package/dist/chunks/{chunk-YTYLKL3Z.js → chunk-OJ4HAALD.js} +8 -8
- package/dist/chunks/{chunk-TBB7F7WS.js → chunk-PQVUMJ5J.js} +84 -18
- package/dist/chunks/chunk-PQVUMJ5J.js.map +7 -0
- package/dist/chunks/chunk-UD7LFV43.js +28 -0
- package/dist/chunks/chunk-UD7LFV43.js.map +7 -0
- package/dist/chunks/{chunk-CH2QMORW.js → chunk-UFMYN5TA.js} +2 -2
- package/dist/chunks/chunk-V4OW2ULC.js +422 -0
- package/dist/chunks/chunk-V4OW2ULC.js.map +7 -0
- package/dist/chunks/{chunk-6C2DMTQC.js → chunk-VNWQIGQL.js} +552 -145
- package/dist/chunks/chunk-VNWQIGQL.js.map +7 -0
- package/dist/chunks/{chunk-OA5SJT2T.js → chunk-WGMCNCP6.js} +183 -82
- package/dist/chunks/chunk-WGMCNCP6.js.map +7 -0
- package/dist/chunks/{chunk-HAHRJMWY.js → chunk-WWTGWGH7.js} +6 -6
- package/dist/chunks/{chunk-F4HL6KJR.js → chunk-X7QETPBC.js} +7 -7
- package/dist/chunks/{chunk-SSRSCT2M.js → chunk-XFOSUGLU.js} +4 -4
- package/dist/chunks/{chunk-4VGB6HMU.js → chunk-ZFWICFNJ.js} +23 -18
- package/dist/chunks/{chunk-4VGB6HMU.js.map → chunk-ZFWICFNJ.js.map} +2 -2
- package/dist/commands/fabric-handler.d.ts.map +1 -1
- package/dist/commands/fabric-handler.js +43 -7
- package/dist/commands/fabric-handler.js.map +2 -2
- package/dist/compaction/claim-events.js +2 -2
- package/dist/components/configuration.js +3 -3
- package/dist/config.d.ts +9 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.js +4 -4
- package/dist/core/model-aliases.d.ts +22 -0
- package/dist/core/model-aliases.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +41 -20
- package/dist/core/model-resolution.d.ts.map +1 -1
- package/dist/core/prompt-guidance.js +9 -4
- package/dist/core/prompt-guidance.js.map +2 -2
- package/dist/core/system-guidance.d.ts.map +1 -1
- package/dist/decisions/command.d.ts +2 -1
- package/dist/decisions/command.d.ts.map +1 -1
- package/dist/decisions/command.js +31 -11
- package/dist/decisions/command.js.map +2 -2
- package/dist/decisions/events.js +2 -1
- package/dist/decisions/events.js.map +1 -1
- package/dist/decisions/host.d.ts +8 -0
- package/dist/decisions/host.d.ts.map +1 -1
- package/dist/decisions/render.d.ts +44 -0
- package/dist/decisions/render.d.ts.map +1 -0
- 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 +7 -1283
- package/dist/durable/worker-host.js.map +4 -4
- package/dist/durable/worker-options.d.ts +2 -0
- package/dist/durable/worker-options.d.ts.map +1 -1
- package/dist/durable/worker-role-seed.d.ts +82 -0
- package/dist/durable/worker-role-seed.d.ts.map +1 -0
- package/dist/durable/worker.js +10 -1
- package/dist/durable/worker.js.map +2 -2
- package/dist/durable-extension.d.ts +1 -1
- package/dist/durable-extension.js +1 -1
- package/dist/durable-extension.js.map +1 -1
- package/dist/durable-host.d.ts +8 -0
- package/dist/durable-host.d.ts.map +1 -0
- package/dist/durable-host.js +20 -0
- package/dist/durable-host.js.map +7 -0
- package/dist/entropy/index.js +1 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +16 -16
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- 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 +203 -124
- package/dist/fabric-runtime-state.js.map +2 -2
- package/dist/fabric-state.d.ts +26 -1
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.js +20 -16
- package/dist/index.js.map +1 -1
- package/dist/jev/client.js +2 -2
- package/dist/jev/observation.js +3 -3
- package/dist/jev.js +7 -7
- package/dist/protocol.d.ts +84 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +5 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts +3 -0
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +7 -7
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +13 -10
- package/dist/residency/pi-entry.js +13 -10
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/cpython-runtime.js +3 -3
- package/dist/runtime/exec-journal.js +3 -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/monty-runtime.js +6 -6
- package/dist/runtime/node-process-runtime.js +5 -5
- package/dist/runtime/quickjs-runtime.js +3 -3
- package/dist/runtime/typescript-kernel.js +11 -11
- package/dist/storage/retention.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/conversation-chrome.js +2 -2
- package/dist/ui/conversation.js +10 -10
- package/dist/ui/dashboard.d.ts.map +1 -1
- package/dist/ui/dashboard.js +14 -12
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/settings-sections-presentation.d.ts.map +1 -1
- package/dist/ui/settings.js +12 -9
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/generated/actor-name.d.ts +4 -0
- package/dist/verified/generated/actor-name.js +17 -0
- package/dist/verified/generated/manifest.json +11 -3
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +20 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker.js +57 -8
- package/dist/worker.js.map +2 -2
- package/docs/actor-name-policy-handoff.md +5 -0
- package/docs/agents.md +64 -5
- package/docs/audit-trace.md +2 -1
- package/docs/components.md +1 -1
- package/docs/configuration.md +7 -4
- package/docs/decisions.md +47 -2
- package/docs/durable-pi.md +162 -2
- package/docs/interface.md +1 -1
- package/docs/providers.md +1 -1
- package/docs/verified-kernels.md +1 -0
- package/package.json +5 -1
- package/proofs/actor-name.ts +27 -0
- package/proofs/index.ts +2 -0
- package/scripts/verified-kernels.ts +1 -1
- package/skillsets/python/fabric-exec/references/agents.md +6 -4
- package/skillsets/typescript/fabric-exec/references/agents.md +6 -3
- package/dist/chunks/chunk-6C2DMTQC.js.map +0 -7
- package/dist/chunks/chunk-JJXUOXI5.js.map +0 -7
- package/dist/chunks/chunk-K3ZWBUUL.js.map +0 -7
- package/dist/chunks/chunk-KJZAOENY.js +0 -212
- package/dist/chunks/chunk-KJZAOENY.js.map +0 -7
- package/dist/chunks/chunk-NF6W327N.js.map +0 -7
- package/dist/chunks/chunk-OA5SJT2T.js.map +0 -7
- package/dist/chunks/chunk-TBB7F7WS.js.map +0 -7
- package/dist/chunks/chunk-WQFG7ZVC.js.map +0 -7
- package/dist/chunks/chunk-ZLNJDTCN.js +0 -226
- package/dist/chunks/chunk-ZLNJDTCN.js.map +0 -7
- /package/dist/chunks/{chunk-6O6UWMBO.js.map → chunk-36XQFTEN.js.map} +0 -0
- /package/dist/chunks/{chunk-EYHTTMSM.js.map → chunk-4PBW54I2.js.map} +0 -0
- /package/dist/chunks/{chunk-WTIF3MIM.js.map → chunk-56NMRVTV.js.map} +0 -0
- /package/dist/chunks/{chunk-KDX3762L.js.map → chunk-DGERP4VL.js.map} +0 -0
- /package/dist/chunks/{chunk-UXIBKMUM.js.map → chunk-KIFOEBYJ.js.map} +0 -0
- /package/dist/chunks/{chunk-D5224P2R.js.map → chunk-LKYLD5SN.js.map} +0 -0
- /package/dist/chunks/{chunk-YTYLKL3Z.js.map → chunk-OJ4HAALD.js.map} +0 -0
- /package/dist/chunks/{chunk-CH2QMORW.js.map → chunk-UFMYN5TA.js.map} +0 -0
- /package/dist/chunks/{chunk-HAHRJMWY.js.map → chunk-WWTGWGH7.js.map} +0 -0
- /package/dist/chunks/{chunk-F4HL6KJR.js.map → chunk-X7QETPBC.js.map} +0 -0
- /package/dist/chunks/{chunk-SSRSCT2M.js.map → chunk-XFOSUGLU.js.map} +0 -0
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
componentEntries,
|
|
17
17
|
validateComponentConfig,
|
|
18
18
|
watchComponentConfiguration
|
|
19
|
-
} from "./chunks/chunk-
|
|
19
|
+
} from "./chunks/chunk-UFMYN5TA.js";
|
|
20
20
|
import {
|
|
21
21
|
MAX_PROGRAM_CODE_CHARS,
|
|
22
22
|
MAX_PROGRAM_DESCRIPTION_CHARS,
|
|
@@ -64,42 +64,6 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
WorkerMemoryProvider
|
|
66
66
|
} from "./chunks/chunk-MPMEK3IQ.js";
|
|
67
|
-
import {
|
|
68
|
-
ResidentActorClient
|
|
69
|
-
} from "./chunks/chunk-CXYJJ3HZ.js";
|
|
70
|
-
import {
|
|
71
|
-
ActionRegistry,
|
|
72
|
-
FabricComponentIndependenceError,
|
|
73
|
-
actionEffect,
|
|
74
|
-
boundedEffectResources,
|
|
75
|
-
compareEffectInfo,
|
|
76
|
-
effectConflictsBetween,
|
|
77
|
-
fabricActionListLimit,
|
|
78
|
-
registrationEffect,
|
|
79
|
-
repairActionName,
|
|
80
|
-
scoreActionSearch,
|
|
81
|
-
summarizeEffects,
|
|
82
|
-
trackedRegistration
|
|
83
|
-
} from "./chunks/chunk-WTIF3MIM.js";
|
|
84
|
-
import {
|
|
85
|
-
formatFabricEffectConflict
|
|
86
|
-
} from "./chunks/chunk-LMAVZN7J.js";
|
|
87
|
-
import {
|
|
88
|
-
warnProviderGlobalConflict
|
|
89
|
-
} from "./chunks/chunk-35EEGOH3.js";
|
|
90
|
-
import {
|
|
91
|
-
prepareFabricActorContextPayload,
|
|
92
|
-
prepareFabricActorHostPayload,
|
|
93
|
-
sanitizeFabricMediaText,
|
|
94
|
-
sanitizeFabricMediaValue
|
|
95
|
-
} from "./chunks/chunk-4XMXFHAR.js";
|
|
96
|
-
import {
|
|
97
|
-
validationMessage
|
|
98
|
-
} from "./chunks/chunk-7N7IC3Z2.js";
|
|
99
|
-
import {
|
|
100
|
-
FabricAssessmentRecorder,
|
|
101
|
-
readFabricAssessmentUsage
|
|
102
|
-
} from "./chunks/chunk-WOLUDZVR.js";
|
|
103
67
|
import {
|
|
104
68
|
ActorDirectory,
|
|
105
69
|
ActorRegistryOwnershipError,
|
|
@@ -128,7 +92,7 @@ import {
|
|
|
128
92
|
snapshotHandoffSession,
|
|
129
93
|
thinkingTransferPolicy,
|
|
130
94
|
withInheritedSessionPins
|
|
131
|
-
} from "./chunks/chunk-
|
|
95
|
+
} from "./chunks/chunk-VNWQIGQL.js";
|
|
132
96
|
import {
|
|
133
97
|
readTraceContext
|
|
134
98
|
} from "./chunks/chunk-QRN433TI.js";
|
|
@@ -144,10 +108,10 @@ import {
|
|
|
144
108
|
import {
|
|
145
109
|
requestHeadlessApproval,
|
|
146
110
|
routeChildQuestion
|
|
147
|
-
} from "./chunks/chunk-
|
|
111
|
+
} from "./chunks/chunk-PQVUMJ5J.js";
|
|
112
|
+
import "./chunks/chunk-6HO2IUQ5.js";
|
|
148
113
|
import "./chunks/chunk-PM5I335G.js";
|
|
149
114
|
import "./chunks/chunk-VPPIJRNZ.js";
|
|
150
|
-
import "./chunks/chunk-W5FEHVZA.js";
|
|
151
115
|
import {
|
|
152
116
|
DecisionStore,
|
|
153
117
|
MAX_DECISION_BODY_CHARS,
|
|
@@ -161,14 +125,18 @@ import {
|
|
|
161
125
|
MIN_ESCALATION_HOP_MS,
|
|
162
126
|
assertDecisionId
|
|
163
127
|
} from "./chunks/chunk-CBIV747V.js";
|
|
128
|
+
import "./chunks/chunk-W5FEHVZA.js";
|
|
129
|
+
import {
|
|
130
|
+
herdrSocketRequest
|
|
131
|
+
} from "./chunks/chunk-JMUUNW2H.js";
|
|
164
132
|
import {
|
|
165
133
|
MESH_MAX_PENDING_SCHEDULES,
|
|
166
134
|
MESH_MAX_SCHEDULE_AHEAD_MS,
|
|
167
135
|
MeshStore
|
|
168
136
|
} from "./chunks/chunk-TJZYM2SP.js";
|
|
169
137
|
import {
|
|
170
|
-
|
|
171
|
-
} from "./chunks/chunk-
|
|
138
|
+
ResidentActorClient
|
|
139
|
+
} from "./chunks/chunk-CXYJJ3HZ.js";
|
|
172
140
|
import {
|
|
173
141
|
RESIDENT_HOST_FORMAT,
|
|
174
142
|
abandonResidentRequest,
|
|
@@ -186,15 +154,49 @@ import {
|
|
|
186
154
|
latestCarryItems,
|
|
187
155
|
sameCarryItems
|
|
188
156
|
} from "./chunks/chunk-3XT5WHSG.js";
|
|
157
|
+
import {
|
|
158
|
+
ActionRegistry,
|
|
159
|
+
FabricComponentIndependenceError,
|
|
160
|
+
actionEffect,
|
|
161
|
+
boundedEffectResources,
|
|
162
|
+
compareEffectInfo,
|
|
163
|
+
effectConflictsBetween,
|
|
164
|
+
fabricActionListLimit,
|
|
165
|
+
registrationEffect,
|
|
166
|
+
repairActionName,
|
|
167
|
+
scoreActionSearch,
|
|
168
|
+
summarizeEffects,
|
|
169
|
+
trackedRegistration
|
|
170
|
+
} from "./chunks/chunk-56NMRVTV.js";
|
|
171
|
+
import {
|
|
172
|
+
formatFabricEffectConflict
|
|
173
|
+
} from "./chunks/chunk-LMAVZN7J.js";
|
|
174
|
+
import {
|
|
175
|
+
warnProviderGlobalConflict
|
|
176
|
+
} from "./chunks/chunk-35EEGOH3.js";
|
|
189
177
|
import {
|
|
190
178
|
bit
|
|
191
179
|
} from "./chunks/chunk-NJHJKINP.js";
|
|
180
|
+
import {
|
|
181
|
+
prepareFabricActorContextPayload,
|
|
182
|
+
prepareFabricActorHostPayload,
|
|
183
|
+
sanitizeFabricMediaText,
|
|
184
|
+
sanitizeFabricMediaValue
|
|
185
|
+
} from "./chunks/chunk-4XMXFHAR.js";
|
|
186
|
+
import {
|
|
187
|
+
validationMessage
|
|
188
|
+
} from "./chunks/chunk-7N7IC3Z2.js";
|
|
189
|
+
import {
|
|
190
|
+
FabricAssessmentRecorder,
|
|
191
|
+
readFabricAssessmentUsage
|
|
192
|
+
} from "./chunks/chunk-WOLUDZVR.js";
|
|
192
193
|
import {
|
|
193
194
|
childScope,
|
|
194
195
|
scopeAllows,
|
|
195
196
|
scopeCovers,
|
|
196
197
|
sessionScope
|
|
197
198
|
} from "./chunks/chunk-JKQARSWR.js";
|
|
199
|
+
import "./chunks/chunk-UD7LFV43.js";
|
|
198
200
|
import {
|
|
199
201
|
loadCompiledSurface
|
|
200
202
|
} from "./chunks/chunk-MSDL7U6Q.js";
|
|
@@ -224,7 +226,7 @@ import {
|
|
|
224
226
|
resolveFabricIdentity,
|
|
225
227
|
runtimeIdentityStatus,
|
|
226
228
|
setModelSafely
|
|
227
|
-
} from "./chunks/chunk-
|
|
229
|
+
} from "./chunks/chunk-ZFWICFNJ.js";
|
|
228
230
|
import {
|
|
229
231
|
AgentTranscriptReader,
|
|
230
232
|
MAX_WRITE_DIFF_BYTES,
|
|
@@ -234,26 +236,6 @@ import {
|
|
|
234
236
|
} from "./chunks/chunk-YHFWMAQ5.js";
|
|
235
237
|
import "./chunks/chunk-AV36PBKH.js";
|
|
236
238
|
import "./chunks/chunk-P3DCXKL3.js";
|
|
237
|
-
import {
|
|
238
|
-
withExclusiveFileLockAsync
|
|
239
|
-
} from "./chunks/chunk-WKFRGICG.js";
|
|
240
|
-
import "./chunks/chunk-N7ZAK2PB.js";
|
|
241
|
-
import {
|
|
242
|
-
ApprovalController,
|
|
243
|
-
FabricAutoApprovalClassifier,
|
|
244
|
-
FabricSessionApprovals
|
|
245
|
-
} from "./chunks/chunk-EYHTTMSM.js";
|
|
246
|
-
import "./chunks/chunk-XB3RJVT4.js";
|
|
247
|
-
import {
|
|
248
|
-
clearActiveCompiledSurface,
|
|
249
|
-
clearActiveRepairCompiler,
|
|
250
|
-
setActiveCompiledSurface,
|
|
251
|
-
setActiveRepairCompiler
|
|
252
|
-
} from "./chunks/chunk-TXCNZCZP.js";
|
|
253
|
-
import {
|
|
254
|
-
runAbortable,
|
|
255
|
-
throwIfAborted
|
|
256
|
-
} from "./chunks/chunk-7TB7NXSL.js";
|
|
257
239
|
import {
|
|
258
240
|
closeScratch,
|
|
259
241
|
createScratch
|
|
@@ -267,7 +249,7 @@ import {
|
|
|
267
249
|
MAX_AGENT_TIMEOUT_MS,
|
|
268
250
|
MIN_AGENT_TIMEOUT_MS,
|
|
269
251
|
loadFabricConfig
|
|
270
|
-
} from "./chunks/chunk-
|
|
252
|
+
} from "./chunks/chunk-4KX6BIPL.js";
|
|
271
253
|
import "./chunks/chunk-OKOHRXGF.js";
|
|
272
254
|
import {
|
|
273
255
|
readJsonlPage
|
|
@@ -278,6 +260,9 @@ import {
|
|
|
278
260
|
outputReserveBreached
|
|
279
261
|
} from "./chunks/chunk-3VK6UGAN.js";
|
|
280
262
|
import "./chunks/chunk-SZUXWOO7.js";
|
|
263
|
+
import {
|
|
264
|
+
withExclusiveFileLockAsync
|
|
265
|
+
} from "./chunks/chunk-WKFRGICG.js";
|
|
281
266
|
import {
|
|
282
267
|
ownerHeartbeatFields,
|
|
283
268
|
recordOwnerLiveness,
|
|
@@ -286,18 +271,35 @@ import {
|
|
|
286
271
|
writeJsonAtomic,
|
|
287
272
|
writeJsonAtomicAsync
|
|
288
273
|
} from "./chunks/chunk-F6A6MQ6G.js";
|
|
274
|
+
import "./chunks/chunk-N7ZAK2PB.js";
|
|
289
275
|
import {
|
|
290
276
|
PI_CORE_TOOL_NAMES,
|
|
291
277
|
PI_CORE_TOOL_NAME_SET,
|
|
292
278
|
isPiShellRef,
|
|
293
279
|
isPiShellToolName
|
|
294
280
|
} from "./chunks/chunk-YU62DDKK.js";
|
|
281
|
+
import {
|
|
282
|
+
ApprovalController,
|
|
283
|
+
FabricAutoApprovalClassifier,
|
|
284
|
+
FabricSessionApprovals
|
|
285
|
+
} from "./chunks/chunk-4PBW54I2.js";
|
|
286
|
+
import "./chunks/chunk-XB3RJVT4.js";
|
|
295
287
|
import {
|
|
296
288
|
actionApprovalOverride
|
|
297
289
|
} from "./chunks/chunk-GEQMQVNS.js";
|
|
298
290
|
import {
|
|
299
291
|
resolveJevModelRoute
|
|
300
292
|
} from "./chunks/chunk-G54PEZ44.js";
|
|
293
|
+
import {
|
|
294
|
+
clearActiveCompiledSurface,
|
|
295
|
+
clearActiveRepairCompiler,
|
|
296
|
+
setActiveCompiledSurface,
|
|
297
|
+
setActiveRepairCompiler
|
|
298
|
+
} from "./chunks/chunk-TXCNZCZP.js";
|
|
299
|
+
import {
|
|
300
|
+
runAbortable,
|
|
301
|
+
throwIfAborted
|
|
302
|
+
} from "./chunks/chunk-7TB7NXSL.js";
|
|
301
303
|
import {
|
|
302
304
|
FABRIC_BASH_MIDDLEWARE,
|
|
303
305
|
FABRIC_CHILD_TRACE_CONTEXT_EVENT,
|
|
@@ -318,11 +320,7 @@ import {
|
|
|
318
320
|
normalizeFabricModelGuidance,
|
|
319
321
|
readFabricToolResultProxyDetailsV1,
|
|
320
322
|
resolveFabricModelGuidance
|
|
321
|
-
} from "./chunks/chunk-
|
|
322
|
-
import {
|
|
323
|
-
constrainChildToolSelection,
|
|
324
|
-
readChildToolAllowlist
|
|
325
|
-
} from "./chunks/chunk-6OGYPHNQ.js";
|
|
323
|
+
} from "./chunks/chunk-2RWNVCFD.js";
|
|
326
324
|
import "./chunks/chunk-OZCJU3PZ.js";
|
|
327
325
|
import {
|
|
328
326
|
createConfiguredMemorySourceRegistry
|
|
@@ -355,13 +353,18 @@ import {
|
|
|
355
353
|
import {
|
|
356
354
|
AGENTS_ACTION_DESCRIPTORS,
|
|
357
355
|
normalizeAgentRunRequest
|
|
358
|
-
} from "./chunks/chunk-
|
|
356
|
+
} from "./chunks/chunk-5BOTHX47.js";
|
|
359
357
|
import {
|
|
360
358
|
FABRIC_PARTICIPANT_LIFECYCLE_TOPIC,
|
|
359
|
+
FUZZY_RESOLUTION_MARKERS,
|
|
360
|
+
aliasThinking,
|
|
361
|
+
assertExactModelRequest,
|
|
361
362
|
isFabricLifecycleEventType,
|
|
362
363
|
lifecycleSourceIdentity,
|
|
364
|
+
resolveFabricModel,
|
|
365
|
+
resolvePiModelSelector,
|
|
363
366
|
terminalAgentStatuses
|
|
364
|
-
} from "./chunks/chunk-
|
|
367
|
+
} from "./chunks/chunk-V4OW2ULC.js";
|
|
365
368
|
import "./chunks/chunk-GJVKEHDL.js";
|
|
366
369
|
import {
|
|
367
370
|
MAX_COMPACTION_INSTRUCTIONS_CHARS,
|
|
@@ -374,12 +377,7 @@ import {
|
|
|
374
377
|
FABRIC_ACTOR_HOST_EVENTS,
|
|
375
378
|
isFabricActorHostEvent
|
|
376
379
|
} from "./chunks/chunk-IIPKG52D.js";
|
|
377
|
-
import
|
|
378
|
-
FUZZY_RESOLUTION_MARKERS,
|
|
379
|
-
aliasThinking,
|
|
380
|
-
resolveAvailablePiModel,
|
|
381
|
-
resolveFabricModel
|
|
382
|
-
} from "./chunks/chunk-ZLNJDTCN.js";
|
|
380
|
+
import "./chunks/chunk-NENQZCGW.js";
|
|
383
381
|
import {
|
|
384
382
|
THINKING_LEVELS,
|
|
385
383
|
isFabricThinking
|
|
@@ -400,6 +398,11 @@ import {
|
|
|
400
398
|
isFabricRunnerId,
|
|
401
399
|
requireAgentRunner
|
|
402
400
|
} from "./chunks/chunk-6QVQXGMR.js";
|
|
401
|
+
import "./chunks/chunk-5QJFDKPN.js";
|
|
402
|
+
import {
|
|
403
|
+
constrainChildToolSelection,
|
|
404
|
+
readChildToolAllowlist
|
|
405
|
+
} from "./chunks/chunk-6OGYPHNQ.js";
|
|
403
406
|
|
|
404
407
|
// src/agents/trace-context-request.ts
|
|
405
408
|
var requestChildTraceContext = (emit, launch) => {
|
|
@@ -1246,7 +1249,6 @@ var GlobalActorRegistry = class {
|
|
|
1246
1249
|
throw new Error(`A global actor named ${validated.name} already exists (${existing.id})`);
|
|
1247
1250
|
}
|
|
1248
1251
|
const updated = {
|
|
1249
|
-
...existing,
|
|
1250
1252
|
...validated,
|
|
1251
1253
|
id: existing.id,
|
|
1252
1254
|
createdAt: existing.createdAt,
|
|
@@ -1293,6 +1295,7 @@ var GlobalActorRegistry = class {
|
|
|
1293
1295
|
...patch.transport !== void 0 ? { transport: patch.transport } : existing.transport ? { transport: existing.transport } : {},
|
|
1294
1296
|
...patch.timeoutMs !== void 0 ? { timeoutMs: patch.timeoutMs } : existing.timeoutMs ? { timeoutMs: existing.timeoutMs } : {},
|
|
1295
1297
|
...patch.extensions !== void 0 ? { extensions: patch.extensions } : typeof existing.extensions === "boolean" ? { extensions: existing.extensions } : {},
|
|
1298
|
+
...patch.requires !== void 0 ? { requires: patch.requires } : existing.requires ? { requires: existing.requires } : {},
|
|
1296
1299
|
...patch.validWhile !== void 0 ? { validWhile: patch.validWhile } : existing.validWhile ? { validWhile: existing.validWhile } : {}
|
|
1297
1300
|
};
|
|
1298
1301
|
const validated = this.#validate(merged);
|
|
@@ -1348,6 +1351,7 @@ var GlobalActorRegistry = class {
|
|
|
1348
1351
|
...def.transport ? { transport: def.transport } : {},
|
|
1349
1352
|
...def.timeoutMs ? { timeoutMs: def.timeoutMs } : {},
|
|
1350
1353
|
...typeof def.extensions === "boolean" ? { extensions: def.extensions } : {},
|
|
1354
|
+
...def.requires ? { requires: clone(def.requires) } : {},
|
|
1351
1355
|
...def.validWhile ? { validWhile: clone(def.validWhile) } : {}
|
|
1352
1356
|
};
|
|
1353
1357
|
return request;
|
|
@@ -5668,7 +5672,7 @@ var FabricExecutionService = class {
|
|
|
5668
5672
|
error,
|
|
5669
5673
|
executionOutcomeFromError(error, runtimeSignal)
|
|
5670
5674
|
);
|
|
5671
|
-
|
|
5675
|
+
throw error;
|
|
5672
5676
|
}
|
|
5673
5677
|
}
|
|
5674
5678
|
case "fabric.$list":
|
|
@@ -5956,7 +5960,7 @@ var FabricExecutionService = class {
|
|
|
5956
5960
|
}
|
|
5957
5961
|
} catch (error) {
|
|
5958
5962
|
const message2 = error instanceof Error ? error.message : String(error);
|
|
5959
|
-
this.activity?.finish(options.parentToolCallId, false, message2);
|
|
5963
|
+
this.activity?.finish(options.parentToolCallId, false, message2, options.signal?.aborted === true);
|
|
5960
5964
|
itemTransitions.finish(false);
|
|
5961
5965
|
if (options.signal?.aborted) {
|
|
5962
5966
|
await this.#participants?.cancelInvocation(options.parentToolCallId).catch(() => void 0);
|
|
@@ -5983,7 +5987,12 @@ Recovery hint: ${hint}`;
|
|
|
5983
5987
|
sandboxResult.error = sandboxResult.error ? `${sandboxResult.error}
|
|
5984
5988
|
${summary}` : summary;
|
|
5985
5989
|
}
|
|
5986
|
-
this.activity?.finish(
|
|
5990
|
+
this.activity?.finish(
|
|
5991
|
+
options.parentToolCallId,
|
|
5992
|
+
succeeded,
|
|
5993
|
+
sandboxResult.error,
|
|
5994
|
+
runOutcome === "aborted" || options.signal?.aborted === true
|
|
5995
|
+
);
|
|
5987
5996
|
itemTransitions.finish(succeeded);
|
|
5988
5997
|
const sanitizedValue = sanitizeFabricMediaValue({ value: sandboxResult.value, emitted: sandboxResult.emitted ?? [] });
|
|
5989
5998
|
const imageArtifacts = !python && (sandboxResult.emitted?.length ?? 0) > 0 ? await import("./native-image-artifacts.js").then((module) => module.persistNativeImages(sanitizeFabricMediaValue(sandboxResult.emitted).images)).catch((error) => [`Image artifact unavailable: ${String(error)}`]) : [];
|
|
@@ -8598,7 +8607,7 @@ var displaySafeCwd = (cwd) => {
|
|
|
8598
8607
|
if (safe.length <= MAX_ACTIVITY_CWD_CHARS) return safe;
|
|
8599
8608
|
return `\u2026${safe.slice(-(MAX_ACTIVITY_CWD_CHARS - 1))}`;
|
|
8600
8609
|
};
|
|
8601
|
-
var agentStartedMessage = (handle) => `Agent ${handle.name} started via ${handle.runner}/${handle.transport}${handle.attachCommand ? ` \xB7 ${handle.attachCommand}` : ""} \xB7 cwd ${displaySafeCwd(handle.cwd)}`;
|
|
8610
|
+
var agentStartedMessage = (handle) => `Agent ${handle.name} ${handle.status === "queued" ? "queued for a slot" : "started"} via ${handle.runner}/${handle.transport}${handle.attachCommand ? ` \xB7 ${handle.attachCommand}` : ""} \xB7 cwd ${displaySafeCwd(handle.cwd)}`;
|
|
8602
8611
|
var resolveThinkingTransfer = (extensionContext, targetKey2, sourceModel) => {
|
|
8603
8612
|
const separator = targetKey2.indexOf("/");
|
|
8604
8613
|
if (separator <= 0 || separator === targetKey2.length - 1) return void 0;
|
|
@@ -8639,6 +8648,14 @@ var checkedRunner = (value, fallback) => {
|
|
|
8639
8648
|
if (!isFabricRunnerId(value)) throw new Error(`Invalid Fabric agent runner: ${JSON.stringify(value)}`);
|
|
8640
8649
|
return value;
|
|
8641
8650
|
};
|
|
8651
|
+
var MAX_MODEL_KEY_CHARS = 256;
|
|
8652
|
+
var MODEL_KEY_RULE = `model must be a string of 1 to ${MAX_MODEL_KEY_CHARS} characters (an exact key from agents.models())`;
|
|
8653
|
+
var isModelKey = (value) => typeof value === "string" && value.length > 0 && [...value].length <= MAX_MODEL_KEY_CHARS;
|
|
8654
|
+
var checkedModelKey = (value) => {
|
|
8655
|
+
if (value === void 0) return void 0;
|
|
8656
|
+
if (!isModelKey(value)) throw new Error(`agents.models ${MODEL_KEY_RULE}`);
|
|
8657
|
+
return value;
|
|
8658
|
+
};
|
|
8642
8659
|
var checkedKernel = (value) => {
|
|
8643
8660
|
if (value === void 0 || value === "inherit" || value === "typescript" || value === "python") return value;
|
|
8644
8661
|
throw new Error(`Invalid Fabric agent kernel: ${String(value)}`);
|
|
@@ -8748,6 +8765,13 @@ var actorRequest = (args, context, manager, inheritModel = true) => {
|
|
|
8748
8765
|
};
|
|
8749
8766
|
};
|
|
8750
8767
|
var normalizeAgentsArgs = actionArgNormalizer(() => AGENTS_ACTION_DESCRIPTORS);
|
|
8768
|
+
var nullModelSpelling = (args) => Object.entries(args).some(
|
|
8769
|
+
([key, value]) => value === null && "model" in normalizeAgentsArgs("models", { [key]: "" })
|
|
8770
|
+
);
|
|
8771
|
+
var refuseInvalidModelsModel = (args, prepared) => {
|
|
8772
|
+
const invalid = prepared.model === void 0 ? nullModelSpelling(args) : !isModelKey(prepared.model);
|
|
8773
|
+
if (invalid) throw new FabricTraceSafeError(`Invalid arguments for agents.models: ${MODEL_KEY_RULE}`);
|
|
8774
|
+
};
|
|
8751
8775
|
var AgentsProvider = class {
|
|
8752
8776
|
constructor(manager, actorManager, globalActors, mainAgent, participants, control, lifecycle, agentToolPreviewEnabled = () => true, residency, ownsRuntime = true, modelsConfig = () => DEFAULT_FABRIC_CONFIG.models) {
|
|
8753
8777
|
this.manager = manager;
|
|
@@ -8784,6 +8808,8 @@ var AgentsProvider = class {
|
|
|
8784
8808
|
name = "agents";
|
|
8785
8809
|
/** Session registry of `provider:` participants; stop/steer/followUp route there. */
|
|
8786
8810
|
providerParticipants;
|
|
8811
|
+
/** This session's commands (pi.getCommands()); the `skills` option resolves against its skills. */
|
|
8812
|
+
sessionCommands;
|
|
8787
8813
|
description = "The user-facing Main target, one-shot Pi or Claude Code agents, and persistent mailbox actors over process, tmux, screen, LocalTerm, or Herdr";
|
|
8788
8814
|
#lifecycleScheduler;
|
|
8789
8815
|
#lifecycleMessage(event) {
|
|
@@ -8811,21 +8837,24 @@ var AgentsProvider = class {
|
|
|
8811
8837
|
);
|
|
8812
8838
|
}
|
|
8813
8839
|
/** Resolve a Pi participant selector only within this session's visible registry. */
|
|
8814
|
-
#resolvePiModel(model2, context) {
|
|
8840
|
+
#resolvePiModel(model2, context, modelMatch) {
|
|
8815
8841
|
let available = [];
|
|
8842
|
+
let registryError;
|
|
8816
8843
|
try {
|
|
8817
8844
|
available = context.extensionContext.modelRegistry.getAvailable().map((candidate) => ({
|
|
8818
8845
|
provider: String(candidate.provider),
|
|
8819
8846
|
id: String(candidate.id),
|
|
8820
8847
|
...typeof candidate.name === "string" ? { name: candidate.name } : {}
|
|
8821
8848
|
}));
|
|
8822
|
-
} catch {
|
|
8849
|
+
} catch (error) {
|
|
8850
|
+
registryError = error;
|
|
8823
8851
|
}
|
|
8824
|
-
const resolved =
|
|
8852
|
+
const resolved = resolvePiModelSelector(model2, {
|
|
8825
8853
|
aliases: this.modelsConfig().aliases,
|
|
8826
8854
|
available,
|
|
8827
|
-
lastUsed: loadModelUsage()
|
|
8828
|
-
|
|
8855
|
+
lastUsed: loadModelUsage(),
|
|
8856
|
+
...registryError === void 0 ? {} : { registryError }
|
|
8857
|
+
}, modelMatch);
|
|
8829
8858
|
return `${resolved.provider}/${resolved.id}`;
|
|
8830
8859
|
}
|
|
8831
8860
|
/** Roots for named agent files. Project files load only for a project the host trusts. */
|
|
@@ -8858,8 +8887,12 @@ var AgentsProvider = class {
|
|
|
8858
8887
|
}
|
|
8859
8888
|
#resolvePiModelArgs(args, context, runnerOverride) {
|
|
8860
8889
|
const runner = runnerOverride ?? checkedRunner(args.runner, this.manager.config.runner);
|
|
8890
|
+
assertExactModelRequest({ modelMatch: args.modelMatch, runner, model: args.model });
|
|
8861
8891
|
if (runner !== "pi" && runner !== "pi-durable") return args;
|
|
8862
8892
|
const model2 = typeof args.model === "string" ? args.model.trim() : "";
|
|
8893
|
+
if (args.modelMatch === "exact") {
|
|
8894
|
+
return { ...args, model: this.#resolvePiModel(model2, context, "exact") };
|
|
8895
|
+
}
|
|
8863
8896
|
if (!model2) return args;
|
|
8864
8897
|
const thinking = isFabricThinking(args.thinking) ? args.thinking : aliasThinking(this.modelsConfig().aliases, model2);
|
|
8865
8898
|
const resolved = this.#resolvePiModel(model2, context);
|
|
@@ -8883,7 +8916,9 @@ var AgentsProvider = class {
|
|
|
8883
8916
|
return AGENTS_ACTION_DESCRIPTORS.find((descriptor) => descriptor.name === actionName);
|
|
8884
8917
|
}
|
|
8885
8918
|
prepareArguments(actionName, args) {
|
|
8886
|
-
|
|
8919
|
+
const prepared = normalizeAgentsArgs(actionName, args);
|
|
8920
|
+
if (actionName === "models") refuseInvalidModelsModel(args, prepared);
|
|
8921
|
+
return prepared;
|
|
8887
8922
|
}
|
|
8888
8923
|
async handoff(args, context) {
|
|
8889
8924
|
const model2 = typeof args.model === "string" ? args.model.trim() : "";
|
|
@@ -8969,9 +9004,13 @@ var AgentsProvider = class {
|
|
|
8969
9004
|
case "run": {
|
|
8970
9005
|
const runArgs = await this.#applyAgentFile(args, context);
|
|
8971
9006
|
const handle = await this.manager.spawn(
|
|
8972
|
-
this.#
|
|
9007
|
+
await this.#applyChildSkills(
|
|
8973
9008
|
runArgs,
|
|
8974
|
-
|
|
9009
|
+
this.#applySeed(
|
|
9010
|
+
runArgs,
|
|
9011
|
+
runRequest(this.#resolvePiModelArgs(runArgs, context), context, this.manager, this.modelsConfig()),
|
|
9012
|
+
context
|
|
9013
|
+
),
|
|
8975
9014
|
context
|
|
8976
9015
|
),
|
|
8977
9016
|
context.signal
|
|
@@ -8996,11 +9035,18 @@ var AgentsProvider = class {
|
|
|
8996
9035
|
return this.handoff(args, context);
|
|
8997
9036
|
case "spawn": {
|
|
8998
9037
|
const spawnArgs = await this.#applyAgentFile(args, context, args.residency);
|
|
8999
|
-
const request = this.#
|
|
9038
|
+
const request = await this.#applyChildSkills(
|
|
9000
9039
|
spawnArgs,
|
|
9001
|
-
|
|
9040
|
+
this.#applySeed(
|
|
9041
|
+
spawnArgs,
|
|
9042
|
+
runRequest(this.#resolvePiModelArgs(spawnArgs, context), context, this.manager, this.modelsConfig()),
|
|
9043
|
+
context
|
|
9044
|
+
),
|
|
9002
9045
|
context
|
|
9003
9046
|
);
|
|
9047
|
+
if (request.residency === "durable" && request.queue === true) {
|
|
9048
|
+
throw new Error('queue: true is not supported with residency: "durable"');
|
|
9049
|
+
}
|
|
9004
9050
|
if (request.residency === "durable") this.#assertUnconfinedDurable();
|
|
9005
9051
|
const kernel = this.manager.resolveKernel(request);
|
|
9006
9052
|
const { kernel: _requestedKernel, ...requestWithScope } = request;
|
|
@@ -9150,36 +9196,34 @@ var AgentsProvider = class {
|
|
|
9150
9196
|
return this.lifecycle.unsubscribe(String(args.id));
|
|
9151
9197
|
case "models": {
|
|
9152
9198
|
const runner = checkedRunner(args.runner, this.manager.config.runner);
|
|
9199
|
+
const exactKey = checkedModelKey(args.model);
|
|
9153
9200
|
const runnerAdapter = requireAgentRunner(runner);
|
|
9201
|
+
const matching = (models) => exactKey === void 0 ? [...models] : models.filter((model2) => model2.key === exactKey);
|
|
9154
9202
|
if (!BUILT_IN_RUNNER_IDS.has(runner)) {
|
|
9155
|
-
return runnerAdapter.models ?
|
|
9203
|
+
return runnerAdapter.models ? matching(await runnerAdapter.models({ cwd: this.manager.cwd, refresh: args.refresh === true })) : [];
|
|
9156
9204
|
}
|
|
9157
9205
|
if (runner === "veda") {
|
|
9158
9206
|
return [];
|
|
9159
9207
|
}
|
|
9160
9208
|
if (runner === "claude") {
|
|
9161
9209
|
const models = await this.manager.claudeModels(args.refresh === true);
|
|
9162
|
-
return models.map((model2) => ({
|
|
9210
|
+
return matching(models.map((model2) => ({
|
|
9163
9211
|
runner: "claude",
|
|
9164
9212
|
provider: "claude",
|
|
9165
9213
|
id: model2.value,
|
|
9166
9214
|
name: model2.displayName,
|
|
9167
9215
|
key: `claude/${model2.value}`,
|
|
9168
9216
|
...model2
|
|
9169
|
-
}));
|
|
9170
|
-
}
|
|
9171
|
-
try {
|
|
9172
|
-
const available = context.extensionContext.modelRegistry.getAvailable();
|
|
9173
|
-
return available.map((model2) => ({
|
|
9174
|
-
runner,
|
|
9175
|
-
provider: String(model2.provider),
|
|
9176
|
-
id: String(model2.id),
|
|
9177
|
-
name: String(model2.name ?? model2.id),
|
|
9178
|
-
key: `${model2.provider}/${model2.id}`
|
|
9179
|
-
}));
|
|
9180
|
-
} catch {
|
|
9181
|
-
return [];
|
|
9217
|
+
})));
|
|
9182
9218
|
}
|
|
9219
|
+
const available = context.extensionContext.modelRegistry.getAvailable();
|
|
9220
|
+
return matching(available.map((model2) => ({
|
|
9221
|
+
runner,
|
|
9222
|
+
provider: String(model2.provider),
|
|
9223
|
+
id: String(model2.id),
|
|
9224
|
+
name: String(model2.name ?? model2.id),
|
|
9225
|
+
key: `${model2.provider}/${model2.id}`
|
|
9226
|
+
})));
|
|
9183
9227
|
}
|
|
9184
9228
|
case "switchModel": {
|
|
9185
9229
|
const query = typeof args.model === "string" ? args.model.trim() : "";
|
|
@@ -9196,8 +9240,11 @@ var AgentsProvider = class {
|
|
|
9196
9240
|
id: String(model2.id),
|
|
9197
9241
|
...typeof model2.name === "string" ? { name: model2.name } : {}
|
|
9198
9242
|
}));
|
|
9199
|
-
} catch {
|
|
9200
|
-
|
|
9243
|
+
} catch (error) {
|
|
9244
|
+
throw new Error(
|
|
9245
|
+
`agents.switchModel could not read the model registry: ${error instanceof Error ? error.message : String(error)}`,
|
|
9246
|
+
{ cause: error }
|
|
9247
|
+
);
|
|
9201
9248
|
}
|
|
9202
9249
|
if (available.length === 0) {
|
|
9203
9250
|
throw new Error(
|
|
@@ -9574,6 +9621,24 @@ var AgentsProvider = class {
|
|
|
9574
9621
|
}
|
|
9575
9622
|
}
|
|
9576
9623
|
/** seed: "branch" forks the caller's completed turns; "snippet" prefixes recent text. */
|
|
9624
|
+
/**
|
|
9625
|
+
* Resolve the `skills` option (from the call or an agent file) against this
|
|
9626
|
+
* session's skills before anything starts. An unknown name fails here. The
|
|
9627
|
+
* resolver is imported at first use; a call without skills never loads it.
|
|
9628
|
+
*/
|
|
9629
|
+
async #applyChildSkills(args, request, context) {
|
|
9630
|
+
if (args.skills === void 0) return request;
|
|
9631
|
+
const { childSkillsSelection, resolveChildSkills, sessionSkills } = await import("./agents/child-skills.js");
|
|
9632
|
+
const selection = childSkillsSelection(args.skills);
|
|
9633
|
+
if (!selection) return request;
|
|
9634
|
+
if (request.residency === "durable") {
|
|
9635
|
+
throw new Error(
|
|
9636
|
+
`A durable agents.spawn does not accept skills (an agent file's skills and context.skills count too). Spawn without residency: "durable" or leave skills out.`
|
|
9637
|
+
);
|
|
9638
|
+
}
|
|
9639
|
+
const childSkills = resolveChildSkills(selection, sessionSkills(this.sessionCommands?.() ?? []), (message2) => context.update(message2));
|
|
9640
|
+
return { ...request, childSkills };
|
|
9641
|
+
}
|
|
9577
9642
|
#applySeed(args, request, context) {
|
|
9578
9643
|
const { seed, seedMessages } = checkedSeed2(args.seed, args.seedMessages);
|
|
9579
9644
|
if (seed === "task") return request;
|
|
@@ -17793,6 +17858,7 @@ var FabricRuntimeState = class {
|
|
|
17793
17858
|
this.prewalkDrift = options.prewalkDrift ?? new PrewalkDriftTracker();
|
|
17794
17859
|
this.sessionApprovals = options.sessionApprovals ?? new FabricSessionApprovals();
|
|
17795
17860
|
this.#actionPolicyHooks = options.actionPolicyHooks;
|
|
17861
|
+
this.#questionRenderers = options.questionRenderers;
|
|
17796
17862
|
this.thinking = options.thinking ?? new FabricThinkingController(pi, () => this.#config?.thinking?.bounds ?? {});
|
|
17797
17863
|
this.#paths = options.paths;
|
|
17798
17864
|
this.#managedHost = options.managedHost;
|
|
@@ -17803,6 +17869,7 @@ var FabricRuntimeState = class {
|
|
|
17803
17869
|
}
|
|
17804
17870
|
#registry;
|
|
17805
17871
|
#actionPolicyHooks;
|
|
17872
|
+
#questionRenderers;
|
|
17806
17873
|
#config;
|
|
17807
17874
|
#execution;
|
|
17808
17875
|
#repairs;
|
|
@@ -18297,13 +18364,14 @@ var FabricRuntimeState = class {
|
|
|
18297
18364
|
}));
|
|
18298
18365
|
const agentConfig = enforceSchema ? { ...this.#config.agents, enabled: false } : this.#config.agents;
|
|
18299
18366
|
const modelsConfig = this.#config.models;
|
|
18300
|
-
const
|
|
18367
|
+
const readPiModels = () => {
|
|
18301
18368
|
try {
|
|
18302
|
-
return context.modelRegistry.getAvailable();
|
|
18303
|
-
} catch {
|
|
18304
|
-
return [];
|
|
18369
|
+
return { models: context.modelRegistry.getAvailable() };
|
|
18370
|
+
} catch (registryError) {
|
|
18371
|
+
return { models: [], registryError };
|
|
18305
18372
|
}
|
|
18306
18373
|
};
|
|
18374
|
+
const visiblePiModels = () => readPiModels().models;
|
|
18307
18375
|
const piModelState = (models = visiblePiModels()) => {
|
|
18308
18376
|
const available = models.map((model2) => ({
|
|
18309
18377
|
provider: String(model2.provider),
|
|
@@ -18317,18 +18385,21 @@ var FabricRuntimeState = class {
|
|
|
18317
18385
|
...defaultModel ? { defaultModel } : {}
|
|
18318
18386
|
};
|
|
18319
18387
|
};
|
|
18320
|
-
const resolveParticipantPiModel = (selector) => {
|
|
18321
|
-
const models =
|
|
18388
|
+
const resolveParticipantPiModel = (selector, modelMatch) => {
|
|
18389
|
+
const { models, registryError } = readPiModels();
|
|
18322
18390
|
const state = piModelState(models);
|
|
18323
18391
|
const query = selector?.trim() || state.defaultModel || "";
|
|
18324
|
-
const resolved =
|
|
18392
|
+
const resolved = resolvePiModelSelector(query, {
|
|
18325
18393
|
aliases: state.aliases,
|
|
18326
18394
|
available: state.available,
|
|
18327
|
-
lastUsed: loadModelUsage()
|
|
18328
|
-
|
|
18395
|
+
lastUsed: loadModelUsage(),
|
|
18396
|
+
...registryError === void 0 ? {} : { registryError }
|
|
18397
|
+
}, modelMatch);
|
|
18329
18398
|
const model2 = models.find(
|
|
18399
|
+
(candidate) => String(candidate.provider) === resolved.provider && String(candidate.id) === resolved.id
|
|
18400
|
+
) ?? (modelMatch === "exact" ? void 0 : models.find(
|
|
18330
18401
|
(candidate) => String(candidate.provider).toLowerCase() === resolved.provider.toLowerCase() && String(candidate.id).toLowerCase() === resolved.id.toLowerCase()
|
|
18331
|
-
);
|
|
18402
|
+
));
|
|
18332
18403
|
if (!model2) {
|
|
18333
18404
|
throw new Error(
|
|
18334
18405
|
`Model ${JSON.stringify(query)} is not available to this Pi session. Use agents.models({ runner: "pi" }) to list the models visible to this session.`
|
|
@@ -18379,8 +18450,8 @@ var FabricRuntimeState = class {
|
|
|
18379
18450
|
keepRecentTokens: settings.keepRecentTokens
|
|
18380
18451
|
};
|
|
18381
18452
|
},
|
|
18382
|
-
preparePiModel: async (modelKey) => {
|
|
18383
|
-
const resolved = resolveParticipantPiModel(modelKey);
|
|
18453
|
+
preparePiModel: async (modelKey, options) => {
|
|
18454
|
+
const resolved = resolveParticipantPiModel(modelKey, options?.modelMatch);
|
|
18384
18455
|
const auth = await context.modelRegistry.getApiKeyAndHeaders(resolved.model);
|
|
18385
18456
|
if (!auth.ok) throw new Error(auth.error);
|
|
18386
18457
|
return resolved.key;
|
|
@@ -18391,7 +18462,14 @@ var FabricRuntimeState = class {
|
|
|
18391
18462
|
},
|
|
18392
18463
|
onBackgroundComplete: (result) => completionInbox.enqueue(result),
|
|
18393
18464
|
onResultConsumed: (id2) => completionInbox.acknowledge(id2),
|
|
18394
|
-
onChildQuestion: (request) =>
|
|
18465
|
+
onChildQuestion: (request) => {
|
|
18466
|
+
const renderers = identity.kind === "main" ? this.#questionRenderers?.active(this.#config?.ui.questionRenderers) : void 0;
|
|
18467
|
+
return routeChildQuestion(request, {
|
|
18468
|
+
context,
|
|
18469
|
+
...this.#decisions ? { store: this.#decisions } : {},
|
|
18470
|
+
...renderers ? { renderers } : {}
|
|
18471
|
+
});
|
|
18472
|
+
},
|
|
18395
18473
|
resolveChildTraceContext: (launch) => requestChildTraceContext((event, value) => this.pi.events?.emit(event, value), launch)
|
|
18396
18474
|
});
|
|
18397
18475
|
const canManageActor = (actorId) => {
|
|
@@ -18577,6 +18655,7 @@ ${escapeXmlText2(text)}
|
|
|
18577
18655
|
() => this.#config?.models ?? DEFAULT_FABRIC_CONFIG.models
|
|
18578
18656
|
);
|
|
18579
18657
|
agentsProvider.providerParticipants = providerParticipants;
|
|
18658
|
+
agentsProvider.sessionCommands = () => this.pi.getCommands();
|
|
18580
18659
|
this.#agentsProvider = agentsProvider;
|
|
18581
18660
|
this.#control.start((command, from, signal) => agentsProvider.acceptControl(command, from, signal));
|
|
18582
18661
|
try {
|
|
@@ -18793,7 +18872,6 @@ ${escapeXmlText2(advice.message)}
|
|
|
18793
18872
|
if (!this.#config || !this.#cwd) return;
|
|
18794
18873
|
next.schema.mode = this.#config.schema.mode;
|
|
18795
18874
|
this.#speculation?.reset();
|
|
18796
|
-
const previousComponents = structuredClone(this.#config.components);
|
|
18797
18875
|
deepAssign(this.#config, next);
|
|
18798
18876
|
this.#configureSpeculation();
|
|
18799
18877
|
void this.#sessionLabel?.sync();
|
|
@@ -18804,7 +18882,8 @@ ${escapeXmlText2(advice.message)}
|
|
|
18804
18882
|
if (context.hasUI) context.ui.setStatus("fabric-prewalk", void 0);
|
|
18805
18883
|
}
|
|
18806
18884
|
void (this.#componentControl?.reconcile(next.components) ?? this.#componentLoader?.reconcile(next.components))?.catch((error) => {
|
|
18807
|
-
|
|
18885
|
+
const active = this.#componentLoader?.entries();
|
|
18886
|
+
if (this.#config && active) this.#config.components = active;
|
|
18808
18887
|
const detail = error instanceof Error ? error.message : String(error);
|
|
18809
18888
|
if (context.hasUI) context.ui.notify(`Pi Fabric component reload failed: ${detail}`, "error");
|
|
18810
18889
|
});
|