pi-fabric 0.132.2 → 0.132.4

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 (77) hide show
  1. package/dist/async-settlement.d.ts +1 -1
  2. package/dist/async-settlement.d.ts.map +1 -1
  3. package/dist/chunks/{chunk-QUUEGKZF.js → chunk-4Y5KEJP4.js} +2 -2
  4. package/dist/chunks/{chunk-5QSOACJN.js → chunk-5PSEJOJB.js} +2 -2
  5. package/dist/chunks/{chunk-UJPP3EVE.js → chunk-73PV4YUJ.js} +60 -25
  6. package/dist/chunks/chunk-73PV4YUJ.js.map +7 -0
  7. package/dist/chunks/{chunk-7TB7NXSL.js → chunk-7CIQQOOD.js} +11 -3
  8. package/dist/chunks/{chunk-7TB7NXSL.js.map → chunk-7CIQQOOD.js.map} +2 -2
  9. package/dist/chunks/{chunk-BLDTTLFP.js → chunk-BDYZQ6GQ.js} +2 -2
  10. package/dist/chunks/{chunk-COKAE6IL.js → chunk-F6GIK5GO.js} +4 -4
  11. package/dist/chunks/{chunk-T2C23JGZ.js → chunk-FMEOJJ6Y.js} +2 -2
  12. package/dist/chunks/{chunk-2KAQJY5W.js → chunk-GGQ43B7T.js} +2 -2
  13. package/dist/chunks/{chunk-QTVJV3YR.js → chunk-MGFSQXAJ.js} +4 -4
  14. package/dist/chunks/{chunk-QTVJV3YR.js.map → chunk-MGFSQXAJ.js.map} +2 -2
  15. package/dist/chunks/{chunk-7PF352LX.js → chunk-MTAFECXB.js} +2 -2
  16. package/dist/chunks/{chunk-3VK6UGAN.js → chunk-O5SHIUIL.js} +6 -1
  17. package/dist/chunks/chunk-O5SHIUIL.js.map +7 -0
  18. package/dist/chunks/{chunk-LGZED5WL.js → chunk-R7XIJOUY.js} +2 -2
  19. package/dist/chunks/{chunk-KIFOEBYJ.js → chunk-VEXCD3RA.js} +2 -2
  20. package/dist/chunks/{chunk-UEVXLDDO.js → chunk-YO5UIWDY.js} +3 -3
  21. package/dist/compaction/claim-events.js +3 -3
  22. package/dist/compaction/hook.js +2 -2
  23. package/dist/compaction/owner.js +3 -3
  24. package/dist/compaction/threshold.d.ts.map +1 -1
  25. package/dist/core/action-registry.d.ts +1 -1
  26. package/dist/core/action-registry.d.ts.map +1 -1
  27. package/dist/core/action-registry.js +2 -2
  28. package/dist/core/execution-guidelines.d.ts +6 -0
  29. package/dist/core/execution-guidelines.d.ts.map +1 -0
  30. package/dist/core/guidance-delivery.d.ts +19 -0
  31. package/dist/core/guidance-delivery.d.ts.map +1 -0
  32. package/dist/core/prompt-guidance.d.ts +1 -0
  33. package/dist/core/prompt-guidance.d.ts.map +1 -1
  34. package/dist/core/prompt-guidance.js +50 -1
  35. package/dist/core/prompt-guidance.js.map +3 -3
  36. package/dist/core/provider-operations.js +1 -1
  37. package/dist/durable-extension.js +1 -1
  38. package/dist/durable-extension.js.map +1 -1
  39. package/dist/extension-bootstrap.d.ts.map +1 -1
  40. package/dist/extension-bootstrap.js +4 -4
  41. package/dist/extension.d.ts.map +1 -1
  42. package/dist/fabric-exec-tool.d.ts.map +1 -1
  43. package/dist/fabric-runtime-state.js +25 -13
  44. package/dist/fabric-runtime-state.js.map +2 -2
  45. package/dist/index.js +4 -4
  46. package/dist/jev/client.js +2 -2
  47. package/dist/jev.js +4 -4
  48. package/dist/providers/jev-provider.js +4 -4
  49. package/dist/residency/host.js +4 -4
  50. package/dist/residency/pi-entry.js +4 -4
  51. package/dist/runtime/cpython-runtime.js +1 -1
  52. package/dist/runtime/monty-runtime.js +1 -1
  53. package/dist/runtime/node-process-runtime.js +3 -3
  54. package/dist/runtime/quickjs-runtime.js +2 -2
  55. package/dist/runtime/typescript-kernel.js +3 -3
  56. package/dist/topology/peer-presence.d.ts.map +1 -1
  57. package/dist/verified/generated/manifest.json +12 -3
  58. package/dist/verified/generated/prompt-guidance.d.ts +4 -0
  59. package/dist/verified/generated/prompt-guidance.js +17 -0
  60. package/docs/agents.md +1 -0
  61. package/docs/verified-kernels.md +23 -0
  62. package/package.json +1 -1
  63. package/proofs/index.ts +2 -0
  64. package/proofs/prompt-guidance.ts +38 -0
  65. package/scripts/verified-kernels.ts +1 -1
  66. package/dist/chunks/chunk-3VK6UGAN.js.map +0 -7
  67. package/dist/chunks/chunk-UJPP3EVE.js.map +0 -7
  68. /package/dist/chunks/{chunk-QUUEGKZF.js.map → chunk-4Y5KEJP4.js.map} +0 -0
  69. /package/dist/chunks/{chunk-5QSOACJN.js.map → chunk-5PSEJOJB.js.map} +0 -0
  70. /package/dist/chunks/{chunk-BLDTTLFP.js.map → chunk-BDYZQ6GQ.js.map} +0 -0
  71. /package/dist/chunks/{chunk-COKAE6IL.js.map → chunk-F6GIK5GO.js.map} +0 -0
  72. /package/dist/chunks/{chunk-T2C23JGZ.js.map → chunk-FMEOJJ6Y.js.map} +0 -0
  73. /package/dist/chunks/{chunk-2KAQJY5W.js.map → chunk-GGQ43B7T.js.map} +0 -0
  74. /package/dist/chunks/{chunk-7PF352LX.js.map → chunk-MTAFECXB.js.map} +0 -0
  75. /package/dist/chunks/{chunk-LGZED5WL.js.map → chunk-R7XIJOUY.js.map} +0 -0
  76. /package/dist/chunks/{chunk-KIFOEBYJ.js.map → chunk-VEXCD3RA.js.map} +0 -0
  77. /package/dist/chunks/{chunk-UEVXLDDO.js.map → chunk-YO5UIWDY.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  export declare const throwIfAborted: (signal: AbortSignal | undefined) => void;
2
2
  export declare const runAbortable: <T>(signal: AbortSignal | undefined, operation: () => T | PromiseLike<T>) => Promise<T>;
3
- export declare const settleWithin: (operations: Iterable<PromiseLike<unknown>>, timeoutMs: number) => Promise<boolean>;
3
+ export declare const settleWithin: (operations: Iterable<PromiseLike<unknown>>, timeoutMs: number, signal?: AbortSignal) => Promise<boolean>;
4
4
  //# sourceMappingURL=async-settlement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"async-settlement.d.ts","sourceRoot":"","sources":["../src/async-settlement.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,GAAG,SAAS,KAAG,IAEhE,CAAC;AA0BF,eAAO,MAAM,YAAY,GAAI,CAAC,EAC5B,QAAQ,WAAW,GAAG,SAAS,EAC/B,WAAW,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAClC,OAAO,CAAC,CAAC,CAOX,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,YAAY,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAC1C,WAAW,MAAM,KAChB,OAAO,CAAC,OAAO,CAejB,CAAC"}
1
+ {"version":3,"file":"async-settlement.d.ts","sourceRoot":"","sources":["../src/async-settlement.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,GAAG,SAAS,KAAG,IAEhE,CAAC;AA0BF,eAAO,MAAM,YAAY,GAAI,CAAC,EAC5B,QAAQ,WAAW,GAAG,SAAS,EAC/B,WAAW,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAClC,OAAO,CAAC,CAAC,CAOX,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,YAAY,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAC1C,WAAW,MAAM,EACjB,SAAS,WAAW,KACnB,OAAO,CAAC,OAAO,CAwBjB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fabricExecTitleHintCached,
3
3
  modelCompactionKey
4
- } from "./chunk-3VK6UGAN.js";
4
+ } from "./chunk-O5SHIUIL.js";
5
5
  import {
6
6
  normalizeRunDisplay
7
7
  } from "./chunk-OZCJU3PZ.js";
@@ -2097,4 +2097,4 @@ export {
2097
2097
  compactionHandlers,
2098
2098
  registerCompactionHook
2099
2099
  };
2100
- //# sourceMappingURL=chunk-QUUEGKZF.js.map
2100
+ //# sourceMappingURL=chunk-4Y5KEJP4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fabricCompactionVersion
3
- } from "./chunk-QUUEGKZF.js";
3
+ } from "./chunk-4Y5KEJP4.js";
4
4
 
5
5
  // src/compaction/owner.ts
6
6
  var COMPACTION_OWNERSHIP_DOC = "docs/compaction.md#pi-vcc-precedence";
@@ -54,4 +54,4 @@ export {
54
54
  ownershipWarning,
55
55
  CompactionOwnerObserver
56
56
  };
57
- //# sourceMappingURL=chunk-5QSOACJN.js.map
57
+ //# sourceMappingURL=chunk-5PSEJOJB.js.map
@@ -115,7 +115,7 @@ import {
115
115
  import {
116
116
  compactAtConfiguredThreshold,
117
117
  fabricExecTitleHintCached
118
- } from "./chunk-3VK6UGAN.js";
118
+ } from "./chunk-O5SHIUIL.js";
119
119
  import {
120
120
  fabricWriteBindings
121
121
  } from "./chunk-SZUXWOO7.js";
@@ -137,7 +137,7 @@ import {
137
137
  ApprovalController,
138
138
  FabricAutoApprovalClassifier,
139
139
  FabricSessionApprovals
140
- } from "./chunk-2KAQJY5W.js";
140
+ } from "./chunk-GGQ43B7T.js";
141
141
  import {
142
142
  FABRIC_ACTION_POLICY_REGISTER_EVENT,
143
143
  FABRIC_COMPACTION_OWNER_EVENT,
@@ -1781,6 +1781,25 @@ var FabricDirectToolApproval = class {
1781
1781
  }
1782
1782
  };
1783
1783
 
1784
+ // src/core/execution-guidelines.ts
1785
+ var fabricExecutionGuidelines = (kernel = "typescript", pythonRuntime = "monty", managedHost = false) => managedHost ? [
1786
+ "Batch independent operations with bounded concurrency, keep dependent calls ordered, inspect results, and return compact evidence."
1787
+ ] : [
1788
+ kernel === "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.",
1789
+ kernel === "python" ? "Search before reading with `await pi.grep(pattern=..., path=...)` or `await pi.find(pattern=..., path=...)`, then `await pi.read(path=..., offset=..., limit=...)`. Use Python dict syntax, `True`/`False`/`None`, and bounded searches; unbounded reads cap at 2000 lines or 50KB. Read continuation notices when needed." : "Search before reading: use `pi.grep`/`pi.find` to locate relevant lines, then `pi.read({path, offset, limit})` that range. Escape regex metacharacters, or use `literal:true` for exact punctuated text. Keep fan-out search limits small and widen only on misses. An unbounded `pi.read` returns at most 2000 lines or 50KB and, when truncated, ends with a `Use offset=\u2026` continuation notice; reserve whole-file reads for small files you will use in full.",
1790
+ "Keep the acceptance ledger in reasoning or concise progress notes (no tool call): define concrete checks, trace execution before editing, implement end to end, then run targeted tests and direct behavioral probes. Confirm requested public symbols, registrations, and configuration entries. Use the smallest checks that cover the ledger; escalate only for failures or cross-cutting risk. Inspect failures and iterate instead of rerunning unchanged passing checks. A build alone is not completion.",
1791
+ kernel === "python" ? "For test/probe nonzero exits, use `await pi.bash(command=..., settle=True)` and inspect the returned dict: `r['ok']`, `r['output']`, and `r.get('exitCode')`. Set shell `timeout` in seconds once for long suites. Return decisions and evidence rather than raw logs." : "Amortize round trips without inflating context: batch only independent, bounded work. Keep search\u2192read and edit\u2192verify sequential when an output determines the next action. Use `settle:true` for tests or probes whose nonzero result is evidence rather than an exceptional stop; for a known long suite, set `pi.bash` `timeout` in seconds once instead of retrying a timed-out call. Filter or summarize noisy command output inside the program and return decisions, failures, and evidence\u2014not raw logs or unused intermediate results.",
1792
+ "For edits/writes, pass named payloads through top-level `payloads`; each `\u03C0.key` must exactly match a key there; prefer `pi.edit`/`pi.write`. `pi.bash`: no stdin.",
1793
+ "Use `display.name` and objective `display.description`; Fabric pairs them with verified outcomes in deterministic compaction.",
1794
+ ...kernel === "python" && pythonRuntime === "monty" ? ["Monty requires acyclic JSON host arguments. For underscore-prefixed provider/tool names, use `await tools.call(ref=..., args={...})`, not direct attributes. Use `payloads['key']` for private/non-identifier payload keys."] : []
1795
+ ];
1796
+ var fabricOwnedExecutionGuidelines = () => [.../* @__PURE__ */ new Set([
1797
+ ...fabricExecutionGuidelines(),
1798
+ ...fabricExecutionGuidelines("python", "monty"),
1799
+ ...fabricExecutionGuidelines("python", "cpython"),
1800
+ ...fabricExecutionGuidelines("typescript", "monty", true)
1801
+ ])];
1802
+
1784
1803
  // src/fabric-exec-tool.ts
1785
1804
  import { Container as Container2, Text as Text2 } from "@earendil-works/pi-tui";
1786
1805
  import { Type } from "typebox";
@@ -2100,17 +2119,7 @@ var createFabricExecTool = (state, codePreviewSettings, pendingHandoffs, decorat
2100
2119
  label: "Fabric",
2101
2120
  description: managedHost ? "Execute type-checked TypeScript in the managed QuickJS runtime. See the managed execution guidance for authorized tool contracts." : 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.",
2102
2121
  promptSnippet: managedHost ? `Authorized host tools (${managedHost.providers.join(", ") || "none"}) and deterministic computation` : "Pi core tools, MCP, Fabric providers, discovery, and extensions",
2103
- promptGuidelines: managedHost ? [
2104
- "Batch independent operations with bounded concurrency, keep dependent calls ordered, inspect results, and return compact evidence."
2105
- ] : [
2106
- 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.",
2107
- python ? "Search before reading with `await pi.grep(pattern=..., path=...)` or `await pi.find(pattern=..., path=...)`, then `await pi.read(path=..., offset=..., limit=...)`. Use Python dict syntax, `True`/`False`/`None`, and bounded searches; unbounded reads cap at 2000 lines or 50KB. Read continuation notices when needed." : "Search before reading: use `pi.grep`/`pi.find` to locate relevant lines, then `pi.read({path, offset, limit})` that range. Escape regex metacharacters, or use `literal:true` for exact punctuated text. Keep fan-out search limits small and widen only on misses. An unbounded `pi.read` returns at most 2000 lines or 50KB and, when truncated, ends with a `Use offset=\u2026` continuation notice; reserve whole-file reads for small files you will use in full.",
2108
- "Keep the acceptance ledger in reasoning or concise progress notes (no tool call): define concrete checks, trace execution before editing, implement end to end, then run targeted tests and direct behavioral probes. Confirm requested public symbols, registrations, and configuration entries. Use the smallest checks that cover the ledger; escalate only for failures or cross-cutting risk. Inspect failures and iterate instead of rerunning unchanged passing checks. A build alone is not completion.",
2109
- python ? "For test/probe nonzero exits, use `await pi.bash(command=..., settle=True)` and inspect the returned dict: `r['ok']`, `r['output']`, and `r.get('exitCode')`. Set shell `timeout` in seconds once for long suites. Return decisions and evidence rather than raw logs." : "Amortize round trips without inflating context: batch only independent, bounded work. Keep search\u2192read and edit\u2192verify sequential when an output determines the next action. Use `settle:true` for tests or probes whose nonzero result is evidence rather than an exceptional stop; for a known long suite, set `pi.bash` `timeout` in seconds once instead of retrying a timed-out call. Filter or summarize noisy command output inside the program and return decisions, failures, and evidence\u2014not raw logs or unused intermediate results.",
2110
- "For edits/writes, pass named payloads through top-level `payloads`; each `\u03C0.key` must exactly match a key there; prefer `pi.edit`/`pi.write`. `pi.bash`: no stdin.",
2111
- "Use `display.name` and objective `display.description`; Fabric pairs them with verified outcomes in deterministic compaction.",
2112
- ...monty ? ["Monty requires acyclic JSON host arguments. For underscore-prefixed provider/tool names, use `await tools.call(ref=..., args={...})`, not direct attributes. Use `payloads['key']` for private/non-identifier payload keys."] : []
2113
- ],
2122
+ promptGuidelines: fabricExecutionGuidelines(toolKernel(state), python ? state.config.executor.pythonRuntime : void 0, Boolean(managedHost)),
2114
2123
  // The model-facing schema is intentionally flat: one large `code` string
2115
2124
  // plus scalar/optional params. Do not add nested arrays-of-objects with
2116
2125
  // escaped content here. SOTA models are post-trained on one dominant
@@ -6544,18 +6553,20 @@ function createFabricExtension(entryUrl) {
6544
6553
  }
6545
6554
  });
6546
6555
  pi.on("agent_settled", async (event, context) => {
6556
+ const interrupted = event.aborted || context.signal?.aborted === true;
6547
6557
  if (state.managedHostOptions) {
6548
- if (state.config.compaction.engine === "fabric") await compactAtConfiguredThreshold(context, state.config);
6558
+ if (!interrupted && state.config.compaction.engine === "fabric") await compactAtConfiguredThreshold(context, state.config);
6549
6559
  if (state.initialized) await state.publishHostLifecycle("pi.agent_settled", event);
6550
6560
  return;
6551
6561
  }
6552
6562
  if (!state.initialized) {
6553
- if (!compactionOwner()) await compactAtConfiguredThreshold(context, state.config);
6563
+ if (!interrupted && !compactionOwner()) await compactAtConfiguredThreshold(context, state.config);
6554
6564
  return;
6555
6565
  }
6556
6566
  const sessionId = context.sessionManager.getSessionId();
6567
+ if (interrupted) state.compact.cancel();
6557
6568
  const settledInPlace = await settleInPlacePrewalk(state.prewalk, pi, context, {
6558
- compactOnReturn: state.config.prewalk.compactOnReturn,
6569
+ compactOnReturn: !interrupted && state.config.prewalk.compactOnReturn,
6559
6570
  compact: state.compact
6560
6571
  });
6561
6572
  if (!settledInPlace && state.prewalk.settleTask(sessionId)) {
@@ -6570,8 +6581,8 @@ function createFabricExtension(entryUrl) {
6570
6581
  } else {
6571
6582
  state.prewalkDrift.drop(sessionId);
6572
6583
  }
6573
- await state.compact.maybeCommit(context);
6574
- if (!compactionOwner()) {
6584
+ if (!interrupted) await state.compact.maybeCommit(context);
6585
+ if (!interrupted && !compactionOwner()) {
6575
6586
  await compactAtConfiguredThreshold(
6576
6587
  context,
6577
6588
  state.config,
@@ -6808,6 +6819,9 @@ function createFabricExtension(entryUrl) {
6808
6819
  defaultFabricExecutionGuidance,
6809
6820
  extensionToolRosterGuidance,
6810
6821
  fabricExecutionKernelGuidance,
6822
+ fabricGuidanceDelivery,
6823
+ relocateFabricGuidelines,
6824
+ stripFabricRuleBullets,
6811
6825
  managedHostExecutionGuidance,
6812
6826
  managedHostKernelGuidance,
6813
6827
  fabricSchemaGuidance
@@ -6816,8 +6830,25 @@ function createFabricExtension(entryUrl) {
6816
6830
  const captureSnapshot = state.bootstrapped ? capturePolicy() : void 0;
6817
6831
  const managedHost = state.managedHostOptions;
6818
6832
  const skillReader = managedHost ? managedHost.skillReader ?? null : void 0;
6819
- const sections = event.systemPromptOptions.forceSystemPrompt === void 0 ? event.systemPromptOptions.sections : void 0;
6820
- const systemPrompt = sections ? "" : restoreSkillsForFullCodePrompt(event.systemPrompt, skills, effectiveFullCodeMode, skillReader);
6833
+ const delivery = fabricGuidanceDelivery(
6834
+ true,
6835
+ event.systemPromptOptions.sections !== void 0,
6836
+ event.systemPromptOptions.forceSystemPrompt !== void 0
6837
+ );
6838
+ const sections = delivery.section ? event.systemPromptOptions.sections : void 0;
6839
+ const ownedExecutionRules = fabricOwnedExecutionGuidelines();
6840
+ const executionRules = relocateFabricGuidelines(
6841
+ event.systemPromptOptions.toolGuidelines,
6842
+ fabricExecutionGuidelines(config.executor.kernel, config.executor.pythonRuntime, Boolean(managedHost)),
6843
+ delivery,
6844
+ ownedExecutionRules
6845
+ );
6846
+ const systemPrompt = sections ? "" : restoreSkillsForFullCodePrompt(
6847
+ stripFabricRuleBullets(event.systemPrompt, ownedExecutionRules),
6848
+ skills,
6849
+ effectiveFullCodeMode,
6850
+ skillReader
6851
+ );
6821
6852
  const prompt = userPromptText(event);
6822
6853
  const skillReferenceGuidance = effectiveFullCodeMode && prompt !== void 0 ? buildSkillReferenceGuidance(prompt, skills, skillReader) : void 0;
6823
6854
  const currentModel = context.model ? `${context.model.provider}/${context.model.id}` : void 0;
@@ -6837,20 +6868,24 @@ function createFabricExtension(entryUrl) {
6837
6868
  const guidance = [
6838
6869
  managedHost ? managedHostKernelGuidance(managedHost) : fabricExecutionKernelGuidance(effectiveFullCodeMode, config.executor.kernel, config.executor.pythonRuntime, config.executor.codemodeProfile),
6839
6870
  resolvedGuidance.slotText,
6871
+ executionRules.text,
6840
6872
  fabricSchemaGuidance(schemaMode),
6841
6873
  overrideGuidance,
6842
6874
  extensionRoster,
6843
6875
  resolvedGuidance.appendText,
6844
6876
  managedHost?.guidance
6845
6877
  ].filter((section) => Boolean(section)).join("\n\n");
6878
+ const catalog = sections ? restoreSkillsForFullCodePrompt(sections.skills ?? "", skills, effectiveFullCodeMode, skillReader).trim() : void 0;
6879
+ const forced = delivery.append ? { systemPrompt: `${systemPrompt}
6880
+
6881
+ ${guidance}` } : {};
6846
6882
  if (sections) {
6847
- const catalog = restoreSkillsForFullCodePrompt("", skills, effectiveFullCodeMode, skillReader).trim();
6848
6883
  if (catalog) sections.skills = catalog;
6849
6884
  sections.fabric = guidance;
6850
6885
  }
6851
- const forced = sections ? {} : { systemPrompt: `${systemPrompt}
6852
-
6853
- ${guidance}` };
6886
+ if (executionRules.remaining !== void 0 && event.systemPromptOptions.toolGuidelines) {
6887
+ event.systemPromptOptions.toolGuidelines.fabric_exec = executionRules.remaining;
6888
+ }
6854
6889
  if (!skillReferenceGuidance) return sections ? void 0 : forced;
6855
6890
  return {
6856
6891
  ...forced,
@@ -7004,4 +7039,4 @@ export {
7004
7039
  FABRIC_MANAGED_HOST_VERSION,
7005
7040
  createFabricExtension
7006
7041
  };
7007
- //# sourceMappingURL=chunk-UJPP3EVE.js.map
7042
+ //# sourceMappingURL=chunk-73PV4YUJ.js.map