@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.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/{aibroker-client-CQPGqLxL.mjs → aibroker-client-CXsyC7A8.mjs} +2 -2
- package/dist/aibroker-client-ChB7gSxV.mjs +3 -0
- package/dist/auto-route-CAlZ5p-h.mjs +11 -0
- package/dist/{auto-route-DUYr57rs.mjs → auto-route-PDOAYszN.mjs} +2 -2
- package/dist/budget-BXmsSBLI.mjs +15 -0
- package/dist/{caller-identity-Bim8JT-D.mjs → caller-identity-DPDSrZE2.mjs} +4 -4
- package/dist/{capacity-CsZMkVyg.mjs → capacity-CThSydrd.mjs} +82 -10
- package/dist/{chain-Dzz6xcKH.mjs → chain-BvdKqRiZ.mjs} +5 -5
- package/dist/cli/index.mjs +2175 -284
- package/dist/{cockpit-actions-BTA1njMO.mjs → cockpit-actions-BgdKB9G3.mjs} +26 -26
- package/dist/{cockpit-actions-BgsiNcUY.mjs → cockpit-actions-DNl0rKfW.mjs} +18 -18
- package/dist/cockpit-memory-CqLPjcWe.mjs +20 -0
- package/dist/config/defaults/config.yaml +24 -1
- package/dist/config/defaults/workers.yaml +2 -0
- package/dist/{config-h5qK3fst.mjs → config-C2dd2SXS.mjs} +2 -2
- package/dist/{config-CST2uq1v.mjs → config-DGV64YJa.mjs} +11 -3
- package/dist/{config-Dv3t7xnT.mjs → config-DHgPx3ER.mjs} +1 -1
- package/dist/{config-DYbyEe4-.mjs → config-SlZ-Z52i.mjs} +3 -2
- package/dist/{controls-OiVVbe-f.mjs → controls-ByrcupcA.mjs} +59 -66
- package/dist/daemon/index.mjs +40 -40
- package/dist/{daemon-C1dycZ3W.mjs → daemon-BjgJyJMP.mjs} +79 -31
- package/dist/daemon-iymy18Ie.mjs +46 -0
- package/dist/daemon-mcp/index.mjs +49 -38
- package/dist/detect-C8nFP-kR.mjs +10 -0
- package/dist/{detect-CHuxFrLy.mjs → detect-DLjeYwnt.mjs} +2 -2
- package/dist/{embed-pass-DtVF2fOV.mjs → embed-pass-DdTMn4DH.mjs} +5 -5
- package/dist/{embedding-gate-B98PK_wz.mjs → embedding-gate-BVQvUmox.mjs} +2 -2
- package/dist/{embedding-gate-CTAk8STe.mjs → embedding-gate-iq0oQEkF.mjs} +3 -3
- package/dist/{endreason-BqyyU7BH.mjs → endreason-BjPom527.mjs} +4 -4
- package/dist/{factory-BV0MQA3T.mjs → factory-CYwa0jYj.mjs} +6 -6
- package/dist/factory-DFwez99M.mjs +9 -0
- package/dist/{fallback-Bj2cyVk_.mjs → fallback-CQ8_CuVu.mjs} +9 -231
- package/dist/{health-kufVIf6i.mjs → health-Bb2U4PNK.mjs} +5 -5
- package/dist/{helpers-CvbYEKoD.mjs → helpers-Dj2nY56t.mjs} +2 -2
- package/dist/{helpers-WV8tdQHM.mjs → helpers-DyHKAwrW.mjs} +6 -6
- package/dist/hooks/block-sleep-poll.mjs +9 -0
- package/dist/hooks/capture-all-events.mjs +99 -3
- package/dist/hooks/capture-tool-output.mjs +99 -3
- package/dist/hooks/handoff-link.mjs +159 -0
- package/dist/hooks/load-project-context.mjs +10 -1
- package/dist/hooks/local-model-hint.mjs +9 -0
- package/dist/hooks/route-agents-to-worker.mjs +9 -0
- package/dist/hooks/security-validator.mjs +940 -92
- package/dist/hooks/supervision-banner.mjs +219 -48
- package/dist/hooks/worker-edit-repair.mjs +9 -0
- package/dist/hooks/worker-guard.mjs +97 -1
- package/dist/hooks/worker-note.mjs +108 -3
- package/dist/hooks/worker-pool-host.mjs +1670 -315
- package/dist/hooks/worker-proxy.mjs +9 -0
- package/dist/hooks/worker-status-line.mjs +251 -70
- package/dist/hooks/worker-supervision.mjs +9 -0
- package/dist/hooks/worker-tool-name-repair.mjs +9 -0
- package/dist/index.mjs +9 -9
- package/dist/{ipc-client-CnYEF31R.mjs → ipc-client-CmagIFLh.mjs} +2 -2
- package/dist/{ipc-client-DN7EvoVo.mjs → ipc-client-DmbSIBUK.mjs} +1 -1
- package/dist/kill-tree-BlPw1vaU.mjs +10 -0
- package/dist/{kill-tree-CcpsRLCZ.mjs → kill-tree-DTmiEb3T.mjs} +8 -8
- package/dist/{launch-DpQPZGsT.mjs → launch-CV6oPHI2.mjs} +3 -3
- package/dist/{launch-UPQBoW2q.mjs → launch-Dy8qQnSD.mjs} +3 -3
- package/dist/{indexer-backend-B2vtFl38.mjs → lessons-CdmqZD0G.mjs} +262 -43
- package/dist/{local-candidate-Cp_bw4kK.mjs → local-candidate-C2FGhf54.mjs} +3 -3
- package/dist/{local-instances-bdCNNSsL.mjs → local-instances-DhF4_sV2.mjs} +2 -2
- package/dist/{local-instances-B-c-CxzP.mjs → local-instances-GgXydQ2P.mjs} +4 -4
- package/dist/{local-tiers-BtdEEe5n.mjs → local-tiers-CqwGUcEn.mjs} +3 -3
- package/dist/{local-tiers-OBqAAfOg.mjs → local-tiers-X_dQfI4Q.mjs} +3 -3
- package/dist/{main-config-ops-BYsK3BxM.mjs → main-config-ops-C_fkINDv.mjs} +3 -3
- package/dist/{main-resolver-CAC3xfZM.mjs → main-resolver-CN_sfG1R.mjs} +18 -18
- package/dist/{migrate-DrA_OwlZ.mjs → migrate-C2z1YmWC.mjs} +2 -2
- package/dist/{model-inventory-BuTpi9a6.mjs → model-inventory-BYNrSTaY.mjs} +13 -13
- package/dist/{models-add-CJx2YAwh.mjs → models-add-Dc7VXmcu.mjs} +38 -38
- package/dist/operator-IrLbk8hy.mjs +7 -0
- package/dist/{operator-DrwWItVt.mjs → operator-lRGvYr3D.mjs} +2 -2
- package/dist/{pai-marker-DLKJ9Yr5.mjs → pai-marker-kA0iM7rP.mjs} +2 -2
- package/dist/{pane-audit-wv9UkyCe.mjs → pane-audit-DUuilP1V.mjs} +13 -23
- package/dist/{paths-DS5VQKoR.mjs → paths-BwfwHOvN.mjs} +4 -4
- package/dist/{paths-DBd78I7Z.mjs → paths-CKGYM0Lb.mjs} +3 -3
- package/dist/{planner-K0mFrCpL.mjs → planner-BDHVUkIM.mjs} +29 -29
- package/dist/{pool-BZ94nFuq.mjs → pool-CFeHGX7q.mjs} +2 -2
- package/dist/{pool-cli-BjYQDfx6.mjs → pool-cli-Bj2TeA-d.mjs} +6 -6
- package/dist/{pool-cli-B1eKySeN.mjs → pool-cli-DOLgPgOM.mjs} +5 -5
- package/dist/{postgres-CBHY5PIi.mjs → postgres-B1B80bcj.mjs} +3 -3
- package/dist/{postgres-C-T5OWer.mjs → postgres-BL5oBBgY.mjs} +3 -3
- package/dist/{project-setup-pIPHZaXf.mjs → project-setup-i5D0xkTn.mjs} +24 -25
- package/dist/{providers-Dzx5GAUI.mjs → providers-BC2Myo_O.mjs} +6 -6
- package/dist/providers-C-mnlH1b.mjs +16 -0
- package/dist/{query-feedback-DN52N9C5.mjs → query-feedback-BWl2HRwN.mjs} +2 -2
- package/dist/registrable-Ct0DKNKS.mjs +9 -0
- package/dist/{registrable-CXBBpUcz.mjs → registrable-D_4qXCnq.mjs} +4 -4
- package/dist/render-CbifCwTb.mjs +2350 -0
- package/dist/render-FB4Fv_fi.mjs +13 -0
- package/dist/root-80ESg6b7.mjs +36 -0
- package/dist/{root-bG48WVpW.mjs → root-B-ZYiEgi.mjs} +10 -10
- package/dist/route-table-DcBZCuco.mjs +15 -0
- package/dist/{router-CQSc3lk3.mjs → router-D2476pOp.mjs} +2 -2
- package/dist/{router-DwHJRgG9.mjs → router-ghujlEFb.mjs} +1 -1
- package/dist/{routing-BlD_tKjW.mjs → routing-CF0wlR-_.mjs} +15 -15
- package/dist/{routing-D27jxj9x.mjs → routing-CJ8ioPl2.mjs} +13 -13
- package/dist/{run-AZVwceiU.mjs → run-CAjfKBQV.mjs} +74 -31
- package/dist/{runtime-paths-WsO9sJFc.mjs → runtime-paths-twfV23YL.mjs} +2 -2
- package/dist/{scan-C3uotg_f.mjs → scan-ew8M6tTH.mjs} +7 -7
- package/dist/{scope-D8HK6vU7.mjs → scope-BRcaPw5D.mjs} +4 -4
- package/dist/session-BmQsXF_a.mjs +35 -0
- package/dist/{session-BAfypQb9.mjs → session-C1JnDXvP.mjs} +28 -28
- package/dist/session-scan-DWCUKhDM.mjs +9 -0
- package/dist/{session-scan-BmnjSReu.mjs → session-scan-DihMibI-.mjs} +6 -6
- package/dist/{session-usage-oycSdiD3.mjs → session-usage-BRIWFYPS.mjs} +3 -3
- package/dist/status-Bj4yVKj0.mjs +6 -0
- package/dist/{status-COtzewKV.mjs → status-DTMT5lyn.mjs} +9 -5
- package/dist/{tool-errors-DXJ70-sr.mjs → tool-errors-BOW2n882.mjs} +2 -2
- package/dist/{tool-errors-B2LnIqR0.mjs → tool-errors-jNJj3Gzm.mjs} +6 -6
- package/dist/{viewer-BgGRqXfD.mjs → viewer-4BU8w_gK.mjs} +16 -14
- package/dist/viewer-D3VEdqhC.mjs +22 -0
- package/dist/{wait-ChpHKJZV.mjs → wait-BindDA5w.mjs} +3 -3
- package/dist/{worker-config-DgdT0iTB.mjs → worker-config-CdPmb4_2.mjs} +54 -103
- package/dist/worker-config-CfV2dgSb.mjs +42 -0
- package/dist/{workers-config-BhZBrR-Q.mjs → workers-config-2VipVOYk.mjs} +2 -2
- package/dist/{worktree-BY--Rgmy.mjs → worktree-7ZS3RBf8.mjs} +175 -9
- package/dist/{zettelkasten-BHVx5zj-.mjs → zettelkasten-BH8AdNh8.mjs} +4 -4
- package/dist/{zettelkasten-LoH9RBiN.mjs → zettelkasten-FFhQFESJ.mjs} +2 -2
- package/docs/commands/README.md +32 -2
- package/docs/commands/audit.md +34 -3
- package/docs/commands/backup.md +1 -1
- package/docs/commands/build.md +4 -4
- package/docs/commands/cd.md +1 -1
- package/docs/commands/clear-names.md +1 -1
- package/docs/commands/cockpit.md +1 -1
- package/docs/commands/config.md +1 -1
- package/docs/commands/daemon.md +1 -1
- package/docs/commands/db.md +1 -1
- package/docs/commands/doc.md +1 -1
- package/docs/commands/end.md +1 -1
- package/docs/commands/find.md +1 -1
- package/docs/commands/git.md +110 -0
- package/docs/commands/handoff.md +70 -0
- package/docs/commands/harness.md +74 -0
- package/docs/commands/help.md +1 -1
- package/docs/commands/home.md +1 -1
- package/docs/commands/hooks-db.md +1 -1
- package/docs/commands/identity.md +1 -1
- package/docs/commands/install.md +1 -1
- package/docs/commands/issue.md +1 -1
- package/docs/commands/kg.md +1 -1
- package/docs/commands/launch.md +1 -1
- package/docs/commands/lessons.md +201 -0
- package/docs/commands/list.md +1 -1
- package/docs/commands/ls.md +1 -1
- package/docs/commands/mcp.md +1 -1
- package/docs/commands/memory.md +1 -1
- package/docs/commands/models.md +1 -1
- package/docs/commands/more.md +1 -1
- package/docs/commands/new.md +1 -1
- package/docs/commands/notes.md +1 -1
- package/docs/commands/notify.md +1 -1
- package/docs/commands/observation.md +1 -1
- package/docs/commands/obsidian.md +1 -1
- package/docs/commands/open.md +1 -1
- package/docs/commands/pane.md +1 -1
- package/docs/commands/pause.md +1 -1
- package/docs/commands/plan.md +1 -1
- package/docs/commands/project.md +1 -1
- package/docs/commands/projects.md +1 -1
- package/docs/commands/providers.md +1 -1
- package/docs/commands/queue.md +1 -1
- package/docs/commands/registry.md +1 -1
- package/docs/commands/reload.md +1 -1
- package/docs/commands/rename.md +1 -1
- package/docs/commands/restore.md +1 -1
- package/docs/commands/resume.md +1 -1
- package/docs/commands/router.md +1 -1
- package/docs/commands/rules.md +70 -0
- package/docs/commands/session.md +1 -1
- package/docs/commands/sessions.md +1 -1
- package/docs/commands/setup.md +1 -1
- package/docs/commands/setups.md +1 -1
- package/docs/commands/shell-init.md +1 -1
- package/docs/commands/skill.md +1 -1
- package/docs/commands/task.md +1 -1
- package/docs/commands/tasks.md +1 -1
- package/docs/commands/topic.md +1 -1
- package/docs/commands/update.md +1 -1
- package/docs/commands/worker.md +1 -1
- package/docs/commands/zettel.md +1 -1
- package/docs/concepts/panes.md +3 -2
- package/gemini-extension.json +1 -1
- package/package.json +2 -2
- package/pai-plugin.json +1 -1
- package/plugins/context-preservation/plugin.json +1 -1
- package/plugins/core/plugin.json +1 -1
- package/plugins/creative/plugin.json +1 -1
- package/plugins/observability/plugin.json +1 -1
- package/plugins/productivity/plugin.json +1 -1
- package/plugins/semantic-search/plugin.json +1 -1
- package/plugins/ui/plugin.json +1 -1
- package/plugins/zettelkasten/plugin.json +1 -1
- package/src/hooks/ts/lib/loop-guard.ts +3 -5
- package/src/hooks/ts/lib/rules/builtin/base64-decode-to-shell.rule.yaml +15 -0
- package/src/hooks/ts/lib/rules/builtin/chmod-world-writable.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/chmod-zero.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/credential-file-read.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/credential-read-then-network.rule.yaml +29 -0
- package/src/hooks/ts/lib/rules/builtin/crontab-persistence.rule.yaml +10 -0
- package/src/hooks/ts/lib/rules/builtin/curl-piped-to-shell.rule.yaml +22 -0
- package/src/hooks/ts/lib/rules/builtin/download-then-execute.rule.yaml +30 -0
- package/src/hooks/ts/lib/rules/builtin/find-root-delete.rule.yaml +14 -0
- package/src/hooks/ts/lib/rules/builtin/git-push-force.rule.yaml +24 -0
- package/src/hooks/ts/lib/rules/builtin/git-push-plus-refspec.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/git-reset-hard.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/injection-then-tool.rule.yaml +30 -0
- package/src/hooks/ts/lib/rules/builtin/instruction-override-disregard.rule.yaml +14 -0
- package/src/hooks/ts/lib/rules/builtin/instruction-override-ignore.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/launchagents-write-persistence.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/launchctl-load-persistence.rule.yaml +10 -0
- package/src/hooks/ts/lib/rules/builtin/reverse-shell-dev-tcp.rule.yaml +14 -0
- package/src/hooks/ts/lib/rules/builtin/reverse-shell-interactive-bash.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-parent.rule.yaml +13 -0
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-relative.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-root.rule.yaml +27 -0
- package/src/hooks/ts/lib/rules/builtin/rm-trailing-tilde.rule.yaml +12 -0
- package/src/hooks/ts/lib/rules/builtin/sudoers-nopasswd.rule.yaml +15 -0
- package/src/hooks/ts/lib/rules/builtin.generated.ts +557 -0
- package/src/hooks/ts/lib/rules/eval.ts +76 -0
- package/src/hooks/ts/lib/rules/lint.ts +108 -0
- package/src/hooks/ts/lib/rules/load.ts +264 -0
- package/src/hooks/ts/lib/rules/types.ts +58 -0
- package/src/hooks/ts/pre-tool-use/security-validator.ts +35 -96
- package/src/hooks/ts/user-prompt/handoff-link.ts +34 -0
- package/dist/aibroker-client-BxzeEHPF.mjs +0 -3
- package/dist/auto-route-DWYK_0i0.mjs +0 -11
- package/dist/budget-DX-VIWGf.mjs +0 -15
- package/dist/cockpit-memory-DIrNs4xr.mjs +0 -20
- package/dist/daemon-ieo0lnpq.mjs +0 -46
- package/dist/detect-C0ZBXqDL.mjs +0 -10
- package/dist/factory-DeASMV7Z.mjs +0 -9
- package/dist/kill-tree-CXZ0WfVf.mjs +0 -10
- package/dist/operator-Bpxq_WB5.mjs +0 -7
- package/dist/providers-QJzpaNhX.mjs +0 -16
- package/dist/registrable-Drn8wIDO.mjs +0 -9
- package/dist/render-C4KR8qQ8.mjs +0 -13
- package/dist/render-Cz3BWIBO.mjs +0 -903
- package/dist/root-Bfb1zgwE.mjs +0 -36
- package/dist/route-table-ZVMNBsy7.mjs +0 -15
- package/dist/session-BcnhepLZ.mjs +0 -35
- package/dist/session-scan-CqUQdCac.mjs +0 -9
- package/dist/status-D_SWmOlH.mjs +0 -6
- package/dist/viewer-CbGN2Ri4.mjs +0 -22
- package/dist/worker-config-D1KVAMp4.mjs +0 -42
package/dist/daemon/index.mjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "../utils-J2b9y8PC.mjs";
|
|
3
|
-
import "../migrate-
|
|
4
|
-
import "../config-
|
|
5
|
-
import { a as ensureConfigDir, c as loadConfig } from "../config-
|
|
6
|
-
import "../paths-
|
|
7
|
-
import "../worktree-
|
|
8
|
-
import "../status-
|
|
9
|
-
import "../pool-
|
|
10
|
-
import "../registrable-
|
|
11
|
-
import "../pai-marker-
|
|
3
|
+
import "../migrate-C2z1YmWC.mjs";
|
|
4
|
+
import "../config-DGV64YJa.mjs";
|
|
5
|
+
import { a as ensureConfigDir, c as loadConfig } from "../config-SlZ-Z52i.mjs";
|
|
6
|
+
import "../paths-BwfwHOvN.mjs";
|
|
7
|
+
import "../worktree-7ZS3RBf8.mjs";
|
|
8
|
+
import "../status-DTMT5lyn.mjs";
|
|
9
|
+
import "../pool-CFeHGX7q.mjs";
|
|
10
|
+
import "../registrable-D_4qXCnq.mjs";
|
|
11
|
+
import "../pai-marker-kA0iM7rP.mjs";
|
|
12
12
|
import "../helpers-CRuBUas3.mjs";
|
|
13
13
|
import "../reranker-CqCbpGnX.mjs";
|
|
14
14
|
import { t as dropItermBundleId } from "../env-BE8mrsxr.mjs";
|
|
15
|
-
import "../scope-
|
|
16
|
-
import "../routing-
|
|
17
|
-
import "../tool-errors-
|
|
18
|
-
import "../wait-
|
|
19
|
-
import "../local-tiers-
|
|
20
|
-
import "../caller-identity-
|
|
21
|
-
import "../capacity-
|
|
22
|
-
import "../local-instances-
|
|
23
|
-
import "../local-candidate-
|
|
24
|
-
import "../factory-
|
|
25
|
-
import "../postgres-
|
|
26
|
-
import "../embedding-gate-
|
|
15
|
+
import "../scope-BRcaPw5D.mjs";
|
|
16
|
+
import "../routing-CF0wlR-_.mjs";
|
|
17
|
+
import "../tool-errors-BOW2n882.mjs";
|
|
18
|
+
import "../wait-BindDA5w.mjs";
|
|
19
|
+
import "../local-tiers-CqwGUcEn.mjs";
|
|
20
|
+
import "../caller-identity-DPDSrZE2.mjs";
|
|
21
|
+
import "../capacity-CThSydrd.mjs";
|
|
22
|
+
import "../local-instances-DhF4_sV2.mjs";
|
|
23
|
+
import "../local-candidate-C2FGhf54.mjs";
|
|
24
|
+
import "../factory-CYwa0jYj.mjs";
|
|
25
|
+
import "../postgres-BL5oBBgY.mjs";
|
|
26
|
+
import "../embedding-gate-iq0oQEkF.mjs";
|
|
27
27
|
import "../embeddings-BVq3esBF.mjs";
|
|
28
|
-
import "../router-
|
|
29
|
-
import "../detect-
|
|
30
|
-
import "../scan-
|
|
31
|
-
import "../launch-
|
|
32
|
-
import "../run-
|
|
33
|
-
import "../controls-
|
|
34
|
-
import "../endreason-
|
|
35
|
-
import "../render-
|
|
36
|
-
import "../operator-
|
|
37
|
-
import "../kill-tree-
|
|
38
|
-
import "../pool-cli-
|
|
39
|
-
import "../pane-audit-
|
|
40
|
-
import { n as PaiClient } from "../ipc-client-
|
|
41
|
-
import "../embed-pass-
|
|
42
|
-
import "../session-usage-
|
|
43
|
-
import "../
|
|
44
|
-
import { t as serve } from "../daemon-
|
|
45
|
-
import "../auto-route-
|
|
46
|
-
import "../zettelkasten-
|
|
28
|
+
import "../router-D2476pOp.mjs";
|
|
29
|
+
import "../detect-DLjeYwnt.mjs";
|
|
30
|
+
import "../scan-ew8M6tTH.mjs";
|
|
31
|
+
import "../launch-CV6oPHI2.mjs";
|
|
32
|
+
import "../run-CAjfKBQV.mjs";
|
|
33
|
+
import "../controls-ByrcupcA.mjs";
|
|
34
|
+
import "../endreason-BjPom527.mjs";
|
|
35
|
+
import "../render-CbifCwTb.mjs";
|
|
36
|
+
import "../operator-lRGvYr3D.mjs";
|
|
37
|
+
import "../kill-tree-DTmiEb3T.mjs";
|
|
38
|
+
import "../pool-cli-DOLgPgOM.mjs";
|
|
39
|
+
import "../pane-audit-DUuilP1V.mjs";
|
|
40
|
+
import { n as PaiClient } from "../ipc-client-CmagIFLh.mjs";
|
|
41
|
+
import "../embed-pass-DdTMn4DH.mjs";
|
|
42
|
+
import "../session-usage-BRIWFYPS.mjs";
|
|
43
|
+
import "../lessons-CdmqZD0G.mjs";
|
|
44
|
+
import { t as serve } from "../daemon-BjgJyJMP.mjs";
|
|
45
|
+
import "../auto-route-PDOAYszN.mjs";
|
|
46
|
+
import "../zettelkasten-FFhQFESJ.mjs";
|
|
47
47
|
|
|
48
48
|
//#region src/daemon/index.ts
|
|
49
49
|
/**
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as paiHomePath } from "./runtime-paths-twfV23YL.mjs";
|
|
2
2
|
import { t as writeFileAtomic } from "./atomic-file-BorMa4T3.mjs";
|
|
3
|
-
import { Et as appendLedger, M as readWorkersSection, t as ANTHROPIC_NATIVE } from "./config-
|
|
4
|
-
import { f as readMainConfigRaw, i as defaults, p as writeMainConfigRaw, u as paiConfigFilePath, y as shippedMainDefaults } from "./config-
|
|
5
|
-
import { c as slotCurrentPath, i as ledgerPath, r as eventsPath, u as workersLogDir } from "./paths-
|
|
6
|
-
import { f as gcWorktreesThrottled, w as worktreesDir } from "./worktree-
|
|
7
|
-
import { B as
|
|
8
|
-
import { a as unregistrableReason } from "./registrable-
|
|
3
|
+
import { Et as appendLedger, M as readWorkersSection, t as ANTHROPIC_NATIVE } from "./config-DGV64YJa.mjs";
|
|
4
|
+
import { f as readMainConfigRaw, i as defaults, p as writeMainConfigRaw, u as paiConfigFilePath, y as shippedMainDefaults } from "./config-SlZ-Z52i.mjs";
|
|
5
|
+
import { c as slotCurrentPath, i as ledgerPath, r as eventsPath, u as workersLogDir } from "./paths-BwfwHOvN.mjs";
|
|
6
|
+
import { f as gcWorktreesThrottled, w as worktreesDir } from "./worktree-7ZS3RBf8.mjs";
|
|
7
|
+
import { B as listStale, C as nowStamp, K as writeSectionToForge, L as PROJECT_CONFIG_REL, R as formatStale, V as loadStatusConfig, b as loadStatusesCached, h as isChatPane, k as saveStatus, s as alive, v as loadStatus } from "./status-DTMT5lyn.mjs";
|
|
8
|
+
import { a as unregistrableReason } from "./registrable-D_4qXCnq.mjs";
|
|
9
9
|
import { c as yieldToEventLoop, f as fileContentHash, l as buildOutline, n as chunkId, u as chunkMarkdown } from "./helpers-CRuBUas3.mjs";
|
|
10
10
|
import { n as TITLE_STOP_WORDS, t as STOP_WORDS } from "./stop-words-DSEYQdNe.mjs";
|
|
11
11
|
import { i as populateSlugs, t as applyRecencyBoost } from "./search-RSyeQqj1.mjs";
|
|
12
12
|
import { n as rerankResults } from "./reranker-CqCbpGnX.mjs";
|
|
13
|
-
import { i as itermUuid, r as itermForClaudeSession } from "./scope-
|
|
14
|
-
import { Tn as startLocalStatusRefresh, st as startInventoryRefresh } from "./routing-
|
|
13
|
+
import { i as itermUuid, r as itermForClaudeSession } from "./scope-BRcaPw5D.mjs";
|
|
14
|
+
import { Tn as startLocalStatusRefresh, st as startInventoryRefresh } from "./routing-CF0wlR-_.mjs";
|
|
15
15
|
import { n as minOf, t as maxOf } from "./min-max-DrSRUaWQ.mjs";
|
|
16
|
-
import { C as toolErrorSigTag, S as summarizeToolInput, T as toolErrorText, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, s as benignNote, u as detectRunningWorkerErrors, w as toolErrorSummary } from "./tool-errors-
|
|
17
|
-
import { b as killProcessTree } from "./wait-
|
|
18
|
-
import { a as buildsDir, b as stallMinutes, c as listBuilds, l as listBuildsSync, u as patchTicket } from "./caller-identity-
|
|
16
|
+
import { C as toolErrorSigTag, S as summarizeToolInput, T as toolErrorText, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, s as benignNote, u as detectRunningWorkerErrors, w as toolErrorSummary } from "./tool-errors-BOW2n882.mjs";
|
|
17
|
+
import { b as killProcessTree } from "./wait-BindDA5w.mjs";
|
|
18
|
+
import { a as buildsDir, b as stallMinutes, c as listBuilds, l as listBuildsSync, u as patchTicket } from "./caller-identity-DPDSrZE2.mjs";
|
|
19
19
|
import { t as LOCAL_PROBE_TIMEOUT_MS } from "./timeouts-1MLooEBB.mjs";
|
|
20
|
-
import { d as getBackendOutage, n as createRegistryBackend, r as createStorageBackend } from "./factory-
|
|
21
|
-
import { c as resolveFromModule, n as embedChunksWithBackend } from "./postgres-
|
|
22
|
-
import { a as requireQueryEmbedding, c as getConfiguredBackend, h as mismatchReason, m as bindingMatches, n as embedQuery } from "./embedding-gate-
|
|
20
|
+
import { d as getBackendOutage, n as createRegistryBackend, r as createStorageBackend } from "./factory-CYwa0jYj.mjs";
|
|
21
|
+
import { c as resolveFromModule, n as embedChunksWithBackend } from "./postgres-BL5oBBgY.mjs";
|
|
22
|
+
import { a as requireQueryEmbedding, c as getConfiguredBackend, h as mismatchReason, m as bindingMatches, n as embedQuery } from "./embedding-gate-iq0oQEkF.mjs";
|
|
23
23
|
import { i as deserializeEmbedding, n as configureEmbeddingModel, r as cosineSimilarity$1 } from "./embeddings-BVq3esBF.mjs";
|
|
24
|
-
import { n as routeNotification } from "./router-
|
|
25
|
-
import { r as formatDetectionJson, t as detectProject } from "./detect-
|
|
26
|
-
import { i as performScan } from "./scan-
|
|
27
|
-
import { r as sendToSession, t as callAiBroker } from "./aibroker-client-
|
|
28
|
-
import { E as probeRouter, F as startHandover, M as routerSwapArgs, N as runRouterTick, O as routerIsStale, P as spawnRouter, j as routerRunningPid, l as runMessenger, t as runWorker } from "./run-
|
|
29
|
-
import { a as localIdleTick, et as closeEndedPanes, g as sweepRuns, gt as workerEnded, pt as paneMayClose, st as loadRegistry
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
24
|
+
import { n as routeNotification } from "./router-D2476pOp.mjs";
|
|
25
|
+
import { r as formatDetectionJson, t as detectProject } from "./detect-DLjeYwnt.mjs";
|
|
26
|
+
import { i as performScan } from "./scan-ew8M6tTH.mjs";
|
|
27
|
+
import { r as sendToSession, t as callAiBroker } from "./aibroker-client-CXsyC7A8.mjs";
|
|
28
|
+
import { E as probeRouter, F as startHandover, M as routerSwapArgs, N as runRouterTick, O as routerIsStale, P as spawnRouter, j as routerRunningPid, l as runMessenger, t as runWorker } from "./run-CAjfKBQV.mjs";
|
|
29
|
+
import { a as localIdleTick, et as closeEndedPanes, g as sweepRuns, gt as workerEnded, pt as paneMayClose, st as loadRegistry } from "./controls-ByrcupcA.mjs";
|
|
30
|
+
import { X as truncateLines } from "./render-CbifCwTb.mjs";
|
|
31
|
+
import { l as isPaneRunId, n as auditTick, r as closeFinishedPanes } from "./pane-audit-DUuilP1V.mjs";
|
|
32
|
+
import { a as EMBED_PASS_BATCH_SIZE, c as liveYieldCheck, d as runEmbedCycle, i as DEFAULT_EMBED_RESUME_MINUTES, n as DEFAULT_EMBED_MAX_LOAD, r as DEFAULT_EMBED_MAX_MINUTES, t as DEFAULT_EMBED_CYCLE_MAX_MINUTES, u as recordEmbedPass } from "./embed-pass-DdTMn4DH.mjs";
|
|
33
|
+
import { o as logWorkersConfigShadowsOnce } from "./session-usage-BRIWFYPS.mjs";
|
|
34
|
+
import { $ as setIndexSchedulerTimer, A as getGitContext, B as lastEmbedPass, Bt as registerQuietRunner, C as hasPendingOrProcessingOfType, Dt as vaultIndexEnabled, E as markFailed, Et as obsidianEnabled, F as daemonConfig, G as notificationConfig, H as lastIndexPass, I as embedInProgress, It as deferIfQuiet, J as setCacheKeepaliveTimer, Jt as writeContextHandoverCache, K as passFailures, Kt as writeDaemonPidfile, L as embedSchedulerTimer, Mt as sweepOrphans, N as spawnSummarizer, O as contentToText$2, Ot as buildWakeupContext, P as cacheKeepaliveTimer, Pt as runSessionKeepaliveTick, Q as setIndexInProgress, R as indexInProgress, S as getStats, St as findNotesDir, T as markCompleted, Tt as lessonsIndexEnabled, U as lastIndexTime, V as lastEmbedTime, Vt as startQuietWatcher, W as lastVaultIndexTime, Wt as removeDaemonPidfile, X as setEmbedInProgress, Y as setDaemonConfig, Z as setEmbedSchedulerTimer, _ as NonRetryableError, _t as addWorkToSessionNote, a as lessonsDir, at as setNotificationConfig, b as enqueue, bt as getCurrentNotePath, ct as setStartTime, d as buildPassCommand, dt as shutdownRequested, en as restartRouter, et as setLastEmbedPass, f as cliEntry, ft as startTime, gt as updateTodoContinue, h as backfillKgFromNotes, ht as sessionIdFromTranscript, i as getLesson, it as setLastVaultIndexTime, j as handleSessionSummary, k as findLatestJsonl, lt as setStorageBackend, m as runPassChild, mt as vaultIndexInProgress, n as LESSON_STATES, nt as setLastIndexPass, o as listLessons, ot as setRegistryBackend, pt as storageBackend, q as registryBackend, qt as readContextHandoverCache, rt as setLastIndexTime, st as setShutdownRequested, tt as setLastEmbedTime, u as PassSpawnError, ut as setVaultIndexInProgress, v as cleanup, vt as appendCheckpoint, w as loadQueue, x as enqueueCoalesced, xt as archiveSessionFilesToSessionsDir, y as dequeue, yt as finalizeSessionNote, z as indexSchedulerTimer } from "./lessons-CdmqZD0G.mjs";
|
|
35
|
+
import { r as saveQueryResult } from "./query-feedback-BWl2HRwN.mjs";
|
|
36
|
+
import { n as formatAutoRouteJson, r as detectTopicShift, t as autoRoute } from "./auto-route-PDOAYszN.mjs";
|
|
37
|
+
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";
|
|
37
38
|
import { appendFileSync, chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, statSync, unlinkSync, utimesSync, writeFileSync } from "node:fs";
|
|
38
39
|
import { basename, dirname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
|
|
39
40
|
import { setPriority } from "node:os";
|
|
@@ -735,12 +736,12 @@ async function checkLoops(logDir, statuses, sent, deps = {}) {
|
|
|
735
736
|
throw err;
|
|
736
737
|
}
|
|
737
738
|
}, say = async (logDir, id, text) => {
|
|
738
|
-
const { sayToWorker } = await import("./operator-
|
|
739
|
+
const { sayToWorker } = await import("./operator-IrLbk8hy.mjs");
|
|
739
740
|
return sayToWorker(logDir, id, text);
|
|
740
741
|
}, kill = (pid) => {
|
|
741
742
|
process.kill(pid, "SIGTERM");
|
|
742
743
|
}, killChildren = async (logDir, id) => {
|
|
743
|
-
const { killTree } = await import("./kill-tree-
|
|
744
|
+
const { killTree } = await import("./kill-tree-BlPw1vaU.mjs");
|
|
744
745
|
return killTree(logDir, id, {
|
|
745
746
|
skipRoot: true,
|
|
746
747
|
by: "loop-guard",
|
|
@@ -2824,11 +2825,24 @@ async function runIndex() {
|
|
|
2824
2825
|
setIndexInProgress(false);
|
|
2825
2826
|
}
|
|
2826
2827
|
}
|
|
2828
|
+
/** Synthetic project id of the lessons chunks (the vault uses 999 when unregistered). */
|
|
2829
|
+
const LESSONS_PROJECT_ID = 998;
|
|
2830
|
+
/** Index `<PAI home>/lessons` so memory search finds approved and candidate lessons. */
|
|
2831
|
+
async function runLessonsIndex() {
|
|
2832
|
+
const dir = lessonsDir();
|
|
2833
|
+
if (!lessonsIndexEnabled() || !existsSync(dir)) return;
|
|
2834
|
+
try {
|
|
2835
|
+
await indexVault(storageBackend, LESSONS_PROJECT_ID, dir);
|
|
2836
|
+
} catch (e) {
|
|
2837
|
+
process.stderr.write(`[pai-daemon] Lessons index error: ${e instanceof Error ? e.message : String(e)}\n`);
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2827
2840
|
/**
|
|
2828
2841
|
* Run a vault index pass. Guards against overlapping runs with vaultIndexInProgress.
|
|
2829
2842
|
* Skips if no vaultPath is configured, or if project index/embed is in progress.
|
|
2830
2843
|
*/
|
|
2831
2844
|
async function runVaultIndex() {
|
|
2845
|
+
await runLessonsIndex();
|
|
2832
2846
|
if (!daemonConfig.vaultPath || !vaultIndexEnabled()) return;
|
|
2833
2847
|
if (vaultIndexInProgress) {
|
|
2834
2848
|
process.stderr.write("[pai-daemon] Vault index already in progress, skipping.\n");
|
|
@@ -4860,6 +4874,39 @@ async function toolMemoryWakeup(registry, params) {
|
|
|
4860
4874
|
}
|
|
4861
4875
|
}
|
|
4862
4876
|
|
|
4877
|
+
//#endregion
|
|
4878
|
+
//#region src/mcp/tools/lessons.ts
|
|
4879
|
+
/**
|
|
4880
|
+
* MCP tool handler: memory_lessons
|
|
4881
|
+
*
|
|
4882
|
+
* Read-only access to the review-gated lessons; approved ones by default.
|
|
4883
|
+
*/
|
|
4884
|
+
const text = (t, isError = false) => ({
|
|
4885
|
+
content: [{
|
|
4886
|
+
type: "text",
|
|
4887
|
+
text: t
|
|
4888
|
+
}],
|
|
4889
|
+
...isError ? { isError } : {}
|
|
4890
|
+
});
|
|
4891
|
+
async function toolMemoryLessons(params) {
|
|
4892
|
+
try {
|
|
4893
|
+
if (params.action === "get") {
|
|
4894
|
+
if (!params.id) return text("id is required for action=get", true);
|
|
4895
|
+
const l = getLesson(params.id);
|
|
4896
|
+
return l ? text(JSON.stringify(l, null, 2)) : text(`Lesson not found: ${params.id}`, true);
|
|
4897
|
+
}
|
|
4898
|
+
const state = params.state ?? "approved";
|
|
4899
|
+
if (!LESSON_STATES.includes(state)) return text(`Unknown state: ${state}`, true);
|
|
4900
|
+
const ls = listLessons({
|
|
4901
|
+
state,
|
|
4902
|
+
project: params.project
|
|
4903
|
+
});
|
|
4904
|
+
return text(ls.length ? JSON.stringify(ls, null, 2) : `No ${state} lessons.`);
|
|
4905
|
+
} catch (e) {
|
|
4906
|
+
return text(`memory_lessons error: ${e instanceof Error ? e.message : String(e)}`, true);
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4909
|
+
|
|
4863
4910
|
//#endregion
|
|
4864
4911
|
//#region src/memory/taxonomy.ts
|
|
4865
4912
|
/**
|
|
@@ -6026,6 +6073,7 @@ async function dispatchTool(method, params) {
|
|
|
6026
6073
|
case "project_health": return toolProjectHealth(registryBackend, p);
|
|
6027
6074
|
case "project_todo": return toolProjectTodo(registryBackend, p);
|
|
6028
6075
|
case "memory_wakeup": return toolMemoryWakeup(registryBackend, p);
|
|
6076
|
+
case "memory_lessons": return toolMemoryLessons(p);
|
|
6029
6077
|
case "memory_taxonomy": return toolMemoryTaxonomy(registryBackend, storageBackend, p);
|
|
6030
6078
|
case "topic_check": return detectTopicShift(registryBackend, storageBackend, p);
|
|
6031
6079
|
case "session_auto_route": return toolSessionRoute(registryBackend, storageBackend, p);
|
|
@@ -6870,4 +6918,4 @@ async function serve(config) {
|
|
|
6870
6918
|
|
|
6871
6919
|
//#endregion
|
|
6872
6920
|
export { serve as t };
|
|
6873
|
-
//# sourceMappingURL=daemon-
|
|
6921
|
+
//# sourceMappingURL=daemon-BjgJyJMP.mjs.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import "./utils-J2b9y8PC.mjs";
|
|
2
|
+
import "./migrate-C2z1YmWC.mjs";
|
|
3
|
+
import "./config-DGV64YJa.mjs";
|
|
4
|
+
import "./config-SlZ-Z52i.mjs";
|
|
5
|
+
import "./paths-BwfwHOvN.mjs";
|
|
6
|
+
import "./worktree-7ZS3RBf8.mjs";
|
|
7
|
+
import "./status-DTMT5lyn.mjs";
|
|
8
|
+
import "./pool-CFeHGX7q.mjs";
|
|
9
|
+
import "./registrable-D_4qXCnq.mjs";
|
|
10
|
+
import "./pai-marker-kA0iM7rP.mjs";
|
|
11
|
+
import "./helpers-CRuBUas3.mjs";
|
|
12
|
+
import "./reranker-CqCbpGnX.mjs";
|
|
13
|
+
import "./scope-BRcaPw5D.mjs";
|
|
14
|
+
import "./routing-CF0wlR-_.mjs";
|
|
15
|
+
import "./tool-errors-BOW2n882.mjs";
|
|
16
|
+
import "./wait-BindDA5w.mjs";
|
|
17
|
+
import "./local-tiers-CqwGUcEn.mjs";
|
|
18
|
+
import "./caller-identity-DPDSrZE2.mjs";
|
|
19
|
+
import "./capacity-CThSydrd.mjs";
|
|
20
|
+
import "./local-instances-DhF4_sV2.mjs";
|
|
21
|
+
import "./local-candidate-C2FGhf54.mjs";
|
|
22
|
+
import "./factory-CYwa0jYj.mjs";
|
|
23
|
+
import "./postgres-BL5oBBgY.mjs";
|
|
24
|
+
import "./embedding-gate-iq0oQEkF.mjs";
|
|
25
|
+
import "./embeddings-BVq3esBF.mjs";
|
|
26
|
+
import "./router-D2476pOp.mjs";
|
|
27
|
+
import "./detect-DLjeYwnt.mjs";
|
|
28
|
+
import "./scan-ew8M6tTH.mjs";
|
|
29
|
+
import "./launch-CV6oPHI2.mjs";
|
|
30
|
+
import "./run-CAjfKBQV.mjs";
|
|
31
|
+
import "./controls-ByrcupcA.mjs";
|
|
32
|
+
import "./endreason-BjPom527.mjs";
|
|
33
|
+
import "./render-CbifCwTb.mjs";
|
|
34
|
+
import "./operator-lRGvYr3D.mjs";
|
|
35
|
+
import "./kill-tree-DTmiEb3T.mjs";
|
|
36
|
+
import "./pool-cli-DOLgPgOM.mjs";
|
|
37
|
+
import "./pane-audit-DUuilP1V.mjs";
|
|
38
|
+
import "./ipc-client-CmagIFLh.mjs";
|
|
39
|
+
import "./embed-pass-DdTMn4DH.mjs";
|
|
40
|
+
import "./session-usage-BRIWFYPS.mjs";
|
|
41
|
+
import "./lessons-CdmqZD0G.mjs";
|
|
42
|
+
import { t as serve } from "./daemon-BjgJyJMP.mjs";
|
|
43
|
+
import "./auto-route-PDOAYszN.mjs";
|
|
44
|
+
import "./zettelkasten-FFhQFESJ.mjs";
|
|
45
|
+
|
|
46
|
+
export { serve };
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "../utils-J2b9y8PC.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { Dt as ledgerSummary, M as readWorkersSection, a as MODEL_CAPABILITIES, f as escalationCloud, m as isLocalProvider, n as CAPABILITY_NAME_RE, p as getProviderOrNative } from "../config-
|
|
5
|
-
import { S as MainConfigError, c as loadConfig, n as CONFIG_FILE } from "../config-
|
|
6
|
-
import { i as ledgerPath, u as workersLogDir } from "../paths-
|
|
7
|
-
import "../worktree-
|
|
8
|
-
import {
|
|
9
|
-
import "../pool-
|
|
3
|
+
import { _ as paiHomePath } from "../runtime-paths-twfV23YL.mjs";
|
|
4
|
+
import { Dt as ledgerSummary, M as readWorkersSection, a as MODEL_CAPABILITIES, f as escalationCloud, m as isLocalProvider, n as CAPABILITY_NAME_RE, p as getProviderOrNative } from "../config-DGV64YJa.mjs";
|
|
5
|
+
import { S as MainConfigError, c as loadConfig, n as CONFIG_FILE } from "../config-SlZ-Z52i.mjs";
|
|
6
|
+
import { i as ledgerPath, u as workersLogDir } from "../paths-BwfwHOvN.mjs";
|
|
7
|
+
import "../worktree-7ZS3RBf8.mjs";
|
|
8
|
+
import { C as nowStamp, O as reconcileStatuses, g as isLive, j as setWorkerLabel, o as ageOf, v as loadStatus, y as loadStatuses } from "../status-DTMT5lyn.mjs";
|
|
9
|
+
import "../pool-CFeHGX7q.mjs";
|
|
10
10
|
import "../helpers-CRuBUas3.mjs";
|
|
11
11
|
import { t as dropItermBundleId } from "../env-BE8mrsxr.mjs";
|
|
12
|
-
import "../scope-
|
|
13
|
-
import { Ft as clearSessionRoute, J as inventoryRows, Kt as sessionRoutesPatch, W as currentInventory, _n as currentLocalStatus, cn as detectSessionName, dn as getProfile, fn as profilesPath, mn as updateProfile, xn as probeLoopback, z as INVENTORY_HEADERS } from "../routing-
|
|
14
|
-
import "../tool-errors-
|
|
15
|
-
import "../wait-
|
|
16
|
-
import "../local-tiers-
|
|
17
|
-
import { a as buildsDir, c as listBuilds, i as buildNext, p as renderBuildQueue, v as poolSlots } from "../caller-identity-
|
|
18
|
-
import { i as effectiveCap,
|
|
19
|
-
import "../local-instances-
|
|
20
|
-
import { a as localStatusReport } from "../local-candidate-
|
|
21
|
-
import "../factory-
|
|
22
|
-
import "../postgres-
|
|
23
|
-
import "../embedding-gate-
|
|
12
|
+
import "../scope-BRcaPw5D.mjs";
|
|
13
|
+
import { Ft as clearSessionRoute, J as inventoryRows, Kt as sessionRoutesPatch, W as currentInventory, _n as currentLocalStatus, cn as detectSessionName, dn as getProfile, fn as profilesPath, mn as updateProfile, xn as probeLoopback, z as INVENTORY_HEADERS } from "../routing-CF0wlR-_.mjs";
|
|
14
|
+
import "../tool-errors-BOW2n882.mjs";
|
|
15
|
+
import "../wait-BindDA5w.mjs";
|
|
16
|
+
import "../local-tiers-CqwGUcEn.mjs";
|
|
17
|
+
import { a as buildsDir, c as listBuilds, i as buildNext, p as renderBuildQueue, v as poolSlots } from "../caller-identity-DPDSrZE2.mjs";
|
|
18
|
+
import { i as effectiveCap, p as reorderQueue, s as queueRows } from "../capacity-CThSydrd.mjs";
|
|
19
|
+
import "../local-instances-DhF4_sV2.mjs";
|
|
20
|
+
import { a as localStatusReport } from "../local-candidate-C2FGhf54.mjs";
|
|
21
|
+
import "../factory-CYwa0jYj.mjs";
|
|
22
|
+
import "../postgres-BL5oBBgY.mjs";
|
|
23
|
+
import "../embedding-gate-iq0oQEkF.mjs";
|
|
24
24
|
import "../embeddings-BVq3esBF.mjs";
|
|
25
|
-
import "../router-
|
|
26
|
-
import "../launch-
|
|
27
|
-
import { H as testProvider, a as resolveWorkers, c as reportOriginWithHost, f as dirtyPaths, i as liveResolveCtx, t as runWorker, u as startDetached } from "../run-
|
|
28
|
-
import { A as tail, B as loadPlanStatus, C as readRunLog, D as resumeState, E as requestPlanStop, F as runLogPath, G as planRunId,
|
|
29
|
-
import { a as endLabel } from "../endreason-
|
|
30
|
-
import { D as deadlineLabel } from "../render-
|
|
31
|
-
import { r as sayToWorker } from "../operator-
|
|
32
|
-
import "../kill-tree-
|
|
33
|
-
import "../pool-cli-
|
|
34
|
-
import { t as runChain } from "../chain-
|
|
35
|
-
import { C as schedulerLines, E as resolveSpecPath, S as withTarget, T as readSpecPrompt, _ as issueClaims, a as branchDiff, d as loadSettings, f as move, g as issueClaim, i as projectChecks, l as QueueStore, n as initProject, o as realQueueDeps, p as queueStatePath, r as isGitProject, s as acceptItems, t as formatCheck, u as again, v as issueStale, w as schedulerView, x as resolveTarget, y as providerCaps } from "../project-setup-
|
|
36
|
-
import "../pane-audit-
|
|
37
|
-
import { d as psOutput, f as replayOutput } from "../viewer-
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import { n as
|
|
25
|
+
import "../router-D2476pOp.mjs";
|
|
26
|
+
import "../launch-CV6oPHI2.mjs";
|
|
27
|
+
import { H as testProvider, a as resolveWorkers, c as reportOriginWithHost, f as dirtyPaths, i as liveResolveCtx, t as runWorker, u as startDetached } from "../run-CAjfKBQV.mjs";
|
|
28
|
+
import { A as tail, B as loadPlanStatus, C as readRunLog, D as resumeState, E as requestPlanStop, F as runLogPath, G as planRunId, Ht as handoffFromInside, J as queueLockPath, L as fmtElapsed, M as dirtyConflicts, P as loadPlan, S as planStopPath, Wt as readInbox, X as sinceText, Y as readRunLock, b as idleText, j as PlanError, q as planLockPath, w as renderSchedule, x as planStatus } from "../controls-ByrcupcA.mjs";
|
|
29
|
+
import { a as endLabel } from "../endreason-BjPom527.mjs";
|
|
30
|
+
import { D as deadlineLabel } from "../render-CbifCwTb.mjs";
|
|
31
|
+
import { r as sayToWorker } from "../operator-lRGvYr3D.mjs";
|
|
32
|
+
import "../kill-tree-DTmiEb3T.mjs";
|
|
33
|
+
import "../pool-cli-DOLgPgOM.mjs";
|
|
34
|
+
import { t as runChain } from "../chain-BvdKqRiZ.mjs";
|
|
35
|
+
import { C as schedulerLines, E as resolveSpecPath, S as withTarget, T as readSpecPrompt, _ as issueClaims, a as branchDiff, d as loadSettings, f as move, g as issueClaim, i as projectChecks, l as QueueStore, n as initProject, o as realQueueDeps, p as queueStatePath, r as isGitProject, s as acceptItems, t as formatCheck, u as again, v as issueStale, w as schedulerView, x as resolveTarget, y as providerCaps } from "../project-setup-i5D0xkTn.mjs";
|
|
36
|
+
import "../pane-audit-DUuilP1V.mjs";
|
|
37
|
+
import { d as psOutput, f as replayOutput } from "../viewer-4BU8w_gK.mjs";
|
|
38
|
+
import { _ as unsetCapabilityPreference, a as describeCapabilities, b as useProvider, c as modelPrefsText, d as setCapabilityPreference, f as setClass, g as setWorkersEnabled, h as setProviderModel, l as removeProvider, m as setProviderEnabled, o as describeModels, p as setProviderCap, r as classTargetText, s as describeProviders, t as addProvider, u as resolveProviderName, v as unsetClass, y as updateProvider } from "../providers-BC2Myo_O.mjs";
|
|
39
|
+
import { a as listConfigOp, i as getConfigValueOp, o as setConfigValueOp, s as unsetConfigValueOp, t as MainConfigOpsError } from "../main-config-ops-C_fkINDv.mjs";
|
|
40
|
+
import { n as PaiClient } from "../ipc-client-CmagIFLh.mjs";
|
|
41
|
+
import { i as fallbackStatusText, n as fallbackOn, r as fallbackStatus, t as fallbackOff } from "../fallback-CQ8_CuVu.mjs";
|
|
42
42
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
43
43
|
import { basename, dirname, join, resolve } from "node:path";
|
|
44
44
|
import { stringify } from "yaml";
|
|
@@ -6310,7 +6310,7 @@ function workerModel(args, configPath) {
|
|
|
6310
6310
|
* into the session's own terminal through AIBroker.
|
|
6311
6311
|
*/
|
|
6312
6312
|
async function realSessionProfileDeps() {
|
|
6313
|
-
const { sendToSession } = await import("../aibroker-client-
|
|
6313
|
+
const { sendToSession } = await import("../aibroker-client-ChB7gSxV.mjs");
|
|
6314
6314
|
return {
|
|
6315
6315
|
path: profilesPath(),
|
|
6316
6316
|
env: process.env,
|
|
@@ -6582,7 +6582,7 @@ function realDelegationDeps() {
|
|
|
6582
6582
|
return {
|
|
6583
6583
|
async resolveProject(project) {
|
|
6584
6584
|
if (existsSync(project)) return resolve(project);
|
|
6585
|
-
const { getProject } = await import("../helpers-
|
|
6585
|
+
const { getProject } = await import("../helpers-DyHKAwrW.mjs");
|
|
6586
6586
|
const row = await getProject(project);
|
|
6587
6587
|
if (!row) throw new Error(`no project "${project}" is registered`);
|
|
6588
6588
|
return row.root_path;
|
|
@@ -7282,6 +7282,17 @@ async function startShim() {
|
|
|
7282
7282
|
project: string().optional().describe("Project slug or absolute root path. Omit to auto-detect from the current working directory."),
|
|
7283
7283
|
token_budget: number().int().min(100).max(4e3).optional().describe("Maximum tokens for the L1 essential story block. Default: 800 (~3200 chars).")
|
|
7284
7284
|
}, async (args) => proxyTool("memory_wakeup", args));
|
|
7285
|
+
server.tool("memory_lessons", "Read the curated, review-gated lessons (corrections, gotchas, conventions). Lists approved lessons by default; read-only.", {
|
|
7286
|
+
action: _enum(["list", "get"]).describe("list: lessons filtered by state/project; get: one lesson by id."),
|
|
7287
|
+
state: _enum([
|
|
7288
|
+
"candidate",
|
|
7289
|
+
"approved",
|
|
7290
|
+
"rejected",
|
|
7291
|
+
"superseded"
|
|
7292
|
+
]).optional().describe("State filter for list. Default: approved."),
|
|
7293
|
+
project: string().optional().describe("Project slug or \"global\" filter for list."),
|
|
7294
|
+
id: string().optional().describe("Lesson id (required for get).")
|
|
7295
|
+
}, async (args) => proxyTool("memory_lessons", args));
|
|
7285
7296
|
server.tool("memory_taxonomy", [
|
|
7286
7297
|
"Return the SHAPE of stored memory without requiring a search query.",
|
|
7287
7298
|
"",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./config-SlZ-Z52i.mjs";
|
|
2
|
+
import "./helpers-CRuBUas3.mjs";
|
|
3
|
+
import "./factory-CYwa0jYj.mjs";
|
|
4
|
+
import "./postgres-BL5oBBgY.mjs";
|
|
5
|
+
import "./embedding-gate-iq0oQEkF.mjs";
|
|
6
|
+
import "./embeddings-BVq3esBF.mjs";
|
|
7
|
+
import "./router-D2476pOp.mjs";
|
|
8
|
+
import { n as formatDetection, r as formatDetectionJson, t as detectProject } from "./detect-DLjeYwnt.mjs";
|
|
9
|
+
|
|
10
|
+
export { detectProject };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getRegistryBackend } from "./factory-
|
|
1
|
+
import { i as getRegistryBackend } from "./factory-CYwa0jYj.mjs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/impl/detect.ts
|
|
@@ -92,4 +92,4 @@ function formatDetectionJson(d) {
|
|
|
92
92
|
|
|
93
93
|
//#endregion
|
|
94
94
|
export { formatDetection as n, formatDetectionJson as r, detectProject as t };
|
|
95
|
-
//# sourceMappingURL=detect-
|
|
95
|
+
//# sourceMappingURL=detect-DLjeYwnt.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as paiHomePath } from "./runtime-paths-twfV23YL.mjs";
|
|
2
2
|
import { t as writeFileAtomic } from "./atomic-file-BorMa4T3.mjs";
|
|
3
|
-
import { M as readWorkersSection, m as isLocalProvider } from "./config-
|
|
4
|
-
import { u as workersLogDir } from "./paths-
|
|
5
|
-
import { g as isLive, y as loadStatuses } from "./status-
|
|
3
|
+
import { M as readWorkersSection, m as isLocalProvider } from "./config-DGV64YJa.mjs";
|
|
4
|
+
import { u as workersLogDir } from "./paths-BwfwHOvN.mjs";
|
|
5
|
+
import { g as isLive, y as loadStatuses } from "./status-DTMT5lyn.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { loadavg } from "node:os";
|
|
8
8
|
|
|
@@ -161,4 +161,4 @@ async function runEmbedCycle(d) {
|
|
|
161
161
|
|
|
162
162
|
//#endregion
|
|
163
163
|
export { EMBED_PASS_BATCH_SIZE as a, liveYieldCheck as c, runEmbedCycle as d, DEFAULT_EMBED_RESUME_MINUTES as i, readEmbedPasses as l, DEFAULT_EMBED_MAX_LOAD as n, formatEmbedStatus as o, DEFAULT_EMBED_MAX_MINUTES as r, lastRecordedEmbedPass as s, DEFAULT_EMBED_CYCLE_MAX_MINUTES as t, recordEmbedPass as u };
|
|
164
|
-
//# sourceMappingURL=embed-pass-
|
|
164
|
+
//# sourceMappingURL=embed-pass-DdTMn4DH.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import { a as requireQueryEmbedding, i as measureThroughput, n as embedQuery, r as gateBackend, t as QUERY_PREFIX } from "./embedding-gate-
|
|
1
|
+
import "./config-SlZ-Z52i.mjs";
|
|
2
|
+
import { a as requireQueryEmbedding, i as measureThroughput, n as embedQuery, r as gateBackend, t as QUERY_PREFIX } from "./embedding-gate-iq0oQEkF.mjs";
|
|
3
3
|
import "./embeddings-BVq3esBF.mjs";
|
|
4
4
|
|
|
5
5
|
export { embedQuery, gateBackend };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as loadConfig, i as defaults } from "./config-
|
|
1
|
+
import { _ as paiHomePath } from "./runtime-paths-twfV23YL.mjs";
|
|
2
|
+
import { c as loadConfig, i as defaults } from "./config-SlZ-Z52i.mjs";
|
|
3
3
|
import { t as LOCAL_PROBE_TIMEOUT_MS } from "./timeouts-1MLooEBB.mjs";
|
|
4
4
|
import { n as configureEmbeddingModel, o as generateEmbeddings, t as EMBEDDING_DIM } from "./embeddings-BVq3esBF.mjs";
|
|
5
5
|
import { createReadStream, createWriteStream, existsSync, mkdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -420,4 +420,4 @@ async function measureThroughput(backend, texts) {
|
|
|
420
420
|
|
|
421
421
|
//#endregion
|
|
422
422
|
export { requireQueryEmbedding as a, getConfiguredBackend as c, OLLAMA_ID as d, ollamaDefaultUrl as f, mismatchReason as h, measureThroughput as i, provisionOllama as l, bindingMatches as m, embedQuery as n, createBackend as o, LEGACY_EMBEDDING_BINDING as p, gateBackend as r, detectBackends as s, QUERY_PREFIX as t, OLLAMA_DEFAULT_MODEL as u };
|
|
423
|
-
//# sourceMappingURL=embedding-gate-
|
|
423
|
+
//# sourceMappingURL=embedding-gate-iq0oQEkF.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as writeFileAtomic } from "./atomic-file-BorMa4T3.mjs";
|
|
2
|
-
import { Et as appendLedger } from "./config-
|
|
3
|
-
import { r as eventsPath } from "./paths-
|
|
4
|
-
import { D as pidAlive } from "./status-
|
|
2
|
+
import { Et as appendLedger } from "./config-DGV64YJa.mjs";
|
|
3
|
+
import { r as eventsPath } from "./paths-BwfwHOvN.mjs";
|
|
4
|
+
import { D as pidAlive } from "./status-DTMT5lyn.mjs";
|
|
5
5
|
import { appendFileSync, existsSync, readFileSync, unlinkSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { execFileSync } from "node:child_process";
|
|
@@ -151,4 +151,4 @@ function appendStopEvent(logDir, id, stop) {
|
|
|
151
151
|
|
|
152
152
|
//#endregion
|
|
153
153
|
export { endLabel as a, endFields as i, callerDescription as n, parentInfo as o, decideEndReason as r, requestKill as s, appendStopEvent as t };
|
|
154
|
-
//# sourceMappingURL=endreason-
|
|
154
|
+
//# sourceMappingURL=endreason-BjPom527.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { A as DEFAULT_PG_CONNECTION_TIMEOUT_MS, N as postgresConnectionString, c as loadConfig } from "./config-
|
|
1
|
+
import { _ as paiHomePath, d as defaultPaiHomeDir, v as resolvePaiFile } from "./runtime-paths-twfV23YL.mjs";
|
|
2
|
+
import { A as DEFAULT_PG_CONNECTION_TIMEOUT_MS, N as postgresConnectionString, c as loadConfig } from "./config-SlZ-Z52i.mjs";
|
|
3
3
|
import { a as parseSessionTitleChunk, c as yieldToEventLoop, f as fileContentHash, h as sha256File, i as isPathTooBroadForContentScan, n as chunkId, o as walkContentFiles, r as detectTier, s as walkMdFiles, t as INDEX_YIELD_EVERY, u as chunkMarkdown } from "./helpers-CRuBUas3.mjs";
|
|
4
4
|
import { t as STOP_WORDS } from "./stop-words-DSEYQdNe.mjs";
|
|
5
5
|
import { n as buildFtsQuery, r as isQuerySyntaxError } from "./search-RSyeQqj1.mjs";
|
|
6
6
|
import { n as minOf, t as maxOf } from "./min-max-DrSRUaWQ.mjs";
|
|
7
|
-
import { a as entityContentId, t as PostgresBackend } from "./postgres-
|
|
8
|
-
import { p as LEGACY_EMBEDDING_BINDING } from "./embedding-gate-
|
|
7
|
+
import { a as entityContentId, t as PostgresBackend } from "./postgres-BL5oBBgY.mjs";
|
|
8
|
+
import { p as LEGACY_EMBEDDING_BINDING } from "./embedding-gate-iq0oQEkF.mjs";
|
|
9
9
|
import { i as deserializeEmbedding, r as cosineSimilarity } from "./embeddings-BVq3esBF.mjs";
|
|
10
|
-
import { n as routeNotification } from "./router-
|
|
10
|
+
import { n as routeNotification } from "./router-D2476pOp.mjs";
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
|
|
12
12
|
import { basename, dirname, join, relative } from "node:path";
|
|
13
13
|
import pg from "pg";
|
|
@@ -2915,4 +2915,4 @@ async function closeStorage() {
|
|
|
2915
2915
|
|
|
2916
2916
|
//#endregion
|
|
2917
2917
|
export { getStorageBackend as a, MergeError as c, getBackendOutage as d, humanDuration as f, getRegistryBackend as i, federationDbPath as l, createRegistryBackend as n, oldRegistryPath as o, createStorageBackend as r, registryDbPath as s, closeStorage as t, oldFederationPath as u };
|
|
2918
|
-
//# sourceMappingURL=factory-
|
|
2918
|
+
//# sourceMappingURL=factory-CYwa0jYj.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./config-SlZ-Z52i.mjs";
|
|
2
|
+
import "./helpers-CRuBUas3.mjs";
|
|
3
|
+
import { a as getStorageBackend, i as getRegistryBackend, n as createRegistryBackend, r as createStorageBackend, t as closeStorage } from "./factory-CYwa0jYj.mjs";
|
|
4
|
+
import "./postgres-BL5oBBgY.mjs";
|
|
5
|
+
import "./embedding-gate-iq0oQEkF.mjs";
|
|
6
|
+
import "./embeddings-BVq3esBF.mjs";
|
|
7
|
+
import "./router-D2476pOp.mjs";
|
|
8
|
+
|
|
9
|
+
export { createStorageBackend, getRegistryBackend };
|