@tekmidian/pai 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/{auto-route-B7Yu6Uam.mjs → auto-route-DUYr57rs.mjs} +2 -2
- package/dist/auto-route-DWYK_0i0.mjs +11 -0
- package/dist/budget-DX-VIWGf.mjs +15 -0
- package/dist/{caller-identity-yLFb7CKq.mjs → caller-identity-Bim8JT-D.mjs} +3 -3
- package/dist/{capacity-DEveQdFV.mjs → capacity-CsZMkVyg.mjs} +7 -4
- package/dist/{chain-7n9Gx56r.mjs → chain-Dzz6xcKH.mjs} +5 -5
- package/dist/cli/index.mjs +114 -208
- package/dist/{cockpit-actions-BBHeyEZI.mjs → cockpit-actions-BTA1njMO.mjs} +31 -25
- package/dist/{cockpit-actions-DR9X514g.mjs → cockpit-actions-BgsiNcUY.mjs} +18 -18
- package/dist/cockpit-memory-DIrNs4xr.mjs +20 -0
- package/dist/config/defaults/config.yaml +9 -0
- package/dist/{config-XpZWOYOG.mjs → config-CST2uq1v.mjs} +29 -4
- package/dist/{config-Bu1_vbY8.mjs → config-DYbyEe4-.mjs} +2 -2
- package/dist/{config-DtENJ6cL.mjs → config-Dv3t7xnT.mjs} +1 -1
- package/dist/config-h5qK3fst.mjs +4 -0
- package/dist/{controls-CPoeudou.mjs → controls-OiVVbe-f.mjs} +18 -16
- package/dist/daemon/index.mjs +38 -37
- package/dist/{daemon-DPAo6WTa.mjs → daemon-C1dycZ3W.mjs} +35 -29
- package/dist/daemon-ieo0lnpq.mjs +46 -0
- package/dist/daemon-mcp/index.mjs +35 -35
- package/dist/detect-C0ZBXqDL.mjs +10 -0
- package/dist/{detect-9CZNO0yf.mjs → detect-CHuxFrLy.mjs} +2 -2
- package/dist/{embed-pass-DIWjA68P.mjs → embed-pass-DtVF2fOV.mjs} +4 -4
- package/dist/{embedding-gate-Cnk4YCyX.mjs → embedding-gate-B98PK_wz.mjs} +2 -2
- package/dist/{embedding-gate-6rZrWRXa.mjs → embedding-gate-CTAk8STe.mjs} +2 -2
- package/dist/{endreason-C577xIQz.mjs → endreason-BqyyU7BH.mjs} +20 -6
- package/dist/{factory-DjAAsqr_.mjs → factory-BV0MQA3T.mjs} +4 -4
- package/dist/{factory-Bsib-qDG.mjs → factory-DeASMV7Z.mjs} +4 -4
- package/dist/{fallback-DFlItw1Z.mjs → fallback-Bj2cyVk_.mjs} +230 -8
- package/dist/{health-Dnym-qcT.mjs → health-kufVIf6i.mjs} +4 -4
- package/dist/{helpers-BD6V-p9w.mjs → helpers-CvbYEKoD.mjs} +2 -2
- package/dist/{helpers-CMGjy_0N.mjs → helpers-WV8tdQHM.mjs} +5 -5
- package/dist/hooks/block-sleep-poll.mjs +1 -1
- package/dist/hooks/capture-all-events.mjs +21 -2
- package/dist/hooks/capture-tool-output.mjs +21 -2
- package/dist/hooks/load-project-context.mjs +7 -7
- package/dist/hooks/local-model-hint.mjs +1 -1
- package/dist/hooks/route-agents-to-worker.mjs +1 -1
- package/dist/hooks/security-validator.mjs +2 -2
- package/dist/hooks/worker-edit-repair.mjs +2 -2
- package/dist/hooks/worker-guard.mjs +8 -8
- package/dist/hooks/worker-note.mjs +2 -2
- package/dist/hooks/worker-pool-host.mjs +158 -55
- package/dist/hooks/worker-proxy.mjs +1 -1
- package/dist/hooks/worker-status-line.mjs +50 -22
- package/dist/hooks/worker-supervision.mjs +1 -1
- package/dist/hooks/worker-tool-name-repair.mjs +2 -2
- package/dist/index.mjs +8 -8
- package/dist/{indexer-backend-Cll7le4P.mjs → indexer-backend-B2vtFl38.mjs} +37 -234
- package/dist/{ipc-client-CaiGJnSM.mjs → ipc-client-CnYEF31R.mjs} +1 -1
- package/dist/{ipc-client-ZRmDKd5Z.mjs → ipc-client-DN7EvoVo.mjs} +1 -1
- package/dist/kill-tree-CXZ0WfVf.mjs +10 -0
- package/dist/{kill-tree-EWYaEk5v.mjs → kill-tree-CcpsRLCZ.mjs} +7 -7
- package/dist/{launch-Jh5NVeNe.mjs → launch-DpQPZGsT.mjs} +3 -3
- package/dist/{launch-CXVlZjHt.mjs → launch-UPQBoW2q.mjs} +3 -3
- package/dist/{local-candidate-DLdwQt0s.mjs → local-candidate-Cp_bw4kK.mjs} +3 -3
- package/dist/{local-instances-ZeRkkuS5.mjs → local-instances-B-c-CxzP.mjs} +4 -4
- package/dist/{local-instances-DOxSgT_L.mjs → local-instances-bdCNNSsL.mjs} +2 -2
- package/dist/{local-tiers-BE4jGaMa.mjs → local-tiers-BtdEEe5n.mjs} +2 -2
- package/dist/{local-tiers-DNMI5W86.mjs → local-tiers-OBqAAfOg.mjs} +3 -3
- package/dist/{main-config-ops-BEMpuhDz.mjs → main-config-ops-BYsK3BxM.mjs} +3 -3
- package/dist/{main-resolver-3Ns1HPmS.mjs → main-resolver-CAC3xfZM.mjs} +17 -17
- package/dist/{model-inventory-BFVSNFT3.mjs → model-inventory-BuTpi9a6.mjs} +13 -13
- package/dist/{models-add-C1QIc1DA.mjs → models-add-CJx2YAwh.mjs} +37 -36
- package/dist/operator-Bpxq_WB5.mjs +7 -0
- package/dist/{operator-CyuB3aVw.mjs → operator-DrwWItVt.mjs} +2 -2
- package/dist/{pai-marker-BcZyJguM.mjs → pai-marker-DLKJ9Yr5.mjs} +2 -2
- package/dist/{pane-audit-DKQt71s4.mjs → pane-audit-wv9UkyCe.mjs} +27 -9
- package/dist/{paths-CFHTloSe.mjs → paths-DBd78I7Z.mjs} +3 -3
- package/dist/{paths-CHifubDh.mjs → paths-DS5VQKoR.mjs} +3 -3
- package/dist/{planner-BmFACdLa.mjs → planner-K0mFrCpL.mjs} +28 -28
- package/dist/{pool-Dh-q3iJi.mjs → pool-BZ94nFuq.mjs} +2 -2
- package/dist/{pool-cli-BggU8GRp.mjs → pool-cli-B1eKySeN.mjs} +5 -5
- package/dist/{pool-cli-DQ6OzRy2.mjs → pool-cli-BjYQDfx6.mjs} +6 -6
- package/dist/{postgres-C6ti4haA.mjs → postgres-C-T5OWer.mjs} +19 -9
- package/dist/{postgres-BdBNkL_l.mjs → postgres-CBHY5PIi.mjs} +3 -3
- package/dist/{project-setup-jvfONJTQ.mjs → project-setup-pIPHZaXf.mjs} +26 -246
- package/dist/{providers-CblTFrhz.mjs → providers-Dzx5GAUI.mjs} +6 -6
- package/dist/providers-QJzpaNhX.mjs +16 -0
- package/dist/{query-feedback-BRfPtqki.mjs → query-feedback-DN52N9C5.mjs} +1 -1
- package/dist/{registrable-DpyTtajg.mjs → registrable-CXBBpUcz.mjs} +4 -4
- package/dist/registrable-Drn8wIDO.mjs +9 -0
- package/dist/render-C4KR8qQ8.mjs +13 -0
- package/dist/{render-BYmQkuLd.mjs → render-Cz3BWIBO.mjs} +8 -8
- package/dist/root-Bfb1zgwE.mjs +36 -0
- package/dist/{root-Xglu0OPD.mjs → root-bG48WVpW.mjs} +10 -10
- package/dist/route-table-ZVMNBsy7.mjs +15 -0
- package/dist/{routing-BAAST9vT.mjs → routing-BlD_tKjW.mjs} +136 -18
- package/dist/{routing-CENt4HH1.mjs → routing-D27jxj9x.mjs} +13 -13
- package/dist/{run-CSC7mgPf.mjs → run-AZVwceiU.mjs} +49 -27
- package/dist/{scan-C_Y5W9py.mjs → scan-C3uotg_f.mjs} +5 -5
- package/dist/{scope-D-h6F6DN.mjs → scope-D8HK6vU7.mjs} +4 -4
- package/dist/{session-8iqQDkqb.mjs → session-BAfypQb9.mjs} +26 -26
- package/dist/session-BcnhepLZ.mjs +35 -0
- package/dist/{session-scan-W-gbwJHM.mjs → session-scan-BmnjSReu.mjs} +5 -5
- package/dist/session-scan-CqUQdCac.mjs +9 -0
- package/dist/session-usage-oycSdiD3.mjs +337 -0
- package/dist/{sources-ESUkZaWv.mjs → sources-CiE3rZek.mjs} +1 -1
- package/dist/{status-ggJ7lgVg.mjs → status-COtzewKV.mjs} +3 -3
- package/dist/{status-Dm4dYciN.mjs → status-D_SWmOlH.mjs} +4 -4
- package/dist/{tool-errors-CJWODvlo.mjs → tool-errors-B2LnIqR0.mjs} +6 -6
- package/dist/{tool-errors-7E13StWd.mjs → tool-errors-DXJ70-sr.mjs} +2 -2
- package/dist/{viewer-mDXUNHNy.mjs → viewer-BgGRqXfD.mjs} +14 -14
- package/dist/viewer-CbGN2Ri4.mjs +22 -0
- package/dist/{wait-ByV0OyMZ.mjs → wait-ChpHKJZV.mjs} +3 -3
- package/dist/worker-config-D1KVAMp4.mjs +42 -0
- package/dist/{worker-config-CJhEMk19.mjs → worker-config-DgdT0iTB.mjs} +443 -40
- package/dist/workers-config-BhZBrR-Q.mjs +4 -0
- package/dist/{worktree-CRs2gyg0.mjs → worktree-BY--Rgmy.mjs} +5 -5
- package/dist/{zettelkasten-B_rRRRvD.mjs → zettelkasten-BHVx5zj-.mjs} +4 -4
- package/dist/{zettelkasten-BzMm8REH.mjs → zettelkasten-LoH9RBiN.mjs} +2 -2
- package/docs/cockpit.md +1 -0
- package/docs/commands/README.md +1 -0
- package/docs/commands/config.md +20 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/pai-plugin.json +1 -1
- package/plugins/context-preservation/plugin.json +1 -1
- package/plugins/core/plugin.json +1 -1
- package/plugins/creative/plugin.json +1 -1
- package/plugins/observability/plugin.json +1 -1
- package/plugins/productivity/plugin.json +1 -1
- package/plugins/semantic-search/plugin.json +1 -1
- package/plugins/ui/plugin.json +1 -1
- package/plugins/zettelkasten/plugin.json +1 -1
- package/src/hooks/ts/capture-all-events.ts +15 -3
- package/src/hooks/ts/lib/raw-capture.ts +7 -0
- package/src/hooks/ts/post-tool-use/capture-tool-output.ts +13 -3
- package/dist/auto-route-CjjQqU1o.mjs +0 -11
- package/dist/budget-Dod6rnA9.mjs +0 -15
- package/dist/cockpit-memory--dnShXBA.mjs +0 -20
- package/dist/config-Cxi-aBf4.mjs +0 -4
- package/dist/daemon-DKdBNKfa.mjs +0 -45
- package/dist/detect-D1ziFFfA.mjs +0 -10
- package/dist/kill-tree-BG7dRVtp.mjs +0 -10
- package/dist/operator-BTqvTIc8.mjs +0 -7
- package/dist/providers-BeDiVEb-.mjs +0 -16
- package/dist/registrable-BzH4TObg.mjs +0 -9
- package/dist/render-CoMvwMPs.mjs +0 -13
- package/dist/root-FtJsxYnm.mjs +0 -36
- package/dist/route-table-B7zpoypi.mjs +0 -15
- package/dist/session-BeqAbNPd.mjs +0 -35
- package/dist/session-scan-BJI_ZO8M.mjs +0 -9
- package/dist/viewer-CqozWW39.mjs +0 -22
- package/dist/worker-config-DESkIjMF.mjs +0 -41
- package/dist/workers-config-f8KrkY4L.mjs +0 -4
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { rt as workersYamlPath } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { u as paiConfigFilePath, w as readDualFormatConfigRaw, x as userWorkersYamlRaw } from "./config-DYbyEe4-.mjs";
|
|
3
|
+
import { createReadStream, existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { createInterface } from "node:readline";
|
|
5
|
+
|
|
6
|
+
//#region src/workers/config-shadow.ts
|
|
7
|
+
/**
|
|
8
|
+
* config-shadow.ts — where each `workers` setting is really read from.
|
|
9
|
+
*
|
|
10
|
+
* Merge order (readWorkersSection in config.ts):
|
|
11
|
+
* 1. shipped defaults/workers.yaml `workers:` block (defaultWorkersConfig)
|
|
12
|
+
* 2. config.yaml `workers:` block over it (parseWorkersConfig)
|
|
13
|
+
* 3. workers.yaml supplies ONLY the routing tables: providers, tiers,
|
|
14
|
+
* capabilities, active, classes, mcp_sets — it replaces what config.yaml
|
|
15
|
+
* holds for those keys.
|
|
16
|
+
* So a non-provider setting (pool, pane, routing, …) has exactly one source,
|
|
17
|
+
* config.yaml; anything else in workers.yaml is never read. And the routing
|
|
18
|
+
* tables have exactly one source, workers.yaml. This module reports every
|
|
19
|
+
* key written in the wrong file (or nowhere read) so validate can name it.
|
|
20
|
+
*/
|
|
21
|
+
/** Top-level workers.yaml keys the runtime reads from the user file. */
|
|
22
|
+
const WORKERS_YAML_READ_KEYS = [
|
|
23
|
+
"providers",
|
|
24
|
+
"tiers",
|
|
25
|
+
"capabilities",
|
|
26
|
+
"active",
|
|
27
|
+
"classes",
|
|
28
|
+
"mcp_sets",
|
|
29
|
+
"local_launcher",
|
|
30
|
+
"local_tiers",
|
|
31
|
+
"prices"
|
|
32
|
+
];
|
|
33
|
+
/** config.yaml `workers.<key>` entries that workers.yaml replaces when it exists. */
|
|
34
|
+
const MAIN_SHADOWED_BY_YAML = [
|
|
35
|
+
"providers",
|
|
36
|
+
"tiers",
|
|
37
|
+
"capabilities",
|
|
38
|
+
"active",
|
|
39
|
+
"classes",
|
|
40
|
+
"mcpSets"
|
|
41
|
+
];
|
|
42
|
+
const isObj = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
43
|
+
function leaves(v, prefix, out) {
|
|
44
|
+
if (isObj(v) && Object.keys(v).length) for (const [k, x] of Object.entries(v)) leaves(x, prefix ? `${prefix}.${k}` : k, out);
|
|
45
|
+
else if (prefix) out.set(prefix, v);
|
|
46
|
+
}
|
|
47
|
+
function getPath(root, path) {
|
|
48
|
+
let cur = root;
|
|
49
|
+
for (const seg of path.split(".")) {
|
|
50
|
+
if (!isObj(cur)) return void 0;
|
|
51
|
+
cur = cur[seg];
|
|
52
|
+
}
|
|
53
|
+
return cur;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Shadowed / unused keys given the two files as written. `workersRaw` null =
|
|
57
|
+
* no workers.yaml on disk (nothing in it to shadow, nothing shadowing config.yaml).
|
|
58
|
+
*/
|
|
59
|
+
function workersConfigShadows(mainRaw, workersRaw) {
|
|
60
|
+
const out = [];
|
|
61
|
+
const mainWorkers = isObj(mainRaw.workers) ? mainRaw.workers : {};
|
|
62
|
+
if (workersRaw) {
|
|
63
|
+
const l = /* @__PURE__ */ new Map();
|
|
64
|
+
leaves(workersRaw.workers, "", l);
|
|
65
|
+
for (const [path, value] of l) {
|
|
66
|
+
const full = `workers.${path}`;
|
|
67
|
+
const inMain = getPath(mainWorkers, path) !== void 0;
|
|
68
|
+
out.push({
|
|
69
|
+
file: "workers.yaml",
|
|
70
|
+
key: full,
|
|
71
|
+
effective: `config.yaml:${full}`,
|
|
72
|
+
value,
|
|
73
|
+
message: `workers.yaml:${full} is ignored — the runtime reads ${full} from config.yaml${inMain ? " (which also sets it and wins)" : ""}; set it there (pai config set ${full} <value>)`
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
for (const [k, value] of Object.entries(workersRaw)) {
|
|
77
|
+
if (k === "workers" || WORKERS_YAML_READ_KEYS.includes(k)) continue;
|
|
78
|
+
out.push({
|
|
79
|
+
file: "workers.yaml",
|
|
80
|
+
key: k,
|
|
81
|
+
effective: "(none)",
|
|
82
|
+
value,
|
|
83
|
+
message: `workers.yaml:${k} is unused — nothing reads a top-level "${k}" block${k === "pool" ? "; the session pool is config.yaml:workers.pool (enabled, maxSlots, idleSecs, …)" : ""}`
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
for (const k of MAIN_SHADOWED_BY_YAML) {
|
|
87
|
+
if (mainWorkers[k] === void 0) continue;
|
|
88
|
+
const yk = k === "mcpSets" ? "mcp_sets" : k;
|
|
89
|
+
out.push({
|
|
90
|
+
file: "config.yaml",
|
|
91
|
+
key: `workers.${k}`,
|
|
92
|
+
effective: `workers.yaml:${yk}`,
|
|
93
|
+
value: mainWorkers[k],
|
|
94
|
+
message: `config.yaml:workers.${k} is shadowed by workers.yaml — the routing tables are read from workers.yaml:${yk}`
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return out;
|
|
99
|
+
}
|
|
100
|
+
/** The live pair of files (paths resolve like the runtime's). Unreadable config.yaml counts as empty. */
|
|
101
|
+
function liveWorkersConfigShadows(mainPath = paiConfigFilePath(), yamlPath = workersYamlPath()) {
|
|
102
|
+
let main = {};
|
|
103
|
+
try {
|
|
104
|
+
main = readDualFormatConfigRaw(mainPath);
|
|
105
|
+
} catch {}
|
|
106
|
+
return workersConfigShadows(main, existsSync(yamlPath) ? userWorkersYamlRaw(yamlPath) : null);
|
|
107
|
+
}
|
|
108
|
+
let loggedOnce = false;
|
|
109
|
+
/** Daemon start: one stderr line per shadowed key, at most once per process. */
|
|
110
|
+
function logWorkersConfigShadowsOnce(write = (l) => process.stderr.write(l)) {
|
|
111
|
+
if (loggedOnce) return;
|
|
112
|
+
loggedOnce = true;
|
|
113
|
+
try {
|
|
114
|
+
for (const s of liveWorkersConfigShadows()) write(`[pai-daemon] config warning: ${s.message}\n`);
|
|
115
|
+
} catch {}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/audit/session-usage.ts
|
|
120
|
+
/**
|
|
121
|
+
* session-usage.ts — parse the usage numbers out of a Claude Code session
|
|
122
|
+
* (or subagent, or pai-worker event-mirror) JSONL transcript.
|
|
123
|
+
*
|
|
124
|
+
* All three log shapes share the same assistant-message envelope
|
|
125
|
+
* ({ type: "assistant", message: { id, model, usage } }), so one parser
|
|
126
|
+
* covers `pai audit tokens session` and the per-log readings feeding
|
|
127
|
+
* `pai audit tokens spawn`.
|
|
128
|
+
*
|
|
129
|
+
* Streaming writes one JSONL line per content block of the same logical
|
|
130
|
+
* turn, repeating message.id and usage each time — summing every line would
|
|
131
|
+
* multiply usage by the block count. Keeping only the first line seen per
|
|
132
|
+
* message.id is what the reference script (and this parser) count instead.
|
|
133
|
+
*/
|
|
134
|
+
const USAGE_KEYS = [
|
|
135
|
+
"cache_read_input_tokens",
|
|
136
|
+
"cache_creation_input_tokens",
|
|
137
|
+
"input_tokens",
|
|
138
|
+
"output_tokens"
|
|
139
|
+
];
|
|
140
|
+
function emptyTotals() {
|
|
141
|
+
return {
|
|
142
|
+
cache_read_input_tokens: 0,
|
|
143
|
+
cache_creation_input_tokens: 0,
|
|
144
|
+
input_tokens: 0,
|
|
145
|
+
output_tokens: 0
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* `type:"system"` `subtype:"compact_boundary"` lines mark a compaction.
|
|
150
|
+
* turnIndex is the count of assistant turns already folded when it fired,
|
|
151
|
+
* so it lines up with the turn numbering the text/JSON report prints.
|
|
152
|
+
*/
|
|
153
|
+
function isCompactBoundary(line) {
|
|
154
|
+
return line.type === "system" && line.subtype === "compact_boundary";
|
|
155
|
+
}
|
|
156
|
+
function parseCompactionEvent(line, turnIndex) {
|
|
157
|
+
const meta = line.compactMetadata;
|
|
158
|
+
if (!meta || typeof meta.preTokens !== "number") return null;
|
|
159
|
+
return {
|
|
160
|
+
trigger: meta.trigger ?? "unknown",
|
|
161
|
+
preTokens: meta.preTokens,
|
|
162
|
+
turnIndex
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* `type:"system"` `subtype:"model_refusal_fallback"` lines mark an
|
|
167
|
+
* automatic model switch fired by an API safety refusal (e.g. "cyber"
|
|
168
|
+
* category), not a user or config choice — worth flagging separately since
|
|
169
|
+
* it can rebuild the whole prompt cache mid-session.
|
|
170
|
+
*/
|
|
171
|
+
function isModelFallback(line) {
|
|
172
|
+
return line.type === "system" && line.subtype === "model_refusal_fallback";
|
|
173
|
+
}
|
|
174
|
+
function parseFallbackEvent(line, turnIndex) {
|
|
175
|
+
return {
|
|
176
|
+
turnIndex,
|
|
177
|
+
from: line.originalModel ?? "unknown",
|
|
178
|
+
to: line.fallbackModel ?? "unknown",
|
|
179
|
+
category: line.apiRefusalCategory ?? "unknown",
|
|
180
|
+
scope: line.scope ?? "unknown"
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Fold one already-parsed JSONL line into a report being accumulated.
|
|
185
|
+
* Exported separately so both the streaming file reader below and tests
|
|
186
|
+
* (which build fixtures as arrays of objects, not files) share one path.
|
|
187
|
+
* Returns the turn's context value when a new turn was counted, else null
|
|
188
|
+
* (non-assistant line, no usage, or a duplicate message.id already seen).
|
|
189
|
+
*/
|
|
190
|
+
function foldAssistantLine(report, seenIds, line, threshold) {
|
|
191
|
+
if (line.type !== "assistant") return null;
|
|
192
|
+
const message = line.message;
|
|
193
|
+
const usage = message?.usage;
|
|
194
|
+
if (!usage) return null;
|
|
195
|
+
const id = message?.id ?? line.uuid;
|
|
196
|
+
if (id) {
|
|
197
|
+
if (seenIds.has(id)) return null;
|
|
198
|
+
seenIds.add(id);
|
|
199
|
+
}
|
|
200
|
+
report.turns++;
|
|
201
|
+
for (const key of USAGE_KEYS) {
|
|
202
|
+
const v = usage[key];
|
|
203
|
+
if (typeof v === "number") report.totals[key] += v;
|
|
204
|
+
}
|
|
205
|
+
const context = (Number(usage.cache_read_input_tokens) || 0) + (Number(usage.cache_creation_input_tokens) || 0) + (Number(usage.input_tokens) || 0);
|
|
206
|
+
if (report.firstTurnContext === null) {
|
|
207
|
+
report.firstTurnContext = context;
|
|
208
|
+
report.firstTurnAt = line.timestamp ?? null;
|
|
209
|
+
}
|
|
210
|
+
const atMs = line.timestamp ? Date.parse(line.timestamp) : NaN;
|
|
211
|
+
if (!Number.isNaN(atMs)) {
|
|
212
|
+
if (report.lastTurnAtMs !== null && atMs - report.lastTurnAtMs > 3600 * 1e3) report.idleGapsOver60min++;
|
|
213
|
+
report.lastTurnAtMs = atMs;
|
|
214
|
+
}
|
|
215
|
+
report.lastTurnContext = context;
|
|
216
|
+
report.maxContext = report.maxContext === null ? context : Math.max(report.maxContext, context);
|
|
217
|
+
if (context > threshold) report.turnsAboveThreshold++;
|
|
218
|
+
if ((Number(usage.cache_creation_input_tokens) || 0) > 2e4) report.cacheRebuildTurns++;
|
|
219
|
+
const model = message?.model ?? "unknown";
|
|
220
|
+
report.models[model] = (report.models[model] ?? 0) + 1;
|
|
221
|
+
if (report.lastModel !== null && report.lastModel !== model) report.modelSwitches.push({
|
|
222
|
+
turnIndex: report.turns,
|
|
223
|
+
from: report.lastModel,
|
|
224
|
+
to: model,
|
|
225
|
+
cacheRead: Number(usage.cache_read_input_tokens) || 0,
|
|
226
|
+
cacheCreation: Number(usage.cache_creation_input_tokens) || 0
|
|
227
|
+
});
|
|
228
|
+
report.lastModel = model;
|
|
229
|
+
const split = usage.cache_creation;
|
|
230
|
+
if (split) {
|
|
231
|
+
report.cacheCreationSplit.ephemeral5m += Number(split.ephemeral_5m_input_tokens) || 0;
|
|
232
|
+
report.cacheCreationSplit.ephemeral1h += Number(split.ephemeral_1h_input_tokens) || 0;
|
|
233
|
+
}
|
|
234
|
+
return context;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* True for a real human-authored `type:"user"` prompt line: content is a
|
|
238
|
+
* plain string, or a content array with no `tool_result` block. Claude Code
|
|
239
|
+
* encodes tool results as `type:"user"` messages whose content array is
|
|
240
|
+
* entirely (or partly) tool_result blocks — those must not count as prompts.
|
|
241
|
+
*/
|
|
242
|
+
function isRealUserPrompt(line) {
|
|
243
|
+
if (line.type !== "user") return false;
|
|
244
|
+
if (line.isMeta) return false;
|
|
245
|
+
if (line.origin?.kind && line.origin.kind !== "human") return false;
|
|
246
|
+
const content = line.message?.content;
|
|
247
|
+
if (typeof content === "string") return true;
|
|
248
|
+
if (Array.isArray(content)) return !content.some((block) => block?.type === "tool_result");
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
/** Plain text of a real user prompt: the string content, or its first text block. */
|
|
252
|
+
function extractUserPromptText(line) {
|
|
253
|
+
const content = line.message?.content;
|
|
254
|
+
if (typeof content === "string") return content;
|
|
255
|
+
if (Array.isArray(content)) return content.find((b) => b?.type === "text")?.text ?? "";
|
|
256
|
+
return "";
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Parse a session/subagent/worker-event JSONL file into a usage report.
|
|
260
|
+
* `keepaliveWord`, when given, counts real user prompts whose text exactly
|
|
261
|
+
* matches it (trimmed) — the sessions.cacheKeepalive beat prompt — into
|
|
262
|
+
* `keepaliveBeats`; omitted, `keepaliveBeats` stays null.
|
|
263
|
+
*/
|
|
264
|
+
async function parseSessionUsage(path, threshold = 2e5, keepaliveWord) {
|
|
265
|
+
const report = {
|
|
266
|
+
path,
|
|
267
|
+
sizeBytes: existsSync(path) ? readFileSync(path).byteLength : 0,
|
|
268
|
+
turns: 0,
|
|
269
|
+
totals: emptyTotals(),
|
|
270
|
+
models: {},
|
|
271
|
+
firstTurnContext: null,
|
|
272
|
+
lastTurnContext: null,
|
|
273
|
+
cacheCreationSplit: {
|
|
274
|
+
ephemeral5m: 0,
|
|
275
|
+
ephemeral1h: 0
|
|
276
|
+
},
|
|
277
|
+
avgContext: null,
|
|
278
|
+
maxContext: null,
|
|
279
|
+
turnsAboveThreshold: 0,
|
|
280
|
+
cacheRebuildTurns: 0,
|
|
281
|
+
userPrompts: 0,
|
|
282
|
+
promptExposure: 0,
|
|
283
|
+
compactions: [],
|
|
284
|
+
firstTurnAt: null,
|
|
285
|
+
lastModel: null,
|
|
286
|
+
modelSwitches: [],
|
|
287
|
+
fallbacks: [],
|
|
288
|
+
lastTurnAtMs: null,
|
|
289
|
+
idleGapsOver60min: 0,
|
|
290
|
+
keepaliveBeats: keepaliveWord ? 0 : null
|
|
291
|
+
};
|
|
292
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
293
|
+
let contextSum = 0;
|
|
294
|
+
const rl = createInterface({
|
|
295
|
+
input: createReadStream(path, "utf8"),
|
|
296
|
+
crlfDelay: Infinity
|
|
297
|
+
});
|
|
298
|
+
for await (const raw of rl) {
|
|
299
|
+
if (!raw.trim()) continue;
|
|
300
|
+
let obj;
|
|
301
|
+
try {
|
|
302
|
+
obj = JSON.parse(raw);
|
|
303
|
+
} catch {
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
if (obj.type === "user") {
|
|
307
|
+
if (isRealUserPrompt(obj)) {
|
|
308
|
+
report.userPrompts++;
|
|
309
|
+
if (keepaliveWord && extractUserPromptText(obj).trim() === keepaliveWord) report.keepaliveBeats = (report.keepaliveBeats ?? 0) + 1;
|
|
310
|
+
}
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
if (isCompactBoundary(obj)) {
|
|
314
|
+
const event = parseCompactionEvent(obj, report.turns);
|
|
315
|
+
if (event) report.compactions.push(event);
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
318
|
+
if (isModelFallback(obj)) {
|
|
319
|
+
report.fallbacks.push(parseFallbackEvent(obj, report.turns));
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
const context = foldAssistantLine(report, seenIds, obj, threshold);
|
|
323
|
+
if (context !== null) {
|
|
324
|
+
contextSum += context;
|
|
325
|
+
report.promptExposure += report.userPrompts;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
report.avgContext = report.turns > 0 ? Math.round(contextSum / report.turns) : null;
|
|
329
|
+
return report;
|
|
330
|
+
}
|
|
331
|
+
function totalUsageTokens(totals) {
|
|
332
|
+
return totals.cache_read_input_tokens + totals.cache_creation_input_tokens + totals.input_tokens + totals.output_tokens;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
//#endregion
|
|
336
|
+
export { liveWorkersConfigShadows as a, totalUsageTokens as i, isRealUserPrompt as n, logWorkersConfigShadowsOnce as o, parseSessionUsage as r, workersConfigShadows as s, extractUserPromptText as t };
|
|
337
|
+
//# sourceMappingURL=session-usage-oycSdiD3.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as readMainConfigRaw } from "./config-
|
|
2
|
-
import { l as statusPath } from "./paths-
|
|
1
|
+
import { f as readMainConfigRaw } from "./config-DYbyEe4-.mjs";
|
|
2
|
+
import { l as statusPath } from "./paths-DS5VQKoR.mjs";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -921,4 +921,4 @@ function describeTool(name, inp) {
|
|
|
921
921
|
|
|
922
922
|
//#endregion
|
|
923
923
|
export { isFlagToken as $, setWorkerLabel as A, loadStatusConfig as B, nowStamp as C, pidAlive as D, parseSleepSecs as E, ForgeError as F, writeSectionToForge as G, setClaim as H, PROJECT_CONFIG_REL as I, loadPreamble as J, PREAMBLE_MAX_BYTES as K, formatStale as L, spawnTimeOf as M, statusTmpPath as N, reconcileStatuses as O, waitForTerminalStatus as P, appendSystemPromptArgs as Q, listClaims as R, newWorkerId as S, ownsPidCached as T, upsertSection as U, parseStatusConfig as V, writeContinueToForge as W, preambleLine as X, preambleBlock as Y, projectRoot as Z, isTerminal as _, UNLABELED as a, loadStatusesCached as b, contextFooter as c, describeTool as d, longInlinePromptHint as et, elapsedOf as f, isLive as g, isChatPane as h, TERMINAL_RECHECK_MS as i, setWorkerNote as j, saveStatus as k, contextLabel as l, fmtTokens as m, OWNS_TTL_MS as n, shortText as nt, ageOf as o, fmtContextK as p, PREAMBLE_REL as q, SLEEP_FLOOR_SECS as r, stripPromptValues as rt, alive as s, LOST_GRACE_MS as t, parseRunnerArgs as tt, contextPercent as u, loadStatus as v, ownsPid as w, markStartFailed as x, loadStatuses as y, listStale as z };
|
|
924
|
-
//# sourceMappingURL=status-
|
|
924
|
+
//# sourceMappingURL=status-COtzewKV.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./paths-
|
|
4
|
-
import { A as setWorkerLabel, C as nowStamp, D as pidAlive, E as parseSleepSecs, M as spawnTimeOf, N as statusTmpPath, O as reconcileStatuses, P as waitForTerminalStatus, S as newWorkerId, T as ownsPidCached, _ as isTerminal, a as UNLABELED, b as loadStatusesCached, c as contextFooter, d as describeTool, f as elapsedOf, g as isLive, h as isChatPane, i as TERMINAL_RECHECK_MS, j as setWorkerNote, k as saveStatus, l as contextLabel, m as fmtTokens, n as OWNS_TTL_MS, o as ageOf, p as fmtContextK, r as SLEEP_FLOOR_SECS, s as alive, t as LOST_GRACE_MS, u as contextPercent, v as loadStatus, w as ownsPid, x as markStartFailed, y as loadStatuses } from "./status-
|
|
1
|
+
import "./config-CST2uq1v.mjs";
|
|
2
|
+
import "./config-DYbyEe4-.mjs";
|
|
3
|
+
import "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import { A as setWorkerLabel, C as nowStamp, D as pidAlive, E as parseSleepSecs, M as spawnTimeOf, N as statusTmpPath, O as reconcileStatuses, P as waitForTerminalStatus, S as newWorkerId, T as ownsPidCached, _ as isTerminal, a as UNLABELED, b as loadStatusesCached, c as contextFooter, d as describeTool, f as elapsedOf, g as isLive, h as isChatPane, i as TERMINAL_RECHECK_MS, j as setWorkerNote, k as saveStatus, l as contextLabel, m as fmtTokens, n as OWNS_TTL_MS, o as ageOf, p as fmtContextK, r as SLEEP_FLOOR_SECS, s as alive, t as LOST_GRACE_MS, u as contextPercent, v as loadStatus, w as ownsPid, x as markStartFailed, y as loadStatuses } from "./status-COtzewKV.mjs";
|
|
5
5
|
|
|
6
6
|
export { loadStatus };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./paths-
|
|
4
|
-
import "./status-
|
|
5
|
-
import { C as toolErrorSigTag, E as toolErrorsPath, S as summarizeToolInput, T as toolErrorText, _ as lastCommand, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, f as errorsTable, g as isBenignBash, h as harnessToolErrorTexts, i as SAME_WORKER_MIN, l as clipRaw, m as groupToolErrors, n as CROSS_WORKER_WINDOW_MS, o as TOOL_ERRORS_FILE, p as grantedToolNames, r as RESEND_MS, s as benignNote, t as CROSS_WORKER_MIN, u as detectRunningWorkerErrors, v as normalizeError, w as toolErrorSummary, x as recordToolError, y as parseSince } from "./tool-errors-
|
|
6
|
-
import "./wait-
|
|
1
|
+
import "./config-CST2uq1v.mjs";
|
|
2
|
+
import "./config-DYbyEe4-.mjs";
|
|
3
|
+
import "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import "./status-COtzewKV.mjs";
|
|
5
|
+
import { C as toolErrorSigTag, E as toolErrorsPath, S as summarizeToolInput, T as toolErrorText, _ as lastCommand, a as SAME_WORKER_WINDOW_MS, b as readToolErrors, c as classifyToolError, d as detectToolErrors, f as errorsTable, g as isBenignBash, h as harnessToolErrorTexts, i as SAME_WORKER_MIN, l as clipRaw, m as groupToolErrors, n as CROSS_WORKER_WINDOW_MS, o as TOOL_ERRORS_FILE, p as grantedToolNames, r as RESEND_MS, s as benignNote, t as CROSS_WORKER_MIN, u as detectRunningWorkerErrors, v as normalizeError, w as toolErrorSummary, x as recordToolError, y as parseSince } from "./tool-errors-DXJ70-sr.mjs";
|
|
6
|
+
import "./wait-ChpHKJZV.mjs";
|
|
7
7
|
|
|
8
8
|
export { errorsTable, groupToolErrors, parseSince, readToolErrors };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as maxOf } from "./min-max-DrSRUaWQ.mjs";
|
|
2
|
-
import { n as bashExitCode, r as isExpectedWaitExit } from "./wait-
|
|
2
|
+
import { n as bashExitCode, r as isExpectedWaitExit } from "./wait-ChpHKJZV.mjs";
|
|
3
3
|
import { appendFileSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, statSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
|
|
@@ -589,4 +589,4 @@ function errorsTable(groups) {
|
|
|
589
589
|
|
|
590
590
|
//#endregion
|
|
591
591
|
export { toolErrorSigTag as C, toolErrorsPath as E, summarizeToolInput as S, toolErrorText as T, lastCommand as _, SAME_WORKER_WINDOW_MS as a, readToolErrors as b, classifyToolError as c, detectToolErrors as d, errorsTable as f, isBenignBash as g, harnessToolErrorTexts as h, SAME_WORKER_MIN as i, clipRaw as l, groupToolErrors as m, CROSS_WORKER_WINDOW_MS as n, TOOL_ERRORS_FILE as o, grantedToolNames as p, RESEND_MS as r, benignNote as s, CROSS_WORKER_MIN as t, detectRunningWorkerErrors as u, normalizeError as v, toolErrorSummary as w, recordToolError as x, parseSince as y };
|
|
592
|
-
//# sourceMappingURL=tool-errors-
|
|
592
|
+
//# sourceMappingURL=tool-errors-DXJ70-sr.mjs.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as ledgerPath, r as eventsPath } from "./paths-
|
|
3
|
-
import { T as worktreesStats, l as formatWorktreesStats } from "./worktree-
|
|
4
|
-
import { O as reconcileStatuses, _ as isTerminal, g as isLive, h as isChatPane, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-
|
|
5
|
-
import { a as ownerSessionName, f as workerInScope, n as currentTabKey, o as resolveSession } from "./scope-
|
|
6
|
-
import { _ as lastCommand } from "./tool-errors-
|
|
7
|
-
import { M as waitingLine, O as parseWaitOn, i as isWaitPollCommand } from "./wait-
|
|
8
|
-
import { a as buildsDir, l as listBuildsSync, p as renderBuildQueue, v as poolSlots } from "./caller-identity-
|
|
1
|
+
import { Et as appendLedger } from "./config-CST2uq1v.mjs";
|
|
2
|
+
import { i as ledgerPath, r as eventsPath } from "./paths-DS5VQKoR.mjs";
|
|
3
|
+
import { T as worktreesStats, l as formatWorktreesStats } from "./worktree-BY--Rgmy.mjs";
|
|
4
|
+
import { O as reconcileStatuses, _ as isTerminal, g as isLive, h as isChatPane, v as loadStatus, w as ownsPid, y as loadStatuses } from "./status-COtzewKV.mjs";
|
|
5
|
+
import { a as ownerSessionName, f as workerInScope, n as currentTabKey, o as resolveSession } from "./scope-D8HK6vU7.mjs";
|
|
6
|
+
import { _ as lastCommand } from "./tool-errors-DXJ70-sr.mjs";
|
|
7
|
+
import { M as waitingLine, O as parseWaitOn, i as isWaitPollCommand } from "./wait-ChpHKJZV.mjs";
|
|
8
|
+
import { a as buildsDir, l as listBuildsSync, p as renderBuildQueue, v as poolSlots } from "./caller-identity-Bim8JT-D.mjs";
|
|
9
9
|
import { l as schedLine, o as readSchedFile } from "./scheduler-CtUyWJ3O.mjs";
|
|
10
|
-
import { Bt as chatTickerRow, Ft as chatEnter, Ht as parseChatLine, It as chatInsertLine, K as renderPlanLines, Lt as chatLeave, Nt as CHAT_HELP, Pt as chatBlankRow, Rt as chatPromptRow, Ut as wrapText, V as loadPlanStatuses, Vt as holdAutoExit, _t as paneTitle, i as localIdleLine, n as markControlsHeld, qt as readInbox, s as readLocalIdle, t as clickrControlsArgv, tt as closeOwnPane, vt as writePaneTitle, yt as psTable, zt as chatScrollRegion } from "./controls-
|
|
11
|
-
import { a as endLabel } from "./endreason-
|
|
12
|
-
import { C as denialLines, _ as renderTable, b as tickerTool, c as headerLine, f as paneStatusRow, g as renderStatusLine, h as renderEvent, i as dayOf, l as intentOf, r as contextMeter, s as gutterFor, t as blankBetween, u as makeColor, y as tickerText } from "./render-
|
|
13
|
-
import { r as sayToWorker } from "./operator-
|
|
14
|
-
import { a as readAudit, d as loadPaneRunStatuses, p as renderPaneRunLines } from "./pane-audit-
|
|
10
|
+
import { Bt as chatTickerRow, Ft as chatEnter, Ht as parseChatLine, It as chatInsertLine, K as renderPlanLines, Lt as chatLeave, Nt as CHAT_HELP, Pt as chatBlankRow, Rt as chatPromptRow, Ut as wrapText, V as loadPlanStatuses, Vt as holdAutoExit, _t as paneTitle, i as localIdleLine, n as markControlsHeld, qt as readInbox, s as readLocalIdle, t as clickrControlsArgv, tt as closeOwnPane, vt as writePaneTitle, yt as psTable, zt as chatScrollRegion } from "./controls-OiVVbe-f.mjs";
|
|
11
|
+
import { a as endLabel } from "./endreason-BqyyU7BH.mjs";
|
|
12
|
+
import { C as denialLines, _ as renderTable, b as tickerTool, c as headerLine, f as paneStatusRow, g as renderStatusLine, h as renderEvent, i as dayOf, l as intentOf, r as contextMeter, s as gutterFor, t as blankBetween, u as makeColor, y as tickerText } from "./render-Cz3BWIBO.mjs";
|
|
13
|
+
import { r as sayToWorker } from "./operator-DrwWItVt.mjs";
|
|
14
|
+
import { a as readAudit, d as loadPaneRunStatuses, p as renderPaneRunLines } from "./pane-audit-wv9UkyCe.mjs";
|
|
15
15
|
import { closeSync, existsSync, openSync, readFileSync, readSync } from "node:fs";
|
|
16
16
|
import { spawn } from "node:child_process";
|
|
17
17
|
import { createInterface } from "node:readline";
|
|
@@ -909,4 +909,4 @@ function statusLineOutput(logDir, term, _cwd, claudeSession = "", now = /* @__PU
|
|
|
909
909
|
|
|
910
910
|
//#endregion
|
|
911
911
|
export { followTailOutput as a, inboxCounts as c, psOutput as d, replayOutput as f, workerEnded as g, strayWorkerProcesses as h, backfillLines as i, initialFollowState as l, statusLineOutput as m, FOLLOW_TAIL_ENTRIES as n, followWorkers as o, resumeArgv as p, applyEvent as r, gutterBody as s, BACKFILL_EVENTS as t, makeOperatorInput as u };
|
|
912
|
-
//# sourceMappingURL=viewer-
|
|
912
|
+
//# sourceMappingURL=viewer-BgGRqXfD.mjs.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./config-CST2uq1v.mjs";
|
|
2
|
+
import "./config-DYbyEe4-.mjs";
|
|
3
|
+
import "./paths-DS5VQKoR.mjs";
|
|
4
|
+
import "./worktree-BY--Rgmy.mjs";
|
|
5
|
+
import "./status-COtzewKV.mjs";
|
|
6
|
+
import "./pool-BZ94nFuq.mjs";
|
|
7
|
+
import "./scope-D8HK6vU7.mjs";
|
|
8
|
+
import "./tool-errors-DXJ70-sr.mjs";
|
|
9
|
+
import "./wait-ChpHKJZV.mjs";
|
|
10
|
+
import "./local-tiers-BtdEEe5n.mjs";
|
|
11
|
+
import "./caller-identity-Bim8JT-D.mjs";
|
|
12
|
+
import "./capacity-CsZMkVyg.mjs";
|
|
13
|
+
import "./local-candidate-Cp_bw4kK.mjs";
|
|
14
|
+
import "./controls-OiVVbe-f.mjs";
|
|
15
|
+
import "./endreason-BqyyU7BH.mjs";
|
|
16
|
+
import "./render-Cz3BWIBO.mjs";
|
|
17
|
+
import "./operator-DrwWItVt.mjs";
|
|
18
|
+
import "./kill-tree-CcpsRLCZ.mjs";
|
|
19
|
+
import "./pane-audit-wv9UkyCe.mjs";
|
|
20
|
+
import { a as followTailOutput, c as inboxCounts, d as psOutput, f as replayOutput, g as workerEnded, h as strayWorkerProcesses, i as backfillLines, l as initialFollowState, m as statusLineOutput, n as FOLLOW_TAIL_ENTRIES, o as followWorkers, p as resumeArgv, r as applyEvent, s as gutterBody, t as BACKFILL_EVENTS, u as makeOperatorInput } from "./viewer-BgGRqXfD.mjs";
|
|
21
|
+
|
|
22
|
+
export { applyEvent, initialFollowState };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as eventsPath } from "./paths-
|
|
2
|
-
import { D as pidAlive, O as reconcileStatuses, k as saveStatus, nt as shortText, v as loadStatus, y as loadStatuses } from "./status-
|
|
1
|
+
import { r as eventsPath } from "./paths-DS5VQKoR.mjs";
|
|
2
|
+
import { D as pidAlive, O as reconcileStatuses, k as saveStatus, nt as shortText, v as loadStatus, y as loadStatuses } from "./status-COtzewKV.mjs";
|
|
3
3
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
4
4
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
@@ -1274,4 +1274,4 @@ async function runWait(logDir, ids, o, out, errOut) {
|
|
|
1274
1274
|
|
|
1275
1275
|
//#endregion
|
|
1276
1276
|
export { waitOnCallLine as A, statusMarker as C, fmtElapsed as D, detachedLine as E, waitingLine as M, parseWaitOn as O, realDeps as S, waitOn as T, workerContractPrompt as _, runWait as a, killProcessTree as b, checkProof as c, parseWorkerReport as d, promptTrailer as f, verifyReportChanges as g, verifyFailNote as h, isWaitPollCommand as i, waitOnResultLine as j, realWaitDeps as k, newUntracked as l, untrackedPaths as m, bashExitCode as n, AG2_REASK_TEXT as o, renderReport as p, isExpectedWaitExit as r, OPERATOR_MARK as s, WAIT_EXIT_STILL_RUNNING as t, noteTokenSentence as u, repairAndValidateAg2 as v, statusQueue as w, processTree as x, validateAg2 as y };
|
|
1277
|
-
//# sourceMappingURL=wait-
|
|
1277
|
+
//# sourceMappingURL=wait-ChpHKJZV.mjs.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "./utils-J2b9y8PC.mjs";
|
|
2
|
+
import "./config-CST2uq1v.mjs";
|
|
3
|
+
import "./config-DYbyEe4-.mjs";
|
|
4
|
+
import "./paths-DS5VQKoR.mjs";
|
|
5
|
+
import "./worktree-BY--Rgmy.mjs";
|
|
6
|
+
import "./status-COtzewKV.mjs";
|
|
7
|
+
import "./pool-BZ94nFuq.mjs";
|
|
8
|
+
import "./helpers-CRuBUas3.mjs";
|
|
9
|
+
import "./scope-D8HK6vU7.mjs";
|
|
10
|
+
import "./routing-BlD_tKjW.mjs";
|
|
11
|
+
import "./tool-errors-DXJ70-sr.mjs";
|
|
12
|
+
import "./wait-ChpHKJZV.mjs";
|
|
13
|
+
import "./local-tiers-BtdEEe5n.mjs";
|
|
14
|
+
import "./caller-identity-Bim8JT-D.mjs";
|
|
15
|
+
import "./capacity-CsZMkVyg.mjs";
|
|
16
|
+
import "./local-instances-bdCNNSsL.mjs";
|
|
17
|
+
import "./local-candidate-Cp_bw4kK.mjs";
|
|
18
|
+
import "./factory-BV0MQA3T.mjs";
|
|
19
|
+
import "./postgres-C-T5OWer.mjs";
|
|
20
|
+
import "./embedding-gate-CTAk8STe.mjs";
|
|
21
|
+
import "./embeddings-BVq3esBF.mjs";
|
|
22
|
+
import "./router-CQSc3lk3.mjs";
|
|
23
|
+
import "./launch-DpQPZGsT.mjs";
|
|
24
|
+
import "./health-kufVIf6i.mjs";
|
|
25
|
+
import "./run-AZVwceiU.mjs";
|
|
26
|
+
import "./controls-OiVVbe-f.mjs";
|
|
27
|
+
import "./endreason-BqyyU7BH.mjs";
|
|
28
|
+
import "./render-Cz3BWIBO.mjs";
|
|
29
|
+
import "./operator-DrwWItVt.mjs";
|
|
30
|
+
import "./kill-tree-CcpsRLCZ.mjs";
|
|
31
|
+
import "./pool-cli-B1eKySeN.mjs";
|
|
32
|
+
import "./pane-audit-wv9UkyCe.mjs";
|
|
33
|
+
import "./fallback-Bj2cyVk_.mjs";
|
|
34
|
+
import "./providers-Dzx5GAUI.mjs";
|
|
35
|
+
import { A as workerMcpCommand, C as workerBenchCommand, D as workerFallbackCommand, E as workerControlsCommand, F as workerProvidersCommand, I as workerProxyCommand, L as workerRolesCommand, M as workerOnCommand, N as workerPolicyCommand, O as workerInstallCommand, P as workerPoolCommand, R as workerRouteCommand, S as stopInstance, T as workerConfigCommand, _ as portOpen, a as collectEnv, b as startTier, c as currentInstances, d as isUp, f as killInstance, g as portListeners, h as parseCostTier, i as cliInflight, j as workerOffCommand, k as workerLocalCommand, l as fail, m as listServers, n as WORKER_CONFIG_COMMANDS, o as collectTags, p as launchDetached, r as buildClassTarget, s as controlsArgv, t as PROVIDER_EDIT_COMMANDS, u as healthOk, v as serverLine, w as workerClassesCommand, x as stopAll, y as startInstance } from "./worker-config-DgdT0iTB.mjs";
|
|
36
|
+
import "./main-config-ops-BYsK3BxM.mjs";
|
|
37
|
+
import "./cockpit-actions-BTA1njMO.mjs";
|
|
38
|
+
import "./ipc-client-CnYEF31R.mjs";
|
|
39
|
+
import "./embed-pass-DtVF2fOV.mjs";
|
|
40
|
+
import "./session-usage-oycSdiD3.mjs";
|
|
41
|
+
|
|
42
|
+
export { currentInstances, startInstance, startTier, stopAll, stopInstance };
|