@tekmidian/pai 1.0.0 → 1.0.2
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/README.md +67 -5
- package/dist/aibroker-client-BxzeEHPF.mjs +3 -0
- package/dist/{aibroker-client-CXEYBzbf.mjs → aibroker-client-CQPGqLxL.mjs} +1 -1
- package/dist/atomic-file-BorMa4T3.mjs +21 -0
- package/dist/{auto-route-D5SXrMpB.mjs → auto-route-B4azPk4l.mjs} +3 -3
- package/dist/auto-route-BjoMHKyI.mjs +11 -0
- package/dist/budget-Dod6rnA9.mjs +15 -0
- package/dist/{caller-identity-CVTuiLSs.mjs → caller-identity-yLFb7CKq.mjs} +6 -5
- package/dist/{capacity-DaXrVj3J.mjs → capacity-DEveQdFV.mjs} +3 -3
- package/dist/{chain-BcQlIlEd.mjs → chain-D-yvET_y.mjs} +5 -5
- package/dist/cli/index.mjs +1621 -357
- package/dist/cockpit-actions-BWunx3rY.mjs +20 -0
- package/dist/{cockpit-actions-ODmt8yF9.mjs → cockpit-actions-C8GlTzts.mjs} +84 -42
- package/dist/cockpit-memory-vTlFWV7F.mjs +20 -0
- package/dist/{config-BSXKyeJ1.mjs → config-Bu1_vbY8.mjs} +42 -3
- package/dist/{config-B955yYmo.mjs → config-Cxi-aBf4.mjs} +2 -2
- package/dist/{config-TaWmdTLx.mjs → config-DtENJ6cL.mjs} +1 -1
- package/dist/{config-D5chi2LO.mjs → config-XpZWOYOG.mjs} +2 -2
- package/dist/{controls-BGkK_Bdi.mjs → controls-BcKFHeG1.mjs} +37 -22
- package/dist/daemon/index.mjs +43 -42
- package/dist/{daemon-CorGh6Ub.mjs → daemon-ColVHwGZ.mjs} +103 -55
- package/dist/daemon-N7WhYi6I.mjs +45 -0
- package/dist/daemon-mcp/index.mjs +40 -39
- package/dist/{define-DGFu-sCf.mjs → define-CjJsmq-6.mjs} +1 -1
- package/dist/{detect-C1d5cUkT.mjs → detect-9CZNO0yf.mjs} +2 -2
- package/dist/detect-D1ziFFfA.mjs +10 -0
- package/dist/{embed-pass-CeQD8kRE.mjs → embed-pass-DIWjA68P.mjs} +5 -5
- package/dist/{embedding-gate-BHuBsgHD.mjs → embedding-gate-6rZrWRXa.mjs} +5 -5
- package/dist/{embedding-gate-Z7CJSOJk.mjs → embedding-gate-Cnk4YCyX.mjs} +3 -3
- package/dist/{embeddings-D4t6L-EH.mjs → embeddings-BVq3esBF.mjs} +1 -1
- package/dist/{embeddings-OF9Pt4by.mjs → embeddings-CIkJBKd-.mjs} +1 -1
- package/dist/{endreason-x1KOSrcO.mjs → endreason-C577xIQz.mjs} +7 -6
- package/dist/{env-DArqGq-Z.mjs → env-BE8mrsxr.mjs} +1 -1
- package/dist/factory-Bsib-qDG.mjs +9 -0
- package/dist/{factory-BtjbQ0np.mjs → factory-DjAAsqr_.mjs} +15 -13
- package/dist/{fallback-BIyEpPsQ.mjs → fallback-DFlItw1Z.mjs} +5 -5
- package/dist/{fmt-age-BiSHrTKN.mjs → fmt-age-ByDkvkoU.mjs} +1 -1
- package/dist/{health-C6jZWvRG.mjs → health-Dnym-qcT.mjs} +4 -4
- package/dist/{helpers-DFmYRCOa.mjs → helpers-BD6V-p9w.mjs} +2 -2
- package/dist/helpers-CMGjy_0N.mjs +10 -0
- package/dist/{helpers-CJpb_MNB.mjs → helpers-CRuBUas3.mjs} +87 -38
- package/dist/hooks/capture-all-events.mjs +52 -11
- package/dist/hooks/capture-session-summary.mjs +64 -47
- package/dist/hooks/capture-tool-output.mjs +49 -8
- package/dist/hooks/context-compression-hook.mjs +30 -10
- package/dist/hooks/initialize-session.mjs +1 -0
- package/dist/hooks/load-core-context.mjs +1 -1
- package/dist/hooks/load-project-context.mjs +32 -29
- package/dist/hooks/security-validator.mjs +45 -13
- package/dist/hooks/stop-hook.mjs +54 -16
- package/dist/hooks/supervision-banner.mjs +9 -0
- package/dist/hooks/sync-todo-to-md.mjs +147 -113
- package/dist/hooks/worker-edit-repair.mjs +2 -1
- package/dist/hooks/worker-guard.mjs +40 -16
- package/dist/hooks/worker-note.mjs +12 -5
- package/dist/hooks/worker-path-repair.mjs +1 -1
- package/dist/hooks/worker-pool-host.mjs +214 -116
- package/dist/hooks/worker-status-line.mjs +195 -114
- package/dist/index.d.mts +18 -0
- package/dist/index.mjs +12 -12
- package/dist/{indexer-backend-BM2CUSu8.mjs → indexer-backend-_a6UNhXJ.mjs} +149 -96
- package/dist/{ipc-client-BMqWw_gv.mjs → ipc-client-CaiGJnSM.mjs} +1 -1
- package/dist/{ipc-client-YYDD6zzU.mjs → ipc-client-ZRmDKd5Z.mjs} +1 -1
- package/dist/kill-tree-BG7dRVtp.mjs +10 -0
- package/dist/{kill-tree-BjYz5BxK.mjs → kill-tree-EWYaEk5v.mjs} +8 -8
- package/dist/{launch-CLp0OJxV.mjs → launch-CXVlZjHt.mjs} +8 -8
- package/dist/{launch-DgqQdAjI.mjs → launch-Jh5NVeNe.mjs} +3 -3
- package/dist/local-candidate-DLdwQt0s.mjs +112 -0
- package/dist/local-instances-DOxSgT_L.mjs +210 -0
- package/dist/local-instances-ZeRkkuS5.mjs +6 -0
- package/dist/{local-tiers-DPZYqv9m.mjs → local-tiers-BE4jGaMa.mjs} +2 -2
- package/dist/{local-tiers-DnBIAkbK.mjs → local-tiers-DNMI5W86.mjs} +3 -3
- package/dist/{main-config-ops-C0SflOWk.mjs → main-config-ops-BEMpuhDz.mjs} +3 -3
- package/dist/{main-resolver-DVPpSWVy.mjs → main-resolver-3Ns1HPmS.mjs} +18 -17
- package/dist/{migrate-BUJHadA8.mjs → migrate-DrA_OwlZ.mjs} +45 -14
- package/dist/min-max-DrSRUaWQ.mjs +16 -0
- package/dist/{model-inventory-Dasber3S.mjs → model-inventory-BFVSNFT3.mjs} +13 -12
- package/dist/{models-add-Bt7aUHDs.mjs → models-add-BtB3Se6f.mjs} +39 -38
- package/dist/operator-BTqvTIc8.mjs +7 -0
- package/dist/{operator-DZxcP-g8.mjs → operator-CyuB3aVw.mjs} +3 -3
- package/dist/{pai-marker-kIYuNt3c.mjs → pai-marker-DurzIbw8.mjs} +7 -6
- package/dist/{pane-audit-OGYrOAik.mjs → pane-audit-BQytYa60.mjs} +7 -7
- package/dist/{paths-DoRuFc60.mjs → paths-CFHTloSe.mjs} +3 -3
- package/dist/{paths-DoIyRnhx.mjs → paths-CHifubDh.mjs} +3 -3
- package/dist/{planner-DLGOYlVb.mjs → planner-BM27GBfC.mjs} +31 -30
- package/dist/{pool-CZ5MZaXg.mjs → pool-BRvoOkv6.mjs} +3 -3
- package/dist/{pool-cli-BxNSPzzY.mjs → pool-cli-B_YR8_Gl.mjs} +5 -5
- package/dist/{pool-cli-CbJfl37y.mjs → pool-cli-DkZTAlSW.mjs} +6 -6
- package/dist/postgres-BdBNkL_l.mjs +7 -0
- package/dist/{postgres-CDnd_k5f.mjs → postgres-C6ti4haA.mjs} +55 -34
- package/dist/{project-setup-DM4npnL3.mjs → project-setup-CfpApz5o.mjs} +131 -74
- package/dist/providers-BeDiVEb-.mjs +16 -0
- package/dist/{providers-UsKtLcUR.mjs → providers-CblTFrhz.mjs} +6 -6
- package/dist/{query-feedback-I-txSnld.mjs → query-feedback-BRfPtqki.mjs} +2 -2
- package/dist/registrable-C7b6givx.mjs +9 -0
- package/dist/{registrable-LrRIVYQc.mjs → registrable-Uzgmfyhz.mjs} +4 -4
- package/dist/render-Cc2j5QG9.mjs +13 -0
- package/dist/{render-BDbb4CF-.mjs → render-CwIrgxLi.mjs} +8 -8
- package/dist/{reranker-B4r4vykM.mjs → reranker-8g6xMwP7.mjs} +1 -1
- package/dist/{reranker-DxxMCtA0.mjs → reranker-CqCbpGnX.mjs} +1 -1
- package/dist/{root-BMeJuHOb.mjs → root-BWy0c2Lq.mjs} +11 -11
- package/dist/root-wC_6Fx0B.mjs +36 -0
- package/dist/route-table-B7zpoypi.mjs +15 -0
- package/dist/{router-L8Nu-OHF.mjs → router-CQSc3lk3.mjs} +17 -7
- package/dist/{router-D6Ec6Fid.mjs → router-DwHJRgG9.mjs} +1 -1
- package/dist/{routing-CUyiglfu.mjs → routing-BAAST9vT.mjs} +27 -308
- package/dist/{routing-ZuGlc0ge.mjs → routing-CENt4HH1.mjs} +13 -12
- package/dist/{run-ulAi5dFD.mjs → run-6Q9kCPem.mjs} +35 -33
- package/dist/{scan-B7I0gPe-.mjs → scan-ZQWm-_se.mjs} +6 -6
- package/dist/{local-candidate-jOjTNlOL.mjs → scheduler-CtUyWJ3O.mjs} +7 -109
- package/dist/scheduler-dmHXoRvm.mjs +3 -0
- package/dist/{scope-D5VSQxe4.mjs → scope-D-h6F6DN.mjs} +4 -4
- package/dist/{search-CPoE0830.mjs → search-RSyeQqj1.mjs} +18 -18
- package/dist/session-Bok2PqRS.mjs +35 -0
- package/dist/{session-CNXF6DLP.mjs → session-DVUExUnX.mjs} +55 -31
- package/dist/session-scan-BJI_ZO8M.mjs +9 -0
- package/dist/{session-scan-BDLEc4w1.mjs → session-scan-W-gbwJHM.mjs} +6 -6
- package/dist/{sources-CjhUKKtO.mjs → sources-ESUkZaWv.mjs} +1 -1
- package/dist/{status-DYydKQUI.mjs → status-Dm4dYciN.mjs} +4 -4
- package/dist/{status-CvVi9cDf.mjs → status-ggJ7lgVg.mjs} +17 -9
- package/dist/{stop-words-SdSL1WKH.mjs → stop-words-DSEYQdNe.mjs} +1 -1
- package/dist/{test-isolation-CoDeOVXb.mjs → test-isolation-lqSmYxr0.mjs} +1 -1
- package/dist/{timeouts-OwEONmc8.mjs → timeouts-1MLooEBB.mjs} +1 -1
- package/dist/{tool-errors-AeRQuG3Y.mjs → tool-errors-7E13StWd.mjs} +4 -3
- package/dist/{tool-errors-R5E0fCgf.mjs → tool-errors-CJWODvlo.mjs} +6 -6
- package/dist/{viewer-DtWj5Vti.mjs → viewer-DcpJwGKE.mjs} +15 -15
- package/dist/viewer-MWBVJP3u.mjs +22 -0
- package/dist/{wait-BMUR-U-U.mjs → wait-ByV0OyMZ.mjs} +3 -3
- package/dist/{worker-config-BLqa1yiD.mjs → worker-config-BDYNxbYz.mjs} +294 -92
- package/dist/worker-config-gmAq_-rI.mjs +41 -0
- package/dist/{workers-config-DEI9lrV4.mjs → workers-config-f8KrkY4L.mjs} +2 -2
- package/dist/{worktree-zmRf556h.mjs → worktree-CrnOqTBW.mjs} +37 -7
- package/dist/{zettelkasten-nigq7fqs.mjs → zettelkasten-B_rRRRvD.mjs} +5 -5
- package/dist/{zettelkasten-Cr_Xj0mG.mjs → zettelkasten-BzMm8REH.mjs} +29 -19
- package/docs/README.md +2 -0
- package/docs/cockpit.md +10 -4
- package/docs/commands/README.md +4 -4
- package/docs/commands/backup.md +2 -0
- package/docs/commands/install.md +29 -4
- package/docs/commands/providers.md +1 -1
- package/docs/commands/restore.md +4 -0
- package/docs/commands/setup.md +29 -4
- package/docs/commands/worker.md +1 -1
- package/docs/config.md +2 -0
- package/docs/features.md +299 -0
- package/docs/images/architecture.drawio +51 -0
- package/docs/images/architecture.svg +3 -0
- package/docs/images/cockpit-01-system-tokens.jpg +0 -0
- package/docs/images/cockpit-02-totals-cache.jpg +0 -0
- package/docs/images/cockpit-03-local-servers-models-pool.jpg +0 -0
- package/docs/images/cockpit-04-workers-memory.jpg +0 -0
- package/docs/images/cockpit-05-performance.jpg +0 -0
- package/docs/images/cockpit-06-runs-speed-routing.jpg +0 -0
- package/docs/images/cockpit-07-settings-registry.jpg +0 -0
- package/docs/install/index.md +29 -0
- package/docs/three-tier-coding.md +1 -1
- package/gemini-extension.json +1 -1
- package/package.json +1 -5
- package/pai-plugin.json +1 -1
- package/plugins/context-preservation/plugin.json +1 -1
- package/plugins/core/plugin.json +1 -1
- package/plugins/core/skills/setup/SKILL.md +41 -9
- 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/session-autosave.sh +8 -1
- package/src/hooks/session-stop.sh +8 -1
- package/src/hooks/ts/capture-all-events.ts +7 -12
- package/src/hooks/ts/lib/context-fill.ts +2 -1
- package/src/hooks/ts/lib/path-repair.ts +1 -1
- package/src/hooks/ts/lib/project-utils/notify.ts +1 -0
- package/src/hooks/ts/lib/project-utils/session-notes.ts +23 -6
- package/src/hooks/ts/lib/raw-capture.ts +36 -0
- package/src/hooks/ts/lib/session-summary.ts +129 -0
- package/src/hooks/ts/lib/todo-sync.ts +120 -0
- package/src/hooks/ts/lib/worker-git-guard.ts +1 -1
- package/src/hooks/ts/post-tool-use/capture-tool-output.ts +6 -10
- package/src/hooks/ts/post-tool-use/sync-todo-to-md.ts +5 -105
- package/src/hooks/ts/pre-compact/context-compression-hook.ts +1 -1
- package/src/hooks/ts/pre-tool-use/security-validator.ts +35 -14
- package/src/hooks/ts/session-end/capture-session-summary.ts +20 -128
- package/src/hooks/ts/session-start/load-core-context.ts +3 -3
- package/src/hooks/ts/session-start/load-project-context.ts +18 -22
- package/src/hooks/ts/stop/stop-hook.ts +13 -5
- package/src/hooks/ztk-auto.sh +7 -2
- package/dist/aibroker-client-JjE74jo0.mjs +0 -3
- package/dist/auto-route-BRk8NEFv.mjs +0 -11
- package/dist/budget-DuhQ2zzG.mjs +0 -14
- package/dist/cockpit-actions-DcQ-ucU8.mjs +0 -19
- package/dist/cockpit-memory-KV45PPO2.mjs +0 -19
- package/dist/daemon-C7yt_ptC.mjs +0 -44
- package/dist/detect-DRUkmHnb.mjs +0 -10
- package/dist/factory-DAGG9_n8.mjs +0 -9
- package/dist/helpers-DPJEHPq6.mjs +0 -10
- package/dist/kill-tree-LV0Q7Mte.mjs +0 -10
- package/dist/operator-CfL0HiBK.mjs +0 -7
- package/dist/postgres-DgqWyqhN.mjs +0 -7
- package/dist/providers-CTu2s1z2.mjs +0 -15
- package/dist/registrable-D9aNZOTh.mjs +0 -9
- package/dist/render-BSfVlYHj.mjs +0 -13
- package/dist/root-xI9DqVIe.mjs +0 -35
- package/dist/route-table-HjvnLVEU.mjs +0 -14
- package/dist/session-BJHzmUg2.mjs +0 -34
- package/dist/session-scan-YORKE1NO.mjs +0 -9
- package/dist/viewer-B8709jDN.mjs +0 -22
- package/dist/worker-config-D8tRuvo7.mjs +0 -40
- package/docs/images/cockpit-limits-routing.jpg +0 -0
- package/docs/images/cockpit-models.jpg +0 -0
- package/docs/images/cockpit-usage.jpg +0 -0
- package/docs/images/cockpit-workers-system.jpg +0 -0
- package/scripts/build-docs.mjs +0 -41
- package/scripts/build-hooks.mjs +0 -311
- package/scripts/build-skill-stubs.mjs +0 -216
- package/scripts/copy-defaults.mjs +0 -46
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { c as ok, i as err, n as dim } from "./utils-J2b9y8PC.mjs";
|
|
2
2
|
import { g as paiHomePath, l as claudeHomeDir } from "./runtime-paths-WsO9sJFc.mjs";
|
|
3
|
-
import { X as readMergeVerify, c as WorkersConfigError, f as escalationCloud, h as isModelCapability, j as readWorkersSection, m as isLocalProvider, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-
|
|
4
|
-
import { i as ledgerPath, r as eventsPath, u as workersLogDir } from "./paths-
|
|
5
|
-
import { D as formatPending, O as pendingGate, b as verifyWorker, c as formatKnowledge, d as gcWorktrees, g as mergeWorker, k as pendingResults, m as leftoverWorktrees, s as discardWorker, u as gcPoolWorktrees } from "./worktree-
|
|
6
|
-
import { B as loadStatusConfig, C as nowStamp, F as ForgeError, H as setClaim, I as PROJECT_CONFIG_REL, K as PREAMBLE_MAX_BYTES, R as listClaims, V as parseStatusConfig, W as writeContinueToForge, Z as projectRoot, a as UNLABELED, et as longInlinePromptHint, g as isLive, j as setWorkerNote, k as saveStatus, o as ageOf, q as PREAMBLE_REL, s as alive, tt as parseRunnerArgs, v as loadStatus, w as ownsPid, y as loadStatuses, z as listStale } from "./status-
|
|
7
|
-
import { p as currentWorkerId } from "./scope-
|
|
8
|
-
import { C as detectSessionProvider,
|
|
9
|
-
import { C as statusMarker, S as realDeps, T as waitOn, a as runWait, w as statusQueue } from "./wait-
|
|
10
|
-
import { n as
|
|
11
|
-
import { a as liveQueue, f as sessionOf, l as reorderQueue, o as providerCap, s as queueRows, t as admitCap } from "./capacity-
|
|
12
|
-
import { n as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { R as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
3
|
+
import { X as readMergeVerify, c as WorkersConfigError, f as escalationCloud, h as isModelCapability, j as readWorkersSection, m as isLocalProvider, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-XpZWOYOG.mjs";
|
|
4
|
+
import { i as ledgerPath, r as eventsPath, u as workersLogDir } from "./paths-CHifubDh.mjs";
|
|
5
|
+
import { D as formatPending, O as pendingGate, b as verifyWorker, c as formatKnowledge, d as gcWorktrees, g as mergeWorker, k as pendingResults, m as leftoverWorktrees, s as discardWorker, u as gcPoolWorktrees } from "./worktree-CrnOqTBW.mjs";
|
|
6
|
+
import { B as loadStatusConfig, C as nowStamp, F as ForgeError, H as setClaim, I as PROJECT_CONFIG_REL, K as PREAMBLE_MAX_BYTES, R as listClaims, V as parseStatusConfig, W as writeContinueToForge, Z as projectRoot, a as UNLABELED, et as longInlinePromptHint, g as isLive, j as setWorkerNote, k as saveStatus, o as ageOf, q as PREAMBLE_REL, s as alive, tt as parseRunnerArgs, v as loadStatus, w as ownsPid, y as loadStatuses, z as listStale } from "./status-ggJ7lgVg.mjs";
|
|
7
|
+
import { p as currentWorkerId } from "./scope-D-h6F6DN.mjs";
|
|
8
|
+
import { C as detectSessionProvider, St as gcSettingsFiles, an as detectSessionName, bn as resolveLocalProvider, fn as LOCAL_MECHANISM_LINE, on as BATCH_ENV, pt as isLoopbackProvider, vn as probeLoopback, xn as resolveRunnerProvider } from "./routing-BAAST9vT.mjs";
|
|
9
|
+
import { C as statusMarker, S as realDeps, T as waitOn, a as runWait, w as statusQueue } from "./wait-ByV0OyMZ.mjs";
|
|
10
|
+
import { n as breakStaleMutex } from "./caller-identity-yLFb7CKq.mjs";
|
|
11
|
+
import { a as liveQueue, f as sessionOf, l as reorderQueue, o as providerCap, s as queueRows, t as admitCap } from "./capacity-DEveQdFV.mjs";
|
|
12
|
+
import { n as tierProviderNames, t as isLocalCandidate } from "./local-candidate-DLdwQt0s.mjs";
|
|
13
|
+
import { n as OPT, t as CliError } from "./define-CjJsmq-6.mjs";
|
|
14
|
+
import { c as resolveFromModule } from "./postgres-C6ti4haA.mjs";
|
|
15
|
+
import { C as workerUsage, S as usageJson, U as endProcesses, W as findWorktreeOrphans, _ as stopLaunchedWorkers, a as resolveWorkers, b as renderUsage, d as capture, h as realCommitsAhead, i as liveResolveCtx, m as mergeBranch, n as LocalProviderRefusedError, p as launchWorker, r as PoolRefusedError, t as runWorker, v as parseWhen } from "./run-6Q9kCPem.mjs";
|
|
16
|
+
import { $ as checkPaneForWorker, A as tail, Gt as handoffFromInside, H as planLogTail, J as queueLockPath, Jt as LOCAL_FAILURE_LIMIT, N as filesOverlap, R as followPlanLog, W as planRunEnded, Xt as localFailures, Yt as classifyRoute, Z as withRunLock, Zt as routeLine, c as setMuted, ct as openFollowPane, et as closeEndedPanes, ft as paneBackend, gt as workerEnded, ht as resolveHostSession, lt as openPaneForWorker, pt as paneMayClose, st as loadRegistry, yt as psTable } from "./controls-BcKFHeG1.mjs";
|
|
17
|
+
import { R as parentFromEnv } from "./render-CwIrgxLi.mjs";
|
|
18
|
+
import { r as sayToWorker } from "./operator-CyuB3aVw.mjs";
|
|
19
|
+
import { i as killTree } from "./kill-tree-EWYaEk5v.mjs";
|
|
20
|
+
import { t as runChain } from "./chain-D-yvET_y.mjs";
|
|
21
|
+
import { c as followPaneRun, i as listItermTabs, l as isPaneRunId, o as renderPaneAudit, s as runningProcs, t as auditPanes, u as loadPaneRunStatus } from "./pane-audit-BQytYa60.mjs";
|
|
22
|
+
import { a as followTailOutput, d as psOutput, f as replayOutput, m as statusLineOutput, o as followWorkers } from "./viewer-DcpJwGKE.mjs";
|
|
23
|
+
import { _ as unsetCapabilityPreference, a as describeCapabilities, c as modelPrefsText, d as setCapabilityPreference, h as setProviderModel, o as describeModels, u as resolveProviderName } from "./providers-CblTFrhz.mjs";
|
|
24
|
+
import { appendFileSync, copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
25
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
24
26
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
25
27
|
import { tmpdir } from "node:os";
|
|
26
28
|
import { execFileSync, spawn } from "node:child_process";
|
|
27
29
|
import { fileURLToPath } from "node:url";
|
|
28
30
|
import { parse } from "yaml";
|
|
29
|
-
import { createHash } from "node:crypto";
|
|
30
31
|
|
|
31
32
|
//#region src/workers/specfile.ts
|
|
32
33
|
/**
|
|
@@ -393,10 +394,25 @@ function renderHelpReport(entries) {
|
|
|
393
394
|
lines.push("", [...perScope].map(([s, n]) => `${s}: ${n} call${n === 1 ? "" : "s"}`).join("; "));
|
|
394
395
|
return lines.join("\n");
|
|
395
396
|
}
|
|
397
|
+
/** Paths from `git status --porcelain -z`: NUL-separated, unquoted; a rename entry is followed by its source path. */
|
|
398
|
+
function parsePorcelainZ(out) {
|
|
399
|
+
const parts = out.split("\0").filter(Boolean);
|
|
400
|
+
const files = [];
|
|
401
|
+
for (let i = 0; i < parts.length; i++) {
|
|
402
|
+
const e = parts[i];
|
|
403
|
+
files.push(e.slice(3));
|
|
404
|
+
if (e[0] === "R" || e[0] === "C" || e[1] === "R" || e[1] === "C") i++;
|
|
405
|
+
}
|
|
406
|
+
return files;
|
|
407
|
+
}
|
|
396
408
|
/** Real changed-file lister: git porcelain paths, empty outside git. */
|
|
397
409
|
function gitChangedFiles(cwd) {
|
|
398
410
|
try {
|
|
399
|
-
return execFileSync("git", [
|
|
411
|
+
return parsePorcelainZ(execFileSync("git", [
|
|
412
|
+
"status",
|
|
413
|
+
"--porcelain",
|
|
414
|
+
"-z"
|
|
415
|
+
], {
|
|
400
416
|
cwd,
|
|
401
417
|
encoding: "utf8",
|
|
402
418
|
stdio: [
|
|
@@ -404,7 +420,7 @@ function gitChangedFiles(cwd) {
|
|
|
404
420
|
"pipe",
|
|
405
421
|
"ignore"
|
|
406
422
|
]
|
|
407
|
-
})
|
|
423
|
+
}));
|
|
408
424
|
} catch {
|
|
409
425
|
return [];
|
|
410
426
|
}
|
|
@@ -575,20 +591,24 @@ async function runProbed(o) {
|
|
|
575
591
|
]
|
|
576
592
|
});
|
|
577
593
|
let last = Date.now();
|
|
578
|
-
let
|
|
594
|
+
let probing = false;
|
|
595
|
+
let announcedIdle = false;
|
|
579
596
|
let spun = false;
|
|
580
597
|
let pending = Promise.resolve();
|
|
581
598
|
child.stdout.on("data", (d) => (last = Date.now(), out(d.toString())));
|
|
582
599
|
child.stderr.on("data", (d) => (last = Date.now(), err(d.toString())));
|
|
583
600
|
const timer = setInterval(() => {
|
|
584
|
-
if (
|
|
585
|
-
|
|
601
|
+
if (probing || spun || Date.now() - last < idle * 1e3 || !child.pid) return;
|
|
602
|
+
probing = true;
|
|
586
603
|
const pids = nodeDescendants(child.pid);
|
|
587
604
|
for (const p of pids) writeFileSync(join(o.reportDir, `probe-${p}`), "");
|
|
588
605
|
pending = collectFrames(o.reportDir, pids, 3e3).then((frames) => {
|
|
589
606
|
for (const p of pids) rmQuiet(join(o.reportDir, `probe-${p}`));
|
|
590
|
-
|
|
591
|
-
if (
|
|
607
|
+
const stuck = frames.some((f) => userFrames(f, o.cwd).length > 0);
|
|
608
|
+
if (stuck || !announcedIdle) err(`\n${diagnose(frames, o.cwd, idle)}\n`);
|
|
609
|
+
announcedIdle = true;
|
|
610
|
+
probing = false;
|
|
611
|
+
if (stuck) {
|
|
592
612
|
spun = true;
|
|
593
613
|
for (const p of [...pids, child.pid]) killQuiet(p, "SIGTERM");
|
|
594
614
|
setTimeout(() => pids.forEach((p) => killQuiet(p, "SIGKILL")), 2e3).unref();
|
|
@@ -1666,7 +1686,7 @@ const errorsCommand = {
|
|
|
1666
1686
|
examples: ["pai worker errors", "pai worker errors --since 2h"],
|
|
1667
1687
|
seeAlso: ["pai worker log"],
|
|
1668
1688
|
run: (ctx) => guard("pai worker errors --since 24h", async () => {
|
|
1669
|
-
const { errorsTable, groupToolErrors, parseSince, readToolErrors } = await import("./tool-errors-
|
|
1689
|
+
const { errorsTable, groupToolErrors, parseSince, readToolErrors } = await import("./tool-errors-CJWODvlo.mjs");
|
|
1670
1690
|
const since = str(ctx.opts.since) ?? "24h";
|
|
1671
1691
|
const ms = parseSince(since);
|
|
1672
1692
|
if (ms === null) throw new Error(`bad --since "${since}" (use 30m, 2h, 1d)`);
|
|
@@ -2564,29 +2584,59 @@ var QueueStore = class {
|
|
|
2564
2584
|
this.path = path;
|
|
2565
2585
|
this.now = now;
|
|
2566
2586
|
}
|
|
2587
|
+
/** A missing file is an empty queue; anything unreadable is refused so the next write cannot replace it. */
|
|
2567
2588
|
read() {
|
|
2568
2589
|
if (!existsSync(this.path)) return {
|
|
2569
2590
|
next: 1,
|
|
2570
2591
|
items: []
|
|
2571
2592
|
};
|
|
2593
|
+
let s;
|
|
2572
2594
|
try {
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
};
|
|
2578
|
-
} catch {
|
|
2579
|
-
return {
|
|
2580
|
-
next: 1,
|
|
2581
|
-
items: []
|
|
2582
|
-
};
|
|
2595
|
+
s = JSON.parse(readFileSync(this.path, "utf8"));
|
|
2596
|
+
if (!s || !Array.isArray(s.items)) throw new Error("no items array");
|
|
2597
|
+
} catch (e) {
|
|
2598
|
+
throw new Error(`queue file ${this.path} is unreadable (${e.message}); fix or remove it by hand, it was left untouched`);
|
|
2583
2599
|
}
|
|
2600
|
+
return {
|
|
2601
|
+
next: s.next ?? s.items.length + 1,
|
|
2602
|
+
items: s.items
|
|
2603
|
+
};
|
|
2584
2604
|
}
|
|
2585
2605
|
write(s) {
|
|
2586
2606
|
mkdirSync(dirname(this.path), { recursive: true });
|
|
2587
|
-
const tmp = `${this.path}.tmp`;
|
|
2588
|
-
|
|
2589
|
-
|
|
2607
|
+
const tmp = `${this.path}.${process.pid}.${randomBytes(4).toString("hex")}.tmp`;
|
|
2608
|
+
try {
|
|
2609
|
+
writeFileSync(tmp, JSON.stringify(s, null, 2) + "\n", "utf8");
|
|
2610
|
+
renameSync(tmp, this.path);
|
|
2611
|
+
} catch (e) {
|
|
2612
|
+
rmSync(tmp, { force: true });
|
|
2613
|
+
throw e;
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
/** The one mutation path: read, apply `fn`, write, all under a cross-process mkdir lock. */
|
|
2617
|
+
mutate(fn) {
|
|
2618
|
+
mkdirSync(dirname(this.path), { recursive: true });
|
|
2619
|
+
const m = `${this.path}.mutex`;
|
|
2620
|
+
const t0 = Date.now();
|
|
2621
|
+
for (;;) try {
|
|
2622
|
+
mkdirSync(m);
|
|
2623
|
+
break;
|
|
2624
|
+
} catch (e) {
|
|
2625
|
+
if (e.code !== "EEXIST") throw e;
|
|
2626
|
+
breakStaleMutex(m, 1e4);
|
|
2627
|
+
if (Date.now() - t0 > 3e4) throw new Error(`queue file ${this.path} is locked by another process`);
|
|
2628
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 5 + Math.floor(Math.random() * 15));
|
|
2629
|
+
}
|
|
2630
|
+
try {
|
|
2631
|
+
const s = this.read();
|
|
2632
|
+
const r = fn(s);
|
|
2633
|
+
this.write(s);
|
|
2634
|
+
return r;
|
|
2635
|
+
} finally {
|
|
2636
|
+
try {
|
|
2637
|
+
rmdirSync(m);
|
|
2638
|
+
} catch {}
|
|
2639
|
+
}
|
|
2590
2640
|
}
|
|
2591
2641
|
list() {
|
|
2592
2642
|
return this.read().items;
|
|
@@ -2595,34 +2645,34 @@ var QueueStore = class {
|
|
|
2595
2645
|
return this.list().find((i) => i.id === id);
|
|
2596
2646
|
}
|
|
2597
2647
|
add(text, repo, opts = {}) {
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2648
|
+
return this.mutate((s) => {
|
|
2649
|
+
const item = {
|
|
2650
|
+
id: `q${s.next}`,
|
|
2651
|
+
text: text.trim(),
|
|
2652
|
+
repo,
|
|
2653
|
+
files: opts.files ?? [],
|
|
2654
|
+
...opts.image ? { image: opts.image } : {},
|
|
2655
|
+
created: new Date(this.now()).toISOString(),
|
|
2656
|
+
state: "pending",
|
|
2657
|
+
rounds: 0,
|
|
2658
|
+
notes: []
|
|
2659
|
+
};
|
|
2660
|
+
s.next++;
|
|
2661
|
+
s.items.push(item);
|
|
2662
|
+
return item;
|
|
2663
|
+
});
|
|
2614
2664
|
}
|
|
2615
2665
|
/** Apply `patch` to one item; throws on an unknown id. */
|
|
2616
2666
|
update(id, patch) {
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2667
|
+
return this.mutate((s) => {
|
|
2668
|
+
const i = s.items.findIndex((x) => x.id === id);
|
|
2669
|
+
if (i < 0) throw new Error(`no queue item ${id}`);
|
|
2670
|
+
s.items[i] = {
|
|
2671
|
+
...s.items[i],
|
|
2672
|
+
...patch
|
|
2673
|
+
};
|
|
2674
|
+
return s.items[i];
|
|
2675
|
+
});
|
|
2626
2676
|
}
|
|
2627
2677
|
};
|
|
2628
2678
|
const ALLOWED = {
|
|
@@ -2943,13 +2993,20 @@ async function acceptItems(store, settings, ids, deps) {
|
|
|
2943
2993
|
* plan runner's launchWorker / mergeBranch; git and shell calls run as children.
|
|
2944
2994
|
*/
|
|
2945
2995
|
function realQueueDeps(logDir, repo) {
|
|
2946
|
-
const dir = mkdtempSync(join(tmpdir(), "pai-queue-"));
|
|
2947
2996
|
const git = async (repo, ...a) => (await capture("git", a, repo)).out;
|
|
2948
2997
|
return {
|
|
2949
2998
|
async startWorker(req) {
|
|
2950
|
-
const
|
|
2951
|
-
|
|
2952
|
-
|
|
2999
|
+
const dir = mkdtempSync(join(tmpdir(), "pai-queue-"));
|
|
3000
|
+
try {
|
|
3001
|
+
const specFile = join(dir, `${req.itemId}-${req.attempt}.txt`);
|
|
3002
|
+
writeFileSync(specFile, req.spec, "utf8");
|
|
3003
|
+
return await launchWorker(req, specFile, repo, logDir);
|
|
3004
|
+
} finally {
|
|
3005
|
+
rmSync(dir, {
|
|
3006
|
+
recursive: true,
|
|
3007
|
+
force: true
|
|
3008
|
+
});
|
|
3009
|
+
}
|
|
2953
3010
|
},
|
|
2954
3011
|
async inspect(repo, id) {
|
|
2955
3012
|
const base = (await git(repo, "merge-base", "HEAD", `worker/${id}`)).trim();
|
|
@@ -3175,7 +3232,7 @@ async function projectChecks(cwd, d = {}) {
|
|
|
3175
3232
|
}
|
|
3176
3233
|
async function realDaemonStart() {
|
|
3177
3234
|
try {
|
|
3178
|
-
const [{ PaiClient }, { loadConfig }] = await Promise.all([import("./ipc-client-
|
|
3235
|
+
const [{ PaiClient }, { loadConfig }] = await Promise.all([import("./ipc-client-ZRmDKd5Z.mjs"), import("./config-DtENJ6cL.mjs")]);
|
|
3179
3236
|
const s = await new PaiClient(loadConfig().socketPath).status();
|
|
3180
3237
|
return Date.now() - Number(s.uptime) * 1e3;
|
|
3181
3238
|
} catch {
|
|
@@ -3192,4 +3249,4 @@ function realBuildTime() {
|
|
|
3192
3249
|
|
|
3193
3250
|
//#endregion
|
|
3194
3251
|
export { schedulerLines as C, resolveSpecPath as E, withTarget as S, readSpecPrompt as T, issueClaims as _, branchDiff as a, workerCommand as b, runQueue as c, loadSettings as d, move as f, issueClaim as g, renderReview as h, projectChecks as i, QueueStore as l, renderList as m, initProject as n, realQueueDeps as o, queueStatePath as p, isGitProject as r, acceptItems as s, formatCheck as t, again as u, issueStale as v, schedulerView as w, resolveTarget as x, providerCaps as y };
|
|
3195
|
-
//# sourceMappingURL=project-setup-
|
|
3252
|
+
//# sourceMappingURL=project-setup-CfpApz5o.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./config-XpZWOYOG.mjs";
|
|
2
|
+
import "./config-Bu1_vbY8.mjs";
|
|
3
|
+
import "./paths-CHifubDh.mjs";
|
|
4
|
+
import "./status-ggJ7lgVg.mjs";
|
|
5
|
+
import "./scope-D-h6F6DN.mjs";
|
|
6
|
+
import "./routing-BAAST9vT.mjs";
|
|
7
|
+
import "./tool-errors-7E13StWd.mjs";
|
|
8
|
+
import "./wait-ByV0OyMZ.mjs";
|
|
9
|
+
import "./local-tiers-BE4jGaMa.mjs";
|
|
10
|
+
import "./caller-identity-yLFb7CKq.mjs";
|
|
11
|
+
import "./capacity-DEveQdFV.mjs";
|
|
12
|
+
import "./local-instances-DOxSgT_L.mjs";
|
|
13
|
+
import "./local-candidate-DLdwQt0s.mjs";
|
|
14
|
+
import { _ as unsetCapabilityPreference, a as describeCapabilities, b as useProvider, c as modelPrefsText, d as setCapabilityPreference, f as setClass, g as setWorkersEnabled, h as setProviderModel, i as describeCap, l as removeProvider, m as setProviderEnabled, n as capText, 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-CblTFrhz.mjs";
|
|
15
|
+
|
|
16
|
+
export { setProviderEnabled, useProvider };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as writeWorkersSection, M as resolveCapability, O as providerCostTier, _ as maskKey, a as MODEL_CAPABILITIES, c as WorkersConfigError, d as defaultWorkersConfig, g as keysDir, h as isModelCapability, j as readWorkersSection, o as PROVIDER_TAGS, p as getProviderOrNative, t as ANTHROPIC_NATIVE, tt as workersYamlPath, y as nativeAnthropicProvider } from "./config-
|
|
2
|
-
import { n as CONFIG_FILE, o as expandHome, s as homeRel } from "./config-
|
|
3
|
-
import { u as workersLogDir } from "./paths-
|
|
4
|
-
import { a as clearCooldown, d as probeQuota,
|
|
5
|
-
import { d as resolveCap, t as admitCap } from "./capacity-
|
|
1
|
+
import { F as writeWorkersSection, M as resolveCapability, O as providerCostTier, _ as maskKey, a as MODEL_CAPABILITIES, c as WorkersConfigError, d as defaultWorkersConfig, g as keysDir, h as isModelCapability, j as readWorkersSection, o as PROVIDER_TAGS, p as getProviderOrNative, t as ANTHROPIC_NATIVE, tt as workersYamlPath, y as nativeAnthropicProvider } from "./config-XpZWOYOG.mjs";
|
|
2
|
+
import { n as CONFIG_FILE, o as expandHome, s as homeRel } from "./config-Bu1_vbY8.mjs";
|
|
3
|
+
import { u as workersLogDir } from "./paths-CHifubDh.mjs";
|
|
4
|
+
import { a as clearCooldown, d as probeQuota, fn as LOCAL_MECHANISM_LINE, p as quotaSkipThreshold, pt as isLoopbackProvider } from "./routing-BAAST9vT.mjs";
|
|
5
|
+
import { d as resolveCap, t as admitCap } from "./capacity-DEveQdFV.mjs";
|
|
6
6
|
import { chmodSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
7
7
|
|
|
8
8
|
//#region src/workers/providers.ts
|
|
@@ -387,4 +387,4 @@ function describeCapabilities(workers) {
|
|
|
387
387
|
|
|
388
388
|
//#endregion
|
|
389
389
|
export { unsetCapabilityPreference as _, describeCapabilities as a, useProvider as b, modelPrefsText as c, setCapabilityPreference as d, setClass as f, setWorkersEnabled as g, setProviderModel as h, describeCap as i, removeProvider as l, setProviderEnabled as m, capText as n, describeModels as o, setProviderCap as p, classTargetText as r, describeProviders as s, addProvider as t, resolveProviderName as u, unsetClass as v, updateProvider as y };
|
|
390
|
-
//# sourceMappingURL=providers-
|
|
390
|
+
//# sourceMappingURL=providers-CblTFrhz.mjs.map
|
|
@@ -53,7 +53,7 @@ function saveQueryResult(record) {
|
|
|
53
53
|
if (existsSync(filepath)) return filepath;
|
|
54
54
|
writeFileSync(filepath, [
|
|
55
55
|
"---",
|
|
56
|
-
`query:
|
|
56
|
+
`query: ${JSON.stringify(record.query)}`,
|
|
57
57
|
`timestamp: ${new Date(record.timestamp).toISOString()}`,
|
|
58
58
|
`source: ${record.source}`,
|
|
59
59
|
`result_count: ${record.resultCount}`,
|
|
@@ -85,4 +85,4 @@ function saveQueryResult(record) {
|
|
|
85
85
|
|
|
86
86
|
//#endregion
|
|
87
87
|
export { queriesDirPath as n, saveQueryResult as r, migrateQueriesDir as t };
|
|
88
|
-
//# sourceMappingURL=query-feedback-
|
|
88
|
+
//# sourceMappingURL=query-feedback-BRfPtqki.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./config-XpZWOYOG.mjs";
|
|
2
|
+
import "./config-Bu1_vbY8.mjs";
|
|
3
|
+
import "./paths-CHifubDh.mjs";
|
|
4
|
+
import "./worktree-CrnOqTBW.mjs";
|
|
5
|
+
import "./status-ggJ7lgVg.mjs";
|
|
6
|
+
import "./pool-BRvoOkv6.mjs";
|
|
7
|
+
import { a as unregistrableReason, i as reportUnregistrable, n as mainRepoOf, o as workerWorktreesRoot, r as pruneWorktreeProjects, s as worktreeReason, t as isLinkedWorktree } from "./registrable-Uzgmfyhz.mjs";
|
|
8
|
+
|
|
9
|
+
export { reportUnregistrable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as readWorkersSection } from "./config-
|
|
2
|
-
import { u as workersLogDir } from "./paths-
|
|
3
|
-
import { w as worktreesDir } from "./worktree-
|
|
1
|
+
import { j as readWorkersSection } from "./config-XpZWOYOG.mjs";
|
|
2
|
+
import { u as workersLogDir } from "./paths-CHifubDh.mjs";
|
|
3
|
+
import { w as worktreesDir } from "./worktree-CrnOqTBW.mjs";
|
|
4
4
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
5
5
|
import { dirname, resolve, sep } from "node:path";
|
|
6
6
|
|
|
@@ -140,4 +140,4 @@ async function reportUnregistrable(backend, worktreesRoot = workerWorktreesRoot(
|
|
|
140
140
|
|
|
141
141
|
//#endregion
|
|
142
142
|
export { unregistrableReason as a, reportUnregistrable as i, mainRepoOf as n, workerWorktreesRoot as o, pruneWorktreeProjects as r, worktreeReason as s, isLinkedWorktree as t };
|
|
143
|
-
//# sourceMappingURL=registrable-
|
|
143
|
+
//# sourceMappingURL=registrable-Uzgmfyhz.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./config-XpZWOYOG.mjs";
|
|
2
|
+
import "./config-Bu1_vbY8.mjs";
|
|
3
|
+
import "./paths-CHifubDh.mjs";
|
|
4
|
+
import "./worktree-CrnOqTBW.mjs";
|
|
5
|
+
import "./status-ggJ7lgVg.mjs";
|
|
6
|
+
import "./pool-BRvoOkv6.mjs";
|
|
7
|
+
import "./scope-D-h6F6DN.mjs";
|
|
8
|
+
import { D as fmtElapsed } from "./wait-ByV0OyMZ.mjs";
|
|
9
|
+
import "./capacity-DEveQdFV.mjs";
|
|
10
|
+
import "./endreason-C577xIQz.mjs";
|
|
11
|
+
import { S as warmupText, _ as renderTable, a as fullLines, b as tickerTool, c as headerLine, d as paneRunStatusRow, f as paneStatusRow, g as renderStatusLine, h as renderEvent, i as dayOf, l as intentOf, m as relPath, n as clockOf, o as goalOf, p as providerTag, r as contextMeter, s as gutterFor, t as blankBetween, u as makeColor, v as shortModel, x as unifiedDiffLines, y as tickerText } from "./render-CwIrgxLi.mjs";
|
|
12
|
+
|
|
13
|
+
export { makeColor };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as readWorkersSection, p as getProviderOrNative, t as ANTHROPIC_NATIVE, v as nativeAnthropicModels } from "./config-
|
|
2
|
-
import { _ as ownedTree } from "./worktree-
|
|
3
|
-
import { a as UNLABELED, c as contextFooter, f as elapsedOf, g as isLive, h as isChatPane, k as saveStatus, l as contextLabel, nt as shortText, o as ageOf, u as contextPercent, v as loadStatus, y as loadStatuses } from "./status-
|
|
4
|
-
import { p as currentWorkerId, u as sessionTag } from "./scope-
|
|
5
|
-
import { A as waitOnCallLine, E as detachedLine, M as waitingLine, d as parseWorkerReport, j as waitOnResultLine, k as realWaitDeps, n as bashExitCode, p as renderReport, t as WAIT_EXIT_STILL_RUNNING } from "./wait-
|
|
6
|
-
import { c as queuedText, f as sessionOf } from "./capacity-
|
|
7
|
-
import { a as endLabel } from "./endreason-
|
|
1
|
+
import { j as readWorkersSection, p as getProviderOrNative, t as ANTHROPIC_NATIVE, v as nativeAnthropicModels } from "./config-XpZWOYOG.mjs";
|
|
2
|
+
import { _ as ownedTree } from "./worktree-CrnOqTBW.mjs";
|
|
3
|
+
import { a as UNLABELED, c as contextFooter, f as elapsedOf, g as isLive, h as isChatPane, k as saveStatus, l as contextLabel, nt as shortText, o as ageOf, u as contextPercent, v as loadStatus, y as loadStatuses } from "./status-ggJ7lgVg.mjs";
|
|
4
|
+
import { p as currentWorkerId, u as sessionTag } from "./scope-D-h6F6DN.mjs";
|
|
5
|
+
import { A as waitOnCallLine, E as detachedLine, M as waitingLine, d as parseWorkerReport, j as waitOnResultLine, k as realWaitDeps, n as bashExitCode, p as renderReport, t as WAIT_EXIT_STILL_RUNNING } from "./wait-ByV0OyMZ.mjs";
|
|
6
|
+
import { c as queuedText, f as sessionOf } from "./capacity-DEveQdFV.mjs";
|
|
7
|
+
import { a as endLabel } from "./endreason-C577xIQz.mjs";
|
|
8
8
|
import { mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { basename, join, relative } from "node:path";
|
|
10
10
|
|
|
@@ -900,4 +900,4 @@ function paneRunStatusRow(label, startedMs, now = /* @__PURE__ */ new Date()) {
|
|
|
900
900
|
|
|
901
901
|
//#endregion
|
|
902
902
|
export { resolveLimit as A, denialLines as C, deadlineLabel as D, armDeadline as E, checkOrphanedChildren as F, isWorkerId as I, launchParent as L, blockedMsOf as M, endBuildWait as N, deadlinePromptLine as O, assertChildAllowed as P, parentFromEnv as R, warmupText as S, recordDenial as T, renderTable as _, fullLines as a, tickerTool as b, headerLine as c, paneRunStatusRow as d, paneStatusRow as f, renderStatusLine as g, renderEvent as h, dayOf as i, beginBuildWait as j, extendLimit as k, intentOf as l, relPath as m, clockOf as n, goalOf as o, providerTag as p, contextMeter as r, gutterFor as s, blankBetween as t, makeColor as u, shortModel as v, parseDenialText as w, unifiedDiffLines as x, tickerText as y };
|
|
903
|
-
//# sourceMappingURL=render-
|
|
903
|
+
//# sourceMappingURL=render-CwIrgxLi.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { b as nativeOrchestratorModel, j as readWorkersSection, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-
|
|
2
|
-
import { u as workersLogDir } from "./paths-
|
|
3
|
-
import { d as terminalHasName } from "./scope-
|
|
4
|
-
import {
|
|
5
|
-
import { n as OPT, t as CliError } from "./define-
|
|
6
|
-
import { C as assertAvailable, D as execHarness, E as dryRunText, O as looksLikePath, T as buildHarness, k as prepareDir, r as collectView, w as modelFor } from "./session-
|
|
7
|
-
import { o as launchableProviderNames, t as LaunchError } from "./launch-
|
|
8
|
-
import { a as colorEnabled, f as renderTable, n as readBudget, o as makeStyle, p as suggest, t as providerHealth } from "./health-
|
|
9
|
-
import { i as probeResume } from "./launch-
|
|
1
|
+
import { b as nativeOrchestratorModel, j as readWorkersSection, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-XpZWOYOG.mjs";
|
|
2
|
+
import { u as workersLogDir } from "./paths-CHifubDh.mjs";
|
|
3
|
+
import { d as terminalHasName } from "./scope-D-h6F6DN.mjs";
|
|
4
|
+
import { Dn as httpModelsCheck, En as findSetup, Fn as workersLabel, Mn as setupWorkersLabel, On as loadSaved, Pn as shortModel, Tn as downLocalProviders, bn as resolveLocalProvider, cn as getProfile, dn as updateProfile, jn as setupProfile, kn as orchestratorLabel, o as cooldownRemaining, sn as SESSION_NAME_ENV, wn as allSetups, x as SESSION_WORKER_PROVIDER_ENV } from "./routing-BAAST9vT.mjs";
|
|
5
|
+
import { n as OPT, t as CliError } from "./define-CjJsmq-6.mjs";
|
|
6
|
+
import { C as assertAvailable, D as execHarness, E as dryRunText, O as looksLikePath, T as buildHarness, k as prepareDir, r as collectView, w as modelFor } from "./session-DVUExUnX.mjs";
|
|
7
|
+
import { o as launchableProviderNames, t as LaunchError } from "./launch-Jh5NVeNe.mjs";
|
|
8
|
+
import { a as colorEnabled, f as renderTable, n as readBudget, o as makeStyle, p as suggest, t as providerHealth } from "./health-Dnym-qcT.mjs";
|
|
9
|
+
import { i as probeResume } from "./launch-CXVlZjHt.mjs";
|
|
10
10
|
import { writeFileSync } from "node:fs";
|
|
11
11
|
import { basename } from "node:path";
|
|
12
12
|
import { emitKeypressEvents } from "node:readline";
|
|
@@ -683,7 +683,7 @@ async function runRoot(args, term = systemTerm()) {
|
|
|
683
683
|
with: args.with,
|
|
684
684
|
dryRun: args.dryRun
|
|
685
685
|
}, term);
|
|
686
|
-
return (await import("./session-
|
|
686
|
+
return (await import("./session-Bok2PqRS.mjs")).runNewDefault({
|
|
687
687
|
dir: args.name,
|
|
688
688
|
dryRun: args.dryRun
|
|
689
689
|
});
|
|
@@ -791,4 +791,4 @@ const rootCommand = {
|
|
|
791
791
|
|
|
792
792
|
//#endregion
|
|
793
793
|
export { setupsTable as _, lastSetup as a, truncate as b, localState as c, pickerOpts as d, plainTable as f, runRoot as g, runNewWith as h, lastOnLabel as i, matchRows as l, rootCommand as m, ago as n, launchKey as o, resolveSetup as p, finishCd as r, launchScreen as s, CANCELLED as t, pickerLayout as u, startSession as v, systemTerm as y };
|
|
794
|
-
//# sourceMappingURL=root-
|
|
794
|
+
//# sourceMappingURL=root-BWy0c2Lq.mjs.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./utils-J2b9y8PC.mjs";
|
|
2
|
+
import "./migrate-DrA_OwlZ.mjs";
|
|
3
|
+
import "./config-XpZWOYOG.mjs";
|
|
4
|
+
import "./config-Bu1_vbY8.mjs";
|
|
5
|
+
import "./paths-CHifubDh.mjs";
|
|
6
|
+
import "./worktree-CrnOqTBW.mjs";
|
|
7
|
+
import "./status-ggJ7lgVg.mjs";
|
|
8
|
+
import "./pool-BRvoOkv6.mjs";
|
|
9
|
+
import "./registrable-Uzgmfyhz.mjs";
|
|
10
|
+
import "./pai-marker-DurzIbw8.mjs";
|
|
11
|
+
import "./helpers-CRuBUas3.mjs";
|
|
12
|
+
import "./scope-D-h6F6DN.mjs";
|
|
13
|
+
import "./routing-BAAST9vT.mjs";
|
|
14
|
+
import "./tool-errors-7E13StWd.mjs";
|
|
15
|
+
import "./wait-ByV0OyMZ.mjs";
|
|
16
|
+
import "./local-tiers-BE4jGaMa.mjs";
|
|
17
|
+
import "./caller-identity-yLFb7CKq.mjs";
|
|
18
|
+
import "./capacity-DEveQdFV.mjs";
|
|
19
|
+
import "./local-instances-DOxSgT_L.mjs";
|
|
20
|
+
import "./local-candidate-DLdwQt0s.mjs";
|
|
21
|
+
import "./factory-DjAAsqr_.mjs";
|
|
22
|
+
import "./postgres-C6ti4haA.mjs";
|
|
23
|
+
import "./embedding-gate-6rZrWRXa.mjs";
|
|
24
|
+
import "./embeddings-BVq3esBF.mjs";
|
|
25
|
+
import "./router-CQSc3lk3.mjs";
|
|
26
|
+
import "./detect-9CZNO0yf.mjs";
|
|
27
|
+
import "./helpers-BD6V-p9w.mjs";
|
|
28
|
+
import "./scan-ZQWm-_se.mjs";
|
|
29
|
+
import "./session-DVUExUnX.mjs";
|
|
30
|
+
import "./launch-Jh5NVeNe.mjs";
|
|
31
|
+
import "./health-Dnym-qcT.mjs";
|
|
32
|
+
import "./launch-CXVlZjHt.mjs";
|
|
33
|
+
import { _ as setupsTable, a as lastSetup, b as truncate, c as localState, d as pickerOpts, f as plainTable, g as runRoot, h as runNewWith, i as lastOnLabel, l as matchRows, m as rootCommand, n as ago, o as launchKey, p as resolveSetup, r as finishCd, s as launchScreen, t as CANCELLED, u as pickerLayout, v as startSession, y as systemTerm } from "./root-BWy0c2Lq.mjs";
|
|
34
|
+
import "./session-scan-W-gbwJHM.mjs";
|
|
35
|
+
|
|
36
|
+
export { runNewWith };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./config-XpZWOYOG.mjs";
|
|
2
|
+
import "./config-Bu1_vbY8.mjs";
|
|
3
|
+
import "./paths-CHifubDh.mjs";
|
|
4
|
+
import "./status-ggJ7lgVg.mjs";
|
|
5
|
+
import "./scope-D-h6F6DN.mjs";
|
|
6
|
+
import { At as TIGHT_PERCENT, Bt as routeRows, Ft as flowText, Gt as setRoute, Ht as servingChip, It as parseSelector, Jt as validateRoute, Kt as setSessionRoute, Lt as resolveSelector, Mt as clearSessionRoute, Nt as configuredLocal, Pt as entryLabel, Rt as resolveSessionArg, Ut as sessionRoutesPatch, Vt as routeText, Wt as sessionStartTarget, jt as applyPolicyToRoutes, qt as tierFlow, zt as routeChoices } from "./routing-BAAST9vT.mjs";
|
|
7
|
+
import "./tool-errors-7E13StWd.mjs";
|
|
8
|
+
import "./wait-ByV0OyMZ.mjs";
|
|
9
|
+
import "./local-tiers-BE4jGaMa.mjs";
|
|
10
|
+
import "./caller-identity-yLFb7CKq.mjs";
|
|
11
|
+
import "./capacity-DEveQdFV.mjs";
|
|
12
|
+
import "./local-instances-DOxSgT_L.mjs";
|
|
13
|
+
import "./local-candidate-DLdwQt0s.mjs";
|
|
14
|
+
|
|
15
|
+
export { setRoute };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as aibrokerSocketPath } from "./runtime-paths-WsO9sJFc.mjs";
|
|
2
|
-
import { n as isTestRunner } from "./test-isolation-
|
|
3
|
-
import { spawn } from "node:child_process";
|
|
2
|
+
import { n as isTestRunner } from "./test-isolation-lqSmYxr0.mjs";
|
|
4
3
|
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
5
5
|
import { connect } from "node:net";
|
|
6
6
|
|
|
7
7
|
//#region src/notifications/providers/ntfy.ts
|
|
@@ -12,7 +12,7 @@ var NtfyProvider = class {
|
|
|
12
12
|
if (!cfg.enabled || !cfg.url) return false;
|
|
13
13
|
try {
|
|
14
14
|
const headers = { "Content-Type": "text/plain; charset=utf-8" };
|
|
15
|
-
if (payload.title) headers["Title"] = payload.title
|
|
15
|
+
if (payload.title) headers["Title"] = /^[\x20-\x7e]*$/.test(payload.title) ? payload.title : `=?UTF-8?B?${Buffer.from(payload.title, "utf8").toString("base64")}?=`;
|
|
16
16
|
if (cfg.priority && cfg.priority !== "default") headers["Priority"] = cfg.priority;
|
|
17
17
|
return (await fetch(cfg.url, {
|
|
18
18
|
method: "POST",
|
|
@@ -135,10 +135,20 @@ var MacOsProvider = class {
|
|
|
135
135
|
if (!config.channels.macos.enabled) return false;
|
|
136
136
|
if (process.platform !== "darwin") return false;
|
|
137
137
|
try {
|
|
138
|
-
const
|
|
139
|
-
const
|
|
138
|
+
const title = payload.title ?? "PAI";
|
|
139
|
+
const args = [
|
|
140
|
+
"-e",
|
|
141
|
+
"on run argv",
|
|
142
|
+
"-e",
|
|
143
|
+
"display notification (item 1 of argv) with title (item 2 of argv)",
|
|
144
|
+
"-e",
|
|
145
|
+
"end run",
|
|
146
|
+
"--",
|
|
147
|
+
payload.message,
|
|
148
|
+
title
|
|
149
|
+
];
|
|
140
150
|
return new Promise((resolve) => {
|
|
141
|
-
const child = spawn("osascript",
|
|
151
|
+
const child = spawn("osascript", args, {
|
|
142
152
|
detached: true,
|
|
143
153
|
stdio: "ignore"
|
|
144
154
|
});
|
|
@@ -268,4 +278,4 @@ async function routeNotification(payload, config) {
|
|
|
268
278
|
|
|
269
279
|
//#endregion
|
|
270
280
|
export { routeNotification as n, recordedNotifications as t };
|
|
271
|
-
//# sourceMappingURL=router-
|
|
281
|
+
//# sourceMappingURL=router-CQSc3lk3.mjs.map
|