@tekmidian/pai 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/auto-route-CAlZ5p-h.mjs +11 -0
- package/dist/{auto-route-YaEGVrFl.mjs → auto-route-PDOAYszN.mjs} +2 -2
- package/dist/{budget-DEiebT2A.mjs → budget-BXmsSBLI.mjs} +10 -10
- package/dist/{caller-identity-C6Nc96iM.mjs → caller-identity-DPDSrZE2.mjs} +2 -2
- package/dist/{capacity-B2PgKAg4.mjs → capacity-CThSydrd.mjs} +25 -13
- package/dist/{chain-CtK49-Ma.mjs → chain-BvdKqRiZ.mjs} +5 -5
- package/dist/cli/index.mjs +182 -111
- package/dist/{cockpit-actions-D1OPP6Es.mjs → cockpit-actions-BgdKB9G3.mjs} +19 -19
- package/dist/{cockpit-actions-C73mJAJ8.mjs → cockpit-actions-DNl0rKfW.mjs} +14 -14
- package/dist/cockpit-memory-CqLPjcWe.mjs +20 -0
- package/dist/config/defaults/config.yaml +6 -0
- package/dist/config/defaults/workers.yaml +2 -0
- package/dist/{config-DLmyEK2q.mjs → config-C2dd2SXS.mjs} +1 -1
- package/dist/{config-Bz8pAU5Q.mjs → config-DGV64YJa.mjs} +9 -1
- package/dist/{controls-rIItFeIJ.mjs → controls-ByrcupcA.mjs} +14 -14
- package/dist/daemon/index.mjs +29 -29
- package/dist/{daemon-SoUvPUOf.mjs → daemon-BjgJyJMP.mjs} +22 -22
- package/dist/daemon-iymy18Ie.mjs +46 -0
- package/dist/daemon-mcp/index.mjs +27 -27
- package/dist/{embed-pass-CN1D8MXl.mjs → embed-pass-DdTMn4DH.mjs} +4 -4
- package/dist/{endreason-C2-hYK0_.mjs → endreason-BjPom527.mjs} +4 -4
- package/dist/{fallback-CwPSCrX8.mjs → fallback-CQ8_CuVu.mjs} +4 -4
- package/dist/{health-D0mUAVdw.mjs → health-Bb2U4PNK.mjs} +4 -4
- package/dist/hooks/block-sleep-poll.mjs +9 -0
- package/dist/hooks/capture-all-events.mjs +38 -7
- package/dist/hooks/capture-tool-output.mjs +38 -7
- package/dist/hooks/handoff-link.mjs +37 -6
- package/dist/hooks/load-project-context.mjs +9 -0
- package/dist/hooks/local-model-hint.mjs +9 -0
- package/dist/hooks/route-agents-to-worker.mjs +9 -0
- package/dist/hooks/security-validator.mjs +124 -28
- package/dist/hooks/supervision-banner.mjs +40 -7
- package/dist/hooks/worker-edit-repair.mjs +9 -0
- package/dist/hooks/worker-guard.mjs +46 -6
- package/dist/hooks/worker-note.mjs +47 -7
- package/dist/hooks/worker-pool-host.mjs +308 -146
- package/dist/hooks/worker-proxy.mjs +9 -0
- package/dist/hooks/worker-status-line.mjs +49 -7
- package/dist/hooks/worker-supervision.mjs +9 -0
- package/dist/hooks/worker-tool-name-repair.mjs +9 -0
- package/dist/index.mjs +7 -7
- package/dist/kill-tree-BlPw1vaU.mjs +10 -0
- package/dist/{kill-tree-DPiMscaY.mjs → kill-tree-DTmiEb3T.mjs} +7 -7
- package/dist/{launch-Bn2Zf90h.mjs → launch-CV6oPHI2.mjs} +3 -3
- package/dist/{launch-BZT3JDoZ.mjs → launch-Dy8qQnSD.mjs} +3 -3
- package/dist/{lessons-CFVU0cwA.mjs → lessons-CdmqZD0G.mjs} +21 -21
- package/dist/{local-candidate-DFd4pp-w.mjs → local-candidate-C2FGhf54.mjs} +2 -2
- package/dist/{local-instances-KTh8IeOT.mjs → local-instances-GgXydQ2P.mjs} +1 -1
- package/dist/{local-tiers-DSlIYvvm.mjs → local-tiers-X_dQfI4Q.mjs} +1 -1
- package/dist/{main-config-ops-rda08BCD.mjs → main-config-ops-C_fkINDv.mjs} +2 -2
- package/dist/{main-resolver-BKwI0I6H.mjs → main-resolver-CN_sfG1R.mjs} +13 -13
- package/dist/{model-inventory-BXv15B0d.mjs → model-inventory-BYNrSTaY.mjs} +10 -10
- package/dist/{models-add-5yXTyz3g.mjs → models-add-Dc7VXmcu.mjs} +30 -30
- package/dist/operator-IrLbk8hy.mjs +7 -0
- package/dist/{operator-Br6GeswF.mjs → operator-lRGvYr3D.mjs} +2 -2
- package/dist/{pai-marker-D6OoVbM_.mjs → pai-marker-kA0iM7rP.mjs} +2 -2
- package/dist/{pane-audit-DLYy9-4g.mjs → pane-audit-DUuilP1V.mjs} +8 -8
- package/dist/{paths-CypxFTfn.mjs → paths-BwfwHOvN.mjs} +2 -2
- package/dist/{paths-DIOwNcj-.mjs → paths-CKGYM0Lb.mjs} +2 -2
- package/dist/{planner-BzZ_2lc-.mjs → planner-BDHVUkIM.mjs} +22 -22
- package/dist/{pool-9EsbKD-U.mjs → pool-CFeHGX7q.mjs} +2 -2
- package/dist/{pool-cli-Cy5mlycP.mjs → pool-cli-Bj2TeA-d.mjs} +5 -5
- package/dist/{pool-cli-Db0uDwB9.mjs → pool-cli-DOLgPgOM.mjs} +5 -5
- package/dist/{project-setup-DHxdJjEc.mjs → project-setup-i5D0xkTn.mjs} +21 -21
- package/dist/{providers-BNV7CzC-.mjs → providers-BC2Myo_O.mjs} +5 -5
- package/dist/{providers-BH6hQYbU.mjs → providers-C-mnlH1b.mjs} +11 -11
- package/dist/{registrable-BwFiqazy.mjs → registrable-Ct0DKNKS.mjs} +6 -6
- package/dist/{registrable-Dxs4oKIj.mjs → registrable-D_4qXCnq.mjs} +4 -4
- package/dist/{render-jPpMrudf.mjs → render-CbifCwTb.mjs} +175 -65
- package/dist/{render-DVGXpfaT.mjs → render-FB4Fv_fi.mjs} +10 -10
- package/dist/{root-C8cxhdn9.mjs → root-80ESg6b7.mjs} +21 -21
- package/dist/{root-DmOzMeSv.mjs → root-B-ZYiEgi.mjs} +10 -10
- package/dist/{route-table-COAmc1nB.mjs → route-table-DcBZCuco.mjs} +10 -10
- package/dist/{routing-aJKMIagQ.mjs → routing-CF0wlR-_.mjs} +10 -10
- package/dist/{routing-B_cg1_Xx.mjs → routing-CJ8ioPl2.mjs} +10 -10
- package/dist/{run-DE9Q0ldN.mjs → run-CAjfKBQV.mjs} +53 -26
- package/dist/{scan-CNMcltOX.mjs → scan-ew8M6tTH.mjs} +3 -3
- package/dist/{scope-BTWstJ1B.mjs → scope-BRcaPw5D.mjs} +4 -4
- package/dist/session-BmQsXF_a.mjs +35 -0
- package/dist/{session-HBYOABWU.mjs → session-C1JnDXvP.mjs} +14 -14
- package/dist/{session-scan-BZxnYN1v.mjs → session-scan-DWCUKhDM.mjs} +5 -5
- package/dist/{session-scan-CX3MKCNg.mjs → session-scan-DihMibI-.mjs} +4 -4
- package/dist/{session-usage-CCmPFFa6.mjs → session-usage-BRIWFYPS.mjs} +2 -2
- package/dist/{status-D52xC_i0.mjs → status-Bj4yVKj0.mjs} +3 -3
- package/dist/{status-Cecau8Ps.mjs → status-DTMT5lyn.mjs} +2 -2
- package/dist/{tool-errors-BFw1gv-z.mjs → tool-errors-BOW2n882.mjs} +2 -2
- package/dist/{tool-errors-COM2JGEr.mjs → tool-errors-jNJj3Gzm.mjs} +5 -5
- package/dist/{viewer-DvBg6N22.mjs → viewer-4BU8w_gK.mjs} +14 -14
- package/dist/viewer-D3VEdqhC.mjs +22 -0
- package/dist/{wait-C5iWILj_.mjs → wait-BindDA5w.mjs} +3 -3
- package/dist/{worker-config-DkONNk_H.mjs → worker-config-CdPmb4_2.mjs} +25 -25
- package/dist/{worker-config-BmcJ9R0U.mjs → worker-config-CfV2dgSb.mjs} +29 -29
- package/dist/{workers-config-DwzrtdYu.mjs → workers-config-2VipVOYk.mjs} +1 -1
- package/dist/{worktree-O_kU6Q3y.mjs → worktree-7ZS3RBf8.mjs} +21 -11
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/pai-plugin.json +1 -1
- package/plugins/context-preservation/plugin.json +1 -1
- package/plugins/core/plugin.json +1 -1
- package/plugins/creative/plugin.json +1 -1
- package/plugins/observability/plugin.json +1 -1
- package/plugins/productivity/plugin.json +1 -1
- package/plugins/semantic-search/plugin.json +1 -1
- package/plugins/ui/plugin.json +1 -1
- package/plugins/zettelkasten/plugin.json +1 -1
- package/src/hooks/ts/lib/rules/builtin/base64-decode-to-shell.rule.yaml +3 -1
- package/src/hooks/ts/lib/rules/builtin/chmod-zero.rule.yaml +2 -0
- package/src/hooks/ts/lib/rules/builtin/curl-piped-to-shell.rule.yaml +8 -1
- package/src/hooks/ts/lib/rules/builtin/find-root-delete.rule.yaml +4 -1
- package/src/hooks/ts/lib/rules/builtin/instruction-override-disregard.rule.yaml +2 -0
- package/src/hooks/ts/lib/rules/builtin/reverse-shell-dev-tcp.rule.yaml +3 -0
- package/src/hooks/ts/lib/rules/builtin/reverse-shell-interactive-bash.rule.yaml +1 -0
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-parent.rule.yaml +3 -1
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-relative.rule.yaml +2 -1
- package/src/hooks/ts/lib/rules/builtin/rm-recursive-root.rule.yaml +4 -1
- package/src/hooks/ts/lib/rules/builtin/rm-trailing-tilde.rule.yaml +2 -1
- package/src/hooks/ts/lib/rules/builtin.generated.ts +34 -7
- package/src/hooks/ts/lib/rules/eval.ts +6 -4
- package/src/hooks/ts/lib/rules/lint.ts +7 -1
- package/src/hooks/ts/lib/rules/load.ts +55 -20
- package/src/hooks/ts/lib/rules/types.ts +2 -0
- package/src/hooks/ts/pre-tool-use/security-validator.ts +10 -2
- package/dist/auto-route-Bc8xP6TQ.mjs +0 -11
- package/dist/cockpit-memory-CLHZD64W.mjs +0 -20
- package/dist/daemon-176qA79N.mjs +0 -46
- package/dist/kill-tree-Dxei6qlR.mjs +0 -10
- package/dist/operator-Bmv5tiHQ.mjs +0 -7
- package/dist/session-DgZifjLx.mjs +0 -35
- package/dist/viewer-Ce-Xa9L3.mjs +0 -22
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./config-DGV64YJa.mjs";
|
|
2
|
+
import "./config-SlZ-Z52i.mjs";
|
|
3
|
+
import "./paths-BwfwHOvN.mjs";
|
|
4
|
+
import "./worktree-7ZS3RBf8.mjs";
|
|
5
|
+
import "./status-DTMT5lyn.mjs";
|
|
6
|
+
import "./pool-CFeHGX7q.mjs";
|
|
7
|
+
import "./registrable-D_4qXCnq.mjs";
|
|
8
|
+
import "./pai-marker-kA0iM7rP.mjs";
|
|
9
|
+
import { n as formatAutoRouteJson, t as autoRoute } from "./auto-route-PDOAYszN.mjs";
|
|
10
|
+
|
|
11
|
+
export { autoRoute, formatAutoRouteJson };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as readPaiMarker } from "./pai-marker-
|
|
1
|
+
import { r as readPaiMarker } from "./pai-marker-kA0iM7rP.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-PDOAYszN.mjs.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./config-
|
|
1
|
+
import "./config-DGV64YJa.mjs";
|
|
2
2
|
import "./config-SlZ-Z52i.mjs";
|
|
3
|
-
import "./paths-
|
|
4
|
-
import "./status-
|
|
5
|
-
import "./scope-
|
|
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-
|
|
7
|
-
import "./tool-errors-
|
|
8
|
-
import "./wait-
|
|
3
|
+
import "./paths-BwfwHOvN.mjs";
|
|
4
|
+
import "./status-DTMT5lyn.mjs";
|
|
5
|
+
import "./scope-BRcaPw5D.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-CF0wlR-_.mjs";
|
|
7
|
+
import "./tool-errors-BOW2n882.mjs";
|
|
8
|
+
import "./wait-BindDA5w.mjs";
|
|
9
9
|
import "./local-tiers-CqwGUcEn.mjs";
|
|
10
|
-
import "./caller-identity-
|
|
11
|
-
import "./capacity-
|
|
10
|
+
import "./caller-identity-DPDSrZE2.mjs";
|
|
11
|
+
import "./capacity-CThSydrd.mjs";
|
|
12
12
|
import "./local-instances-DhF4_sV2.mjs";
|
|
13
|
-
import "./local-candidate-
|
|
13
|
+
import "./local-candidate-C2FGhf54.mjs";
|
|
14
14
|
|
|
15
15
|
export { BUDGET_TTL_MS, BudgetCache, budgetCache, budgetExceeded, budgetFresh, budgetFull, budgetSkipReason, budgetUntilLabel, budgetWall, fetchBudgetReading, pickBudgetWindow };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as paiHomePath, l as claudeHomeDir } from "./runtime-paths-twfV23YL.mjs";
|
|
2
2
|
import { f as readMainConfigRaw } from "./config-SlZ-Z52i.mjs";
|
|
3
|
-
import { i as itermUuid } from "./scope-
|
|
3
|
+
import { i as itermUuid } from "./scope-BRcaPw5D.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-DPDSrZE2.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import { D as fmtElapsed } from "./wait-
|
|
1
|
+
import { m as isLocalProvider } from "./config-DGV64YJa.mjs";
|
|
2
|
+
import { O as reconcileStatuses, g as isLive, s as alive, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-DTMT5lyn.mjs";
|
|
3
|
+
import { D as fmtElapsed } from "./wait-BindDA5w.mjs";
|
|
4
4
|
import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
|
|
@@ -196,6 +196,12 @@ function providerCap(config, provider) {
|
|
|
196
196
|
/** Queue key of a session's `max_parallel` gate (a provider name never contains "~"). */
|
|
197
197
|
const sessionScopeKey = (name) => `session~${name}`;
|
|
198
198
|
const queueDir = (logDir, provider) => join(logDir, "queue", provider.replace(/[^\w.~-]/g, "_"));
|
|
199
|
+
/** Write a ticket atomically (temp + rename): a poller never reads it half-written. The ".tmp" suffix keeps it out of the listing. */
|
|
200
|
+
function writeTicket(path, text) {
|
|
201
|
+
const tmp = `${path}.${process.pid}.tmp`;
|
|
202
|
+
writeFileSync(tmp, text);
|
|
203
|
+
renameSync(tmp, path);
|
|
204
|
+
}
|
|
199
205
|
const entryText = (e) => `${e.pid}${e.front ? " front" : ""}${e.rank === void 0 ? "" : ` ${e.rank}`}${e.since === void 0 ? "" : ` @${e.since}`}`;
|
|
200
206
|
/** A ticket deleted (its run stopped) or written unparsably between the listing and this read is absent, not an error. */
|
|
201
207
|
function readEntry(dir, id) {
|
|
@@ -299,7 +305,8 @@ function liveEntries(logDir, provider, isAlive) {
|
|
|
299
305
|
for (const id of names.sort()) {
|
|
300
306
|
const e = readEntry(dir, id);
|
|
301
307
|
if (!e) continue;
|
|
302
|
-
if (Number.isInteger(e.pid)
|
|
308
|
+
if (!Number.isInteger(e.pid) || e.pid <= 0) continue;
|
|
309
|
+
if (isAlive(e.pid)) out.push(e);
|
|
303
310
|
else rmSync(join(dir, id), { force: true });
|
|
304
311
|
}
|
|
305
312
|
const group = (e) => e.front ? 0 : 1;
|
|
@@ -319,7 +326,7 @@ function liveQueue(logDir, provider, isAlive = alive, statuses, now, agingMs) {
|
|
|
319
326
|
function setFront(logDir, provider, id, isAlive = alive) {
|
|
320
327
|
const e = liveEntries(logDir, provider, isAlive).find((x) => x.id === id);
|
|
321
328
|
if (!e) return false;
|
|
322
|
-
if (!e.front)
|
|
329
|
+
if (!e.front) writeTicket(join(queueDir(logDir, provider), id), entryText({
|
|
323
330
|
...e,
|
|
324
331
|
front: true,
|
|
325
332
|
rank: void 0
|
|
@@ -335,7 +342,7 @@ function moveUp(logDir, provider, id, isAlive = alive) {
|
|
|
335
342
|
...order[i],
|
|
336
343
|
front: order[i - 1].front
|
|
337
344
|
}, order[i - 1]];
|
|
338
|
-
order.forEach((e, rank) =>
|
|
345
|
+
order.forEach((e, rank) => writeTicket(join(queueDir(logDir, provider), e.id), entryText({
|
|
339
346
|
...e,
|
|
340
347
|
rank
|
|
341
348
|
})));
|
|
@@ -357,7 +364,7 @@ function moveTo(logDir, provider, id, position, isAlive = alive) {
|
|
|
357
364
|
...e,
|
|
358
365
|
front: near ? near.front : e.front
|
|
359
366
|
});
|
|
360
|
-
order.forEach((x, rank) =>
|
|
367
|
+
order.forEach((x, rank) => writeTicket(join(queueDir(logDir, provider), x.id), entryText({
|
|
361
368
|
...x,
|
|
362
369
|
rank
|
|
363
370
|
})));
|
|
@@ -423,7 +430,7 @@ function queuedPaneLine(q) {
|
|
|
423
430
|
`waiting ${fmtElapsed(q.elapsedSec)}`
|
|
424
431
|
];
|
|
425
432
|
if (q.behind) parts.push(`behind ${q.behind}`);
|
|
426
|
-
if (q.label) parts.push(q.label);
|
|
433
|
+
if (q.label) parts.push(q.label.replace(/[\x00-\x1f\x7f-\x9f]/g, ""));
|
|
427
434
|
return parts.join(" · ");
|
|
428
435
|
}
|
|
429
436
|
/**
|
|
@@ -473,7 +480,7 @@ async function capacityGate(o) {
|
|
|
473
480
|
mkdirSync(dir, { recursive: true });
|
|
474
481
|
const entry = join(dir, self.id);
|
|
475
482
|
const t0 = now();
|
|
476
|
-
|
|
483
|
+
writeTicket(entry, `${self.pid ?? process.pid}${o.priority === "front" ? " front" : ""} @${t0}`);
|
|
477
484
|
const check = () => {
|
|
478
485
|
const loaded = load(logDir);
|
|
479
486
|
const queue = liveQueue(logDir, queueKey, isAlive, loaded, now(), cfg.agingMs);
|
|
@@ -507,6 +514,11 @@ async function capacityGate(o) {
|
|
|
507
514
|
};
|
|
508
515
|
};
|
|
509
516
|
o.log?.(info().line);
|
|
517
|
+
const queued = (q) => {
|
|
518
|
+
try {
|
|
519
|
+
o.onQueued?.(q);
|
|
520
|
+
} catch {}
|
|
521
|
+
};
|
|
510
522
|
let lastBeat = t0;
|
|
511
523
|
let alarmed = false;
|
|
512
524
|
const paneQueued = (i) => ({
|
|
@@ -518,7 +530,7 @@ async function capacityGate(o) {
|
|
|
518
530
|
});
|
|
519
531
|
try {
|
|
520
532
|
o.onWait?.(info());
|
|
521
|
-
|
|
533
|
+
queued(paneQueued(info()));
|
|
522
534
|
for (let n = 0;; n++) {
|
|
523
535
|
await sleep(backoffMs(n));
|
|
524
536
|
const fresh = o.capOf?.();
|
|
@@ -526,7 +538,7 @@ async function capacityGate(o) {
|
|
|
526
538
|
c = check();
|
|
527
539
|
if (c.position === 1 && c.holding < cap) break;
|
|
528
540
|
o.onWait?.(info());
|
|
529
|
-
|
|
541
|
+
queued(paneQueued(info()));
|
|
530
542
|
if (!alarmed && o.onAlarm && now() - t0 >= (o.alarmMs ?? cfg.maxTotalWaitMs)) {
|
|
531
543
|
alarmed = true;
|
|
532
544
|
o.onAlarm(info());
|
|
@@ -541,7 +553,7 @@ async function capacityGate(o) {
|
|
|
541
553
|
}
|
|
542
554
|
const waitedSec = Math.round((now() - t0) / 100) / 10;
|
|
543
555
|
o.onWait?.(null);
|
|
544
|
-
|
|
556
|
+
queued(null);
|
|
545
557
|
o.log?.(`waited ${waitedSec}s for a ${label} slot`);
|
|
546
558
|
return {
|
|
547
559
|
waitedSec,
|
|
@@ -551,4 +563,4 @@ async function capacityGate(o) {
|
|
|
551
563
|
|
|
552
564
|
//#endregion
|
|
553
565
|
export { sessionScopeKey as _, liveQueue as a, staggerGate as b, queuedFilePath as c, readQueued as d, removeQueued as f, sessionOf as g, resolveCap as h, effectiveCap as i, queuedPaneLine as l, reorderQueueTo as m, capacityGate as n, providerCap as o, reorderQueue as p, capacityOf as r, queueRows as s, admitCap as t, queuedText as u, writeQueued as v, recordWarmup as y };
|
|
554
|
-
//# sourceMappingURL=capacity-
|
|
566
|
+
//# sourceMappingURL=capacity-CThSydrd.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Et as appendLedger, M as readWorkersSection } from "./config-
|
|
2
|
-
import { i as ledgerPath, u as workersLogDir } from "./paths-
|
|
3
|
-
import { S as newWorkerId, et as isFlagToken, rt as shortText } from "./status-
|
|
4
|
-
import { t as runWorker } from "./run-
|
|
1
|
+
import { Et as appendLedger, M as readWorkersSection } from "./config-DGV64YJa.mjs";
|
|
2
|
+
import { i as ledgerPath, u as workersLogDir } from "./paths-BwfwHOvN.mjs";
|
|
3
|
+
import { S as newWorkerId, et as isFlagToken, rt as shortText } from "./status-DTMT5lyn.mjs";
|
|
4
|
+
import { t as runWorker } from "./run-CAjfKBQV.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-BvdKqRiZ.mjs.map
|