pi-fabric 0.120.0 → 0.122.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/{chunk-FNOPWRTO.js → chunk-264TBT7A.js} +149 -32
  3. package/dist/chunks/chunk-264TBT7A.js.map +7 -0
  4. package/dist/chunks/{chunk-XHGIFCKY.js → chunk-2EJDNTAU.js} +11 -3
  5. package/dist/chunks/chunk-2EJDNTAU.js.map +7 -0
  6. package/dist/chunks/chunk-35EEGOH3.js +324 -0
  7. package/dist/chunks/chunk-35EEGOH3.js.map +7 -0
  8. package/dist/chunks/{chunk-5TSMAIH3.js → chunk-3ATXL2CW.js} +29 -3
  9. package/dist/chunks/chunk-3ATXL2CW.js.map +7 -0
  10. package/dist/chunks/{chunk-TBQPVF4K.js → chunk-3DXRQK44.js} +2 -2
  11. package/dist/chunks/{chunk-JQEX3JPS.js → chunk-3YNWOC5M.js} +80 -13
  12. package/dist/chunks/chunk-3YNWOC5M.js.map +7 -0
  13. package/dist/chunks/{chunk-QKXMW5BW.js → chunk-44ALO6OB.js} +6 -3
  14. package/dist/chunks/{chunk-QKXMW5BW.js.map → chunk-44ALO6OB.js.map} +2 -2
  15. package/dist/chunks/{chunk-PH3TXYEJ.js → chunk-5XBATXQP.js} +2 -2
  16. package/dist/chunks/{chunk-474EF4LC.js → chunk-7P4QXQK2.js} +18 -7
  17. package/dist/chunks/chunk-7P4QXQK2.js.map +7 -0
  18. package/dist/chunks/{chunk-VTK2FEH7.js → chunk-AI2AR5V3.js} +62 -1
  19. package/dist/chunks/chunk-AI2AR5V3.js.map +7 -0
  20. package/dist/chunks/{chunk-K6QXUGS5.js → chunk-BMAEZNZ5.js} +2 -1
  21. package/dist/chunks/{chunk-ZPB6POZS.js → chunk-CCCBQMN4.js} +3 -3
  22. package/dist/chunks/{chunk-ZPB6POZS.js.map → chunk-CCCBQMN4.js.map} +2 -2
  23. package/dist/chunks/{chunk-R4RAXQ3G.js → chunk-JG237YLN.js} +2 -2
  24. package/dist/chunks/{chunk-FHYEQKHK.js → chunk-KHO2LV5U.js} +3 -1
  25. package/dist/chunks/chunk-KHO2LV5U.js.map +7 -0
  26. package/dist/chunks/{chunk-ADAN2MAQ.js → chunk-R4TGPPJQ.js} +10 -1
  27. package/dist/chunks/chunk-R4TGPPJQ.js.map +7 -0
  28. package/dist/chunks/{chunk-UEMGVZCB.js → chunk-S3IHVG32.js} +3 -1
  29. package/dist/chunks/chunk-S3IHVG32.js.map +7 -0
  30. package/dist/chunks/{chunk-UUZIFZQZ.js → chunk-UVX4OOXH.js} +27 -7
  31. package/dist/chunks/chunk-UVX4OOXH.js.map +7 -0
  32. package/dist/cli/decisions.d.ts.map +1 -1
  33. package/dist/cli/decisions.js +11 -0
  34. package/dist/cli/decisions.js.map +2 -2
  35. package/dist/commands/fabric-handler.js +1 -1
  36. package/dist/components/configuration.js +2 -2
  37. package/dist/config.d.ts +2 -0
  38. package/dist/config.d.ts.map +1 -1
  39. package/dist/core/action-registry.d.ts +21 -8
  40. package/dist/core/action-registry.d.ts.map +1 -1
  41. package/dist/core/action-registry.js +3 -2
  42. package/dist/core/approval-controller.d.ts +2 -0
  43. package/dist/core/approval-controller.d.ts.map +1 -1
  44. package/dist/core/native-tool-result.d.ts +1 -0
  45. package/dist/core/native-tool-result.d.ts.map +1 -1
  46. package/dist/core/tool-result-proxy.d.ts.map +1 -1
  47. package/dist/decisions/command.d.ts.map +1 -1
  48. package/dist/decisions/command.js +8 -0
  49. package/dist/decisions/command.js.map +2 -2
  50. package/dist/durable/agent.d.ts.map +1 -1
  51. package/dist/durable/worker-host.js +20 -2
  52. package/dist/durable/worker-host.js.map +2 -2
  53. package/dist/execution-service.d.ts +9 -0
  54. package/dist/execution-service.d.ts.map +1 -1
  55. package/dist/extension-bootstrap.js +5 -4
  56. package/dist/extension-bootstrap.js.map +1 -1
  57. package/dist/fabric-exec-tool.d.ts.map +1 -1
  58. package/dist/fabric-runtime-state.d.ts.map +1 -1
  59. package/dist/fabric-runtime-state.js +338 -88
  60. package/dist/fabric-runtime-state.js.map +4 -4
  61. package/dist/index.js +5 -4
  62. package/dist/index.js.map +1 -1
  63. package/dist/jev/manager.d.ts.map +1 -1
  64. package/dist/jev.js +2 -2
  65. package/dist/native-tool-catalog.d.ts.map +1 -1
  66. package/dist/native-tool-catalog.js +9 -3
  67. package/dist/native-tool-catalog.js.map +2 -2
  68. package/dist/programs/host.d.ts +12 -3
  69. package/dist/programs/host.d.ts.map +1 -1
  70. package/dist/programs/host.js +60 -26
  71. package/dist/programs/host.js.map +2 -2
  72. package/dist/programs/source.d.ts +11 -0
  73. package/dist/programs/source.d.ts.map +1 -1
  74. package/dist/protocol.d.ts +43 -8
  75. package/dist/protocol.d.ts.map +1 -1
  76. package/dist/protocol.js +1 -1
  77. package/dist/provider-globals.d.ts +13 -0
  78. package/dist/provider-globals.d.ts.map +1 -0
  79. package/dist/providers/agents-provider.d.ts.map +1 -1
  80. package/dist/providers/jev-provider.js +2 -2
  81. package/dist/providers/pi-tools-provider.d.ts +7 -0
  82. package/dist/providers/pi-tools-provider.d.ts.map +1 -1
  83. package/dist/providers/programs-provider.d.ts.map +1 -1
  84. package/dist/providers/sessions-provider.d.ts +7 -0
  85. package/dist/providers/sessions-provider.d.ts.map +1 -1
  86. package/dist/residency/client.d.ts +15 -0
  87. package/dist/residency/client.d.ts.map +1 -1
  88. package/dist/residency/host.js +4 -4
  89. package/dist/residency/pi-entry.js +4 -4
  90. package/dist/runtime/core-override-guest-types.js +2 -2
  91. package/dist/runtime/cpython-child-source.d.ts.map +1 -1
  92. package/dist/runtime/cpython-runtime.d.ts.map +1 -1
  93. package/dist/runtime/cpython-runtime.js +21 -2
  94. package/dist/runtime/cpython-runtime.js.map +2 -2
  95. package/dist/runtime/dynamic-guest-types.d.ts.map +1 -1
  96. package/dist/runtime/dynamic-guest-types.js +2 -1
  97. package/dist/runtime/guest-types.d.ts +3 -2
  98. package/dist/runtime/guest-types.d.ts.map +1 -1
  99. package/dist/runtime/guest-types.js +1 -1
  100. package/dist/runtime/kernel.d.ts +6 -0
  101. package/dist/runtime/kernel.d.ts.map +1 -1
  102. package/dist/runtime/monty-bridge.d.ts +6 -2
  103. package/dist/runtime/monty-bridge.d.ts.map +1 -1
  104. package/dist/runtime/monty-runtime.js +13 -4
  105. package/dist/runtime/monty-runtime.js.map +2 -2
  106. package/dist/runtime/node-process-runtime.js +3 -2
  107. package/dist/runtime/quickjs-runtime.d.ts +1 -1
  108. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  109. package/dist/runtime/quickjs-runtime.js +2 -1
  110. package/dist/runtime/typescript-kernel.js +6 -5
  111. package/dist/runtime/typescript-kernel.js.map +1 -1
  112. package/dist/runtime-state-builtins.d.ts.map +1 -1
  113. package/dist/speculation/scanner.js +1 -1
  114. package/dist/storage/retention.d.ts.map +1 -1
  115. package/dist/topology/peer-presence.d.ts.map +1 -1
  116. package/dist/type-error-guidance.js +1 -1
  117. package/dist/ui/pi-terminal-title.d.ts +18 -0
  118. package/dist/ui/pi-terminal-title.d.ts.map +1 -0
  119. package/dist/ui/settings-sections-presentation.d.ts.map +1 -1
  120. package/dist/ui/settings.js +10 -1
  121. package/dist/ui/settings.js.map +2 -2
  122. package/dist/ui/terminal-title.d.ts +39 -0
  123. package/dist/ui/terminal-title.d.ts.map +1 -0
  124. package/dist/worker/prompt-lifecycle.d.ts +16 -0
  125. package/dist/worker/prompt-lifecycle.d.ts.map +1 -0
  126. package/dist/worker/prompt-lifecycle.js +90 -0
  127. package/dist/worker/prompt-lifecycle.js.map +7 -0
  128. package/dist/worker.js +19 -7
  129. package/dist/worker.js.map +2 -2
  130. package/docs/agents.md +7 -3
  131. package/docs/codemode-parity.md +1 -1
  132. package/docs/configuration.md +4 -2
  133. package/docs/decisions.md +3 -2
  134. package/docs/durable-pi.md +18 -1
  135. package/docs/interface.md +5 -1
  136. package/docs/jev.md +1 -1
  137. package/docs/kernels.md +1 -1
  138. package/docs/programs.md +21 -1
  139. package/docs/providers.md +38 -1
  140. package/docs/shell-composition.md +15 -0
  141. package/docs/skills.md +1 -1
  142. package/package.json +2 -2
  143. package/skillsets/python/fabric-council/SKILL.md +77 -20
  144. package/skillsets/python/fabric-exec/SKILL.md +1 -1
  145. package/skillsets/python/fabric-fusion/SKILL.md +1 -1
  146. package/skillsets/python/fabric-guide/SKILL.md +1 -1
  147. package/skillsets/typescript/fabric-council/SKILL.md +85 -21
  148. package/skillsets/typescript/fabric-exec/SKILL.md +1 -1
  149. package/skillsets/typescript/fabric-fusion/SKILL.md +1 -1
  150. package/skillsets/typescript/fabric-guide/SKILL.md +1 -1
  151. package/dist/chunks/chunk-474EF4LC.js.map +0 -7
  152. package/dist/chunks/chunk-5TSMAIH3.js.map +0 -7
  153. package/dist/chunks/chunk-ADAN2MAQ.js.map +0 -7
  154. package/dist/chunks/chunk-FHYEQKHK.js.map +0 -7
  155. package/dist/chunks/chunk-FNOPWRTO.js.map +0 -7
  156. package/dist/chunks/chunk-JQEX3JPS.js.map +0 -7
  157. package/dist/chunks/chunk-UEMGVZCB.js.map +0 -7
  158. package/dist/chunks/chunk-UUZIFZQZ.js.map +0 -7
  159. package/dist/chunks/chunk-VTK2FEH7.js.map +0 -7
  160. package/dist/chunks/chunk-XHGIFCKY.js.map +0 -7
  161. /package/dist/chunks/{chunk-TBQPVF4K.js.map → chunk-3DXRQK44.js.map} +0 -0
  162. /package/dist/chunks/{chunk-PH3TXYEJ.js.map → chunk-5XBATXQP.js.map} +0 -0
  163. /package/dist/chunks/{chunk-K6QXUGS5.js.map → chunk-BMAEZNZ5.js.map} +0 -0
  164. /package/dist/chunks/{chunk-R4RAXQ3G.js.map → chunk-JG237YLN.js.map} +0 -0
package/README.md CHANGED
@@ -62,7 +62,7 @@ return {
62
62
  };
63
63
  ```
64
64
 
65
- Independent calls run in parallel, and the returned object enters the model context. Known providers support concise direct calls such as `mcp.fal_ai.get_model_schema(...)`, `memory.recall(...)`, `state.get()`, `schema.status()`, and `compact.status()`. Refs found or computed at runtime use `tools.call({ ref, args })` (TypeScript notation). Python uses `await tools.call({"ref": ref, "args": args})`, native dictionary results, and `asyncio.gather` for independent calls.
65
+ Independent calls run in parallel, and the returned object enters the model context. Known providers support concise direct calls such as `mcp.fal_ai.get_model_schema(...)`, `memory.recall(...)`, `state.get()`, `schema.status()`, and `compact.status()`. A provider another extension registers gets a typed global named after it, such as `context.task_add(...)` ([program globals](docs/providers.md#program-globals-and-types)). Refs found or computed at runtime use `tools.call({ ref, args })` (TypeScript notation). Python uses `await tools.call({"ref": ref, "args": args})`, native dictionary results, and `asyncio.gather` for independent calls.
66
66
 
67
67
  To select Python, put this in `~/.pi/agent/fabric.json` or a trusted project's `.pi/fabric.json`, or use `/fabric settings` → **Executor** → **Kernel**:
68
68
 
@@ -130,7 +130,7 @@ Pi loads advanced patterns after direct user invocation. Run `/skill:fabric-guid
130
130
  | A persistent watcher for one measurable goal | `/skill:fabric-supervisor Watch this migration until it is complete and tested.` |
131
131
  | A strict auditor for one feature design spec | `/skill:fabric-spec Implement docs/specs/checkout.md to the tee; nothing missing, nothing extra.` |
132
132
  | A quiet decision-point reviewer | `/skill:fabric-advisor Focus on migration correctness.` |
133
- | Same-model independent reviewers and one decision | `/skill:fabric-council Review this design for correctness, security, and operability.` |
133
+ | Independent reviewers, optionally one model per seat, and one decision | `/skill:fabric-council Review this design for correctness, security, and operability.` |
134
134
  | Multi-model compare-not-merge deliberation or act mode | `/skill:fabric-fusion Deliberate this design across models.` |
135
135
  | One command that chooses advisor or supervisor | `/skill:fabric-ambient advisor Focus on migration correctness.` |
136
136
  | A durable team coordinating through versioned tasks | `/skill:fabric-swarm Coordinate this migration across owned task partitions.` |
@@ -31,7 +31,8 @@ import {
31
31
  import {
32
32
  configureHighlighting,
33
33
  highlightCode,
34
- observePiTheme
34
+ observePiTheme,
35
+ observedThemeVariant
35
36
  } from "./chunk-QNMQJNXE.js";
36
37
  import {
37
38
  activeStatuses,
@@ -106,7 +107,7 @@ import {
106
107
  readFabricProviderWithdrawalV1,
107
108
  readFabricToolPlacementRequestV1,
108
109
  snapshotFabricProgramRunRequestV1
109
- } from "./chunk-FHYEQKHK.js";
110
+ } from "./chunk-KHO2LV5U.js";
110
111
  import {
111
112
  readChildToolAllowlist
112
113
  } from "./chunk-WJNGSG4M.js";
@@ -114,6 +115,9 @@ import {
114
115
  closeScratch,
115
116
  createScratch
116
117
  } from "./chunk-NUU6IUJU.js";
118
+ import {
119
+ hostSdkEntry
120
+ } from "./chunk-WJJXODAB.js";
117
121
  import {
118
122
  resolveAgentDir
119
123
  } from "./chunk-PBDDXBHY.js";
@@ -125,7 +129,7 @@ import {
125
129
  loadFabricConfig,
126
130
  loadFabricConfigForScope,
127
131
  resolveForegroundTools
128
- } from "./chunk-UEMGVZCB.js";
132
+ } from "./chunk-S3IHVG32.js";
129
133
  import {
130
134
  defaultCodePreviewSettings
131
135
  } from "./chunk-OKOHRXGF.js";
@@ -159,7 +163,7 @@ import {
159
163
  ApprovalController,
160
164
  FabricAutoApprovalClassifier,
161
165
  FabricSessionApprovals
162
- } from "./chunk-474EF4LC.js";
166
+ } from "./chunk-7P4QXQK2.js";
163
167
  import {
164
168
  getActiveRepairCompiler,
165
169
  setActiveCompiledSurface
@@ -1621,6 +1625,110 @@ var FabricDirectToolApproval = class {
1621
1625
 
1622
1626
  // src/fabric-exec-tool.ts
1623
1627
  import { Container as Container2, Text as Text2 } from "@earendil-works/pi-tui";
1628
+
1629
+ // src/ui/pi-terminal-title.ts
1630
+ import fs from "node:fs";
1631
+ import path4 from "node:path";
1632
+ var DEFAULT_APP_TITLE = "\u03C0";
1633
+ var readHostManifest = (sdkEntry) => {
1634
+ let directory = path4.dirname(sdkEntry);
1635
+ for (let depth = 0; depth < 4; depth += 1) {
1636
+ const file = path4.join(directory, "package.json");
1637
+ if (fs.existsSync(file)) return JSON.parse(fs.readFileSync(file, "utf8"));
1638
+ directory = path4.dirname(directory);
1639
+ }
1640
+ return void 0;
1641
+ };
1642
+ var piAppTitle = (sdkEntry = hostSdkEntry()) => {
1643
+ if (!sdkEntry) return DEFAULT_APP_TITLE;
1644
+ try {
1645
+ const manifest = readHostManifest(sdkEntry);
1646
+ const name = manifest?.piConfig?.name;
1647
+ return typeof name === "string" && name.trim() ? name.trim() : DEFAULT_APP_TITLE;
1648
+ } catch {
1649
+ return DEFAULT_APP_TITLE;
1650
+ }
1651
+ };
1652
+ var piTerminalTitle = (context) => {
1653
+ const directory = path4.basename(context.cwd) || context.cwd;
1654
+ let name;
1655
+ try {
1656
+ name = context.sessionManager.getSessionName()?.trim();
1657
+ } catch {
1658
+ name = void 0;
1659
+ }
1660
+ return name ? `${piAppTitle()} - ${name} - ${directory}` : `${piAppTitle()} - ${directory}`;
1661
+ };
1662
+
1663
+ // src/ui/terminal-title.ts
1664
+ var MAX_TERMINAL_TITLE_CHARS = 120;
1665
+ var terminalTitleText = (value) => {
1666
+ const text = safeText(value);
1667
+ if (text.length <= MAX_TERMINAL_TITLE_CHARS) return text;
1668
+ return `${Array.from(text).slice(0, MAX_TERMINAL_TITLE_CHARS - 1).join("").trimEnd()}\u2026`;
1669
+ };
1670
+ var plainTitleTheme = () => ({
1671
+ name: observedThemeVariant(),
1672
+ fg: (_color, text) => text,
1673
+ bold: (text) => text
1674
+ });
1675
+ var terminalCallTitle = (audit, core) => terminalTitleText(nestedCallTitle(
1676
+ audit,
1677
+ plainTitleTheme(),
1678
+ void 0,
1679
+ // A window title that counted seconds would flicker; the card keeps timing.
1680
+ core ? { cwd: core.cwd, settings: { ...core.settings, toolCallTiming: false } } : void 0
1681
+ ));
1682
+ var liveRuns = /* @__PURE__ */ new Set();
1683
+ var applyTitle = (setTitle, text) => {
1684
+ try {
1685
+ setTitle(text);
1686
+ } catch {
1687
+ }
1688
+ };
1689
+ var withTerminalTitle = async (title, intent, body) => {
1690
+ title?.show(intent);
1691
+ try {
1692
+ return await body();
1693
+ } finally {
1694
+ await title?.restore();
1695
+ }
1696
+ };
1697
+ var FabricTerminalTitle = class {
1698
+ #setTitle;
1699
+ #base;
1700
+ #applied;
1701
+ #settled = false;
1702
+ constructor(options = {}) {
1703
+ this.#setTitle = options.setTitle;
1704
+ this.#base = options.base;
1705
+ }
1706
+ /** Show the latest nested call's display title, coalescing repeats. */
1707
+ show(title) {
1708
+ const setTitle = this.#setTitle;
1709
+ if (!setTitle || this.#settled) return;
1710
+ const text = terminalTitleText(title);
1711
+ if (!text || text === this.#applied) return;
1712
+ this.#applied = text;
1713
+ liveRuns.add(this);
1714
+ applyTitle(setTitle, text);
1715
+ }
1716
+ /** Hand the window title back to Pi once this run has stopped. */
1717
+ async restore() {
1718
+ if (this.#settled) return;
1719
+ this.#settled = true;
1720
+ if (this.#applied === void 0) return;
1721
+ liveRuns.delete(this);
1722
+ if (liveRuns.size > 0) return;
1723
+ const setTitle = this.#setTitle;
1724
+ const base = await this.#base?.();
1725
+ if (!setTitle || liveRuns.size > 0) return;
1726
+ const text = terminalTitleText(base);
1727
+ if (text) applyTitle(setTitle, text);
1728
+ }
1729
+ };
1730
+
1731
+ // src/fabric-exec-tool.ts
1624
1732
  import { Type } from "typebox";
1625
1733
 
1626
1734
  // src/failure-progress.ts
@@ -1638,8 +1746,8 @@ var formatFailureProgress = (trace) => {
1638
1746
  );
1639
1747
  if (completed.length === 0) return void 0;
1640
1748
  const summaries = completed.slice(0, MAX_COMPLETED_CALLS).map((operation) => {
1641
- const path9 = operation.args.path;
1642
- return typeof path9 === "string" ? `${operation.ref}(${compactPath(path9)})` : operation.ref;
1749
+ const path10 = operation.args.path;
1750
+ return typeof path10 === "string" ? `${operation.ref}(${compactPath(path10)})` : operation.ref;
1643
1751
  });
1644
1752
  const omitted = completed.length - summaries.length;
1645
1753
  return [
@@ -1850,19 +1958,19 @@ var PartialResultObserver = class {
1850
1958
  };
1851
1959
 
1852
1960
  // src/output-budget.ts
1853
- import fs from "node:fs/promises";
1854
- import path4 from "node:path";
1961
+ import fs2 from "node:fs/promises";
1962
+ import path5 from "node:path";
1855
1963
  var MAX_FAILURE_MODEL_OUTPUT_CHARS = 2e4;
1856
1964
  var modelOutputBudget = (configuredMaxChars, success) => success ? configuredMaxChars : Math.min(configuredMaxChars, MAX_FAILURE_MODEL_OUTPUT_CHARS);
1857
1965
  var writeOutputArtifact = async (content) => {
1858
1966
  const directory = createScratch("output");
1859
1967
  try {
1860
- const artifactPath = path4.join(directory, "output.txt");
1861
- await fs.writeFile(artifactPath, content, { encoding: "utf8", mode: 384, flag: "wx" });
1968
+ const artifactPath = path5.join(directory, "output.txt");
1969
+ await fs2.writeFile(artifactPath, content, { encoding: "utf8", mode: 384, flag: "wx" });
1862
1970
  closeScratch(directory);
1863
1971
  return artifactPath;
1864
1972
  } catch (error) {
1865
- await fs.rm(directory, { recursive: true, force: true }).catch(() => void 0);
1973
+ await fs2.rm(directory, { recursive: true, force: true }).catch(() => void 0);
1866
1974
  throw error;
1867
1975
  }
1868
1976
  };
@@ -2520,7 +2628,12 @@ ${preview}` : ""}${hiddenHint}`,
2520
2628
  }
2521
2629
  const runDisplay = normalizeRunDisplay(params.display);
2522
2630
  const tokenBudget = "tokenBudget" in params && typeof params.tokenBudget === "number" ? params.tokenBudget : void 0;
2523
- const result = await state.execution.execute({
2631
+ const intentTitle = runDisplay?.name?.trim() || fabricExecTitleHintCached(code, python ? "python" : "typescript") || (python ? "Python program" : "Fabric");
2632
+ const liveTitle = state.config.ui.enabled && state.config.ui.terminalTitle && context.mode === "tui" && context.hasUI ? new FabricTerminalTitle({
2633
+ setTitle: (title) => context.ui.setTitle(title),
2634
+ base: () => piTerminalTitle(context)
2635
+ }) : void 0;
2636
+ const result = await withTerminalTitle(liveTitle, intentTitle, () => state.execution.execute({
2524
2637
  code,
2525
2638
  ...strings ? { strings } : {},
2526
2639
  signal,
@@ -2537,6 +2650,10 @@ ${preview}` : ""}${hiddenHint}`,
2537
2650
  }
2538
2651
  } : {},
2539
2652
  onPartial(snapshot) {
2653
+ const latest = snapshot.audits.at(-1);
2654
+ liveTitle?.show(
2655
+ latest ? terminalCallTitle(latest, { cwd: context.cwd, settings: codePreviewSettings }) : intentTitle
2656
+ );
2540
2657
  onUpdate?.({
2541
2658
  content: [{ type: "text", text: snapshot.progress ?? "" }],
2542
2659
  details: {
@@ -2546,7 +2663,7 @@ ${preview}` : ""}${hiddenHint}`,
2546
2663
  }
2547
2664
  });
2548
2665
  }
2549
- });
2666
+ }));
2550
2667
  const selectedResultFormat = params.resultFormat ?? state.config.executor.resultFormat;
2551
2668
  const boundarySessionId = context.sessionManager.getSessionId();
2552
2669
  const pendingHandoff = await state.claimHandoff(
@@ -2673,8 +2790,8 @@ ${recoveryHint}` : ""}`,
2673
2790
  };
2674
2791
 
2675
2792
  // src/fabric-state.ts
2676
- import fs2 from "node:fs";
2677
- import path5 from "node:path";
2793
+ import fs3 from "node:fs";
2794
+ import path6 from "node:path";
2678
2795
 
2679
2796
  // src/managed-host.ts
2680
2797
  var REPLACEABLE = /* @__PURE__ */ new Set(["agents", "memory", "compact", "schema", "state", "mesh", "mcp"]);
@@ -2934,15 +3051,15 @@ var FabricState = class {
2934
3051
  const sessionId = context.sessionManager.getSessionId();
2935
3052
  if (resolveFabricIdentity(sessionId).identity.kind !== "main") return false;
2936
3053
  const projectRoot = process.env.PI_FABRIC_PROJECT_ROOT ?? context.cwd;
2937
- const meshRoot = process.env.PI_FABRIC_MESH_ROOT ?? (this.config.mesh.root ? path5.resolve(projectRoot, this.config.mesh.root) : path5.join(projectRoot, ".pi", "fabric", "mesh"));
3054
+ const meshRoot = process.env.PI_FABRIC_MESH_ROOT ?? (this.config.mesh.root ? path6.resolve(projectRoot, this.config.mesh.root) : path6.join(projectRoot, ".pi", "fabric", "mesh"));
2938
3055
  const fabricSessionId = process.env.PI_FABRIC_SESSION_ID?.trim() || sessionId;
2939
3056
  const actorRoots = [
2940
- path5.join(meshRoot, "actors"),
2941
- path5.join(meshRoot, "actors", fabricSessionId)
3057
+ path6.join(meshRoot, "actors"),
3058
+ path6.join(meshRoot, "actors", fabricSessionId)
2942
3059
  ];
2943
3060
  return actorRoots.some((actorRoot) => {
2944
3061
  try {
2945
- const registry = JSON.parse(fs2.readFileSync(path5.join(actorRoot, "actors.json"), "utf8"));
3062
+ const registry = JSON.parse(fs3.readFileSync(path6.join(actorRoot, "actors.json"), "utf8"));
2946
3063
  if (typeof registry !== "object" || registry === null || Array.isArray(registry)) return false;
2947
3064
  const actors = registry.actors;
2948
3065
  return Array.isArray(actors) && actors.some((value) => {
@@ -3435,7 +3552,7 @@ var classifyToolResult = (input) => {
3435
3552
 
3436
3553
  // src/host-compatibility.ts
3437
3554
  import { existsSync as existsSync2, readFileSync as readFileSync2, realpathSync as realpathSync2 } from "node:fs";
3438
- import path6 from "node:path";
3555
+ import path7 from "node:path";
3439
3556
  var MINIMUM_PI_HOST_VERSION = "1.0.0";
3440
3557
  var PI_HOST_PACKAGE_NAMES = /* @__PURE__ */ new Set([
3441
3558
  "@earendil-works/pi-coding-agent",
@@ -3466,12 +3583,12 @@ var detectPiHostVersion = (cliPath = process.argv[1]) => {
3466
3583
  if (!cliPath) return void 0;
3467
3584
  let directory;
3468
3585
  try {
3469
- directory = path6.dirname(realpathSync2(cliPath));
3586
+ directory = path7.dirname(realpathSync2(cliPath));
3470
3587
  } catch {
3471
3588
  return void 0;
3472
3589
  }
3473
3590
  while (true) {
3474
- const manifestPath = path6.join(directory, "package.json");
3591
+ const manifestPath = path7.join(directory, "package.json");
3475
3592
  if (existsSync2(manifestPath)) {
3476
3593
  try {
3477
3594
  const manifest = JSON.parse(readFileSync2(manifestPath, "utf8"));
@@ -3481,7 +3598,7 @@ var detectPiHostVersion = (cliPath = process.argv[1]) => {
3481
3598
  } catch {
3482
3599
  }
3483
3600
  }
3484
- const parent = path6.dirname(directory);
3601
+ const parent = path7.dirname(directory);
3485
3602
  if (parent === directory) return void 0;
3486
3603
  directory = parent;
3487
3604
  }
@@ -3494,7 +3611,7 @@ var piHostCompatibilityWarning = (version = detectPiHostVersion()) => {
3494
3611
  };
3495
3612
 
3496
3613
  // src/ui/controller.ts
3497
- import path7 from "node:path";
3614
+ import path8 from "node:path";
3498
3615
 
3499
3616
  // src/ui/snapshot.ts
3500
3617
  import { isDeepStrictEqual } from "node:util";
@@ -4835,7 +4952,7 @@ var FabricUiController = class {
4835
4952
  logFile: actor.worker.logFile
4836
4953
  };
4837
4954
  }
4838
- const retained = actor.lastRunId && actor.logDir ? path7.join(actor.logDir, actor.lastRunId, "events.jsonl") : void 0;
4955
+ const retained = actor.lastRunId && actor.logDir ? path8.join(actor.logDir, actor.lastRunId, "events.jsonl") : void 0;
4839
4956
  if (retained) return { id: actor.id, status: actor.status, logFile: retained };
4840
4957
  if (actor.sessionFile) {
4841
4958
  return { id: actor.id, status: actor.status, logFile: actor.sessionFile };
@@ -5099,17 +5216,17 @@ var registerHandoffCompletionRenderer = (extension) => {
5099
5216
  };
5100
5217
 
5101
5218
  // src/extension.ts
5102
- import path8 from "node:path";
5219
+ import path9 from "node:path";
5103
5220
  import { fileURLToPath } from "node:url";
5104
5221
  var FABRIC_MANAGED_HOST_VERSION = 1;
5105
5222
  function createFabricExtension(entryUrl) {
5106
- const FABRIC_EXTENSION_ENTRY_PATH = path8.resolve(fileURLToPath(entryUrl));
5107
- const FABRIC_ENTRY_DIR = path8.dirname(FABRIC_EXTENSION_ENTRY_PATH);
5223
+ const FABRIC_EXTENSION_ENTRY_PATH = path9.resolve(fileURLToPath(entryUrl));
5224
+ const FABRIC_ENTRY_DIR = path9.dirname(FABRIC_EXTENSION_ENTRY_PATH);
5108
5225
  const FABRIC_RUNTIME_PATHS = {
5109
5226
  extension: FABRIC_EXTENSION_ENTRY_PATH,
5110
- worker: path8.join(FABRIC_ENTRY_DIR, "worker.js"),
5111
- residentHost: path8.join(FABRIC_ENTRY_DIR, "residency", "launcher.js"),
5112
- skills: path8.resolve(FABRIC_ENTRY_DIR, "..", "skillsets")
5227
+ worker: path9.join(FABRIC_ENTRY_DIR, "worker.js"),
5228
+ residentHost: path9.join(FABRIC_ENTRY_DIR, "residency", "launcher.js"),
5229
+ skills: path9.resolve(FABRIC_ENTRY_DIR, "..", "skillsets")
5113
5230
  };
5114
5231
  const FABRIC_SKILLS_DIR = FABRIC_RUNTIME_PATHS.skills;
5115
5232
  const FABRIC_ENTRY_IDENTITY = captureLoadedFileIdentity(entryUrl);
@@ -6001,4 +6118,4 @@ export {
6001
6118
  FABRIC_MANAGED_HOST_VERSION,
6002
6119
  createFabricExtension
6003
6120
  };
6004
- //# sourceMappingURL=chunk-FNOPWRTO.js.map
6121
+ //# sourceMappingURL=chunk-264TBT7A.js.map