@tekmidian/pai 1.0.5 → 1.0.7

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 (247) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/{aibroker-client-CQPGqLxL.mjs → aibroker-client-CXsyC7A8.mjs} +2 -2
  3. package/dist/aibroker-client-ChB7gSxV.mjs +3 -0
  4. package/dist/auto-route-CAlZ5p-h.mjs +11 -0
  5. package/dist/{auto-route-DUYr57rs.mjs → auto-route-PDOAYszN.mjs} +2 -2
  6. package/dist/budget-BXmsSBLI.mjs +15 -0
  7. package/dist/{caller-identity-Bim8JT-D.mjs → caller-identity-DPDSrZE2.mjs} +4 -4
  8. package/dist/{capacity-CsZMkVyg.mjs → capacity-CThSydrd.mjs} +82 -10
  9. package/dist/{chain-Dzz6xcKH.mjs → chain-BvdKqRiZ.mjs} +5 -5
  10. package/dist/cli/index.mjs +2175 -284
  11. package/dist/{cockpit-actions-BTA1njMO.mjs → cockpit-actions-BgdKB9G3.mjs} +26 -26
  12. package/dist/{cockpit-actions-BgsiNcUY.mjs → cockpit-actions-DNl0rKfW.mjs} +18 -18
  13. package/dist/cockpit-memory-CqLPjcWe.mjs +20 -0
  14. package/dist/config/defaults/config.yaml +24 -1
  15. package/dist/config/defaults/workers.yaml +2 -0
  16. package/dist/{config-h5qK3fst.mjs → config-C2dd2SXS.mjs} +2 -2
  17. package/dist/{config-CST2uq1v.mjs → config-DGV64YJa.mjs} +11 -3
  18. package/dist/{config-Dv3t7xnT.mjs → config-DHgPx3ER.mjs} +1 -1
  19. package/dist/{config-DYbyEe4-.mjs → config-SlZ-Z52i.mjs} +3 -2
  20. package/dist/{controls-OiVVbe-f.mjs → controls-ByrcupcA.mjs} +59 -66
  21. package/dist/daemon/index.mjs +40 -40
  22. package/dist/{daemon-C1dycZ3W.mjs → daemon-BjgJyJMP.mjs} +79 -31
  23. package/dist/daemon-iymy18Ie.mjs +46 -0
  24. package/dist/daemon-mcp/index.mjs +49 -38
  25. package/dist/detect-C8nFP-kR.mjs +10 -0
  26. package/dist/{detect-CHuxFrLy.mjs → detect-DLjeYwnt.mjs} +2 -2
  27. package/dist/{embed-pass-DtVF2fOV.mjs → embed-pass-DdTMn4DH.mjs} +5 -5
  28. package/dist/{embedding-gate-B98PK_wz.mjs → embedding-gate-BVQvUmox.mjs} +2 -2
  29. package/dist/{embedding-gate-CTAk8STe.mjs → embedding-gate-iq0oQEkF.mjs} +3 -3
  30. package/dist/{endreason-BqyyU7BH.mjs → endreason-BjPom527.mjs} +4 -4
  31. package/dist/{factory-BV0MQA3T.mjs → factory-CYwa0jYj.mjs} +6 -6
  32. package/dist/factory-DFwez99M.mjs +9 -0
  33. package/dist/{fallback-Bj2cyVk_.mjs → fallback-CQ8_CuVu.mjs} +9 -231
  34. package/dist/{health-kufVIf6i.mjs → health-Bb2U4PNK.mjs} +5 -5
  35. package/dist/{helpers-CvbYEKoD.mjs → helpers-Dj2nY56t.mjs} +2 -2
  36. package/dist/{helpers-WV8tdQHM.mjs → helpers-DyHKAwrW.mjs} +6 -6
  37. package/dist/hooks/block-sleep-poll.mjs +9 -0
  38. package/dist/hooks/capture-all-events.mjs +99 -3
  39. package/dist/hooks/capture-tool-output.mjs +99 -3
  40. package/dist/hooks/handoff-link.mjs +159 -0
  41. package/dist/hooks/load-project-context.mjs +10 -1
  42. package/dist/hooks/local-model-hint.mjs +9 -0
  43. package/dist/hooks/route-agents-to-worker.mjs +9 -0
  44. package/dist/hooks/security-validator.mjs +940 -92
  45. package/dist/hooks/supervision-banner.mjs +219 -48
  46. package/dist/hooks/worker-edit-repair.mjs +9 -0
  47. package/dist/hooks/worker-guard.mjs +97 -1
  48. package/dist/hooks/worker-note.mjs +108 -3
  49. package/dist/hooks/worker-pool-host.mjs +1670 -315
  50. package/dist/hooks/worker-proxy.mjs +9 -0
  51. package/dist/hooks/worker-status-line.mjs +251 -70
  52. package/dist/hooks/worker-supervision.mjs +9 -0
  53. package/dist/hooks/worker-tool-name-repair.mjs +9 -0
  54. package/dist/index.mjs +9 -9
  55. package/dist/{ipc-client-CnYEF31R.mjs → ipc-client-CmagIFLh.mjs} +2 -2
  56. package/dist/{ipc-client-DN7EvoVo.mjs → ipc-client-DmbSIBUK.mjs} +1 -1
  57. package/dist/kill-tree-BlPw1vaU.mjs +10 -0
  58. package/dist/{kill-tree-CcpsRLCZ.mjs → kill-tree-DTmiEb3T.mjs} +8 -8
  59. package/dist/{launch-DpQPZGsT.mjs → launch-CV6oPHI2.mjs} +3 -3
  60. package/dist/{launch-UPQBoW2q.mjs → launch-Dy8qQnSD.mjs} +3 -3
  61. package/dist/{indexer-backend-B2vtFl38.mjs → lessons-CdmqZD0G.mjs} +262 -43
  62. package/dist/{local-candidate-Cp_bw4kK.mjs → local-candidate-C2FGhf54.mjs} +3 -3
  63. package/dist/{local-instances-bdCNNSsL.mjs → local-instances-DhF4_sV2.mjs} +2 -2
  64. package/dist/{local-instances-B-c-CxzP.mjs → local-instances-GgXydQ2P.mjs} +4 -4
  65. package/dist/{local-tiers-BtdEEe5n.mjs → local-tiers-CqwGUcEn.mjs} +3 -3
  66. package/dist/{local-tiers-OBqAAfOg.mjs → local-tiers-X_dQfI4Q.mjs} +3 -3
  67. package/dist/{main-config-ops-BYsK3BxM.mjs → main-config-ops-C_fkINDv.mjs} +3 -3
  68. package/dist/{main-resolver-CAC3xfZM.mjs → main-resolver-CN_sfG1R.mjs} +18 -18
  69. package/dist/{migrate-DrA_OwlZ.mjs → migrate-C2z1YmWC.mjs} +2 -2
  70. package/dist/{model-inventory-BuTpi9a6.mjs → model-inventory-BYNrSTaY.mjs} +13 -13
  71. package/dist/{models-add-CJx2YAwh.mjs → models-add-Dc7VXmcu.mjs} +38 -38
  72. package/dist/operator-IrLbk8hy.mjs +7 -0
  73. package/dist/{operator-DrwWItVt.mjs → operator-lRGvYr3D.mjs} +2 -2
  74. package/dist/{pai-marker-DLKJ9Yr5.mjs → pai-marker-kA0iM7rP.mjs} +2 -2
  75. package/dist/{pane-audit-wv9UkyCe.mjs → pane-audit-DUuilP1V.mjs} +13 -23
  76. package/dist/{paths-DS5VQKoR.mjs → paths-BwfwHOvN.mjs} +4 -4
  77. package/dist/{paths-DBd78I7Z.mjs → paths-CKGYM0Lb.mjs} +3 -3
  78. package/dist/{planner-K0mFrCpL.mjs → planner-BDHVUkIM.mjs} +29 -29
  79. package/dist/{pool-BZ94nFuq.mjs → pool-CFeHGX7q.mjs} +2 -2
  80. package/dist/{pool-cli-BjYQDfx6.mjs → pool-cli-Bj2TeA-d.mjs} +6 -6
  81. package/dist/{pool-cli-B1eKySeN.mjs → pool-cli-DOLgPgOM.mjs} +5 -5
  82. package/dist/{postgres-CBHY5PIi.mjs → postgres-B1B80bcj.mjs} +3 -3
  83. package/dist/{postgres-C-T5OWer.mjs → postgres-BL5oBBgY.mjs} +3 -3
  84. package/dist/{project-setup-pIPHZaXf.mjs → project-setup-i5D0xkTn.mjs} +24 -25
  85. package/dist/{providers-Dzx5GAUI.mjs → providers-BC2Myo_O.mjs} +6 -6
  86. package/dist/providers-C-mnlH1b.mjs +16 -0
  87. package/dist/{query-feedback-DN52N9C5.mjs → query-feedback-BWl2HRwN.mjs} +2 -2
  88. package/dist/registrable-Ct0DKNKS.mjs +9 -0
  89. package/dist/{registrable-CXBBpUcz.mjs → registrable-D_4qXCnq.mjs} +4 -4
  90. package/dist/render-CbifCwTb.mjs +2350 -0
  91. package/dist/render-FB4Fv_fi.mjs +13 -0
  92. package/dist/root-80ESg6b7.mjs +36 -0
  93. package/dist/{root-bG48WVpW.mjs → root-B-ZYiEgi.mjs} +10 -10
  94. package/dist/route-table-DcBZCuco.mjs +15 -0
  95. package/dist/{router-CQSc3lk3.mjs → router-D2476pOp.mjs} +2 -2
  96. package/dist/{router-DwHJRgG9.mjs → router-ghujlEFb.mjs} +1 -1
  97. package/dist/{routing-BlD_tKjW.mjs → routing-CF0wlR-_.mjs} +15 -15
  98. package/dist/{routing-D27jxj9x.mjs → routing-CJ8ioPl2.mjs} +13 -13
  99. package/dist/{run-AZVwceiU.mjs → run-CAjfKBQV.mjs} +74 -31
  100. package/dist/{runtime-paths-WsO9sJFc.mjs → runtime-paths-twfV23YL.mjs} +2 -2
  101. package/dist/{scan-C3uotg_f.mjs → scan-ew8M6tTH.mjs} +7 -7
  102. package/dist/{scope-D8HK6vU7.mjs → scope-BRcaPw5D.mjs} +4 -4
  103. package/dist/session-BmQsXF_a.mjs +35 -0
  104. package/dist/{session-BAfypQb9.mjs → session-C1JnDXvP.mjs} +28 -28
  105. package/dist/session-scan-DWCUKhDM.mjs +9 -0
  106. package/dist/{session-scan-BmnjSReu.mjs → session-scan-DihMibI-.mjs} +6 -6
  107. package/dist/{session-usage-oycSdiD3.mjs → session-usage-BRIWFYPS.mjs} +3 -3
  108. package/dist/status-Bj4yVKj0.mjs +6 -0
  109. package/dist/{status-COtzewKV.mjs → status-DTMT5lyn.mjs} +9 -5
  110. package/dist/{tool-errors-DXJ70-sr.mjs → tool-errors-BOW2n882.mjs} +2 -2
  111. package/dist/{tool-errors-B2LnIqR0.mjs → tool-errors-jNJj3Gzm.mjs} +6 -6
  112. package/dist/{viewer-BgGRqXfD.mjs → viewer-4BU8w_gK.mjs} +16 -14
  113. package/dist/viewer-D3VEdqhC.mjs +22 -0
  114. package/dist/{wait-ChpHKJZV.mjs → wait-BindDA5w.mjs} +3 -3
  115. package/dist/{worker-config-DgdT0iTB.mjs → worker-config-CdPmb4_2.mjs} +54 -103
  116. package/dist/worker-config-CfV2dgSb.mjs +42 -0
  117. package/dist/{workers-config-BhZBrR-Q.mjs → workers-config-2VipVOYk.mjs} +2 -2
  118. package/dist/{worktree-BY--Rgmy.mjs → worktree-7ZS3RBf8.mjs} +175 -9
  119. package/dist/{zettelkasten-BHVx5zj-.mjs → zettelkasten-BH8AdNh8.mjs} +4 -4
  120. package/dist/{zettelkasten-LoH9RBiN.mjs → zettelkasten-FFhQFESJ.mjs} +2 -2
  121. package/docs/commands/README.md +32 -2
  122. package/docs/commands/audit.md +34 -3
  123. package/docs/commands/backup.md +1 -1
  124. package/docs/commands/build.md +4 -4
  125. package/docs/commands/cd.md +1 -1
  126. package/docs/commands/clear-names.md +1 -1
  127. package/docs/commands/cockpit.md +1 -1
  128. package/docs/commands/config.md +1 -1
  129. package/docs/commands/daemon.md +1 -1
  130. package/docs/commands/db.md +1 -1
  131. package/docs/commands/doc.md +1 -1
  132. package/docs/commands/end.md +1 -1
  133. package/docs/commands/find.md +1 -1
  134. package/docs/commands/git.md +110 -0
  135. package/docs/commands/handoff.md +70 -0
  136. package/docs/commands/harness.md +74 -0
  137. package/docs/commands/help.md +1 -1
  138. package/docs/commands/home.md +1 -1
  139. package/docs/commands/hooks-db.md +1 -1
  140. package/docs/commands/identity.md +1 -1
  141. package/docs/commands/install.md +1 -1
  142. package/docs/commands/issue.md +1 -1
  143. package/docs/commands/kg.md +1 -1
  144. package/docs/commands/launch.md +1 -1
  145. package/docs/commands/lessons.md +201 -0
  146. package/docs/commands/list.md +1 -1
  147. package/docs/commands/ls.md +1 -1
  148. package/docs/commands/mcp.md +1 -1
  149. package/docs/commands/memory.md +1 -1
  150. package/docs/commands/models.md +1 -1
  151. package/docs/commands/more.md +1 -1
  152. package/docs/commands/new.md +1 -1
  153. package/docs/commands/notes.md +1 -1
  154. package/docs/commands/notify.md +1 -1
  155. package/docs/commands/observation.md +1 -1
  156. package/docs/commands/obsidian.md +1 -1
  157. package/docs/commands/open.md +1 -1
  158. package/docs/commands/pane.md +1 -1
  159. package/docs/commands/pause.md +1 -1
  160. package/docs/commands/plan.md +1 -1
  161. package/docs/commands/project.md +1 -1
  162. package/docs/commands/projects.md +1 -1
  163. package/docs/commands/providers.md +1 -1
  164. package/docs/commands/queue.md +1 -1
  165. package/docs/commands/registry.md +1 -1
  166. package/docs/commands/reload.md +1 -1
  167. package/docs/commands/rename.md +1 -1
  168. package/docs/commands/restore.md +1 -1
  169. package/docs/commands/resume.md +1 -1
  170. package/docs/commands/router.md +1 -1
  171. package/docs/commands/rules.md +70 -0
  172. package/docs/commands/session.md +1 -1
  173. package/docs/commands/sessions.md +1 -1
  174. package/docs/commands/setup.md +1 -1
  175. package/docs/commands/setups.md +1 -1
  176. package/docs/commands/shell-init.md +1 -1
  177. package/docs/commands/skill.md +1 -1
  178. package/docs/commands/task.md +1 -1
  179. package/docs/commands/tasks.md +1 -1
  180. package/docs/commands/topic.md +1 -1
  181. package/docs/commands/update.md +1 -1
  182. package/docs/commands/worker.md +1 -1
  183. package/docs/commands/zettel.md +1 -1
  184. package/docs/concepts/panes.md +3 -2
  185. package/gemini-extension.json +1 -1
  186. package/package.json +2 -2
  187. package/pai-plugin.json +1 -1
  188. package/plugins/context-preservation/plugin.json +1 -1
  189. package/plugins/core/plugin.json +1 -1
  190. package/plugins/creative/plugin.json +1 -1
  191. package/plugins/observability/plugin.json +1 -1
  192. package/plugins/productivity/plugin.json +1 -1
  193. package/plugins/semantic-search/plugin.json +1 -1
  194. package/plugins/ui/plugin.json +1 -1
  195. package/plugins/zettelkasten/plugin.json +1 -1
  196. package/src/hooks/ts/lib/loop-guard.ts +3 -5
  197. package/src/hooks/ts/lib/rules/builtin/base64-decode-to-shell.rule.yaml +15 -0
  198. package/src/hooks/ts/lib/rules/builtin/chmod-world-writable.rule.yaml +13 -0
  199. package/src/hooks/ts/lib/rules/builtin/chmod-zero.rule.yaml +13 -0
  200. package/src/hooks/ts/lib/rules/builtin/credential-file-read.rule.yaml +13 -0
  201. package/src/hooks/ts/lib/rules/builtin/credential-read-then-network.rule.yaml +29 -0
  202. package/src/hooks/ts/lib/rules/builtin/crontab-persistence.rule.yaml +10 -0
  203. package/src/hooks/ts/lib/rules/builtin/curl-piped-to-shell.rule.yaml +22 -0
  204. package/src/hooks/ts/lib/rules/builtin/download-then-execute.rule.yaml +30 -0
  205. package/src/hooks/ts/lib/rules/builtin/find-root-delete.rule.yaml +14 -0
  206. package/src/hooks/ts/lib/rules/builtin/git-push-force.rule.yaml +24 -0
  207. package/src/hooks/ts/lib/rules/builtin/git-push-plus-refspec.rule.yaml +12 -0
  208. package/src/hooks/ts/lib/rules/builtin/git-reset-hard.rule.yaml +12 -0
  209. package/src/hooks/ts/lib/rules/builtin/injection-then-tool.rule.yaml +30 -0
  210. package/src/hooks/ts/lib/rules/builtin/instruction-override-disregard.rule.yaml +14 -0
  211. package/src/hooks/ts/lib/rules/builtin/instruction-override-ignore.rule.yaml +13 -0
  212. package/src/hooks/ts/lib/rules/builtin/launchagents-write-persistence.rule.yaml +12 -0
  213. package/src/hooks/ts/lib/rules/builtin/launchctl-load-persistence.rule.yaml +10 -0
  214. package/src/hooks/ts/lib/rules/builtin/reverse-shell-dev-tcp.rule.yaml +14 -0
  215. package/src/hooks/ts/lib/rules/builtin/reverse-shell-interactive-bash.rule.yaml +12 -0
  216. package/src/hooks/ts/lib/rules/builtin/rm-recursive-parent.rule.yaml +13 -0
  217. package/src/hooks/ts/lib/rules/builtin/rm-recursive-relative.rule.yaml +12 -0
  218. package/src/hooks/ts/lib/rules/builtin/rm-recursive-root.rule.yaml +27 -0
  219. package/src/hooks/ts/lib/rules/builtin/rm-trailing-tilde.rule.yaml +12 -0
  220. package/src/hooks/ts/lib/rules/builtin/sudoers-nopasswd.rule.yaml +15 -0
  221. package/src/hooks/ts/lib/rules/builtin.generated.ts +557 -0
  222. package/src/hooks/ts/lib/rules/eval.ts +76 -0
  223. package/src/hooks/ts/lib/rules/lint.ts +108 -0
  224. package/src/hooks/ts/lib/rules/load.ts +264 -0
  225. package/src/hooks/ts/lib/rules/types.ts +58 -0
  226. package/src/hooks/ts/pre-tool-use/security-validator.ts +35 -96
  227. package/src/hooks/ts/user-prompt/handoff-link.ts +34 -0
  228. package/dist/aibroker-client-BxzeEHPF.mjs +0 -3
  229. package/dist/auto-route-DWYK_0i0.mjs +0 -11
  230. package/dist/budget-DX-VIWGf.mjs +0 -15
  231. package/dist/cockpit-memory-DIrNs4xr.mjs +0 -20
  232. package/dist/daemon-ieo0lnpq.mjs +0 -46
  233. package/dist/detect-C0ZBXqDL.mjs +0 -10
  234. package/dist/factory-DeASMV7Z.mjs +0 -9
  235. package/dist/kill-tree-CXZ0WfVf.mjs +0 -10
  236. package/dist/operator-Bpxq_WB5.mjs +0 -7
  237. package/dist/providers-QJzpaNhX.mjs +0 -16
  238. package/dist/registrable-Drn8wIDO.mjs +0 -9
  239. package/dist/render-C4KR8qQ8.mjs +0 -13
  240. package/dist/render-Cz3BWIBO.mjs +0 -903
  241. package/dist/root-Bfb1zgwE.mjs +0 -36
  242. package/dist/route-table-ZVMNBsy7.mjs +0 -15
  243. package/dist/session-BcnhepLZ.mjs +0 -35
  244. package/dist/session-scan-CqUQdCac.mjs +0 -9
  245. package/dist/status-D_SWmOlH.mjs +0 -6
  246. package/dist/viewer-CbGN2Ri4.mjs +0 -22
  247. package/dist/worker-config-D1KVAMp4.mjs +0 -42
@@ -1,22 +1,22 @@
1
1
  import { _ as warn, a as fmtDate, c as ok, d as scaffoldProjectDirs, f as shortenPath, i as err, l as renderTable, n as dim, o as header, p as slugFromPath, r as encodeDir, s as now, t as bold, u as resolvePath } from "./utils-J2b9y8PC.mjs";
2
- import { u as claudeProjectsDir } from "./runtime-paths-WsO9sJFc.mjs";
3
- import { Et as appendLedger, M as readWorkersSection, b as nativeOrchestratorModel, bt as stripModelVariant, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-CST2uq1v.mjs";
4
- import { i as ledgerPath, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
5
- import { M as trustProjectPath } from "./pool-BZ94nFuq.mjs";
6
- import { a as unregistrableReason } from "./registrable-CXBBpUcz.mjs";
7
- import { n as ensurePaiMarker } from "./pai-marker-DLKJ9Yr5.mjs";
2
+ import { u as claudeProjectsDir } from "./runtime-paths-twfV23YL.mjs";
3
+ import { Et as appendLedger, M as readWorkersSection, b as nativeOrchestratorModel, bt as stripModelVariant, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-DGV64YJa.mjs";
4
+ import { i as ledgerPath, u as workersLogDir } from "./paths-BwfwHOvN.mjs";
5
+ import { M as trustProjectPath } from "./pool-CFeHGX7q.mjs";
6
+ import { a as unregistrableReason } from "./registrable-D_4qXCnq.mjs";
7
+ import { n as ensurePaiMarker } from "./pai-marker-kA0iM7rP.mjs";
8
8
  import { t as STOP_WORDS } from "./stop-words-DSEYQdNe.mjs";
9
- import { dn as getProfile, un as SESSION_NAME_ENV, x as SESSION_WORKER_PROVIDER_ENV, xt as routeVerdictLine } from "./routing-BlD_tKjW.mjs";
9
+ import { dn as getProfile, un as SESSION_NAME_ENV, x as SESSION_WORKER_PROVIDER_ENV, xt as routeVerdictLine } from "./routing-CF0wlR-_.mjs";
10
10
  import { n as OPT, t as CliError } from "./define-CjJsmq-6.mjs";
11
- import { i as getRegistryBackend } from "./factory-BV0MQA3T.mjs";
12
- import { n as formatDetection, r as formatDetectionJson, t as detectProject } from "./detect-CHuxFrLy.mjs";
13
- import { a as getSessionCount, c as upsertTag$1, i as getProjectTags, n as getProject$1, o as requireProject, r as getProjectAliases, s as resolveIdentifier, t as getLastSessionDate } from "./helpers-CvbYEKoD.mjs";
14
- import { a as resolveHome, n as loadScanConfig } from "./scan-C3uotg_f.mjs";
15
- import { n as buildLaunchPlan, o as launchableProviderNames, s as maskLaunchEnv, t as LaunchError } from "./launch-DpQPZGsT.mjs";
16
- import { a as colorEnabled, f as renderTable$1, i as saveBudgetSnapshot, n as readBudget, o as makeStyle, r as readBudgetSnapshot, t as providerHealth } from "./health-kufVIf6i.mjs";
17
- import { d as printExitDir, i as probeResume, u as transcriptModelFor } from "./launch-UPQBoW2q.mjs";
18
- import { n as fetchLiveSessions } from "./aibroker-client-CQPGqLxL.mjs";
19
- import { a as resolveSessionByNameOrId, s as scanSessions, t as fmtAge } from "./session-scan-BmnjSReu.mjs";
11
+ import { i as getRegistryBackend } from "./factory-CYwa0jYj.mjs";
12
+ import { n as formatDetection, r as formatDetectionJson, t as detectProject } from "./detect-DLjeYwnt.mjs";
13
+ import { a as getSessionCount, c as upsertTag$1, i as getProjectTags, n as getProject$1, o as requireProject, r as getProjectAliases, s as resolveIdentifier, t as getLastSessionDate } from "./helpers-Dj2nY56t.mjs";
14
+ import { a as resolveHome, n as loadScanConfig } from "./scan-ew8M6tTH.mjs";
15
+ import { n as buildLaunchPlan, o as launchableProviderNames, s as maskLaunchEnv, t as LaunchError } from "./launch-CV6oPHI2.mjs";
16
+ import { a as colorEnabled, f as renderTable$1, i as saveBudgetSnapshot, n as readBudget, o as makeStyle, r as readBudgetSnapshot, t as providerHealth } from "./health-Bb2U4PNK.mjs";
17
+ import { d as printExitDir, i as probeResume, u as transcriptModelFor } from "./launch-Dy8qQnSD.mjs";
18
+ import { n as fetchLiveSessions } from "./aibroker-client-CXsyC7A8.mjs";
19
+ import { a as resolveSessionByNameOrId, s as scanSessions, t as fmtAge } from "./session-scan-DihMibI-.mjs";
20
20
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
21
21
  import { basename, dirname, join, resolve } from "node:path";
22
22
  import chalk from "chalk";
@@ -1066,7 +1066,7 @@ async function getSessionTags(registryBackend, sessionId) {
1066
1066
  * Session CRUD commands: list, info, rename, slug, tag, route, active, auto-route.
1067
1067
  */
1068
1068
  async function cmdList(projectSlug, opts) {
1069
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
1069
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
1070
1070
  const registryBackend = await getRegistryBackend();
1071
1071
  const limit = parseInt(opts.limit ?? "20", 10);
1072
1072
  let project;
@@ -1131,7 +1131,7 @@ async function cmdList(projectSlug, opts) {
1131
1131
  console.log(dim(` ${rows.length} session(s) shown (limit: ${limit})`));
1132
1132
  }
1133
1133
  async function cmdInfo(projectSlug, sessionNumber) {
1134
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
1134
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
1135
1135
  const registryBackend = await getRegistryBackend();
1136
1136
  const project = await getProject(registryBackend, projectSlug);
1137
1137
  if (!project) {
@@ -1155,7 +1155,7 @@ async function cmdInfo(projectSlug, sessionNumber) {
1155
1155
  console.log();
1156
1156
  }
1157
1157
  async function cmdRename(projectSlug, numberOrLatest, newSlug) {
1158
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
1158
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
1159
1159
  await cmdRenameWith(await getRegistryBackend(), projectSlug, numberOrLatest, newSlug);
1160
1160
  }
1161
1161
  /** Strips path separators and ".." so a title can never leave the notes dir. */
@@ -1242,7 +1242,7 @@ async function cmdRenameWith(registryBackend, projectSlug, numberOrLatest, newSl
1242
1242
  console.log();
1243
1243
  }
1244
1244
  async function cmdSlug(projectSlug, numberOrLatest, opts) {
1245
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
1245
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
1246
1246
  const registryBackend = await getRegistryBackend();
1247
1247
  const project = await getProject(registryBackend, projectSlug);
1248
1248
  if (!project) {
@@ -1272,7 +1272,7 @@ async function cmdSlug(projectSlug, numberOrLatest, opts) {
1272
1272
  }
1273
1273
  }
1274
1274
  async function cmdTag(projectSlug, sessionNumber, rawTags) {
1275
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
1275
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
1276
1276
  const registryBackend = await getRegistryBackend();
1277
1277
  const project = await getProject(registryBackend, projectSlug);
1278
1278
  if (!project) {
@@ -1312,7 +1312,7 @@ async function cmdTag(projectSlug, sessionNumber, rawTags) {
1312
1312
  console.log();
1313
1313
  }
1314
1314
  async function cmdRoute(projectSlug, sessionNumber, targetProjectSlug, opts) {
1315
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
1315
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
1316
1316
  const registryBackend = await getRegistryBackend();
1317
1317
  const project = await getProject(registryBackend, projectSlug);
1318
1318
  if (!project) {
@@ -1354,7 +1354,7 @@ async function cmdRoute(projectSlug, sessionNumber, targetProjectSlug, opts) {
1354
1354
  console.log();
1355
1355
  }
1356
1356
  async function cmdActive(opts) {
1357
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
1357
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
1358
1358
  const registryBackend = await getRegistryBackend();
1359
1359
  const minutes = parseInt(opts.minutes ?? "60", 10);
1360
1360
  const cutoff = Date.now() - minutes * 60 * 1e3;
@@ -1441,9 +1441,9 @@ async function cmdActive(opts) {
1441
1441
  ], rows));
1442
1442
  }
1443
1443
  async function cmdAutoRoute(opts) {
1444
- const { autoRoute, formatAutoRouteJson } = await import("./auto-route-DWYK_0i0.mjs");
1445
- const { getRegistryBackend, createStorageBackend } = await import("./factory-DeASMV7Z.mjs");
1446
- const { loadConfig } = await import("./config-Dv3t7xnT.mjs");
1444
+ const { autoRoute, formatAutoRouteJson } = await import("./auto-route-CAlZ5p-h.mjs");
1445
+ const { getRegistryBackend, createStorageBackend } = await import("./factory-DFwez99M.mjs");
1446
+ const { loadConfig } = await import("./config-DHgPx3ER.mjs");
1447
1447
  const config = loadConfig();
1448
1448
  const registryBackend = await getRegistryBackend();
1449
1449
  const federation = await createStorageBackend(config);
@@ -1854,7 +1854,7 @@ const newCommand = {
1854
1854
  const name = ctx.opts.name;
1855
1855
  const withSetup = ctx.opts.with;
1856
1856
  if (withSetup) {
1857
- const { runNewWith } = await import("./root-Bfb1zgwE.mjs");
1857
+ const { runNewWith } = await import("./root-80ESg6b7.mjs");
1858
1858
  return runNewWith({
1859
1859
  dir,
1860
1860
  with: withSetup,
@@ -1960,4 +1960,4 @@ const renameTop = {
1960
1960
 
1961
1961
  //#endregion
1962
1962
  export { cmdAdd as A, cmdRebind as B, assertAvailable as C, execHarness as D, dryRunText as E, cmdEdit as F, cmdUnarchive as H, cmdGo as I, cmdInfo$1 as L, cmdArchive as M, cmdConsolidate as N, looksLikePath as O, cmdDetect as P, cmdList$1 as R, legacy as S, buildHarness as T, findMovedPath as U, cmdTag$1 as V, cmdList as _, newTop as a, cmdSlug as b, planOpen as c, runNewDefault as d, sessionCommand as f, cmdInfo as g, cmdAutoRoute as h, lsCommand as i, cmdAlias as j, prepareDir as k, renameTop as l, cmdActive as m, collectRows as n, oneLine as o, sessionDir as p, collectView as r, openTop as s, applyProfileChat as t, rowsTable as u, cmdRename as v, modelFor as w, cmdTag as x, cmdRoute as y, cmdMove as z };
1963
- //# sourceMappingURL=session-BAfypQb9.mjs.map
1963
+ //# sourceMappingURL=session-C1JnDXvP.mjs.map
@@ -0,0 +1,9 @@
1
+ import "./utils-J2b9y8PC.mjs";
2
+ import "./config-DGV64YJa.mjs";
3
+ import "./config-SlZ-Z52i.mjs";
4
+ import "./paths-BwfwHOvN.mjs";
5
+ import "./status-DTMT5lyn.mjs";
6
+ import "./scope-BRcaPw5D.mjs";
7
+ import { a as resolveSessionByNameOrId, c as transcriptCustomTitle, i as resolveFriendlyName, n as loadBrokerNames, o as scanCacheFilePath, r as migrateSessionScanCache, s as scanSessions, t as fmtAge } from "./session-scan-DihMibI-.mjs";
8
+
9
+ export { loadBrokerNames, transcriptCustomTitle };
@@ -1,9 +1,9 @@
1
1
  import { h as smartDecodeDir } from "./utils-J2b9y8PC.mjs";
2
- import { _ as resolvePaiFile, f as legacyConfigDir, g as paiHomePath, l as claudeHomeDir, m as migratePaiFile, u as claudeProjectsDir } from "./runtime-paths-WsO9sJFc.mjs";
3
- import { M as readWorkersSection } from "./config-CST2uq1v.mjs";
4
- import { u as workersLogDir } from "./paths-DS5VQKoR.mjs";
2
+ import { _ as paiHomePath, f as legacyConfigDir, h as migratePaiFile, l as claudeHomeDir, u as claudeProjectsDir, v as resolvePaiFile } from "./runtime-paths-twfV23YL.mjs";
3
+ import { M as readWorkersSection } from "./config-DGV64YJa.mjs";
4
+ import { u as workersLogDir } from "./paths-BwfwHOvN.mjs";
5
5
  import { t as fmtAge$1 } from "./fmt-age-ByDkvkoU.mjs";
6
- import { i as itermUuid, l as sessionMapPath, t as AIBROKER_REGISTRY } from "./scope-D8HK6vU7.mjs";
6
+ import { i as itermUuid, l as sessionMapPath, t as AIBROKER_REGISTRY } from "./scope-BRcaPw5D.mjs";
7
7
  import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
8
8
  import { basename, join } from "node:path";
9
9
 
@@ -137,7 +137,7 @@ function loadBrokerNames(registryPath = AIBROKER_REGISTRY, mapPath) {
137
137
  /** Build encoded_dir → root_path map from PAI registry (authoritative cwd). */
138
138
  async function buildRegistryRootPathMap() {
139
139
  try {
140
- const { getRegistryBackend } = await import("./factory-DeASMV7Z.mjs");
140
+ const { getRegistryBackend } = await import("./factory-DFwez99M.mjs");
141
141
  const projects = await (await getRegistryBackend()).listProjects();
142
142
  const map = /* @__PURE__ */ new Map();
143
143
  for (const p of projects) if (p.encoded_dir) map.set(p.encoded_dir, p.root_path);
@@ -870,4 +870,4 @@ function transcriptCustomTitle(claudeSessionId, projectsDir = CLAUDE_PROJECTS_DI
870
870
 
871
871
  //#endregion
872
872
  export { resolveSessionByNameOrId as a, transcriptCustomTitle as c, resolveFriendlyName as i, loadBrokerNames as n, scanCacheFilePath as o, migrateSessionScanCache as r, scanSessions as s, fmtAge as t };
873
- //# sourceMappingURL=session-scan-BmnjSReu.mjs.map
873
+ //# sourceMappingURL=session-scan-DihMibI-.mjs.map
@@ -1,5 +1,5 @@
1
- import { rt as workersYamlPath } from "./config-CST2uq1v.mjs";
2
- import { u as paiConfigFilePath, w as readDualFormatConfigRaw, x as userWorkersYamlRaw } from "./config-DYbyEe4-.mjs";
1
+ import { rt as workersYamlPath } from "./config-DGV64YJa.mjs";
2
+ import { u as paiConfigFilePath, w as readDualFormatConfigRaw, x as userWorkersYamlRaw } from "./config-SlZ-Z52i.mjs";
3
3
  import { createReadStream, existsSync, readFileSync } from "node:fs";
4
4
  import { createInterface } from "node:readline";
5
5
 
@@ -334,4 +334,4 @@ function totalUsageTokens(totals) {
334
334
 
335
335
  //#endregion
336
336
  export { liveWorkersConfigShadows as a, totalUsageTokens as i, isRealUserPrompt as n, logWorkersConfigShadowsOnce as o, parseSessionUsage as r, workersConfigShadows as s, extractUserPromptText as t };
337
- //# sourceMappingURL=session-usage-oycSdiD3.mjs.map
337
+ //# sourceMappingURL=session-usage-BRIWFYPS.mjs.map
@@ -0,0 +1,6 @@
1
+ import "./config-DGV64YJa.mjs";
2
+ import "./config-SlZ-Z52i.mjs";
3
+ import "./paths-BwfwHOvN.mjs";
4
+ import { A as selfProcStart, C as nowStamp, D as pidAlive, E as parseSleepSecs, F as waitForTerminalStatus, M as setWorkerNote, N as spawnTimeOf, O as reconcileStatuses, P as statusTmpPath, S as newWorkerId, T as ownsPidCached, _ as isTerminal, a as UNLABELED, b as loadStatusesCached, c as contextFooter, d as describeTool, f as elapsedOf, g as isLive, h as isChatPane, i as TERMINAL_RECHECK_MS, j as setWorkerLabel, k as saveStatus, l as contextLabel, m as fmtTokens, n as OWNS_TTL_MS, o as ageOf, p as fmtContextK, r as SLEEP_FLOOR_SECS, s as alive, t as LOST_GRACE_MS, u as contextPercent, v as loadStatus, w as ownsPid, x as markStartFailed, y as loadStatuses } from "./status-DTMT5lyn.mjs";
5
+
6
+ export { loadStatus };
@@ -1,5 +1,5 @@
1
- import { f as readMainConfigRaw } from "./config-DYbyEe4-.mjs";
2
- import { l as statusPath } from "./paths-DS5VQKoR.mjs";
1
+ import { f as readMainConfigRaw } from "./config-SlZ-Z52i.mjs";
2
+ import { l as statusPath } from "./paths-BwfwHOvN.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
4
4
  import { createHash } from "node:crypto";
5
5
  import { join } from "node:path";
@@ -782,6 +782,10 @@ function parentPidOf(pid) {
782
782
  return;
783
783
  }
784
784
  }
785
+ /** Start time (ms epoch) of this process, for a status it writes about itself (procStart). */
786
+ function selfProcStart() {
787
+ return Math.round(Date.now() - process.uptime() * 1e3);
788
+ }
785
789
  function ownsPid(status) {
786
790
  if (status.pool) return status.pid > 0 && alive(status.pid) && parentPidOf(status.pid) === status.pool.hostPid;
787
791
  if (status.pid <= 0 || !alive(status.pid)) return false;
@@ -799,7 +803,7 @@ function ownsPid(status) {
799
803
  }
800
804
  }).trim();
801
805
  const psStart = Date.parse(out);
802
- const started = spawnTimeOf(status) ?? Date.parse(status.started.replace(" ", "T"));
806
+ const started = status.procStart ?? spawnTimeOf(status) ?? Date.parse(status.started.replace(" ", "T"));
803
807
  if (Number.isNaN(psStart) || Number.isNaN(started)) return alive(status.pid);
804
808
  return Math.abs(psStart - started) <= 12e4;
805
809
  } catch {
@@ -920,5 +924,5 @@ function describeTool(name, inp) {
920
924
  }
921
925
 
922
926
  //#endregion
923
- export { isFlagToken as $, setWorkerLabel as A, loadStatusConfig as B, nowStamp as C, pidAlive as D, parseSleepSecs as E, ForgeError as F, writeSectionToForge as G, setClaim as H, PROJECT_CONFIG_REL as I, loadPreamble as J, PREAMBLE_MAX_BYTES as K, formatStale as L, spawnTimeOf as M, statusTmpPath as N, reconcileStatuses as O, waitForTerminalStatus as P, appendSystemPromptArgs as Q, listClaims as R, newWorkerId as S, ownsPidCached as T, upsertSection as U, parseStatusConfig as V, writeContinueToForge as W, preambleLine as X, preambleBlock as Y, projectRoot as Z, isTerminal as _, UNLABELED as a, loadStatusesCached as b, contextFooter as c, describeTool as d, longInlinePromptHint as et, elapsedOf as f, isLive as g, isChatPane as h, TERMINAL_RECHECK_MS as i, setWorkerNote as j, saveStatus as k, contextLabel as l, fmtTokens as m, OWNS_TTL_MS as n, shortText as nt, ageOf as o, fmtContextK as p, PREAMBLE_REL as q, SLEEP_FLOOR_SECS as r, stripPromptValues as rt, alive as s, LOST_GRACE_MS as t, parseRunnerArgs as tt, contextPercent as u, loadStatus as v, ownsPid as w, markStartFailed as x, loadStatuses as y, listStale as z };
924
- //# sourceMappingURL=status-COtzewKV.mjs.map
927
+ export { appendSystemPromptArgs as $, selfProcStart as A, listStale as B, nowStamp as C, pidAlive as D, parseSleepSecs as E, waitForTerminalStatus as F, writeContinueToForge as G, parseStatusConfig as H, ForgeError as I, PREAMBLE_REL as J, writeSectionToForge as K, PROJECT_CONFIG_REL as L, setWorkerNote as M, spawnTimeOf as N, reconcileStatuses as O, statusTmpPath as P, projectRoot as Q, formatStale as R, newWorkerId as S, ownsPidCached as T, setClaim as U, loadStatusConfig as V, upsertSection as W, preambleBlock as X, loadPreamble as Y, preambleLine as Z, isTerminal as _, UNLABELED as a, loadStatusesCached as b, contextFooter as c, describeTool as d, isFlagToken as et, elapsedOf as f, isLive as g, isChatPane as h, TERMINAL_RECHECK_MS as i, stripPromptValues as it, setWorkerLabel as j, saveStatus as k, contextLabel as l, fmtTokens as m, OWNS_TTL_MS as n, parseRunnerArgs as nt, ageOf as o, fmtContextK as p, PREAMBLE_MAX_BYTES as q, SLEEP_FLOOR_SECS as r, shortText as rt, alive as s, LOST_GRACE_MS as t, longInlinePromptHint as tt, contextPercent as u, loadStatus as v, ownsPid as w, markStartFailed as x, loadStatuses as y, listClaims as z };
928
+ //# sourceMappingURL=status-DTMT5lyn.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { t as maxOf } from "./min-max-DrSRUaWQ.mjs";
2
- import { n as bashExitCode, r as isExpectedWaitExit } from "./wait-ChpHKJZV.mjs";
2
+ import { n as bashExitCode, r as isExpectedWaitExit } from "./wait-BindDA5w.mjs";
3
3
  import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, statSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
 
@@ -589,4 +589,4 @@ function errorsTable(groups) {
589
589
 
590
590
  //#endregion
591
591
  export { toolErrorSigTag as C, toolErrorsPath as E, summarizeToolInput as S, toolErrorText as T, lastCommand as _, SAME_WORKER_WINDOW_MS as a, readToolErrors as b, classifyToolError as c, detectToolErrors as d, errorsTable as f, isBenignBash as g, harnessToolErrorTexts as h, SAME_WORKER_MIN as i, clipRaw as l, groupToolErrors as m, CROSS_WORKER_WINDOW_MS as n, TOOL_ERRORS_FILE as o, grantedToolNames as p, RESEND_MS as r, benignNote as s, CROSS_WORKER_MIN as t, detectRunningWorkerErrors as u, normalizeError as v, toolErrorSummary as w, recordToolError as x, parseSince as y };
592
- //# sourceMappingURL=tool-errors-DXJ70-sr.mjs.map
592
+ //# sourceMappingURL=tool-errors-BOW2n882.mjs.map
@@ -1,8 +1,8 @@
1
- import "./config-CST2uq1v.mjs";
2
- import "./config-DYbyEe4-.mjs";
3
- import "./paths-DS5VQKoR.mjs";
4
- import "./status-COtzewKV.mjs";
5
- import { C as toolErrorSigTag, E as toolErrorsPath, S as summarizeToolInput, T as toolErrorText, _ as lastCommand, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, f as errorsTable, g as isBenignBash, h as harnessToolErrorTexts, i as SAME_WORKER_MIN, l as clipRaw, m as groupToolErrors, n as CROSS_WORKER_WINDOW_MS, o as TOOL_ERRORS_FILE, p as grantedToolNames, r as RESEND_MS, s as benignNote, t as CROSS_WORKER_MIN, u as detectRunningWorkerErrors, v as normalizeError, w as toolErrorSummary, x as recordToolError, y as parseSince } from "./tool-errors-DXJ70-sr.mjs";
6
- import "./wait-ChpHKJZV.mjs";
1
+ import "./config-DGV64YJa.mjs";
2
+ import "./config-SlZ-Z52i.mjs";
3
+ import "./paths-BwfwHOvN.mjs";
4
+ import "./status-DTMT5lyn.mjs";
5
+ import { C as toolErrorSigTag, E as toolErrorsPath, S as summarizeToolInput, T as toolErrorText, _ as lastCommand, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, f as errorsTable, g as isBenignBash, h as harnessToolErrorTexts, i as SAME_WORKER_MIN, l as clipRaw, m as groupToolErrors, n as CROSS_WORKER_WINDOW_MS, o as TOOL_ERRORS_FILE, p as grantedToolNames, r as RESEND_MS, s as benignNote, t as CROSS_WORKER_MIN, u as detectRunningWorkerErrors, v as normalizeError, w as toolErrorSummary, x as recordToolError, y as parseSince } from "./tool-errors-BOW2n882.mjs";
6
+ import "./wait-BindDA5w.mjs";
7
7
 
8
8
  export { errorsTable, groupToolErrors, parseSince, readToolErrors };
@@ -1,17 +1,17 @@
1
- import { Et as appendLedger } from "./config-CST2uq1v.mjs";
2
- import { i as ledgerPath, r as eventsPath } from "./paths-DS5VQKoR.mjs";
3
- import { T as worktreesStats, l as formatWorktreesStats } from "./worktree-BY--Rgmy.mjs";
4
- import { O as reconcileStatuses, _ as isTerminal, g as isLive, h as isChatPane, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-COtzewKV.mjs";
5
- import { a as ownerSessionName, f as workerInScope, n as currentTabKey, o as resolveSession } from "./scope-D8HK6vU7.mjs";
6
- import { _ as lastCommand } from "./tool-errors-DXJ70-sr.mjs";
7
- import { M as waitingLine, O as parseWaitOn, i as isWaitPollCommand } from "./wait-ChpHKJZV.mjs";
8
- import { a as buildsDir, l as listBuildsSync, p as renderBuildQueue, v as poolSlots } from "./caller-identity-Bim8JT-D.mjs";
1
+ import { Et as appendLedger } from "./config-DGV64YJa.mjs";
2
+ import { i as ledgerPath, r as eventsPath } from "./paths-BwfwHOvN.mjs";
3
+ import { T as worktreesStats, l as formatWorktreesStats } from "./worktree-7ZS3RBf8.mjs";
4
+ import { O as reconcileStatuses, _ as isTerminal, g as isLive, h as isChatPane, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-DTMT5lyn.mjs";
5
+ import { a as ownerSessionName, f as workerInScope, n as currentTabKey, o as resolveSession } from "./scope-BRcaPw5D.mjs";
6
+ import { _ as lastCommand } from "./tool-errors-BOW2n882.mjs";
7
+ import { M as waitingLine, O as parseWaitOn, i as isWaitPollCommand } from "./wait-BindDA5w.mjs";
8
+ import { a as buildsDir, l as listBuildsSync, p as renderBuildQueue, v as poolSlots } from "./caller-identity-DPDSrZE2.mjs";
9
9
  import { l as schedLine, o as readSchedFile } from "./scheduler-CtUyWJ3O.mjs";
10
- import { Bt as chatTickerRow, Ft as chatEnter, Ht as parseChatLine, It as chatInsertLine, K as renderPlanLines, Lt as chatLeave, Nt as CHAT_HELP, Pt as chatBlankRow, Rt as chatPromptRow, Ut as wrapText, V as loadPlanStatuses, Vt as holdAutoExit, _t as paneTitle, i as localIdleLine, n as markControlsHeld, qt as readInbox, s as readLocalIdle, t as clickrControlsArgv, tt as closeOwnPane, vt as writePaneTitle, yt as psTable, zt as chatScrollRegion } from "./controls-OiVVbe-f.mjs";
11
- import { a as endLabel } from "./endreason-BqyyU7BH.mjs";
12
- import { C as denialLines, _ as renderTable, b as tickerTool, c as headerLine, f as paneStatusRow, g as renderStatusLine, h as renderEvent, i as dayOf, l as intentOf, r as contextMeter, s as gutterFor, t as blankBetween, u as makeColor, y as tickerText } from "./render-Cz3BWIBO.mjs";
13
- import { r as sayToWorker } from "./operator-DrwWItVt.mjs";
14
- import { a as readAudit, d as loadPaneRunStatuses, p as renderPaneRunLines } from "./pane-audit-wv9UkyCe.mjs";
10
+ import { At as CHAT_HELP, Bt as wrapText, Ft as chatPromptRow, It as chatScrollRegion, K as renderPlanLines, Lt as chatTickerRow, Mt as chatEnter, Nt as chatInsertLine, Pt as chatLeave, Rt as holdAutoExit, V as loadPlanStatuses, Wt as readInbox, _t as paneTitle, i as localIdleLine, jt as chatBlankRow, n as markControlsHeld, s as readLocalIdle, t as clickrControlsArgv, tt as closeOwnPane, vt as writePaneTitle, zt as parseChatLine } from "./controls-ByrcupcA.mjs";
11
+ import { a as endLabel } from "./endreason-BjPom527.mjs";
12
+ import { C as denialLines, F as scanLine, J as psTable, _ as renderTable, b as tickerTool, c as headerLine, f as paneStatusRow, g as renderStatusLine, h as renderEvent, i as dayOf, l as intentOf, r as contextMeter, s as gutterFor, t as blankBetween, u as makeColor, y as tickerText } from "./render-CbifCwTb.mjs";
13
+ import { r as sayToWorker } from "./operator-lRGvYr3D.mjs";
14
+ import { a as readAudit, d as loadPaneRunStatuses, p as renderPaneRunLines } from "./pane-audit-DUuilP1V.mjs";
15
15
  import { closeSync, existsSync, openSync, readFileSync, readSync } from "node:fs";
16
16
  import { spawn } from "node:child_process";
17
17
  import { createInterface } from "node:readline";
@@ -235,6 +235,8 @@ function replayOutput(logDir, wid, color = process.stdout.isTTY === true, tailLi
235
235
  };
236
236
  const wrapWidth = typeof process.stdout.columns === "number" ? process.stdout.columns : FALLBACK_COLUMNS;
237
237
  const out = [headerLine(c, st), ...denialLines(st)];
238
+ const scan = scanLine(st.findings);
239
+ if (scan) out.push(c(st.findings?.block ? "red" : "yellow", ` ${scan}`));
238
240
  const raw = readFileSync(path, "utf8");
239
241
  const lines = tailLines !== void 0 ? raw.trimEnd().split("\n").slice(-tailLines) : raw.split("\n");
240
242
  const handoffs = readInbox(logDir, wid).map((h) => ({
@@ -909,4 +911,4 @@ function statusLineOutput(logDir, term, _cwd, claudeSession = "", now = /* @__PU
909
911
 
910
912
  //#endregion
911
913
  export { followTailOutput as a, inboxCounts as c, psOutput as d, replayOutput as f, workerEnded as g, strayWorkerProcesses as h, backfillLines as i, initialFollowState as l, statusLineOutput as m, FOLLOW_TAIL_ENTRIES as n, followWorkers as o, resumeArgv as p, applyEvent as r, gutterBody as s, BACKFILL_EVENTS as t, makeOperatorInput as u };
912
- //# sourceMappingURL=viewer-BgGRqXfD.mjs.map
914
+ //# sourceMappingURL=viewer-4BU8w_gK.mjs.map
@@ -0,0 +1,22 @@
1
+ import "./config-DGV64YJa.mjs";
2
+ import "./config-SlZ-Z52i.mjs";
3
+ import "./paths-BwfwHOvN.mjs";
4
+ import "./worktree-7ZS3RBf8.mjs";
5
+ import "./status-DTMT5lyn.mjs";
6
+ import "./pool-CFeHGX7q.mjs";
7
+ import "./scope-BRcaPw5D.mjs";
8
+ import "./tool-errors-BOW2n882.mjs";
9
+ import "./wait-BindDA5w.mjs";
10
+ import "./local-tiers-CqwGUcEn.mjs";
11
+ import "./caller-identity-DPDSrZE2.mjs";
12
+ import "./capacity-CThSydrd.mjs";
13
+ import "./local-candidate-C2FGhf54.mjs";
14
+ import "./controls-ByrcupcA.mjs";
15
+ import "./endreason-BjPom527.mjs";
16
+ import "./render-CbifCwTb.mjs";
17
+ import "./operator-lRGvYr3D.mjs";
18
+ import "./kill-tree-DTmiEb3T.mjs";
19
+ import "./pane-audit-DUuilP1V.mjs";
20
+ import { a as followTailOutput, c as inboxCounts, d as psOutput, f as replayOutput, g as workerEnded, h as strayWorkerProcesses, i as backfillLines, l as initialFollowState, m as statusLineOutput, n as FOLLOW_TAIL_ENTRIES, o as followWorkers, p as resumeArgv, r as applyEvent, s as gutterBody, t as BACKFILL_EVENTS, u as makeOperatorInput } from "./viewer-4BU8w_gK.mjs";
21
+
22
+ export { applyEvent, initialFollowState };
@@ -1,5 +1,5 @@
1
- import { r as eventsPath } from "./paths-DS5VQKoR.mjs";
2
- import { D as pidAlive, O as reconcileStatuses, k as saveStatus, nt as shortText, v as loadStatus, y as loadStatuses } from "./status-COtzewKV.mjs";
1
+ import { r as eventsPath } from "./paths-BwfwHOvN.mjs";
2
+ import { D as pidAlive, O as reconcileStatuses, k as saveStatus, rt as shortText, v as loadStatus, y as loadStatuses } from "./status-DTMT5lyn.mjs";
3
3
  import { existsSync, readFileSync, statSync } from "node:fs";
4
4
  import { isAbsolute, relative, resolve } from "node:path";
5
5
  import { execFileSync } from "node:child_process";
@@ -1274,4 +1274,4 @@ async function runWait(logDir, ids, o, out, errOut) {
1274
1274
 
1275
1275
  //#endregion
1276
1276
  export { waitOnCallLine as A, statusMarker as C, fmtElapsed as D, detachedLine as E, waitingLine as M, parseWaitOn as O, realDeps as S, waitOn as T, workerContractPrompt as _, runWait as a, killProcessTree as b, checkProof as c, parseWorkerReport as d, promptTrailer as f, verifyReportChanges as g, verifyFailNote as h, isWaitPollCommand as i, waitOnResultLine as j, realWaitDeps as k, newUntracked as l, untrackedPaths as m, bashExitCode as n, AG2_REASK_TEXT as o, renderReport as p, isExpectedWaitExit as r, OPERATOR_MARK as s, WAIT_EXIT_STILL_RUNNING as t, noteTokenSentence as u, repairAndValidateAg2 as v, statusQueue as w, processTree as x, validateAg2 as y };
1277
- //# sourceMappingURL=wait-ChpHKJZV.mjs.map
1277
+ //# sourceMappingURL=wait-BindDA5w.mjs.map
@@ -1,36 +1,36 @@
1
1
  import { _ as warn, c as ok, i as err, n as dim } from "./utils-J2b9y8PC.mjs";
2
- import { g as paiHomePath, h as paiHomeDir, l as claudeHomeDir, t as aibrokerHomeDir, u as claudeProjectsDir } from "./runtime-paths-WsO9sJFc.mjs";
3
- import { B as isLoopbackUrl, Et as appendLedger, J as migrateWorkersToYaml, K as initWorkersYaml, M as readWorkersSection, Ot as parseLedger, T as parseProvider, V as loopbackUrl, X as parseBuiltinAnthropic, Y as needsWorkersYamlRelocation, Z as parseWorkersYamlDocument, c as WorkersConfigError, dt as findTier, et as relocateWorkersYaml, m as isLocalProvider, mt as parseEntry, nt as workersYamlLegacyNotice, o as PROVIDER_TAGS, ot as yamlProviderToRaw, p as getProviderOrNative, q as inlineWorkersYamlKeys, rt as workersYamlPath, t as ANTHROPIC_NATIVE, y as nativeAnthropicProvider } from "./config-CST2uq1v.mjs";
4
- import { O as readJsonStrict, f as readMainConfigRaw, k as writeJsonAtomic, m as deepMergeConfig, n as CONFIG_FILE, o as expandHome, u as paiConfigFilePath, v as shippedDefaultsDir, w as readDualFormatConfigRaw, y as shippedMainDefaults } from "./config-DYbyEe4-.mjs";
5
- import { i as ledgerPath, t as WORKER_ID_RE, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
6
- import { E as worktreesStatsCached, l as formatWorktreesStats } from "./worktree-BY--Rgmy.mjs";
7
- import { T as ownsPidCached, b as loadStatusesCached, g as isLive, v as loadStatus } from "./status-COtzewKV.mjs";
8
- import { C as describeMcp, _ as readPoolMetrics, f as poolMetricsPath, h as poolSettings, i as bundleBuildStamp, l as poolHostProbe, o as poolCarry, u as poolHostStale, v as readPoolState, x as warmOrCold } from "./pool-BZ94nFuq.mjs";
9
- import { a as ownerSessionName } from "./scope-D8HK6vU7.mjs";
10
- import { $n as usageLogFile, $t as clearPolicy, E as budgetCache, Ft as clearSessionRoute, Gt as servingChip, Ht as routeChoices, I as buildSpeed, Jn as isTimeOrdered, Jt as setRoute, L as percentile, Mt as loopbackRefusal, Pt as applyPolicyToRoutes, Qn as splitBySessionKind, Qt as POLICY_MODES, Rt as flowText, Tt as duplicateModelIds, Ut as routeRows, Vt as resolveSessionArg, W as currentInventory, Wt as routeText, Yn as markTimeOrdered, Yt as setSessionRoute, _n as currentLocalStatus, an as readPolicy, at as readInventoryInput, bn as pickLocal, dn as getProfile, in as parseDuration, it as readInventory, jt as isTailnetOrLocalName, nn as findLocal, on as routeRun, pn as readProfiles, rn as onBattery, rt as processTreeRssMb, sn as writePolicy, xn as probeLoopback, yn as localTierOrder } from "./routing-BlD_tKjW.mjs";
11
- import { C as stopLines, T as tierButtons, _ as readLocalConfig, a as LocalTierError, c as fetchServedModels, f as listensOnPort, g as planStart, h as parseServers, l as fmtRss, m as parseLocalConfig, u as healthUrl, v as resolveModelPath, x as stopCommandFor } from "./local-tiers-BtdEEe5n.mjs";
12
- import { _ as buildSlots, a as buildsDir, g as waitReason, l as listBuildsSync, m as ticketKind, n as breakStaleMutex, x as testSlots } from "./caller-identity-Bim8JT-D.mjs";
2
+ import { _ as paiHomePath, g as paiHomeDir, l as claudeHomeDir, t as aibrokerHomeDir, u as claudeProjectsDir } from "./runtime-paths-twfV23YL.mjs";
3
+ import { B as isLoopbackUrl, Et as appendLedger, J as migrateWorkersToYaml, K as initWorkersYaml, M as readWorkersSection, Ot as parseLedger, T as parseProvider, V as loopbackUrl, X as parseBuiltinAnthropic, Y as needsWorkersYamlRelocation, Z as parseWorkersYamlDocument, c as WorkersConfigError, dt as findTier, et as relocateWorkersYaml, m as isLocalProvider, mt as parseEntry, nt as workersYamlLegacyNotice, o as PROVIDER_TAGS, ot as yamlProviderToRaw, p as getProviderOrNative, q as inlineWorkersYamlKeys, rt as workersYamlPath, t as ANTHROPIC_NATIVE, y as nativeAnthropicProvider } from "./config-DGV64YJa.mjs";
4
+ import { O as readJsonStrict, f as readMainConfigRaw, k as writeJsonAtomic, m as deepMergeConfig, n as CONFIG_FILE, o as expandHome, u as paiConfigFilePath, v as shippedDefaultsDir, w as readDualFormatConfigRaw, y as shippedMainDefaults } from "./config-SlZ-Z52i.mjs";
5
+ import { i as ledgerPath, t as WORKER_ID_RE, u as workersLogDir } from "./paths-BwfwHOvN.mjs";
6
+ import { E as worktreesStatsCached, l as formatWorktreesStats } from "./worktree-7ZS3RBf8.mjs";
7
+ import { T as ownsPidCached, b as loadStatusesCached, g as isLive, v as loadStatus } from "./status-DTMT5lyn.mjs";
8
+ import { C as describeMcp, _ as readPoolMetrics, f as poolMetricsPath, h as poolSettings, i as bundleBuildStamp, l as poolHostProbe, o as poolCarry, u as poolHostStale, v as readPoolState, x as warmOrCold } from "./pool-CFeHGX7q.mjs";
9
+ import { a as ownerSessionName } from "./scope-BRcaPw5D.mjs";
10
+ import { $n as usageLogFile, $t as clearPolicy, E as budgetCache, Ft as clearSessionRoute, Gt as servingChip, Ht as routeChoices, I as buildSpeed, Jn as isTimeOrdered, Jt as setRoute, L as percentile, Mt as loopbackRefusal, Pt as applyPolicyToRoutes, Qn as splitBySessionKind, Qt as POLICY_MODES, Rt as flowText, Tt as duplicateModelIds, Ut as routeRows, Vt as resolveSessionArg, W as currentInventory, Wt as routeText, Yn as markTimeOrdered, Yt as setSessionRoute, _n as currentLocalStatus, an as readPolicy, at as readInventoryInput, bn as pickLocal, dn as getProfile, in as parseDuration, it as readInventory, jt as isTailnetOrLocalName, nn as findLocal, on as routeRun, pn as readProfiles, rn as onBattery, rt as processTreeRssMb, sn as writePolicy, xn as probeLoopback, yn as localTierOrder } from "./routing-CF0wlR-_.mjs";
11
+ import { C as stopLines, T as tierButtons, _ as readLocalConfig, a as LocalTierError, c as fetchServedModels, f as listensOnPort, g as planStart, h as parseServers, l as fmtRss, m as parseLocalConfig, u as healthUrl, v as resolveModelPath, x as stopCommandFor } from "./local-tiers-CqwGUcEn.mjs";
12
+ import { _ as buildSlots, a as buildsDir, g as waitReason, l as listBuildsSync, m as ticketKind, n as breakStaleMutex, x as testSlots } from "./caller-identity-DPDSrZE2.mjs";
13
13
  import { f as sharedScheduler, o as readSchedFile, u as schedPlain } from "./scheduler-CtUyWJ3O.mjs";
14
- import { l as reorderQueue, o as providerCap, s as queueRows, u as reorderQueueTo } from "./capacity-CsZMkVyg.mjs";
15
- import { a as instancesFromProcesses, d as reconcileInstances, i as instanceNumber, l as readInstances, p as writeInstances, r as instanceEngineKey, u as readLiveInstances } from "./local-instances-bdCNNSsL.mjs";
16
- import { i as localStatusLine, s as readLocalStatus } from "./local-candidate-Cp_bw4kK.mjs";
14
+ import { m as reorderQueueTo, o as providerCap, p as reorderQueue, s as queueRows } from "./capacity-CThSydrd.mjs";
15
+ import { a as instancesFromProcesses, d as reconcileInstances, i as instanceNumber, l as readInstances, p as writeInstances, r as instanceEngineKey, u as readLiveInstances } from "./local-instances-DhF4_sV2.mjs";
16
+ import { i as localStatusLine, s as readLocalStatus } from "./local-candidate-C2FGhf54.mjs";
17
17
  import { t as LOCAL_PROBE_TIMEOUT_MS } from "./timeouts-1MLooEBB.mjs";
18
18
  import { n as OPT, t as CliError } from "./define-CjJsmq-6.mjs";
19
- import { c as resolveFromModule } from "./postgres-C-T5OWer.mjs";
20
- import { c as ensureProxyRunning, l as proxyPort, u as stopProxy } from "./launch-DpQPZGsT.mjs";
21
- import { a as colorEnabled, f as renderTable, n as readBudget, o as makeStyle } from "./health-kufVIf6i.mjs";
22
- import { H as testProvider, o as sessionWorkersLine } from "./run-AZVwceiU.mjs";
23
- import { U as planRows, V as loadPlanStatuses, i as localIdleLine, n as markControlsHeld, s as readLocalIdle, t as clickrControlsArgv, yt as psTable } from "./controls-OiVVbe-f.mjs";
24
- import { w as parseDenialText } from "./render-Cz3BWIBO.mjs";
25
- import { n as diskBundleMtime, r as ensurePoolHost } from "./pool-cli-B1eKySeN.mjs";
26
- import { a as readAudit, d as loadPaneRunStatuses, f as paneRunRows } from "./pane-audit-wv9UkyCe.mjs";
27
- import { i as fallbackStatusText, n as fallbackOn, r as fallbackStatus, t as fallbackOff } from "./fallback-Bj2cyVk_.mjs";
28
- import { b as useProvider, f as setClass, g as setWorkersEnabled, l as removeProvider, m as setProviderEnabled, p as setProviderCap, r as classTargetText, s as describeProviders, t as addProvider, v as unsetClass, y as updateProvider } from "./providers-Dzx5GAUI.mjs";
29
- import { A as cockpitMemoryPayload, B as cockpitLayout, N as liveMemoryDeps, O as embeddingRuntimeName, P as memoryJobProgress, S as runtimeJobProgress, V as cockpitProbeSettings, c as defaultDeps, g as readLabels, h as readCockpitJob, k as readRuntimeCommands, t as COCKPIT_ACTION_EVENT, v as runCockpitAction, x as runningRuntimeJobs } from "./cockpit-actions-BTA1njMO.mjs";
30
- import { n as isRealUserPrompt, s as workersConfigShadows, t as extractUserPromptText } from "./session-usage-oycSdiD3.mjs";
31
- import { appendFileSync, chmodSync, closeSync, copyFileSync, createReadStream, existsSync, fstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
19
+ import { c as resolveFromModule } from "./postgres-BL5oBBgY.mjs";
20
+ import { c as ensureProxyRunning, l as proxyPort, u as stopProxy } from "./launch-CV6oPHI2.mjs";
21
+ import { a as colorEnabled, f as renderTable, n as readBudget, o as makeStyle } from "./health-Bb2U4PNK.mjs";
22
+ import { H as testProvider, o as sessionWorkersLine } from "./run-CAjfKBQV.mjs";
23
+ import { U as planRows, V as loadPlanStatuses, i as localIdleLine, n as markControlsHeld, s as readLocalIdle, t as clickrControlsArgv } from "./controls-ByrcupcA.mjs";
24
+ import { H as maskSecrets, J as psTable, w as parseDenialText } from "./render-CbifCwTb.mjs";
25
+ import { n as diskBundleMtime, r as ensurePoolHost } from "./pool-cli-DOLgPgOM.mjs";
26
+ import { a as readAudit, d as loadPaneRunStatuses, f as paneRunRows } from "./pane-audit-DUuilP1V.mjs";
27
+ import { b as useProvider, f as setClass, g as setWorkersEnabled, l as removeProvider, m as setProviderEnabled, p as setProviderCap, r as classTargetText, s as describeProviders, t as addProvider, v as unsetClass, y as updateProvider } from "./providers-BC2Myo_O.mjs";
28
+ import { A as cockpitMemoryPayload, B as cockpitLayout, N as liveMemoryDeps, O as embeddingRuntimeName, P as memoryJobProgress, S as runtimeJobProgress, V as cockpitProbeSettings, c as defaultDeps, g as readLabels, h as readCockpitJob, k as readRuntimeCommands, t as COCKPIT_ACTION_EVENT, v as runCockpitAction, x as runningRuntimeJobs } from "./cockpit-actions-BgdKB9G3.mjs";
29
+ import { n as isRealUserPrompt, s as workersConfigShadows, t as extractUserPromptText } from "./session-usage-BRIWFYPS.mjs";
30
+ import { i as fallbackStatusText, n as fallbackOn, r as fallbackStatus, t as fallbackOff } from "./fallback-CQ8_CuVu.mjs";
31
+ import { appendFileSync, chmodSync, closeSync, copyFileSync, createReadStream, existsSync, fstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
32
32
  import { createHash } from "node:crypto";
33
- import { basename, dirname, isAbsolute, join, normalize, relative, resolve } from "node:path";
33
+ import { basename, dirname, join, resolve } from "node:path";
34
34
  import chalk from "chalk";
35
35
  import { homedir, loadavg } from "node:os";
36
36
  import { execFile, execFileSync, spawn } from "node:child_process";
@@ -946,7 +946,7 @@ const shellHead = (L, n, q, hex) => String.raw(_templateObject$1 || (_templateOb
946
946
  const shellBody = (L, n, q, hex) => String.raw`</style><style>
947
947
  #legend>.lgline{gap:2px 8px;font-size:11px}#legend>.lgline span{white-space:nowrap}
948
948
  </style></head><body>
949
- <header><div class="hl"><h1>PAI<span class="hc"> Cockpit</span></h1><span id="ver" title="PAI __COCKPIT_VERSION__ · build __COCKPIT_BUILD__"><span class="vm">v__COCKPIT_VERSION_SHORT__</span><span class="vp">__COCKPIT_VERSION_PATCH__</span></span></div>
949
+ <header><div class="hl"><h1>__COCKPIT_HOMEPAGE__</h1><span id="ver" title="PAI __COCKPIT_VERSION__ · build __COCKPIT_BUILD__"><span class="vm">v__COCKPIT_VERSION_SHORT__</span><span class="vp">__COCKPIT_VERSION_PATCH__</span></span></div>
950
950
  <div class="tabs" id="tabs"><button data-w="1h">1 hour</button><button data-w="24h">Today</button><button data-w="7d">Week</button></div>
951
951
  <div class="hr"><span id="stamp">loading...</span><span id="ask" hidden><span class="aq"></span> <button id="askyes" type="button" aria-label="confirm">✓</button><button id="askno" type="button" aria-label="cancel">✕</button></span><button id="reset" type="button" title="reset to the default layout" aria-label="reset to the default layout">⟲</button><button id="savedef" type="button" title="save this layout as the default for all devices" aria-label="save layout as default">☆</button><button id="lock" type="button" title="lock layout" aria-label="layout unlocked" aria-pressed="false"><svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="7" width="10" height="7" rx="1.5"/><path d="M5 7V5a3 3 0 0 1 6 0"/></svg></button><button id="theme" type="button" title="Dark mode" aria-label="Dark mode"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path class="ic-moon" d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8Z"/><g class="ic-sun"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></g></svg></button></div></header><a id="newer" href="#" hidden title="The router now serves a newer cockpit build than this open page; reload to get it.">newer cockpit available — reload</a><a id="newdef" href="#" hidden title="A newer default layout was saved on another device; your layout here was edited after it.">newer default available · use it</a>
952
952
  <div id="toast" role="status" hidden></div>
@@ -1263,6 +1263,7 @@ const css = (L, n, q, hex) => String.raw`:root{--bg:#f6f7f9;--card:#fff;--fg:#1d
1263
1263
  *{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:13px/1.45 -apple-system,BlinkMacSystemFont,"SF Pro Text",sans-serif}
1264
1264
  header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:8px 14px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--bg);z-index:2}
1265
1265
  h1{font-size:15px;margin:0;font-weight:600}
1266
+ h1 .home{color:inherit;text-decoration:none}h1 .home:hover,h1 .home:focus-visible{text-decoration:underline}
1266
1267
  .hl{display:flex;align-items:baseline;min-width:0}.hr{display:flex;align-items:center;justify-content:flex-end;gap:16px;min-width:0}
1267
1268
  #ver{display:flex;flex:0 100 auto;min-width:0;overflow:hidden;font-size:11px;color:var(--dim,#888);opacity:.7;margin-left:6px;white-space:nowrap;cursor:default}
1268
1269
  .tabs button{background:var(--card);color:var(--fg);border:1px solid var(--line);padding:3px 12px;cursor:pointer;font:inherit}
@@ -6574,74 +6575,6 @@ function selectorChoices(workers, endpoints) {
6574
6575
  ];
6575
6576
  }
6576
6577
 
6577
- //#endregion
6578
- //#region src/hooks/ts/lib/build-gate.ts
6579
- /** Tiny reader for the two keys of builds.yaml: flow `[a, b]` or block `- a` lists. */
6580
- function parseBuildsYaml(text) {
6581
- const res = {
6582
- doors: [],
6583
- patterns: []
6584
- };
6585
- let key = null;
6586
- const unq = (s) => s.trim().replace(/^(['"])(.*)\1$/, "$2");
6587
- for (const raw of text.split("\n")) {
6588
- const line = raw.replace(/(^|\s)#.*$/, "");
6589
- if (!line.trim()) continue;
6590
- const m = /^(doors|patterns)\s*:\s*(.*)$/.exec(line);
6591
- if (m) {
6592
- key = m[1];
6593
- const rest = m[2].trim();
6594
- if (rest.startsWith("[")) {
6595
- res[key].push(...rest.replace(/^\[|\]$/g, "").split(",").map(unq).filter(Boolean));
6596
- key = null;
6597
- }
6598
- continue;
6599
- }
6600
- const li = /^\s*-\s+(.*)$/.exec(line);
6601
- if (li && key) res[key].push(unq(li[1]));
6602
- else if (!/^\s/.test(line)) key = null;
6603
- }
6604
- return res;
6605
- }
6606
- /** The nearest `.pai/builds.yaml` at or above `cwd`. */
6607
- function loadBuildsConfig(cwd) {
6608
- let dir = resolve(cwd);
6609
- for (;;) {
6610
- const f = join(dir, ".pai", "builds.yaml");
6611
- if (existsSync(f)) try {
6612
- return {
6613
- root: dir,
6614
- ...parseBuildsYaml(readFileSync(f, "utf8"))
6615
- };
6616
- } catch {
6617
- return null;
6618
- }
6619
- const up = dirname(dir);
6620
- if (up === dir) return null;
6621
- dir = up;
6622
- }
6623
- }
6624
-
6625
- //#endregion
6626
- //#region src/hooks/ts/lib/loop-guard.ts
6627
- const LOOP_MAX_REPEATS = 4;
6628
- /** Consecutive same-template read-only Bash calls without a worktree change after which the next one is denied (env PAI_LOOP_READ_STREAK overrides). */
6629
- const LOOP_READ_STREAK = Number(process.env.PAI_LOOP_READ_STREAK) > 0 ? Number(process.env.PAI_LOOP_READ_STREAK) : 15;
6630
- const SELF = "If your part is done, commit and write your R report. If you are stuck, report the blocker in R x= (or use pai worker help if available).";
6631
- const LOOP_DENY_REASON = `loop guard: you ran this command ${LOOP_MAX_REPEATS} times with the same result and nothing changed. Stop repeating it. ${SELF}`;
6632
- /** Total polling time per command key after which a "still running" helper is treated as an ordinary repeat again. */
6633
- const WAIT_CAP_MS = 45 * 6e4;
6634
- /** Untracked files up to this size are hashed by content; larger ones by size + mtime. */
6635
- const FP_FULL_READ_BYTES = 256 * 1024;
6636
- /** Content bytes read per fingerprint across all untracked files; past it files are hashed by size + mtime. */
6637
- const FP_TOTAL_BYTES = 4 * 1024 * 1024;
6638
- const SECRET_LINE = /pass(?:word|wd)|secret|token|api[_-]?key|credential|authorization|bearer|private key|^\s*(?:export\s+)?[A-Z][A-Z0-9_]*(?:KEY|SECRET|TOKEN|PASS\w*|CRED\w*|AUTH\w*)\s*=|\b(?:sk|ghp|gho|xox[bap])[-_][A-Za-z0-9_-]{16,}|\b[A-Za-z0-9+]{40,}={0,2}(?![\w/])|\b[a-z][a-z0-9+.-]*:\/\/[^\s\/:@]+:[^\s\/@]+@|\b(?:AKIA|ASIA|AGPA|AIDA|AROA)[A-Z0-9]{16}\b|\bgh[pousr]_[A-Za-z0-9]{20,}/i;
6639
- const MASKED_LINE = "[line masked: looks like a secret]";
6640
- /** Result text with lines that look like secrets replaced by a marker. */
6641
- function maskSecrets(text) {
6642
- return text.split("\n").map((l) => SECRET_LINE.test(l) ? MASKED_LINE : l).join("\n");
6643
- }
6644
-
6645
6578
  //#endregion
6646
6579
  //#region src/router/session-detail.ts
6647
6580
  /**
@@ -8180,6 +8113,9 @@ const BUILD_PLACEHOLDER = /__COCKPIT_BUILD__/g;
8180
8113
  const VERSION_PLACEHOLDER = /__COCKPIT_VERSION__/g;
8181
8114
  const VERSION_SHORT_PLACEHOLDER = /__COCKPIT_VERSION_SHORT__/g;
8182
8115
  const VERSION_PATCH_PLACEHOLDER = /__COCKPIT_VERSION_PATCH__/g;
8116
+ const HOMEPAGE_PLACEHOLDER = /__COCKPIT_HOMEPAGE__/g;
8117
+ /** The header title markup, spelled once: the link's inner content and the no-homepage fallback. */
8118
+ const TITLE_MARKUP = "PAI<span class=\"hc\"> Cockpit</span>";
8183
8119
  let pkgVersion = null;
8184
8120
  /** The version this router runs: package.json, read once at startup (the one owner of the header's "v<version>"). */
8185
8121
  function cockpitVersion() {
@@ -8191,6 +8127,17 @@ function cockpitVersion() {
8191
8127
  }
8192
8128
  return pkgVersion;
8193
8129
  }
8130
+ /** The project homepage from package.json, read once at startup; null when absent (the header title then stays plain text).
8131
+ * The placeholder stands in for the whole h1 content, so no URL literal is in the page source. */
8132
+ let pkgHomepage;
8133
+ function cockpitHomepage() {
8134
+ if (pkgHomepage === void 0) try {
8135
+ pkgHomepage = JSON.parse(readFileSync(resolveFromModule(import.meta.url, "package.json"), "utf8")).homepage ?? null;
8136
+ } catch {
8137
+ pkgHomepage = null;
8138
+ }
8139
+ return pkgHomepage;
8140
+ }
8194
8141
  /** Where the page gets the default layout this install serves (null = compose its own). */
8195
8142
  const SAVED_AT_PLACEHOLDER = "0/*__COCKPIT_LAYOUT_SAVED_AT__*/";
8196
8143
  const LAYOUT_PLACEHOLDER = "null/*__COCKPIT_LAYOUT__*/";
@@ -8373,7 +8320,11 @@ function handleCockpit(req, res, limits, readRows = cachedRows(), sessionMap = l
8373
8320
  if (url.pathname === "/cockpit") {
8374
8321
  let html = "";
8375
8322
  try {
8376
- html = cockpitHtml().replace(BUILD_PLACEHOLDER, cockpitBuildId()).replace(VERSION_SHORT_PLACEHOLDER, cockpitVersion().split(".").slice(0, 2).join(".")).replace(VERSION_PATCH_PLACEHOLDER, cockpitVersion().split(".").slice(2).map((p) => "." + p).join("")).replace(VERSION_PLACEHOLDER, cockpitVersion()).replace(LAYOUT_PLACEHOLDER, () => JSON.stringify(readDefaultLayout()).replace(/</g, "\\u003c")).replace(SAVED_AT_PLACEHOLDER, String(defaultSavedAt()));
8323
+ html = cockpitHtml().replace(BUILD_PLACEHOLDER, cockpitBuildId()).replace(VERSION_SHORT_PLACEHOLDER, cockpitVersion().split(".").slice(0, 2).join(".")).replace(VERSION_PATCH_PLACEHOLDER, cockpitVersion().split(".").slice(2).map((p) => "." + p).join("")).replace(VERSION_PLACEHOLDER, cockpitVersion()).replace(HOMEPAGE_PLACEHOLDER, () => {
8324
+ const home = cockpitHomepage();
8325
+ if (!home) return TITLE_MARKUP;
8326
+ return `<a class="home" href="${home.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;")}" target="_blank" rel="noopener">${TITLE_MARKUP}</a>`;
8327
+ }).replace(LAYOUT_PLACEHOLDER, () => JSON.stringify(readDefaultLayout()).replace(/</g, "\\u003c")).replace(SAVED_AT_PLACEHOLDER, String(defaultSavedAt()));
8377
8328
  } catch {}
8378
8329
  if (html) send(200, "text/html; charset=utf-8", html);
8379
8330
  else {
@@ -10674,9 +10625,9 @@ async function stopInstance(cfg, target, opts = {}, deps = {}) {
10674
10625
  */
10675
10626
  async function cliInflight(cfg, deps = {}) {
10676
10627
  const [{ engineInflight }, { readSchedFile }, { instanceEngineKey }] = await Promise.all([
10677
- import("./cockpit-actions-BgsiNcUY.mjs"),
10628
+ import("./cockpit-actions-DNl0rKfW.mjs"),
10678
10629
  import("./scheduler-dmHXoRvm.mjs"),
10679
- import("./local-instances-B-c-CxzP.mjs")
10630
+ import("./local-instances-GgXydQ2P.mjs")
10680
10631
  ]);
10681
10632
  const now = deps.now ?? Date.now();
10682
10633
  const snap = readSchedFile(deps.startDir ?? logDir(), now);
@@ -11094,7 +11045,7 @@ const workerPoolCommand = {
11094
11045
  async run(ctx) {
11095
11046
  try {
11096
11047
  const action = ctx.args.ACTION;
11097
- const { poolOn, poolOff, poolStatusText } = await import("./pool-cli-BjYQDfx6.mjs");
11048
+ const { poolOn, poolOff, poolStatusText } = await import("./pool-cli-Bj2TeA-d.mjs");
11098
11049
  if (action === void 0 || action === "status") return void out(await poolStatusText(logDir()));
11099
11050
  if (action === "on") return void (await poolOn(logDir())).forEach((l) => out(l));
11100
11051
  if (action === "off") return void (await poolOff(logDir())).forEach((l) => out(l));
@@ -11270,5 +11221,5 @@ const WORKER_CONFIG_COMMANDS = [
11270
11221
  ];
11271
11222
 
11272
11223
  //#endregion
11273
- export { exportDefaultLayout as $, workerMcpCommand as A, mergeSettings as B, workerBenchCommand as C, workerFallbackCommand as D, workerControlsCommand as E, workerProvidersCommand as F, cachedRows as G, canBind as H, workerProxyCommand as I, handleCockpit as J, cachedSessionMap as K, workerRolesCommand as L, workerOnCommand as M, workerPolicyCommand as N, workerInstallCommand as O, workerPoolCommand as P, warmCockpit as Q, workerRouteCommand as R, stopInstance as S, workerConfigCommand as T, sizeOnDiskGb as U, allocatePort as V, SystemMonitor as W, setEndpointHealth as X, setActionHooks as Y, setRuntimeSampler as Z, portOpen as _, collectEnv as a, withWorkerAttribution as at, startTier as b, currentInstances as c, saveRegistry as ct, isUp as d, loadBuildsConfig as et, killInstance as f, portListeners as g, parseCostTier as h, cliInflight as i, sessionDisplayName as it, workerOffCommand as j, workerLocalCommand as k, fail as l, providersCommand as lt, listServers as m, WORKER_CONFIG_COMMANDS as n, loadSessionMap as nt, collectTags as o, defaultRegistryCtx as ot, launchDetached as p, cachedWorkerWindows as q, buildClassTarget as r, loadWorkerWindows as rt, controlsArgv as s, hashText as st, PROVIDER_EDIT_COMMANDS as t, createEndpointHealth as tt, healthOk as u, serverLine as v, workerClassesCommand as w, stopAll as x, startInstance as y, installWorkers as z };
11274
- //# sourceMappingURL=worker-config-DgdT0iTB.mjs.map
11224
+ export { exportDefaultLayout as $, workerMcpCommand as A, mergeSettings as B, workerBenchCommand as C, workerFallbackCommand as D, workerControlsCommand as E, workerProvidersCommand as F, cachedRows as G, canBind as H, workerProxyCommand as I, handleCockpit as J, cachedSessionMap as K, workerRolesCommand as L, workerOnCommand as M, workerPolicyCommand as N, workerInstallCommand as O, workerPoolCommand as P, warmCockpit as Q, workerRouteCommand as R, stopInstance as S, workerConfigCommand as T, sizeOnDiskGb as U, allocatePort as V, SystemMonitor as W, setEndpointHealth as X, setActionHooks as Y, setRuntimeSampler as Z, portOpen as _, collectEnv as a, defaultRegistryCtx as at, startTier as b, currentInstances as c, providersCommand as ct, isUp as d, createEndpointHealth as et, killInstance as f, portListeners as g, parseCostTier as h, cliInflight as i, withWorkerAttribution as it, workerOffCommand as j, workerLocalCommand as k, fail as l, listServers as m, WORKER_CONFIG_COMMANDS as n, loadWorkerWindows as nt, collectTags as o, hashText as ot, launchDetached as p, cachedWorkerWindows as q, buildClassTarget as r, sessionDisplayName as rt, controlsArgv as s, saveRegistry as st, PROVIDER_EDIT_COMMANDS as t, loadSessionMap as tt, healthOk as u, serverLine as v, workerClassesCommand as w, stopAll as x, startInstance as y, installWorkers as z };
11225
+ //# sourceMappingURL=worker-config-CdPmb4_2.mjs.map