@agentguard-run/burn 0.5.0 → 0.6.0
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/CHANGELOG.md +23 -0
- package/README.md +109 -9
- package/dist/src/cli.js +205 -21
- package/dist/src/display-mode.d.ts +12 -0
- package/dist/src/display-mode.js +67 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +12 -1
- package/dist/src/insights/calendar-render.js +2 -1
- package/dist/src/insights/compact-replay.d.ts +97 -0
- package/dist/src/insights/compact-replay.js +414 -0
- package/dist/src/insights/compact-settings.d.ts +30 -0
- package/dist/src/insights/compact-settings.js +122 -0
- package/dist/src/insights/first-run.d.ts +12 -0
- package/dist/src/insights/first-run.js +17 -0
- package/dist/src/insights/i18n.d.ts +19 -0
- package/dist/src/insights/i18n.js +82 -1
- package/dist/src/insights/render.d.ts +13 -1
- package/dist/src/insights/render.js +35 -21
- package/dist/src/insights/sessions.d.ts +4 -0
- package/dist/src/insights/sessions.js +18 -2
- package/dist/src/insights/simple-data.d.ts +20 -0
- package/dist/src/insights/simple-data.js +229 -0
- package/dist/src/insights/simple-render.d.ts +26 -0
- package/dist/src/insights/simple-render.js +92 -0
- package/dist/src/insights/simple-text.d.ts +33 -0
- package/dist/src/insights/simple-text.js +44 -0
- package/dist/src/insights/status-fields.d.ts +2 -2
- package/dist/src/insights/week-render.d.ts +4 -0
- package/dist/src/insights/week-render.js +31 -0
- package/dist/src/insights/week.d.ts +75 -0
- package/dist/src/insights/week.js +253 -0
- package/dist/src/live-panel.d.ts +2 -1
- package/dist/src/live-panel.js +29 -2
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.js +5 -0
- package/docs/OCT5_VERIFICATION.md +1 -1
- package/docs/simple-views.md +17 -0
- package/fixtures/burn-week-v1.json +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const COMPACT_SETTING_SOURCE = "https://code.claude.com/docs/en/model-config#set-the-auto-compact-window";
|
|
2
|
+
export declare const MIN_COMPACT_WINDOW = 100000;
|
|
3
|
+
export declare const MAX_COMPACT_WINDOW = 1000000;
|
|
4
|
+
type RecordValue = Record<string, unknown>;
|
|
5
|
+
export interface CompactScope {
|
|
6
|
+
name: string;
|
|
7
|
+
value: RecordValue;
|
|
8
|
+
}
|
|
9
|
+
export interface CompactSettings {
|
|
10
|
+
scopes: CompactScope[];
|
|
11
|
+
env: NodeJS.ProcessEnv;
|
|
12
|
+
warnings: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface CompactWindow {
|
|
15
|
+
tokens: number;
|
|
16
|
+
modelContextTokens: number;
|
|
17
|
+
source: string;
|
|
18
|
+
assumed: boolean;
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
commandCanApply: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Reads settings only. Never runs Claude Code, a credential helper, or a shell. */
|
|
23
|
+
export declare function readCompactSettings(options?: {
|
|
24
|
+
configDir?: string;
|
|
25
|
+
cwd?: string;
|
|
26
|
+
env?: NodeJS.ProcessEnv;
|
|
27
|
+
managedFile?: string | null;
|
|
28
|
+
}): CompactSettings;
|
|
29
|
+
export declare function resolveCompactWindow(model: string | undefined, settings: CompactSettings, observedMaximum?: number): CompactWindow;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_COMPACT_WINDOW = exports.MIN_COMPACT_WINDOW = exports.COMPACT_SETTING_SOURCE = void 0;
|
|
4
|
+
exports.readCompactSettings = readCompactSettings;
|
|
5
|
+
exports.resolveCompactWindow = resolveCompactWindow;
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_os_1 = require("node:os");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
// Verified against Claude Code's own documentation on 2026-10-09:
|
|
10
|
+
// https://code.claude.com/docs/en/model-config#set-the-auto-compact-window
|
|
11
|
+
// https://code.claude.com/docs/en/settings-reference#modelsettings
|
|
12
|
+
// https://code.claude.com/docs/en/settings-reference#autocompactwindow
|
|
13
|
+
exports.COMPACT_SETTING_SOURCE = 'https://code.claude.com/docs/en/model-config#set-the-auto-compact-window';
|
|
14
|
+
exports.MIN_COMPACT_WINDOW = 100_000;
|
|
15
|
+
exports.MAX_COMPACT_WINDOW = 1_000_000;
|
|
16
|
+
const object = (value) => value !== null && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
17
|
+
/** Reads settings only. Never runs Claude Code, a credential helper, or a shell. */
|
|
18
|
+
function readCompactSettings(options = {}) {
|
|
19
|
+
const env = options.env ?? process.env;
|
|
20
|
+
const configDir = options.configDir ?? (env.CLAUDE_CONFIG_DIR || (0, node_path_1.join)((0, node_os_1.homedir)(), '.claude'));
|
|
21
|
+
const cwd = options.cwd ?? process.cwd();
|
|
22
|
+
const managedFile = options.managedFile === undefined
|
|
23
|
+
? process.platform === 'darwin' ? '/Library/Application Support/ClaudeCode/managed-settings.json'
|
|
24
|
+
: process.platform === 'win32' ? (0, node_path_1.join)(env.ProgramFiles ?? 'C:\\Program Files', 'ClaudeCode', 'managed-settings.json')
|
|
25
|
+
: '/etc/claude-code/managed-settings.json'
|
|
26
|
+
: options.managedFile;
|
|
27
|
+
const scopes = [], warnings = [];
|
|
28
|
+
const files = [
|
|
29
|
+
['user', (0, node_path_1.join)(configDir, 'settings.json')],
|
|
30
|
+
['project', (0, node_path_1.join)(cwd, '.claude', 'settings.json')],
|
|
31
|
+
['local', (0, node_path_1.join)(cwd, '.claude', 'settings.local.json')],
|
|
32
|
+
...(managedFile ? [['managed', managedFile]] : []),
|
|
33
|
+
];
|
|
34
|
+
for (const [name, file] of files) {
|
|
35
|
+
try {
|
|
36
|
+
const raw = JSON.parse((0, node_fs_1.readFileSync)(file, 'utf8'));
|
|
37
|
+
if (raw === null || typeof raw !== 'object' || Array.isArray(raw))
|
|
38
|
+
throw new Error('invalid');
|
|
39
|
+
scopes.push({ name, value: object(raw) });
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (error.code !== 'ENOENT')
|
|
43
|
+
warnings.push(`Could not read ${name} compaction settings.`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return { scopes, env, warnings };
|
|
47
|
+
}
|
|
48
|
+
/** Canonical names, dated IDs and provider spellings use the same saved row. */
|
|
49
|
+
function canonicalModel(model) {
|
|
50
|
+
return model.match(/claude-(?:opus|sonnet|haiku|fable)-\d+(?:-\d{1,2})?(?=$|[^0-9]|\[)/i)?.[0].toLowerCase() ?? model;
|
|
51
|
+
}
|
|
52
|
+
function maximumContext(model, settings, observedMaximum) {
|
|
53
|
+
if (on(settings.env.CLAUDE_CODE_DISABLE_1M_CONTEXT))
|
|
54
|
+
return 200_000;
|
|
55
|
+
const canonical = canonicalModel(model);
|
|
56
|
+
if (/^claude-(?:fable-|(?:opus|sonnet)-5|haiku-5-5)/.test(canonical) || /^claude-opus-4-[789]$/.test(canonical))
|
|
57
|
+
return exports.MAX_COMPACT_WINDOW;
|
|
58
|
+
// An extended-context session's recorded model can omit the display suffix.
|
|
59
|
+
const selected = settings.scopes.map(scope => scope.value.model).filter(value => typeof value === 'string').at(-1);
|
|
60
|
+
if (model.includes('[1m]') || (typeof selected === 'string' && selected.includes('[1m]')) || observedMaximum > 200_000)
|
|
61
|
+
return exports.MAX_COMPACT_WINDOW;
|
|
62
|
+
if (/^claude-(?:opus|sonnet)-4-6$/.test(canonical) || /^claude-haiku-4-5$/.test(canonical))
|
|
63
|
+
return 200_000;
|
|
64
|
+
return exports.MAX_COMPACT_WINDOW;
|
|
65
|
+
}
|
|
66
|
+
function resolveCompactWindow(model, settings, observedMaximum = 0) {
|
|
67
|
+
// Settings env blocks replace inherited variables in ordinary local sessions.
|
|
68
|
+
// https://code.claude.com/docs/en/env-vars#precedence
|
|
69
|
+
const environment = { ...settings.env };
|
|
70
|
+
for (const scope of settings.scopes)
|
|
71
|
+
for (const [key, value] of Object.entries(object(scope.value.env))) {
|
|
72
|
+
if (typeof value === 'string')
|
|
73
|
+
environment[key] = value;
|
|
74
|
+
}
|
|
75
|
+
const maximum = maximumContext(model ?? '', { ...settings, env: environment }, observedMaximum);
|
|
76
|
+
let tokens = maximum, source = 'model default (assumed)', assumed = true, enabled = true, commandCanApply = true;
|
|
77
|
+
const canonical = canonicalModel(model ?? '');
|
|
78
|
+
for (const scope of settings.scopes) {
|
|
79
|
+
if (typeof scope.value.autoCompactEnabled === 'boolean')
|
|
80
|
+
enabled = scope.value.autoCompactEnabled;
|
|
81
|
+
const models = object(scope.value.modelSettings);
|
|
82
|
+
const row = object(models[model ?? ''] ?? models[canonical]);
|
|
83
|
+
const value = row.autoCompactWindow ?? scope.value.autoCompactWindow;
|
|
84
|
+
if (value === undefined)
|
|
85
|
+
continue;
|
|
86
|
+
const perModel = row.autoCompactWindow !== undefined;
|
|
87
|
+
if (value === 'auto' && perModel) {
|
|
88
|
+
tokens = maximum;
|
|
89
|
+
assumed = true;
|
|
90
|
+
}
|
|
91
|
+
else if (typeof value === 'number' && Number.isInteger(value) && value >= exports.MIN_COMPACT_WINDOW && value <= exports.MAX_COMPACT_WINDOW) {
|
|
92
|
+
tokens = Math.min(value, maximum);
|
|
93
|
+
assumed = false;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
settings.warnings.push(`Invalid ${scope.name} autoCompactWindow; actual window is unknown.`);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
source = `${scope.name} ${perModel ? 'modelSettings' : 'autoCompactWindow'}`;
|
|
100
|
+
commandCanApply = scope.name === 'user';
|
|
101
|
+
}
|
|
102
|
+
const env = environment.CLAUDE_CODE_AUTO_COMPACT_WINDOW;
|
|
103
|
+
if (env !== undefined && env !== '') {
|
|
104
|
+
// Claude Code parses an integer and clamps it. In particular, 500k is 500,
|
|
105
|
+
// then clamps to 100K; it does not mean 500,000 in this environment variable.
|
|
106
|
+
const parsed = Number.parseInt(env, 10);
|
|
107
|
+
if (Number.isFinite(parsed)) {
|
|
108
|
+
tokens = Math.min(maximum, Math.max(exports.MIN_COMPACT_WINDOW, Math.min(exports.MAX_COMPACT_WINDOW, parsed)));
|
|
109
|
+
source = 'CLAUDE_CODE_AUTO_COMPACT_WINDOW';
|
|
110
|
+
assumed = false;
|
|
111
|
+
commandCanApply = false;
|
|
112
|
+
}
|
|
113
|
+
else
|
|
114
|
+
settings.warnings.push('Invalid compaction environment override; actual window is unknown.');
|
|
115
|
+
}
|
|
116
|
+
if (on(environment.DISABLE_AUTO_COMPACT) || on(environment.DISABLE_COMPACT))
|
|
117
|
+
enabled = false;
|
|
118
|
+
if (environment.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE)
|
|
119
|
+
settings.warnings.push('A percentage override can move the actual trigger earlier than the replay window.');
|
|
120
|
+
return { tokens, modelContextTokens: maximum, source, assumed, enabled, commandCanApply: commandCanApply && enabled };
|
|
121
|
+
}
|
|
122
|
+
const on = (value) => /^(1|true|yes|on)$/i.test(value ?? '');
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** No sessions is a successful first-run report, not a command failure. */
|
|
2
|
+
export declare const NO_SESSIONS_EXIT_CODE = 0;
|
|
3
|
+
export declare const NO_SESSIONS_MESSAGE = "No Claude Code or Codex sessions found on this computer yet.";
|
|
4
|
+
export declare const NO_SESSIONS_NEXT: string;
|
|
5
|
+
export declare function noSessionsReport(lookedIn: string[]): {
|
|
6
|
+
version: string;
|
|
7
|
+
found: false;
|
|
8
|
+
looked_in: string[];
|
|
9
|
+
message: string;
|
|
10
|
+
next: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function renderNoSessions(lookedIn: string[]): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NO_SESSIONS_NEXT = exports.NO_SESSIONS_MESSAGE = exports.NO_SESSIONS_EXIT_CODE = void 0;
|
|
4
|
+
exports.noSessionsReport = noSessionsReport;
|
|
5
|
+
exports.renderNoSessions = renderNoSessions;
|
|
6
|
+
const version_1 = require("../version");
|
|
7
|
+
/** No sessions is a successful first-run report, not a command failure. */
|
|
8
|
+
exports.NO_SESSIONS_EXIT_CODE = 0;
|
|
9
|
+
exports.NO_SESSIONS_MESSAGE = 'No Claude Code or Codex sessions found on this computer yet.';
|
|
10
|
+
exports.NO_SESSIONS_NEXT = 'Next: if you use Claude Code on another computer, run this there.\n'
|
|
11
|
+
+ 'If Claude Code is new here, use it for a few minutes, then run npx agentguard-burn why again.';
|
|
12
|
+
function noSessionsReport(lookedIn) {
|
|
13
|
+
return { version: version_1.BURN_VERSION, found: false, looked_in: lookedIn, message: exports.NO_SESSIONS_MESSAGE, next: exports.NO_SESSIONS_NEXT };
|
|
14
|
+
}
|
|
15
|
+
function renderNoSessions(lookedIn) {
|
|
16
|
+
return `Burn ${version_1.BURN_VERSION}\n${exports.NO_SESSIONS_MESSAGE}\nBurn looked in ${lookedIn.join(' and ')}.\n${exports.NO_SESSIONS_NEXT}\n`;
|
|
17
|
+
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { type CompareMetric, type InsightBucket, type InsightHost, type InsightObservations, type SessionCommits } from './types';
|
|
13
13
|
export type WhyLang = 'en' | 'es' | 'pt';
|
|
14
14
|
export { STATUS_TEXT } from './status-text';
|
|
15
|
+
export { SIMPLE_TEXT } from './simple-text';
|
|
15
16
|
/**
|
|
16
17
|
* The language of a flag value or locale: the part before '_', '-', '.' or '@',
|
|
17
18
|
* in any case, so es_MX.UTF-8, es-419 and ES are Spanish and pt_BR and pt-PT are
|
|
@@ -229,3 +230,21 @@ export interface CalendarText {
|
|
|
229
230
|
};
|
|
230
231
|
}
|
|
231
232
|
export declare const CALENDAR_TEXT: Readonly<Record<WhyLang, CalendarText>>;
|
|
233
|
+
export interface WeekText {
|
|
234
|
+
labels: Record<import('./week').WeekTopCause, string>;
|
|
235
|
+
fixes: Record<import('./week').WeekTopCause, string>;
|
|
236
|
+
title: (start: string, end: string) => string;
|
|
237
|
+
summary: (tokens: string, usd: string | null) => string;
|
|
238
|
+
spent: (usd: string) => string;
|
|
239
|
+
shares: (useful: string, waste: string, unattributed: string, priced: boolean) => string;
|
|
240
|
+
row: (label: string, share: string, usd: string | null, tokens: string) => string;
|
|
241
|
+
wrongModel: (tokens: string, delta: string) => string;
|
|
242
|
+
next: (label: string, fix: string) => string;
|
|
243
|
+
noCause: string;
|
|
244
|
+
tokenBasis: string;
|
|
245
|
+
privacy: string;
|
|
246
|
+
incomplete: string;
|
|
247
|
+
excluded: (forks: string, undated: string) => string;
|
|
248
|
+
saveFailed: string;
|
|
249
|
+
}
|
|
250
|
+
export declare const WEEK_TEXT: Readonly<Record<WhyLang, WeekText>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CALENDAR_TEXT = exports.COMPARE_TEXT = exports.DECISION_TEXT = exports.WHY_TEXT = exports.STATUS_TEXT = void 0;
|
|
3
|
+
exports.WEEK_TEXT = exports.CALENDAR_TEXT = exports.COMPARE_TEXT = exports.DECISION_TEXT = exports.WHY_TEXT = exports.SIMPLE_TEXT = exports.STATUS_TEXT = void 0;
|
|
4
4
|
exports.whyLangOf = whyLangOf;
|
|
5
5
|
exports.detectWhyLang = detectWhyLang;
|
|
6
6
|
/**
|
|
@@ -17,6 +17,8 @@ exports.detectWhyLang = detectWhyLang;
|
|
|
17
17
|
const types_1 = require("./types");
|
|
18
18
|
var status_text_1 = require("./status-text");
|
|
19
19
|
Object.defineProperty(exports, "STATUS_TEXT", { enumerable: true, get: function () { return status_text_1.STATUS_TEXT; } });
|
|
20
|
+
var simple_text_1 = require("./simple-text");
|
|
21
|
+
Object.defineProperty(exports, "SIMPLE_TEXT", { enumerable: true, get: function () { return simple_text_1.SIMPLE_TEXT; } });
|
|
20
22
|
/**
|
|
21
23
|
* The language of a flag value or locale: the part before '_', '-', '.' or '@',
|
|
22
24
|
* in any case, so es_MX.UTF-8, es-419 and ES are Spanish and pt_BR and pt-PT are
|
|
@@ -441,3 +443,82 @@ const calendarPt = {
|
|
|
441
443
|
},
|
|
442
444
|
};
|
|
443
445
|
exports.CALENDAR_TEXT = { en: calendarEn, es: calendarEs, pt: calendarPt };
|
|
446
|
+
// The required price caveat stays literal beside every dollar figure in every language.
|
|
447
|
+
const WEEK_PRICE = 'API list price, not a bill';
|
|
448
|
+
exports.WEEK_TEXT = {
|
|
449
|
+
en: {
|
|
450
|
+
labels: { history_resent: 'Re-sent history', reread_files: 'Re-read files', subagent_fanout: 'Sub-agent fan-out', wrong_model: 'Sub-agents on the main model', reloads_idle: 'Reloads after a pause', reloads_model_switch: 'Reloads after a model switch', reloads: 'Full reloads' },
|
|
451
|
+
fixes: {
|
|
452
|
+
history_resent: 'Run /compact at a natural break, or /clear between unrelated tasks.',
|
|
453
|
+
reread_files: 'Name the file and the lines Claude needs, so it reads less of each file again.',
|
|
454
|
+
subagent_fanout: 'Give related work to one sub-agent instead of several.',
|
|
455
|
+
wrong_model: "For searching and reading logs, a smaller model does the job: set CLAUDE_CODE_SUBAGENT_MODEL=haiku, or put model: haiku in the sub-agent's definition.",
|
|
456
|
+
reloads_idle: 'Run /compact before a break, so the reload after it is smaller.',
|
|
457
|
+
reloads_model_switch: 'Pick your model when you start, or switch at a break, right after /compact.',
|
|
458
|
+
reloads: 'See the cause of each reload: npx agentguard-burn rewrites',
|
|
459
|
+
},
|
|
460
|
+
title: (start, end) => `AgentGuard week: Mon ${start} to Sun ${end} (UTC)`,
|
|
461
|
+
summary: (tokens, usd) => `${tokens} tokens${usd === null ? '' : ` | ${usd} at ${WEEK_PRICE}`}`,
|
|
462
|
+
spent: usd => `${usd} spent on waste causes (${WEEK_PRICE}).`,
|
|
463
|
+
shares: (useful, waste, unattributed, priced) => `Useful work ${useful} of ${priced ? 'spend' : 'tokens'} | Waste causes ${waste} | Not attributed ${unattributed}`,
|
|
464
|
+
row: (label, share, usd, tokens) => `${label}: ${share} | ${usd === null ? `${tokens} tokens` : `${usd} (${WEEK_PRICE})`}`,
|
|
465
|
+
wrongModel: (tokens, delta) => `Sub-agents on the main model: ${tokens} tokens. On Haiku 5.5 they would have cost ${delta} less (${WEEK_PRICE}).`,
|
|
466
|
+
next: (label, fix) => `Top waste cause: ${label}. Next: ${fix}`,
|
|
467
|
+
noCause: 'No waste cause stands out this week.',
|
|
468
|
+
tokenBasis: 'Shares are by tokens this week because a model has no list price.',
|
|
469
|
+
privacy: 'Nothing here leaves this computer unless you turn on weekly sharing in the AgentGuard plugin.',
|
|
470
|
+
incomplete: 'This UTC week is still in progress and is not saved for sharing.',
|
|
471
|
+
excluded: (forks, undated) => `Not counted: ${forks} forked histories with an unknown boundary; ${undated} tokens without a time.`,
|
|
472
|
+
saveFailed: 'Burn could not save this week for sharing.',
|
|
473
|
+
},
|
|
474
|
+
es: {
|
|
475
|
+
labels: { history_resent: 'Historial reenviado', reread_files: 'Archivos releídos', subagent_fanout: 'Uso de varios subagentes', wrong_model: 'Subagentes con el modelo principal', reloads_idle: 'Recargas después de una pausa', reloads_model_switch: 'Recargas después de cambiar de modelo', reloads: 'Recargas completas' },
|
|
476
|
+
fixes: {
|
|
477
|
+
history_resent: 'Ejecuta /compact en una pausa natural, o /clear entre tareas que no estén relacionadas.',
|
|
478
|
+
reread_files: 'Indica el archivo y las líneas que Claude necesita, para que vuelva a leer menos de cada archivo.',
|
|
479
|
+
subagent_fanout: 'Dale el trabajo relacionado a un solo subagente en vez de varios.',
|
|
480
|
+
wrong_model: 'Para buscar y leer registros, un modelo más pequeño sirve: configura CLAUDE_CODE_SUBAGENT_MODEL=haiku, o pon model: haiku en la definición del subagente.',
|
|
481
|
+
reloads_idle: 'Ejecuta /compact antes de una pausa, para que la siguiente recarga sea más pequeña.',
|
|
482
|
+
reloads_model_switch: 'Elige el modelo al empezar, o cámbialo en una pausa, justo después de /compact.',
|
|
483
|
+
reloads: 'Ve la causa de cada recarga: npx agentguard-burn rewrites',
|
|
484
|
+
},
|
|
485
|
+
title: (start, end) => `AgentGuard week: lun ${start} a dom ${end} (UTC)`,
|
|
486
|
+
summary: (tokens, usd) => `${tokens} tokens${usd === null ? '' : ` | ${usd} (${WEEK_PRICE})`}`,
|
|
487
|
+
spent: usd => `${usd} destinados a causas de desperdicio (${WEEK_PRICE}).`,
|
|
488
|
+
shares: (useful, waste, unattributed, priced) => `Trabajo útil ${useful} de ${priced ? 'gasto' : 'tokens'} | Causas de desperdicio ${waste} | Sin atribuir ${unattributed}`,
|
|
489
|
+
row: (label, share, usd, tokens) => `${label}: ${share} | ${usd === null ? `${tokens} tokens` : `${usd} (${WEEK_PRICE})`}`,
|
|
490
|
+
wrongModel: (tokens, delta) => `Subagentes con el modelo principal: ${tokens} tokens. Con Haiku 5.5 habrían costado ${delta} menos (${WEEK_PRICE}).`,
|
|
491
|
+
next: (label, fix) => `Principal causa de desperdicio: ${label}. Próximo paso: ${fix}`,
|
|
492
|
+
noCause: 'Ninguna causa de desperdicio destaca esta semana.',
|
|
493
|
+
tokenBasis: 'Las proporciones se calculan por tokens esta semana porque un modelo no tiene precio de lista.',
|
|
494
|
+
privacy: 'Nada de esto sale de esta computadora a menos que actives el envío semanal en el plugin de AgentGuard.',
|
|
495
|
+
incomplete: 'Esta semana UTC sigue en curso y no se guarda para compartir.',
|
|
496
|
+
excluded: (forks, undated) => `Sin contar: ${forks} historiales bifurcados sin un punto de corte conocido; ${undated} tokens sin fecha.`,
|
|
497
|
+
saveFailed: 'Burn no pudo guardar esta semana para compartir.',
|
|
498
|
+
},
|
|
499
|
+
pt: {
|
|
500
|
+
labels: { history_resent: 'Histórico reenviado', reread_files: 'Arquivos relidos', subagent_fanout: 'Uso de vários subagentes', wrong_model: 'Subagentes no modelo principal', reloads_idle: 'Recargas após uma pausa', reloads_model_switch: 'Recargas após trocar de modelo', reloads: 'Recargas completas' },
|
|
501
|
+
fixes: {
|
|
502
|
+
history_resent: 'Execute /compact em uma pausa natural, ou /clear entre tarefas sem relação.',
|
|
503
|
+
reread_files: 'Indique o arquivo e as linhas de que o Claude precisa, para que ele releia menos de cada arquivo.',
|
|
504
|
+
subagent_fanout: 'Dê o trabalho relacionado a um só subagente em vez de vários.',
|
|
505
|
+
wrong_model: 'Para buscar e ler registros, um modelo menor resolve: configure CLAUDE_CODE_SUBAGENT_MODEL=haiku, ou coloque model: haiku na definição do subagente.',
|
|
506
|
+
reloads_idle: 'Execute /compact antes de uma pausa, para que a próxima recarga seja menor.',
|
|
507
|
+
reloads_model_switch: 'Escolha o modelo ao começar, ou troque em uma pausa, logo após /compact.',
|
|
508
|
+
reloads: 'Veja a causa de cada recarga: npx agentguard-burn rewrites',
|
|
509
|
+
},
|
|
510
|
+
title: (start, end) => `AgentGuard week: seg ${start} a dom ${end} (UTC)`,
|
|
511
|
+
summary: (tokens, usd) => `${tokens} tokens${usd === null ? '' : ` | ${usd} (${WEEK_PRICE})`}`,
|
|
512
|
+
spent: usd => `${usd} gastos em causas de desperdício (${WEEK_PRICE}).`,
|
|
513
|
+
shares: (useful, waste, unattributed, priced) => `Trabalho útil ${useful} de ${priced ? 'gasto' : 'tokens'} | Causas de desperdício ${waste} | Sem atribuição ${unattributed}`,
|
|
514
|
+
row: (label, share, usd, tokens) => `${label}: ${share} | ${usd === null ? `${tokens} tokens` : `${usd} (${WEEK_PRICE})`}`,
|
|
515
|
+
wrongModel: (tokens, delta) => `Subagentes no modelo principal: ${tokens} tokens. No Haiku 5.5 teriam custado ${delta} menos (${WEEK_PRICE}).`,
|
|
516
|
+
next: (label, fix) => `Principal causa de desperdício: ${label}. Próximo passo: ${fix}`,
|
|
517
|
+
noCause: 'Nenhuma causa de desperdício se destaca nesta semana.',
|
|
518
|
+
tokenBasis: 'As proporções usam tokens nesta semana porque um modelo não tem preço de tabela.',
|
|
519
|
+
privacy: 'Nada daqui sai deste computador a menos que você ative o compartilhamento semanal no plugin do AgentGuard.',
|
|
520
|
+
incomplete: 'Esta semana UTC ainda está em andamento e não é salva para compartilhar.',
|
|
521
|
+
excluded: (forks, undated) => `Fora da conta: ${forks} históricos bifurcados sem um limite conhecido; ${undated} tokens sem data.`,
|
|
522
|
+
saveFailed: 'O Burn não conseguiu salvar esta semana para compartilhar.',
|
|
523
|
+
},
|
|
524
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DollarRange, type PricingTable, type TurnPrice } from './pricing';
|
|
2
|
-
import { type AttributionSummary, type CommitsStatus, type InsightBucket, type InsightHost, type InsightTranscript, type InsightTurn, type RewriteCause, type RewriteEvidence, type SessionCommits } from './types';
|
|
2
|
+
import { type AttributionSummary, type BucketAttribution, type CommitsStatus, type InsightBucket, type InsightHost, type InsightTranscript, type InsightTurn, type RewriteCause, type RewriteEvidence, type SessionCommits } from './types';
|
|
3
3
|
import { type WhyLang } from './i18n';
|
|
4
4
|
export declare function sumPrices(values: Array<DollarRange | null>): DollarRange | null;
|
|
5
5
|
export declare function totalTokens(turn: InsightTurn): number;
|
|
@@ -19,6 +19,7 @@ export interface SessionFigures {
|
|
|
19
19
|
totalUsd: DollarRange | null;
|
|
20
20
|
}
|
|
21
21
|
export declare function sessionFigures(transcript: InsightTranscript, rates?: PricingTable): SessionFigures;
|
|
22
|
+
export declare function bucketPrice(turn: InsightTurn, allocation: BucketAttribution, rates: PricingTable): DollarRange | null;
|
|
22
23
|
/** Left-aligned columns two spaces apart; widths follow the widest cell, so translated labels widen their column. */
|
|
23
24
|
export declare function table(headers: string[], rows: string[][]): string;
|
|
24
25
|
/** Token counts in en-US digits in every language. */
|
|
@@ -28,6 +29,8 @@ export declare const share: (tokens: number, total: number) => string;
|
|
|
28
29
|
export declare const WHY_TIP_HIDE_LINE: string;
|
|
29
30
|
/** A model id as people say it: claude-opus-5-5 is Opus 5.5 and claude-haiku-4-5-20251001 is Haiku 4.5. Any other id prints as it is. */
|
|
30
31
|
export declare function modelLabel(model: string): string;
|
|
32
|
+
/** The model with the most output tokens, then the most responses; null when no response names one. */
|
|
33
|
+
export declare function dominantModel(turns: InsightTurn[]): string | null;
|
|
31
34
|
/** What the coach tip is chosen from: each cause's measured size in this session, and the facts its action line quotes. */
|
|
32
35
|
export interface WhyTipInput {
|
|
33
36
|
/** The table's session total, children included. */
|
|
@@ -63,6 +66,8 @@ export interface WhyTipInput {
|
|
|
63
66
|
medianPerCall: number;
|
|
64
67
|
};
|
|
65
68
|
}
|
|
69
|
+
/** A main model with a smaller Claude model below it, the one CLAUDE_CODE_SUBAGENT_MODEL=haiku names. */
|
|
70
|
+
export declare const HAS_SMALLER_MODEL: RegExp;
|
|
66
71
|
/**
|
|
67
72
|
* Where the tip is shown: `why` itself, or the AgentGuard plugin. The fan-out
|
|
68
73
|
* tip points `why` readers to the plugin; someone the plugin shows it to already
|
|
@@ -82,7 +87,14 @@ export type TipContext = 'why' | 'plugin';
|
|
|
82
87
|
* the share tip prints for sub-agents and the 0.3.16 dollars tip for rewrites.
|
|
83
88
|
* In the plugin context only the share tip's second sentence changes.
|
|
84
89
|
*/
|
|
90
|
+
export declare function whyTipCause(input: WhyTipInput): 'subagents' | 'reloads' | 'conversation' | 'setup' | null;
|
|
85
91
|
export declare function whyTip(input: WhyTipInput, lang?: WhyLang, context?: TipContext): string | null;
|
|
92
|
+
/** Cache-write dollars and observations by rewrite cause, also used by the weekly view. */
|
|
93
|
+
export declare function rewriteCausePrices(turns: InsightTurn[], rewrites: RewriteEvidence[], rates?: PricingTable): Map<RewriteCause, {
|
|
94
|
+
usd: number;
|
|
95
|
+
count: number;
|
|
96
|
+
longestIdleMs: number | null;
|
|
97
|
+
}>;
|
|
86
98
|
/**
|
|
87
99
|
* What `whyTip` weighs, from the figures `why` prints. The sub-agent and rewrite
|
|
88
100
|
* rows are the table's own. The setup and the re-read conversation split each
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PROOF_MINIMUM = exports.PROOF_WINDOW = exports.WHY_TIP_HIDE_LINE = exports.share = exports.count = void 0;
|
|
3
|
+
exports.PROOF_MINIMUM = exports.PROOF_WINDOW = exports.HAS_SMALLER_MODEL = exports.WHY_TIP_HIDE_LINE = exports.share = exports.count = void 0;
|
|
4
4
|
exports.sumPrices = sumPrices;
|
|
5
5
|
exports.totalTokens = totalTokens;
|
|
6
6
|
exports.sessionFigures = sessionFigures;
|
|
7
|
+
exports.bucketPrice = bucketPrice;
|
|
7
8
|
exports.table = table;
|
|
8
9
|
exports.modelLabel = modelLabel;
|
|
10
|
+
exports.dominantModel = dominantModel;
|
|
11
|
+
exports.whyTipCause = whyTipCause;
|
|
9
12
|
exports.whyTip = whyTip;
|
|
13
|
+
exports.rewriteCausePrices = rewriteCausePrices;
|
|
10
14
|
exports.whyTipInput = whyTipInput;
|
|
11
15
|
exports.whyTipLine = whyTipLine;
|
|
12
16
|
exports.unfinishedSubagents = unfinishedSubagents;
|
|
@@ -26,6 +30,7 @@ const attribution_1 = require("./attribution");
|
|
|
26
30
|
const pricing_1 = require("./pricing");
|
|
27
31
|
const live_1 = require("./live");
|
|
28
32
|
const transcript_1 = require("./transcript");
|
|
33
|
+
const version_1 = require("../version");
|
|
29
34
|
const types_1 = require("./types");
|
|
30
35
|
const i18n_1 = require("./i18n");
|
|
31
36
|
const stop_text_1 = require("../stop-text");
|
|
@@ -90,7 +95,7 @@ function dominantModel(turns) {
|
|
|
90
95
|
return [...byModel].sort(([a, x], [b, y]) => y.output - x.output || y.responses - x.responses || (a < b ? -1 : a > b ? 1 : 0))[0]?.[0] ?? null;
|
|
91
96
|
}
|
|
92
97
|
/** A main model with a smaller Claude model below it, the one CLAUDE_CODE_SUBAGENT_MODEL=haiku names. */
|
|
93
|
-
|
|
98
|
+
exports.HAS_SMALLER_MODEL = /^claude-(?:opus|fable|sonnet)-/;
|
|
94
99
|
/**
|
|
95
100
|
* The coach: one next step, for the largest cause that stands out in this
|
|
96
101
|
* session; null when none does, never a generic line. A cause stands out at the
|
|
@@ -104,8 +109,8 @@ const HAS_SMALLER_MODEL = /^claude-(?:opus|fable|sonnet)-/;
|
|
|
104
109
|
* the share tip prints for sub-agents and the 0.3.16 dollars tip for rewrites.
|
|
105
110
|
* In the plugin context only the share tip's second sentence changes.
|
|
106
111
|
*/
|
|
107
|
-
function
|
|
108
|
-
const { totalTokens, totalUsd } = input
|
|
112
|
+
function whyTipCause(input) {
|
|
113
|
+
const { totalTokens, totalUsd } = input;
|
|
109
114
|
const priced = totalUsd !== null && midpoint(totalUsd) > 0;
|
|
110
115
|
const tokenShare = (tokens) => totalTokens > 0 ? tokens / totalTokens : 0;
|
|
111
116
|
const { subagents, reloads, conversation, setup } = input;
|
|
@@ -121,10 +126,14 @@ function whyTip(input, lang = 'en', context = 'why') {
|
|
|
121
126
|
if (size !== null && (largest === null || size > largest.size))
|
|
122
127
|
largest = { cause, size };
|
|
123
128
|
}
|
|
124
|
-
|
|
129
|
+
return largest?.cause ?? null;
|
|
130
|
+
}
|
|
131
|
+
function whyTip(input, lang = 'en', context = 'why') {
|
|
132
|
+
const { totalTokens, totalUsd } = input, text = i18n_1.WHY_TEXT[lang];
|
|
133
|
+
switch (whyTipCause(input)) {
|
|
125
134
|
case 'subagents': {
|
|
126
135
|
const { mainModel, onMainModel = 0, onMainModelShare = 0 } = input.subagents;
|
|
127
|
-
return mainModel && onMainModel > 0 && onMainModelShare >= 0.5 && HAS_SMALLER_MODEL.test(mainModel)
|
|
136
|
+
return mainModel && onMainModel > 0 && onMainModelShare >= 0.5 && exports.HAS_SMALLER_MODEL.test(mainModel)
|
|
128
137
|
? text.tipSubagentModel(onMainModel, modelLabel(mainModel))
|
|
129
138
|
: (context === 'plugin' ? text.tipFanoutPlugin : text.tipFanout)((0, exports.share)(input.subagents.tokens, totalTokens));
|
|
130
139
|
}
|
|
@@ -141,6 +150,23 @@ function whyTip(input, lang = 'en', context = 'why') {
|
|
|
141
150
|
default: return null;
|
|
142
151
|
}
|
|
143
152
|
}
|
|
153
|
+
/** Cache-write dollars and observations by rewrite cause, also used by the weekly view. */
|
|
154
|
+
function rewriteCausePrices(turns, rewrites, rates = {}) {
|
|
155
|
+
// The rewrite cause with the largest cache-write list price, then the most rewrites, then precedence.
|
|
156
|
+
const byId = new Map(turns.map(turn => [turn.id, turn]));
|
|
157
|
+
const causes = new Map();
|
|
158
|
+
for (const rewrite of rewrites) {
|
|
159
|
+
const turn = byId.get(rewrite.turnId);
|
|
160
|
+
const price = turn ? (0, pricing_1.priceTurn)({ ...turn, inputTokens: 0, cacheReadTokens: 0, outputTokens: 0 }, rates).usd : null;
|
|
161
|
+
const row = causes.get(rewrite.cause) ?? { usd: 0, count: 0, longestIdleMs: null };
|
|
162
|
+
row.usd += price ? midpoint(price) : 0;
|
|
163
|
+
row.count++;
|
|
164
|
+
if (rewrite.idleMs !== undefined)
|
|
165
|
+
row.longestIdleMs = Math.max(row.longestIdleMs ?? 0, rewrite.idleMs);
|
|
166
|
+
causes.set(rewrite.cause, row);
|
|
167
|
+
}
|
|
168
|
+
return causes;
|
|
169
|
+
}
|
|
144
170
|
/**
|
|
145
171
|
* What `whyTip` weighs, from the figures `why` prints. The sub-agent and rewrite
|
|
146
172
|
* rows are the table's own. The setup and the re-read conversation split each
|
|
@@ -175,19 +201,7 @@ function whyTipInput(figures, rates = {}, bucketUsd) {
|
|
|
175
201
|
onMainTokens += tokens;
|
|
176
202
|
}
|
|
177
203
|
}
|
|
178
|
-
|
|
179
|
-
const byId = new Map(turns.map(turn => [turn.id, turn]));
|
|
180
|
-
const causes = new Map();
|
|
181
|
-
for (const rewrite of attribution.rewrites) {
|
|
182
|
-
const turn = byId.get(rewrite.turnId);
|
|
183
|
-
const price = turn ? (0, pricing_1.priceTurn)({ ...turn, inputTokens: 0, cacheReadTokens: 0, outputTokens: 0 }, rates).usd : null;
|
|
184
|
-
const row = causes.get(rewrite.cause) ?? { usd: 0, count: 0, longestIdleMs: null };
|
|
185
|
-
row.usd += price ? midpoint(price) : 0;
|
|
186
|
-
row.count++;
|
|
187
|
-
if (rewrite.idleMs !== undefined)
|
|
188
|
-
row.longestIdleMs = Math.max(row.longestIdleMs ?? 0, rewrite.idleMs);
|
|
189
|
-
causes.set(rewrite.cause, row);
|
|
190
|
-
}
|
|
204
|
+
const causes = rewriteCausePrices(turns, attribution.rewrites, rates);
|
|
191
205
|
const [cause, top] = [...causes].sort(([a, x], [b, y]) => y.usd - x.usd || y.count - x.count || types_1.REWRITE_CAUSES.indexOf(a) - types_1.REWRITE_CAUSES.indexOf(b))[0] ?? [null, null];
|
|
192
206
|
// Setup and re-read conversation, split at the first call's context.
|
|
193
207
|
const rewritten = new Set(attribution.rewrites.map(rewrite => rewrite.turnId));
|
|
@@ -329,7 +343,7 @@ function renderWhy(transcript, rates = {}, options = {}) {
|
|
|
329
343
|
const money = (value) => (0, live_1.dollars)(value, text);
|
|
330
344
|
if (transcript.state.forkHistoryBoundaryUnknown)
|
|
331
345
|
return [
|
|
332
|
-
`AgentGuard why: ${transcript.sessionId}`,
|
|
346
|
+
`Burn ${version_1.BURN_VERSION} | AgentGuard why: ${transcript.sessionId}`,
|
|
333
347
|
text.forkUnavailable,
|
|
334
348
|
table(text.headers, types_1.INSIGHT_BUCKETS.map(bucket => [text.labels[bucket], text.unattributed, text.unattributed, text.unattributed, text.unattributed])),
|
|
335
349
|
...(options.commits ? ['', text.bought(options.commits, transcript.host, null)] : []),
|
|
@@ -354,7 +368,7 @@ function renderWhy(transcript, rates = {}, options = {}) {
|
|
|
354
368
|
const perCommit = options.commits ? tokensPerCommit(attribution.totalTokens, options.commits) : null;
|
|
355
369
|
const bought = options.commits ? text.bought(options.commits, transcript.host, perCommit === null ? null : (0, exports.count)(perCommit)) : null;
|
|
356
370
|
return [
|
|
357
|
-
`AgentGuard why: ${transcript.sessionId}`,
|
|
371
|
+
`Burn ${version_1.BURN_VERSION} | AgentGuard why: ${transcript.sessionId}`,
|
|
358
372
|
text.summary(turns.length, (0, exports.count)(attribution.totalTokens), totalUsd === null ? null : money(totalUsd)),
|
|
359
373
|
text.usage((0, exports.count)(totals.input), (0, exports.count)(totals.write), (0, exports.count)(totals.read), (0, exports.count)(totals.output)),
|
|
360
374
|
'', table(text.headers, rows), '',
|
|
@@ -9,6 +9,10 @@ export declare function transcriptRoots(): {
|
|
|
9
9
|
claude: string;
|
|
10
10
|
codex: string;
|
|
11
11
|
};
|
|
12
|
+
export declare class NoSessionsFoundError extends Error {
|
|
13
|
+
readonly lookedIn: string[];
|
|
14
|
+
constructor(lookedIn: string[]);
|
|
15
|
+
}
|
|
12
16
|
/** Local locators only. Never follows directory symlinks or reads message content. */
|
|
13
17
|
export declare function discoverInsightTranscripts(roots?: {
|
|
14
18
|
claude: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoSessionsFoundError = void 0;
|
|
3
4
|
exports.transcriptRoots = transcriptRoots;
|
|
4
5
|
exports.discoverInsightTranscripts = discoverInsightTranscripts;
|
|
5
6
|
exports.transcriptFileLocation = transcriptFileLocation;
|
|
@@ -11,10 +12,22 @@ const node_fs_1 = require("node:fs");
|
|
|
11
12
|
const node_path_1 = require("node:path");
|
|
12
13
|
const node_os_1 = require("node:os");
|
|
13
14
|
const transcript_1 = require("./transcript");
|
|
15
|
+
const first_run_1 = require("./first-run");
|
|
14
16
|
/** Claude Code keeps one directory per project here, each session a JSONL file directly inside it; Codex keeps dated rollouts. */
|
|
15
17
|
function transcriptRoots() {
|
|
16
|
-
return {
|
|
18
|
+
return {
|
|
19
|
+
claude: (0, node_path_1.resolve)(process.env.CLAUDE_CONFIG_DIR || (0, node_path_1.join)((0, node_os_1.homedir)(), '.claude'), 'projects'),
|
|
20
|
+
codex: (0, node_path_1.resolve)(process.env.CODEX_HOME || (0, node_path_1.join)((0, node_os_1.homedir)(), '.codex'), 'sessions'),
|
|
21
|
+
};
|
|
17
22
|
}
|
|
23
|
+
class NoSessionsFoundError extends Error {
|
|
24
|
+
lookedIn;
|
|
25
|
+
constructor(lookedIn) {
|
|
26
|
+
super(first_run_1.NO_SESSIONS_MESSAGE);
|
|
27
|
+
this.lookedIn = lookedIn;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.NoSessionsFoundError = NoSessionsFoundError;
|
|
18
31
|
/** Local locators only. Never follows directory symlinks or reads message content. */
|
|
19
32
|
function discoverInsightTranscripts(roots = transcriptRoots()) {
|
|
20
33
|
const found = [];
|
|
@@ -60,7 +73,10 @@ function selectInsightTranscript(session, locations) {
|
|
|
60
73
|
const file = requested ? transcriptFileLocation(requested) : null;
|
|
61
74
|
if (file)
|
|
62
75
|
return file;
|
|
63
|
-
const
|
|
76
|
+
const roots = transcriptRoots();
|
|
77
|
+
const candidates = locations ?? discoverInsightTranscripts(roots);
|
|
78
|
+
if (!session && candidates.length === 0)
|
|
79
|
+
throw new NoSessionsFoundError(Object.values(roots));
|
|
64
80
|
// With nothing requested, the newest top-level session wins. A subagent's own
|
|
65
81
|
// transcript (Claude Code keeps them under <session>/subagents/agent-*.jsonl) is
|
|
66
82
|
// often the newest file on disk, and read alone it reports 100% fan-out and
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { UsageWindow } from './pace';
|
|
2
|
+
import { type TranscriptLocation } from './sessions';
|
|
3
|
+
export type BillingKind = 'subscription' | 'metered' | 'unknown';
|
|
4
|
+
export interface SimpleUsage {
|
|
5
|
+
billing: BillingKind;
|
|
6
|
+
now: number;
|
|
7
|
+
windows: UsageWindow[];
|
|
8
|
+
spentTodayUsd: number | null;
|
|
9
|
+
paceUsdPerHour: number | null;
|
|
10
|
+
}
|
|
11
|
+
/** Recognize explicit host metadata, never credential contents or a model-name guess. */
|
|
12
|
+
export declare function billingKind(value: unknown): BillingKind;
|
|
13
|
+
/** Only allowlisted numbers and the billing category are persisted, under a path digest. */
|
|
14
|
+
export declare function recordSimpleHost(home: string, file: string, payload: unknown, now?: number): void;
|
|
15
|
+
export declare function readSimpleUsage(home: string, options?: {
|
|
16
|
+
location?: TranscriptLocation;
|
|
17
|
+
payload?: unknown;
|
|
18
|
+
now?: number;
|
|
19
|
+
locations?: TranscriptLocation[];
|
|
20
|
+
}): SimpleUsage;
|