@tekmidian/pai 1.0.4 → 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-21GdHL70.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-D7PFur8Y.mjs → chain-Dzz6xcKH.mjs} +5 -5
- package/dist/cli/index.mjs +107 -91
- package/dist/{cockpit-actions-OodH_vx_.mjs → cockpit-actions-BTA1njMO.mjs} +27 -23
- package/dist/{cockpit-actions-BfRMr2sm.mjs → cockpit-actions-BgsiNcUY.mjs} +17 -17
- package/dist/cockpit-memory-DIrNs4xr.mjs +20 -0
- package/dist/config/defaults/config.yaml +3 -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-JLm6g0yP.mjs → controls-OiVVbe-f.mjs} +15 -15
- package/dist/daemon/index.mjs +37 -36
- package/dist/{daemon-nXanenDM.mjs → daemon-C1dycZ3W.mjs} +28 -26
- package/dist/daemon-ieo0lnpq.mjs +46 -0
- package/dist/daemon-mcp/index.mjs +34 -34
- package/dist/detect-C0ZBXqDL.mjs +10 -0
- package/dist/{detect-BLKsUOgG.mjs → detect-CHuxFrLy.mjs} +2 -2
- package/dist/{embed-pass-e64AwDCa.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-BC-v05H_.mjs → endreason-BqyyU7BH.mjs} +4 -4
- package/dist/{factory-B7nv75rC.mjs → factory-BV0MQA3T.mjs} +4 -4
- package/dist/{factory-Bs9imVMq.mjs → factory-DeASMV7Z.mjs} +4 -4
- package/dist/{fallback-CBWpp2F2.mjs → fallback-Bj2cyVk_.mjs} +6 -6
- package/dist/{health-C4FQmkJn.mjs → health-kufVIf6i.mjs} +4 -4
- package/dist/{helpers-DSNK_1KP.mjs → helpers-CvbYEKoD.mjs} +2 -2
- package/dist/{helpers-Dz7mjTSw.mjs → helpers-WV8tdQHM.mjs} +5 -5
- package/dist/hooks/block-sleep-poll.mjs +1 -1
- 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 +106 -46
- package/dist/hooks/worker-proxy.mjs +1 -1
- package/dist/hooks/worker-status-line.mjs +16 -16
- 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-BdjeL4P8.mjs → indexer-backend-B2vtFl38.mjs} +13 -13
- package/dist/kill-tree-CXZ0WfVf.mjs +10 -0
- package/dist/{kill-tree-DleMNZX3.mjs → kill-tree-CcpsRLCZ.mjs} +7 -7
- package/dist/{launch-Di7N-J5X.mjs → launch-DpQPZGsT.mjs} +3 -3
- package/dist/{launch-DlZTKE3u.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-kTXR8Pyv.mjs → main-config-ops-BYsK3BxM.mjs} +3 -3
- package/dist/{main-resolver-yp_puSSb.mjs → main-resolver-CAC3xfZM.mjs} +17 -17
- package/dist/{model-inventory-h6Z9fN_o.mjs → model-inventory-BuTpi9a6.mjs} +13 -13
- package/dist/{models-add-TVni3A7V.mjs → models-add-CJx2YAwh.mjs} +36 -35
- 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-Lqy9N_Ki.mjs → pane-audit-wv9UkyCe.mjs} +8 -8
- package/dist/{paths-CFHTloSe.mjs → paths-DBd78I7Z.mjs} +3 -3
- package/dist/{paths-CHifubDh.mjs → paths-DS5VQKoR.mjs} +3 -3
- package/dist/{planner-j77ndkBf.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-DNIOQijl.mjs → postgres-C-T5OWer.mjs} +3 -3
- package/dist/{postgres-BK4FP9Zg.mjs → postgres-CBHY5PIi.mjs} +3 -3
- package/dist/{project-setup-CBRtFFh0.mjs → project-setup-pIPHZaXf.mjs} +24 -24
- package/dist/{providers-C9QC0TtO.mjs → providers-Dzx5GAUI.mjs} +6 -6
- package/dist/providers-QJzpaNhX.mjs +16 -0
- 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-C84BqQRC.mjs → render-Cz3BWIBO.mjs} +8 -8
- package/dist/root-Bfb1zgwE.mjs +36 -0
- package/dist/{root-C4oXlXS_.mjs → root-bG48WVpW.mjs} +10 -10
- package/dist/route-table-ZVMNBsy7.mjs +15 -0
- package/dist/{routing-DmkheCRH.mjs → routing-BlD_tKjW.mjs} +15 -15
- package/dist/{routing-f2zulGwD.mjs → routing-D27jxj9x.mjs} +13 -13
- package/dist/{run-BwZKBJZZ.mjs → run-AZVwceiU.mjs} +35 -27
- package/dist/{scan-BBGvU5EB.mjs → scan-C3uotg_f.mjs} +5 -5
- package/dist/{scope-D-h6F6DN.mjs → scope-D8HK6vU7.mjs} +4 -4
- package/dist/{session-Dn5OJXlg.mjs → session-BAfypQb9.mjs} +26 -26
- package/dist/session-BcnhepLZ.mjs +35 -0
- package/dist/{session-scan-DUn10MBd.mjs → session-scan-BmnjSReu.mjs} +5 -5
- package/dist/session-scan-CqUQdCac.mjs +9 -0
- package/dist/{session-usage-CPvXvSkw.mjs → session-usage-oycSdiD3.mjs} +117 -2
- 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-wfKnvnrI.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-eY5Qy4vl.mjs → worker-config-DgdT0iTB.mjs} +139 -33
- package/dist/workers-config-BhZBrR-Q.mjs +4 -0
- package/dist/{worktree-CRs2gyg0.mjs → worktree-BY--Rgmy.mjs} +5 -5
- package/dist/{zettelkasten-tpCRBYvH.mjs → zettelkasten-BHVx5zj-.mjs} +3 -3
- package/dist/{zettelkasten-_h_tUm2T.mjs → zettelkasten-LoH9RBiN.mjs} +2 -2
- 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/dist/auto-route-C3S2W3Bc.mjs +0 -11
- package/dist/budget-BrloTOZW.mjs +0 -15
- package/dist/cockpit-memory-teG9M8bG.mjs +0 -20
- package/dist/config-Cxi-aBf4.mjs +0 -4
- package/dist/daemon-DeYImF1F.mjs +0 -45
- package/dist/detect-Rrimh0xc.mjs +0 -10
- package/dist/kill-tree-SV6hrIa3.mjs +0 -10
- package/dist/operator-BTqvTIc8.mjs +0 -7
- package/dist/providers-FvCLzFge.mjs +0 -16
- package/dist/registrable-BzH4TObg.mjs +0 -9
- package/dist/render-B35bQTE-.mjs +0 -13
- package/dist/root-DD1xx_Vu.mjs +0 -36
- package/dist/route-table-FEfDuhIV.mjs +0 -15
- package/dist/session-BAhtXdxj.mjs +0 -35
- package/dist/session-scan-B57dNuA4.mjs +0 -9
- package/dist/viewer-DEySE4c_.mjs +0 -22
- package/dist/worker-config-CO5FXLAT.mjs +0 -41
- package/dist/workers-config-f8KrkY4L.mjs +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as readPaiMarker } from "./pai-marker-
|
|
1
|
+
import { r as readPaiMarker } from "./pai-marker-DLKJ9Yr5.mjs";
|
|
2
2
|
import { i as populateSlugs } from "./search-RSyeQqj1.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
@@ -158,4 +158,4 @@ function formatAutoRouteJson(result) {
|
|
|
158
158
|
|
|
159
159
|
//#endregion
|
|
160
160
|
export { formatAutoRouteJson as n, detectTopicShift as r, autoRoute as t };
|
|
161
|
-
//# sourceMappingURL=auto-route-
|
|
161
|
+
//# sourceMappingURL=auto-route-DUYr57rs.mjs.map
|
|
@@ -0,0 +1,11 @@
|
|
|
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 "./registrable-CXBBpUcz.mjs";
|
|
8
|
+
import "./pai-marker-DLKJ9Yr5.mjs";
|
|
9
|
+
import { n as formatAutoRouteJson, t as autoRoute } from "./auto-route-DUYr57rs.mjs";
|
|
10
|
+
|
|
11
|
+
export { autoRoute, formatAutoRouteJson };
|
|
@@ -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 { A as budgetSkipReason, D as budgetExceeded, E as budgetCache, M as budgetWall, N as fetchBudgetReading, O as budgetFresh, P as pickBudgetWindow, T as BudgetCache, j as budgetUntilLabel, k as budgetFull, w as BUDGET_TTL_MS } 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 { BUDGET_TTL_MS, BudgetCache, budgetCache, budgetExceeded, budgetFresh, budgetFull, budgetSkipReason, budgetUntilLabel, budgetWall, fetchBudgetReading, pickBudgetWindow };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as paiHomePath, l as claudeHomeDir } from "./runtime-paths-WsO9sJFc.mjs";
|
|
2
|
-
import { f as readMainConfigRaw } from "./config-
|
|
3
|
-
import { i as itermUuid } from "./scope-
|
|
2
|
+
import { f as readMainConfigRaw } from "./config-DYbyEe4-.mjs";
|
|
3
|
+
import { i as itermUuid } from "./scope-D8HK6vU7.mjs";
|
|
4
4
|
import { n as minOf } from "./min-max-DrSRUaWQ.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, rmdirSync, statSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -371,4 +371,4 @@ function callerIdentity(env = process.env, deps = {}) {
|
|
|
371
371
|
|
|
372
372
|
//#endregion
|
|
373
373
|
export { buildSlots as _, buildsDir as a, stallMinutes as b, listBuilds as c, releaseBuildsOf as d, removeTicket as f, waitReason as g, tryStart as h, buildNext as i, listBuildsSync as l, ticketKind as m, breakStaleMutex as n, enqueue as o, renderBuildQueue as p, buildLogPath as r, getTicket as s, callerIdentity as t, patchTicket as u, poolSlots as v, testSlots as x, slotsFor as y };
|
|
374
|
-
//# sourceMappingURL=caller-identity-
|
|
374
|
+
//# sourceMappingURL=caller-identity-Bim8JT-D.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as isLocalProvider } from "./config-
|
|
2
|
-
import { O as reconcileStatuses, g as isLive, s as alive, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-
|
|
1
|
+
import { m as isLocalProvider } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { O as reconcileStatuses, g as isLive, s as alive, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-COtzewKV.mjs";
|
|
3
3
|
import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
|
|
@@ -410,7 +410,8 @@ function queuedText(q) {
|
|
|
410
410
|
async function capacityGate(o) {
|
|
411
411
|
const cfg = capacityOf(o.config);
|
|
412
412
|
if (o.disabled || !cfg.enabled || o.cap === void 0 || o.cap <= 0) return null;
|
|
413
|
-
const { logDir, self
|
|
413
|
+
const { logDir, self } = o;
|
|
414
|
+
let cap = o.cap;
|
|
414
415
|
const load = o.load ?? ((dir) => (reconcileStatuses(dir, /* @__PURE__ */ new Date(), 0), loadStatuses(dir)));
|
|
415
416
|
const now = o.now ?? Date.now;
|
|
416
417
|
const isAlive = o.isAlive ?? alive;
|
|
@@ -462,6 +463,8 @@ async function capacityGate(o) {
|
|
|
462
463
|
o.onWait?.(info());
|
|
463
464
|
for (let n = 0;; n++) {
|
|
464
465
|
await sleep(backoffMs(n));
|
|
466
|
+
const fresh = o.capOf?.();
|
|
467
|
+
if (fresh !== void 0 && fresh > 0) cap = fresh;
|
|
465
468
|
c = check();
|
|
466
469
|
if (c.position === 1 && c.holding < cap) break;
|
|
467
470
|
o.onWait?.(info());
|
|
@@ -488,4 +491,4 @@ async function capacityGate(o) {
|
|
|
488
491
|
|
|
489
492
|
//#endregion
|
|
490
493
|
export { liveQueue as a, queuedText as c, resolveCap as d, sessionOf as f, staggerGate as h, effectiveCap as i, reorderQueue as l, recordWarmup as m, capacityGate as n, providerCap as o, sessionScopeKey as p, capacityOf as r, queueRows as s, admitCap as t, reorderQueueTo as u };
|
|
491
|
-
//# sourceMappingURL=capacity-
|
|
494
|
+
//# sourceMappingURL=capacity-CsZMkVyg.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as ledgerPath, u as workersLogDir } from "./paths-
|
|
3
|
-
import { $ as isFlagToken, S as newWorkerId, nt as shortText } from "./status-
|
|
4
|
-
import { t as runWorker } from "./run-
|
|
1
|
+
import { Et as appendLedger, M as readWorkersSection } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { i as ledgerPath, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
|
|
3
|
+
import { $ as isFlagToken, S as newWorkerId, nt as shortText } from "./status-COtzewKV.mjs";
|
|
4
|
+
import { t as runWorker } from "./run-AZVwceiU.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
|
|
@@ -163,4 +163,4 @@ async function runChain(opts, deps = {}) {
|
|
|
163
163
|
|
|
164
164
|
//#endregion
|
|
165
165
|
export { swapPromptArg as n, runChain as t };
|
|
166
|
-
//# sourceMappingURL=chain-
|
|
166
|
+
//# sourceMappingURL=chain-Dzz6xcKH.mjs.map
|
package/dist/cli/index.mjs
CHANGED
|
@@ -2,64 +2,64 @@
|
|
|
2
2
|
import { _ as warn$1, a as fmtDate, c as ok$1, d as scaffoldProjectDirs, f as shortenPath, g as stripAnsi, h as smartDecodeDir, i as err, l as renderTable$1, m as slugify, n as dim$1, o as header, r as encodeDir, s as now, t as bold$1, u as resolvePath } from "../utils-J2b9y8PC.mjs";
|
|
3
3
|
import { _ as resolvePaiFile, a as paiCacheDir, c as PaiFileMigrationError, d as defaultPaiHomeDir, f as legacyConfigDir, g as paiHomePath, h as paiHomeDir, l as claudeHomeDir, m as migratePaiFile, o as paiSocketPath, p as migratePaiDir, r as daemonLogPath, s as schedulerLogPath, u as claudeProjectsDir } from "../runtime-paths-WsO9sJFc.mjs";
|
|
4
4
|
import { a as slugify$1, i as parseSessionFilename } from "../migrate-DrA_OwlZ.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { A as
|
|
7
|
-
import { i as ledgerPath, n as ensureNoMcpConfig, u as workersLogDir } from "../paths-
|
|
8
|
-
import "../worktree-
|
|
9
|
-
import { B as loadStatusConfig, G as writeSectionToForge, L as formatStale, U as upsertSection, b as loadStatusesCached, g as isLive, h as isChatPane, y as loadStatuses } from "../status-
|
|
10
|
-
import { A as readClaudeJson, N as writeClaudeJson, S as inputSideTokens, h as poolSettings, i as bundleBuildStamp, j as registerMcpScript, k as mcpEntryRunsScript, v as readPoolState, w as expandMcpNames } from "../pool-
|
|
11
|
-
import { a as unregistrableReason, s as worktreeReason } from "../registrable-
|
|
12
|
-
import "../pai-marker-
|
|
5
|
+
import { Et as appendLedger, M as readWorkersSection, R as LOOPBACK_HOST, _t as DEFAULT_CONTEXT_WINDOW, bt as stripModelVariant, c as WorkersConfigError, et as relocateWorkersYaml, f as escalationCloud, m as isLocalProvider, p as getProviderOrNative, rt as workersYamlPath, t as ANTHROPIC_NATIVE, v as nativeAnthropicModels, yt as contextWindowFromModelId } from "../config-CST2uq1v.mjs";
|
|
6
|
+
import { A as DEFAULT_PG_CONNECTION_TIMEOUT_MS, C as migrateMainConfigToYaml, F as quoteIdent, M as isContainerTarget, N as postgresConnectionString, O as readJsonStrict, P as postgresFullTarget, S as MainConfigError, T as resolvedMainConfigPath, c as loadConfig, d as paiConfigYamlFilePath, f as readMainConfigRaw, j as assertPgName, k as writeJsonAtomic, l as migrateConfigFile, n as CONFIG_FILE$2, o as expandHome, p as writeMainConfigRaw, t as CONFIG_DIR, u as paiConfigFilePath } from "../config-DYbyEe4-.mjs";
|
|
7
|
+
import { i as ledgerPath, n as ensureNoMcpConfig, u as workersLogDir } from "../paths-DS5VQKoR.mjs";
|
|
8
|
+
import "../worktree-BY--Rgmy.mjs";
|
|
9
|
+
import { B as loadStatusConfig, G as writeSectionToForge, L as formatStale, U as upsertSection, b as loadStatusesCached, g as isLive, h as isChatPane, y as loadStatuses } from "../status-COtzewKV.mjs";
|
|
10
|
+
import { A as readClaudeJson, N as writeClaudeJson, S as inputSideTokens, h as poolSettings, i as bundleBuildStamp, j as registerMcpScript, k as mcpEntryRunsScript, v as readPoolState, w as expandMcpNames } from "../pool-BZ94nFuq.mjs";
|
|
11
|
+
import { a as unregistrableReason, s as worktreeReason } from "../registrable-CXBBpUcz.mjs";
|
|
12
|
+
import "../pai-marker-DLKJ9Yr5.mjs";
|
|
13
13
|
import "../helpers-CRuBUas3.mjs";
|
|
14
14
|
import { t as applyRecencyBoost } from "../search-RSyeQqj1.mjs";
|
|
15
15
|
import { t as dropItermBundleId } from "../env-BE8mrsxr.mjs";
|
|
16
|
-
import { a as ownerSessionName, d as terminalHasName } from "../scope-
|
|
17
|
-
import { At as
|
|
16
|
+
import { a as ownerSessionName, d as terminalHasName } from "../scope-D8HK6vU7.mjs";
|
|
17
|
+
import { At as resolveBindAddress, Bn as setParkConfigSource, Dn as allSetups, Dt as routerPort, E as budgetCache, Et as routerHandler, F as LimitsCache, Gn as appendUsage, Hn as recordDuration, In as setupsPath, Kn as formatSessionStats, Nn as saveSetup, On as downLocalProviders, Ot as defaultV1Guard, Sn as providerHostPort, U as computeInventory, Un as aggregate, Vn as sharedParker, W as currentInventory, Wn as aggregateBySession, Xn as parseSince, Y as inventoryText, Zn as readUsage, at as readInventoryInput, jn as loadSaved, kt as displayHost, m as readRoutingState, pn as readProfiles, pt as isLoopbackProvider, qn as formatStats, qt as sessionStartTarget, un as SESSION_NAME_ENV, vn as localProviderForDelegation, x as SESSION_WORKER_PROVIDER_ENV, xt as routeVerdictLine, zn as parkConfigFrom } from "../routing-BlD_tKjW.mjs";
|
|
18
18
|
import { n as minOf } from "../min-max-DrSRUaWQ.mjs";
|
|
19
|
-
import "../tool-errors-
|
|
20
|
-
import "../wait-
|
|
21
|
-
import "../local-tiers-
|
|
22
|
-
import { a as buildsDir, c as listBuilds, f as removeTicket, h as tryStart, i as buildNext, o as enqueue, p as renderBuildQueue, r as buildLogPath, s as getTicket, u as patchTicket, v as poolSlots, y as slotsFor } from "../caller-identity-
|
|
19
|
+
import "../tool-errors-DXJ70-sr.mjs";
|
|
20
|
+
import "../wait-ChpHKJZV.mjs";
|
|
21
|
+
import "../local-tiers-BtdEEe5n.mjs";
|
|
22
|
+
import { a as buildsDir, c as listBuilds, f as removeTicket, h as tryStart, i as buildNext, o as enqueue, p as renderBuildQueue, r as buildLogPath, s as getTicket, u as patchTicket, v as poolSlots, y as slotsFor } from "../caller-identity-Bim8JT-D.mjs";
|
|
23
23
|
import { d as setSchedConfigSource, f as sharedScheduler, i as mirrorTo, s as schedConfigFrom } from "../scheduler-CtUyWJ3O.mjs";
|
|
24
|
-
import { i as effectiveCap, o as providerCap, r as capacityOf } from "../capacity-
|
|
25
|
-
import "../local-instances-
|
|
26
|
-
import { n as tierProviderNames, t as isLocalCandidate } from "../local-candidate-
|
|
24
|
+
import { i as effectiveCap, o as providerCap, r as capacityOf } from "../capacity-CsZMkVyg.mjs";
|
|
25
|
+
import "../local-instances-bdCNNSsL.mjs";
|
|
26
|
+
import { n as tierProviderNames, t as isLocalCandidate } from "../local-candidate-Cp_bw4kK.mjs";
|
|
27
27
|
import { n as OPT, t as CliError } from "../define-CjJsmq-6.mjs";
|
|
28
|
-
import { a as getStorageBackend, c as MergeError, f as humanDuration, i as getRegistryBackend, l as federationDbPath, o as oldRegistryPath, r as createStorageBackend, s as registryDbPath, u as oldFederationPath } from "../factory-
|
|
29
|
-
import { c as resolveFromModule, i as retryTransient, n as embedChunksWithBackend, r as indexProjectWithBackend, s as packageRoot } from "../postgres-
|
|
30
|
-
import { d as OLLAMA_ID, f as ollamaDefaultUrl, i as measureThroughput, l as provisionOllama, o as createBackend, s as detectBackends, u as OLLAMA_DEFAULT_MODEL } from "../embedding-gate-
|
|
28
|
+
import { a as getStorageBackend, c as MergeError, f as humanDuration, i as getRegistryBackend, l as federationDbPath, o as oldRegistryPath, r as createStorageBackend, s as registryDbPath, u as oldFederationPath } from "../factory-BV0MQA3T.mjs";
|
|
29
|
+
import { c as resolveFromModule, i as retryTransient, n as embedChunksWithBackend, r as indexProjectWithBackend, s as packageRoot } from "../postgres-C-T5OWer.mjs";
|
|
30
|
+
import { d as OLLAMA_ID, f as ollamaDefaultUrl, i as measureThroughput, l as provisionOllama, o as createBackend, s as detectBackends, u as OLLAMA_DEFAULT_MODEL } from "../embedding-gate-CTAk8STe.mjs";
|
|
31
31
|
import "../embeddings-BVq3esBF.mjs";
|
|
32
32
|
import "../router-CQSc3lk3.mjs";
|
|
33
|
-
import { t as detectProject } from "../detect-
|
|
34
|
-
import { n as getProject$1, o as requireProject, r as getProjectAliases, s as resolveIdentifier } from "../helpers-
|
|
35
|
-
import { a as resolveHome, c as upsertSession, d as scanTranscriptFolders, f as transcriptFiles, l as claudeProjectsDir$1, n as loadScanConfig, o as saveScanConfig, r as migrateScanConfig, s as upsertProject, t as cmdScan, u as findMovedProjects } from "../scan-
|
|
36
|
-
import { A as cmdAdd, B as cmdRebind, F as cmdEdit, H as cmdUnarchive, I as cmdGo, L as cmdInfo$1, M as cmdArchive, N as cmdConsolidate, P as cmdDetect, R as cmdList$1, S as legacy, U as findMovedPath, V as cmdTag$1, _ as cmdList, a as newTop, b as cmdSlug, f as sessionCommand, g as cmdInfo, h as cmdAutoRoute, i as lsCommand, j as cmdAlias, l as renameTop, m as cmdActive, r as collectView, s as openTop, v as cmdRename, x as cmdTag, y as cmdRoute, z as cmdMove } from "../session-
|
|
37
|
-
import { a as detectCurrentProviderName, i as detectCurrentModel, n as buildLaunchPlan, o as launchableProviderNames, r as buildLaunchRows, s as maskLaunchEnv } from "../launch-
|
|
38
|
-
import { a as colorEnabled, c as renderCommandHelp, d as renderOverview, f as renderTable$2, l as renderMarkdown, m as usageLine, o as makeStyle, p as suggest, s as mdCommand, u as renderMore } from "../health-
|
|
39
|
-
import { a as providerResumePlan, n as launchInDir, o as restoreTopLevel, r as launchPrompt, s as resumeArgvText, t as hasConversation } from "../launch-
|
|
40
|
-
import { _ as setupsTable, a as lastSetup, m as rootCommand } from "../root-
|
|
33
|
+
import { t as detectProject } from "../detect-CHuxFrLy.mjs";
|
|
34
|
+
import { n as getProject$1, o as requireProject, r as getProjectAliases, s as resolveIdentifier } from "../helpers-CvbYEKoD.mjs";
|
|
35
|
+
import { a as resolveHome, c as upsertSession, d as scanTranscriptFolders, f as transcriptFiles, l as claudeProjectsDir$1, n as loadScanConfig, o as saveScanConfig, r as migrateScanConfig, s as upsertProject, t as cmdScan, u as findMovedProjects } from "../scan-C3uotg_f.mjs";
|
|
36
|
+
import { A as cmdAdd, B as cmdRebind, F as cmdEdit, H as cmdUnarchive, I as cmdGo, L as cmdInfo$1, M as cmdArchive, N as cmdConsolidate, P as cmdDetect, R as cmdList$1, S as legacy, U as findMovedPath, V as cmdTag$1, _ as cmdList, a as newTop, b as cmdSlug, f as sessionCommand, g as cmdInfo, h as cmdAutoRoute, i as lsCommand, j as cmdAlias, l as renameTop, m as cmdActive, r as collectView, s as openTop, v as cmdRename, x as cmdTag, y as cmdRoute, z as cmdMove } from "../session-BAfypQb9.mjs";
|
|
37
|
+
import { a as detectCurrentProviderName, i as detectCurrentModel, n as buildLaunchPlan, o as launchableProviderNames, r as buildLaunchRows, s as maskLaunchEnv } from "../launch-DpQPZGsT.mjs";
|
|
38
|
+
import { a as colorEnabled, c as renderCommandHelp, d as renderOverview, f as renderTable$2, l as renderMarkdown, m as usageLine, o as makeStyle, p as suggest, s as mdCommand, u as renderMore } from "../health-kufVIf6i.mjs";
|
|
39
|
+
import { a as providerResumePlan, n as launchInDir, o as restoreTopLevel, r as launchPrompt, s as resumeArgvText, t as hasConversation } from "../launch-UPQBoW2q.mjs";
|
|
40
|
+
import { _ as setupsTable, a as lastSetup, m as rootCommand } from "../root-bG48WVpW.mjs";
|
|
41
41
|
import { n as fetchLiveSessions, r as sendToSession, t as callAiBroker } from "../aibroker-client-CQPGqLxL.mjs";
|
|
42
|
-
import { a as resolveSessionByNameOrId, o as scanCacheFilePath, r as migrateSessionScanCache, s as scanSessions, t as fmtAge } from "../session-scan-
|
|
43
|
-
import { A as routerPidFile, B as usageContextTokens, D as routerHandoverFile, E as probeRouter, F as startHandover, I as paneWaiver, L as launchPane, M as routerSwapArgs, P as spawnRouter, R as noTerminalReasons, S as usageJson, T as projectLaunchConfig, b as renderUsage, c as reportOriginWithHost, f as dirtyPaths, g as realRunnerDeps, j as routerRunningPid, k as routerLogFile, l as runMessenger, s as finishDetached, u as startDetached, w as pinNotices, x as transcriptUsage, y as priceTableText } from "../run-
|
|
44
|
-
import { C as readRunLog, D as resumeState, E as requestPlanStop, F as runLogPath, I as PlanTracker, M as dirtyConflicts, O as runExitCode, P as loadPlan, S as planStopPath, T as renderStatus, Y as readRunLock, ht as resolveHostSession, j as PlanError, jt as runPaneExec, k as runPlan, l as PlanReporter, nt as closePaneForWorker, ot as inVisiblePane, q as planLockPath, rt as closeSelfPane, u as QueueReporter, vt as writePaneTitle, w as renderSchedule, x as planStatus, y as blockedMessage, yt as psTable } from "../controls-
|
|
45
|
-
import "../endreason-
|
|
46
|
-
import { N as endBuildWait, j as beginBuildWait } from "../render-
|
|
47
|
-
import "../operator-
|
|
48
|
-
import "../kill-tree-
|
|
49
|
-
import { s as poolReloadLive } from "../pool-cli-
|
|
50
|
-
import "../chain-
|
|
51
|
-
import { _ as issueClaims, a as branchDiff, b as workerCommand, c as runQueue, d as loadSettings, f as move, g as issueClaim, h as renderReview, i as projectChecks, l as QueueStore, m as renderList, n as initProject, o as realQueueDeps, p as queueStatePath, r as isGitProject, s as acceptItems, t as formatCheck, u as again, v as issueStale } from "../project-setup-
|
|
52
|
-
import { m as runInPane, r as closeFinishedPanes } from "../pane-audit-
|
|
53
|
-
import "../viewer-
|
|
54
|
-
import "../fallback-
|
|
55
|
-
import { g as setWorkersEnabled, s as describeProviders } from "../providers-
|
|
56
|
-
import { $ as exportDefaultLayout, B as mergeSettings, G as cachedRows, J as handleCockpit, K as cachedSessionMap, Q as warmCockpit, W as SystemMonitor, X as setEndpointHealth, Y as setActionHooks, Z as setRuntimeSampler, at as withWorkerAttribution, et as loadBuildsConfig, it as sessionDisplayName, lt as providersCommand, n as WORKER_CONFIG_COMMANDS, nt as loadSessionMap, q as cachedWorkerWindows, rt as loadWorkerWindows, t as PROVIDER_EDIT_COMMANDS, tt as createEndpointHealth, z as installWorkers } from "../worker-config-
|
|
57
|
-
import { a as listConfigOp, i as getConfigValueOp, n as formatConfigGetOutput, o as setConfigValueOp, r as formatConfigSource, s as unsetConfigValueOp, t as MainConfigOpsError } from "../main-config-ops-
|
|
58
|
-
import { H as acquireRun, U as readRun, V as cockpitProbeSettings, k as readRuntimeCommands } from "../cockpit-actions-
|
|
42
|
+
import { a as resolveSessionByNameOrId, o as scanCacheFilePath, r as migrateSessionScanCache, s as scanSessions, t as fmtAge } from "../session-scan-BmnjSReu.mjs";
|
|
43
|
+
import { A as routerPidFile, B as usageContextTokens, D as routerHandoverFile, E as probeRouter, F as startHandover, I as paneWaiver, L as launchPane, M as routerSwapArgs, P as spawnRouter, R as noTerminalReasons, S as usageJson, T as projectLaunchConfig, b as renderUsage, c as reportOriginWithHost, f as dirtyPaths, g as realRunnerDeps, j as routerRunningPid, k as routerLogFile, l as runMessenger, s as finishDetached, u as startDetached, w as pinNotices, x as transcriptUsage, y as priceTableText } from "../run-AZVwceiU.mjs";
|
|
44
|
+
import { C as readRunLog, D as resumeState, E as requestPlanStop, F as runLogPath, I as PlanTracker, M as dirtyConflicts, O as runExitCode, P as loadPlan, S as planStopPath, T as renderStatus, Y as readRunLock, ht as resolveHostSession, j as PlanError, jt as runPaneExec, k as runPlan, l as PlanReporter, nt as closePaneForWorker, ot as inVisiblePane, q as planLockPath, rt as closeSelfPane, u as QueueReporter, vt as writePaneTitle, w as renderSchedule, x as planStatus, y as blockedMessage, yt as psTable } from "../controls-OiVVbe-f.mjs";
|
|
45
|
+
import "../endreason-BqyyU7BH.mjs";
|
|
46
|
+
import { N as endBuildWait, j as beginBuildWait } from "../render-Cz3BWIBO.mjs";
|
|
47
|
+
import "../operator-DrwWItVt.mjs";
|
|
48
|
+
import "../kill-tree-CcpsRLCZ.mjs";
|
|
49
|
+
import { s as poolReloadLive } from "../pool-cli-B1eKySeN.mjs";
|
|
50
|
+
import "../chain-Dzz6xcKH.mjs";
|
|
51
|
+
import { _ as issueClaims, a as branchDiff, b as workerCommand, c as runQueue, d as loadSettings, f as move, g as issueClaim, h as renderReview, i as projectChecks, l as QueueStore, m as renderList, n as initProject, o as realQueueDeps, p as queueStatePath, r as isGitProject, s as acceptItems, t as formatCheck, u as again, v as issueStale } from "../project-setup-pIPHZaXf.mjs";
|
|
52
|
+
import { m as runInPane, r as closeFinishedPanes } from "../pane-audit-wv9UkyCe.mjs";
|
|
53
|
+
import "../viewer-BgGRqXfD.mjs";
|
|
54
|
+
import "../fallback-Bj2cyVk_.mjs";
|
|
55
|
+
import { g as setWorkersEnabled, s as describeProviders } from "../providers-Dzx5GAUI.mjs";
|
|
56
|
+
import { $ as exportDefaultLayout, B as mergeSettings, G as cachedRows, J as handleCockpit, K as cachedSessionMap, Q as warmCockpit, W as SystemMonitor, X as setEndpointHealth, Y as setActionHooks, Z as setRuntimeSampler, at as withWorkerAttribution, et as loadBuildsConfig, it as sessionDisplayName, lt as providersCommand, n as WORKER_CONFIG_COMMANDS, nt as loadSessionMap, q as cachedWorkerWindows, rt as loadWorkerWindows, t as PROVIDER_EDIT_COMMANDS, tt as createEndpointHealth, z as installWorkers } from "../worker-config-DgdT0iTB.mjs";
|
|
57
|
+
import { a as listConfigOp, i as getConfigValueOp, n as formatConfigGetOutput, o as setConfigValueOp, r as formatConfigSource, s as unsetConfigValueOp, t as MainConfigOpsError } from "../main-config-ops-BYsK3BxM.mjs";
|
|
58
|
+
import { H as acquireRun, U as readRun, V as cockpitProbeSettings, k as readRuntimeCommands } from "../cockpit-actions-BTA1njMO.mjs";
|
|
59
59
|
import { n as PaiClient } from "../ipc-client-CnYEF31R.mjs";
|
|
60
|
-
import { a as EMBED_PASS_BATCH_SIZE, c as liveYieldCheck, n as DEFAULT_EMBED_MAX_LOAD, o as formatEmbedStatus, r as DEFAULT_EMBED_MAX_MINUTES, s as lastRecordedEmbedPass } from "../embed-pass-
|
|
61
|
-
import { i as totalUsageTokens, r as parseSessionUsage } from "../session-usage-
|
|
62
|
-
import { Bt as findLatestNote, C as migrateSummaryCooldowns, Dt as nextOccurrence, Et as describeQuiet, Ht as readBodyFile, It as readContextHandoverCache, Mt as LAUNCHD_LABEL, Ot as readQuiet, Pt as resolveDaemonPid, Rt as appendCheckpointToNote, St as loadSessionKeepaliveState, Ut as restartRouter, Vt as findNotesDir$1, bt as reapJob, ht as obsidianEnabled, i as reexecBackground, jt as writeQuiet, mt as OBSIDIAN_DISABLED_MESSAGE, o as backfillKgFromNotes, s as migrateKgBackfillState, v as migrateWorkQueue, vt as migrateIdentityFile, wt as sessionKeepaliveLedgerSummary, yt as jobPaths, zt as applyContinue } from "../indexer-backend-
|
|
60
|
+
import { a as EMBED_PASS_BATCH_SIZE, c as liveYieldCheck, n as DEFAULT_EMBED_MAX_LOAD, o as formatEmbedStatus, r as DEFAULT_EMBED_MAX_MINUTES, s as lastRecordedEmbedPass } from "../embed-pass-DtVF2fOV.mjs";
|
|
61
|
+
import { a as liveWorkersConfigShadows, i as totalUsageTokens, r as parseSessionUsage } from "../session-usage-oycSdiD3.mjs";
|
|
62
|
+
import { Bt as findLatestNote, C as migrateSummaryCooldowns, Dt as nextOccurrence, Et as describeQuiet, Ht as readBodyFile, It as readContextHandoverCache, Mt as LAUNCHD_LABEL, Ot as readQuiet, Pt as resolveDaemonPid, Rt as appendCheckpointToNote, St as loadSessionKeepaliveState, Ut as restartRouter, Vt as findNotesDir$1, bt as reapJob, ht as obsidianEnabled, i as reexecBackground, jt as writeQuiet, mt as OBSIDIAN_DISABLED_MESSAGE, o as backfillKgFromNotes, s as migrateKgBackfillState, v as migrateWorkQueue, vt as migrateIdentityFile, wt as sessionKeepaliveLedgerSummary, yt as jobPaths, zt as applyContinue } from "../indexer-backend-B2vtFl38.mjs";
|
|
63
63
|
import { n as queriesDirPath, t as migrateQueriesDir } from "../query-feedback-DN52N9C5.mjs";
|
|
64
64
|
import { appendFileSync, chmodSync, closeSync, copyFileSync, cpSync, createReadStream, createWriteStream, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
65
65
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -830,7 +830,7 @@ function routerSamplerDeps(sched, engineStatusTimeoutMs = () => DEFAULT_RUNTIME_
|
|
|
830
830
|
});
|
|
831
831
|
return {
|
|
832
832
|
inventory: async () => {
|
|
833
|
-
const { currentInventory } = await import("../model-inventory-
|
|
833
|
+
const { currentInventory } = await import("../model-inventory-BuTpi9a6.mjs");
|
|
834
834
|
return currentInventory();
|
|
835
835
|
},
|
|
836
836
|
sched,
|
|
@@ -845,7 +845,7 @@ function routerSamplerDeps(sched, engineStatusTimeoutMs = () => DEFAULT_RUNTIME_
|
|
|
845
845
|
}
|
|
846
846
|
},
|
|
847
847
|
async rssMb(port) {
|
|
848
|
-
const { processTreeRssMb } = await import("../model-inventory-
|
|
848
|
+
const { processTreeRssMb } = await import("../model-inventory-BuTpi9a6.mjs");
|
|
849
849
|
const pid = (await exec("lsof", [
|
|
850
850
|
"-ti",
|
|
851
851
|
`tcp:${port}`,
|
|
@@ -1161,11 +1161,11 @@ const runCommand = {
|
|
|
1161
1161
|
if (!addr) throw new CliError(`cannot resolve router.bind "${bindName}" — use "loopback", "tailscale", or an IPv4 (never 0.0.0.0)`, "pai daemon status");
|
|
1162
1162
|
const remote = addr !== LOOPBACK_HOST;
|
|
1163
1163
|
const extraHosts = (loadConfig().router.allowedHosts ?? []).filter((h) => h.trim());
|
|
1164
|
-
const hosts =
|
|
1165
|
-
bind: addr,
|
|
1164
|
+
const hosts = {
|
|
1165
|
+
bind: bindName || addr,
|
|
1166
1166
|
extraHosts
|
|
1167
|
-
}
|
|
1168
|
-
if (remote &&
|
|
1167
|
+
};
|
|
1168
|
+
if (remote && extraHosts.length === 0) process.stderr.write("pai: router: router.allowedHosts is empty: the cockpit opened by tailnet hostname will be refused (403); add the name to router.allowedHosts\n");
|
|
1169
1169
|
const rows = cachedRows(usageFile);
|
|
1170
1170
|
let schedCache;
|
|
1171
1171
|
setSchedConfigSource(() => {
|
|
@@ -1214,9 +1214,9 @@ const runCommand = {
|
|
|
1214
1214
|
sampler.start();
|
|
1215
1215
|
setRuntimeSampler(sampler);
|
|
1216
1216
|
setActionHooks({ runLocalJob: async (kind, tier) => {
|
|
1217
|
-
const { startTier, stopAll } = await import("../worker-config-
|
|
1218
|
-
const { readLocalConfig } = await import("../local-tiers-
|
|
1219
|
-
const { workersYamlPath } = await import("../workers-config-
|
|
1217
|
+
const { startTier, stopAll } = await import("../worker-config-D1KVAMp4.mjs");
|
|
1218
|
+
const { readLocalConfig } = await import("../local-tiers-OBqAAfOg.mjs");
|
|
1219
|
+
const { workersYamlPath } = await import("../workers-config-BhZBrR-Q.mjs");
|
|
1220
1220
|
const cfg = readLocalConfig(workersYamlPath());
|
|
1221
1221
|
if (kind === "off") return void await stopAll(cfg);
|
|
1222
1222
|
const t = cfg.tiers[tier];
|
|
@@ -1230,10 +1230,8 @@ const runCommand = {
|
|
|
1230
1230
|
setEndpointHealth(endpointHealth);
|
|
1231
1231
|
const serve = (req, res) => handleCockpit(req, res, limits, rows, sessionMap, system, workerWindows);
|
|
1232
1232
|
const inner = routerHandler(void 0, void 0, void 0, usageFile ? () => void 0 : (row) => appendUsage(row), serve, {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
hosts
|
|
1236
|
-
} : {},
|
|
1233
|
+
hosts,
|
|
1234
|
+
...remote ? { remoteAllowed: defaultV1Guard } : {},
|
|
1237
1235
|
isUp: limits.isUp,
|
|
1238
1236
|
health: endpointHealth
|
|
1239
1237
|
});
|
|
@@ -1595,7 +1593,7 @@ const modelsCommand = {
|
|
|
1595
1593
|
if (words[0] === "add") {
|
|
1596
1594
|
const source = words[1];
|
|
1597
1595
|
if (!source) throw new Error("usage: pai models add <hf-id|path> [--name n] [--download] [--try]");
|
|
1598
|
-
const { addModel } = await import("../models-add-
|
|
1596
|
+
const { addModel } = await import("../models-add-CJx2YAwh.mjs");
|
|
1599
1597
|
const r = await addModel({
|
|
1600
1598
|
source,
|
|
1601
1599
|
name: typeof ctx.opts.name === "string" ? ctx.opts.name : void 0,
|
|
@@ -1610,7 +1608,7 @@ const modelsCommand = {
|
|
|
1610
1608
|
if (op) {
|
|
1611
1609
|
const runtime = words[1];
|
|
1612
1610
|
if (!runtime) throw new Error(`usage: pai models ${op} <runtime> (configured: ${Object.keys(readRuntimeCommands()).join(", ") || "none"})`);
|
|
1613
|
-
const { defaultDeps, runtimeStartStop } = await import("../cockpit-actions-
|
|
1611
|
+
const { defaultDeps, runtimeStartStop } = await import("../cockpit-actions-BgsiNcUY.mjs");
|
|
1614
1612
|
const r = await runtimeStartStop(runtime, op, defaultDeps(), { model: typeof ctx.opts.model === "string" ? ctx.opts.model : void 0 });
|
|
1615
1613
|
process.stdout.write(r.message + "\n");
|
|
1616
1614
|
if (!r.ok) process.exitCode = 1;
|
|
@@ -2925,7 +2923,7 @@ async function cmdPause(opts) {
|
|
|
2925
2923
|
process.exitCode = 1;
|
|
2926
2924
|
return;
|
|
2927
2925
|
}
|
|
2928
|
-
const { getRegistryBackend } = await import("../factory-
|
|
2926
|
+
const { getRegistryBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
2929
2927
|
const registryBackend = await getRegistryBackend();
|
|
2930
2928
|
const cwd = process.cwd();
|
|
2931
2929
|
const project = await resolveProjectByCwd(registryBackend, cwd);
|
|
@@ -3025,7 +3023,7 @@ function touchSentinel(rootPath) {
|
|
|
3025
3023
|
async function cmdAutosave(opts) {
|
|
3026
3024
|
const minGap = parseInt(opts.minGap ?? String(DEFAULT_MIN_GAP), 10);
|
|
3027
3025
|
const cwd = process.cwd();
|
|
3028
|
-
const { getRegistryBackend } = await import("../factory-
|
|
3026
|
+
const { getRegistryBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
3029
3027
|
const registryBackend = await getRegistryBackend();
|
|
3030
3028
|
const project = await resolveProjectByCwd(registryBackend, cwd);
|
|
3031
3029
|
if (!project) return;
|
|
@@ -3251,7 +3249,7 @@ function finalizeNote(notePath) {
|
|
|
3251
3249
|
}
|
|
3252
3250
|
async function cmdEnd(opts) {
|
|
3253
3251
|
await cmdPause(opts);
|
|
3254
|
-
const { getRegistryBackend } = await import("../factory-
|
|
3252
|
+
const { getRegistryBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
3255
3253
|
const registryBackend = await getRegistryBackend();
|
|
3256
3254
|
const cwd = process.cwd();
|
|
3257
3255
|
const project = await registryBackend.findProjectByCwdPrefix(cwd);
|
|
@@ -3432,7 +3430,7 @@ function buildStopBody(project, sessionId) {
|
|
|
3432
3430
|
}
|
|
3433
3431
|
}
|
|
3434
3432
|
async function cmdHandover(projectSlug, numberOrLatest, sessionId) {
|
|
3435
|
-
const { getRegistryBackend } = await import("../factory-
|
|
3433
|
+
const { getRegistryBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
3436
3434
|
const registryBackend = await getRegistryBackend();
|
|
3437
3435
|
let project;
|
|
3438
3436
|
if (projectSlug) {
|
|
@@ -4378,8 +4376,8 @@ async function analyzeProject(registryBackend, project) {
|
|
|
4378
4376
|
async function countVectorDbPaths(oldPaths) {
|
|
4379
4377
|
if (oldPaths.length === 0) return 0;
|
|
4380
4378
|
try {
|
|
4381
|
-
const { loadConfig } = await import("../config-
|
|
4382
|
-
const { createStorageBackend } = await import("../factory-
|
|
4379
|
+
const { loadConfig } = await import("../config-Dv3t7xnT.mjs");
|
|
4380
|
+
const { createStorageBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
4383
4381
|
const config = loadConfig();
|
|
4384
4382
|
if (config.storageBackend !== "postgres") return 0;
|
|
4385
4383
|
const backend = await createStorageBackend(config);
|
|
@@ -4396,8 +4394,8 @@ async function countVectorDbPaths(oldPaths) {
|
|
|
4396
4394
|
async function updateVectorDbPaths(moves) {
|
|
4397
4395
|
if (moves.length === 0) return 0;
|
|
4398
4396
|
try {
|
|
4399
|
-
const { loadConfig } = await import("../config-
|
|
4400
|
-
const { createStorageBackend } = await import("../factory-
|
|
4397
|
+
const { loadConfig } = await import("../config-Dv3t7xnT.mjs");
|
|
4398
|
+
const { createStorageBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
4401
4399
|
const config = loadConfig();
|
|
4402
4400
|
if (config.storageBackend !== "postgres") return 0;
|
|
4403
4401
|
const backend = await createStorageBackend(config);
|
|
@@ -4484,7 +4482,7 @@ async function displayDryRun(plans) {
|
|
|
4484
4482
|
console.log();
|
|
4485
4483
|
}
|
|
4486
4484
|
async function executeCleanup(plans, skipReindex) {
|
|
4487
|
-
const { getRegistryBackend } = await import("../factory-
|
|
4485
|
+
const { getRegistryBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
4488
4486
|
const registryBackend = await getRegistryBackend();
|
|
4489
4487
|
let deleted = 0;
|
|
4490
4488
|
let renamed = 0;
|
|
@@ -4684,7 +4682,7 @@ async function executeCleanup(plans, skipReindex) {
|
|
|
4684
4682
|
* them into YYYY/MM/ folders and renumber. Dry run unless `execute` is set.
|
|
4685
4683
|
*/
|
|
4686
4684
|
async function runCleanup(projectSlug, opts) {
|
|
4687
|
-
const { getRegistryBackend } = await import("../factory-
|
|
4685
|
+
const { getRegistryBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
4688
4686
|
const registryBackend = await getRegistryBackend();
|
|
4689
4687
|
const dryRun = !opts.execute;
|
|
4690
4688
|
const skipReindex = opts.reindex === false;
|
|
@@ -8967,8 +8965,8 @@ function cmdLogs(opts) {
|
|
|
8967
8965
|
return 0;
|
|
8968
8966
|
}
|
|
8969
8967
|
async function daemonServeCmd() {
|
|
8970
|
-
const { serve } = await import("../daemon-
|
|
8971
|
-
const { loadConfig: lc, ensureConfigDir } = await import("../config-
|
|
8968
|
+
const { serve } = await import("../daemon-ieo0lnpq.mjs");
|
|
8969
|
+
const { loadConfig: lc, ensureConfigDir } = await import("../config-Dv3t7xnT.mjs");
|
|
8972
8970
|
ensureConfigDir();
|
|
8973
8971
|
await serve(lc());
|
|
8974
8972
|
return 0;
|
|
@@ -12000,7 +11998,7 @@ async function escalate(task, headline, detail, state, now, opts) {
|
|
|
12000
11998
|
let delivered = false;
|
|
12001
11999
|
try {
|
|
12002
12000
|
const { routeNotification } = await import("../router-DwHJRgG9.mjs");
|
|
12003
|
-
const { loadConfig } = await import("../config-
|
|
12001
|
+
const { loadConfig } = await import("../config-Dv3t7xnT.mjs");
|
|
12004
12002
|
delivered = (await routeNotification({
|
|
12005
12003
|
event: "error",
|
|
12006
12004
|
title: `PAI: ${headline}`,
|
|
@@ -13916,6 +13914,16 @@ function configListCmd(opts) {
|
|
|
13916
13914
|
console.log(opts.json ? JSON.stringify(r.data, null, 2) : r.yaml.trimEnd());
|
|
13917
13915
|
return 0;
|
|
13918
13916
|
}
|
|
13917
|
+
/** `pai config validate`: shadowed and unused workers keys across config.yaml and workers.yaml (warnings; exit 0). */
|
|
13918
|
+
function configValidateCmd() {
|
|
13919
|
+
const shadows = liveWorkersConfigShadows();
|
|
13920
|
+
if (!shadows.length) {
|
|
13921
|
+
console.log(ok$1("config.yaml and workers.yaml: no shadowed or unused keys"));
|
|
13922
|
+
return 0;
|
|
13923
|
+
}
|
|
13924
|
+
for (const s of shadows) console.log(`warning: ${s.message}`);
|
|
13925
|
+
return 0;
|
|
13926
|
+
}
|
|
13919
13927
|
function configGetCmd(path, opts) {
|
|
13920
13928
|
try {
|
|
13921
13929
|
const r = getConfigValueOp(path);
|
|
@@ -14192,6 +14200,14 @@ const configSubcommands = [
|
|
|
14192
14200
|
seeAlso: ["pai config migrate", "pai config set"],
|
|
14193
14201
|
run: (ctx) => configUnsetCmd(String(ctx.args.PATH))
|
|
14194
14202
|
},
|
|
14203
|
+
{
|
|
14204
|
+
name: "validate",
|
|
14205
|
+
summary: "Warn about workers settings that are shadowed or unused",
|
|
14206
|
+
description: "Warn about workers settings that are shadowed or unused.\n\nThe non-provider workers.* settings (pool, pane, routing, …) are read from config.yaml only; the routing tables (providers, tiers, classes, mcp_sets, …) from workers.yaml only. Names every key written in the file that does not win, and every top-level workers.yaml block nothing reads.",
|
|
14207
|
+
examples: ["pai config validate", "pai config get workers.pool.maxSlots --source"],
|
|
14208
|
+
seeAlso: ["pai config get", "pai config set"],
|
|
14209
|
+
run: () => configValidateCmd()
|
|
14210
|
+
},
|
|
14195
14211
|
{
|
|
14196
14212
|
name: "migrate",
|
|
14197
14213
|
summary: "Move old settings files into the current layout",
|
|
@@ -14924,7 +14940,7 @@ async function migrateToPostgres(opts = {}) {
|
|
|
14924
14940
|
const dump = pgDump(container, pgConfig, dumpPath);
|
|
14925
14941
|
if (!dump.ok) return refused(dump.reason, dryRun);
|
|
14926
14942
|
}
|
|
14927
|
-
const { PostgresBackend } = await import("../postgres-
|
|
14943
|
+
const { PostgresBackend } = await import("../postgres-CBHY5PIi.mjs");
|
|
14928
14944
|
await PostgresBackend.ensureDatabase(pgConfig);
|
|
14929
14945
|
const sqlite = new BetterSqlite3(sqliteFederationPath, { readonly: true });
|
|
14930
14946
|
const registrySqlite = sqliteRegistryPath === sqliteFederationPath ? sqlite : new BetterSqlite3(sqliteRegistryPath, { readonly: true });
|
|
@@ -16311,7 +16327,7 @@ const out = (s) => process.stdout.write(s + "\n");
|
|
|
16311
16327
|
async function repoOf(project) {
|
|
16312
16328
|
if (typeof project === "string" && project) {
|
|
16313
16329
|
if (existsSync(project)) return resolve(project);
|
|
16314
|
-
const { getProject } = await import("../helpers-
|
|
16330
|
+
const { getProject } = await import("../helpers-WV8tdQHM.mjs");
|
|
16315
16331
|
const row = await getProject(project);
|
|
16316
16332
|
if (!row) throw new CliError(`no project ${project}`, "pai projects list");
|
|
16317
16333
|
return row.root_path;
|
|
@@ -17134,7 +17150,7 @@ async function cmdPromote(opts) {
|
|
|
17134
17150
|
console.error(dim$1(` Pick a durable location for the new project.`));
|
|
17135
17151
|
process.exit(1);
|
|
17136
17152
|
}
|
|
17137
|
-
const { getRegistryBackend } = await import("../factory-
|
|
17153
|
+
const { getRegistryBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
17138
17154
|
const registryBackend = await getRegistryBackend();
|
|
17139
17155
|
const encodedDir = encodeDir(targetPath);
|
|
17140
17156
|
if (await registryBackend.getProjectBySlug(slug) ?? await registryBackend.getProjectByRootPath(targetPath) ?? await registryBackend.getProjectByEncodedDir(encodedDir)) {
|
|
@@ -18378,7 +18394,7 @@ async function cmdUnregister(slug, opts = {}) {
|
|
|
18378
18394
|
* deprecated alias that forwards here with a stderr notice.
|
|
18379
18395
|
*/
|
|
18380
18396
|
async function projectListCmd(opts) {
|
|
18381
|
-
const { cmdMain } = await import("../main-resolver-
|
|
18397
|
+
const { cmdMain } = await import("../main-resolver-CAC3xfZM.mjs");
|
|
18382
18398
|
await cmdMain(void 0, void 0, opts);
|
|
18383
18399
|
return 0;
|
|
18384
18400
|
}
|
|
@@ -19801,7 +19817,7 @@ async function registryScanCmd(opts) {
|
|
|
19801
19817
|
return 0;
|
|
19802
19818
|
}
|
|
19803
19819
|
if (opts.filterReport) {
|
|
19804
|
-
const { reportUnregistrable } = await import("../registrable-
|
|
19820
|
+
const { reportUnregistrable } = await import("../registrable-Drn8wIDO.mjs");
|
|
19805
19821
|
const r = await reportUnregistrable(await getRegistryBackend());
|
|
19806
19822
|
console.log(`Registry rows: ${r.total}`);
|
|
19807
19823
|
console.log(` matching the registration filter: ${r.matching} (${r.matchingMissing} with a missing path)`);
|
|
@@ -21644,7 +21660,7 @@ async function runEmbed(backend, projectId, projectSlug, batchSize = 50, pageSiz
|
|
|
21644
21660
|
const label = projectSlug ? `project ${projectSlug}` : "all projects";
|
|
21645
21661
|
console.log(dim$1(`Generating embeddings for ${label} (this may take a while on first run)...`));
|
|
21646
21662
|
const { serializeEmbedding } = await import("../embeddings-CIkJBKd-.mjs");
|
|
21647
|
-
const { gateBackend } = await import("../embedding-gate-
|
|
21663
|
+
const { gateBackend } = await import("../embedding-gate-B98PK_wz.mjs");
|
|
21648
21664
|
const gate = await gateBackend(backend, { record: true });
|
|
21649
21665
|
if (!gate.ok) {
|
|
21650
21666
|
console.error(err(gate.reason));
|
|
@@ -21973,7 +21989,7 @@ async function memorySearchCmd(query, opts) {
|
|
|
21973
21989
|
let results;
|
|
21974
21990
|
if (mode === "keyword") results = await backend.searchKeyword(query, searchOpts);
|
|
21975
21991
|
else {
|
|
21976
|
-
const { embedQuery } = await import("../embedding-gate-
|
|
21992
|
+
const { embedQuery } = await import("../embedding-gate-B98PK_wz.mjs");
|
|
21977
21993
|
console.log(dim$1("Generating query embedding..."));
|
|
21978
21994
|
const q = await embedQuery(backend, query);
|
|
21979
21995
|
const queryEmbedding = q.vec;
|
|
@@ -22053,8 +22069,8 @@ async function memorySearchCmd(query, opts) {
|
|
|
22053
22069
|
//#region src/cli/commands/memory/sources-cmd.ts
|
|
22054
22070
|
/** `pai memory sources` — what the indexer has taken in. */
|
|
22055
22071
|
async function memorySourcesCmd(opts) {
|
|
22056
|
-
const { createStorageBackend } = await import("../factory-
|
|
22057
|
-
const { loadConfig } = await import("../config-
|
|
22072
|
+
const { createStorageBackend } = await import("../factory-DeASMV7Z.mjs");
|
|
22073
|
+
const { loadConfig } = await import("../config-Dv3t7xnT.mjs");
|
|
22058
22074
|
const { cmdMemorySources } = await import("../sources-CiE3rZek.mjs");
|
|
22059
22075
|
let backend;
|
|
22060
22076
|
try {
|
|
@@ -22814,7 +22830,7 @@ async function zettelExploreCmd(note, opts) {
|
|
|
22814
22830
|
const depth = opts.depth ?? 3;
|
|
22815
22831
|
const direction = opts.direction ?? "both";
|
|
22816
22832
|
const mode = opts.mode ?? "all";
|
|
22817
|
-
const { zettelExplore } = await import("../zettelkasten-
|
|
22833
|
+
const { zettelExplore } = await import("../zettelkasten-BHVx5zj-.mjs");
|
|
22818
22834
|
const result = await zettelExplore(await getFedBackend(), {
|
|
22819
22835
|
startNote: note,
|
|
22820
22836
|
depth,
|
|
@@ -22870,7 +22886,7 @@ async function zettelHealthCmd(opts) {
|
|
|
22870
22886
|
const projectPath = opts.project;
|
|
22871
22887
|
const recentDays = opts.days ?? 30;
|
|
22872
22888
|
const includeTypes = opts.include ? opts.include.split(",").map((s) => s.trim()) : void 0;
|
|
22873
|
-
const { zettelHealth } = await import("../zettelkasten-
|
|
22889
|
+
const { zettelHealth } = await import("../zettelkasten-BHVx5zj-.mjs");
|
|
22874
22890
|
const result = await zettelHealth(await getFedBackend(), {
|
|
22875
22891
|
scope,
|
|
22876
22892
|
projectPath,
|
|
@@ -22928,7 +22944,7 @@ async function zettelSurpriseCmd(note, opts) {
|
|
|
22928
22944
|
const limit = opts.limit ?? 10;
|
|
22929
22945
|
const minSimilarity = opts.minSimilarity ?? .3;
|
|
22930
22946
|
const minGraphDistance = opts.minDistance ?? 3;
|
|
22931
|
-
const { zettelSurprise } = await import("../zettelkasten-
|
|
22947
|
+
const { zettelSurprise } = await import("../zettelkasten-BHVx5zj-.mjs");
|
|
22932
22948
|
const backend = await getFedBackend();
|
|
22933
22949
|
console.log();
|
|
22934
22950
|
console.log(header(" PAI Zettel Surprise"));
|
|
@@ -22970,7 +22986,7 @@ async function zettelConverseCmd(question, opts) {
|
|
|
22970
22986
|
const vaultProjectId = Number(opts.vaultProjectId);
|
|
22971
22987
|
const depth = opts.depth ?? 2;
|
|
22972
22988
|
const limit = opts.limit ?? 15;
|
|
22973
|
-
const { zettelConverse } = await import("../zettelkasten-
|
|
22989
|
+
const { zettelConverse } = await import("../zettelkasten-BHVx5zj-.mjs");
|
|
22974
22990
|
const backend = await getFedBackend();
|
|
22975
22991
|
console.log();
|
|
22976
22992
|
console.log(header(" PAI Zettel Converse"));
|
|
@@ -23020,7 +23036,7 @@ async function zettelThemesCmd(opts) {
|
|
|
23020
23036
|
const minClusterSize = opts.minSize ?? 3;
|
|
23021
23037
|
const maxThemes = opts.maxThemes ?? 10;
|
|
23022
23038
|
const similarityThreshold = opts.threshold ?? .65;
|
|
23023
|
-
const { zettelThemes } = await import("../zettelkasten-
|
|
23039
|
+
const { zettelThemes } = await import("../zettelkasten-BHVx5zj-.mjs");
|
|
23024
23040
|
const backend = await getFedBackend();
|
|
23025
23041
|
console.log();
|
|
23026
23042
|
console.log(header(" PAI Zettel Themes"));
|
|
@@ -23068,7 +23084,7 @@ async function zettelSuggestCmd(note, opts) {
|
|
|
23068
23084
|
const vaultProjectId = Number(opts.vaultProjectId);
|
|
23069
23085
|
const limit = opts.limit ?? 5;
|
|
23070
23086
|
const excludeLinked = opts.excludeLinked !== true;
|
|
23071
|
-
const { zettelSuggest } = await import("../zettelkasten-
|
|
23087
|
+
const { zettelSuggest } = await import("../zettelkasten-BHVx5zj-.mjs");
|
|
23072
23088
|
const backend = await getFedBackend();
|
|
23073
23089
|
console.log();
|
|
23074
23090
|
console.log(header(" PAI Zettel Suggest"));
|