@tekmidian/pai 1.0.3 → 1.0.5

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 (147) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/{auto-route-B7Yu6Uam.mjs → auto-route-DUYr57rs.mjs} +2 -2
  3. package/dist/auto-route-DWYK_0i0.mjs +11 -0
  4. package/dist/budget-DX-VIWGf.mjs +15 -0
  5. package/dist/{caller-identity-yLFb7CKq.mjs → caller-identity-Bim8JT-D.mjs} +3 -3
  6. package/dist/{capacity-DEveQdFV.mjs → capacity-CsZMkVyg.mjs} +7 -4
  7. package/dist/{chain-7n9Gx56r.mjs → chain-Dzz6xcKH.mjs} +5 -5
  8. package/dist/cli/index.mjs +114 -208
  9. package/dist/{cockpit-actions-BBHeyEZI.mjs → cockpit-actions-BTA1njMO.mjs} +31 -25
  10. package/dist/{cockpit-actions-DR9X514g.mjs → cockpit-actions-BgsiNcUY.mjs} +18 -18
  11. package/dist/cockpit-memory-DIrNs4xr.mjs +20 -0
  12. package/dist/config/defaults/config.yaml +9 -0
  13. package/dist/{config-XpZWOYOG.mjs → config-CST2uq1v.mjs} +29 -4
  14. package/dist/{config-Bu1_vbY8.mjs → config-DYbyEe4-.mjs} +2 -2
  15. package/dist/{config-DtENJ6cL.mjs → config-Dv3t7xnT.mjs} +1 -1
  16. package/dist/config-h5qK3fst.mjs +4 -0
  17. package/dist/{controls-CPoeudou.mjs → controls-OiVVbe-f.mjs} +18 -16
  18. package/dist/daemon/index.mjs +38 -37
  19. package/dist/{daemon-DPAo6WTa.mjs → daemon-C1dycZ3W.mjs} +35 -29
  20. package/dist/daemon-ieo0lnpq.mjs +46 -0
  21. package/dist/daemon-mcp/index.mjs +35 -35
  22. package/dist/detect-C0ZBXqDL.mjs +10 -0
  23. package/dist/{detect-9CZNO0yf.mjs → detect-CHuxFrLy.mjs} +2 -2
  24. package/dist/{embed-pass-DIWjA68P.mjs → embed-pass-DtVF2fOV.mjs} +4 -4
  25. package/dist/{embedding-gate-Cnk4YCyX.mjs → embedding-gate-B98PK_wz.mjs} +2 -2
  26. package/dist/{embedding-gate-6rZrWRXa.mjs → embedding-gate-CTAk8STe.mjs} +2 -2
  27. package/dist/{endreason-C577xIQz.mjs → endreason-BqyyU7BH.mjs} +20 -6
  28. package/dist/{factory-DjAAsqr_.mjs → factory-BV0MQA3T.mjs} +4 -4
  29. package/dist/{factory-Bsib-qDG.mjs → factory-DeASMV7Z.mjs} +4 -4
  30. package/dist/{fallback-DFlItw1Z.mjs → fallback-Bj2cyVk_.mjs} +230 -8
  31. package/dist/{health-Dnym-qcT.mjs → health-kufVIf6i.mjs} +4 -4
  32. package/dist/{helpers-BD6V-p9w.mjs → helpers-CvbYEKoD.mjs} +2 -2
  33. package/dist/{helpers-CMGjy_0N.mjs → helpers-WV8tdQHM.mjs} +5 -5
  34. package/dist/hooks/block-sleep-poll.mjs +1 -1
  35. package/dist/hooks/capture-all-events.mjs +21 -2
  36. package/dist/hooks/capture-tool-output.mjs +21 -2
  37. package/dist/hooks/load-project-context.mjs +7 -7
  38. package/dist/hooks/local-model-hint.mjs +1 -1
  39. package/dist/hooks/route-agents-to-worker.mjs +1 -1
  40. package/dist/hooks/security-validator.mjs +2 -2
  41. package/dist/hooks/worker-edit-repair.mjs +2 -2
  42. package/dist/hooks/worker-guard.mjs +8 -8
  43. package/dist/hooks/worker-note.mjs +2 -2
  44. package/dist/hooks/worker-pool-host.mjs +158 -55
  45. package/dist/hooks/worker-proxy.mjs +1 -1
  46. package/dist/hooks/worker-status-line.mjs +50 -22
  47. package/dist/hooks/worker-supervision.mjs +1 -1
  48. package/dist/hooks/worker-tool-name-repair.mjs +2 -2
  49. package/dist/index.mjs +8 -8
  50. package/dist/{indexer-backend-Cll7le4P.mjs → indexer-backend-B2vtFl38.mjs} +37 -234
  51. package/dist/{ipc-client-CaiGJnSM.mjs → ipc-client-CnYEF31R.mjs} +1 -1
  52. package/dist/{ipc-client-ZRmDKd5Z.mjs → ipc-client-DN7EvoVo.mjs} +1 -1
  53. package/dist/kill-tree-CXZ0WfVf.mjs +10 -0
  54. package/dist/{kill-tree-EWYaEk5v.mjs → kill-tree-CcpsRLCZ.mjs} +7 -7
  55. package/dist/{launch-Jh5NVeNe.mjs → launch-DpQPZGsT.mjs} +3 -3
  56. package/dist/{launch-CXVlZjHt.mjs → launch-UPQBoW2q.mjs} +3 -3
  57. package/dist/{local-candidate-DLdwQt0s.mjs → local-candidate-Cp_bw4kK.mjs} +3 -3
  58. package/dist/{local-instances-ZeRkkuS5.mjs → local-instances-B-c-CxzP.mjs} +4 -4
  59. package/dist/{local-instances-DOxSgT_L.mjs → local-instances-bdCNNSsL.mjs} +2 -2
  60. package/dist/{local-tiers-BE4jGaMa.mjs → local-tiers-BtdEEe5n.mjs} +2 -2
  61. package/dist/{local-tiers-DNMI5W86.mjs → local-tiers-OBqAAfOg.mjs} +3 -3
  62. package/dist/{main-config-ops-BEMpuhDz.mjs → main-config-ops-BYsK3BxM.mjs} +3 -3
  63. package/dist/{main-resolver-3Ns1HPmS.mjs → main-resolver-CAC3xfZM.mjs} +17 -17
  64. package/dist/{model-inventory-BFVSNFT3.mjs → model-inventory-BuTpi9a6.mjs} +13 -13
  65. package/dist/{models-add-C1QIc1DA.mjs → models-add-CJx2YAwh.mjs} +37 -36
  66. package/dist/operator-Bpxq_WB5.mjs +7 -0
  67. package/dist/{operator-CyuB3aVw.mjs → operator-DrwWItVt.mjs} +2 -2
  68. package/dist/{pai-marker-BcZyJguM.mjs → pai-marker-DLKJ9Yr5.mjs} +2 -2
  69. package/dist/{pane-audit-DKQt71s4.mjs → pane-audit-wv9UkyCe.mjs} +27 -9
  70. package/dist/{paths-CFHTloSe.mjs → paths-DBd78I7Z.mjs} +3 -3
  71. package/dist/{paths-CHifubDh.mjs → paths-DS5VQKoR.mjs} +3 -3
  72. package/dist/{planner-BmFACdLa.mjs → planner-K0mFrCpL.mjs} +28 -28
  73. package/dist/{pool-Dh-q3iJi.mjs → pool-BZ94nFuq.mjs} +2 -2
  74. package/dist/{pool-cli-BggU8GRp.mjs → pool-cli-B1eKySeN.mjs} +5 -5
  75. package/dist/{pool-cli-DQ6OzRy2.mjs → pool-cli-BjYQDfx6.mjs} +6 -6
  76. package/dist/{postgres-C6ti4haA.mjs → postgres-C-T5OWer.mjs} +19 -9
  77. package/dist/{postgres-BdBNkL_l.mjs → postgres-CBHY5PIi.mjs} +3 -3
  78. package/dist/{project-setup-jvfONJTQ.mjs → project-setup-pIPHZaXf.mjs} +26 -246
  79. package/dist/{providers-CblTFrhz.mjs → providers-Dzx5GAUI.mjs} +6 -6
  80. package/dist/providers-QJzpaNhX.mjs +16 -0
  81. package/dist/{query-feedback-BRfPtqki.mjs → query-feedback-DN52N9C5.mjs} +1 -1
  82. package/dist/{registrable-DpyTtajg.mjs → registrable-CXBBpUcz.mjs} +4 -4
  83. package/dist/registrable-Drn8wIDO.mjs +9 -0
  84. package/dist/render-C4KR8qQ8.mjs +13 -0
  85. package/dist/{render-BYmQkuLd.mjs → render-Cz3BWIBO.mjs} +8 -8
  86. package/dist/root-Bfb1zgwE.mjs +36 -0
  87. package/dist/{root-Xglu0OPD.mjs → root-bG48WVpW.mjs} +10 -10
  88. package/dist/route-table-ZVMNBsy7.mjs +15 -0
  89. package/dist/{routing-BAAST9vT.mjs → routing-BlD_tKjW.mjs} +136 -18
  90. package/dist/{routing-CENt4HH1.mjs → routing-D27jxj9x.mjs} +13 -13
  91. package/dist/{run-CSC7mgPf.mjs → run-AZVwceiU.mjs} +49 -27
  92. package/dist/{scan-C_Y5W9py.mjs → scan-C3uotg_f.mjs} +5 -5
  93. package/dist/{scope-D-h6F6DN.mjs → scope-D8HK6vU7.mjs} +4 -4
  94. package/dist/{session-8iqQDkqb.mjs → session-BAfypQb9.mjs} +26 -26
  95. package/dist/session-BcnhepLZ.mjs +35 -0
  96. package/dist/{session-scan-W-gbwJHM.mjs → session-scan-BmnjSReu.mjs} +5 -5
  97. package/dist/session-scan-CqUQdCac.mjs +9 -0
  98. package/dist/session-usage-oycSdiD3.mjs +337 -0
  99. package/dist/{sources-ESUkZaWv.mjs → sources-CiE3rZek.mjs} +1 -1
  100. package/dist/{status-ggJ7lgVg.mjs → status-COtzewKV.mjs} +3 -3
  101. package/dist/{status-Dm4dYciN.mjs → status-D_SWmOlH.mjs} +4 -4
  102. package/dist/{tool-errors-CJWODvlo.mjs → tool-errors-B2LnIqR0.mjs} +6 -6
  103. package/dist/{tool-errors-7E13StWd.mjs → tool-errors-DXJ70-sr.mjs} +2 -2
  104. package/dist/{viewer-mDXUNHNy.mjs → viewer-BgGRqXfD.mjs} +14 -14
  105. package/dist/viewer-CbGN2Ri4.mjs +22 -0
  106. package/dist/{wait-ByV0OyMZ.mjs → wait-ChpHKJZV.mjs} +3 -3
  107. package/dist/worker-config-D1KVAMp4.mjs +42 -0
  108. package/dist/{worker-config-CJhEMk19.mjs → worker-config-DgdT0iTB.mjs} +443 -40
  109. package/dist/workers-config-BhZBrR-Q.mjs +4 -0
  110. package/dist/{worktree-CRs2gyg0.mjs → worktree-BY--Rgmy.mjs} +5 -5
  111. package/dist/{zettelkasten-B_rRRRvD.mjs → zettelkasten-BHVx5zj-.mjs} +4 -4
  112. package/dist/{zettelkasten-BzMm8REH.mjs → zettelkasten-LoH9RBiN.mjs} +2 -2
  113. package/docs/cockpit.md +1 -0
  114. package/docs/commands/README.md +1 -0
  115. package/docs/commands/config.md +20 -0
  116. package/gemini-extension.json +1 -1
  117. package/package.json +1 -1
  118. package/pai-plugin.json +1 -1
  119. package/plugins/context-preservation/plugin.json +1 -1
  120. package/plugins/core/plugin.json +1 -1
  121. package/plugins/creative/plugin.json +1 -1
  122. package/plugins/observability/plugin.json +1 -1
  123. package/plugins/productivity/plugin.json +1 -1
  124. package/plugins/semantic-search/plugin.json +1 -1
  125. package/plugins/ui/plugin.json +1 -1
  126. package/plugins/zettelkasten/plugin.json +1 -1
  127. package/src/hooks/ts/capture-all-events.ts +15 -3
  128. package/src/hooks/ts/lib/raw-capture.ts +7 -0
  129. package/src/hooks/ts/post-tool-use/capture-tool-output.ts +13 -3
  130. package/dist/auto-route-CjjQqU1o.mjs +0 -11
  131. package/dist/budget-Dod6rnA9.mjs +0 -15
  132. package/dist/cockpit-memory--dnShXBA.mjs +0 -20
  133. package/dist/config-Cxi-aBf4.mjs +0 -4
  134. package/dist/daemon-DKdBNKfa.mjs +0 -45
  135. package/dist/detect-D1ziFFfA.mjs +0 -10
  136. package/dist/kill-tree-BG7dRVtp.mjs +0 -10
  137. package/dist/operator-BTqvTIc8.mjs +0 -7
  138. package/dist/providers-BeDiVEb-.mjs +0 -16
  139. package/dist/registrable-BzH4TObg.mjs +0 -9
  140. package/dist/render-CoMvwMPs.mjs +0 -13
  141. package/dist/root-FtJsxYnm.mjs +0 -36
  142. package/dist/route-table-B7zpoypi.mjs +0 -15
  143. package/dist/session-BeqAbNPd.mjs +0 -35
  144. package/dist/session-scan-BJI_ZO8M.mjs +0 -9
  145. package/dist/viewer-CqozWW39.mjs +0 -22
  146. package/dist/worker-config-DESkIjMF.mjs +0 -41
  147. package/dist/workers-config-f8KrkY4L.mjs +0 -4
@@ -1,5 +1,5 @@
1
- import { I as LOOPBACK_HOST, _ as maskKey, a as MODEL_CAPABILITIES, b as nativeOrchestratorModel, c as WorkersConfigError, j as readWorkersSection, p as getProviderOrNative, t as ANTHROPIC_NATIVE, y as nativeAnthropicProvider } from "./config-XpZWOYOG.mjs";
2
- import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, ut as buildRunEnv, yt as pinnedSettingsArgs } from "./routing-BAAST9vT.mjs";
1
+ import { M as readWorkersSection, R as LOOPBACK_HOST, _ as maskKey, a as MODEL_CAPABILITIES, b as nativeOrchestratorModel, c as WorkersConfigError, p as getProviderOrNative, t as ANTHROPIC_NATIVE, y as nativeAnthropicProvider } from "./config-CST2uq1v.mjs";
2
+ import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, ut as buildRunEnv, yt as pinnedSettingsArgs } from "./routing-BlD_tKjW.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { spawn } from "node:child_process";
@@ -258,4 +258,4 @@ function maskLaunchEnv(env) {
258
258
 
259
259
  //#endregion
260
260
  export { detectCurrentProviderName as a, ensureProxyRunning as c, detectCurrentModel as i, proxyPort as l, buildLaunchPlan as n, launchableProviderNames as o, buildLaunchRows as r, maskLaunchEnv as s, LaunchError as t, stopProxy as u };
261
- //# sourceMappingURL=launch-Jh5NVeNe.mjs.map
261
+ //# sourceMappingURL=launch-DpQPZGsT.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { i as err } from "./utils-J2b9y8PC.mjs";
2
- import { j as readWorkersSection, t as ANTHROPIC_NATIVE, vt as stripModelVariant } from "./config-XpZWOYOG.mjs";
3
- import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, dt as claudeCommand, gt as nativeLaunchSettingsArgs, ht as nativeLaunchEnv, ut as buildRunEnv, xt as routeVerdictLine, yt as pinnedSettingsArgs } from "./routing-BAAST9vT.mjs";
2
+ import { M as readWorkersSection, bt as stripModelVariant, t as ANTHROPIC_NATIVE } from "./config-CST2uq1v.mjs";
3
+ import { _t as nativeRoutePreflight, b as SESSION_PROVIDER_ENV, dt as claudeCommand, gt as nativeLaunchSettingsArgs, ht as nativeLaunchEnv, ut as buildRunEnv, xt as routeVerdictLine, yt as pinnedSettingsArgs } from "./routing-BlD_tKjW.mjs";
4
4
  import { closeSync, copyFileSync, existsSync, fstatSync, linkSync, openSync, readSync, realpathSync } from "node:fs";
5
5
  import { join } from "node:path";
6
6
  import chalk from "chalk";
@@ -740,4 +740,4 @@ function launchInDir(dir, name, opts = {}) {
740
740
 
741
741
  //#endregion
742
742
  export { providerResumePlan as a, resumeOfferBlock as c, printExitDir as d, probeResume as i, resumeRouteFor as l, launchInDir as n, restoreTopLevel as o, launchPrompt as r, resumeArgvText as s, hasConversation as t, transcriptModelFor as u };
743
- //# sourceMappingURL=launch-CXVlZjHt.mjs.map
743
+ //# sourceMappingURL=launch-UPQBoW2q.mjs.map
@@ -1,5 +1,5 @@
1
- import { L as isLoopbackHostname, tt as workersYamlPath } from "./config-XpZWOYOG.mjs";
2
- import { _ as readLocalConfig } from "./local-tiers-BE4jGaMa.mjs";
1
+ import { rt as workersYamlPath, z as isLoopbackHostname } from "./config-CST2uq1v.mjs";
2
+ import { _ as readLocalConfig } from "./local-tiers-BtdEEe5n.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
 
@@ -109,4 +109,4 @@ function isLocalCandidate(p, name, tierProviders) {
109
109
 
110
110
  //#endregion
111
111
  export { localStatusReport as a, writeLocalStatus as c, localStatusLine as i, tierProviderNames as n, primaryLocal as o, LOCAL_STATUS_REFRESH_MS as r, readLocalStatus as s, isLocalCandidate as t };
112
- //# sourceMappingURL=local-candidate-DLdwQt0s.mjs.map
112
+ //# sourceMappingURL=local-candidate-Cp_bw4kK.mjs.map
@@ -1,6 +1,6 @@
1
- import "./config-XpZWOYOG.mjs";
2
- import "./config-Bu1_vbY8.mjs";
3
- import "./local-tiers-BE4jGaMa.mjs";
4
- import { a as instancesFromProcesses, c as pidAlive, d as reconcileInstances, f as registeredInstances, i as instanceNumber, l as readInstances, n as engineKey, o as localInstancesPath, p as writeInstances, r as instanceEngineKey, s as pickInstance, t as endpointRegistry, u as readLiveInstances } from "./local-instances-DOxSgT_L.mjs";
1
+ import "./config-CST2uq1v.mjs";
2
+ import "./config-DYbyEe4-.mjs";
3
+ import "./local-tiers-BtdEEe5n.mjs";
4
+ import { a as instancesFromProcesses, c as pidAlive, d as reconcileInstances, f as registeredInstances, i as instanceNumber, l as readInstances, n as engineKey, o as localInstancesPath, p as writeInstances, r as instanceEngineKey, s as pickInstance, t as endpointRegistry, u as readLiveInstances } from "./local-instances-bdCNNSsL.mjs";
5
5
 
6
6
  export { endpointRegistry, engineKey, instanceEngineKey, instanceNumber, instancesFromProcesses, localInstancesPath, pickInstance, pidAlive, readInstances, readLiveInstances, reconcileInstances, registeredInstances, writeInstances };
@@ -1,5 +1,5 @@
1
1
  import { n as minOf } from "./min-max-DrSRUaWQ.mjs";
2
- import { h as parseServers, v as resolveModelPath } from "./local-tiers-BE4jGaMa.mjs";
2
+ import { h as parseServers, v as resolveModelPath } from "./local-tiers-BtdEEe5n.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
 
@@ -207,4 +207,4 @@ function endpointRegistry(managed, providers, cfg) {
207
207
 
208
208
  //#endregion
209
209
  export { instancesFromProcesses as a, pidAlive as c, reconcileInstances as d, registeredInstances as f, instanceNumber as i, readInstances as l, engineKey as n, localInstancesPath as o, writeInstances as p, instanceEngineKey as r, pickInstance as s, endpointRegistry as t, readLiveInstances as u };
210
- //# sourceMappingURL=local-instances-DOxSgT_L.mjs.map
210
+ //# sourceMappingURL=local-instances-bdCNNSsL.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { g as paiHomePath } from "./runtime-paths-WsO9sJFc.mjs";
2
- import { o as expandHome } from "./config-Bu1_vbY8.mjs";
2
+ import { o as expandHome } from "./config-DYbyEe4-.mjs";
3
3
  import { existsSync, readFileSync, readdirSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { homedir } from "node:os";
@@ -467,4 +467,4 @@ const shellQuote = shq;
467
467
 
468
468
  //#endregion
469
469
  export { stopLines as C, stopLine as S, tierButtons as T, readLocalConfig as _, LocalTierError as a, splitCommand as b, fetchServedModels as c, installedModelDirs as d, listensOnPort as f, planStart as g, parseServers as h, DEFAULT_RESERVE_GB as i, fmtRss as l, parseLocalConfig as m, DEFAULT_HEALTH as n, defaultLauncher as o, logPathFor as p, DEFAULT_MAX_INSTANCES as r, defaultStrataPython as s, DEFAULT_COMMON_FLAGS as t, healthUrl as u, resolveModelPath as v, strataInfo as w, stopCommandFor as x, shellQuote as y };
470
- //# sourceMappingURL=local-tiers-BE4jGaMa.mjs.map
470
+ //# sourceMappingURL=local-tiers-BtdEEe5n.mjs.map
@@ -1,5 +1,5 @@
1
- import "./config-XpZWOYOG.mjs";
2
- import "./config-Bu1_vbY8.mjs";
3
- import { C as stopLines, S as stopLine, T as tierButtons, _ as readLocalConfig, a as LocalTierError, b as splitCommand, c as fetchServedModels, d as installedModelDirs, f as listensOnPort, g as planStart, h as parseServers, i as DEFAULT_RESERVE_GB, l as fmtRss, m as parseLocalConfig, n as DEFAULT_HEALTH, o as defaultLauncher, p as logPathFor, r as DEFAULT_MAX_INSTANCES, s as defaultStrataPython, t as DEFAULT_COMMON_FLAGS, u as healthUrl, v as resolveModelPath, w as strataInfo, x as stopCommandFor, y as shellQuote } from "./local-tiers-BE4jGaMa.mjs";
1
+ import "./config-CST2uq1v.mjs";
2
+ import "./config-DYbyEe4-.mjs";
3
+ import { C as stopLines, S as stopLine, T as tierButtons, _ as readLocalConfig, a as LocalTierError, b as splitCommand, c as fetchServedModels, d as installedModelDirs, f as listensOnPort, g as planStart, h as parseServers, i as DEFAULT_RESERVE_GB, l as fmtRss, m as parseLocalConfig, n as DEFAULT_HEALTH, o as defaultLauncher, p as logPathFor, r as DEFAULT_MAX_INSTANCES, s as defaultStrataPython, t as DEFAULT_COMMON_FLAGS, u as healthUrl, v as resolveModelPath, w as strataInfo, x as stopCommandFor, y as shellQuote } from "./local-tiers-BtdEEe5n.mjs";
4
4
 
5
5
  export { readLocalConfig };
@@ -1,5 +1,5 @@
1
- import { _ as maskKey, j as readWorkersSection, tt as workersYamlPath } from "./config-XpZWOYOG.mjs";
2
- import { C as migrateMainConfigToYaml, E as writeYamlFileAtomic, c as loadConfig, d as paiConfigYamlFilePath, f as readMainConfigRaw, i as defaults, p as writeMainConfigRaw, u as paiConfigFilePath, x as userWorkersYamlRaw } from "./config-Bu1_vbY8.mjs";
1
+ import { M as readWorkersSection, _ as maskKey, rt as workersYamlPath } from "./config-CST2uq1v.mjs";
2
+ import { C as migrateMainConfigToYaml, D as writeYamlFileAtomic, c as loadConfig, d as paiConfigYamlFilePath, f as readMainConfigRaw, i as defaults, p as writeMainConfigRaw, u as paiConfigFilePath, x as userWorkersYamlRaw } from "./config-DYbyEe4-.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { Document } from "yaml";
5
5
 
@@ -239,4 +239,4 @@ function unsetConfigValueOp(dottedPath) {
239
239
 
240
240
  //#endregion
241
241
  export { listConfigOp as a, getConfigValueOp as i, formatConfigGetOutput as n, setConfigValueOp as o, formatConfigSource as r, unsetConfigValueOp as s, MainConfigOpsError as t };
242
- //# sourceMappingURL=main-config-ops-BEMpuhDz.mjs.map
242
+ //# sourceMappingURL=main-config-ops-BYsK3BxM.mjs.map
@@ -1,20 +1,20 @@
1
1
  import { _ as warn, c as ok, i as err, l as renderTable, n as dim, o as header } from "./utils-J2b9y8PC.mjs";
2
- import "./config-XpZWOYOG.mjs";
3
- import "./config-Bu1_vbY8.mjs";
4
- import "./paths-CHifubDh.mjs";
5
- import "./status-ggJ7lgVg.mjs";
6
- import { d as terminalHasName } from "./scope-D-h6F6DN.mjs";
7
- import "./routing-BAAST9vT.mjs";
8
- import "./tool-errors-7E13StWd.mjs";
9
- import "./wait-ByV0OyMZ.mjs";
10
- import "./local-tiers-BE4jGaMa.mjs";
11
- import "./caller-identity-yLFb7CKq.mjs";
12
- import "./capacity-DEveQdFV.mjs";
13
- import "./local-instances-DOxSgT_L.mjs";
14
- import "./local-candidate-DLdwQt0s.mjs";
15
- import { c as resumeOfferBlock, l as resumeRouteFor, n as launchInDir } from "./launch-CXVlZjHt.mjs";
2
+ import "./config-CST2uq1v.mjs";
3
+ import "./config-DYbyEe4-.mjs";
4
+ import "./paths-DS5VQKoR.mjs";
5
+ import "./status-COtzewKV.mjs";
6
+ import { d as terminalHasName } from "./scope-D8HK6vU7.mjs";
7
+ import "./routing-BlD_tKjW.mjs";
8
+ import "./tool-errors-DXJ70-sr.mjs";
9
+ import "./wait-ChpHKJZV.mjs";
10
+ import "./local-tiers-BtdEEe5n.mjs";
11
+ import "./caller-identity-Bim8JT-D.mjs";
12
+ import "./capacity-CsZMkVyg.mjs";
13
+ import "./local-instances-bdCNNSsL.mjs";
14
+ import "./local-candidate-Cp_bw4kK.mjs";
15
+ import { c as resumeOfferBlock, l as resumeRouteFor, n as launchInDir } from "./launch-UPQBoW2q.mjs";
16
16
  import { i as switchToSession, n as fetchLiveSessions } from "./aibroker-client-CQPGqLxL.mjs";
17
- import { s as scanSessions, t as fmtAge } from "./session-scan-W-gbwJHM.mjs";
17
+ import { s as scanSessions, t as fmtAge } from "./session-scan-BmnjSReu.mjs";
18
18
  import { createReadStream, existsSync, realpathSync } from "node:fs";
19
19
  import { basename, join } from "node:path";
20
20
  import chalk from "chalk";
@@ -600,7 +600,7 @@ async function openMatch(entry, allSessions, dryRun, resume, auto) {
600
600
  }
601
601
  async function getRegisteredProjects(all = false) {
602
602
  try {
603
- const { getRegistryBackend } = await import("./factory-Bsib-qDG.mjs");
603
+ const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
604
604
  return await (await getRegistryBackend()).listProjectsWithSessionStats(all ? {} : { status: "active" });
605
605
  } catch {
606
606
  return [];
@@ -784,4 +784,4 @@ async function cmdMain(query, pickN, opts) {
784
784
 
785
785
  //#endregion
786
786
  export { cmdMain };
787
- //# sourceMappingURL=main-resolver-3Ns1HPmS.mjs.map
787
+ //# sourceMappingURL=main-resolver-CAC3xfZM.mjs.map
@@ -1,15 +1,15 @@
1
- import "./config-XpZWOYOG.mjs";
2
- import "./config-Bu1_vbY8.mjs";
3
- import "./paths-CHifubDh.mjs";
4
- import "./status-ggJ7lgVg.mjs";
5
- import "./scope-D-h6F6DN.mjs";
6
- import { $ as parseFootprint, B as MODEL_INVENTORY_MAX_AGE_MS, G as fmtMem, H as ProbeHold, J as inventoryRows, K as fmtMemMapped, Q as modelLabel, R as DOWN_AFTER_MISSES, U as computeInventory, V as MODEL_INVENTORY_REFRESH_MS, W as currentInventory, X as liveDeps, Y as inventoryText, Z as modelKind, at as readInventoryInput, ct as writeInventory, et as parseSizeMb, it as readInventory, nt as processTreeMemory, ot as readModelLabels, q as inventoryPath, rt as processTreeRssMb, st as startInventoryRefresh, tt as parseTable, z as INVENTORY_HEADERS } from "./routing-BAAST9vT.mjs";
7
- import "./tool-errors-7E13StWd.mjs";
8
- import "./wait-ByV0OyMZ.mjs";
9
- import "./local-tiers-BE4jGaMa.mjs";
10
- import "./caller-identity-yLFb7CKq.mjs";
11
- import "./capacity-DEveQdFV.mjs";
12
- import "./local-instances-DOxSgT_L.mjs";
13
- import "./local-candidate-DLdwQt0s.mjs";
1
+ import "./config-CST2uq1v.mjs";
2
+ import "./config-DYbyEe4-.mjs";
3
+ import "./paths-DS5VQKoR.mjs";
4
+ import "./status-COtzewKV.mjs";
5
+ import "./scope-D8HK6vU7.mjs";
6
+ import { $ as parseFootprint, B as MODEL_INVENTORY_MAX_AGE_MS, G as fmtMem, H as ProbeHold, J as inventoryRows, K as fmtMemMapped, Q as modelLabel, R as DOWN_AFTER_MISSES, U as computeInventory, V as MODEL_INVENTORY_REFRESH_MS, W as currentInventory, X as liveDeps, Y as inventoryText, Z as modelKind, at as readInventoryInput, ct as writeInventory, et as parseSizeMb, it as readInventory, nt as processTreeMemory, ot as readModelLabels, q as inventoryPath, rt as processTreeRssMb, st as startInventoryRefresh, tt as parseTable, z as INVENTORY_HEADERS } from "./routing-BlD_tKjW.mjs";
7
+ import "./tool-errors-DXJ70-sr.mjs";
8
+ import "./wait-ChpHKJZV.mjs";
9
+ import "./local-tiers-BtdEEe5n.mjs";
10
+ import "./caller-identity-Bim8JT-D.mjs";
11
+ import "./capacity-CsZMkVyg.mjs";
12
+ import "./local-instances-bdCNNSsL.mjs";
13
+ import "./local-candidate-Cp_bw4kK.mjs";
14
14
 
15
15
  export { computeInventory, currentInventory, processTreeRssMb, readInventoryInput, writeInventory };
@@ -1,42 +1,43 @@
1
1
  import "./utils-J2b9y8PC.mjs";
2
- import { tt as workersYamlPath } from "./config-XpZWOYOG.mjs";
3
- import "./config-Bu1_vbY8.mjs";
4
- import "./paths-CHifubDh.mjs";
5
- import "./worktree-CRs2gyg0.mjs";
6
- import "./status-ggJ7lgVg.mjs";
7
- import "./pool-Dh-q3iJi.mjs";
2
+ import { rt as workersYamlPath } from "./config-CST2uq1v.mjs";
3
+ import "./config-DYbyEe4-.mjs";
4
+ import "./paths-DS5VQKoR.mjs";
5
+ import "./worktree-BY--Rgmy.mjs";
6
+ import "./status-COtzewKV.mjs";
7
+ import "./pool-BZ94nFuq.mjs";
8
8
  import "./helpers-CRuBUas3.mjs";
9
- import "./scope-D-h6F6DN.mjs";
10
- import "./routing-BAAST9vT.mjs";
11
- import "./tool-errors-7E13StWd.mjs";
12
- import "./wait-ByV0OyMZ.mjs";
13
- import { g as planStart, m as parseLocalConfig, o as defaultLauncher, y as shellQuote } from "./local-tiers-BE4jGaMa.mjs";
14
- import "./caller-identity-yLFb7CKq.mjs";
15
- import "./capacity-DEveQdFV.mjs";
16
- import "./local-instances-DOxSgT_L.mjs";
17
- import "./local-candidate-DLdwQt0s.mjs";
18
- import "./factory-DjAAsqr_.mjs";
19
- import "./postgres-C6ti4haA.mjs";
20
- import "./embedding-gate-6rZrWRXa.mjs";
9
+ import "./scope-D8HK6vU7.mjs";
10
+ import "./routing-BlD_tKjW.mjs";
11
+ import "./tool-errors-DXJ70-sr.mjs";
12
+ import "./wait-ChpHKJZV.mjs";
13
+ import { g as planStart, m as parseLocalConfig, o as defaultLauncher, y as shellQuote } from "./local-tiers-BtdEEe5n.mjs";
14
+ import "./caller-identity-Bim8JT-D.mjs";
15
+ import "./capacity-CsZMkVyg.mjs";
16
+ import "./local-instances-bdCNNSsL.mjs";
17
+ import "./local-candidate-Cp_bw4kK.mjs";
18
+ import "./factory-BV0MQA3T.mjs";
19
+ import "./postgres-C-T5OWer.mjs";
20
+ import "./embedding-gate-CTAk8STe.mjs";
21
21
  import "./embeddings-BVq3esBF.mjs";
22
22
  import "./router-CQSc3lk3.mjs";
23
- import "./launch-Jh5NVeNe.mjs";
24
- import "./health-Dnym-qcT.mjs";
25
- import "./run-CSC7mgPf.mjs";
26
- import "./controls-CPoeudou.mjs";
27
- import "./endreason-C577xIQz.mjs";
28
- import "./render-BYmQkuLd.mjs";
29
- import "./operator-CyuB3aVw.mjs";
30
- import "./kill-tree-EWYaEk5v.mjs";
31
- import "./pool-cli-BggU8GRp.mjs";
32
- import "./pane-audit-DKQt71s4.mjs";
33
- import "./providers-CblTFrhz.mjs";
34
- import { H as canBind, U as sizeOnDiskGb, V as allocatePort, at as defaultRegistryCtx, f as killInstance, g as portListeners, ot as hashText, p as launchDetached, st as saveRegistry, u as healthOk } from "./worker-config-CJhEMk19.mjs";
35
- import "./main-config-ops-BEMpuhDz.mjs";
36
- import "./cockpit-actions-BBHeyEZI.mjs";
37
- import "./ipc-client-CaiGJnSM.mjs";
38
- import "./embed-pass-DIWjA68P.mjs";
39
- import "./fallback-DFlItw1Z.mjs";
23
+ import "./launch-DpQPZGsT.mjs";
24
+ import "./health-kufVIf6i.mjs";
25
+ import "./run-AZVwceiU.mjs";
26
+ import "./controls-OiVVbe-f.mjs";
27
+ import "./endreason-BqyyU7BH.mjs";
28
+ import "./render-Cz3BWIBO.mjs";
29
+ import "./operator-DrwWItVt.mjs";
30
+ import "./kill-tree-CcpsRLCZ.mjs";
31
+ import "./pool-cli-B1eKySeN.mjs";
32
+ import "./pane-audit-wv9UkyCe.mjs";
33
+ import "./fallback-Bj2cyVk_.mjs";
34
+ import "./providers-Dzx5GAUI.mjs";
35
+ import { H as canBind, U as sizeOnDiskGb, V as allocatePort, ct as saveRegistry, f as killInstance, g as portListeners, ot as defaultRegistryCtx, p as launchDetached, st as hashText, u as healthOk } from "./worker-config-DgdT0iTB.mjs";
36
+ import "./main-config-ops-BYsK3BxM.mjs";
37
+ import "./cockpit-actions-BTA1njMO.mjs";
38
+ import "./ipc-client-CnYEF31R.mjs";
39
+ import "./embed-pass-DtVF2fOV.mjs";
40
+ import "./session-usage-oycSdiD3.mjs";
40
41
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
41
42
  import { basename, join } from "node:path";
42
43
  import { homedir } from "node:os";
@@ -332,4 +333,4 @@ async function smokeTest(cfg, name, d = {}) {
332
333
 
333
334
  //#endregion
334
335
  export { addModel };
335
- //# sourceMappingURL=models-add-C1QIc1DA.mjs.map
336
+ //# sourceMappingURL=models-add-CJx2YAwh.mjs.map
@@ -0,0 +1,7 @@
1
+ import "./config-CST2uq1v.mjs";
2
+ import "./config-DYbyEe4-.mjs";
3
+ import "./paths-DS5VQKoR.mjs";
4
+ import "./status-COtzewKV.mjs";
5
+ import { n as operatorSocketPath, r as sayToWorker, t as createOperatorServer } from "./operator-DrwWItVt.mjs";
6
+
7
+ export { sayToWorker };
@@ -1,4 +1,4 @@
1
- import { g as isLive, v as loadStatus } from "./status-ggJ7lgVg.mjs";
1
+ import { g as isLive, v as loadStatus } from "./status-COtzewKV.mjs";
2
2
  import { existsSync, unlinkSync } from "node:fs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { join } from "node:path";
@@ -95,4 +95,4 @@ function sayToWorker(logDir, id, text, timeoutMs = 4e3) {
95
95
 
96
96
  //#endregion
97
97
  export { operatorSocketPath as n, sayToWorker as r, createOperatorServer as t };
98
- //# sourceMappingURL=operator-CyuB3aVw.mjs.map
98
+ //# sourceMappingURL=operator-DrwWItVt.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { t as writeFileAtomic } from "./atomic-file-BorMa4T3.mjs";
2
- import { s as worktreeReason } from "./registrable-DpyTtajg.mjs";
2
+ import { s as worktreeReason } from "./registrable-CXBBpUcz.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, readdirSync, statSync } from "node:fs";
4
4
  import { join, resolve } from "node:path";
5
5
  import { homedir } from "node:os";
@@ -228,4 +228,4 @@ function discoverPaiMarkers(searchDirs) {
228
228
 
229
229
  //#endregion
230
230
  export { ensurePaiMarker as n, readPaiMarker as r, discoverPaiMarkers as t };
231
- //# sourceMappingURL=pai-marker-BcZyJguM.mjs.map
231
+ //# sourceMappingURL=pai-marker-DLKJ9Yr5.mjs.map
@@ -1,10 +1,11 @@
1
1
  import { g as paiHomePath } from "./runtime-paths-WsO9sJFc.mjs";
2
- import { wt as appendLedger } from "./config-XpZWOYOG.mjs";
3
- import { i as ledgerPath } from "./paths-CHifubDh.mjs";
4
- import { C as nowStamp, M as spawnTimeOf, T as ownsPidCached, b as loadStatusesCached, g as isLive, h as isChatPane, v as loadStatus, w as ownsPid } from "./status-ggJ7lgVg.mjs";
5
- import { i as itermUuid } from "./scope-D-h6F6DN.mjs";
6
- import { At as recordPath, Ct as PANE_EXEC_PID_ENV, Dt as pidAlive, L as fmtElapsed, Mt as panePolicy, Ot as readExit, St as PANE_EXEC_ENV, Tt as listRecords, V as loadPlanStatuses, _t as paneTitle, dt as osascript, kt as readRecord, mt as realPaneOps, nt as closePaneForWorker, st as loadRegistry, tt as closeOwnPane, vt as writePaneTitle, wt as exitFilePath } from "./controls-CPoeudou.mjs";
7
- import { i as killTree } from "./kill-tree-EWYaEk5v.mjs";
2
+ import { Et as appendLedger } from "./config-CST2uq1v.mjs";
3
+ import { i as ledgerPath } from "./paths-DS5VQKoR.mjs";
4
+ import { C as nowStamp, M as spawnTimeOf, T as ownsPidCached, b as loadStatusesCached, g as isLive, h as isChatPane, v as loadStatus, w as ownsPid } from "./status-COtzewKV.mjs";
5
+ import { i as itermUuid } from "./scope-D8HK6vU7.mjs";
6
+ import { At as recordPath, Ct as PANE_EXEC_PID_ENV, Dt as pidAlive, L as fmtElapsed, Mt as panePolicy, Ot as readExit, St as PANE_EXEC_ENV, Tt as listRecords, V as loadPlanStatuses, _t as paneTitle, dt as osascript, kt as readRecord, mt as realPaneOps, nt as closePaneForWorker, st as loadRegistry, tt as closeOwnPane, vt as writePaneTitle, wt as exitFilePath } from "./controls-OiVVbe-f.mjs";
7
+ import { s as requestKill, t as appendStopEvent } from "./endreason-BqyyU7BH.mjs";
8
+ import { i as killTree } from "./kill-tree-CcpsRLCZ.mjs";
8
9
  import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
9
10
  import { join } from "node:path";
10
11
  import { execFileSync, spawn } from "node:child_process";
@@ -532,7 +533,17 @@ async function stopUnpaned(logDir, id, why, stop, now) {
532
533
  reason
533
534
  })))(id, why).catch(() => void 0);
534
535
  }
535
- /** A pid is the launch's own only when it started within two minutes of the record and, for the wrapper, runs `pane exec <id>`. */
536
+ const LAUNCH_PID_SLACK_MS = 12e4;
537
+ /**
538
+ * Whether a process started at `startMs` fits the launch. The wrapper starts when the pane opens (`openedMs`), the child when
539
+ * the command starts (`startedMs`); a run that queued for a provider slot between the two has them minutes apart, so each side
540
+ * is measured against its own stamp.
541
+ */
542
+ function launchPidFresh(startMs, r, side) {
543
+ const at = side === "wrapper" ? r.openedMs ?? r.startedMs : r.startedMs;
544
+ return Math.abs(startMs - at) <= LAUNCH_PID_SLACK_MS;
545
+ }
546
+ /** A pid is the launch's own only when it started within two minutes of its side's launch and, for the wrapper, runs `pane exec <id>`. */
536
547
  function ownsLaunchPid(pid, r, side) {
537
548
  try {
538
549
  const env = {
@@ -548,7 +559,7 @@ function ownsLaunchPid(pid, r, side) {
548
559
  encoding: "utf8",
549
560
  env
550
561
  }).trim());
551
- if (Number.isNaN(start) || Math.abs(start - r.startedMs) > 12e4) return false;
562
+ if (Number.isNaN(start) || !launchPidFresh(start, r, side)) return false;
552
563
  if (side === "wrapper") return execFileSync("ps", [
553
564
  "-o",
554
565
  "command=",
@@ -617,6 +628,13 @@ async function auditLaunches(logDir, d = {}, now = /* @__PURE__ */ new Date()) {
617
628
  action: "wrapper killed, pane closed"
618
629
  });
619
630
  } else if (!ex && r.wrapper && !wrapperUp && childUp) {
631
+ const why = "pane audit: wrapper (the pane) is gone, child killed";
632
+ requestKill(logDir, ledger, r.id, "pane audit", true, why);
633
+ appendStopEvent(logDir, r.id, {
634
+ killed_by: "pane audit",
635
+ forced: true,
636
+ reason: why
637
+ });
620
638
  kill(r.child, "SIGKILL", true);
621
639
  appendLedger(ledger, "PANE-ORPHAN", {
622
640
  id: r.id,
@@ -743,4 +761,4 @@ function renderPaneAudit(verdicts) {
743
761
 
744
762
  //#endregion
745
763
  export { readAudit as a, followPaneRun as c, loadPaneRunStatuses as d, paneRunRows as f, listItermTabs as i, isPaneRunId as l, runInPane as m, auditTick as n, renderPaneAudit as o, renderPaneRunLines as p, closeFinishedPanes as r, runningProcs as s, auditPanes as t, loadPaneRunStatus as u };
746
- //# sourceMappingURL=pane-audit-DKQt71s4.mjs.map
764
+ //# sourceMappingURL=pane-audit-wv9UkyCe.mjs.map
@@ -1,5 +1,5 @@
1
- import "./config-XpZWOYOG.mjs";
2
- import "./config-Bu1_vbY8.mjs";
3
- import { a as noMcpConfigPath, c as slotCurrentPath, i as ledgerPath, l as statusPath, n as ensureNoMcpConfig, o as panesDir, r as eventsPath, s as routingStatePath, t as WORKER_ID_RE, u as workersLogDir } from "./paths-CHifubDh.mjs";
1
+ import "./config-CST2uq1v.mjs";
2
+ import "./config-DYbyEe4-.mjs";
3
+ import { a as noMcpConfigPath, c as slotCurrentPath, i as ledgerPath, l as statusPath, n as ensureNoMcpConfig, o as panesDir, r as eventsPath, s as routingStatePath, t as WORKER_ID_RE, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
4
4
 
5
5
  export { WORKER_ID_RE, ensureNoMcpConfig, eventsPath, ledgerPath, noMcpConfigPath, panesDir, routingStatePath, slotCurrentPath, statusPath, workersLogDir };
@@ -1,6 +1,6 @@
1
1
  import { _ as resolvePaiFile, g as paiHomePath } from "./runtime-paths-WsO9sJFc.mjs";
2
- import { d as defaultWorkersConfig } from "./config-XpZWOYOG.mjs";
3
- import { o as expandHome } from "./config-Bu1_vbY8.mjs";
2
+ import { d as defaultWorkersConfig } from "./config-CST2uq1v.mjs";
3
+ import { o as expandHome } from "./config-DYbyEe4-.mjs";
4
4
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
5
5
  import { join } from "node:path";
6
6
 
@@ -65,4 +65,4 @@ function slotCurrentPath(logDir, slot) {
65
65
 
66
66
  //#endregion
67
67
  export { noMcpConfigPath as a, slotCurrentPath as c, ledgerPath as i, statusPath as l, ensureNoMcpConfig as n, panesDir as o, eventsPath as r, routingStatePath as s, WORKER_ID_RE as t, workersLogDir as u };
68
- //# sourceMappingURL=paths-CHifubDh.mjs.map
68
+ //# sourceMappingURL=paths-DS5VQKoR.mjs.map
@@ -1,33 +1,33 @@
1
- import { j as readWorkersSection, wt as appendLedger } from "./config-XpZWOYOG.mjs";
2
- import "./config-Bu1_vbY8.mjs";
3
- import { i as ledgerPath, u as workersLogDir } from "./paths-CHifubDh.mjs";
4
- import { g as mergeWorker, n as MergeConflictError } from "./worktree-CRs2gyg0.mjs";
5
- import { S as newWorkerId, nt as shortText, tt as parseRunnerArgs, v as loadStatus } from "./status-ggJ7lgVg.mjs";
6
- import "./pool-Dh-q3iJi.mjs";
1
+ import { Et as appendLedger, M as readWorkersSection } from "./config-CST2uq1v.mjs";
2
+ import "./config-DYbyEe4-.mjs";
3
+ import { i as ledgerPath, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
4
+ import { g as mergeWorker, n as MergeConflictError } from "./worktree-BY--Rgmy.mjs";
5
+ import { S as newWorkerId, nt as shortText, tt as parseRunnerArgs, v as loadStatus } from "./status-COtzewKV.mjs";
6
+ import "./pool-BZ94nFuq.mjs";
7
7
  import "./helpers-CRuBUas3.mjs";
8
- import "./scope-D-h6F6DN.mjs";
9
- import "./routing-BAAST9vT.mjs";
10
- import "./tool-errors-7E13StWd.mjs";
11
- import "./wait-ByV0OyMZ.mjs";
12
- import "./local-tiers-BE4jGaMa.mjs";
13
- import "./caller-identity-yLFb7CKq.mjs";
14
- import "./capacity-DEveQdFV.mjs";
15
- import "./local-instances-DOxSgT_L.mjs";
16
- import "./local-candidate-DLdwQt0s.mjs";
17
- import "./factory-DjAAsqr_.mjs";
18
- import "./postgres-C6ti4haA.mjs";
19
- import "./embedding-gate-6rZrWRXa.mjs";
8
+ import "./scope-D8HK6vU7.mjs";
9
+ import "./routing-BlD_tKjW.mjs";
10
+ import "./tool-errors-DXJ70-sr.mjs";
11
+ import "./wait-ChpHKJZV.mjs";
12
+ import "./local-tiers-BtdEEe5n.mjs";
13
+ import "./caller-identity-Bim8JT-D.mjs";
14
+ import "./capacity-CsZMkVyg.mjs";
15
+ import "./local-instances-bdCNNSsL.mjs";
16
+ import "./local-candidate-Cp_bw4kK.mjs";
17
+ import "./factory-BV0MQA3T.mjs";
18
+ import "./postgres-C-T5OWer.mjs";
19
+ import "./embedding-gate-CTAk8STe.mjs";
20
20
  import "./embeddings-BVq3esBF.mjs";
21
21
  import "./router-CQSc3lk3.mjs";
22
- import "./launch-Jh5NVeNe.mjs";
23
- import { V as printResult, t as runWorker } from "./run-CSC7mgPf.mjs";
24
- import "./controls-CPoeudou.mjs";
25
- import "./endreason-C577xIQz.mjs";
26
- import "./render-BYmQkuLd.mjs";
27
- import "./operator-CyuB3aVw.mjs";
28
- import "./kill-tree-EWYaEk5v.mjs";
29
- import "./pool-cli-BggU8GRp.mjs";
30
- import { n as swapPromptArg } from "./chain-7n9Gx56r.mjs";
22
+ import "./launch-DpQPZGsT.mjs";
23
+ import { V as printResult, t as runWorker } from "./run-AZVwceiU.mjs";
24
+ import "./controls-OiVVbe-f.mjs";
25
+ import "./endreason-BqyyU7BH.mjs";
26
+ import "./render-Cz3BWIBO.mjs";
27
+ import "./operator-DrwWItVt.mjs";
28
+ import "./kill-tree-CcpsRLCZ.mjs";
29
+ import "./pool-cli-B1eKySeN.mjs";
30
+ import { n as swapPromptArg } from "./chain-Dzz6xcKH.mjs";
31
31
  import { existsSync, mkdirSync, readFileSync } from "node:fs";
32
32
  import { join } from "node:path";
33
33
 
@@ -307,4 +307,4 @@ function printPlannerSummary(logDir, plannerId, results, merged, conflicted, fmt
307
307
 
308
308
  //#endregion
309
309
  export { runPlanner };
310
- //# sourceMappingURL=planner-BmFACdLa.mjs.map
310
+ //# sourceMappingURL=planner-K0mFrCpL.mjs.map
@@ -1,4 +1,4 @@
1
- import { Et as parseLedger, I as LOOPBACK_HOST, c as WorkersConfigError, d as defaultWorkersConfig, i as DEFAULT_POOL_PORT, t as ANTHROPIC_NATIVE } from "./config-XpZWOYOG.mjs";
1
+ import { Ot as parseLedger, R as LOOPBACK_HOST, c as WorkersConfigError, d as defaultWorkersConfig, i as DEFAULT_POOL_PORT, t as ANTHROPIC_NATIVE } from "./config-CST2uq1v.mjs";
2
2
  import { t as assertTestWriteAllowed } from "./test-isolation-lqSmYxr0.mjs";
3
3
  import { appendFileSync, copyFileSync, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join, resolve } from "node:path";
@@ -629,4 +629,4 @@ function spareStats(ledgerText) {
629
629
 
630
630
  //#endregion
631
631
  export { readClaudeJson as A, describeMcp as C, readMcpServers as D, mcpServersFromToolGrants as E, trustProjectPath as M, writeClaudeJson as N, writeMcpConfig as O, inputSideTokens as S, grantsChrome as T, readPoolMetrics as _, formatCarryByProvider as a, spareStats as b, poolHostAlive as c, poolIneligibleReason as d, poolMetricsPath as f, postTaskToPool as g, poolSettings as h, bundleBuildStamp as i, registerMcpScript as j, mcpEntryRunsScript as k, poolHostProbe as l, poolPort as m, SLOT_TOOLS as n, poolCarry as o, poolPidPath as p, UNIT_MARKER as r, poolDir as s, SHARED_MARKER as t, poolHostStale as u, readPoolState as v, expandMcpNames as w, warmOrCold as x, reloadInProgress as y };
632
- //# sourceMappingURL=pool-Dh-q3iJi.mjs.map
632
+ //# sourceMappingURL=pool-BZ94nFuq.mjs.map
@@ -1,7 +1,7 @@
1
- import { Et as parseLedger, F as writeWorkersSection, I as LOOPBACK_HOST, j as readWorkersSection, wt as appendLedger } from "./config-XpZWOYOG.mjs";
2
- import { i as ledgerPath } from "./paths-CHifubDh.mjs";
3
- import { m as fmtTokens } from "./status-ggJ7lgVg.mjs";
4
- import { _ as readPoolMetrics, a as formatCarryByProvider, b as spareStats, c as poolHostAlive, f as poolMetricsPath, h as poolSettings, i as bundleBuildStamp, l as poolHostProbe, m as poolPort, o as poolCarry, p as poolPidPath, s as poolDir, u as poolHostStale, v as readPoolState, y as reloadInProgress } from "./pool-Dh-q3iJi.mjs";
1
+ import { Et as appendLedger, L as writeWorkersSection, M as readWorkersSection, Ot as parseLedger, R as LOOPBACK_HOST } from "./config-CST2uq1v.mjs";
2
+ import { i as ledgerPath } from "./paths-DS5VQKoR.mjs";
3
+ import { m as fmtTokens } from "./status-COtzewKV.mjs";
4
+ import { _ as readPoolMetrics, a as formatCarryByProvider, b as spareStats, c as poolHostAlive, f as poolMetricsPath, h as poolSettings, i as bundleBuildStamp, l as poolHostProbe, m as poolPort, o as poolCarry, p as poolPidPath, s as poolDir, u as poolHostStale, v as readPoolState, y as reloadInProgress } from "./pool-BZ94nFuq.mjs";
5
5
  import { closeSync, existsSync, mkdirSync, openSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
6
6
  import { dirname, join } from "node:path";
7
7
  import { spawn } from "node:child_process";
@@ -313,4 +313,4 @@ function spareStatusLines(state, logDir) {
313
313
 
314
314
  //#endregion
315
315
  export { poolOff as a, poolStatusText as c, spareStatusLines as d, standalonePoolHostPath as f, hostBuildText as i, reloadPoolHost as l, diskBundleMtime as n, poolOn as o, ensurePoolHost as r, poolReloadLive as s, POOL_HEAL_GAP_MS as t, skipReasonLine as u };
316
- //# sourceMappingURL=pool-cli-BggU8GRp.mjs.map
316
+ //# sourceMappingURL=pool-cli-B1eKySeN.mjs.map
@@ -1,8 +1,8 @@
1
- import "./config-XpZWOYOG.mjs";
2
- import "./config-Bu1_vbY8.mjs";
3
- import "./paths-CHifubDh.mjs";
4
- import "./status-ggJ7lgVg.mjs";
5
- import "./pool-Dh-q3iJi.mjs";
6
- import { a as poolOff, c as poolStatusText, d as spareStatusLines, f as standalonePoolHostPath, i as hostBuildText, l as reloadPoolHost, n as diskBundleMtime, o as poolOn, r as ensurePoolHost, s as poolReloadLive, t as POOL_HEAL_GAP_MS, u as skipReasonLine } from "./pool-cli-BggU8GRp.mjs";
1
+ import "./config-CST2uq1v.mjs";
2
+ import "./config-DYbyEe4-.mjs";
3
+ import "./paths-DS5VQKoR.mjs";
4
+ import "./status-COtzewKV.mjs";
5
+ import "./pool-BZ94nFuq.mjs";
6
+ import { a as poolOff, c as poolStatusText, d as spareStatusLines, f as standalonePoolHostPath, i as hostBuildText, l as reloadPoolHost, n as diskBundleMtime, o as poolOn, r as ensurePoolHost, s as poolReloadLive, t as POOL_HEAL_GAP_MS, u as skipReasonLine } from "./pool-cli-B1eKySeN.mjs";
7
7
 
8
8
  export { poolOff, poolOn, poolStatusText };
@@ -1,7 +1,7 @@
1
- import { M as postgresConnectionString, k as DEFAULT_PG_CONNECTION_TIMEOUT_MS } from "./config-Bu1_vbY8.mjs";
1
+ import { A as DEFAULT_PG_CONNECTION_TIMEOUT_MS, N as postgresConnectionString } from "./config-DYbyEe4-.mjs";
2
2
  import { a as parseSessionTitleChunk, c as yieldToEventLoop, f as fileContentHash, h as sha256File, i as isPathTooBroadForContentScan, m as sha256, n as chunkId, o as walkContentFiles, r as detectTier, s as walkMdFiles, t as INDEX_YIELD_EVERY, u as chunkMarkdown } from "./helpers-CRuBUas3.mjs";
3
3
  import { t as STOP_WORDS } from "./stop-words-DSEYQdNe.mjs";
4
- import { p as LEGACY_EMBEDDING_BINDING, r as gateBackend } from "./embedding-gate-6rZrWRXa.mjs";
4
+ import { p as LEGACY_EMBEDDING_BINDING, r as gateBackend } from "./embedding-gate-CTAk8STe.mjs";
5
5
  import { s as serializeEmbedding } from "./embeddings-BVq3esBF.mjs";
6
6
  import { existsSync, readFileSync, statSync } from "node:fs";
7
7
  import { createHash } from "node:crypto";
@@ -1257,6 +1257,8 @@ CREATE TABLE IF NOT EXISTS pai_observations (
1257
1257
  files_modified JSONB DEFAULT '[]'::jsonb,
1258
1258
  concepts JSONB DEFAULT '[]'::jsonb,
1259
1259
  content_hash TEXT,
1260
+ source TEXT,
1261
+ fidelity TEXT,
1260
1262
  created_at TIMESTAMPTZ DEFAULT NOW()
1261
1263
  );
1262
1264
 
@@ -1292,6 +1294,11 @@ let _tablesEnsured = false;
1292
1294
  async function ensureObservationTables(pool) {
1293
1295
  if (_tablesEnsured) return;
1294
1296
  await pool.query(SCHEMA_SQL);
1297
+ const colCheck = await pool.query(`SELECT column_name FROM information_schema.columns
1298
+ WHERE table_name = 'pai_observations' AND column_name IN ('source', 'fidelity')`);
1299
+ const existing = new Set(colCheck.rows.map((r) => r.column_name));
1300
+ if (!existing.has("source")) await pool.query("ALTER TABLE pai_observations ADD COLUMN IF NOT EXISTS source TEXT");
1301
+ if (!existing.has("fidelity")) await pool.query("ALTER TABLE pai_observations ADD COLUMN IF NOT EXISTS fidelity TEXT");
1295
1302
  _tablesEnsured = true;
1296
1303
  }
1297
1304
  const SKILL_TELEMETRY_SCHEMA_SQL = `
@@ -1341,8 +1348,9 @@ async function storeObservation(pool, obs) {
1341
1348
  if (dupCheck.rowCount && dupCheck.rowCount > 0) return null;
1342
1349
  return (await pool.query(`INSERT INTO pai_observations
1343
1350
  (session_id, project_id, project_slug, type, title, narrative,
1344
- tool_name, tool_input_summary, files_read, files_modified, concepts, content_hash)
1345
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9::jsonb, $10::jsonb, $11::jsonb, $12)
1351
+ tool_name, tool_input_summary, files_read, files_modified, concepts, content_hash,
1352
+ source, fidelity)
1353
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9::jsonb, $10::jsonb, $11::jsonb, $12, $13, $14)
1346
1354
  RETURNING id`, [
1347
1355
  obs.session_id,
1348
1356
  obs.project_id ?? null,
@@ -1355,7 +1363,9 @@ async function storeObservation(pool, obs) {
1355
1363
  JSON.stringify(obs.files_read),
1356
1364
  JSON.stringify(obs.files_modified),
1357
1365
  JSON.stringify(obs.concepts),
1358
- hash
1366
+ hash,
1367
+ obs.source ?? null,
1368
+ obs.fidelity ?? null
1359
1369
  ])).rows[0]?.id ?? null;
1360
1370
  }
1361
1371
  /**
@@ -1403,7 +1413,7 @@ async function queryObservations(pool, opts = {}) {
1403
1413
  return (await pool.query(`SELECT id, session_id, project_id, project_slug, type, title, narrative,
1404
1414
  tool_name, tool_input_summary,
1405
1415
  files_read, files_modified, concepts,
1406
- content_hash, created_at
1416
+ content_hash, source, fidelity, created_at
1407
1417
  FROM pai_observations
1408
1418
  ${where}
1409
1419
  ORDER BY created_at DESC
@@ -1414,7 +1424,7 @@ async function queryRecentObservations(pool, projectId, limit) {
1414
1424
  return (await pool.query(`SELECT id, session_id, project_id, project_slug, type, title, narrative,
1415
1425
  tool_name, tool_input_summary,
1416
1426
  files_read, files_modified, concepts,
1417
- content_hash, created_at
1427
+ content_hash, source, fidelity, created_at
1418
1428
  FROM pai_observations
1419
1429
  WHERE project_id = $1
1420
1430
  ORDER BY created_at DESC
@@ -1425,7 +1435,7 @@ async function querySessionObservations(pool, sessionId) {
1425
1435
  return (await pool.query(`SELECT id, session_id, project_id, project_slug, type, title, narrative,
1426
1436
  tool_name, tool_input_summary,
1427
1437
  files_read, files_modified, concepts,
1428
- content_hash, created_at
1438
+ content_hash, source, fidelity, created_at
1429
1439
  FROM pai_observations
1430
1440
  WHERE session_id = $1
1431
1441
  ORDER BY created_at ASC`, [sessionId])).rows;
@@ -2309,4 +2319,4 @@ function rowToKgEntity(row) {
2309
2319
 
2310
2320
  //#endregion
2311
2321
  export { entityContentId as a, resolveFromModule as c, retryTransient as i, embedChunksWithBackend as n, buildPgTsQuery as o, indexProjectWithBackend as r, packageRoot as s, PostgresBackend as t };
2312
- //# sourceMappingURL=postgres-C6ti4haA.mjs.map
2322
+ //# sourceMappingURL=postgres-C-T5OWer.mjs.map