@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,17 +1,17 @@
|
|
|
1
1
|
import { g as paiHomePath, h as paiHomeDir } from "./runtime-paths-WsO9sJFc.mjs";
|
|
2
|
-
import { Et as
|
|
3
|
-
import { c as loadConfig, f as readMainConfigRaw, h as effectiveMainConfig, m as deepMergeConfig, p as writeMainConfigRaw, u as paiConfigFilePath, y as shippedMainDefaults } from "./config-
|
|
4
|
-
import { i as ledgerPath, u as workersLogDir } from "./paths-
|
|
5
|
-
import { it as readInventory } from "./routing-
|
|
6
|
-
import { _ as readLocalConfig } from "./local-tiers-
|
|
2
|
+
import { Et as appendLedger, M as readWorkersSection, Ot as parseLedger, rt as workersYamlPath, t as ANTHROPIC_NATIVE } from "./config-CST2uq1v.mjs";
|
|
3
|
+
import { c as loadConfig, f as readMainConfigRaw, h as effectiveMainConfig, m as deepMergeConfig, p as writeMainConfigRaw, u as paiConfigFilePath, y as shippedMainDefaults } from "./config-DYbyEe4-.mjs";
|
|
4
|
+
import { i as ledgerPath, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
|
|
5
|
+
import { it as readInventory } from "./routing-BlD_tKjW.mjs";
|
|
6
|
+
import { _ as readLocalConfig } from "./local-tiers-BtdEEe5n.mjs";
|
|
7
7
|
import { f as sharedScheduler } from "./scheduler-CtUyWJ3O.mjs";
|
|
8
|
-
import { r as instanceEngineKey } from "./local-instances-
|
|
9
|
-
import { o as primaryLocal, s as readLocalStatus } from "./local-candidate-
|
|
8
|
+
import { r as instanceEngineKey } from "./local-instances-bdCNNSsL.mjs";
|
|
9
|
+
import { o as primaryLocal, s as readLocalStatus } from "./local-candidate-Cp_bw4kK.mjs";
|
|
10
10
|
import { t as LOCAL_PROBE_TIMEOUT_MS } from "./timeouts-1MLooEBB.mjs";
|
|
11
|
-
import { f as setClass } from "./providers-
|
|
12
|
-
import { o as setConfigValueOp, s as unsetConfigValueOp } from "./main-config-ops-
|
|
11
|
+
import { f as setClass } from "./providers-Dzx5GAUI.mjs";
|
|
12
|
+
import { o as setConfigValueOp, s as unsetConfigValueOp } from "./main-config-ops-BYsK3BxM.mjs";
|
|
13
13
|
import { n as PaiClient } from "./ipc-client-CnYEF31R.mjs";
|
|
14
|
-
import { l as readEmbedPasses } from "./embed-pass-
|
|
14
|
+
import { l as readEmbedPasses } from "./embed-pass-DtVF2fOV.mjs";
|
|
15
15
|
import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, rmdirSync, statSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { randomBytes } from "node:crypto";
|
|
17
17
|
import { dirname, join } from "node:path";
|
|
@@ -343,6 +343,8 @@ const SHIPPED = {
|
|
|
343
343
|
jobPollMs: 5e3,
|
|
344
344
|
jobFirstDelayMs: 2e3,
|
|
345
345
|
jobMaxTries: 120,
|
|
346
|
+
concurrencyMin: 1,
|
|
347
|
+
concurrencyMax: 16,
|
|
346
348
|
serverCounterStaleSecs: 60,
|
|
347
349
|
gaugeWarnPct: 70,
|
|
348
350
|
gaugeBadPct: 90,
|
|
@@ -412,6 +414,8 @@ function cockpitLayout() {
|
|
|
412
414
|
jobPollMs: num(s, "jobPollMs", SHIPPED.jobPollMs),
|
|
413
415
|
jobFirstDelayMs: numZ(s, "jobFirstDelayMs", SHIPPED.jobFirstDelayMs),
|
|
414
416
|
jobMaxTries: num(s, "jobMaxTries", SHIPPED.jobMaxTries),
|
|
417
|
+
concurrencyMin: num(s, "concurrencyMin", SHIPPED.concurrencyMin),
|
|
418
|
+
concurrencyMax: num(s, "concurrencyMax", SHIPPED.concurrencyMax),
|
|
415
419
|
serverCounterStaleSecs: num(s, "serverCounterStaleSecs", SHIPPED.serverCounterStaleSecs),
|
|
416
420
|
gaugeWarnPct: numZ(s, "gaugeWarnPct", SHIPPED.gaugeWarnPct),
|
|
417
421
|
gaugeBadPct: numZ(s, "gaugeBadPct", SHIPPED.gaugeBadPct),
|
|
@@ -1275,23 +1279,23 @@ function defaultDeps() {
|
|
|
1275
1279
|
const logDir = workersLogDir(workers);
|
|
1276
1280
|
return {
|
|
1277
1281
|
startTier: async (tierName) => {
|
|
1278
|
-
const { startTier } = await import("./worker-config-
|
|
1282
|
+
const { startTier } = await import("./worker-config-D1KVAMp4.mjs");
|
|
1279
1283
|
const cfg = readLocalConfig(workersYamlPath());
|
|
1280
1284
|
const tier = cfg.tiers[tierName];
|
|
1281
1285
|
if (!tier) throw new Error(`no tier "${tierName}" (configured: ${Object.keys(cfg.tiers).join(", ") || "none"})`);
|
|
1282
1286
|
await startTier(cfg, tierName, tier);
|
|
1283
1287
|
},
|
|
1284
1288
|
stopAll: async () => {
|
|
1285
|
-
const { stopAll } = await import("./worker-config-
|
|
1289
|
+
const { stopAll } = await import("./worker-config-D1KVAMp4.mjs");
|
|
1286
1290
|
await stopAll(readLocalConfig(workersYamlPath()));
|
|
1287
1291
|
},
|
|
1288
1292
|
startModel: async (model) => {
|
|
1289
|
-
const { startInstance } = await import("./worker-config-
|
|
1293
|
+
const { startInstance } = await import("./worker-config-D1KVAMp4.mjs");
|
|
1290
1294
|
await startInstance(readLocalConfig(workersYamlPath()), model);
|
|
1291
1295
|
},
|
|
1292
1296
|
stopModel: async (target, opts) => {
|
|
1293
|
-
const { stopInstance } = await import("./worker-config-
|
|
1294
|
-
const { currentInstances } = await import("./worker-config-
|
|
1297
|
+
const { stopInstance } = await import("./worker-config-D1KVAMp4.mjs");
|
|
1298
|
+
const { currentInstances } = await import("./worker-config-D1KVAMp4.mjs");
|
|
1295
1299
|
const cfg = readLocalConfig(workersYamlPath());
|
|
1296
1300
|
const keys = new Map(currentInstances(cfg).map((r) => [r.id, instanceEngineKey(r)]));
|
|
1297
1301
|
await stopInstance(cfg, target, opts, {
|
|
@@ -1300,7 +1304,7 @@ function defaultDeps() {
|
|
|
1300
1304
|
});
|
|
1301
1305
|
},
|
|
1302
1306
|
runningCount: async (model) => {
|
|
1303
|
-
const { currentInstances } = await import("./worker-config-
|
|
1307
|
+
const { currentInstances } = await import("./worker-config-D1KVAMp4.mjs");
|
|
1304
1308
|
return currentInstances(readLocalConfig(workersYamlPath())).filter((r) => r.model === model && r.state !== "failed").length;
|
|
1305
1309
|
},
|
|
1306
1310
|
setClass: (cls, target) => void setClass(cls, target),
|
|
@@ -1584,7 +1588,7 @@ async function runCockpitAction(body, deps, hooks = {}) {
|
|
|
1584
1588
|
if (action === "route.set") {
|
|
1585
1589
|
if (!target) return fail("target (tier) required");
|
|
1586
1590
|
try {
|
|
1587
|
-
const { setRoute } = await import("./route-table-
|
|
1591
|
+
const { setRoute } = await import("./route-table-ZVMNBsy7.mjs");
|
|
1588
1592
|
const models = Array.isArray(body.models) ? body.models : value !== void 0 ? value.split(",") : body.models;
|
|
1589
1593
|
const change = setRoute(target, models, deps.configPath);
|
|
1590
1594
|
writeLedgerLine(deps, action, change.id, `set:${change.entries.join(">")}`);
|
|
@@ -1601,7 +1605,7 @@ async function runCockpitAction(body, deps, hooks = {}) {
|
|
|
1601
1605
|
if (value !== "on" && value !== "off") return fail(`value must be on or off, got "${value ?? ""}"`);
|
|
1602
1606
|
if (!deps.workers.providers[target]?.characteristics) return fail(`"${target}" is not a registered endpoint (providers.${target}.characteristics)`);
|
|
1603
1607
|
try {
|
|
1604
|
-
const { setProviderEnabled } = await import("./providers-
|
|
1608
|
+
const { setProviderEnabled } = await import("./providers-QJzpaNhX.mjs");
|
|
1605
1609
|
setProviderEnabled(target, value === "on", deps.configPath);
|
|
1606
1610
|
writeLedgerLine(deps, action, target, `routing ${value}`);
|
|
1607
1611
|
return {
|
|
@@ -1627,7 +1631,7 @@ async function runCockpitAction(body, deps, hooks = {}) {
|
|
|
1627
1631
|
message: `worker classes → ${provider}`
|
|
1628
1632
|
};
|
|
1629
1633
|
}
|
|
1630
|
-
const { useProvider } = await import("./providers-
|
|
1634
|
+
const { useProvider } = await import("./providers-QJzpaNhX.mjs");
|
|
1631
1635
|
useProvider(provider);
|
|
1632
1636
|
try {
|
|
1633
1637
|
const raw = readMainConfigRaw();
|
|
@@ -1662,14 +1666,14 @@ async function memoryRunRefusal(deps, nowMs = Date.now()) {
|
|
|
1662
1666
|
}
|
|
1663
1667
|
/** The daemon's count of chunks without vectors; null when it does not answer. */
|
|
1664
1668
|
async function daemonEmbedBacklog() {
|
|
1665
|
-
const { fetchDaemonMemory } = await import("./cockpit-memory-
|
|
1669
|
+
const { fetchDaemonMemory } = await import("./cockpit-memory-DIrNs4xr.mjs");
|
|
1666
1670
|
return (await fetchDaemonMemory())?.embedBacklog ?? null;
|
|
1667
1671
|
}
|
|
1668
1672
|
/** The daemon's in-process passes (no child, so no marker): its status says whether one runs. */
|
|
1669
1673
|
async function daemonMemoryBusy() {
|
|
1670
1674
|
try {
|
|
1671
1675
|
const { PaiClient } = await import("./ipc-client-DN7EvoVo.mjs");
|
|
1672
|
-
const { loadConfig } = await import("./config-
|
|
1676
|
+
const { loadConfig } = await import("./config-Dv3t7xnT.mjs");
|
|
1673
1677
|
const s = await new PaiClient(loadConfig().socketPath).call("status", {}, 5e3);
|
|
1674
1678
|
if (s.embedInProgress) return "embed already running (started by daemon)";
|
|
1675
1679
|
if (s.indexInProgress) return "index already running (started by daemon)";
|
|
@@ -1783,7 +1787,7 @@ async function finishRuntimeJob(deps, hooks, id, runtime, op) {
|
|
|
1783
1787
|
end(state, message);
|
|
1784
1788
|
}
|
|
1785
1789
|
async function defaultRefreshInventory() {
|
|
1786
|
-
const { computeInventory, readInventoryInput, writeInventory } = await import("./model-inventory-
|
|
1790
|
+
const { computeInventory, readInventoryInput, writeInventory } = await import("./model-inventory-BuTpi9a6.mjs");
|
|
1787
1791
|
writeInventory(workersLogDir(readWorkersSection().workers), await computeInventory(readInventoryInput()));
|
|
1788
1792
|
}
|
|
1789
1793
|
/** Runs the injected local job, records its outcome in the job file and ledger. */
|
|
@@ -1853,4 +1857,4 @@ function cockpitActionLedger(ledgerFile, lastN = 10) {
|
|
|
1853
1857
|
|
|
1854
1858
|
//#endregion
|
|
1855
1859
|
export { cockpitMemoryPayload as A, cockpitLayout as B, runtimeOpRefusal as C, writeLedgerLine as D, tierNames as E, memoryRunLog as F, acquireRun as H, rateSeries as I, runProgress as L, latestMemoryJob as M, liveMemoryDeps as N, embeddingRuntimeName as O, memoryJobProgress as P, runningMemoryJob as R, runtimeJobProgress as S, spawnMemoryRun as T, readRun as U, cockpitProbeSettings as V, resolveTierName as _, classesOnProvider as a, runningRuntimeJob as b, defaultDeps as c, labelPath as d, logTailSince as f, readLabels as g, readCockpitJob as h, WORKER_ROLE_CLASSES as i, fetchDaemonMemory as j, readRuntimeCommands as k, engineInflight as l, orchestratorProvider as m, RUNTIME_START_EVENT as n, cockpitActionLedger as o, memoryRunRefusal as p, RUNTIME_STOP_EVENT as r, cockpitJobFile as s, COCKPIT_ACTION_EVENT as t, labelFor as u, runCockpitAction as v, runtimeStartStop as w, runningRuntimeJobs as x, runningLocalModel as y, sameModel as z };
|
|
1856
|
-
//# sourceMappingURL=cockpit-actions-
|
|
1860
|
+
//# sourceMappingURL=cockpit-actions-BTA1njMO.mjs.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./paths-
|
|
4
|
-
import "./status-
|
|
5
|
-
import "./scope-
|
|
6
|
-
import "./routing-
|
|
7
|
-
import "./tool-errors-
|
|
8
|
-
import "./wait-
|
|
9
|
-
import "./local-tiers-
|
|
10
|
-
import "./caller-identity-
|
|
11
|
-
import "./capacity-
|
|
12
|
-
import "./local-instances-
|
|
13
|
-
import "./local-candidate-
|
|
14
|
-
import "./providers-
|
|
15
|
-
import "./main-config-ops-
|
|
16
|
-
import { C as runtimeOpRefusal, D as writeLedgerLine, E as tierNames, S as runtimeJobProgress, T as spawnMemoryRun, _ as resolveTierName, a as classesOnProvider, b as runningRuntimeJob, c as defaultDeps, d as labelPath, f as logTailSince, g as readLabels, h as readCockpitJob, i as WORKER_ROLE_CLASSES, l as engineInflight, m as orchestratorProvider, n as RUNTIME_START_EVENT, o as cockpitActionLedger, p as memoryRunRefusal, r as RUNTIME_STOP_EVENT, s as cockpitJobFile, t as COCKPIT_ACTION_EVENT, u as labelFor, v as runCockpitAction, w as runtimeStartStop, x as runningRuntimeJobs, y as runningLocalModel } from "./cockpit-actions-
|
|
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 "./providers-Dzx5GAUI.mjs";
|
|
15
|
+
import "./main-config-ops-BYsK3BxM.mjs";
|
|
16
|
+
import { C as runtimeOpRefusal, D as writeLedgerLine, E as tierNames, S as runtimeJobProgress, T as spawnMemoryRun, _ as resolveTierName, a as classesOnProvider, b as runningRuntimeJob, c as defaultDeps, d as labelPath, f as logTailSince, g as readLabels, h as readCockpitJob, i as WORKER_ROLE_CLASSES, l as engineInflight, m as orchestratorProvider, n as RUNTIME_START_EVENT, o as cockpitActionLedger, p as memoryRunRefusal, r as RUNTIME_STOP_EVENT, s as cockpitJobFile, t as COCKPIT_ACTION_EVENT, u as labelFor, v as runCockpitAction, w as runtimeStartStop, x as runningRuntimeJobs, y as runningLocalModel } from "./cockpit-actions-BTA1njMO.mjs";
|
|
17
17
|
import "./ipc-client-CnYEF31R.mjs";
|
|
18
|
-
import "./embed-pass-
|
|
18
|
+
import "./embed-pass-DtVF2fOV.mjs";
|
|
19
19
|
|
|
20
20
|
export { COCKPIT_ACTION_EVENT, RUNTIME_START_EVENT, RUNTIME_STOP_EVENT, WORKER_ROLE_CLASSES, classesOnProvider, cockpitActionLedger, cockpitJobFile, defaultDeps, engineInflight, labelFor, labelPath, logTailSince, memoryRunRefusal, orchestratorProvider, readCockpitJob, readLabels, resolveTierName, runCockpitAction, runningLocalModel, runningRuntimeJob, runningRuntimeJobs, runtimeJobProgress, runtimeOpRefusal, runtimeStartStop, spawnMemoryRun, tierNames, writeLedgerLine };
|
|
@@ -0,0 +1,20 @@
|
|
|
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 "./providers-Dzx5GAUI.mjs";
|
|
15
|
+
import "./main-config-ops-BYsK3BxM.mjs";
|
|
16
|
+
import { A as cockpitMemoryPayload, F as memoryRunLog, I as rateSeries, L as runProgress, M as latestMemoryJob, N as liveMemoryDeps, P as memoryJobProgress, R as runningMemoryJob, j as fetchDaemonMemory, z as sameModel } from "./cockpit-actions-BTA1njMO.mjs";
|
|
17
|
+
import "./ipc-client-CnYEF31R.mjs";
|
|
18
|
+
import "./embed-pass-DtVF2fOV.mjs";
|
|
19
|
+
|
|
20
|
+
export { fetchDaemonMemory };
|
|
@@ -243,6 +243,9 @@ router:
|
|
|
243
243
|
jobFirstDelayMs: 2000
|
|
244
244
|
jobPollMs: 5000
|
|
245
245
|
jobMaxTries: 120
|
|
246
|
+
# bounds of the parallel-runs +/- stepper on a provider card in the Models section.
|
|
247
|
+
concurrencyMin: 1
|
|
248
|
+
concurrencyMax: 16
|
|
246
249
|
# a server prefix-cache counter older than this (seconds) is marked.
|
|
247
250
|
serverCounterStaleSecs: 60
|
|
248
251
|
# colour thresholds, stated per pair: for a limits gauge and an error
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as resolvePaiFile, f as legacyConfigDir, g as paiHomePath, l as claudeHomeDir, m as migratePaiFile } from "./runtime-paths-WsO9sJFc.mjs";
|
|
2
|
-
import { D as
|
|
3
|
-
import { appendFileSync, chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { D as writeYamlFileAtomic, E as YamlStoreError, O as readJsonStrict, _ as effectiveWorkersYamlRaw, b as shippedWorkersDefaults, f as readMainConfigRaw, g as effectiveWorkersYamlDoc, h as effectiveMainConfig, k as writeJsonAtomic, n as CONFIG_FILE, o as expandHome, p as writeMainConfigRaw, u as paiConfigFilePath, x as userWorkersYamlRaw } from "./config-DYbyEe4-.mjs";
|
|
3
|
+
import { appendFileSync, chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join, resolve } from "node:path";
|
|
5
5
|
import { Document, Scalar, parseDocument } from "yaml";
|
|
6
6
|
|
|
@@ -2283,6 +2283,31 @@ function readWorkersSection(path = paiConfigFilePath(), onWarn = (msg) => proces
|
|
|
2283
2283
|
workers
|
|
2284
2284
|
};
|
|
2285
2285
|
}
|
|
2286
|
+
let cachedWorkers = null;
|
|
2287
|
+
function mtimeOf(path) {
|
|
2288
|
+
try {
|
|
2289
|
+
return statSync(path).mtimeMs;
|
|
2290
|
+
} catch {
|
|
2291
|
+
return 0;
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
/** Signature of the files the workers config reads: changes whenever either is saved. */
|
|
2295
|
+
function workersConfigStamp(path = paiConfigFilePath()) {
|
|
2296
|
+
return `${path}:${mtimeOf(path)}:${mtimeOf(workersYamlPath())}`;
|
|
2297
|
+
}
|
|
2298
|
+
/**
|
|
2299
|
+
* readWorkersSection for pollers (the capacity gate re-reads the cap on every
|
|
2300
|
+
* poll): the parsed config is reused until the config file or workers.yaml
|
|
2301
|
+
* changes mtime, so a saved change applies without a restart and a poll costs two stats.
|
|
2302
|
+
*/
|
|
2303
|
+
function readWorkersCached(path = paiConfigFilePath()) {
|
|
2304
|
+
const key = workersConfigStamp(path);
|
|
2305
|
+
if (cachedWorkers?.key !== key) cachedWorkers = {
|
|
2306
|
+
key,
|
|
2307
|
+
workers: readWorkersSection(path, () => {}).workers
|
|
2308
|
+
};
|
|
2309
|
+
return cachedWorkers.workers;
|
|
2310
|
+
}
|
|
2286
2311
|
/**
|
|
2287
2312
|
* Write the workers section back, atomically. When workers.yaml exists, its
|
|
2288
2313
|
* providers/classes/mcpSets/active are synced there (comment-preserving,
|
|
@@ -2474,5 +2499,5 @@ function escalationCloud() {
|
|
|
2474
2499
|
}
|
|
2475
2500
|
|
|
2476
2501
|
//#endregion
|
|
2477
|
-
export {
|
|
2478
|
-
//# sourceMappingURL=config-
|
|
2502
|
+
export { readWorkersYaml as $, providerQuotaSkipAt as A, isLoopbackUrl as B, parseMcpSetsValue as C, planEscalation as Ct, providerContextWindow as D, ledgerSummary as Dt, parseWorkersConfig as E, appendLedger as Et, resolveProviderKey as F, effectiveWorkersYamlData as G, WORKERS_YAML_FILENAME as H, workersConfigStamp as I, migrateWorkersToYaml as J, initWorkersYaml as K, writeWorkersSection as L, readWorkersSection as M, resolveCapability as N, providerCostTier as O, parseLedger as Ot, resolveModelCapability as P, readMergeVerify as Q, LOOPBACK_HOST as R, parseClassesValue as S, ledgerEscalate as St, parseProvider as T, withSummary as Tt, buildWorkersYamlText as U, loopbackUrl as V, defaultWorkersYamlPath as W, parseBuiltinAnthropic as X, needsWorkersYamlRelocation as Y, parseWorkersYamlDocument as Z, maskKey as _, DEFAULT_CONTEXT_WINDOW as _t, MODEL_CAPABILITIES as a, writeWorkersYamlText as at, nativeOrchestratorModel as b, stripModelVariant as bt, WorkersConfigError as c, applyRouteOverrides as ct, defaultWorkersConfig as d, findTier as dt, relocateWorkersYaml as et, escalationCloud as f, listForPolicy as ft, keysDir as g, targetList as gt, isModelCapability as h, sessionTier as ht, DEFAULT_POOL_PORT as i, writeWorkersYaml as it, readWorkersCached as j, providerKeyPath as k, assertProviderRunnable as l, classRoute as lt, isLocalProvider as m, parseEntry as mt, CAPABILITY_NAME_RE as n, workersYamlLegacyNotice as nt, PROVIDER_TAGS as o, yamlProviderToRaw as ot, getProviderOrNative as p, migrateSessionRoutes as pt, inlineWorkersYamlKeys as q, DEFAULT_COST_TIER as r, workersYamlPath as rt, WORKER_CLASSES as s, MAX_ROUTE_MODELS as st, ANTHROPIC_NATIVE as t, starterWorkersYamlText as tt, classModelCapability as u, entryProvider as ut, nativeAnthropicModels as v, certainContextWindow as vt, parseModelsBlock as w, sessionNote as wt, parseCapabilitiesValue as x, ESCALATE_FAILURES as xt, nativeAnthropicProvider as y, contextWindowFromModelId as yt, isLoopbackHostname as z };
|
|
2503
|
+
//# sourceMappingURL=config-CST2uq1v.mjs.map
|
|
@@ -791,5 +791,5 @@ function ensureConfigDir() {
|
|
|
791
791
|
}
|
|
792
792
|
|
|
793
793
|
//#endregion
|
|
794
|
-
export {
|
|
795
|
-
//# sourceMappingURL=config-
|
|
794
|
+
export { DEFAULT_PG_CONNECTION_TIMEOUT_MS as A, migrateMainConfigToYaml as C, writeYamlFileAtomic as D, YamlStoreError as E, quoteIdent as F, isContainerTarget as M, postgresConnectionString as N, readJsonStrict as O, postgresFullTarget as P, MainConfigError as S, resolvedMainConfigPath as T, effectiveWorkersYamlRaw as _, ensureConfigDir as a, shippedWorkersDefaults as b, loadConfig as c, paiConfigYamlFilePath as d, readMainConfigRaw as f, effectiveWorkersYamlDoc as g, effectiveMainConfig as h, defaults as i, assertPgName as j, writeJsonAtomic as k, migrateConfigFile as l, deepMergeConfig as m, CONFIG_FILE as n, expandHome as o, writeMainConfigRaw as p, ConfigMigrationError as r, homeRel as s, CONFIG_DIR as t, paiConfigFilePath as u, shippedDefaultsDir as v, readDualFormatConfigRaw as w, userWorkersYamlRaw as x, shippedMainDefaults as y };
|
|
795
|
+
//# sourceMappingURL=config-DYbyEe4-.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as ensureConfigDir, c as loadConfig, d as paiConfigYamlFilePath, f as readMainConfigRaw, i as defaults, l as migrateConfigFile, n as CONFIG_FILE, o as expandHome, p as writeMainConfigRaw, r as ConfigMigrationError, s as homeRel, t as CONFIG_DIR, u as paiConfigFilePath } from "./config-
|
|
1
|
+
import { a as ensureConfigDir, c as loadConfig, d as paiConfigYamlFilePath, f as readMainConfigRaw, i as defaults, l as migrateConfigFile, n as CONFIG_FILE, o as expandHome, p as writeMainConfigRaw, r as ConfigMigrationError, s as homeRel, t as CONFIG_DIR, u as paiConfigFilePath } from "./config-DYbyEe4-.mjs";
|
|
2
2
|
|
|
3
3
|
export { CONFIG_DIR, CONFIG_FILE, ConfigMigrationError, defaults, ensureConfigDir, expandHome, homeRel, loadConfig, migrateConfigFile, paiConfigFilePath, paiConfigYamlFilePath, readMainConfigRaw, writeMainConfigRaw };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { A as providerQuotaSkipAt, C as parseMcpSetsValue, D as providerContextWindow, E as parseWorkersConfig, F as resolveProviderKey, I as workersConfigStamp, L as writeWorkersSection, M as readWorkersSection, N as resolveCapability, O as providerCostTier, P as resolveModelCapability, S as parseClassesValue, T as parseProvider, _ as maskKey, _t as DEFAULT_CONTEXT_WINDOW, a as MODEL_CAPABILITIES, b as nativeOrchestratorModel, c as WorkersConfigError, d as defaultWorkersConfig, f as escalationCloud, g as keysDir, h as isModelCapability, i as DEFAULT_POOL_PORT, j as readWorkersCached, k as providerKeyPath, l as assertProviderRunnable, m as isLocalProvider, n as CAPABILITY_NAME_RE, o as PROVIDER_TAGS, p as getProviderOrNative, r as DEFAULT_COST_TIER, s as WORKER_CLASSES, t as ANTHROPIC_NATIVE, u as classModelCapability, v as nativeAnthropicModels, w as parseModelsBlock, x as parseCapabilitiesValue, y as nativeAnthropicProvider } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { o as expandHome, s as homeRel } from "./config-DYbyEe4-.mjs";
|
|
3
|
+
|
|
4
|
+
export { ANTHROPIC_NATIVE, CAPABILITY_NAME_RE, DEFAULT_CONTEXT_WINDOW, DEFAULT_COST_TIER, DEFAULT_POOL_PORT, MODEL_CAPABILITIES, PROVIDER_TAGS, WORKER_CLASSES, WorkersConfigError, assertProviderRunnable, classModelCapability, defaultWorkersConfig, escalationCloud, expandHome, getProviderOrNative, homeRel, isLocalProvider, isModelCapability, keysDir, maskKey, nativeAnthropicModels, nativeAnthropicProvider, nativeOrchestratorModel, parseCapabilitiesValue, parseClassesValue, parseMcpSetsValue, parseModelsBlock, parseProvider, parseWorkersConfig, providerContextWindow, providerCostTier, providerKeyPath, providerQuotaSkipAt, readWorkersCached, readWorkersSection, resolveCapability, resolveModelCapability, resolveProviderKey, workersConfigStamp, writeWorkersSection };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { g as paiHomePath } from "./runtime-paths-WsO9sJFc.mjs";
|
|
2
|
-
import { Et as
|
|
3
|
-
import { h as effectiveMainConfig, u as paiConfigFilePath } from "./config-
|
|
4
|
-
import { i as ledgerPath, l as statusPath, o as panesDir, u as workersLogDir } from "./paths-
|
|
5
|
-
import { C as nowStamp, D as pidAlive$1, T as ownsPidCached, b as loadStatusesCached, g as isLive, h as isChatPane, k as saveStatus, v as loadStatus } from "./status-
|
|
6
|
-
import { c as scopeKey, i as itermUuid$1, p as currentWorkerId } from "./scope-
|
|
7
|
-
import { a as buildsDir, l as listBuildsSync, m as ticketKind } from "./caller-identity-
|
|
8
|
-
import { o as providerCap, s as queueRows } from "./capacity-
|
|
9
|
-
import { n as tierProviderNames, s as readLocalStatus, t as isLocalCandidate } from "./local-candidate-
|
|
10
|
-
import { d as paneRunStatusRow, f as paneStatusRow } from "./render-
|
|
11
|
-
import { r as sayToWorker } from "./operator-
|
|
2
|
+
import { Et as appendLedger, M as readWorkersSection, Ot as parseLedger, d as defaultWorkersConfig, f as escalationCloud, m as isLocalProvider, xt as ESCALATE_FAILURES } from "./config-CST2uq1v.mjs";
|
|
3
|
+
import { h as effectiveMainConfig, u as paiConfigFilePath } from "./config-DYbyEe4-.mjs";
|
|
4
|
+
import { i as ledgerPath, l as statusPath, o as panesDir, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
|
|
5
|
+
import { C as nowStamp, D as pidAlive$1, T as ownsPidCached, b as loadStatusesCached, g as isLive, h as isChatPane, k as saveStatus, v as loadStatus } from "./status-COtzewKV.mjs";
|
|
6
|
+
import { c as scopeKey, i as itermUuid$1, p as currentWorkerId } from "./scope-D8HK6vU7.mjs";
|
|
7
|
+
import { a as buildsDir, l as listBuildsSync, m as ticketKind } from "./caller-identity-Bim8JT-D.mjs";
|
|
8
|
+
import { o as providerCap, s as queueRows } from "./capacity-CsZMkVyg.mjs";
|
|
9
|
+
import { n as tierProviderNames, s as readLocalStatus, t as isLocalCandidate } from "./local-candidate-Cp_bw4kK.mjs";
|
|
10
|
+
import { d as paneRunStatusRow, f as paneStatusRow } from "./render-Cz3BWIBO.mjs";
|
|
11
|
+
import { r as sayToWorker } from "./operator-DrwWItVt.mjs";
|
|
12
12
|
import { appendFileSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
@@ -847,8 +847,8 @@ async function runPaneExec(id, d = {}) {
|
|
|
847
847
|
let show = out;
|
|
848
848
|
let showErr = err;
|
|
849
849
|
if (sp.statusLine && (d.tty ?? process.stdout.isTTY === true)) {
|
|
850
|
-
const { loadStatus } = await import("./status-
|
|
851
|
-
const { sayToWorker } = await import("./operator-
|
|
850
|
+
const { loadStatus } = await import("./status-D_SWmOlH.mjs");
|
|
851
|
+
const { sayToWorker } = await import("./operator-Bpxq_WB5.mjs");
|
|
852
852
|
const b = startPaneBar({
|
|
853
853
|
spec: sp.statusLine,
|
|
854
854
|
write: (x) => out(x),
|
|
@@ -955,8 +955,8 @@ async function renderer(sp, id, out, err) {
|
|
|
955
955
|
err: (c) => err(c),
|
|
956
956
|
end: () => void 0
|
|
957
957
|
};
|
|
958
|
-
const { applyEvent, initialFollowState } = await import("./viewer-
|
|
959
|
-
const { makeColor } = await import("./render-
|
|
958
|
+
const { applyEvent, initialFollowState } = await import("./viewer-CbGN2Ri4.mjs");
|
|
959
|
+
const { makeColor } = await import("./render-C4KR8qQ8.mjs");
|
|
960
960
|
const c = makeColor(true);
|
|
961
961
|
let state = initialFollowState("");
|
|
962
962
|
let buf = "";
|
|
@@ -4708,4 +4708,4 @@ async function returnControlsIfHeld(logDir, id) {
|
|
|
4708
4708
|
|
|
4709
4709
|
//#endregion
|
|
4710
4710
|
export { checkPaneForWorker as $, tail as A, recordPath as At, loadPlanStatus as B, chatTickerRow as Bt, readRunLog as C, PANE_EXEC_PID_ENV as Ct, resumeState as D, pidAlive as Dt, requestPlanStop as E, openOwnedPane as Et, runLogPath as F, chatEnter as Ft, planRunId as G, handoffFromInside as Gt, planLogTail as H, parseChatLine as Ht, PlanTracker as I, chatInsertLine as It, queueLockPath as J, LOCAL_FAILURE_LIMIT as Jt, renderPlanLines as K, isHandoffMessage as Kt, fmtElapsed as L, chatLeave as Lt, dirtyConflicts as M, panePolicy as Mt, filesOverlap as N, CHAT_HELP as Nt, runExitCode as O, readExit as Ot, loadPlan as P, chatBlankRow as Pt, NoTerminalError as Q, followPlanLog as R, chatPromptRow as Rt, planStopPath as S, PANE_EXEC_ENV as St, renderStatus as T, listRecords as Tt, planRows as U, wrapText as Ut, loadPlanStatuses as V, holdAutoExit as Vt, planRunEnded as W, deliverHandoff as Wt, sinceText as X, localFailures as Xt, readRunLock as Y, classifyRoute as Yt, withRunLock as Z, routeLine as Zt, troublePolicy as _, paneTitle as _t, localIdleTick as a, headlessAllowed as at, idleText as b, psTableOrNull as bt, setMuted as c, openFollowPane as ct, aibrokerMessenger as d, osascript as dt, closeEndedPanes as et, detachRun as f, paneBackend as ft, sweepRuns as g, workerEnded as gt, originFromEnv as h, resolveHostSession as ht, localIdleLine as i, followCommand as it, PlanError as j, runPaneExec as jt, runPlan as k, readRecord as kt, PlanReporter as l, openPaneForWorker as lt, markRunDone as m, realPaneOps as mt, markControlsHeld as n, closePaneForWorker as nt, ownerOf as o, inVisiblePane as ot, eventLine as p, paneMayClose as pt, planLockPath as q, readInbox as qt, returnControlsIfHeld as r, closeSelfPane as rt, readLocalIdle as s, loadRegistry as st, clickrControlsArgv as t, closeOwnPane as tt, QueueReporter as u, openVerifiedPane as ut, appendRunLog as v, writePaneTitle as vt, renderSchedule as w, exitFilePath as wt, planStatus as x, truncateLines as xt, blockedMessage as y, psTable as yt, gatePhaseName as z, chatScrollRegion as zt };
|
|
4711
|
-
//# sourceMappingURL=controls-
|
|
4711
|
+
//# sourceMappingURL=controls-OiVVbe-f.mjs.map
|
package/dist/daemon/index.mjs
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "../utils-J2b9y8PC.mjs";
|
|
3
3
|
import "../migrate-DrA_OwlZ.mjs";
|
|
4
|
-
import "../config-
|
|
5
|
-
import { a as ensureConfigDir, c as loadConfig } from "../config-
|
|
6
|
-
import "../paths-
|
|
7
|
-
import "../worktree-
|
|
8
|
-
import "../status-
|
|
9
|
-
import "../pool-
|
|
10
|
-
import "../registrable-
|
|
11
|
-
import "../pai-marker-
|
|
4
|
+
import "../config-CST2uq1v.mjs";
|
|
5
|
+
import { a as ensureConfigDir, c as loadConfig } from "../config-DYbyEe4-.mjs";
|
|
6
|
+
import "../paths-DS5VQKoR.mjs";
|
|
7
|
+
import "../worktree-BY--Rgmy.mjs";
|
|
8
|
+
import "../status-COtzewKV.mjs";
|
|
9
|
+
import "../pool-BZ94nFuq.mjs";
|
|
10
|
+
import "../registrable-CXBBpUcz.mjs";
|
|
11
|
+
import "../pai-marker-DLKJ9Yr5.mjs";
|
|
12
12
|
import "../helpers-CRuBUas3.mjs";
|
|
13
13
|
import "../reranker-CqCbpGnX.mjs";
|
|
14
14
|
import { t as dropItermBundleId } from "../env-BE8mrsxr.mjs";
|
|
15
|
-
import "../scope-
|
|
16
|
-
import "../routing-
|
|
17
|
-
import "../tool-errors-
|
|
18
|
-
import "../wait-
|
|
19
|
-
import "../local-tiers-
|
|
20
|
-
import "../caller-identity-
|
|
21
|
-
import "../capacity-
|
|
22
|
-
import "../local-instances-
|
|
23
|
-
import "../local-candidate-
|
|
24
|
-
import "../factory-
|
|
25
|
-
import "../postgres-
|
|
26
|
-
import "../embedding-gate-
|
|
15
|
+
import "../scope-D8HK6vU7.mjs";
|
|
16
|
+
import "../routing-BlD_tKjW.mjs";
|
|
17
|
+
import "../tool-errors-DXJ70-sr.mjs";
|
|
18
|
+
import "../wait-ChpHKJZV.mjs";
|
|
19
|
+
import "../local-tiers-BtdEEe5n.mjs";
|
|
20
|
+
import "../caller-identity-Bim8JT-D.mjs";
|
|
21
|
+
import "../capacity-CsZMkVyg.mjs";
|
|
22
|
+
import "../local-instances-bdCNNSsL.mjs";
|
|
23
|
+
import "../local-candidate-Cp_bw4kK.mjs";
|
|
24
|
+
import "../factory-BV0MQA3T.mjs";
|
|
25
|
+
import "../postgres-C-T5OWer.mjs";
|
|
26
|
+
import "../embedding-gate-CTAk8STe.mjs";
|
|
27
27
|
import "../embeddings-BVq3esBF.mjs";
|
|
28
28
|
import "../router-CQSc3lk3.mjs";
|
|
29
|
-
import "../detect-
|
|
30
|
-
import "../scan-
|
|
31
|
-
import "../launch-
|
|
32
|
-
import "../run-
|
|
33
|
-
import "../controls-
|
|
34
|
-
import "../endreason-
|
|
35
|
-
import "../render-
|
|
36
|
-
import "../operator-
|
|
37
|
-
import "../kill-tree-
|
|
38
|
-
import "../pool-cli-
|
|
39
|
-
import "../pane-audit-
|
|
29
|
+
import "../detect-CHuxFrLy.mjs";
|
|
30
|
+
import "../scan-C3uotg_f.mjs";
|
|
31
|
+
import "../launch-DpQPZGsT.mjs";
|
|
32
|
+
import "../run-AZVwceiU.mjs";
|
|
33
|
+
import "../controls-OiVVbe-f.mjs";
|
|
34
|
+
import "../endreason-BqyyU7BH.mjs";
|
|
35
|
+
import "../render-Cz3BWIBO.mjs";
|
|
36
|
+
import "../operator-DrwWItVt.mjs";
|
|
37
|
+
import "../kill-tree-CcpsRLCZ.mjs";
|
|
38
|
+
import "../pool-cli-B1eKySeN.mjs";
|
|
39
|
+
import "../pane-audit-wv9UkyCe.mjs";
|
|
40
40
|
import { n as PaiClient } from "../ipc-client-CnYEF31R.mjs";
|
|
41
|
-
import "../embed-pass-
|
|
42
|
-
import "../
|
|
43
|
-
import
|
|
44
|
-
import "../
|
|
45
|
-
import "../
|
|
41
|
+
import "../embed-pass-DtVF2fOV.mjs";
|
|
42
|
+
import "../session-usage-oycSdiD3.mjs";
|
|
43
|
+
import "../indexer-backend-B2vtFl38.mjs";
|
|
44
|
+
import { t as serve } from "../daemon-C1dycZ3W.mjs";
|
|
45
|
+
import "../auto-route-DUYr57rs.mjs";
|
|
46
|
+
import "../zettelkasten-LoH9RBiN.mjs";
|
|
46
47
|
|
|
47
48
|
//#region src/daemon/index.ts
|
|
48
49
|
/**
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { g as paiHomePath } from "./runtime-paths-WsO9sJFc.mjs";
|
|
2
2
|
import { t as writeFileAtomic } from "./atomic-file-BorMa4T3.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { f as readMainConfigRaw, i as defaults, p as writeMainConfigRaw, u as paiConfigFilePath, y as shippedMainDefaults } from "./config-
|
|
5
|
-
import { c as slotCurrentPath, i as ledgerPath, r as eventsPath, u as workersLogDir } from "./paths-
|
|
6
|
-
import { f as gcWorktreesThrottled, w as worktreesDir } from "./worktree-
|
|
7
|
-
import { B as loadStatusConfig, C as nowStamp, G as writeSectionToForge, I as PROJECT_CONFIG_REL, L as formatStale, b as loadStatusesCached, h as isChatPane, k as saveStatus, s as alive, v as loadStatus, z as listStale } from "./status-
|
|
8
|
-
import { a as unregistrableReason } from "./registrable-
|
|
3
|
+
import { Et as appendLedger, M as readWorkersSection, t as ANTHROPIC_NATIVE } from "./config-CST2uq1v.mjs";
|
|
4
|
+
import { f as readMainConfigRaw, i as defaults, p as writeMainConfigRaw, u as paiConfigFilePath, y as shippedMainDefaults } from "./config-DYbyEe4-.mjs";
|
|
5
|
+
import { c as slotCurrentPath, i as ledgerPath, r as eventsPath, u as workersLogDir } from "./paths-DS5VQKoR.mjs";
|
|
6
|
+
import { f as gcWorktreesThrottled, w as worktreesDir } from "./worktree-BY--Rgmy.mjs";
|
|
7
|
+
import { B as loadStatusConfig, C as nowStamp, G as writeSectionToForge, I as PROJECT_CONFIG_REL, L as formatStale, b as loadStatusesCached, h as isChatPane, k as saveStatus, s as alive, v as loadStatus, z as listStale } from "./status-COtzewKV.mjs";
|
|
8
|
+
import { a as unregistrableReason } from "./registrable-CXBBpUcz.mjs";
|
|
9
9
|
import { c as yieldToEventLoop, f as fileContentHash, l as buildOutline, n as chunkId, u as chunkMarkdown } from "./helpers-CRuBUas3.mjs";
|
|
10
10
|
import { n as TITLE_STOP_WORDS, t as STOP_WORDS } from "./stop-words-DSEYQdNe.mjs";
|
|
11
11
|
import { i as populateSlugs, t as applyRecencyBoost } from "./search-RSyeQqj1.mjs";
|
|
12
12
|
import { n as rerankResults } from "./reranker-CqCbpGnX.mjs";
|
|
13
|
-
import { i as itermUuid, r as itermForClaudeSession } from "./scope-
|
|
14
|
-
import {
|
|
13
|
+
import { i as itermUuid, r as itermForClaudeSession } from "./scope-D8HK6vU7.mjs";
|
|
14
|
+
import { Tn as startLocalStatusRefresh, st as startInventoryRefresh } from "./routing-BlD_tKjW.mjs";
|
|
15
15
|
import { n as minOf, t as maxOf } from "./min-max-DrSRUaWQ.mjs";
|
|
16
|
-
import { C as toolErrorSigTag, S as summarizeToolInput, T as toolErrorText, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, s as benignNote, u as detectRunningWorkerErrors, w as toolErrorSummary } from "./tool-errors-
|
|
17
|
-
import { b as killProcessTree } from "./wait-
|
|
18
|
-
import { a as buildsDir, b as stallMinutes, c as listBuilds, l as listBuildsSync, u as patchTicket } from "./caller-identity-
|
|
16
|
+
import { C as toolErrorSigTag, S as summarizeToolInput, T as toolErrorText, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, s as benignNote, u as detectRunningWorkerErrors, w as toolErrorSummary } from "./tool-errors-DXJ70-sr.mjs";
|
|
17
|
+
import { b as killProcessTree } from "./wait-ChpHKJZV.mjs";
|
|
18
|
+
import { a as buildsDir, b as stallMinutes, c as listBuilds, l as listBuildsSync, u as patchTicket } from "./caller-identity-Bim8JT-D.mjs";
|
|
19
19
|
import { t as LOCAL_PROBE_TIMEOUT_MS } from "./timeouts-1MLooEBB.mjs";
|
|
20
|
-
import { d as getBackendOutage, n as createRegistryBackend, r as createStorageBackend } from "./factory-
|
|
21
|
-
import { c as resolveFromModule, n as embedChunksWithBackend } from "./postgres-
|
|
22
|
-
import { a as requireQueryEmbedding, c as getConfiguredBackend, h as mismatchReason, m as bindingMatches, n as embedQuery } from "./embedding-gate-
|
|
20
|
+
import { d as getBackendOutage, n as createRegistryBackend, r as createStorageBackend } from "./factory-BV0MQA3T.mjs";
|
|
21
|
+
import { c as resolveFromModule, n as embedChunksWithBackend } from "./postgres-C-T5OWer.mjs";
|
|
22
|
+
import { a as requireQueryEmbedding, c as getConfiguredBackend, h as mismatchReason, m as bindingMatches, n as embedQuery } from "./embedding-gate-CTAk8STe.mjs";
|
|
23
23
|
import { i as deserializeEmbedding, n as configureEmbeddingModel, r as cosineSimilarity$1 } from "./embeddings-BVq3esBF.mjs";
|
|
24
24
|
import { n as routeNotification } from "./router-CQSc3lk3.mjs";
|
|
25
|
-
import { r as formatDetectionJson, t as detectProject } from "./detect-
|
|
26
|
-
import { i as performScan } from "./scan-
|
|
25
|
+
import { r as formatDetectionJson, t as detectProject } from "./detect-CHuxFrLy.mjs";
|
|
26
|
+
import { i as performScan } from "./scan-C3uotg_f.mjs";
|
|
27
27
|
import { r as sendToSession, t as callAiBroker } from "./aibroker-client-CQPGqLxL.mjs";
|
|
28
|
-
import { E as probeRouter, F as startHandover, M as routerSwapArgs, N as runRouterTick, O as routerIsStale, P as spawnRouter, j as routerRunningPid, l as runMessenger, t as runWorker } from "./run-
|
|
29
|
-
import { a as localIdleTick, et as closeEndedPanes, g as sweepRuns, gt as workerEnded, pt as paneMayClose, st as loadRegistry, xt as truncateLines } from "./controls-
|
|
30
|
-
import { l as isPaneRunId, n as auditTick, r as closeFinishedPanes } from "./pane-audit-
|
|
31
|
-
import { a as EMBED_PASS_BATCH_SIZE, c as liveYieldCheck, d as runEmbedCycle, i as DEFAULT_EMBED_RESUME_MINUTES, n as DEFAULT_EMBED_MAX_LOAD, r as DEFAULT_EMBED_MAX_MINUTES, t as DEFAULT_EMBED_CYCLE_MAX_MINUTES, u as recordEmbedPass } from "./embed-pass-
|
|
32
|
-
import {
|
|
28
|
+
import { E as probeRouter, F as startHandover, M as routerSwapArgs, N as runRouterTick, O as routerIsStale, P as spawnRouter, j as routerRunningPid, l as runMessenger, t as runWorker } from "./run-AZVwceiU.mjs";
|
|
29
|
+
import { a as localIdleTick, et as closeEndedPanes, g as sweepRuns, gt as workerEnded, pt as paneMayClose, st as loadRegistry, xt as truncateLines } from "./controls-OiVVbe-f.mjs";
|
|
30
|
+
import { l as isPaneRunId, n as auditTick, r as closeFinishedPanes } from "./pane-audit-wv9UkyCe.mjs";
|
|
31
|
+
import { a as EMBED_PASS_BATCH_SIZE, c as liveYieldCheck, d as runEmbedCycle, i as DEFAULT_EMBED_RESUME_MINUTES, n as DEFAULT_EMBED_MAX_LOAD, r as DEFAULT_EMBED_MAX_MINUTES, t as DEFAULT_EMBED_CYCLE_MAX_MINUTES, u as recordEmbedPass } from "./embed-pass-DtVF2fOV.mjs";
|
|
32
|
+
import { o as logWorkersConfigShadowsOnce } from "./session-usage-oycSdiD3.mjs";
|
|
33
|
+
import { $ as setStartTime, A as indexSchedulerTimer, At as startQuietWatcher, B as setDaemonConfig, Ct as runSessionKeepaliveTick, D as embedInProgress, E as daemonConfig, F as lastVaultIndexTime, Ft as writeDaemonPidfile, G as setLastEmbedPass, H as setEmbedSchedulerTimer, I as notificationConfig, It as readContextHandoverCache, J as setLastIndexTime, K as setLastEmbedTime, L as passFailures, Lt as writeContextHandoverCache, M as lastEmbedTime, N as lastIndexPass, Nt as removeDaemonPidfile, O as embedSchedulerTimer, P as lastIndexTime, Q as setShutdownRequested, R as registryBackend, S as handleSessionSummary, T as cacheKeepaliveTimer, Tt as deferIfQuiet, U as setIndexInProgress, Ut as restartRouter, V as setEmbedInProgress, W as setIndexSchedulerTimer, X as setNotificationConfig, Y as setLastVaultIndexTime, Z as setRegistryBackend, _ as markFailed, _t as buildWakeupContext, a as runPassChild, at as vaultIndexInProgress, b as findLatestJsonl, c as NonRetryableError, ct as addWorkToSessionNote, d as enqueue, dt as getCurrentNotePath, et as setStorageBackend, f as enqueueCoalesced, ft as archiveSessionFilesToSessionsDir, g as markCompleted, gt as vaultIndexEnabled, h as loadQueue, ht as obsidianEnabled, it as storageBackend, j as lastEmbedPass, k as indexInProgress, kt as registerQuietRunner, l as cleanup, lt as appendCheckpoint, m as hasPendingOrProcessingOfType, n as buildPassCommand, nt as shutdownRequested, o as backfillKgFromNotes, ot as sessionIdFromTranscript, p as getStats, pt as findNotesDir, q as setLastIndexPass, r as cliEntry, rt as startTime, st as updateTodoContinue, t as PassSpawnError, tt as setVaultIndexInProgress, u as dequeue, ut as finalizeSessionNote, w as spawnSummarizer, x as getGitContext, xt as sweepOrphans, y as contentToText$2, z as setCacheKeepaliveTimer } from "./indexer-backend-B2vtFl38.mjs";
|
|
33
34
|
import { r as saveQueryResult } from "./query-feedback-DN52N9C5.mjs";
|
|
34
|
-
import { n as formatAutoRouteJson, r as detectTopicShift, t as autoRoute } from "./auto-route-
|
|
35
|
-
import { a as zettelThemes, c as zettelExplore, i as zettelHealth, n as zettelGodNotes, o as zettelConverse, r as zettelSuggest, s as zettelSurprise, t as zettelCommunities } from "./zettelkasten-
|
|
35
|
+
import { n as formatAutoRouteJson, r as detectTopicShift, t as autoRoute } from "./auto-route-DUYr57rs.mjs";
|
|
36
|
+
import { a as zettelThemes, c as zettelExplore, i as zettelHealth, n as zettelGodNotes, o as zettelConverse, r as zettelSuggest, s as zettelSurprise, t as zettelCommunities } from "./zettelkasten-LoH9RBiN.mjs";
|
|
36
37
|
import { appendFileSync, chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, statSync, unlinkSync, utimesSync, writeFileSync } from "node:fs";
|
|
37
38
|
import { basename, dirname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
|
|
38
39
|
import { setPriority } from "node:os";
|
|
@@ -734,12 +735,12 @@ async function checkLoops(logDir, statuses, sent, deps = {}) {
|
|
|
734
735
|
throw err;
|
|
735
736
|
}
|
|
736
737
|
}, say = async (logDir, id, text) => {
|
|
737
|
-
const { sayToWorker } = await import("./operator-
|
|
738
|
+
const { sayToWorker } = await import("./operator-Bpxq_WB5.mjs");
|
|
738
739
|
return sayToWorker(logDir, id, text);
|
|
739
740
|
}, kill = (pid) => {
|
|
740
741
|
process.kill(pid, "SIGTERM");
|
|
741
742
|
}, killChildren = async (logDir, id) => {
|
|
742
|
-
const { killTree } = await import("./kill-tree-
|
|
743
|
+
const { killTree } = await import("./kill-tree-CXZ0WfVf.mjs");
|
|
743
744
|
return killTree(logDir, id, {
|
|
744
745
|
skipRoot: true,
|
|
745
746
|
by: "loop-guard",
|
|
@@ -6784,6 +6785,7 @@ async function serve(config) {
|
|
|
6784
6785
|
process.stderr.write(`[pai-daemon] Socket: ${config.socketPath}\n`);
|
|
6785
6786
|
process.stderr.write(`[pai-daemon] Storage backend: ${config.storageBackend}\n`);
|
|
6786
6787
|
process.stderr.write(`[pai-daemon] Notification mode: ${notificationConfig.mode}\n`);
|
|
6788
|
+
logWorkersConfigShadowsOnce();
|
|
6787
6789
|
try {
|
|
6788
6790
|
setPriority(process.pid, 10);
|
|
6789
6791
|
} catch {}
|
|
@@ -6868,4 +6870,4 @@ async function serve(config) {
|
|
|
6868
6870
|
|
|
6869
6871
|
//#endregion
|
|
6870
6872
|
export { serve as t };
|
|
6871
|
-
//# sourceMappingURL=daemon-
|
|
6873
|
+
//# sourceMappingURL=daemon-C1dycZ3W.mjs.map
|
|
@@ -0,0 +1,46 @@
|
|
|
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 "./reranker-CqCbpGnX.mjs";
|
|
13
|
+
import "./scope-D8HK6vU7.mjs";
|
|
14
|
+
import "./routing-BlD_tKjW.mjs";
|
|
15
|
+
import "./tool-errors-DXJ70-sr.mjs";
|
|
16
|
+
import "./wait-ChpHKJZV.mjs";
|
|
17
|
+
import "./local-tiers-BtdEEe5n.mjs";
|
|
18
|
+
import "./caller-identity-Bim8JT-D.mjs";
|
|
19
|
+
import "./capacity-CsZMkVyg.mjs";
|
|
20
|
+
import "./local-instances-bdCNNSsL.mjs";
|
|
21
|
+
import "./local-candidate-Cp_bw4kK.mjs";
|
|
22
|
+
import "./factory-BV0MQA3T.mjs";
|
|
23
|
+
import "./postgres-C-T5OWer.mjs";
|
|
24
|
+
import "./embedding-gate-CTAk8STe.mjs";
|
|
25
|
+
import "./embeddings-BVq3esBF.mjs";
|
|
26
|
+
import "./router-CQSc3lk3.mjs";
|
|
27
|
+
import "./detect-CHuxFrLy.mjs";
|
|
28
|
+
import "./scan-C3uotg_f.mjs";
|
|
29
|
+
import "./launch-DpQPZGsT.mjs";
|
|
30
|
+
import "./run-AZVwceiU.mjs";
|
|
31
|
+
import "./controls-OiVVbe-f.mjs";
|
|
32
|
+
import "./endreason-BqyyU7BH.mjs";
|
|
33
|
+
import "./render-Cz3BWIBO.mjs";
|
|
34
|
+
import "./operator-DrwWItVt.mjs";
|
|
35
|
+
import "./kill-tree-CcpsRLCZ.mjs";
|
|
36
|
+
import "./pool-cli-B1eKySeN.mjs";
|
|
37
|
+
import "./pane-audit-wv9UkyCe.mjs";
|
|
38
|
+
import "./ipc-client-CnYEF31R.mjs";
|
|
39
|
+
import "./embed-pass-DtVF2fOV.mjs";
|
|
40
|
+
import "./session-usage-oycSdiD3.mjs";
|
|
41
|
+
import "./indexer-backend-B2vtFl38.mjs";
|
|
42
|
+
import { t as serve } from "./daemon-C1dycZ3W.mjs";
|
|
43
|
+
import "./auto-route-DUYr57rs.mjs";
|
|
44
|
+
import "./zettelkasten-LoH9RBiN.mjs";
|
|
45
|
+
|
|
46
|
+
export { serve };
|