@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
@@ -0,0 +1,42 @@
1
+ import "./utils-J2b9y8PC.mjs";
2
+ import "./config-DGV64YJa.mjs";
3
+ import "./config-SlZ-Z52i.mjs";
4
+ import "./paths-BwfwHOvN.mjs";
5
+ import "./worktree-7ZS3RBf8.mjs";
6
+ import "./status-DTMT5lyn.mjs";
7
+ import "./pool-CFeHGX7q.mjs";
8
+ import "./helpers-CRuBUas3.mjs";
9
+ import "./scope-BRcaPw5D.mjs";
10
+ import "./routing-CF0wlR-_.mjs";
11
+ import "./tool-errors-BOW2n882.mjs";
12
+ import "./wait-BindDA5w.mjs";
13
+ import "./local-tiers-CqwGUcEn.mjs";
14
+ import "./caller-identity-DPDSrZE2.mjs";
15
+ import "./capacity-CThSydrd.mjs";
16
+ import "./local-instances-DhF4_sV2.mjs";
17
+ import "./local-candidate-C2FGhf54.mjs";
18
+ import "./factory-CYwa0jYj.mjs";
19
+ import "./postgres-BL5oBBgY.mjs";
20
+ import "./embedding-gate-iq0oQEkF.mjs";
21
+ import "./embeddings-BVq3esBF.mjs";
22
+ import "./router-D2476pOp.mjs";
23
+ import "./launch-CV6oPHI2.mjs";
24
+ import "./health-Bb2U4PNK.mjs";
25
+ import "./run-CAjfKBQV.mjs";
26
+ import "./controls-ByrcupcA.mjs";
27
+ import "./endreason-BjPom527.mjs";
28
+ import "./render-CbifCwTb.mjs";
29
+ import "./operator-lRGvYr3D.mjs";
30
+ import "./kill-tree-DTmiEb3T.mjs";
31
+ import "./pool-cli-DOLgPgOM.mjs";
32
+ import "./pane-audit-DUuilP1V.mjs";
33
+ import "./providers-BC2Myo_O.mjs";
34
+ import { A as workerMcpCommand, C as workerBenchCommand, D as workerFallbackCommand, E as workerControlsCommand, F as workerProvidersCommand, I as workerProxyCommand, L as workerRolesCommand, M as workerOnCommand, N as workerPolicyCommand, O as workerInstallCommand, P as workerPoolCommand, R as workerRouteCommand, S as stopInstance, T as workerConfigCommand, _ as portOpen, a as collectEnv, b as startTier, c as currentInstances, d as isUp, f as killInstance, g as portListeners, h as parseCostTier, i as cliInflight, j as workerOffCommand, k as workerLocalCommand, l as fail, m as listServers, n as WORKER_CONFIG_COMMANDS, o as collectTags, p as launchDetached, r as buildClassTarget, s as controlsArgv, t as PROVIDER_EDIT_COMMANDS, u as healthOk, v as serverLine, w as workerClassesCommand, x as stopAll, y as startInstance } from "./worker-config-CdPmb4_2.mjs";
35
+ import "./main-config-ops-C_fkINDv.mjs";
36
+ import "./cockpit-actions-BgdKB9G3.mjs";
37
+ import "./ipc-client-CmagIFLh.mjs";
38
+ import "./embed-pass-DdTMn4DH.mjs";
39
+ import "./session-usage-BRIWFYPS.mjs";
40
+ import "./fallback-CQ8_CuVu.mjs";
41
+
42
+ export { currentInstances, startInstance, startTier, stopAll, stopInstance };
@@ -1,4 +1,4 @@
1
- import { $ as readWorkersYaml, G as effectiveWorkersYamlData, H as WORKERS_YAML_FILENAME, J as migrateWorkersToYaml, K as initWorkersYaml, Q as readMergeVerify, U as buildWorkersYamlText, W as defaultWorkersYamlPath, X as parseBuiltinAnthropic, Y as needsWorkersYamlRelocation, Z as parseWorkersYamlDocument, at as writeWorkersYamlText, et as relocateWorkersYaml, it as writeWorkersYaml, nt as workersYamlLegacyNotice, ot as yamlProviderToRaw, q as inlineWorkersYamlKeys, rt as workersYamlPath, tt as starterWorkersYamlText } from "./config-CST2uq1v.mjs";
2
- import "./config-DYbyEe4-.mjs";
1
+ import { $ as readWorkersYaml, G as effectiveWorkersYamlData, H as WORKERS_YAML_FILENAME, J as migrateWorkersToYaml, K as initWorkersYaml, Q as readMergeVerify, U as buildWorkersYamlText, W as defaultWorkersYamlPath, X as parseBuiltinAnthropic, Y as needsWorkersYamlRelocation, Z as parseWorkersYamlDocument, at as writeWorkersYamlText, et as relocateWorkersYaml, it as writeWorkersYaml, nt as workersYamlLegacyNotice, ot as yamlProviderToRaw, q as inlineWorkersYamlKeys, rt as workersYamlPath, tt as starterWorkersYamlText } from "./config-DGV64YJa.mjs";
2
+ import "./config-SlZ-Z52i.mjs";
3
3
 
4
4
  export { workersYamlPath };
@@ -1,9 +1,10 @@
1
1
  import { t as writeFileAtomic } from "./atomic-file-BorMa4T3.mjs";
2
- import { Et as appendLedger } from "./config-CST2uq1v.mjs";
3
- import { i as ledgerPath, l as statusPath } from "./paths-DS5VQKoR.mjs";
4
- import { a as UNLABELED, g as isLive, k as saveStatus, v as loadStatus, y as loadStatuses } from "./status-COtzewKV.mjs";
2
+ import { Et as appendLedger } from "./config-DGV64YJa.mjs";
3
+ import { c as loadConfig } from "./config-SlZ-Z52i.mjs";
4
+ import { i as ledgerPath, l as statusPath } from "./paths-BwfwHOvN.mjs";
5
+ import { a as UNLABELED, g as isLive, k as saveStatus, v as loadStatus, y as loadStatuses } from "./status-DTMT5lyn.mjs";
5
6
  import { t as fmtAge } from "./fmt-age-ByDkvkoU.mjs";
6
- import { v as readPoolState } from "./pool-BZ94nFuq.mjs";
7
+ import { v as readPoolState } from "./pool-CFeHGX7q.mjs";
7
8
  import { existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
8
9
  import { basename, dirname, isAbsolute, join, resolve, sep } from "node:path";
9
10
  import { platform, tmpdir } from "node:os";
@@ -1320,6 +1321,151 @@ function adoptDetachedHead(dir, branch) {
1320
1321
  return null;
1321
1322
  }
1322
1323
  }
1324
+ function mergeSettings() {
1325
+ const m = loadConfig().workers?.merge;
1326
+ return {
1327
+ generated: m?.generated ?? [],
1328
+ regenerate: m?.regenerate ?? "",
1329
+ union: m?.union ?? []
1330
+ };
1331
+ }
1332
+ /** Glob to RegExp: `**` crosses directories, `*` and `?` stay inside one. */
1333
+ function globToRegExp(glob) {
1334
+ let re = "";
1335
+ for (let i = 0; i < glob.length; i++) {
1336
+ const c = glob[i];
1337
+ if (c === "*" && glob[i + 1] === "*") {
1338
+ re += ".*";
1339
+ i++;
1340
+ if (glob[i + 1] === "/") i++;
1341
+ } else if (c === "*") re += "[^/]*";
1342
+ else if (c === "?") re += "[^/]";
1343
+ else re += c.replace(/[.+^${}()|[\]\\]/g, "\\$&");
1344
+ }
1345
+ return new RegExp(`^${re}$`);
1346
+ }
1347
+ /** Does the diff from `base` to `side` only add lines (nothing removed or changed)? */
1348
+ function onlyAdds(dir, base, side) {
1349
+ const r = spawnSync("git", [
1350
+ "diff",
1351
+ "--no-index",
1352
+ "--numstat",
1353
+ "--",
1354
+ base,
1355
+ side
1356
+ ], {
1357
+ cwd: dir,
1358
+ encoding: "utf8"
1359
+ });
1360
+ const m = /^(\d+)\t(\d+)\t/.exec(r.stdout ?? "");
1361
+ return !!m && m[2] === "0";
1362
+ }
1363
+ /**
1364
+ * Resolve the conflicts of a merge in progress when every one is either in a
1365
+ * generated path (take ours, regenerate, add) or a pure-addition clash (both
1366
+ * sides only added lines: union, ours then theirs). Returns a note on success,
1367
+ * null when anything else conflicts (merge left in progress for the caller to
1368
+ * abort); throws after aborting when regeneration fails.
1369
+ */
1370
+ function autoResolveMerge(cwd, files, cfg) {
1371
+ const res = cfg.generated.map(globToRegExp);
1372
+ const isGen = (f) => res.some((r) => r.test(f));
1373
+ const gen = files.filter(isGen);
1374
+ const rest = files.filter((f) => !isGen(f));
1375
+ const unionRes = cfg.union.map(globToRegExp);
1376
+ if (rest.some((f) => !unionRes.some((r) => r.test(f)))) return null;
1377
+ const tmp = mkdtempSync(join(tmpdir(), "pai-union-"));
1378
+ const unions = [];
1379
+ try {
1380
+ for (const f of rest) {
1381
+ const stage = (n, name) => {
1382
+ const r = spawnSync("git", ["show", `:${n}:${f}`], {
1383
+ cwd,
1384
+ encoding: "buffer"
1385
+ });
1386
+ if (r.status !== 0) return null;
1387
+ writeFileSync(join(tmp, name), r.stdout);
1388
+ return join(tmp, name);
1389
+ };
1390
+ const base = stage(1, "base");
1391
+ const ours = stage(2, "ours");
1392
+ const theirs = stage(3, "theirs");
1393
+ if (!base || !ours || !theirs || !onlyAdds(cwd, base, ours) || !onlyAdds(cwd, base, theirs)) return null;
1394
+ const m = spawnSync("git", [
1395
+ "merge-file",
1396
+ "-p",
1397
+ "--union",
1398
+ ours,
1399
+ base,
1400
+ theirs
1401
+ ], {
1402
+ cwd,
1403
+ encoding: "buffer"
1404
+ });
1405
+ if (m.status !== 0) return null;
1406
+ unions.push({
1407
+ file: f,
1408
+ content: m.stdout.toString("utf8")
1409
+ });
1410
+ }
1411
+ } finally {
1412
+ rmSync(tmp, {
1413
+ recursive: true,
1414
+ force: true
1415
+ });
1416
+ }
1417
+ const notes = [];
1418
+ if (gen.length) for (const f of gen) try {
1419
+ git(cwd, [
1420
+ "checkout",
1421
+ "--ours",
1422
+ "--",
1423
+ f
1424
+ ]);
1425
+ } catch {
1426
+ git(cwd, [
1427
+ "rm",
1428
+ "-q",
1429
+ "--cached",
1430
+ "--ignore-unmatch",
1431
+ "--",
1432
+ f
1433
+ ]);
1434
+ }
1435
+ for (const u of unions) {
1436
+ writeFileSync(join(cwd, u.file), u.content, "utf8");
1437
+ git(cwd, [
1438
+ "add",
1439
+ "--",
1440
+ u.file
1441
+ ]);
1442
+ }
1443
+ if (gen.length) {
1444
+ const r = spawnSync("sh", ["-c", cfg.regenerate], {
1445
+ cwd,
1446
+ encoding: "utf8"
1447
+ });
1448
+ if (!cfg.regenerate || r.status !== 0) {
1449
+ git(cwd, ["merge", "--abort"]);
1450
+ throw new Error(`git refused the merge: conflicts in generated paths (${gen.join(", ")}) and regeneration ` + (cfg.regenerate ? `\`${cfg.regenerate}\` failed (exit ${r.status}): ${(r.stderr || r.stdout || "").trim().slice(-400)}` : "is not configured (workers.merge.regenerate)") + "; the merge was aborted");
1451
+ }
1452
+ const specs = cfg.generated.map((g) => `:(glob)${g}`);
1453
+ git(cwd, [
1454
+ "add",
1455
+ "-A",
1456
+ "--",
1457
+ ...specs
1458
+ ]);
1459
+ const count = git(cwd, [
1460
+ "ls-files",
1461
+ "--",
1462
+ ...specs
1463
+ ]).split("\n").filter(Boolean).length;
1464
+ notes.push(`regenerated ${cfg.generated.filter((g) => gen.some((f) => globToRegExp(g).test(f))).map((g) => g.replace(/\/?\*\*$/, "")).join(", ")} (${count} files)`);
1465
+ }
1466
+ for (const u of unions) notes.push(`union-merged ${u.file}`);
1467
+ return notes.join("; ");
1468
+ }
1323
1469
  function mergeWorker(logDir, id, opts = {}) {
1324
1470
  const st = mustHaveBranch(logDir, id);
1325
1471
  if (st.merged) return `worker ${id}: branch ${st.branch} already merged`;
@@ -1355,6 +1501,7 @@ function mergeWorker(logDir, id, opts = {}) {
1355
1501
  const [scanFrom, scanTo] = reapply ? [`${reapply.merge}^1`, reapply.merge] : [mergeBase, st.branch];
1356
1502
  assertStaticScans(st.cwd, scanFrom, scanTo);
1357
1503
  const oldHead = git(st.cwd, ["rev-parse", "HEAD"]);
1504
+ let autoNote = null;
1358
1505
  try {
1359
1506
  if (reapply) git(st.cwd, [
1360
1507
  "revert",
@@ -1383,16 +1530,34 @@ function mergeWorker(logDir, id, opts = {}) {
1383
1530
  "--diff-filter=U"
1384
1531
  ]).split("\n").filter(Boolean);
1385
1532
  } catch {}
1386
- if (inProgress) {
1387
- git(st.cwd, ["merge", "--abort"]);
1533
+ let autoErr = null;
1534
+ if (inProgress && files.length) try {
1535
+ autoNote = autoResolveMerge(st.cwd, files, opts.merge ?? mergeSettings());
1536
+ if (autoNote !== null) git(st.cwd, [
1537
+ "commit",
1538
+ "-q",
1539
+ "-m",
1540
+ `merge worker ${id} (${st.label}); auto-resolved: ${autoNote}`
1541
+ ]);
1542
+ } catch (err) {
1543
+ autoErr = err;
1544
+ autoNote = null;
1545
+ }
1546
+ if (inProgress && autoNote === null) {
1547
+ try {
1548
+ git(st.cwd, ["merge", "--abort"]);
1549
+ } catch {}
1388
1550
  if (git(st.cwd, ["rev-parse", "HEAD"]) !== oldHead || git(st.cwd, [
1389
1551
  "status",
1390
1552
  "--porcelain",
1391
1553
  "--untracked-files=no"
1392
1554
  ])) throw new Error(`worker ${id}: git merge --abort left ${st.cwd} not at ${oldHead}; inspect it before retrying`);
1393
1555
  }
1394
- const msg = `worker ${id}: git refused the merge of ${st.branch}` + (files.length ? ` — conflict in ${files.join(", ")}: merge main into the worker branch in its kept worktree (${st.worktreeDir}), resolve, then re-run pai worker merge ${id}` : ` — ${e.message}. The worktree ${st.worktreeDir} was kept: resolve the problem, then re-run pai worker merge ${id}`);
1395
- throw files.length ? new MergeConflictError(msg, files) : new Error(msg);
1556
+ if (autoErr && /the merge was aborted$/.test(autoErr.message)) throw autoErr;
1557
+ if (autoNote === null) {
1558
+ const msg = `worker ${id}: git refused the merge of ${st.branch}` + (files.length ? ` — conflict in ${files.join(", ")}${autoErr ? ` (auto-resolution failed: ${autoErr.message.split("\n")[0].slice(0, 200)})` : ""}: merge main into the worker branch in its kept worktree (${st.worktreeDir}), resolve, then re-run pai worker merge ${id}` : ` — ${e.message}. The worktree ${st.worktreeDir} was kept: resolve the problem, then re-run pai worker merge ${id}`);
1559
+ throw files.length ? new MergeConflictError(msg, files) : new Error(msg);
1560
+ }
1396
1561
  }
1397
1562
  const verifyLine = gateLines(st.cwd, opts.verify, () => revertMerge(st.cwd, oldHead), () => null);
1398
1563
  if (existsSync(st.worktreeDir) && !slot) assertWorktreeClean(st.worktreeDir, id);
@@ -1434,6 +1599,7 @@ function mergeWorker(logDir, id, opts = {}) {
1434
1599
  const notes = [];
1435
1600
  if (salvage.committed.length) notes.push(`salvaged ${salvage.committed.length} uncommitted change(s): ${salvage.committed.join(", ")}`);
1436
1601
  if (salvage.skipped.length) notes.push(`skipped ${salvage.skipped.join(", ")}`);
1602
+ if (autoNote) notes.unshift(`auto-resolved conflicts: ${autoNote}`);
1437
1603
  return withGate(verifyLine, notes.length ? `${base}; ${notes.join("; ")}` : base);
1438
1604
  }
1439
1605
  /** Stub and test-loss scans over `from..to`; throws before any merge exists, so the advised re-run works. */
@@ -2710,4 +2876,4 @@ function gcWorktreesThrottled(logDir, everyMin = 60, now = Date.now(), opts = {}
2710
2876
 
2711
2877
  //#endregion
2712
2878
  export { applyScratchEnv as A, worktreeWanted as C, formatPending as D, worktreesStatsCached as E, pendingGate as O, worktreeSystemPrompt as S, worktreesStats as T, ownedTree as _, archiveEmptyResult as a, verifyWorker as b, formatKnowledge as c, gcWorktrees as d, gcWorktreesThrottled as f, mergeWorker as g, markResumed as h, adoptTree as i, scratchPromptLine as j, pendingResults as k, formatWorktreesStats as l, leftoverWorktrees as m, MergeConflictError as n, commitLines as o, inPlaceSystemPrompt as p, addWorktree as r, discardWorker as s, GATE_MARK as t, gcPoolWorktrees as u, recordWorktree as v, worktreesDir as w, worktreeRefusesStart as x, salvageOnExit as y };
2713
- //# sourceMappingURL=worktree-BY--Rgmy.mjs.map
2879
+ //# sourceMappingURL=worktree-7ZS3RBf8.mjs.map
@@ -1,7 +1,7 @@
1
- import "./config-DYbyEe4-.mjs";
2
- import "./embedding-gate-CTAk8STe.mjs";
1
+ import "./config-SlZ-Z52i.mjs";
2
+ import "./embedding-gate-iq0oQEkF.mjs";
3
3
  import "./embeddings-BVq3esBF.mjs";
4
- import { r as saveQueryResult } from "./query-feedback-DN52N9C5.mjs";
5
- import { a as zettelThemes, c as zettelExplore, i as zettelHealth, n as zettelGodNotes, o as zettelConverse, r as zettelSuggest, s as zettelSurprise, t as zettelCommunities } from "./zettelkasten-LoH9RBiN.mjs";
4
+ import { r as saveQueryResult } from "./query-feedback-BWl2HRwN.mjs";
5
+ import { a as zettelThemes, c as zettelExplore, i as zettelHealth, n as zettelGodNotes, o as zettelConverse, r as zettelSuggest, s as zettelSurprise, t as zettelCommunities } from "./zettelkasten-FFhQFESJ.mjs";
6
6
 
7
7
  export { zettelConverse, zettelExplore, zettelHealth, zettelSuggest, zettelSurprise, zettelThemes };
@@ -1,5 +1,5 @@
1
1
  import { t as STOP_WORDS$1 } from "./stop-words-DSEYQdNe.mjs";
2
- import { a as requireQueryEmbedding } from "./embedding-gate-CTAk8STe.mjs";
2
+ import { a as requireQueryEmbedding } from "./embedding-gate-iq0oQEkF.mjs";
3
3
  import { i as deserializeEmbedding, r as cosineSimilarity } from "./embeddings-BVq3esBF.mjs";
4
4
  import { basename, dirname } from "node:path";
5
5
 
@@ -1213,4 +1213,4 @@ async function zettelCommunities(backend, opts) {
1213
1213
 
1214
1214
  //#endregion
1215
1215
  export { zettelThemes as a, zettelExplore as c, zettelHealth as i, zettelGodNotes as n, zettelConverse as o, zettelSuggest as r, zettelSurprise as s, zettelCommunities as t };
1216
- //# sourceMappingURL=zettelkasten-LoH9RBiN.mjs.map
1216
+ //# sourceMappingURL=zettelkasten-FFhQFESJ.mjs.map
@@ -20,6 +20,9 @@ Generated reference for every `pai` command. Read any page in the terminal with
20
20
  | [`pai doc`](doc.md) | Write the Markdown command reference |
21
21
  | [`pai end`](end.md) | Finish the current session |
22
22
  | [`pai find`](find.md) | Search your prompt history for sessions |
23
+ | [`pai git`](git.md) | Link commits to the session that wrote them |
24
+ | [`pai handoff`](handoff.md) | Carry a session's work to a new one |
25
+ | [`pai harness`](harness.md) | Sessions PAI can read from agent harnesses (Claude Code, Codex, ...) |
23
26
  | [`pai help`](help.md) | Explain a command (same as `pai <command> --help`) |
24
27
  | [`pai home`](home.md) | Where PAI keeps its files; move them out of ~/.claude |
25
28
  | [`pai hooks-db`](hooks-db.md) | Registry updates for the stop and pre-compact hooks |
@@ -28,6 +31,7 @@ Generated reference for every `pai` command. Read any page in the terminal with
28
31
  | [`pai issue`](issue.md) | Claim and release forge issues for this project |
29
32
  | [`pai kg`](kg.md) | Facts extracted from your notes, with the time they were true |
30
33
  | [`pai launch`](launch.md) | Start Claude Code on a chosen provider (for scripts) |
34
+ | [`pai lessons`](lessons.md) | Review-gated lessons for agents |
31
35
  | [`pai list`](list.md) | List the markdown session notes |
32
36
  | [`pai ls`](ls.md) | List sessions, newest first |
33
37
  | [`pai mcp`](mcp.md) | Install the PAI tools for Claude Code |
@@ -53,6 +57,7 @@ Generated reference for every `pai` command. Read any page in the terminal with
53
57
  | [`pai restore`](restore.md) | Restore PAI data from a backup |
54
58
  | [`pai resume`](resume.md) | Open a session by name or id (same as `pai open`) |
55
59
  | [`pai router`](router.md) | Local model router: start, stop, restart, status, run, stats |
60
+ | [`pai rules`](rules.md) | Security rules: list them, lint their fixtures |
56
61
  | [`pai session`](session.md) | Work with sessions: list, open, new, rename |
57
62
  | [`pai sessions`](sessions.md) | Old plural session commands (use `ls` and `session`) |
58
63
  | [`pai setup`](setup.md) | First-time setup: storage, search, hooks, daemon, router |
@@ -71,11 +76,12 @@ Generated reference for every `pai` command. Read any page in the terminal with
71
76
  | Command | Description |
72
77
  |---|---|
73
78
  | `pai audit` | Find out where tokens are being spent |
79
+ | `pai audit scan` | After-the-fact security scan of a session or worker transcript |
74
80
  | `pai audit tokens` | Token-waste report (all checks, or pick one below) |
75
81
  | `pai audit tokens daemon` | What the background service spent |
76
82
  | `pai audit tokens env` | Model and endpoint overrides on running sessions |
77
83
  | `pai audit tokens files` | Token count per memory file |
78
- | `pai audit tokens hooks` | Token cost of every start-up and prompt hook |
84
+ | `pai audit tokens hooks` | Token cost and observed state of every start-up and prompt hook |
79
85
  | `pai audit tokens ladder` | LIVE: first-turn context per configuration step |
80
86
  | `pai audit tokens mcp` | MCP servers: configured, pinned, loaded, used |
81
87
  | `pai audit tokens schedule` | Scheduled jobs that beat the cache lifetime |
@@ -86,7 +92,7 @@ Generated reference for every `pai` command. Read any page in the terminal with
86
92
  | `pai audit tokens usage` | Exact token totals per model for one session transcript |
87
93
  | `pai backup` | Back up the registry, config and Postgres database |
88
94
  | `pai build` | One machine-wide build queue: run, lock, queue, next, doctor |
89
- | `pai build doctor` | Check the project's registered build doors |
95
+ | `pai build doctor` | Check the project's registered build doors and hook events |
90
96
  | `pai build lock` | Same lock as `run`, for a project's door script to call |
91
97
  | `pai build next` | Give a waiting build the next free slot |
92
98
  | `pai build queue` | Show the running and waiting builds and tests |
@@ -126,6 +132,18 @@ Generated reference for every `pai` command. Read any page in the terminal with
126
132
  | `pai doc` | Write the Markdown command reference |
127
133
  | `pai end` | Finish the current session |
128
134
  | `pai find` | Search your prompt history for sessions |
135
+ | `pai git` | Link commits to the session that wrote them |
136
+ | `pai git hook` | Git hook entry points (called by git) |
137
+ | `pai git hook post-commit` | Record the sessions that edited the last commit's files |
138
+ | `pai git notes` | Show the PAI note of a commit |
139
+ | `pai git remove` | Remove the hook and restore the previous one |
140
+ | `pai git setup` | Install the post-commit hook in the current repository |
141
+ | `pai handoff` | Carry a session's work to a new one |
142
+ | `pai handoff export` | Write the brief for a session (default: newest here) |
143
+ | `pai handoff show` | Print a handoff brief |
144
+ | `pai harness` | Sessions PAI can read from agent harnesses (Claude Code, Codex, ...) |
145
+ | `pai harness list` | Each adapter: detected, enabled, session count |
146
+ | `pai harness sessions` | List sessions, newest first |
129
147
  | `pai help` | Explain a command (same as `pai <command> --help`) |
130
148
  | `pai home` | Where PAI keeps its files; move them out of ~/.claude |
131
149
  | `pai home migrate` | Move PAI's home from ~/.claude/pai to ~/.pai |
@@ -150,6 +168,15 @@ Generated reference for every `pai` command. Read any page in the terminal with
150
168
  | `pai kg query` | Look up facts by subject, predicate, object or date |
151
169
  | `pai kg stats` | How many facts and contradictions the graph holds |
152
170
  | `pai launch` | Start Claude Code on a chosen provider (for scripts) |
171
+ | `pai lessons` | Review-gated lessons for agents |
172
+ | `pai lessons add` | Add a candidate lesson |
173
+ | `pai lessons approve` | Approve a candidate |
174
+ | `pai lessons list` | List lessons |
175
+ | `pai lessons promote` | Promote an approved lesson to a project skill |
176
+ | `pai lessons propose` | Add candidates from a transcript |
177
+ | `pai lessons reject` | Reject a candidate |
178
+ | `pai lessons show` | Show one lesson |
179
+ | `pai lessons supersede` | Replace an approved lesson by another approved one |
153
180
  | `pai list` | List the markdown session notes |
154
181
  | `pai ls` | List sessions, newest first |
155
182
  | `pai mcp` | Install the PAI tools for Claude Code |
@@ -292,6 +319,9 @@ Generated reference for every `pai` command. Read any page in the terminal with
292
319
  | `pai router stats` | Token and cache totals per provider and model |
293
320
  | `pai router status` | Show whether the router is running |
294
321
  | `pai router stop` | Stop the router |
322
+ | `pai rules` | Security rules: list them, lint their fixtures |
323
+ | `pai rules lint` | Run every rule's fixtures; exit 1 on a failure or load error |
324
+ | `pai rules list` | Every rule with severity, source and enabled state |
295
325
  | `pai session` | Work with sessions: list, open, new, rename |
296
326
  | `pai session active` | Sessions that were active in the last hour |
297
327
  | `pai session auto-route` | Find out which project the current directory belongs to |
@@ -68,22 +68,24 @@ See also: `pai audit tokens`
68
68
 
69
69
  #### pai audit tokens hooks
70
70
 
71
- Token cost of every start-up and prompt hook
71
+ Token cost and observed state of every start-up and prompt hook
72
72
 
73
73
  ```
74
74
  pai audit tokens hooks [options]
75
75
  ```
76
76
 
77
- Lists each SessionStart and UserPromptSubmit hook. With --run it executes them and measures what each adds to the context; without it nothing is executed.
77
+ Lists each SessionStart and UserPromptSubmit hook with its state: observed (a capture for that event exists in the window), configured (never observed — the hook may silently not be running), or missing-script. With --run it executes them and measures what each adds to the context; without it nothing is executed.
78
78
 
79
79
  | Flag | Type | Default | Description |
80
80
  |---|---|---|---|
81
81
  | `--run` | flag | — | Execute the hooks to measure their output (runs the repository's own hook commands; trusted repositories only) |
82
+ | `--since HOURS` | number | — | Observation window for the state column (default 24h) |
82
83
  | `--json` | flag | — | Print JSON instead of a table |
83
84
 
84
85
  ```sh
85
86
  pai audit tokens hooks
86
87
  pai audit tokens hooks --run
88
+ pai audit tokens hooks --since 48
87
89
  ```
88
90
 
89
91
  See also: `pai audit tokens`
@@ -323,15 +325,44 @@ pai audit tokens ladder --live --model haiku
323
325
 
324
326
  See also: `pai audit tokens`
325
327
 
328
+ ### pai audit scan
329
+
330
+ After-the-fact security scan of a session or worker transcript
331
+
332
+ ```
333
+ pai audit scan [PATH] [options]
334
+ ```
335
+
336
+ Runs the rule set (the same rules the PreToolUse hook enforces, plus two-step sequence rules that only make sense after the fact) over a transcript: single-step rules against every tool call, sequence rules correlated across the run — credential read followed by an outbound call, download followed by execute, injected text followed by a shell call. Findings are grouped by severity; evidence is masked. Exit 1 when a block-severity finding hit.
337
+
338
+ | Argument | Required | Description |
339
+ |---|---|---|
340
+ | `PATH` | no | Transcript .jsonl (default: newest session under ~/.claude/projects) |
341
+
342
+ | Flag | Type | Default | Description |
343
+ |---|---|---|---|
344
+ | `--session ID` | string | — | Scan this Claude Code session's transcript |
345
+ | `--worker ID` | string | — | Scan a worker's transcript (its Claude session, else its event log) |
346
+ | `--json` | flag | — | Print JSON instead of a table |
347
+
348
+ ```sh
349
+ pai audit scan
350
+ pai audit scan --worker w-20260101-abc
351
+ pai audit scan ./session.jsonl --json
352
+ ```
353
+
354
+ See also: `pai rules list`, `pai audit tokens session`
355
+
326
356
  ## Subcommands
327
357
 
328
358
  | Command | Description |
329
359
  |---|---|
330
360
  | `pai audit tokens` | Token-waste report (all checks, or pick one below) |
361
+ | `pai audit scan` | After-the-fact security scan of a session or worker transcript |
331
362
 
332
363
  ## See also
333
364
 
334
- [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
365
+ [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
335
366
 
336
367
  Run `pai help <command>` to read any of these in the terminal.
337
368
 
@@ -25,7 +25,7 @@ See also: `pai restore`
25
25
 
26
26
  ## See also
27
27
 
28
- [`pai audit`](audit.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
28
+ [`pai audit`](audit.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
29
29
 
30
30
  Run `pai help <command>` to read any of these in the terminal.
31
31
 
@@ -101,13 +101,13 @@ See also: `pai build queue`
101
101
 
102
102
  ### pai build doctor
103
103
 
104
- Check the project's registered build doors
104
+ Check the project's registered build doors and hook events
105
105
 
106
106
  ```
107
107
  pai build doctor
108
108
  ```
109
109
 
110
- Reads .pai/builds.yaml above the current directory and flags every door that is missing or never calls `pai build lock`, which would bypass the queue.
110
+ Reads .pai/builds.yaml above the current directory and flags every door that is missing or never calls `pai build lock`, which would bypass the queue. Also prints one line per hook event: observed (a capture proves it ran) or configured-but-never-observed (warning — the hook may silently not be running).
111
111
 
112
112
  ```sh
113
113
  pai build doctor
@@ -140,12 +140,12 @@ pai build watch DIR ID
140
140
  | `pai build lock` | Same lock as `run`, for a project's door script to call |
141
141
  | `pai build queue` | Show the running and waiting builds and tests |
142
142
  | `pai build next` | Give a waiting build the next free slot |
143
- | `pai build doctor` | Check the project's registered build doors |
143
+ | `pai build doctor` | Check the project's registered build doors and hook events |
144
144
  | `pai build watch` | Internal: kill a build tree when its gate process dies |
145
145
 
146
146
  ## See also
147
147
 
148
- [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
148
+ [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
149
149
 
150
150
  Run `pai help <command>` to read any of these in the terminal.
151
151
 
@@ -23,7 +23,7 @@ See also: `pai shell-init`
23
23
 
24
24
  ## See also
25
25
 
26
- [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
26
+ [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
27
27
 
28
28
  Run `pai help <command>` to read any of these in the terminal.
29
29
 
@@ -23,7 +23,7 @@ See also: `pai sessions pause-all`
23
23
 
24
24
  ## See also
25
25
 
26
- [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
26
+ [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
27
27
 
28
28
  Run `pai help <command>` to read any of these in the terminal.
29
29
 
@@ -58,7 +58,7 @@ See also: `pai router status`
58
58
 
59
59
  ## See also
60
60
 
61
- [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
61
+ [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
62
62
 
63
63
  Run `pai help <command>` to read any of these in the terminal.
64
64
 
@@ -242,7 +242,7 @@ See also: `pai config unset`
242
242
 
243
243
  ## See also
244
244
 
245
- [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
245
+ [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai daemon`](daemon.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
246
246
 
247
247
  Run `pai help <command>` to read any of these in the terminal.
248
248
 
@@ -257,7 +257,7 @@ See also: `pai daemon status`
257
257
 
258
258
  ## See also
259
259
 
260
- [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
260
+ [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai db`](db.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
261
261
 
262
262
  Run `pai help <command>` to read any of these in the terminal.
263
263
 
@@ -129,7 +129,7 @@ See also: `pai db schema`
129
129
 
130
130
  ## See also
131
131
 
132
- [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
132
+ [`pai audit`](audit.md) · [`pai backup`](backup.md) · [`pai build`](build.md) · [`pai cd`](cd.md) · [`pai clear-names`](clear-names.md) · [`pai cockpit`](cockpit.md) · [`pai config`](config.md) · [`pai daemon`](daemon.md) · [`pai doc`](doc.md) · [`pai end`](end.md) · [`pai find`](find.md) · [`pai git`](git.md) · [`pai handoff`](handoff.md) · [`pai harness`](harness.md) · [`pai help`](help.md) · [`pai home`](home.md) · [`pai hooks-db`](hooks-db.md) · [`pai identity`](identity.md) · [`pai install`](install.md) · [`pai issue`](issue.md) · [`pai kg`](kg.md) · [`pai launch`](launch.md) · [`pai lessons`](lessons.md) · [`pai list`](list.md) · [`pai ls`](ls.md) · [`pai mcp`](mcp.md) · [`pai memory`](memory.md) · [`pai models`](models.md) · [`pai more`](more.md) · [`pai new`](new.md) · [`pai notes`](notes.md) · [`pai notify`](notify.md) · [`pai observation`](observation.md) · [`pai obsidian`](obsidian.md) · [`pai open`](open.md) · [`pai pane`](pane.md) · [`pai pause`](pause.md) · [`pai plan`](plan.md) · [`pai project`](project.md) · [`pai projects`](projects.md) · [`pai providers`](providers.md) · [`pai queue`](queue.md) · [`pai registry`](registry.md) · [`pai reload`](reload.md) · [`pai rename`](rename.md) · [`pai restore`](restore.md) · [`pai resume`](resume.md) · [`pai router`](router.md) · [`pai rules`](rules.md) · [`pai session`](session.md) · [`pai sessions`](sessions.md) · [`pai setup`](setup.md) · [`pai setups`](setups.md) · [`pai shell-init`](shell-init.md) · [`pai skill`](skill.md) · [`pai task`](task.md) · [`pai tasks`](tasks.md) · [`pai topic`](topic.md) · [`pai update`](update.md) · [`pai worker`](worker.md) · [`pai zettel`](zettel.md)
133
133
 
134
134
  Run `pai help <command>` to read any of these in the terminal.
135
135