@e4779/pi-fabric 0.92.28-fork.5 → 0.92.41-fork.6

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.
Files changed (236) hide show
  1. package/README.md +2 -1
  2. package/dist/actors/types.d.ts +1 -1
  3. package/dist/actors/types.d.ts.map +1 -1
  4. package/dist/agents/completion-inbox.d.ts +15 -0
  5. package/dist/agents/completion-inbox.d.ts.map +1 -0
  6. package/dist/agents/handoff.d.ts.map +1 -1
  7. package/dist/agents/manager.d.ts +1 -0
  8. package/dist/agents/manager.d.ts.map +1 -1
  9. package/dist/agents/thinking-transfer.d.ts.map +1 -1
  10. package/dist/agents/transports/process-utils.d.ts.map +1 -1
  11. package/dist/agents.js +3 -3
  12. package/dist/build-identity.d.ts +21 -0
  13. package/dist/build-identity.d.ts.map +1 -0
  14. package/dist/chunks/{chunk-CIODQX77.js → chunk-2A2NWQ36.js} +3 -3
  15. package/dist/chunks/{chunk-OTCASLY2.js → chunk-2QAOC3BO.js} +1 -1
  16. package/dist/chunks/chunk-2QAOC3BO.js.map +7 -0
  17. package/dist/chunks/{chunk-BYOGRJME.js → chunk-2SWRVIYJ.js} +10 -7
  18. package/dist/chunks/chunk-2SWRVIYJ.js.map +7 -0
  19. package/dist/chunks/{chunk-ZHJNWM6A.js → chunk-36B4AIRT.js} +2 -2
  20. package/dist/chunks/{chunk-JOEFBOFN.js → chunk-3TXOQ5MG.js} +55 -45
  21. package/dist/chunks/chunk-3TXOQ5MG.js.map +7 -0
  22. package/dist/chunks/{chunk-G7UJLM33.js → chunk-4NUTVNS2.js} +40 -6
  23. package/dist/chunks/chunk-4NUTVNS2.js.map +7 -0
  24. package/dist/chunks/{chunk-X7G62ZGH.js → chunk-7BG5COXB.js} +8 -3
  25. package/dist/chunks/{chunk-X7G62ZGH.js.map → chunk-7BG5COXB.js.map} +2 -2
  26. package/dist/chunks/{chunk-IYQ5MNCW.js → chunk-7VAZ4N43.js} +42 -24
  27. package/dist/chunks/chunk-7VAZ4N43.js.map +7 -0
  28. package/dist/chunks/{chunk-KI277YNS.js → chunk-A4VP7HDF.js} +10 -2
  29. package/dist/chunks/chunk-A4VP7HDF.js.map +7 -0
  30. package/dist/chunks/chunk-B54Z662X.js +127 -0
  31. package/dist/chunks/chunk-B54Z662X.js.map +7 -0
  32. package/dist/chunks/{chunk-QLV2IZ3F.js → chunk-CGL7QP4A.js} +58 -7
  33. package/dist/chunks/chunk-CGL7QP4A.js.map +7 -0
  34. package/dist/chunks/{chunk-WG24VI7K.js → chunk-FLKGJPCN.js} +44 -2
  35. package/dist/chunks/chunk-FLKGJPCN.js.map +7 -0
  36. package/dist/chunks/{chunk-M7W57BRC.js → chunk-GGETIGM5.js} +487 -707
  37. package/dist/chunks/chunk-GGETIGM5.js.map +7 -0
  38. package/dist/chunks/{chunk-FAMBJFFF.js → chunk-IJL3QK3J.js} +3 -1
  39. package/dist/chunks/chunk-IJL3QK3J.js.map +7 -0
  40. package/dist/chunks/{chunk-RZKN534S.js → chunk-IK6PPFWG.js} +17 -6
  41. package/dist/chunks/chunk-IK6PPFWG.js.map +7 -0
  42. package/dist/chunks/{chunk-D6YSBP3R.js → chunk-IUCVOZRX.js} +3 -3
  43. package/dist/chunks/{chunk-ULLIZPBH.js → chunk-K6DHXXF5.js} +9 -7
  44. package/dist/chunks/chunk-K6DHXXF5.js.map +7 -0
  45. package/dist/chunks/{chunk-NPHCGLGH.js → chunk-MW5VI7IW.js} +135 -31
  46. package/dist/chunks/chunk-MW5VI7IW.js.map +7 -0
  47. package/dist/chunks/{chunk-RWDKJ24D.js → chunk-NHMICIEU.js} +2 -2
  48. package/dist/chunks/{chunk-M3ZNZ6EZ.js → chunk-PMSIZLV6.js} +2 -1
  49. package/dist/chunks/chunk-PMSIZLV6.js.map +7 -0
  50. package/dist/chunks/{chunk-RAEGNBRA.js → chunk-Q4XJ4PYL.js} +529 -168
  51. package/dist/chunks/chunk-Q4XJ4PYL.js.map +7 -0
  52. package/dist/chunks/{chunk-7TX532EG.js → chunk-RKRVOBVO.js} +2 -2
  53. package/dist/chunks/{chunk-M3S7XITB.js → chunk-TGAVMUOS.js} +29 -13
  54. package/dist/chunks/chunk-TGAVMUOS.js.map +7 -0
  55. package/dist/chunks/{chunk-JNMTTJMQ.js → chunk-TX6E5W7H.js} +1 -1
  56. package/dist/chunks/{chunk-JNMTTJMQ.js.map → chunk-TX6E5W7H.js.map} +1 -1
  57. package/dist/chunks/{chunk-X3OD47CL.js → chunk-UR2K6WK6.js} +8 -11
  58. package/dist/chunks/chunk-UR2K6WK6.js.map +7 -0
  59. package/dist/chunks/{chunk-Z63R5GVN.js → chunk-WHBJDTCR.js} +6 -2
  60. package/dist/chunks/chunk-WHBJDTCR.js.map +7 -0
  61. package/dist/chunks/{chunk-RRGTKHXZ.js → chunk-X7XFT57O.js} +9 -140
  62. package/dist/chunks/{chunk-RRGTKHXZ.js.map → chunk-X7XFT57O.js.map} +4 -4
  63. package/dist/chunks/chunk-YV2PHCDB.js +108 -0
  64. package/dist/chunks/chunk-YV2PHCDB.js.map +7 -0
  65. package/dist/chunks/chunk-Z64PRP7A.js +156 -0
  66. package/dist/chunks/chunk-Z64PRP7A.js.map +7 -0
  67. package/dist/components/configuration.js +5 -4
  68. package/dist/components/provider-component.d.ts +1 -1
  69. package/dist/components/provider-component.d.ts.map +1 -1
  70. package/dist/config.d.ts +10 -0
  71. package/dist/config.d.ts.map +1 -1
  72. package/dist/core/action-registry.d.ts +8 -0
  73. package/dist/core/action-registry.d.ts.map +1 -1
  74. package/dist/core/action-registry.js +6 -4
  75. package/dist/core/approval-controller.d.ts +5 -1
  76. package/dist/core/approval-controller.d.ts.map +1 -1
  77. package/dist/core/auto-approval-classifier.d.ts +11 -0
  78. package/dist/core/auto-approval-classifier.d.ts.map +1 -1
  79. package/dist/core/compact-controller.d.ts.map +1 -1
  80. package/dist/core/fabric-state-paths.d.ts +2 -0
  81. package/dist/core/fabric-state-paths.d.ts.map +1 -0
  82. package/dist/core/media-sanitize.d.ts +3 -2
  83. package/dist/core/media-sanitize.d.ts.map +1 -1
  84. package/dist/core/model-resolution.d.ts +3 -2
  85. package/dist/core/model-resolution.d.ts.map +1 -1
  86. package/dist/core/semantic-search.d.ts +56 -0
  87. package/dist/core/semantic-search.d.ts.map +1 -0
  88. package/dist/core/shell-jobs.d.ts.map +1 -1
  89. package/dist/core/shell-middleware.d.ts +4 -0
  90. package/dist/core/shell-middleware.d.ts.map +1 -0
  91. package/dist/execution-service.d.ts.map +1 -1
  92. package/dist/fabric-exec-tool.d.ts.map +1 -1
  93. package/dist/fabric-runtime-state.d.ts +2 -0
  94. package/dist/fabric-runtime-state.d.ts.map +1 -1
  95. package/dist/fabric-runtime-state.js +1213 -208
  96. package/dist/fabric-runtime-state.js.map +4 -4
  97. package/dist/fabric-state.d.ts +2 -0
  98. package/dist/fabric-state.d.ts.map +1 -1
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +226 -49
  101. package/dist/index.js.map +4 -4
  102. package/dist/jev/client.d.ts +8 -2
  103. package/dist/jev/client.d.ts.map +1 -1
  104. package/dist/jev/client.js +3 -2
  105. package/dist/jev/config.d.ts.map +1 -1
  106. package/dist/jev/model-key.d.ts +9 -2
  107. package/dist/jev/model-key.d.ts.map +1 -1
  108. package/dist/jev/observation.js +4 -4
  109. package/dist/jev/routes.d.ts +69 -0
  110. package/dist/jev/routes.d.ts.map +1 -0
  111. package/dist/jev/validation.d.ts.map +1 -1
  112. package/dist/jev.d.ts +1 -0
  113. package/dist/jev.d.ts.map +1 -1
  114. package/dist/jev.js +34 -9
  115. package/dist/mcp.d.ts.map +1 -1
  116. package/dist/mcp.js +9 -2
  117. package/dist/mcp.js.map +2 -2
  118. package/dist/prewalk/arm.d.ts.map +1 -1
  119. package/dist/prewalk/controller.d.ts +57 -6
  120. package/dist/prewalk/controller.d.ts.map +1 -1
  121. package/dist/prewalk/fs-drift.d.ts.map +1 -1
  122. package/dist/prewalk/handoff.d.ts +5 -25
  123. package/dist/prewalk/handoff.d.ts.map +1 -1
  124. package/dist/prewalk/messages.d.ts +24 -0
  125. package/dist/prewalk/messages.d.ts.map +1 -0
  126. package/dist/prewalk/model-switch.d.ts +3 -0
  127. package/dist/prewalk/model-switch.d.ts.map +1 -0
  128. package/dist/prewalk/plan.d.ts +46 -0
  129. package/dist/prewalk/plan.d.ts.map +1 -0
  130. package/dist/prewalk/return.d.ts +16 -0
  131. package/dist/prewalk/return.d.ts.map +1 -0
  132. package/dist/protocol.d.ts +10 -1
  133. package/dist/protocol.d.ts.map +1 -1
  134. package/dist/protocol.js +3 -1
  135. package/dist/providers/agents-actions.d.ts.map +1 -1
  136. package/dist/providers/agents-provider.d.ts.map +1 -1
  137. package/dist/providers/jev-provider.d.ts +2 -0
  138. package/dist/providers/jev-provider.d.ts.map +1 -1
  139. package/dist/providers/jev-provider.js +8 -8
  140. package/dist/providers/mcp-descriptor-cache.d.ts +2 -0
  141. package/dist/providers/mcp-descriptor-cache.d.ts.map +1 -1
  142. package/dist/providers/pi-tools-provider.d.ts.map +1 -1
  143. package/dist/providers/prewalk-provider.d.ts +19 -0
  144. package/dist/providers/prewalk-provider.d.ts.map +1 -0
  145. package/dist/repeat-guard.d.ts +4 -0
  146. package/dist/repeat-guard.d.ts.map +1 -1
  147. package/dist/residency/actor-client.js +2 -2
  148. package/dist/residency/client.d.ts +3 -0
  149. package/dist/residency/client.d.ts.map +1 -1
  150. package/dist/residency/host.d.ts.map +1 -1
  151. package/dist/residency/host.js +10 -9
  152. package/dist/residency/pi-entry.js +10 -9
  153. package/dist/residency/pi-entry.js.map +1 -1
  154. package/dist/residency/protocol.d.ts +4 -0
  155. package/dist/residency/protocol.d.ts.map +1 -1
  156. package/dist/runtime/core-override-guest-types.js +2 -2
  157. package/dist/runtime/cpython-runtime.d.ts +2 -0
  158. package/dist/runtime/cpython-runtime.d.ts.map +1 -1
  159. package/dist/runtime/cpython-runtime.js +7 -3
  160. package/dist/runtime/cpython-runtime.js.map +2 -2
  161. package/dist/runtime/guest-types.d.ts +1 -1
  162. package/dist/runtime/guest-types.d.ts.map +1 -1
  163. package/dist/runtime/guest-types.js +1 -1
  164. package/dist/runtime/monty-runtime.js +5 -4
  165. package/dist/runtime/monty-runtime.js.map +2 -2
  166. package/dist/runtime/node-process-runtime.js +3 -3
  167. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  168. package/dist/runtime/quickjs-runtime.js +1 -1
  169. package/dist/runtime/typescript-kernel.js +5 -5
  170. package/dist/runtime-state-builtins.d.ts.map +1 -1
  171. package/dist/ui/code-preview-shell.d.ts.map +1 -1
  172. package/dist/ui/conversation-native-reader.d.ts.map +1 -1
  173. package/dist/ui/conversation-native-reader.js.map +2 -2
  174. package/dist/ui/dashboard.js +2 -2
  175. package/dist/ui/settings-section-context.d.ts +1 -0
  176. package/dist/ui/settings-section-context.d.ts.map +1 -1
  177. package/dist/ui/settings-sections-agents.d.ts.map +1 -1
  178. package/dist/ui/settings-sections-execution.d.ts +1 -1
  179. package/dist/ui/settings-sections-execution.d.ts.map +1 -1
  180. package/dist/ui/settings-sections.d.ts +1 -0
  181. package/dist/ui/settings-sections.d.ts.map +1 -1
  182. package/dist/ui/settings-values.d.ts +1 -0
  183. package/dist/ui/settings-values.d.ts.map +1 -1
  184. package/dist/ui/settings.d.ts.map +1 -1
  185. package/dist/ui/settings.js +57 -18
  186. package/dist/ui/settings.js.map +2 -2
  187. package/dist/ui/spinner.d.ts +8 -1
  188. package/dist/ui/spinner.d.ts.map +1 -1
  189. package/dist/worker.js +3 -13
  190. package/dist/worker.js.map +2 -2
  191. package/docs/agents.md +35 -11
  192. package/docs/configuration.md +18 -12
  193. package/docs/foreman.md +65 -0
  194. package/docs/jev.md +11 -3
  195. package/docs/programmatic-compaction.md +12 -7
  196. package/docs/shell-middleware.md +61 -0
  197. package/docs/skills.md +2 -1
  198. package/package.json +5 -4
  199. package/skillsets/python/fabric-exec/SKILL.md +1 -1
  200. package/skillsets/python/fabric-exec/references/agents.md +1 -1
  201. package/skillsets/python/fabric-exec/references/mcp.md +1 -1
  202. package/skillsets/python/fabric-foreman/SKILL.md +249 -0
  203. package/skillsets/python/fabric-guide/SKILL.md +2 -1
  204. package/skillsets/python/fabric-jev/SKILL.md +2 -2
  205. package/skillsets/typescript/fabric-exec/SKILL.md +4 -2
  206. package/skillsets/typescript/fabric-exec/references/agents.md +3 -3
  207. package/skillsets/typescript/fabric-foreman/SKILL.md +240 -0
  208. package/skillsets/typescript/fabric-guide/SKILL.md +2 -1
  209. package/skillsets/typescript/fabric-jev/SKILL.md +2 -2
  210. package/dist/chunks/chunk-2IAVP4O2.js +0 -447
  211. package/dist/chunks/chunk-2IAVP4O2.js.map +0 -7
  212. package/dist/chunks/chunk-BJOJX2UW.js +0 -59
  213. package/dist/chunks/chunk-BJOJX2UW.js.map +0 -7
  214. package/dist/chunks/chunk-BYOGRJME.js.map +0 -7
  215. package/dist/chunks/chunk-FAMBJFFF.js.map +0 -7
  216. package/dist/chunks/chunk-G7UJLM33.js.map +0 -7
  217. package/dist/chunks/chunk-IYQ5MNCW.js.map +0 -7
  218. package/dist/chunks/chunk-JOEFBOFN.js.map +0 -7
  219. package/dist/chunks/chunk-KI277YNS.js.map +0 -7
  220. package/dist/chunks/chunk-M3S7XITB.js.map +0 -7
  221. package/dist/chunks/chunk-M3ZNZ6EZ.js.map +0 -7
  222. package/dist/chunks/chunk-M7W57BRC.js.map +0 -7
  223. package/dist/chunks/chunk-NPHCGLGH.js.map +0 -7
  224. package/dist/chunks/chunk-OTCASLY2.js.map +0 -7
  225. package/dist/chunks/chunk-QLV2IZ3F.js.map +0 -7
  226. package/dist/chunks/chunk-RAEGNBRA.js.map +0 -7
  227. package/dist/chunks/chunk-RZKN534S.js.map +0 -7
  228. package/dist/chunks/chunk-ULLIZPBH.js.map +0 -7
  229. package/dist/chunks/chunk-WG24VI7K.js.map +0 -7
  230. package/dist/chunks/chunk-X3OD47CL.js.map +0 -7
  231. package/dist/chunks/chunk-Z63R5GVN.js.map +0 -7
  232. /package/dist/chunks/{chunk-CIODQX77.js.map → chunk-2A2NWQ36.js.map} +0 -0
  233. /package/dist/chunks/{chunk-ZHJNWM6A.js.map → chunk-36B4AIRT.js.map} +0 -0
  234. /package/dist/chunks/{chunk-D6YSBP3R.js.map → chunk-IUCVOZRX.js.map} +0 -0
  235. /package/dist/chunks/{chunk-RWDKJ24D.js.map → chunk-NHMICIEU.js.map} +0 -0
  236. /package/dist/chunks/{chunk-7TX532EG.js.map → chunk-RKRVOBVO.js.map} +0 -0
@@ -18,11 +18,13 @@ import type { FabricLifecycleEventType } from "./lifecycle/types.js";
18
18
  import type { FabricComponentDefinition, FabricProvider } from "./protocol.js";
19
19
  import type { FabricRuntimeState } from "./fabric-runtime-state.js";
20
20
  import type { FabricRuntimePaths } from "./runtime-paths.js";
21
+ import type { FabricLoadedFileIdentity } from "./build-identity.js";
21
22
  import { type FabricManagedHostOptions } from "./managed-host.js";
22
23
  export interface FabricStateOptions {
23
24
  managedHost?: FabricManagedHostOptions;
24
25
  paths?: FabricRuntimePaths;
25
26
  runtimeLoader?: () => Promise<typeof import("./fabric-runtime-state.js")>;
27
+ entryIdentity?: FabricLoadedFileIdentity;
26
28
  }
27
29
  type ActivationHook = (context: ExtensionContext) => void | Promise<void>;
28
30
  type ActivationFailureHook = () => void | Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"fabric-state.d.ts","sourceRoot":"","sources":["../src/fabric-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAK3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,o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,CAAC,IAAI,CAAC;CAqIhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,iCAAiC,CAAC;AA2JzC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,wBAA8B,QAAQ,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,wBAAwB,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA8vBhI;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,iCAAiC,CAAC;AAoKzC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,wBAA8B,QAAQ,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,wBAAwB,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA+wBhI;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ animationFitsViewport,
2
3
  arcItemStyled,
3
4
  captureFabricAgentPreviews,
4
5
  captureFabricCallHeadlinePreviews,
@@ -15,6 +16,7 @@ import {
15
16
  modelReadHint,
16
17
  nestedCallBody,
17
18
  nestedCallTitle,
19
+ observeAnimationRows,
18
20
  renderAgentToolPreviewLines,
19
21
  renderBoundedLines,
20
22
  renderCoreToolBody,
@@ -29,7 +31,7 @@ import {
29
31
  singleCallProgressLine,
30
32
  spinnerFrame,
31
33
  updateSpinner
32
- } from "./chunks/chunk-IYQ5MNCW.js";
34
+ } from "./chunks/chunk-7VAZ4N43.js";
33
35
  import {
34
36
  configureHighlighting,
35
37
  highlightCode,
@@ -56,20 +58,22 @@ import {
56
58
  FabricActivityStore,
57
59
  HANDOFF_COMPLETION_MESSAGE_TYPE,
58
60
  PREWALK_ARMED_MESSAGE_TYPE,
61
+ PREWALK_CONTINUE_MESSAGE_TYPE,
59
62
  PrewalkController,
60
63
  PrewalkDriftTracker,
64
+ captureLoadedFileIdentity,
61
65
  createProviderComponent,
62
66
  expandSkillDirMarkersForRead,
63
67
  expandSkillDirMarkersInSkillBlock,
64
68
  filterPrewalkContinuationMessages,
69
+ filterPrewalkPlanningDirectives,
65
70
  formatSkillsForPrompt,
66
71
  hasPrewalkArmedPrompt,
67
72
  prewalkArmedPrompt,
68
73
  resolveFabricIdentity,
69
- restoreBorrowedInPlaceMain,
70
- settleInPlacePrewalk,
74
+ setModelSafely,
71
75
  withTrajectoryRearmDirective
72
- } from "./chunks/chunk-M7W57BRC.js";
76
+ } from "./chunks/chunk-GGETIGM5.js";
73
77
  import {
74
78
  AgentTranscriptReader,
75
79
  countNewlines,
@@ -79,10 +83,10 @@ import "./chunks/chunk-DLXPTBPL.js";
79
83
  import {
80
84
  GUEST_TYPE_DECLARATIONS,
81
85
  PI_CORE_COMPATIBILITY_ARGUMENT_TYPE_NAMES
82
- } from "./chunks/chunk-WG24VI7K.js";
86
+ } from "./chunks/chunk-FLKGJPCN.js";
83
87
  import {
84
88
  NESTED_TOOL_CALL_ID_PREFIX
85
- } from "./chunks/chunk-JOEFBOFN.js";
89
+ } from "./chunks/chunk-3TXOQ5MG.js";
86
90
  import "./chunks/chunk-LMAVZN7J.js";
87
91
  import {
88
92
  AUTO_APPLY_PROPOSAL_KINDS,
@@ -174,7 +178,7 @@ import {
174
178
  ApprovalController,
175
179
  FabricAutoApprovalClassifier,
176
180
  FabricSessionApprovals
177
- } from "./chunks/chunk-NPHCGLGH.js";
181
+ } from "./chunks/chunk-MW5VI7IW.js";
178
182
  import "./chunks/chunk-XB3RJVT4.js";
179
183
  import "./chunks/chunk-7TB7NXSL.js";
180
184
  import {
@@ -182,6 +186,7 @@ import {
182
186
  setActiveCompiledSurface
183
187
  } from "./chunks/chunk-PSNXUZMY.js";
184
188
  import {
189
+ FABRIC_BASH_MIDDLEWARE,
185
190
  FABRIC_COMPONENT_DISCOVER_EVENT,
186
191
  FABRIC_COMPONENT_REGISTER_EVENT,
187
192
  FABRIC_NESTED_TOOL_CALL_ID_PREFIX,
@@ -195,11 +200,11 @@ import {
195
200
  readFabricPeerCardsRequestV1,
196
201
  readFabricPrewalkRequestV1,
197
202
  readFabricToolResultProxyDetailsV1
198
- } from "./chunks/chunk-FAMBJFFF.js";
203
+ } from "./chunks/chunk-IJL3QK3J.js";
199
204
  import {
200
205
  awaitPeerSettle,
201
206
  buildPeerCards
202
- } from "./chunks/chunk-2IAVP4O2.js";
207
+ } from "./chunks/chunk-YV2PHCDB.js";
203
208
  import {
204
209
  resolveAgentDir
205
210
  } from "./chunks/chunk-PXAICAUT.js";
@@ -210,7 +215,7 @@ import {
210
215
  loadFabricConfig,
211
216
  loadFabricConfigForScope,
212
217
  saveFabricConfig
213
- } from "./chunks/chunk-G7UJLM33.js";
218
+ } from "./chunks/chunk-4NUTVNS2.js";
214
219
  import {
215
220
  defaultCodePreviewSettings
216
221
  } from "./chunks/chunk-OKOHRXGF.js";
@@ -231,11 +236,12 @@ import "./chunks/chunk-KAD7UWT2.js";
231
236
  import "./chunks/chunk-ZDNGXLEC.js";
232
237
  import {
233
238
  FABRIC_ACTOR_PI_HOST_EVENTS
234
- } from "./chunks/chunk-OTCASLY2.js";
235
- import "./chunks/chunk-KI277YNS.js";
239
+ } from "./chunks/chunk-2QAOC3BO.js";
240
+ import "./chunks/chunk-A4VP7HDF.js";
236
241
  import "./chunks/chunk-MGWQOKBV.js";
237
242
  import "./chunks/chunk-3H7SDWZI.js";
238
- import "./chunks/chunk-X3OD47CL.js";
243
+ import "./chunks/chunk-UR2K6WK6.js";
244
+ import "./chunks/chunk-B54Z662X.js";
239
245
  import {
240
246
  FABRIC_EXECUTION_TRACE_KIND,
241
247
  FABRIC_EXECUTION_TRACE_MAX_BYTES,
@@ -300,6 +306,7 @@ var clearTimingInterval = (state) => {
300
306
  };
301
307
  var ensureTimingInterval = (state, invalidate) => {
302
308
  state.codePreviewTimingInterval ??= setInterval(() => {
309
+ if (!animationFitsViewport(state.codePreviewTimingViewport)) return;
303
310
  const token = (state.codePreviewTimingOnlyRenderToken ?? 0) + 1;
304
311
  state.codePreviewTimingOnlyRenderToken = token;
305
312
  try {
@@ -344,10 +351,15 @@ var updateTiming = (context, enabled, options = {}) => {
344
351
  }
345
352
  if (options.formatLabel === false) return void 0;
346
353
  const running = context.isPartial;
354
+ if (running && !animationFitsViewport(state.codePreviewTimingViewport)) {
355
+ return state.codePreviewTimingLabel;
356
+ }
347
357
  const endedAt = running ? Date.now() : state.codePreviewTimingEndedAt ?? Date.now();
348
358
  const durationMs = endedAt - startedAt;
349
359
  if (!Number.isFinite(durationMs) || Math.round(durationMs) <= 0) return void 0;
350
- return `${running ? "Elapsed" : "Took"} ${formatDuration2(durationMs)}`;
360
+ const label = `${running ? "Elapsed" : "Took"} ${formatDuration2(durationMs)}`;
361
+ state.codePreviewTimingLabel = label;
362
+ return label;
351
363
  };
352
364
  var TimingPreservedComponent = class {
353
365
  constructor(component, state) {
@@ -446,6 +458,7 @@ var BorderedToolCall = class {
446
458
  ...this.callComponent?.render(Math.max(1, width - 4)) ?? [],
447
459
  ...this.resultComponent?.render(Math.max(1, width - 4)) ?? []
448
460
  ];
461
+ (this.state.codePreviewTimingViewport ??= {}).renderedRows = body.length + (width < 4 ? 0 : 2);
449
462
  if (width < 4) return body;
450
463
  const innerWidth = width - 4;
451
464
  const border = (value) => this.theme.fg(this.color, value);
@@ -746,12 +759,13 @@ var armFabricPrewalkSession = async (state, context, pi, input) => {
746
759
  sessionId,
747
760
  ...input.task ? { task: input.task } : {},
748
761
  ...prewalk.thinking ? { thinking: prewalk.thinking } : {},
749
- alwaysRearm: prewalk.alwaysRearm
762
+ alwaysRearm: prewalk.alwaysRearm,
763
+ requirePlan: prewalk.requirePlan
750
764
  });
751
765
  if (prewalk.detectShellWrites) {
752
766
  await state.prewalkDrift.captureBaseline(sessionId, context.cwd);
753
767
  }
754
- const armedPrompt = prewalkArmedPrompt(prewalk.mode, input.model);
768
+ const armedPrompt = prewalkArmedPrompt(prewalk.mode, input.model, prewalk.requirePlan);
755
769
  if (!hasPrewalkArmedPrompt(context.sessionManager.getBranch(), armedPrompt)) {
756
770
  pi.sendMessage(
757
771
  {
@@ -772,6 +786,10 @@ var autoArmFabricPrewalk = async (state, context, pi) => {
772
786
  return void 0;
773
787
  }
774
788
  if (state.prewalk.status().state !== "idle") return void 0;
789
+ const borrowed = state.prewalk.borrowedReturn();
790
+ if (borrowed && context.model && `${context.model.provider}/${context.model.id}` === borrowed.executorModel) {
791
+ return "Fabric prewalk auto-arm skipped: Main is still on the executor after a failed in-place return. Restart the session or run /fabric reload to retry the return, or arm prewalk explicitly.";
792
+ }
775
793
  if (!state.config.fullCodeMode || state.config.schema.mode === "enforce") {
776
794
  return "Fabric prewalk auto-arm skipped: requires full code mode with Schema enforce mode disabled.";
777
795
  }
@@ -786,6 +804,128 @@ var autoArmFabricPrewalk = async (state, context, pi) => {
786
804
  return void 0;
787
805
  };
788
806
 
807
+ // src/prewalk/return.ts
808
+ var modelForReturnKey = (key, context) => {
809
+ const separator = key.indexOf("/");
810
+ if (separator <= 0 || separator === key.length - 1) return void 0;
811
+ return context.modelRegistry.find(key.slice(0, separator), key.slice(separator + 1));
812
+ };
813
+ var PREWALK_RETURN_COMPACTION_INSTRUCTIONS = [
814
+ "Compact before Main returns to its boundary model after an in-place prewalk continuation.",
815
+ "Preserve the executor's final report and verification results; summarize implementation scratch work, file reads, and command output."
816
+ ].join(" ");
817
+ var prewalkRecoveryCandidate = (branch) => {
818
+ let continuationIndex = -1;
819
+ let details;
820
+ for (let index = branch.length - 1; index >= 0; index -= 1) {
821
+ const entry = branch[index];
822
+ if (entry?.type !== "custom_message" || entry.customType !== PREWALK_CONTINUE_MESSAGE_TYPE) {
823
+ continue;
824
+ }
825
+ if (typeof entry.details !== "object" || entry.details === null) continue;
826
+ if (entry.details.mode !== "in-place") continue;
827
+ continuationIndex = index;
828
+ details = entry.details;
829
+ break;
830
+ }
831
+ if (continuationIndex < 0 || !details) return void 0;
832
+ const continuationId = typeof details.continuationId === "string" ? details.continuationId : "";
833
+ const executorModel = typeof details.model === "string" ? details.model.trim() : "";
834
+ const returnModel = typeof details.returnModel === "string" ? details.returnModel.trim() : "";
835
+ if (!continuationId || !executorModel || !returnModel || returnModel === executorModel) {
836
+ return void 0;
837
+ }
838
+ let recordedExecutor;
839
+ for (let index = 0; index < branch.length; index += 1) {
840
+ const entry = branch[index];
841
+ if (entry?.type !== "model_change") continue;
842
+ if (index > continuationIndex) return void 0;
843
+ recordedExecutor = `${String(entry.provider)}/${String(entry.modelId)}`;
844
+ }
845
+ return recordedExecutor === executorModel ? { returnModel, executorModel } : void 0;
846
+ };
847
+ var restoreBorrowedInPlaceMain = async (controller, extension, context) => {
848
+ let borrowed = controller?.borrowedReturn?.();
849
+ let recovered = false;
850
+ if (!borrowed) {
851
+ const candidate = prewalkRecoveryCandidate(context.sessionManager?.getBranch?.() ?? []);
852
+ if (!candidate || !controller.hydrateBorrowedMain(candidate)) return false;
853
+ borrowed = candidate;
854
+ recovered = true;
855
+ }
856
+ const currentKey = context.model ? `${context.model.provider}/${context.model.id}` : void 0;
857
+ if (currentKey !== void 0 && currentKey !== borrowed.executorModel) return false;
858
+ if (currentKey === borrowed.returnModel) return false;
859
+ const model = modelForReturnKey(borrowed.returnModel, context);
860
+ if (!model) {
861
+ context.ui.setStatus("fabric-prewalk", `return failed \u2192 ${borrowed.returnModel}`);
862
+ context.ui.notify(
863
+ `Prewalk left Main on the executor; could not restore unavailable model ${borrowed.returnModel}.`,
864
+ "error"
865
+ );
866
+ return false;
867
+ }
868
+ const restored = await setModelSafely(extension, model);
869
+ if (!restored) {
870
+ context.ui.setStatus("fabric-prewalk", `return failed \u2192 ${borrowed.returnModel}`);
871
+ context.ui.notify(
872
+ `Prewalk left Main on the executor; could not return to ${borrowed.returnModel}. Check model authentication.`,
873
+ "error"
874
+ );
875
+ return false;
876
+ }
877
+ if (recovered) controller.clearBorrowed();
878
+ context.ui.notify(`Restored Main to ${borrowed.returnModel} after in-place prewalk.`, "info");
879
+ return true;
880
+ };
881
+ var settleInPlacePrewalk = async (controller, extension, context, options) => {
882
+ const sessionId = context.sessionManager.getSessionId();
883
+ const settlement = controller.takeContinuationSettlement(sessionId);
884
+ if (!settlement) return false;
885
+ const model = modelForReturnKey(settlement.returnModel, context);
886
+ if (!model) {
887
+ controller.cancel();
888
+ context.ui.setStatus("fabric-prewalk", `return failed \u2192 ${settlement.returnModel}`);
889
+ context.ui.notify(
890
+ `Prewalk completed, but Main could not return to unavailable model ${settlement.returnModel}.`,
891
+ "error"
892
+ );
893
+ return false;
894
+ }
895
+ context.ui.setStatus("fabric-prewalk", `returning Main \u2192 ${settlement.returnModel}`);
896
+ if (options?.compact && options.compactOnReturn !== false) {
897
+ if (!options.compact.status?.().pending) {
898
+ options.compact.request({
899
+ reason: "in-place prewalk return",
900
+ instructions: PREWALK_RETURN_COMPACTION_INSTRUCTIONS,
901
+ requestedBy: "prewalk"
902
+ });
903
+ }
904
+ await options.compact.maybeCommit(context);
905
+ }
906
+ const restored = await setModelSafely(extension, model);
907
+ if (!restored) {
908
+ controller.cancel();
909
+ context.ui.setStatus("fabric-prewalk", `return failed \u2192 ${settlement.returnModel}`);
910
+ context.ui.notify(
911
+ `Prewalk completed, but Main could not return to ${settlement.returnModel}. Check model authentication.`,
912
+ "error"
913
+ );
914
+ return false;
915
+ }
916
+ controller.finishContinuation(sessionId, settlement.continuationId);
917
+ const status = controller.status();
918
+ context.ui.setStatus(
919
+ "fabric-prewalk",
920
+ status.state === "armed" ? `armed \u2192 ${status.model}` : void 0
921
+ );
922
+ context.ui.notify(
923
+ status.state === "armed" ? `Prewalk complete. Main returned to ${settlement.returnModel} and re-armed for the next task.` : `Prewalk complete. Main returned to ${settlement.returnModel}.`,
924
+ "info"
925
+ );
926
+ return true;
927
+ };
928
+
789
929
  // src/ui/conversation-shortcut.ts
790
930
  var FABRIC_CONVERSATION_SHORTCUT = "ctrl+shift+a";
791
931
  var FABRIC_CONVERSATION_HINT = "ctrl+shift+a chat";
@@ -2313,21 +2453,6 @@ var buildSkillReferenceGuidance = (prompt, skills) => {
2313
2453
  import { Container as Container2, Text as Text2 } from "@earendil-works/pi-tui";
2314
2454
  import { Type } from "typebox";
2315
2455
 
2316
- // src/repeat-guard.ts
2317
- var FabricRepeatGuard = class {
2318
- constructor(warnAt, blockAt) {
2319
- this.warnAt = warnAt;
2320
- this.blockAt = blockAt;
2321
- }
2322
- #code;
2323
- #count = 0;
2324
- observe(code) {
2325
- this.#count = code === this.#code ? this.#count + 1 : 1;
2326
- this.#code = code;
2327
- return { count: this.#count, blocked: this.#count >= this.blockAt, warn: this.#count >= this.warnAt };
2328
- }
2329
- };
2330
-
2331
2456
  // src/failure-progress.ts
2332
2457
  var MAX_COMPLETED_CALLS = 8;
2333
2458
  var MAX_PATH_CHARS = 100;
@@ -2432,6 +2557,25 @@ var prepareFabricExecArguments = (input, kernel = "typescript") => {
2432
2557
  return prepared;
2433
2558
  };
2434
2559
 
2560
+ // src/repeat-guard.ts
2561
+ var FABRIC_REPEAT_WARN = 3;
2562
+ var FABRIC_REPEAT_BLOCK = 6;
2563
+ var fabricRepeatWarnText = (count, blockAt) => `[circuit-breaker] identical fabric_exec code has now run ${count} times in a row; at ${blockAt} identical runs will be blocked. Change the approach or finish your turn.`;
2564
+ var fabricRepeatBlockText = (count) => `Circuit breaker: this exact fabric_exec code has now executed ${count} times in a row and was blocked. Re-running identical code adds no information. Summarize what you already know and finish your turn; if the call is genuinely required, change the code materially.`;
2565
+ var FabricRepeatGuard = class {
2566
+ constructor(warnAt, blockAt) {
2567
+ this.warnAt = warnAt;
2568
+ this.blockAt = blockAt;
2569
+ }
2570
+ #code;
2571
+ #count = 0;
2572
+ observe(code) {
2573
+ this.#count = code === this.#code ? this.#count + 1 : 1;
2574
+ this.#code = code;
2575
+ return { count: this.#count, blocked: this.#count >= this.blockAt, warn: this.#count >= this.warnAt };
2576
+ }
2577
+ };
2578
+
2435
2579
  // src/runtime/core-tool-properties.ts
2436
2580
  var CORE_TOOL_NAMES = Object.keys(
2437
2581
  PI_CORE_COMPATIBILITY_ARGUMENT_TYPE_NAMES
@@ -2740,8 +2884,6 @@ var compactResultHeader = (theme, audits, failed) => {
2740
2884
  );
2741
2885
  };
2742
2886
  var countLabel = (count, singular) => `${count} ${count === 1 ? singular : `${singular}s`}`;
2743
- var FABRIC_REPEAT_WARN = 3;
2744
- var FABRIC_REPEAT_BLOCK = 6;
2745
2887
  var createFabricExecTool = (state, codePreviewSettings, pendingHandoffs, decorateShell = withCodePreviewShell, toolDisplay) => {
2746
2888
  const python = toolKernel(state) === "python";
2747
2889
  const monty = python && state.config.executor.pythonRuntime === "monty";
@@ -2879,7 +3021,7 @@ var createFabricExecTool = (state, codePreviewSettings, pendingHandoffs, decorat
2879
3021
  composite2.addChild(header);
2880
3022
  composite2.addChild(new Text2("\n", 0, 0));
2881
3023
  composite2.addChild(writePreview);
2882
- return composite2;
3024
+ return observeAnimationRows(composite2, rendererState.fabricSpinner ??= {});
2883
3025
  }
2884
3026
  const lines = safeTerminalText(code).split("\n");
2885
3027
  const runDisplay = normalizeRunDisplay(params.display);
@@ -2916,7 +3058,7 @@ ${preview}` : ""}${hiddenHint}`,
2916
3058
  composite.addChild(codePreview);
2917
3059
  composite.addChild(new Text2("\n", 0, 0));
2918
3060
  composite.addChild(writePreview);
2919
- return composite;
3061
+ return observeAnimationRows(composite, rendererState.fabricSpinner ??= {});
2920
3062
  },
2921
3063
  renderResult(result, { expanded, isPartial }, theme, context) {
2922
3064
  observePiTheme(theme);
@@ -2941,7 +3083,7 @@ ${preview}` : ""}${hiddenHint}`,
2941
3083
  );
2942
3084
  const rowBalance = rendererState.fabricResultRowBalance ??= {};
2943
3085
  const trackRows = (component) => observeResultRows(
2944
- inheritComponentBackground(component),
3086
+ observeAnimationRows(inheritComponentBackground(component), rendererState.fabricSpinner ??= {}),
2945
3087
  rowBalance,
2946
3088
  { expanded, isPartial }
2947
3089
  );
@@ -3327,11 +3469,12 @@ ${preview}` : ""}${hiddenHint}`,
3327
3469
  const repeat = repeatGuard.observe(code);
3328
3470
  if (repeat.blocked) {
3329
3471
  return {
3330
- content: [{ type: "text", text: `Circuit breaker: this exact fabric_exec code has now executed ${repeat.count} times in a row and was blocked. Re-running identical code adds no information. Summarize what you already know and finish your turn; if the call is genuinely required, change the code materially.` }],
3472
+ content: [{ type: "text", text: fabricRepeatBlockText(repeat.count) }],
3331
3473
  isError: true,
3332
3474
  details: void 0
3333
3475
  };
3334
3476
  }
3477
+ const runDisplay = normalizeRunDisplay(params.display);
3335
3478
  const strings = resolveFabricExecPayloads(params);
3336
3479
  const tokenBudget = "tokenBudget" in params && typeof params.tokenBudget === "number" ? params.tokenBudget : void 0;
3337
3480
  const result = await state.execution.execute({
@@ -3343,6 +3486,12 @@ ${preview}` : ""}${hiddenHint}`,
3343
3486
  ...tokenBudget !== void 0 ? { tokenBudget } : {},
3344
3487
  ...params.agentBudget !== void 0 ? { maxAgentCalls: params.agentBudget } : {},
3345
3488
  ...params.timeoutMs !== void 0 ? { requestedTimeoutMs: params.timeoutMs } : {},
3489
+ ...runDisplay ? {
3490
+ display: {
3491
+ ...runDisplay.name !== void 0 && { name: runDisplay.name },
3492
+ ...runDisplay.description !== void 0 && { description: runDisplay.description }
3493
+ }
3494
+ } : {},
3346
3495
  onPartial(snapshot) {
3347
3496
  onUpdate?.({
3348
3497
  content: [{ type: "text", text: snapshot.progress ?? "" }],
@@ -3355,9 +3504,10 @@ ${preview}` : ""}${hiddenHint}`,
3355
3504
  }
3356
3505
  });
3357
3506
  const selectedResultFormat = params.resultFormat ?? state.config.executor.resultFormat;
3507
+ const boundarySessionId = context.sessionManager.getSessionId();
3358
3508
  const pendingHandoff = await state.claimHandoff(
3359
3509
  result,
3360
- context.sessionManager.getSessionId(),
3510
+ boundarySessionId,
3361
3511
  selectedResultFormat,
3362
3512
  toolCallId
3363
3513
  );
@@ -3367,6 +3517,18 @@ ${preview}` : ""}${hiddenHint}`,
3367
3517
  "fabric-prewalk",
3368
3518
  `waiting for fabric_exec boundary \u2192 ${String(pendingHandoff.args.model ?? "executor")}`
3369
3519
  );
3520
+ if (pendingHandoff.readiness?.kind === "unplanned") {
3521
+ context.ui.notify(
3522
+ `Prewalk: handing off without a recorded plan after ${pendingHandoff.readiness.prompts} reminders.`,
3523
+ "warning"
3524
+ );
3525
+ }
3526
+ } else if (state.prewalk.planRequired(boundarySessionId)) {
3527
+ const prewalkStatus = state.prewalk.status();
3528
+ context.ui.setStatus(
3529
+ "fabric-prewalk",
3530
+ prewalkStatus.state === "armed" ? `plan awaited \u2192 ${prewalkStatus.model}` : void 0
3531
+ );
3370
3532
  }
3371
3533
  const fullFormattedValue = formatFabricValue(result.value, selectedResultFormat);
3372
3534
  const failureProgress = formatFailureProgress(result.trace);
@@ -3374,9 +3536,7 @@ ${preview}` : ""}${hiddenHint}`,
3374
3536
  if (fullFormattedValue.text) fullSections.push(fullFormattedValue.text);
3375
3537
  if (result.error) fullSections.push(`Runtime error: ${result.error}`);
3376
3538
  if (failureProgress) fullSections.push(failureProgress);
3377
- if (repeat.warn) {
3378
- fullSections.push(`[circuit-breaker] identical fabric_exec code has now run ${repeat.count} times in a row; at ${FABRIC_REPEAT_BLOCK} identical runs will be blocked. Change the approach or finish your turn.`);
3379
- }
3539
+ if (repeat.warn) fullSections.push(fabricRepeatWarnText(repeat.count, FABRIC_REPEAT_BLOCK));
3380
3540
  const fullRawOutput = fullSections.join("\n\n");
3381
3541
  const outputBudget = modelOutputBudget(
3382
3542
  state.config.executor.maxOutputChars,
@@ -3393,6 +3553,7 @@ ${preview}` : ""}${hiddenHint}`,
3393
3553
  if (formattedValue.text) sections.push(formattedValue.text);
3394
3554
  if (result.error) sections.push(`Runtime error: ${result.error}`);
3395
3555
  if (failureProgress) sections.push(failureProgress);
3556
+ if (repeat.warn) sections.push(fabricRepeatWarnText(repeat.count, FABRIC_REPEAT_BLOCK));
3396
3557
  const rawOutput = sections.join("\n\n");
3397
3558
  const outputFormat = formattedValue.language && formattedValue.text && (result.logs.length === 0 || !outputWillTruncate) ? formattedValue.language : void 0;
3398
3559
  const outputFormatStartLine = result.logs.length > 0 ? countNewlines(logPrefix) + 2 : 0;
@@ -3426,7 +3587,8 @@ ${recoveryHint}` : ""}`,
3426
3587
  outputBudget,
3427
3588
  fullRawOutput || "(no output)"
3428
3589
  )).text;
3429
- const terminate = pendingHandoff !== void 0 || result.success && typeof result.value === "object" && result.value !== null && "terminate" in result.value && result.value.terminate === true;
3590
+ const inPlaceContinuation = pendingHandoff?.kind === "prewalk-in-place";
3591
+ const terminate = !inPlaceContinuation && (pendingHandoff !== void 0 || result.success && typeof result.value === "object" && result.value !== null && "terminate" in result.value && result.value.terminate === true);
3430
3592
  const mediaBlocks = [];
3431
3593
  for (const block of result.media ?? []) mediaBlocks.push(block);
3432
3594
  for (const audit of result.audits) {
@@ -3560,6 +3722,7 @@ var FabricState = class {
3560
3722
  this.capturedTools = capturedTools;
3561
3723
  this.#options = options;
3562
3724
  this.#managedHost = options.managedHost ? new FabricManagedHost(options.managedHost) : void 0;
3725
+ this.#entryIdentity = options.entryIdentity;
3563
3726
  }
3564
3727
  #runtime;
3565
3728
  #activatingRuntime;
@@ -3576,6 +3739,7 @@ var FabricState = class {
3576
3739
  #externalComponents = /* @__PURE__ */ new Map();
3577
3740
  #options;
3578
3741
  #managedHost;
3742
+ #entryIdentity;
3579
3743
  activity = new FabricActivityStore();
3580
3744
  prewalk = new PrewalkController();
3581
3745
  prewalkDrift = new PrewalkDriftTracker();
@@ -3959,7 +4123,8 @@ var FabricState = class {
3959
4123
  prewalk: this.prewalk,
3960
4124
  prewalkDrift: this.prewalkDrift,
3961
4125
  sessionApprovals: this.sessionApprovals,
3962
- ...this.#options.paths ? { paths: this.#options.paths } : {}
4126
+ ...this.#options.paths ? { paths: this.#options.paths } : {},
4127
+ ...this.#entryIdentity ? { entryIdentity: this.#entryIdentity } : {}
3963
4128
  }
3964
4129
  );
3965
4130
  }
@@ -5432,6 +5597,7 @@ var FABRIC_RUNTIME_PATHS = {
5432
5597
  skills: path10.resolve(FABRIC_ENTRY_DIR, "..", "skillsets")
5433
5598
  };
5434
5599
  var FABRIC_SKILLS_DIR = FABRIC_RUNTIME_PATHS.skills;
5600
+ var FABRIC_ENTRY_IDENTITY = captureLoadedFileIdentity(import.meta.url);
5435
5601
  var componentRegistrationFrom = (value) => {
5436
5602
  if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
5437
5603
  const registration = value;
@@ -5463,7 +5629,11 @@ async function piFabric(pi, options = {}) {
5463
5629
  );
5464
5630
  const capturedTools = new CapturedToolCatalog();
5465
5631
  const proxyContract = new ProxyContractLedger();
5466
- const state = new FabricState(pi, capturedTools, { paths: FABRIC_RUNTIME_PATHS, ...options.managedHost ? { managedHost: options.managedHost } : {} });
5632
+ const state = new FabricState(pi, capturedTools, {
5633
+ paths: FABRIC_RUNTIME_PATHS,
5634
+ ...FABRIC_ENTRY_IDENTITY ? { entryIdentity: FABRIC_ENTRY_IDENTITY } : {},
5635
+ ...options.managedHost ? { managedHost: options.managedHost } : {}
5636
+ });
5467
5637
  const directToolApproval = new FabricDirectToolApproval(
5468
5638
  pi,
5469
5639
  () => state.config,
@@ -5866,8 +6036,8 @@ async function piFabric(pi, options = {}) {
5866
6036
  message: {
5867
6037
  ...event.message,
5868
6038
  content: [{ type: "text", text }],
5869
- details,
5870
- isError: !boundarySucceeded
6039
+ isError: !boundarySucceeded,
6040
+ ...details === void 0 ? {} : { details }
5871
6041
  }
5872
6042
  };
5873
6043
  });
@@ -5901,12 +6071,18 @@ async function piFabric(pi, options = {}) {
5901
6071
  });
5902
6072
  pi.on("context", (event, context) => {
5903
6073
  const sessionId = context.sessionManager.getSessionId();
6074
+ const pendingContinuation = state.initialized ? state.prewalk.pendingContinuationMessage(sessionId) : void 0;
5904
6075
  const continuation = filterPrewalkContinuationMessages(
5905
6076
  event.messages,
5906
- (continuationId) => state.initialized && state.prewalk.acceptContinuation(sessionId, continuationId)
6077
+ (continuationId) => state.initialized && state.prewalk.acceptContinuation(sessionId, continuationId),
6078
+ pendingContinuation
6079
+ );
6080
+ const planning = filterPrewalkPlanningDirectives(
6081
+ continuation.messages,
6082
+ state.initialized && state.prewalk.isArmed(sessionId)
5907
6083
  );
5908
- let changed = continuation.changed;
5909
- const messages = continuation.messages.map((message) => {
6084
+ let changed = continuation.changed || planning.changed;
6085
+ const messages = planning.messages.map((message) => {
5910
6086
  if (message.role !== "user") return message;
5911
6087
  if (typeof message.content === "string") {
5912
6088
  const content2 = expandSkillDirMarkersInSkillBlock(message.content);
@@ -6049,6 +6225,7 @@ export {
6049
6225
  ENTROPY_INVOCATION_STAGES,
6050
6226
  ENTROPY_METRIC_VERSION,
6051
6227
  ENTROPY_WEIGHTS,
6228
+ FABRIC_BASH_MIDDLEWARE,
6052
6229
  FABRIC_COMPONENT_DISCOVER_EVENT,
6053
6230
  FABRIC_COMPONENT_REGISTER_EVENT,
6054
6231
  FABRIC_EXECUTION_DETAILS_MAX_BYTES,