@tekmidian/pai 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/{auto-route-B7Yu6Uam.mjs → auto-route-DUYr57rs.mjs} +2 -2
- package/dist/auto-route-DWYK_0i0.mjs +11 -0
- package/dist/budget-DX-VIWGf.mjs +15 -0
- package/dist/{caller-identity-yLFb7CKq.mjs → caller-identity-Bim8JT-D.mjs} +3 -3
- package/dist/{capacity-DEveQdFV.mjs → capacity-CsZMkVyg.mjs} +7 -4
- package/dist/{chain-7n9Gx56r.mjs → chain-Dzz6xcKH.mjs} +5 -5
- package/dist/cli/index.mjs +114 -208
- package/dist/{cockpit-actions-BBHeyEZI.mjs → cockpit-actions-BTA1njMO.mjs} +31 -25
- package/dist/{cockpit-actions-DR9X514g.mjs → cockpit-actions-BgsiNcUY.mjs} +18 -18
- package/dist/cockpit-memory-DIrNs4xr.mjs +20 -0
- package/dist/config/defaults/config.yaml +9 -0
- package/dist/{config-XpZWOYOG.mjs → config-CST2uq1v.mjs} +29 -4
- package/dist/{config-Bu1_vbY8.mjs → config-DYbyEe4-.mjs} +2 -2
- package/dist/{config-DtENJ6cL.mjs → config-Dv3t7xnT.mjs} +1 -1
- package/dist/config-h5qK3fst.mjs +4 -0
- package/dist/{controls-CPoeudou.mjs → controls-OiVVbe-f.mjs} +18 -16
- package/dist/daemon/index.mjs +38 -37
- package/dist/{daemon-DPAo6WTa.mjs → daemon-C1dycZ3W.mjs} +35 -29
- package/dist/daemon-ieo0lnpq.mjs +46 -0
- package/dist/daemon-mcp/index.mjs +35 -35
- package/dist/detect-C0ZBXqDL.mjs +10 -0
- package/dist/{detect-9CZNO0yf.mjs → detect-CHuxFrLy.mjs} +2 -2
- package/dist/{embed-pass-DIWjA68P.mjs → embed-pass-DtVF2fOV.mjs} +4 -4
- package/dist/{embedding-gate-Cnk4YCyX.mjs → embedding-gate-B98PK_wz.mjs} +2 -2
- package/dist/{embedding-gate-6rZrWRXa.mjs → embedding-gate-CTAk8STe.mjs} +2 -2
- package/dist/{endreason-C577xIQz.mjs → endreason-BqyyU7BH.mjs} +20 -6
- package/dist/{factory-DjAAsqr_.mjs → factory-BV0MQA3T.mjs} +4 -4
- package/dist/{factory-Bsib-qDG.mjs → factory-DeASMV7Z.mjs} +4 -4
- package/dist/{fallback-DFlItw1Z.mjs → fallback-Bj2cyVk_.mjs} +230 -8
- package/dist/{health-Dnym-qcT.mjs → health-kufVIf6i.mjs} +4 -4
- package/dist/{helpers-BD6V-p9w.mjs → helpers-CvbYEKoD.mjs} +2 -2
- package/dist/{helpers-CMGjy_0N.mjs → helpers-WV8tdQHM.mjs} +5 -5
- package/dist/hooks/block-sleep-poll.mjs +1 -1
- package/dist/hooks/capture-all-events.mjs +21 -2
- package/dist/hooks/capture-tool-output.mjs +21 -2
- package/dist/hooks/load-project-context.mjs +7 -7
- package/dist/hooks/local-model-hint.mjs +1 -1
- package/dist/hooks/route-agents-to-worker.mjs +1 -1
- package/dist/hooks/security-validator.mjs +2 -2
- package/dist/hooks/worker-edit-repair.mjs +2 -2
- package/dist/hooks/worker-guard.mjs +8 -8
- package/dist/hooks/worker-note.mjs +2 -2
- package/dist/hooks/worker-pool-host.mjs +158 -55
- package/dist/hooks/worker-proxy.mjs +1 -1
- package/dist/hooks/worker-status-line.mjs +50 -22
- package/dist/hooks/worker-supervision.mjs +1 -1
- package/dist/hooks/worker-tool-name-repair.mjs +2 -2
- package/dist/index.mjs +8 -8
- package/dist/{indexer-backend-Cll7le4P.mjs → indexer-backend-B2vtFl38.mjs} +37 -234
- package/dist/{ipc-client-CaiGJnSM.mjs → ipc-client-CnYEF31R.mjs} +1 -1
- package/dist/{ipc-client-ZRmDKd5Z.mjs → ipc-client-DN7EvoVo.mjs} +1 -1
- package/dist/kill-tree-CXZ0WfVf.mjs +10 -0
- package/dist/{kill-tree-EWYaEk5v.mjs → kill-tree-CcpsRLCZ.mjs} +7 -7
- package/dist/{launch-Jh5NVeNe.mjs → launch-DpQPZGsT.mjs} +3 -3
- package/dist/{launch-CXVlZjHt.mjs → launch-UPQBoW2q.mjs} +3 -3
- package/dist/{local-candidate-DLdwQt0s.mjs → local-candidate-Cp_bw4kK.mjs} +3 -3
- package/dist/{local-instances-ZeRkkuS5.mjs → local-instances-B-c-CxzP.mjs} +4 -4
- package/dist/{local-instances-DOxSgT_L.mjs → local-instances-bdCNNSsL.mjs} +2 -2
- package/dist/{local-tiers-BE4jGaMa.mjs → local-tiers-BtdEEe5n.mjs} +2 -2
- package/dist/{local-tiers-DNMI5W86.mjs → local-tiers-OBqAAfOg.mjs} +3 -3
- package/dist/{main-config-ops-BEMpuhDz.mjs → main-config-ops-BYsK3BxM.mjs} +3 -3
- package/dist/{main-resolver-3Ns1HPmS.mjs → main-resolver-CAC3xfZM.mjs} +17 -17
- package/dist/{model-inventory-BFVSNFT3.mjs → model-inventory-BuTpi9a6.mjs} +13 -13
- package/dist/{models-add-C1QIc1DA.mjs → models-add-CJx2YAwh.mjs} +37 -36
- package/dist/operator-Bpxq_WB5.mjs +7 -0
- package/dist/{operator-CyuB3aVw.mjs → operator-DrwWItVt.mjs} +2 -2
- package/dist/{pai-marker-BcZyJguM.mjs → pai-marker-DLKJ9Yr5.mjs} +2 -2
- package/dist/{pane-audit-DKQt71s4.mjs → pane-audit-wv9UkyCe.mjs} +27 -9
- package/dist/{paths-CFHTloSe.mjs → paths-DBd78I7Z.mjs} +3 -3
- package/dist/{paths-CHifubDh.mjs → paths-DS5VQKoR.mjs} +3 -3
- package/dist/{planner-BmFACdLa.mjs → planner-K0mFrCpL.mjs} +28 -28
- package/dist/{pool-Dh-q3iJi.mjs → pool-BZ94nFuq.mjs} +2 -2
- package/dist/{pool-cli-BggU8GRp.mjs → pool-cli-B1eKySeN.mjs} +5 -5
- package/dist/{pool-cli-DQ6OzRy2.mjs → pool-cli-BjYQDfx6.mjs} +6 -6
- package/dist/{postgres-C6ti4haA.mjs → postgres-C-T5OWer.mjs} +19 -9
- package/dist/{postgres-BdBNkL_l.mjs → postgres-CBHY5PIi.mjs} +3 -3
- package/dist/{project-setup-jvfONJTQ.mjs → project-setup-pIPHZaXf.mjs} +26 -246
- package/dist/{providers-CblTFrhz.mjs → providers-Dzx5GAUI.mjs} +6 -6
- package/dist/providers-QJzpaNhX.mjs +16 -0
- package/dist/{query-feedback-BRfPtqki.mjs → query-feedback-DN52N9C5.mjs} +1 -1
- package/dist/{registrable-DpyTtajg.mjs → registrable-CXBBpUcz.mjs} +4 -4
- package/dist/registrable-Drn8wIDO.mjs +9 -0
- package/dist/render-C4KR8qQ8.mjs +13 -0
- package/dist/{render-BYmQkuLd.mjs → render-Cz3BWIBO.mjs} +8 -8
- package/dist/root-Bfb1zgwE.mjs +36 -0
- package/dist/{root-Xglu0OPD.mjs → root-bG48WVpW.mjs} +10 -10
- package/dist/route-table-ZVMNBsy7.mjs +15 -0
- package/dist/{routing-BAAST9vT.mjs → routing-BlD_tKjW.mjs} +136 -18
- package/dist/{routing-CENt4HH1.mjs → routing-D27jxj9x.mjs} +13 -13
- package/dist/{run-CSC7mgPf.mjs → run-AZVwceiU.mjs} +49 -27
- package/dist/{scan-C_Y5W9py.mjs → scan-C3uotg_f.mjs} +5 -5
- package/dist/{scope-D-h6F6DN.mjs → scope-D8HK6vU7.mjs} +4 -4
- package/dist/{session-8iqQDkqb.mjs → session-BAfypQb9.mjs} +26 -26
- package/dist/session-BcnhepLZ.mjs +35 -0
- package/dist/{session-scan-W-gbwJHM.mjs → session-scan-BmnjSReu.mjs} +5 -5
- package/dist/session-scan-CqUQdCac.mjs +9 -0
- package/dist/session-usage-oycSdiD3.mjs +337 -0
- package/dist/{sources-ESUkZaWv.mjs → sources-CiE3rZek.mjs} +1 -1
- package/dist/{status-ggJ7lgVg.mjs → status-COtzewKV.mjs} +3 -3
- package/dist/{status-Dm4dYciN.mjs → status-D_SWmOlH.mjs} +4 -4
- package/dist/{tool-errors-CJWODvlo.mjs → tool-errors-B2LnIqR0.mjs} +6 -6
- package/dist/{tool-errors-7E13StWd.mjs → tool-errors-DXJ70-sr.mjs} +2 -2
- package/dist/{viewer-mDXUNHNy.mjs → viewer-BgGRqXfD.mjs} +14 -14
- package/dist/viewer-CbGN2Ri4.mjs +22 -0
- package/dist/{wait-ByV0OyMZ.mjs → wait-ChpHKJZV.mjs} +3 -3
- package/dist/worker-config-D1KVAMp4.mjs +42 -0
- package/dist/{worker-config-CJhEMk19.mjs → worker-config-DgdT0iTB.mjs} +443 -40
- package/dist/workers-config-BhZBrR-Q.mjs +4 -0
- package/dist/{worktree-CRs2gyg0.mjs → worktree-BY--Rgmy.mjs} +5 -5
- package/dist/{zettelkasten-B_rRRRvD.mjs → zettelkasten-BHVx5zj-.mjs} +4 -4
- package/dist/{zettelkasten-BzMm8REH.mjs → zettelkasten-LoH9RBiN.mjs} +2 -2
- package/docs/cockpit.md +1 -0
- package/docs/commands/README.md +1 -0
- package/docs/commands/config.md +20 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- 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/capture-all-events.ts +15 -3
- package/src/hooks/ts/lib/raw-capture.ts +7 -0
- package/src/hooks/ts/post-tool-use/capture-tool-output.ts +13 -3
- package/dist/auto-route-CjjQqU1o.mjs +0 -11
- package/dist/budget-Dod6rnA9.mjs +0 -15
- package/dist/cockpit-memory--dnShXBA.mjs +0 -20
- package/dist/config-Cxi-aBf4.mjs +0 -4
- package/dist/daemon-DKdBNKfa.mjs +0 -45
- package/dist/detect-D1ziFFfA.mjs +0 -10
- package/dist/kill-tree-BG7dRVtp.mjs +0 -10
- package/dist/operator-BTqvTIc8.mjs +0 -7
- package/dist/providers-BeDiVEb-.mjs +0 -16
- package/dist/registrable-BzH4TObg.mjs +0 -9
- package/dist/render-CoMvwMPs.mjs +0 -13
- package/dist/root-FtJsxYnm.mjs +0 -36
- package/dist/route-table-B7zpoypi.mjs +0 -15
- package/dist/session-BeqAbNPd.mjs +0 -35
- package/dist/session-scan-BJI_ZO8M.mjs +0 -9
- package/dist/viewer-CqozWW39.mjs +0 -22
- package/dist/worker-config-DESkIjMF.mjs +0 -41
- package/dist/workers-config-f8KrkY4L.mjs +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./config-
|
|
1
|
+
import "./config-DYbyEe4-.mjs";
|
|
2
2
|
import "./helpers-CRuBUas3.mjs";
|
|
3
|
-
import { o as buildPgTsQuery, t as PostgresBackend } from "./postgres-
|
|
4
|
-
import "./embedding-gate-
|
|
3
|
+
import { o as buildPgTsQuery, t as PostgresBackend } from "./postgres-C-T5OWer.mjs";
|
|
4
|
+
import "./embedding-gate-CTAk8STe.mjs";
|
|
5
5
|
import "./embeddings-BVq3esBF.mjs";
|
|
6
6
|
|
|
7
7
|
export { PostgresBackend };
|
|
@@ -1,32 +1,32 @@
|
|
|
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 {
|
|
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 breakStaleMutex } from "./caller-identity-
|
|
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 tierProviderNames, t as isLocalCandidate } from "./local-candidate-
|
|
3
|
+
import { M as readWorkersSection, Q as readMergeVerify, c as WorkersConfigError, f as escalationCloud, h as isModelCapability, m as isLocalProvider, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-CST2uq1v.mjs";
|
|
4
|
+
import { i as ledgerPath, r as eventsPath, u as workersLogDir } from "./paths-DS5VQKoR.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-BY--Rgmy.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-COtzewKV.mjs";
|
|
7
|
+
import { p as currentWorkerId } from "./scope-D8HK6vU7.mjs";
|
|
8
|
+
import { C as detectSessionProvider, Cn as resolveLocalProvider, St as gcSettingsFiles, cn as detectSessionName, hn as LOCAL_MECHANISM_LINE, ln as BATCH_ENV, pt as isLoopbackProvider, wn as resolveRunnerProvider, xn as probeLoopback } from "./routing-BlD_tKjW.mjs";
|
|
9
|
+
import { C as statusMarker, S as realDeps, T as waitOn, a as runWait, w as statusQueue } from "./wait-ChpHKJZV.mjs";
|
|
10
|
+
import { n as breakStaleMutex } from "./caller-identity-Bim8JT-D.mjs";
|
|
11
|
+
import { a as liveQueue, f as sessionOf, l as reorderQueue, o as providerCap, s as queueRows, t as admitCap } from "./capacity-CsZMkVyg.mjs";
|
|
12
|
+
import { n as tierProviderNames, t as isLocalCandidate } from "./local-candidate-Cp_bw4kK.mjs";
|
|
13
13
|
import { n as OPT, t as CliError } from "./define-CjJsmq-6.mjs";
|
|
14
|
-
import { c as resolveFromModule } from "./postgres-
|
|
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-
|
|
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
|
|
17
|
-
import { R as parentFromEnv } from "./render-
|
|
18
|
-
import { r as sayToWorker } from "./operator-
|
|
19
|
-
import { i as killTree } from "./kill-tree-
|
|
20
|
-
import { t as runChain } from "./chain-
|
|
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-
|
|
22
|
-
import { a as followTailOutput, d as psOutput, f as replayOutput, m as statusLineOutput, o as followWorkers } from "./viewer-
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
14
|
+
import { c as resolveFromModule } from "./postgres-C-T5OWer.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-AZVwceiU.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 } from "./controls-OiVVbe-f.mjs";
|
|
17
|
+
import { R as parentFromEnv } from "./render-Cz3BWIBO.mjs";
|
|
18
|
+
import { r as sayToWorker } from "./operator-DrwWItVt.mjs";
|
|
19
|
+
import { i as killTree } from "./kill-tree-CcpsRLCZ.mjs";
|
|
20
|
+
import { t as runChain } from "./chain-Dzz6xcKH.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-wv9UkyCe.mjs";
|
|
22
|
+
import { a as followTailOutput, d as psOutput, f as replayOutput, m as statusLineOutput, o as followWorkers } from "./viewer-BgGRqXfD.mjs";
|
|
23
|
+
import { a as DEFAULT_IDLE_SECS, o as commandToRun, s as runProbed } from "./fallback-Bj2cyVk_.mjs";
|
|
24
|
+
import { _ as unsetCapabilityPreference, a as describeCapabilities, c as modelPrefsText, d as setCapabilityPreference, h as setProviderModel, o as describeModels, u as resolveProviderName } from "./providers-Dzx5GAUI.mjs";
|
|
25
|
+
import { appendFileSync, copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, rmdirSync, statSync, writeFileSync } from "node:fs";
|
|
25
26
|
import { createHash, randomBytes } from "node:crypto";
|
|
26
|
-
import { basename, dirname,
|
|
27
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
27
28
|
import { tmpdir } from "node:os";
|
|
28
29
|
import { execFileSync, spawn } from "node:child_process";
|
|
29
|
-
import { fileURLToPath } from "node:url";
|
|
30
30
|
import { parse } from "yaml";
|
|
31
31
|
|
|
32
32
|
//#region src/workers/specfile.ts
|
|
@@ -467,226 +467,6 @@ function spawnPaiWorker(argv, cwd) {
|
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
//#endregion
|
|
471
|
-
//#region src/workers/hang-probe.ts
|
|
472
|
-
/**
|
|
473
|
-
* hang-probe.ts — `pai worker test-run -- <command>`: runs a test command and, when it goes silent,
|
|
474
|
-
* tells the model WHERE it is stuck.
|
|
475
|
-
*
|
|
476
|
-
* A synchronous infinite loop blocks Node's event loop, so the test runner cannot even report its own
|
|
477
|
-
* timeout and the model sees nothing. Node's `--report-on-signal` does not help: it is serviced by the
|
|
478
|
-
* event loop (measured: a `while(true){}` process never writes the report). The child therefore runs with a
|
|
479
|
-
* preloaded watchdog (NODE_OPTIONS --require): a worker thread per process that, when a trigger file appears,
|
|
480
|
-
* attaches the inspector to the main thread, pauses it (V8 interrupts a running loop) and writes the call
|
|
481
|
-
* frames. After the command was silent for the idle threshold the wrapper triggers every node process under
|
|
482
|
-
* it and maps the frames to the worktree's files. The worker guard rewrites test commands into this wrapper
|
|
483
|
-
* (see wrapTestCommand).
|
|
484
|
-
*/
|
|
485
|
-
/** Marker line every diagnosis carries; the loop guard keys on it. */
|
|
486
|
-
const HANG_MARKER = "[pai hang probe]";
|
|
487
|
-
const DEFAULT_IDLE_SECS = 60;
|
|
488
|
-
/** Seconds of the first `timeout N` in the command, else null. */
|
|
489
|
-
function timeoutSecs(command) {
|
|
490
|
-
const m = /\b(?:g?timeout)\s+(?:-[ks]\s+\S+\s+|-\S+\s+)*(\d+(?:\.\d+)?)([smhd]?)\b/.exec(command);
|
|
491
|
-
if (!m) return null;
|
|
492
|
-
return Number(m[1]) * {
|
|
493
|
-
"": 1,
|
|
494
|
-
s: 1,
|
|
495
|
-
m: 60,
|
|
496
|
-
h: 3600,
|
|
497
|
-
d: 86400
|
|
498
|
-
}[m[2]];
|
|
499
|
-
}
|
|
500
|
-
function killQuiet(pid, sig) {
|
|
501
|
-
try {
|
|
502
|
-
process.kill(pid, sig);
|
|
503
|
-
} catch {}
|
|
504
|
-
}
|
|
505
|
-
function rmQuiet(f) {
|
|
506
|
-
try {
|
|
507
|
-
unlinkSync(f);
|
|
508
|
-
} catch {}
|
|
509
|
-
}
|
|
510
|
-
const shq = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
511
|
-
/** The command line test-run executes: the decoded --cmd-b64 payload, else the words after `--`, each shell-quoted. */
|
|
512
|
-
function commandToRun(cmdB64, words) {
|
|
513
|
-
if (cmdB64) return Buffer.from(cmdB64, "base64").toString("utf8");
|
|
514
|
-
return words.map(shq).join(" ");
|
|
515
|
-
}
|
|
516
|
-
/** Call frames of one probed process, user code only, files relative to cwd. */
|
|
517
|
-
function userFrames(frames, cwd) {
|
|
518
|
-
const out = [];
|
|
519
|
-
for (const f of frames) {
|
|
520
|
-
let file = f.url;
|
|
521
|
-
if (file.startsWith("file://")) try {
|
|
522
|
-
file = fileURLToPath(file);
|
|
523
|
-
} catch {
|
|
524
|
-
continue;
|
|
525
|
-
}
|
|
526
|
-
if (!file || file.startsWith("node:") || file.includes("node_modules") || !isAbsolute(file)) continue;
|
|
527
|
-
const rel = relative(cwd, file);
|
|
528
|
-
if (rel.startsWith("..")) continue;
|
|
529
|
-
out.push({
|
|
530
|
-
fn: f.functionName || "(anonymous)",
|
|
531
|
-
file: rel,
|
|
532
|
-
line: f.lineNumber + 1
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
return out;
|
|
536
|
-
}
|
|
537
|
-
/** The model-facing diagnosis for the reports taken after `idleSecs` of silence. */
|
|
538
|
-
function diagnose(probed, cwd, idleSecs) {
|
|
539
|
-
const stuck = probed.map((r) => userFrames(r, cwd)).find((f) => f.length > 0);
|
|
540
|
-
if (stuck) {
|
|
541
|
-
const [top, ...rest] = stuck;
|
|
542
|
-
const via = rest[0] ? ` (called from ${rest[0].file}:${rest[0].line} ${rest[0].fn}())` : "";
|
|
543
|
-
return `${HANG_MARKER} test run hung with no output for ${idleSecs} s; the main thread is stuck in ${top.file}:${top.line} ${top.fn}()${via}. A synchronous loop that never ends blocks the runner's own timeout. Fix that loop; rerunning unchanged will hang again.\n` + stuck.slice(0, 6).map((f) => ` at ${f.fn} (${f.file}:${f.line})`).join("\n");
|
|
544
|
-
}
|
|
545
|
-
return `${HANG_MARKER} test run printed nothing for ${idleSecs} s and the main thread is idle in the event loop: it is waiting (async), not spinning. A test awaits a promise, timer, process or socket that never completes (vitest's own per-test timeout ends it unless the test raised it). Find the await and give it an end; rerunning unchanged will wait again.`;
|
|
546
|
-
}
|
|
547
|
-
function listProcs() {
|
|
548
|
-
try {
|
|
549
|
-
return psTable("pid=,ppid=,command=").split("\n").flatMap((l) => {
|
|
550
|
-
const m = /^\s*(\d+)\s+(\d+)\s+(.*)$/.exec(l);
|
|
551
|
-
return m ? [{
|
|
552
|
-
pid: Number(m[1]),
|
|
553
|
-
ppid: Number(m[2]),
|
|
554
|
-
cmd: m[3]
|
|
555
|
-
}] : [];
|
|
556
|
-
});
|
|
557
|
-
} catch {
|
|
558
|
-
return [];
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
/** Pids of node processes below `root`. */
|
|
562
|
-
function nodeDescendants(root, procs = listProcs()) {
|
|
563
|
-
const seen = new Set([root]);
|
|
564
|
-
for (let grew = true; grew;) {
|
|
565
|
-
grew = false;
|
|
566
|
-
for (const p of procs) if (!seen.has(p.pid) && seen.has(p.ppid)) seen.add(p.pid), grew = true;
|
|
567
|
-
}
|
|
568
|
-
return procs.filter((p) => p.pid !== root && seen.has(p.pid) && /(?:^|\/)node(?:\s|$)/.test(p.cmd)).map((p) => p.pid);
|
|
569
|
-
}
|
|
570
|
-
/** Runs the command, passes its output through, probes once when it goes silent. Resolves to the exit code. */
|
|
571
|
-
async function runProbed(o) {
|
|
572
|
-
const out = o.out ?? ((s) => process.stdout.write(s));
|
|
573
|
-
const err = o.err ?? ((s) => process.stderr.write(s));
|
|
574
|
-
mkdirSync(o.reportDir, { recursive: true });
|
|
575
|
-
const t = timeoutSecs(o.command);
|
|
576
|
-
const idle = Math.max(2, Math.min(o.idleSecs ?? DEFAULT_IDLE_SECS, t !== null ? t - 8 : Infinity));
|
|
577
|
-
const preload = join(o.reportDir, "preload.cjs");
|
|
578
|
-
writeFileSync(preload, PRELOAD_SOURCE);
|
|
579
|
-
const env = {
|
|
580
|
-
...process.env,
|
|
581
|
-
PAI_HANG_PROBE_DIR: o.reportDir,
|
|
582
|
-
NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ""} --require=${preload}`.trim()
|
|
583
|
-
};
|
|
584
|
-
const child = spawn("bash", ["-c", o.command], {
|
|
585
|
-
cwd: o.cwd,
|
|
586
|
-
env,
|
|
587
|
-
stdio: [
|
|
588
|
-
"ignore",
|
|
589
|
-
"pipe",
|
|
590
|
-
"pipe"
|
|
591
|
-
]
|
|
592
|
-
});
|
|
593
|
-
let last = Date.now();
|
|
594
|
-
let probing = false;
|
|
595
|
-
let announcedIdle = false;
|
|
596
|
-
let spun = false;
|
|
597
|
-
let pending = Promise.resolve();
|
|
598
|
-
child.stdout.on("data", (d) => (last = Date.now(), out(d.toString())));
|
|
599
|
-
child.stderr.on("data", (d) => (last = Date.now(), err(d.toString())));
|
|
600
|
-
const timer = setInterval(() => {
|
|
601
|
-
if (probing || spun || Date.now() - last < idle * 1e3 || !child.pid) return;
|
|
602
|
-
probing = true;
|
|
603
|
-
const pids = nodeDescendants(child.pid);
|
|
604
|
-
for (const p of pids) writeFileSync(join(o.reportDir, `probe-${p}`), "");
|
|
605
|
-
pending = collectFrames(o.reportDir, pids, 3e3).then((frames) => {
|
|
606
|
-
for (const p of pids) rmQuiet(join(o.reportDir, `probe-${p}`));
|
|
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) {
|
|
612
|
-
spun = true;
|
|
613
|
-
for (const p of [...pids, child.pid]) killQuiet(p, "SIGTERM");
|
|
614
|
-
setTimeout(() => pids.forEach((p) => killQuiet(p, "SIGKILL")), 2e3).unref();
|
|
615
|
-
}
|
|
616
|
-
});
|
|
617
|
-
}, 1e3);
|
|
618
|
-
return await new Promise((resolve) => {
|
|
619
|
-
child.on("close", (code, sig) => {
|
|
620
|
-
clearInterval(timer);
|
|
621
|
-
pending.then(() => resolve(spun ? 124 : code ?? (sig ? 128 + (sig === "SIGKILL" ? 9 : 15) : 1)));
|
|
622
|
-
});
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
/** Frames each probed pid reported (empty list: its main thread was idle); pids that never answered are left out. */
|
|
626
|
-
async function collectFrames(dir, pids, waitMs) {
|
|
627
|
-
const got = /* @__PURE__ */ new Map();
|
|
628
|
-
for (const end = Date.now() + waitMs; Date.now() < end && got.size < pids.length;) {
|
|
629
|
-
for (const p of pids) {
|
|
630
|
-
const f = join(dir, `frames-${p}.json`);
|
|
631
|
-
if (got.has(p) || !existsSync(f)) continue;
|
|
632
|
-
try {
|
|
633
|
-
got.set(p, JSON.parse(readFileSync(f, "utf8")).frames);
|
|
634
|
-
unlinkSync(f);
|
|
635
|
-
} catch {}
|
|
636
|
-
}
|
|
637
|
-
await new Promise((r) => setTimeout(r, 100));
|
|
638
|
-
}
|
|
639
|
-
return [...got.values()];
|
|
640
|
-
}
|
|
641
|
-
/** Preloaded into every node process of the test run (CommonJS, so it also loads under --require). */
|
|
642
|
-
const PRELOAD_SOURCE = `"use strict";
|
|
643
|
-
const { Worker, isMainThread } = require("node:worker_threads");
|
|
644
|
-
if (isMainThread) {
|
|
645
|
-
const code = \`
|
|
646
|
-
const { existsSync, unlinkSync, writeFileSync, renameSync } = require("node:fs");
|
|
647
|
-
const { Session } = require("node:inspector");
|
|
648
|
-
const { workerData } = require("node:worker_threads");
|
|
649
|
-
const trigger = workerData.dir + "/probe-" + workerData.pid;
|
|
650
|
-
const done = (frames) => {
|
|
651
|
-
const tmp = workerData.dir + "/tmp-" + workerData.pid;
|
|
652
|
-
writeFileSync(tmp, JSON.stringify({ frames }));
|
|
653
|
-
renameSync(tmp, workerData.dir + "/frames-" + workerData.pid + ".json");
|
|
654
|
-
};
|
|
655
|
-
setInterval(() => {
|
|
656
|
-
if (!existsSync(trigger)) return;
|
|
657
|
-
try { unlinkSync(trigger); } catch {}
|
|
658
|
-
const s = new Session();
|
|
659
|
-
s.connectToMainThread();
|
|
660
|
-
let answered = false;
|
|
661
|
-
const urls = {}, maps = {};
|
|
662
|
-
s.on("Debugger.scriptParsed", (m) => { urls[m.params.scriptId] = m.params.url; maps[m.params.scriptId] = m.params.sourceMapURL; });
|
|
663
|
-
// transformed code (vite-node, tsx) has shifted lines: map back through its inline source map
|
|
664
|
-
const where = (f) => {
|
|
665
|
-
const id = f.location.scriptId;
|
|
666
|
-
let url = urls[id] || f.url, line = f.location.lineNumber;
|
|
667
|
-
const m = /^data:[^,]*;base64,(.*)$/.exec(maps[id] || "");
|
|
668
|
-
if (m) try {
|
|
669
|
-
const e = new (require("node:module").SourceMap)(JSON.parse(Buffer.from(m[1], "base64").toString())).findEntry(line, f.location.columnNumber || 0);
|
|
670
|
-
if (e && e.originalSource) { url = new URL(e.originalSource, url).href; line = e.originalLine; }
|
|
671
|
-
} catch {}
|
|
672
|
-
return { functionName: f.functionName, url, lineNumber: line };
|
|
673
|
-
};
|
|
674
|
-
s.on("Debugger.paused", (m) => {
|
|
675
|
-
answered = true;
|
|
676
|
-
done(m.params.callFrames.map(where));
|
|
677
|
-
s.post("Debugger.resume", () => s.post("Debugger.disable", () => s.disconnect()));
|
|
678
|
-
});
|
|
679
|
-
s.post("Debugger.enable", () => s.post("Debugger.pause"));
|
|
680
|
-
// an idle event loop runs no JS to pause in
|
|
681
|
-
setTimeout(() => { if (!answered) { done([]); s.post("Debugger.disable", () => s.disconnect()); } }, 800);
|
|
682
|
-
}, 200);
|
|
683
|
-
\`;
|
|
684
|
-
try {
|
|
685
|
-
new Worker(code, { eval: true, workerData: { dir: process.env.PAI_HANG_PROBE_DIR, pid: process.pid } }).unref();
|
|
686
|
-
} catch {}
|
|
687
|
-
}
|
|
688
|
-
`;
|
|
689
|
-
|
|
690
470
|
//#endregion
|
|
691
471
|
//#region src/workers/wait-probes.ts
|
|
692
472
|
/**
|
|
@@ -1686,7 +1466,7 @@ const errorsCommand = {
|
|
|
1686
1466
|
examples: ["pai worker errors", "pai worker errors --since 2h"],
|
|
1687
1467
|
seeAlso: ["pai worker log"],
|
|
1688
1468
|
run: (ctx) => guard("pai worker errors --since 24h", async () => {
|
|
1689
|
-
const { errorsTable, groupToolErrors, parseSince, readToolErrors } = await import("./tool-errors-
|
|
1469
|
+
const { errorsTable, groupToolErrors, parseSince, readToolErrors } = await import("./tool-errors-B2LnIqR0.mjs");
|
|
1690
1470
|
const since = str(ctx.opts.since) ?? "24h";
|
|
1691
1471
|
const ms = parseSince(since);
|
|
1692
1472
|
if (ms === null) throw new Error(`bad --since "${since}" (use 30m, 2h, 1d)`);
|
|
@@ -3232,7 +3012,7 @@ async function projectChecks(cwd, d = {}) {
|
|
|
3232
3012
|
}
|
|
3233
3013
|
async function realDaemonStart() {
|
|
3234
3014
|
try {
|
|
3235
|
-
const [{ PaiClient }, { loadConfig }] = await Promise.all([import("./ipc-client-
|
|
3015
|
+
const [{ PaiClient }, { loadConfig }] = await Promise.all([import("./ipc-client-DN7EvoVo.mjs"), import("./config-Dv3t7xnT.mjs")]);
|
|
3236
3016
|
const s = await new PaiClient(loadConfig().socketPath).status();
|
|
3237
3017
|
return Date.now() - Number(s.uptime) * 1e3;
|
|
3238
3018
|
} catch {
|
|
@@ -3249,4 +3029,4 @@ function realBuildTime() {
|
|
|
3249
3029
|
|
|
3250
3030
|
//#endregion
|
|
3251
3031
|
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 };
|
|
3252
|
-
//# sourceMappingURL=project-setup-
|
|
3032
|
+
//# sourceMappingURL=project-setup-pIPHZaXf.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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 { L as writeWorkersSection, M as readWorkersSection, N as resolveCapability, O as providerCostTier, _ as maskKey, a as MODEL_CAPABILITIES, c as WorkersConfigError, d as defaultWorkersConfig, g as keysDir, h as isModelCapability, o as PROVIDER_TAGS, p as getProviderOrNative, rt as workersYamlPath, t as ANTHROPIC_NATIVE, y as nativeAnthropicProvider } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { n as CONFIG_FILE, o as expandHome, s as homeRel } from "./config-DYbyEe4-.mjs";
|
|
3
|
+
import { u as workersLogDir } from "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import { a as clearCooldown, d as probeQuota, hn as LOCAL_MECHANISM_LINE, p as quotaSkipThreshold, pt as isLoopbackProvider } from "./routing-BlD_tKjW.mjs";
|
|
5
|
+
import { d as resolveCap, t as admitCap } from "./capacity-CsZMkVyg.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-Dzx5GAUI.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./config-CST2uq1v.mjs";
|
|
2
|
+
import "./config-DYbyEe4-.mjs";
|
|
3
|
+
import "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import "./status-COtzewKV.mjs";
|
|
5
|
+
import "./scope-D8HK6vU7.mjs";
|
|
6
|
+
import "./routing-BlD_tKjW.mjs";
|
|
7
|
+
import "./tool-errors-DXJ70-sr.mjs";
|
|
8
|
+
import "./wait-ChpHKJZV.mjs";
|
|
9
|
+
import "./local-tiers-BtdEEe5n.mjs";
|
|
10
|
+
import "./caller-identity-Bim8JT-D.mjs";
|
|
11
|
+
import "./capacity-CsZMkVyg.mjs";
|
|
12
|
+
import "./local-instances-bdCNNSsL.mjs";
|
|
13
|
+
import "./local-candidate-Cp_bw4kK.mjs";
|
|
14
|
+
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-Dzx5GAUI.mjs";
|
|
15
|
+
|
|
16
|
+
export { setProviderEnabled, useProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as workersLogDir } from "./paths-
|
|
3
|
-
import { w as worktreesDir } from "./worktree-
|
|
1
|
+
import { M as readWorkersSection } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { u as workersLogDir } from "./paths-DS5VQKoR.mjs";
|
|
3
|
+
import { w as worktreesDir } from "./worktree-BY--Rgmy.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-CXBBpUcz.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./config-CST2uq1v.mjs";
|
|
2
|
+
import "./config-DYbyEe4-.mjs";
|
|
3
|
+
import "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import "./worktree-BY--Rgmy.mjs";
|
|
5
|
+
import "./status-COtzewKV.mjs";
|
|
6
|
+
import "./pool-BZ94nFuq.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-CXBBpUcz.mjs";
|
|
8
|
+
|
|
9
|
+
export { reportUnregistrable };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./config-CST2uq1v.mjs";
|
|
2
|
+
import "./config-DYbyEe4-.mjs";
|
|
3
|
+
import "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import "./worktree-BY--Rgmy.mjs";
|
|
5
|
+
import "./status-COtzewKV.mjs";
|
|
6
|
+
import "./pool-BZ94nFuq.mjs";
|
|
7
|
+
import "./scope-D8HK6vU7.mjs";
|
|
8
|
+
import { D as fmtElapsed } from "./wait-ChpHKJZV.mjs";
|
|
9
|
+
import "./capacity-CsZMkVyg.mjs";
|
|
10
|
+
import "./endreason-BqyyU7BH.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-Cz3BWIBO.mjs";
|
|
12
|
+
|
|
13
|
+
export { makeColor };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
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 { M as readWorkersSection, p as getProviderOrNative, t as ANTHROPIC_NATIVE, v as nativeAnthropicModels } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { _ as ownedTree } from "./worktree-BY--Rgmy.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-COtzewKV.mjs";
|
|
4
|
+
import { p as currentWorkerId, u as sessionTag } from "./scope-D8HK6vU7.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-ChpHKJZV.mjs";
|
|
6
|
+
import { c as queuedText, f as sessionOf } from "./capacity-CsZMkVyg.mjs";
|
|
7
|
+
import { a as endLabel } from "./endreason-BqyyU7BH.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-Cz3BWIBO.mjs.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./utils-J2b9y8PC.mjs";
|
|
2
|
+
import "./migrate-DrA_OwlZ.mjs";
|
|
3
|
+
import "./config-CST2uq1v.mjs";
|
|
4
|
+
import "./config-DYbyEe4-.mjs";
|
|
5
|
+
import "./paths-DS5VQKoR.mjs";
|
|
6
|
+
import "./worktree-BY--Rgmy.mjs";
|
|
7
|
+
import "./status-COtzewKV.mjs";
|
|
8
|
+
import "./pool-BZ94nFuq.mjs";
|
|
9
|
+
import "./registrable-CXBBpUcz.mjs";
|
|
10
|
+
import "./pai-marker-DLKJ9Yr5.mjs";
|
|
11
|
+
import "./helpers-CRuBUas3.mjs";
|
|
12
|
+
import "./scope-D8HK6vU7.mjs";
|
|
13
|
+
import "./routing-BlD_tKjW.mjs";
|
|
14
|
+
import "./tool-errors-DXJ70-sr.mjs";
|
|
15
|
+
import "./wait-ChpHKJZV.mjs";
|
|
16
|
+
import "./local-tiers-BtdEEe5n.mjs";
|
|
17
|
+
import "./caller-identity-Bim8JT-D.mjs";
|
|
18
|
+
import "./capacity-CsZMkVyg.mjs";
|
|
19
|
+
import "./local-instances-bdCNNSsL.mjs";
|
|
20
|
+
import "./local-candidate-Cp_bw4kK.mjs";
|
|
21
|
+
import "./factory-BV0MQA3T.mjs";
|
|
22
|
+
import "./postgres-C-T5OWer.mjs";
|
|
23
|
+
import "./embedding-gate-CTAk8STe.mjs";
|
|
24
|
+
import "./embeddings-BVq3esBF.mjs";
|
|
25
|
+
import "./router-CQSc3lk3.mjs";
|
|
26
|
+
import "./detect-CHuxFrLy.mjs";
|
|
27
|
+
import "./helpers-CvbYEKoD.mjs";
|
|
28
|
+
import "./scan-C3uotg_f.mjs";
|
|
29
|
+
import "./session-BAfypQb9.mjs";
|
|
30
|
+
import "./launch-DpQPZGsT.mjs";
|
|
31
|
+
import "./health-kufVIf6i.mjs";
|
|
32
|
+
import "./launch-UPQBoW2q.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-bG48WVpW.mjs";
|
|
34
|
+
import "./session-scan-BmnjSReu.mjs";
|
|
35
|
+
|
|
36
|
+
export { runNewWith };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as workersLogDir } from "./paths-
|
|
3
|
-
import { d as terminalHasName } from "./scope-
|
|
4
|
-
import {
|
|
1
|
+
import { M as readWorkersSection, b as nativeOrchestratorModel, p as getProviderOrNative, t as ANTHROPIC_NATIVE } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { u as workersLogDir } from "./paths-DS5VQKoR.mjs";
|
|
3
|
+
import { d as terminalHasName } from "./scope-D8HK6vU7.mjs";
|
|
4
|
+
import { An as httpModelsCheck, Cn as resolveLocalProvider, Dn as allSetups, Fn as setupWorkersLabel, Ln as shortModel, Mn as orchestratorLabel, On as downLocalProviders, Pn as setupProfile, Rn as workersLabel, dn as getProfile, jn as loadSaved, kn as findSetup, mn as updateProfile, o as cooldownRemaining, un as SESSION_NAME_ENV, x as SESSION_WORKER_PROVIDER_ENV } from "./routing-BlD_tKjW.mjs";
|
|
5
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-
|
|
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-
|
|
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-BAfypQb9.mjs";
|
|
7
|
+
import { o as launchableProviderNames, t as LaunchError } from "./launch-DpQPZGsT.mjs";
|
|
8
|
+
import { a as colorEnabled, f as renderTable, n as readBudget, o as makeStyle, p as suggest, t as providerHealth } from "./health-kufVIf6i.mjs";
|
|
9
|
+
import { i as probeResume } from "./launch-UPQBoW2q.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-BcnhepLZ.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-bG48WVpW.mjs.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./config-CST2uq1v.mjs";
|
|
2
|
+
import "./config-DYbyEe4-.mjs";
|
|
3
|
+
import "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import "./status-COtzewKV.mjs";
|
|
5
|
+
import "./scope-D8HK6vU7.mjs";
|
|
6
|
+
import { Bt as resolveSelector, Ft as clearSessionRoute, Gt as servingChip, Ht as routeChoices, It as configuredLocal, Jt as setRoute, Kt as sessionRoutesPatch, Lt as entryLabel, Nt as TIGHT_PERCENT, Pt as applyPolicyToRoutes, Rt as flowText, Ut as routeRows, Vt as resolveSessionArg, Wt as routeText, Xt as tierFlow, Yt as setSessionRoute, Zt as validateRoute, qt as sessionStartTarget, zt as parseSelector } from "./routing-BlD_tKjW.mjs";
|
|
7
|
+
import "./tool-errors-DXJ70-sr.mjs";
|
|
8
|
+
import "./wait-ChpHKJZV.mjs";
|
|
9
|
+
import "./local-tiers-BtdEEe5n.mjs";
|
|
10
|
+
import "./caller-identity-Bim8JT-D.mjs";
|
|
11
|
+
import "./capacity-CsZMkVyg.mjs";
|
|
12
|
+
import "./local-instances-bdCNNSsL.mjs";
|
|
13
|
+
import "./local-candidate-Cp_bw4kK.mjs";
|
|
14
|
+
|
|
15
|
+
export { setRoute };
|