@feigi/fleet-ctl 3.92.0 → 3.92.2
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/package.json
CHANGED
|
@@ -102,7 +102,8 @@ export function rowsForSession(sessionDir, stats = {}, { verifyMain = verifyMain
|
|
|
102
102
|
// position-indexed read-outs name columns ahead of them. `subagent_type`
|
|
103
103
|
// follows `harness`. `cost` is the provider's own per-turn `usage.cost.total`,
|
|
104
104
|
// summed to the micro-dollar — the $ of record; `tokens_cache_write_1h` and
|
|
105
|
-
// `cost` are blank where the transcript recorded no figure, never 0
|
|
105
|
+
// `cost` are blank where the transcript recorded no figure, never 0, and
|
|
106
|
+
// `cost` is also blank when any turn that reported tokens recorded none.
|
|
106
107
|
export const COLUMNS = [
|
|
107
108
|
"session", "run_date", "role", "member", "model", "effort", "ticket", "pr",
|
|
108
109
|
"tokens_cache_create", "tokens_out", "wall_s", "turns", "agent", "harness",
|
|
@@ -359,7 +359,7 @@ export function foldOmpTranscript(jsonlText, filePath) {
|
|
|
359
359
|
let model = null, thinking = null, task = null, resolvedModelIdentity = null, agent = null;
|
|
360
360
|
let firstTs = null, lastTs = null;
|
|
361
361
|
let input = 0, cacheWrite = 0, cacheWrite1h = 0, cacheRead = 0, output = 0, cost = 0, turns = 0;
|
|
362
|
-
let sawCost = false, unsplit = false;
|
|
362
|
+
let sawCost = false, unsplit = false, unpriced = false;
|
|
363
363
|
let malformedNonLastLines = 0;
|
|
364
364
|
// What the transcript's END says, read for the `ending` column: the last
|
|
365
365
|
// assistant turn's stopReason, whether a model fell back, whether the
|
|
@@ -406,13 +406,15 @@ export function foldOmpTranscript(jsonlText, filePath) {
|
|
|
406
406
|
const u = m.usage;
|
|
407
407
|
if (typeof m.model === "string" && m.model) model = m.model;
|
|
408
408
|
const cw = Number(u.cacheWrite ?? 0);
|
|
409
|
-
|
|
409
|
+
const tin = Number(u.input ?? 0), tread = Number(u.cacheRead ?? 0), tout = Number(u.output ?? 0);
|
|
410
|
+
input += tin;
|
|
410
411
|
cacheWrite += cw;
|
|
411
|
-
cacheRead +=
|
|
412
|
-
output +=
|
|
412
|
+
cacheRead += tread;
|
|
413
|
+
output += tout;
|
|
413
414
|
if (u.cttl && typeof u.cttl === "object") cacheWrite1h += Number(u.cttl.ephemeral1h ?? 0);
|
|
414
415
|
else if (cw > 0) unsplit = true;
|
|
415
416
|
if (u.cost && typeof u.cost.total === "number") { cost += u.cost.total; sawCost = true; }
|
|
417
|
+
else if (tin > 0 || cw > 0 || tread > 0 || tout > 0) unpriced = true;
|
|
416
418
|
turns++;
|
|
417
419
|
entries.push({
|
|
418
420
|
kind: "assistant", cacheWrite: cw,
|
|
@@ -441,7 +443,10 @@ export function foldOmpTranscript(jsonlText, filePath) {
|
|
|
441
443
|
// any turn that wrote cache recorded no `cttl`: the split was never
|
|
442
444
|
// recorded for that share, and a partial sum would pass for the whole.
|
|
443
445
|
cacheWrite1h: unsplit ? null : cacheWrite1h,
|
|
444
|
-
|
|
446
|
+
// Unknown — `null` — on the same rule: when no turn carried a figure, or
|
|
447
|
+
// when any turn that reported tokens carried none (or a non-number), so
|
|
448
|
+
// a partial sum never passes for the member's whole cost.
|
|
449
|
+
cost: sawCost && !unpriced ? cost : null,
|
|
445
450
|
turns,
|
|
446
451
|
wallS: Number.isFinite(span) ? Math.round(span) : 0,
|
|
447
452
|
entries,
|
package/skills/run-team/SKILL.md
CHANGED
|
@@ -210,7 +210,7 @@ Write each state change through `ledger.mjs` before you act on it, never by hand
|
|
|
210
210
|
|
|
211
211
|
Compaction parks every in-flight member and nothing reports it, so on resume take the registry census first (**Member unaccounted**, in **Failure handling**) before you trust a live token.
|
|
212
212
|
|
|
213
|
-
`ledger.mjs token <key> <token>…` adds a token and keeps every token already on the row
|
|
213
|
+
`ledger.mjs token <key> <token>…` adds a token and keeps every token already on the row but a `tier=` it replaces; `row` drops the tokens you do not restate. Write member tokens and `review=` tokens only through `ledger.mjs`, never by hand.
|
|
214
214
|
|
|
215
215
|
Never rotate the ledger mid-run: it is phase 0's step alone.
|
|
216
216
|
|