@e4779/pi-fabric 0.105.0-fork.18 → 0.109.2-fork.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/README.md +3 -1
  2. package/dist/actors/global-registry.d.ts.map +1 -1
  3. package/dist/agents/manager.d.ts.map +1 -1
  4. package/dist/agents/result.d.ts.map +1 -1
  5. package/dist/agents/result.js +1 -1
  6. package/dist/agents/runner-registry.d.ts +1 -1
  7. package/dist/agents/runner-registry.d.ts.map +1 -1
  8. package/dist/agents.js +5 -5
  9. package/dist/chunks/{chunk-5MNLVHF5.js → chunk-3DUKKQHN.js} +28 -13
  10. package/dist/chunks/chunk-3DUKKQHN.js.map +7 -0
  11. package/dist/chunks/{chunk-GJVPP3NN.js → chunk-3SHUUBZJ.js} +4 -4
  12. package/dist/chunks/chunk-3SHUUBZJ.js.map +7 -0
  13. package/dist/chunks/{chunk-VON4TSO3.js → chunk-CZPQTISQ.js} +27 -2
  14. package/dist/chunks/chunk-CZPQTISQ.js.map +7 -0
  15. package/dist/chunks/{chunk-WLLXKS6I.js → chunk-DU6ZA44F.js} +4 -4
  16. package/dist/chunks/{chunk-QLFDPXK7.js → chunk-DV2JZSCI.js} +153 -27
  17. package/dist/chunks/chunk-DV2JZSCI.js.map +7 -0
  18. package/dist/chunks/{chunk-KQ6R5EWR.js → chunk-FRPNQZV2.js} +24 -22
  19. package/dist/chunks/chunk-FRPNQZV2.js.map +7 -0
  20. package/dist/chunks/{chunk-W7X4XEQU.js → chunk-GC2AUXG6.js} +2 -2
  21. package/dist/chunks/chunk-K6QXUGS5.js +30 -0
  22. package/dist/chunks/chunk-K6QXUGS5.js.map +7 -0
  23. package/dist/chunks/{chunk-VPRJOD4Y.js → chunk-LEDY5G2V.js} +2 -2
  24. package/dist/chunks/{chunk-OVBKQCYL.js → chunk-N2VKKA7O.js} +2 -2
  25. package/dist/chunks/{chunk-N5GUXC6F.js → chunk-P4KH4S4S.js} +2 -1
  26. package/dist/chunks/chunk-P4KH4S4S.js.map +7 -0
  27. package/dist/chunks/{chunk-TFFZVLR2.js → chunk-PF27MQY5.js} +55 -4
  28. package/dist/chunks/chunk-PF27MQY5.js.map +7 -0
  29. package/dist/chunks/{chunk-CGL7QP4A.js → chunk-PK4NIJEV.js} +10 -1
  30. package/dist/chunks/{chunk-CGL7QP4A.js.map → chunk-PK4NIJEV.js.map} +2 -2
  31. package/dist/chunks/{chunk-YRDCJZZW.js → chunk-RUO6L7RM.js} +1 -1
  32. package/dist/chunks/{chunk-YRDCJZZW.js.map → chunk-RUO6L7RM.js.map} +1 -1
  33. package/dist/chunks/{chunk-4RTHQGES.js → chunk-ST36EYHN.js} +4 -4
  34. package/dist/chunks/chunk-ST36EYHN.js.map +7 -0
  35. package/dist/chunks/{chunk-R5F6CHW2.js → chunk-UXEMIWYI.js} +12 -7
  36. package/dist/chunks/chunk-UXEMIWYI.js.map +7 -0
  37. package/dist/chunks/{chunk-SGFH5PYA.js → chunk-V2SKDVQX.js} +10 -9
  38. package/dist/chunks/chunk-V2SKDVQX.js.map +7 -0
  39. package/dist/chunks/{chunk-KYXZJNV6.js → chunk-VTK2FEH7.js} +3 -1
  40. package/dist/chunks/{chunk-KYXZJNV6.js.map → chunk-VTK2FEH7.js.map} +2 -2
  41. package/dist/chunks/{chunk-3QECYQGA.js → chunk-VYQV5JRT.js} +13 -1
  42. package/dist/chunks/chunk-VYQV5JRT.js.map +7 -0
  43. package/dist/chunks/{chunk-3KDUMDPZ.js → chunk-X3CHSIL2.js} +5 -5
  44. package/dist/chunks/{chunk-6VXPACGC.js → chunk-YJX27XBO.js} +100 -22
  45. package/dist/chunks/chunk-YJX27XBO.js.map +7 -0
  46. package/dist/components/configuration.js +2 -2
  47. package/dist/config.d.ts +16 -1
  48. package/dist/config.d.ts.map +1 -1
  49. package/dist/core/action-registry.d.ts +1 -1
  50. package/dist/core/action-registry.d.ts.map +1 -1
  51. package/dist/core/action-registry.js +2 -2
  52. package/dist/core/media-sanitize.d.ts.map +1 -1
  53. package/dist/core/native-tool-names.d.ts +9 -0
  54. package/dist/core/native-tool-names.d.ts.map +1 -0
  55. package/dist/core/native-tool-result.d.ts +11 -0
  56. package/dist/core/native-tool-result.d.ts.map +1 -0
  57. package/dist/core/system-guidance.d.ts +3 -3
  58. package/dist/core/system-guidance.d.ts.map +1 -1
  59. package/dist/durable/agent.d.ts +77 -0
  60. package/dist/durable/agent.d.ts.map +1 -0
  61. package/dist/durable/session.d.ts +19 -0
  62. package/dist/durable/session.d.ts.map +1 -0
  63. package/dist/durable/storage.d.ts +7 -0
  64. package/dist/durable/storage.d.ts.map +1 -0
  65. package/dist/durable/worker-host.d.ts +13 -0
  66. package/dist/durable/worker-host.d.ts.map +1 -0
  67. package/dist/durable/worker-host.js +1149 -0
  68. package/dist/durable/worker-host.js.map +7 -0
  69. package/dist/durable/worker-options.d.ts +17 -0
  70. package/dist/durable/worker-options.d.ts.map +1 -0
  71. package/dist/durable/worker.d.ts +3 -0
  72. package/dist/durable/worker.d.ts.map +1 -0
  73. package/dist/durable/worker.js +110 -0
  74. package/dist/durable/worker.js.map +7 -0
  75. package/dist/durable-controls.d.ts +27 -0
  76. package/dist/durable-controls.d.ts.map +1 -0
  77. package/dist/durable-input.d.ts +13 -0
  78. package/dist/durable-input.d.ts.map +1 -0
  79. package/dist/durable.d.ts +6 -0
  80. package/dist/durable.d.ts.map +1 -1
  81. package/dist/durable.js +194 -24
  82. package/dist/durable.js.map +4 -4
  83. package/dist/execution-service.d.ts +4 -0
  84. package/dist/execution-service.d.ts.map +1 -1
  85. package/dist/extension-bootstrap.js +5 -5
  86. package/dist/extension.d.ts.map +1 -1
  87. package/dist/fabric-exec-arguments.d.ts.map +1 -1
  88. package/dist/fabric-exec-tool.d.ts.map +1 -1
  89. package/dist/fabric-runtime-state.d.ts.map +1 -1
  90. package/dist/fabric-runtime-state.js +633 -291
  91. package/dist/fabric-runtime-state.js.map +4 -4
  92. package/dist/index.js +5 -5
  93. package/dist/jev/observation.js +2 -2
  94. package/dist/jev.js +3 -3
  95. package/dist/mcp.js +1 -1
  96. package/dist/memory/extractive-history.d.ts +29 -0
  97. package/dist/memory/extractive-history.d.ts.map +1 -0
  98. package/dist/memory/extractive-history.js +340 -0
  99. package/dist/memory/extractive-history.js.map +7 -0
  100. package/dist/memory/extractive-index.d.ts +46 -0
  101. package/dist/memory/extractive-index.d.ts.map +1 -0
  102. package/dist/native-codemode.d.ts +34 -0
  103. package/dist/native-codemode.d.ts.map +1 -0
  104. package/dist/native-discovery.d.ts +16 -0
  105. package/dist/native-discovery.d.ts.map +1 -0
  106. package/dist/native-discovery.js +19 -0
  107. package/dist/native-discovery.js.map +7 -0
  108. package/dist/native-image-artifacts.d.ts +4 -0
  109. package/dist/native-image-artifacts.d.ts.map +1 -0
  110. package/dist/native-image-artifacts.js +18 -0
  111. package/dist/native-image-artifacts.js.map +7 -0
  112. package/dist/native-tool-catalog.d.ts +21 -0
  113. package/dist/native-tool-catalog.d.ts.map +1 -0
  114. package/dist/native-tool-catalog.js +71 -0
  115. package/dist/native-tool-catalog.js.map +7 -0
  116. package/dist/protocol.d.ts +2 -0
  117. package/dist/protocol.d.ts.map +1 -1
  118. package/dist/protocol.js +1 -1
  119. package/dist/providers/agents-provider.d.ts.map +1 -1
  120. package/dist/providers/captured-tools-provider.d.ts +1 -1
  121. package/dist/providers/captured-tools-provider.d.ts.map +1 -1
  122. package/dist/providers/jev-provider.js +3 -3
  123. package/dist/providers/mcp-provider.d.ts +1 -1
  124. package/dist/providers/mcp-provider.d.ts.map +1 -1
  125. package/dist/providers/pi-native-mcp.d.ts.map +1 -1
  126. package/dist/providers/pi-tools-provider.d.ts.map +1 -1
  127. package/dist/residency/host.js +7 -7
  128. package/dist/residency/pi-entry.js +7 -7
  129. package/dist/runners.js +1 -1
  130. package/dist/runtime/core-override-guest-types.js +2 -2
  131. package/dist/runtime/dynamic-guest-types.d.ts +2 -0
  132. package/dist/runtime/dynamic-guest-types.d.ts.map +1 -1
  133. package/dist/runtime/dynamic-guest-types.js +5 -3
  134. package/dist/runtime/guest-types.d.ts +1 -1
  135. package/dist/runtime/guest-types.d.ts.map +1 -1
  136. package/dist/runtime/guest-types.js +1 -1
  137. package/dist/runtime/kernel.d.ts +5 -0
  138. package/dist/runtime/kernel.d.ts.map +1 -1
  139. package/dist/runtime/monty-runtime.js +1 -1
  140. package/dist/runtime/native-codemode-guest.d.ts +2 -0
  141. package/dist/runtime/native-codemode-guest.d.ts.map +1 -0
  142. package/dist/runtime/native-codemode-types.d.ts +2 -0
  143. package/dist/runtime/native-codemode-types.d.ts.map +1 -0
  144. package/dist/runtime/node-process-child-source.d.ts.map +1 -1
  145. package/dist/runtime/node-process-runtime.d.ts.map +1 -1
  146. package/dist/runtime/node-process-runtime.js +3 -3
  147. package/dist/runtime/quickjs-runtime.d.ts +1 -1
  148. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  149. package/dist/runtime/quickjs-runtime.js +3 -2
  150. package/dist/runtime/type-checker.d.ts +2 -0
  151. package/dist/runtime/type-checker.d.ts.map +1 -1
  152. package/dist/runtime/type-checker.js +5 -3
  153. package/dist/runtime/typescript-kernel.d.ts +1 -1
  154. package/dist/runtime/typescript-kernel.d.ts.map +1 -1
  155. package/dist/runtime/typescript-kernel.js +13 -11
  156. package/dist/runtime/typescript-kernel.js.map +2 -2
  157. package/dist/runtime-state-speculation.d.ts +4 -1
  158. package/dist/runtime-state-speculation.d.ts.map +1 -1
  159. package/dist/speculation/python-scanner.js +1 -1
  160. package/dist/speculation/python-scanner.js.map +2 -2
  161. package/dist/speculation/scanner.d.ts +2 -0
  162. package/dist/speculation/scanner.d.ts.map +1 -1
  163. package/dist/speculation/scanner.js +18 -4
  164. package/dist/speculation/scanner.js.map +2 -2
  165. package/dist/speculation/types.d.ts +1 -0
  166. package/dist/speculation/types.d.ts.map +1 -1
  167. package/dist/type-error-guidance.js +1 -1
  168. package/dist/ui/border-status-editor.d.ts +3 -0
  169. package/dist/ui/border-status-editor.d.ts.map +1 -1
  170. package/dist/ui/controller.d.ts.map +1 -1
  171. package/dist/ui/conversation.d.ts +1 -0
  172. package/dist/ui/conversation.d.ts.map +1 -1
  173. package/dist/ui/conversation.js +28 -5
  174. package/dist/ui/conversation.js.map +2 -2
  175. package/dist/ui/dashboard.d.ts +2 -0
  176. package/dist/ui/dashboard.d.ts.map +1 -1
  177. package/dist/ui/dashboard.js +20 -7
  178. package/dist/ui/dashboard.js.map +2 -2
  179. package/dist/ui/settings-section-context.d.ts +2 -0
  180. package/dist/ui/settings-section-context.d.ts.map +1 -1
  181. package/dist/ui/settings-sections-execution.d.ts.map +1 -1
  182. package/dist/ui/settings-sections-lifecycle.d.ts +1 -0
  183. package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -1
  184. package/dist/ui/settings-sections.d.ts +2 -0
  185. package/dist/ui/settings-sections.d.ts.map +1 -1
  186. package/dist/ui/settings-values.d.ts +4 -1
  187. package/dist/ui/settings-values.d.ts.map +1 -1
  188. package/dist/ui/settings.d.ts.map +1 -1
  189. package/dist/ui/settings.js +61 -2
  190. package/dist/ui/settings.js.map +2 -2
  191. package/dist/worker/model-control.d.ts.map +1 -1
  192. package/dist/worker/model-control.js.map +2 -2
  193. package/dist/worker/options.d.ts.map +1 -1
  194. package/dist/worker/options.js +4 -3
  195. package/dist/worker/options.js.map +2 -2
  196. package/dist/worker/result.js +12 -0
  197. package/dist/worker/result.js.map +2 -2
  198. package/dist/worker.js +95 -8
  199. package/dist/worker.js.map +2 -2
  200. package/docs/agents.md +5 -5
  201. package/docs/codemode-parity.md +97 -0
  202. package/docs/configuration.md +31 -2
  203. package/docs/durable-pi.md +166 -38
  204. package/docs/extractive-history.md +171 -0
  205. package/docs/interface.md +1 -1
  206. package/docs/speculation.md +12 -3
  207. package/package.json +7 -16
  208. package/skillsets/typescript/fabric-exec/SKILL.md +4 -4
  209. package/dist/chunks/chunk-3QECYQGA.js.map +0 -7
  210. package/dist/chunks/chunk-4RTHQGES.js.map +0 -7
  211. package/dist/chunks/chunk-5MNLVHF5.js.map +0 -7
  212. package/dist/chunks/chunk-6VXPACGC.js.map +0 -7
  213. package/dist/chunks/chunk-GJVPP3NN.js.map +0 -7
  214. package/dist/chunks/chunk-KQ6R5EWR.js.map +0 -7
  215. package/dist/chunks/chunk-N5GUXC6F.js.map +0 -7
  216. package/dist/chunks/chunk-QLFDPXK7.js.map +0 -7
  217. package/dist/chunks/chunk-R5F6CHW2.js.map +0 -7
  218. package/dist/chunks/chunk-SGFH5PYA.js.map +0 -7
  219. package/dist/chunks/chunk-TFFZVLR2.js.map +0 -7
  220. package/dist/chunks/chunk-VON4TSO3.js.map +0 -7
  221. /package/dist/chunks/{chunk-WLLXKS6I.js.map → chunk-DU6ZA44F.js.map} +0 -0
  222. /package/dist/chunks/{chunk-W7X4XEQU.js.map → chunk-GC2AUXG6.js.map} +0 -0
  223. /package/dist/chunks/{chunk-VPRJOD4Y.js.map → chunk-LEDY5G2V.js.map} +0 -0
  224. /package/dist/chunks/{chunk-OVBKQCYL.js.map → chunk-N2VKKA7O.js.map} +0 -0
  225. /package/dist/chunks/{chunk-3KDUMDPZ.js.map → chunk-X3CHSIL2.js.map} +0 -0
@@ -28,9 +28,6 @@ import {
28
28
  safeTerminalText,
29
29
  singleCallProgressLine
30
30
  } from "./chunk-U2UBUKNQ.js";
31
- import {
32
- FabricModelSelector
33
- } from "./chunk-J7ZQERKA.js";
34
31
  import {
35
32
  configureHighlighting,
36
33
  highlightCode,
@@ -41,6 +38,9 @@ import {
41
38
  isActiveStatus,
42
39
  orderAgentsByCreation
43
40
  } 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";
@@ -107,19 +107,19 @@ import {
107
107
  readFabricPrewalkRequestV1,
108
108
  readFabricProviderWithdrawalV1,
109
109
  readFabricToolPlacementRequestV1
110
- } from "./chunk-YRDCJZZW.js";
110
+ } from "./chunk-RUO6L7RM.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-PXAICAUT.js";
119
116
  import {
120
117
  closeScratch,
121
118
  createScratch
122
119
  } 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-VON4TSO3.js";
132
+ } from "./chunk-CZPQTISQ.js";
133
133
  import {
134
134
  defaultCodePreviewSettings
135
135
  } from "./chunk-OKOHRXGF.js";
@@ -2001,7 +2001,7 @@ Inspect LLM I/O: /fabric log ${shortId} \xB7 Export: /fabric export-log ${actor.
2001
2001
  }
2002
2002
 
2003
2003
  // src/agents/runner-notice.ts
2004
- var BUILT_IN_RUNNERS = ["pi", "claude", "veda"];
2004
+ var BUILT_IN_RUNNERS = ["pi", "pi-durable", "claude", "veda"];
2005
2005
  var editDistance = (left, right) => {
2006
2006
  const row = Array.from({ length: right.length + 1 }, (_, index) => index);
2007
2007
  for (let i = 1; i <= left.length; i += 1) {
@@ -2169,8 +2169,8 @@ ${sections.join("\n")}` : "";
2169
2169
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
2170
2170
  import * as path4 from "node:path";
2171
2171
  var SHELL_COMPOSITION_GUIDANCE = " tasks.read (byte offset/next, waitMs long-poll) and tasks.watch with {id, match} read or filter any background task without a monitor." + (process.platform === "win32" ? "" : " With jev-fabric (see tasks/sessions via tools.describe): pi.bash durable:true outlives Pi and reattaches on resume; sessions.open/write/read/stop drive interactive children (a Jev program's end with it).");
2172
- var fabricExecutionKernelGuidance = (fullCodeMode, kernel = "typescript", pythonRuntime = "monty") => [
2173
- kernel === "python" ? `Configured fabric_exec kernel: Python (${pythonRuntime === "monty" ? "Monty sandboxed subset" : "CPython"}). Write Python only in \`code\`: top-level await/return, dicts, True/False/None, and asyncio.gather. There is no per-call language switch.` : "Configured fabric_exec kernel: TypeScript. Write TypeScript only in `code`; top-level await and return are supported.",
2172
+ var fabricExecutionKernelGuidance = (fullCodeMode, kernel = "typescript", pythonRuntime = "monty", profile = "additive") => [
2173
+ kernel === "python" ? `Configured fabric_exec kernel: Python (${pythonRuntime === "monty" ? "Monty sandboxed subset" : "CPython"}). Write Python only in \`code\`: top-level await/return, dicts, True/False/None, and asyncio.gather. There is no per-call language switch.` : profile === "native" ? "Configured fabric_exec kernel: TypeScript with native Pi codemode API. Write JavaScript async function bodies; top-level await and return work. Native source is not type-checked or repaired." : "Configured fabric_exec kernel: TypeScript. Write TypeScript only in `code`; top-level await and return are supported.",
2174
2174
  "The configured kernel is exclusive for Fabric orchestration, including when skills or earlier messages show another language. Do not invoke another interpreter through shell tools or native subprocesses merely to run Fabric orchestration in a different language. Project builds, tests, and explicitly requested interpreter work remain legitimate shell commands.",
2175
2175
  fullCodeMode ? "Pi Fabric full code mode: `fabric_exec` is the only way to call Pi core tools \u2014 use them as `pi.*` inside `code`." : "Pi Fabric is in orchestration-only mode. Pi core and registered extension tools stay on their native direct execution path; inside fabric_exec, `pi.*` and `extensions.*` are unavailable.",
2176
2176
  // Files the model has not opened (images in particular) must be read before
@@ -2178,7 +2178,7 @@ var fabricExecutionKernelGuidance = (fullCodeMode, kernel = "typescript", python
2178
2178
  // caches stay warm.
2179
2179
  `Read every file the user provides (images, screenshots, code, text) with the ${fullCodeMode ? "`pi.read`" : "`read`"} tool before responding \u2014 never assume its contents.`
2180
2180
  ].join(" ");
2181
- var defaultFabricExecutionGuidance = (fullCodeMode, kernel = "typescript", pythonRuntime = "monty") => kernel === "python" ? (pythonRuntime === "monty" ? "Python backend: Monty sandboxed subset, not CPython. Native filesystem/network/environment access and arbitrary imports are unavailable; use host tools for effects. Supply acyclic JSON host arguments; recursive containers are unsupported. Underscore-prefixed direct capability attributes are unavailable: use tools.call with the exact discovered ref instead. \u03C0 is an attribute object; payloads is a dict, not the same identity. " : "Python backend: CPython; native standard-library imports are available. ") + 'Python fabric_exec: write an async function body with `await` and `return`; each invocation starts fresh. Use imports supported by the configured backend, such as `import asyncio`. Host methods accept one dict or keyword arguments: `await tools.search(query="example")`, `await tools.call(ref="provider.action", args={"key": "value"})`; discover with tools.search instead of enumerating: tools.list is a capped page (default 100, hard cap 1000) with no truncation marker, so a short result never proves an action is absent (tools.list(envelope=True) reports totals). Known actions use mcp.<server>.<tool>, memory.*, state.*, schema.*, compact.*, components.*, agents.*, or mesh.*. Responses are native Python dicts/lists, not attribute objects. Use `asyncio.gather` for independent calls. `\u03C0.key` and `payloads["key"]` contain only the exact top-level payload keys. Return JSON-compatible data (convert sets, bytes, paths, and datetimes explicitly); print output is bounded. JavaScript callback helpers (workflow, memory.walk, and predicate callbacks) are not Python APIs; page with ordinary await/loops instead. Provider argument validation and approvals remain host-enforced. Schema enforce retains host gates and requires the selected runtime\u2019s isolation; no unrestricted fallback.' + (fullCodeMode ? ` \`await pi.read("/x")\`, \`await pi.grep(pattern="TODO", path="src")\`, \`await pi.find(pattern="*.py", path="src")\`, and \`await pi.ls("src")\` return strings. \`await pi.bash(command="ls")\`, \`await pi.edit(path="/x", oldText="a", newText="b")\`, and \`await pi.write(path="/y", content=\u03C0.body)\` return dicts; read \`r["output"]\`. Shell nonzero exits raise; \`settle=True\` returns a failure dict instead. Cancellation, timeout, approval and security errors still raise. A nested shell that exceeds executor.shellHangMs still resolves ok with a still-running notice, pid, and live output path; background=True detaches immediately. Detached results include details.taskId; completion notifies this session. Use tools.call(ref='tasks.list', args={}), tasks.get or tasks.stop with {'id': taskId}; pi.read can read the bounded log. Bounded controllers can await tasks.wait or tasks.watch (monitor batches, after cursor) without polling; timeout/cancellation affects only the observation. Opt-in monitor={'delivery':'wake','match':'literal','timeoutMs':300000,'intervalMs':5000} (choose delivery 'ui' or 'wake') also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.` + SHELL_COMPOSITION_GUIDANCE + " Captured tools are `await extensions.<name>(...)`." : " Pi core and extensions are unavailable inside fabric_exec in orchestration-only mode.") : fullCodeMode ? "Examples and returns: `pi.read('/x')`, `pi.grep('TODO','src')` / `pi.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `pi.find({pattern:'*.ts', path:'src', limit:20})`, and `pi.ls('src')` return strings; `pi.bash({cmd:'ls'})` (or `pi.powershell` on Windows), `pi.edit({path:'/x', old:'a', new:'b'})`, and `pi.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `pi.bash` or `pi.powershell` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject. A nested shell that exceeds `executor.shellHangMs` still resolves `ok: true` with a still-running notice, pid, and live output path; `background: true` detaches immediately. Detached results include `details.taskId`; completion notifies this session, without polling. Use `tools.call({ref:'tasks.list',args:{}})` or `tasks.get`/`tasks.stop` with `{id: taskId}`; `pi.read` can read the bounded log. Bounded controllers can await `tasks.wait` or `tasks.watch` (monitor batches, `after` cursor) without polling; timeout/cancellation affects only the observation. Opt-in `monitor:{delivery:'ui'|'wake',match:'literal',timeoutMs:300000,intervalMs:5000}` also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed." + SHELL_COMPOSITION_GUIDANCE + "\n`tools` is discovery + generic calls only (`providers`/`catalog`/`list`/`search`/`describe`/`call`/`models`). Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, or `compact.*`. Use `tools.call({ref,args})` for computed refs. `pi` is the core tools; `\u03C0.<key>` reads named `strings` (not a tool)." : "Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.";
2181
+ var defaultFabricExecutionGuidance = (fullCodeMode, kernel = "typescript", pythonRuntime = "monty", profile = "additive") => kernel === "typescript" && profile === "native" ? "Native Pi codemode profile: tools.<name>(args) and nativeTools.<name>(args) use native results, including schema-backed error envelopes. searchTools/ALL_TOOLS return callable identifiers; describeTool returns a declaration string. image() emits images and saves host-side temporary artifacts. store/load share Pi codemode-store entries on this branch. Fabric discovery remains fabric.tools; pi.*, mcp.* and extensions.* keep Fabric result semantics. Policies and limits are unchanged. " + defaultFabricExecutionGuidance(fullCodeMode, kernel, pythonRuntime).replaceAll("tools.", "fabric.tools.").replaceAll("`tools`", "`fabric.tools`") : kernel === "python" ? (pythonRuntime === "monty" ? "Python backend: Monty sandboxed subset, not CPython. Native filesystem/network/environment access and arbitrary imports are unavailable; use host tools for effects. Supply acyclic JSON host arguments; recursive containers are unsupported. Underscore-prefixed direct capability attributes are unavailable: use tools.call with the exact discovered ref instead. \u03C0 is an attribute object; payloads is a dict, not the same identity. " : "Python backend: CPython; native standard-library imports are available. ") + 'Python fabric_exec: write an async function body with `await` and `return`; each invocation starts fresh. Use imports supported by the configured backend, such as `import asyncio`. Host methods accept one dict or keyword arguments: `await tools.search(query="example")`, `await tools.call(ref="provider.action", args={"key": "value"})`; discover with tools.search instead of enumerating: tools.list is a capped page (default 100, hard cap 1000) with no truncation marker, so a short result never proves an action is absent (tools.list(envelope=True) reports totals). Known actions use mcp.<server>.<tool>, memory.*, state.*, schema.*, compact.*, components.*, agents.*, or mesh.*. Responses are native Python dicts/lists, not attribute objects. Use `asyncio.gather` for independent calls. `\u03C0.key` and `payloads["key"]` contain only the exact top-level payload keys. Return JSON-compatible data (convert sets, bytes, paths, and datetimes explicitly); print output is bounded. JavaScript callback helpers (workflow, memory.walk, and predicate callbacks) are not Python APIs; page with ordinary await/loops instead. Provider argument validation and approvals remain host-enforced. Schema enforce retains host gates and requires the selected runtime\u2019s isolation; no unrestricted fallback.' + (fullCodeMode ? ` \`await pi.read("/x")\`, \`await pi.grep(pattern="TODO", path="src")\`, \`await pi.find(pattern="*.py", path="src")\`, and \`await pi.ls("src")\` return strings. \`await pi.bash(command="ls")\`, \`await pi.edit(path="/x", oldText="a", newText="b")\`, and \`await pi.write(path="/y", content=\u03C0.body)\` return dicts; read \`r["output"]\`. Shell nonzero exits raise; \`settle=True\` returns a failure dict instead. Cancellation, timeout, approval and security errors still raise. A nested shell that exceeds executor.shellHangMs still resolves ok with a still-running notice, pid, and live output path; background=True detaches immediately. Detached results include details.taskId; completion notifies this session. Use tools.call(ref='tasks.list', args={}), tasks.get or tasks.stop with {'id': taskId}; pi.read can read the bounded log. Bounded controllers can await tasks.wait or tasks.watch (monitor batches, after cursor) without polling; timeout/cancellation affects only the observation. Opt-in monitor={'delivery':'wake','match':'literal','timeoutMs':300000,'intervalMs':5000} (choose delivery 'ui' or 'wake') also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed.` + SHELL_COMPOSITION_GUIDANCE + " Captured tools are `await extensions.<name>(...)`." : " Pi core and extensions are unavailable inside fabric_exec in orchestration-only mode.") : fullCodeMode ? "Examples and returns: `pi.read('/x')`, `pi.grep('TODO','src')` / `pi.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `pi.find({pattern:'*.ts', path:'src', limit:20})`, and `pi.ls('src')` return strings; `pi.bash({cmd:'ls'})` (or `pi.powershell` on Windows), `pi.edit({path:'/x', old:'a', new:'b'})`, and `pi.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `pi.bash` or `pi.powershell` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject. A nested shell that exceeds `executor.shellHangMs` still resolves `ok: true` with a still-running notice, pid, and live output path; `background: true` detaches immediately. Detached results include `details.taskId`; completion notifies this session, without polling. Use `tools.call({ref:'tasks.list',args:{}})` or `tasks.get`/`tasks.stop` with `{id: taskId}`; `pi.read` can read the bounded log. Bounded controllers can await `tasks.wait` or `tasks.watch` (monitor batches, `after` cursor) without polling; timeout/cancellation affects only the observation. Opt-in `monitor:{delivery:'ui'|'wake',match:'literal',timeoutMs:300000,intervalMs:5000}` also detaches: UI-only never wakes the agent, wake sends coalesced line events. Monitors expire and are not automatically renewed." + SHELL_COMPOSITION_GUIDANCE + "\n`tools` exposes discovery/generic calls (`providers`/`catalog`/`list`/`search`/`describe`/`call`) plus the native `models` namespace. `models === tools.models`; `tools.models()` retains legacy model listing. Use `await models.getAvailableOfType('classifier')` (or `'image'`), then `models.classify(model,{state,questions})` or `models.generateImages(model,{input})`. Check native `stopReason`/`errorMessage`; classifier yes/no questions use `type:'bool'` and return `probability`. Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, or `compact.*`. Use `tools.call({ref,args})` for computed refs. `pi` is the core tools; `\u03C0.<key>` reads named `strings` (not a tool)." : "Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.";
2182
2182
  var manifestNameCache = /* @__PURE__ */ new Map();
2183
2183
  var packageNameFromManifest = (startPath) => {
2184
2184
  if (!startPath) return void 0;
@@ -2201,7 +2201,7 @@ var packageNameFromManifest = (startPath) => {
2201
2201
  directory = parent;
2202
2202
  }
2203
2203
  };
2204
- var extensionToolRosterGuidance = (tools, coreToolNames) => {
2204
+ var extensionToolRosterGuidance = (tools, coreToolNames, nativeProfile = false) => {
2205
2205
  const extensionTools = tools.filter((tool) => !coreToolNames.has(tool.name));
2206
2206
  if (extensionTools.length === 0) return void 0;
2207
2207
  const namespaceLabel = (tool) => {
@@ -2223,7 +2223,7 @@ var extensionToolRosterGuidance = (tools, coreToolNames) => {
2223
2223
  else groups.set(label, [tool.name]);
2224
2224
  }
2225
2225
  return [
2226
- "Registered extension tools are callable inside fabric_exec as `extensions.<name>(args)`; run `tools.list` for full descriptions and schemas before re-implementing an effect with pi.bash.",
2226
+ `Registered extension tools are callable inside fabric_exec as \`extensions.<name>(args)\`; run \`${nativeProfile ? "fabric.tools" : "tools"}.list\` for full descriptions and schemas before re-implementing an effect with pi.bash.`,
2227
2227
  ...[...groups.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([label, names]) => "- " + label + ": " + names.join(", "))
2228
2228
  ].join("\n");
2229
2229
  };
@@ -2472,6 +2472,9 @@ var OPTIONAL_FABRIC_EXEC_KEYS = [
2472
2472
  "tokenBudget",
2473
2473
  "agentBudget",
2474
2474
  "timeoutMs",
2475
+ "timeout_ms",
2476
+ "maxOutputTokens",
2477
+ "max_output_tokens",
2475
2478
  "display"
2476
2479
  ];
2477
2480
  var isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -2504,7 +2507,7 @@ var normalizeFabricExecStrings = (input) => {
2504
2507
  };
2505
2508
  var resolveFabricExecPayloads = (params) => normalizeFabricExecStrings(params.payloads) ?? normalizeFabricExecStrings(params.strings);
2506
2509
  var prepareFabricExecArguments = (input, kernel = "typescript") => {
2507
- if (typeof input === "string") return { code: kernel === "python" ? input : repairFabricGuestCode(input) };
2510
+ if (typeof input === "string") return prepareFabricExecArguments({ code: input }, kernel);
2508
2511
  if (!isRecord4(input)) return input;
2509
2512
  let prepared = input;
2510
2513
  const writable = () => {
@@ -2518,6 +2521,24 @@ var prepareFabricExecArguments = (input, kernel = "typescript") => {
2518
2521
  const repaired = repairFabricGuestCode(prepared.code);
2519
2522
  if (repaired !== prepared.code) writable().code = repaired;
2520
2523
  }
2524
+ if (kernel === "typescript" && typeof prepared.code === "string") {
2525
+ const match = /^\s*\/\/\s*@options:\s*([^\r\n]*)/.exec(prepared.code);
2526
+ if (match) {
2527
+ const options = JSON.parse(match[1]);
2528
+ if (!isRecord4(options)) throw new Error("@options must be a JSON object");
2529
+ for (const [key, value] of Object.entries(options)) {
2530
+ if (key !== "timeout_ms" && key !== "max_output_tokens") throw new Error(`Unsupported @options key: ${key}`);
2531
+ if (!Number.isSafeInteger(value) || value < 1) throw new Error(`${key} must be a positive integer`);
2532
+ if (prepared[key] !== void 0 && prepared[key] !== value) throw new Error(`Conflicting ${key} options`);
2533
+ writable()[key] = value;
2534
+ }
2535
+ }
2536
+ }
2537
+ if (prepared.max_output_tokens != null) {
2538
+ if (prepared.maxOutputTokens != null && prepared.maxOutputTokens !== prepared.max_output_tokens) throw new Error("Conflicting maxOutputTokens and max_output_tokens");
2539
+ writable().maxOutputTokens = prepared.max_output_tokens;
2540
+ delete writable().max_output_tokens;
2541
+ }
2521
2542
  for (const key of OPTIONAL_FABRIC_EXEC_KEYS) {
2522
2543
  if (!Object.hasOwn(prepared, key)) continue;
2523
2544
  if (prepared[key] === null || prepared[key] === void 0) delete writable()[key];
@@ -2726,7 +2747,7 @@ var createFabricExecTool = (state, codePreviewSettings, pendingHandoffs, decorat
2726
2747
  );
2727
2748
  },
2728
2749
  label: "Fabric",
2729
- description: python ? monty ? "Execute Python through Fabric's configured Monty sandbox. Monty runs a Python subset with VM resource limits, no native filesystem/network/environment access, and only host-mediated tools. Each invocation starts fresh. This is the exclusive model tool path in full code mode and Schema enforce mode." : "Execute Python through Fabric\u2019s configured CPython kernel for Pi core tools, MCP, providers, discovery, and extensions. Each call uses a fresh process. Native execution is trusted code; Schema enforce requires OS isolation. This is the exclusive model tool path in full code mode and Schema enforce mode." : "Execute type-checked TypeScript through Fabric's configured executor for Pi core tools, MCP, Fabric providers, discovery, and extensions. QuickJS is isolated by default; the optional Node/Bun process is an unsafe trusted-code escape hatch. In full code mode, and always in Schema enforce mode, this is the exclusive model tool path.",
2750
+ description: python ? monty ? "Execute Python through Fabric's configured Monty sandbox. Monty runs a Python subset with VM resource limits, no native filesystem/network/environment access, and only host-mediated tools. Each invocation starts fresh. This is the exclusive model tool path in full code mode and Schema enforce mode." : "Execute Python through Fabric\u2019s configured CPython kernel for Pi core tools, MCP, providers, discovery, and extensions. Each call uses a fresh process. Native execution is trusted code; Schema enforce requires OS isolation. This is the exclusive model tool path in full code mode and Schema enforce mode." : "Execute code through Fabric's TypeScript kernel: type-checked TypeScript by default, unmodified JavaScript with executor.codemodeProfile native. Both support nativeTools; native mode places Pi-compatible calls on tools and Fabric discovery on fabric.tools. Compose Pi core tools, MCP, Fabric providers, discovery, and extensions. QuickJS is isolated by default; the optional Node/Bun process is an unsafe trusted-code escape hatch. In full code mode, and always in Schema enforce mode, this is the exclusive model tool path.",
2730
2751
  promptSnippet: "Pi core tools, MCP, Fabric providers, discovery, and extensions",
2731
2752
  promptGuidelines: [
2732
2753
  python ? "Batch independent operations in one `fabric_exec` Python program with `asyncio.gather`; await dependent/conditional steps sequentially. Coalesce independent replacements into one `await pi.edit(path=..., edits=[...])`. Return only the compact final JSON-compatible value." : "Batch independent operations in one `fabric_exec` program (`Promise.all` for parallel, sequential `await` for ordered), not one call per tool; keep dependent/conditional steps sequential. Coalesce non-dependent replacements from one file snapshot into one `pi.edit({path, edits:[...]})`; use `all:true` only for intentional repeated exact anchors. Return only the compact final value; intermediate results stay in the sandbox.",
@@ -2782,6 +2803,9 @@ var createFabricExecTool = (state, codePreviewSettings, pendingHandoffs, decorat
2782
2803
  description: "Optional whole-program deadline in ms for this invocation; raises (never lowers) the configured executor.timeoutMs, capped by executor.maxTimeoutMs"
2783
2804
  })
2784
2805
  ),
2806
+ timeout_ms: Type.Optional(Type.Integer({ minimum: 1, description: "Hard whole-script deadline in milliseconds; cannot be extended or paused, capped by executor.maxTimeoutMs." })),
2807
+ maxOutputTokens: Type.Optional(Type.Integer({ minimum: 1, description: "Per-call output token budget (estimated at four characters per token), capped by executor.maxOutputChars." })),
2808
+ max_output_tokens: Type.Optional(Type.Integer({ minimum: 1, description: "Alias of maxOutputTokens." })),
2785
2809
  display: Type.Optional(
2786
2810
  Type.Union([
2787
2811
  Type.Object(
@@ -2803,7 +2827,7 @@ var createFabricExecTool = (state, codePreviewSettings, pendingHandoffs, decorat
2803
2827
  })
2804
2828
  ])
2805
2829
  )
2806
- }),
2830
+ }, { additionalProperties: false }),
2807
2831
  // Pi validates custom-tool arguments before `tool_call` and `execute`, so
2808
2832
  // compatibility coercions for the model-facing boundary must live in the
2809
2833
  // official prepareArguments hook rather than execute-time fallbacks.
@@ -3320,6 +3344,7 @@ ${preview}` : ""}${hiddenHint}`,
3320
3344
  ...tokenBudget !== void 0 ? { tokenBudget } : {},
3321
3345
  ...params.agentBudget !== void 0 ? { maxAgentCalls: params.agentBudget } : {},
3322
3346
  ...params.timeoutMs !== void 0 ? { requestedTimeoutMs: params.timeoutMs } : {},
3347
+ ...params.timeout_ms !== void 0 ? { hardTimeoutMs: params.timeout_ms } : {},
3323
3348
  ...runDisplay ? {
3324
3349
  display: {
3325
3350
  ...runDisplay.name !== void 0 && { name: runDisplay.name },
@@ -3373,7 +3398,7 @@ ${preview}` : ""}${hiddenHint}`,
3373
3398
  if (repeat.warn) fullSections.push(fabricRepeatWarnText(repeat.count, FABRIC_REPEAT_BLOCK));
3374
3399
  const fullRawOutput = fullSections.join("\n\n");
3375
3400
  const outputBudget = modelOutputBudget(
3376
- state.config.executor.maxOutputChars,
3401
+ Math.min(state.config.executor.maxOutputChars, (params.maxOutputTokens ?? params.max_output_tokens ?? Infinity) * 4),
3377
3402
  result.success
3378
3403
  );
3379
3404
  const outputWillTruncate = fullRawOutput.length > outputBudget;
@@ -5234,6 +5259,15 @@ var FabricUiController = class {
5234
5259
  context.ui.notify(error instanceof Error ? error.message : String(error), "error");
5235
5260
  }
5236
5261
  };
5262
+ const onGlobalEvents = (globalActorId, events) => {
5263
+ try {
5264
+ this.state.globalActors.update(globalActorId, { events });
5265
+ context.ui.notify("Global actor event subscriptions updated", "info");
5266
+ this.#refresh();
5267
+ } catch (error) {
5268
+ context.ui.notify(error instanceof Error ? error.message : String(error), "error");
5269
+ }
5270
+ };
5237
5271
  const onActorTools = (actorId, tools) => {
5238
5272
  reportUpdate("Actor tools updated", this.state.actors.setTools(actorId, tools));
5239
5273
  };
@@ -5313,6 +5347,7 @@ var FabricUiController = class {
5313
5347
  onActorEvents,
5314
5348
  onActorDeliveryPolicy,
5315
5349
  onGlobalDeliveryPolicy,
5350
+ onGlobalEvents,
5316
5351
  onActorTools,
5317
5352
  actorDefaultTools: this.state.config.agents?.defaultTools ?? [],
5318
5353
  onClearMessages,
@@ -6281,6 +6316,34 @@ function createFabricExtension(entryUrl) {
6281
6316
  compactionYieldPending = true;
6282
6317
  }
6283
6318
  });
6319
+ let extractiveHistory;
6320
+ let extractiveEpoch = 0;
6321
+ const invalidateExtractive = (clear = false) => {
6322
+ extractiveEpoch++;
6323
+ extractiveHistory?.invalidate(clear);
6324
+ };
6325
+ const extractiveConfig = () => state.bootstrapped && state.config.memory.enabled ? state.config.memory.extractive : void 0;
6326
+ const unsubscribeExtractiveConfig = pi.events.on("pi-fabric:extractive-config-changed", () => invalidateExtractive(true));
6327
+ pi.on("session_start", () => invalidateExtractive(true));
6328
+ pi.on("session_tree", () => invalidateExtractive(true));
6329
+ pi.on("agent_end", () => invalidateExtractive());
6330
+ pi.on("session_shutdown", () => {
6331
+ invalidateExtractive(true);
6332
+ unsubscribeExtractiveConfig();
6333
+ });
6334
+ pi.on("before_agent_start", async (event, context) => {
6335
+ if (!extractiveConfig()?.enabled) {
6336
+ invalidateExtractive(true);
6337
+ return;
6338
+ }
6339
+ const epoch = ++extractiveEpoch;
6340
+ const sessionId = context.sessionManager.getSessionId();
6341
+ const leaf = context.sessionManager.getLeafId();
6342
+ const { ExtractiveHistory } = await import("../memory/extractive-history.js");
6343
+ if (epoch !== extractiveEpoch || !extractiveConfig()?.enabled || context.signal?.aborted || context.sessionManager.getSessionId() !== sessionId || context.sessionManager.getLeafId() !== leaf) return;
6344
+ extractiveHistory ??= new ExtractiveHistory(extractiveConfig);
6345
+ await extractiveHistory.prepare(context, event.prompt);
6346
+ });
6284
6347
  pi.on("context", async (event, context) => {
6285
6348
  const sessionId = context.sessionManager.getSessionId();
6286
6349
  const pendingContinuation = state.initialized ? state.prewalk.pendingContinuationMessage(sessionId) : void 0;
@@ -6321,6 +6384,21 @@ function createFabricExtension(entryUrl) {
6321
6384
  if (repaired.messages !== messages) return { messages: repaired.messages };
6322
6385
  return changed ? { messages } : void 0;
6323
6386
  });
6387
+ pi.on("context", (event, context) => {
6388
+ const customType = "fabric-extractive-history";
6389
+ const messages = event.messages.filter((message) => !(message.role === "custom" && message.customType === customType));
6390
+ if (!extractiveConfig()?.enabled) invalidateExtractive(true);
6391
+ const view = extractiveHistory?.view(context);
6392
+ if (!view) return messages.length !== event.messages.length ? { messages } : void 0;
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] };
6401
+ });
6324
6402
  pi.on("before_agent_start", async (event, context) => {
6325
6403
  const config = state.bootstrapped ? state.config : DEFAULT_FABRIC_CONFIG;
6326
6404
  const fullCodeMode = config.fullCodeMode;
@@ -6337,15 +6415,15 @@ function createFabricExtension(entryUrl) {
6337
6415
  target: process.env.PI_FABRIC_PARENT_RUN ? "participant" : "main",
6338
6416
  defaults: [{
6339
6417
  slot: FABRIC_EXECUTION_GUIDANCE_SLOT,
6340
- content: defaultFabricExecutionGuidance(effectiveFullCodeMode, config.executor.kernel, config.executor.pythonRuntime)
6418
+ content: defaultFabricExecutionGuidance(effectiveFullCodeMode, config.executor.kernel, config.executor.pythonRuntime, config.executor.codemodeProfile)
6341
6419
  }]
6342
6420
  });
6343
6421
  const overrideGuidance = effectiveFullCodeMode ? coreOverridePromptGuidance(capturedTools).trim() : void 0;
6344
6422
  const extensionRoster = effectiveFullCodeMode ? extensionToolRosterGuidance(capturedTools.list().filter(
6345
6423
  (entry) => !state.config.mcp.enabled || !isSelectedNativeMcpTool(entry.definition, state.config.mcp.nativeServers)
6346
- ), new Set(PI_CORE_TOOL_NAMES)) : void 0;
6424
+ ), new Set(PI_CORE_TOOL_NAMES), config.executor.kernel === "typescript" && config.executor.codemodeProfile === "native") : void 0;
6347
6425
  const guidance = [
6348
- fabricExecutionKernelGuidance(effectiveFullCodeMode, config.executor.kernel, config.executor.pythonRuntime),
6426
+ fabricExecutionKernelGuidance(effectiveFullCodeMode, config.executor.kernel, config.executor.pythonRuntime, config.executor.codemodeProfile),
6349
6427
  resolvedGuidance.slotText,
6350
6428
  fabricSchemaGuidance(schemaMode),
6351
6429
  overrideGuidance,
@@ -6487,4 +6565,4 @@ export {
6487
6565
  FABRIC_MANAGED_HOST_VERSION,
6488
6566
  createFabricExtension
6489
6567
  };
6490
- //# sourceMappingURL=chunk-6VXPACGC.js.map
6568
+ //# sourceMappingURL=chunk-YJX27XBO.js.map