@codyswann/lisa 2.221.6 → 2.222.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/dist/utils/usage-accounting.d.ts +1 -0
- package/dist/utils/usage-accounting.d.ts.map +1 -1
- package/dist/utils/usage-accounting.js +25 -9
- package/dist/utils/usage-accounting.js.map +1 -1
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/SKILL.md +4 -0
- package/plugins/lisa/rules/eager/usage-accounting.md +3 -2
- package/plugins/lisa/rules/reference/usage-accounting.md +8 -3
- package/plugins/lisa/skills/lisa-usage-accounting/SKILL.md +4 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-usage-accounting/SKILL.md +4 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/eager/usage-accounting.md +3 -2
- package/plugins/lisa-copilot/rules/reference/usage-accounting.md +8 -3
- package/plugins/lisa-copilot/skills/lisa-usage-accounting/SKILL.md +4 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/usage-accounting-reference.mdc +8 -3
- package/plugins/lisa-cursor/rules/usage-accounting.mdc +3 -2
- package/plugins/lisa-cursor/skills/lisa-usage-accounting/SKILL.md +4 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/eager/usage-accounting.md +3 -2
- package/plugins/src/base/rules/reference/usage-accounting.md +8 -3
- package/plugins/src/base/skills/lisa-usage-accounting/SKILL.md +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-accounting.d.ts","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MA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
|
3
3
|
import { sumNullableDecimals } from "./decimal-sum.js";
|
|
4
4
|
export const LISA_USAGE_HEADING = "## Lisa Usage";
|
|
5
|
-
const ENTRY_PATTERN = /<!-- lisa:usage-entry entry_id=(\S+) flow=(\S+) run_id=(\S+) provider=(\S+) model=(\S+) source=(\S+) input_tokens=(\S+) cached_input_tokens=(\S+) output_tokens=(\S+) reasoning_tokens=(\S+) total_tokens=(\S+) cost=(\S+) currency=(\S+) pricing_status=(\S+) pricing_source=(\S+) artifact_ref=(\S+) parent_artifact_ref=(\S*) -->/g;
|
|
5
|
+
const ENTRY_PATTERN = /<!-- lisa:usage-entry entry_id=(\S+) flow=(\S+) run_id=(\S+) provider=(\S+) model=(\S+) source=(\S+) input_tokens=(\S+) cached_input_tokens=(\S+) output_tokens=(\S+) reasoning_tokens=(\S+) total_tokens=(\S+) (?:measured_subset_tokens=(\S+) )?cost=(\S+) currency=(\S+) pricing_status=(\S+) pricing_source=(\S+) artifact_ref=(\S+) parent_artifact_ref=(\S*) -->/g;
|
|
6
6
|
const ROLLUP_PATTERN = /<!-- lisa:usage-rollup direct_entry_ids=(\S*) child_entry_ids=(\S*) child_refs=(\S*) direct_tokens=(\S+) child_tokens=(\S+) total_tokens=(\S+) direct_cost=(\S+) child_cost=(\S+) total_cost=(\S+) currency=(\S+)(?: child_currency=(\S+))? -->/;
|
|
7
7
|
const MIXED_CURRENCY = "mixed";
|
|
8
8
|
/**
|
|
@@ -167,6 +167,21 @@ function splitDocumentAroundRange(document, range) {
|
|
|
167
167
|
function formatTokens(value) {
|
|
168
168
|
return value === null ? "null" : String(value);
|
|
169
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Render the token-count cell for human readers without making a measured
|
|
172
|
+
* subset look like a complete total.
|
|
173
|
+
*
|
|
174
|
+
* @param entry Usage entry to display.
|
|
175
|
+
* @returns A deterministic display string.
|
|
176
|
+
*/
|
|
177
|
+
function formatEntryTokens(entry) {
|
|
178
|
+
if (entry.totalTokens !== null) {
|
|
179
|
+
return formatTokens(entry.totalTokens);
|
|
180
|
+
}
|
|
181
|
+
return entry.measuredSubsetTokens === null
|
|
182
|
+
? "null"
|
|
183
|
+
: `${entry.measuredSubsetTokens} measured subset`;
|
|
184
|
+
}
|
|
170
185
|
/**
|
|
171
186
|
* Render a cost value for the human-readable table.
|
|
172
187
|
*
|
|
@@ -299,7 +314,7 @@ export function createLisaUsageRollup(entries, previousRollup, childArtifacts) {
|
|
|
299
314
|
* @returns The canonical `lisa:usage-entry` token line.
|
|
300
315
|
*/
|
|
301
316
|
export function renderLisaUsageEntryToken(entry) {
|
|
302
|
-
return `<!-- lisa:usage-entry entry_id=${encodeTokenValue(entry.entryId)} flow=${encodeTokenValue(entry.flow)} run_id=${encodeTokenValue(entry.runId)} provider=${encodeTokenValue(entry.provider)} model=${encodeTokenValue(entry.model)} source=${encodeTokenValue(entry.source)} input_tokens=${renderNullable(entry.inputTokens)} cached_input_tokens=${renderNullable(entry.cachedInputTokens)} output_tokens=${renderNullable(entry.outputTokens)} reasoning_tokens=${renderNullable(entry.reasoningTokens)} total_tokens=${renderNullable(entry.totalTokens)} cost=${renderNullable(entry.cost)} currency=${renderNullable(entry.currency)} pricing_status=${encodeTokenValue(entry.pricingStatus)} pricing_source=${renderNullable(entry.pricingSource)} artifact_ref=${encodeTokenValue(entry.artifactRef)} parent_artifact_ref=${entry.parentArtifactRef === null ? "" : encodeTokenValue(entry.parentArtifactRef)} -->`;
|
|
317
|
+
return `<!-- lisa:usage-entry entry_id=${encodeTokenValue(entry.entryId)} flow=${encodeTokenValue(entry.flow)} run_id=${encodeTokenValue(entry.runId)} provider=${encodeTokenValue(entry.provider)} model=${encodeTokenValue(entry.model)} source=${encodeTokenValue(entry.source)} input_tokens=${renderNullable(entry.inputTokens)} cached_input_tokens=${renderNullable(entry.cachedInputTokens)} output_tokens=${renderNullable(entry.outputTokens)} reasoning_tokens=${renderNullable(entry.reasoningTokens)} total_tokens=${renderNullable(entry.totalTokens)} measured_subset_tokens=${renderNullable(entry.measuredSubsetTokens)} cost=${renderNullable(entry.cost)} currency=${renderNullable(entry.currency)} pricing_status=${encodeTokenValue(entry.pricingStatus)} pricing_source=${renderNullable(entry.pricingSource)} artifact_ref=${encodeTokenValue(entry.artifactRef)} parent_artifact_ref=${entry.parentArtifactRef === null ? "" : encodeTokenValue(entry.parentArtifactRef)} -->`;
|
|
303
318
|
}
|
|
304
319
|
/**
|
|
305
320
|
* Render the machine-readable rollup token for a managed usage section.
|
|
@@ -323,7 +338,7 @@ export function renderLisaUsageSection(input) {
|
|
|
323
338
|
const { entries, rollup } = input;
|
|
324
339
|
const entryLines = entries.length === 0
|
|
325
340
|
? ["| _No direct entries recorded_ | | | | |"]
|
|
326
|
-
: entries.map(entry => `| ${entry.flow} | ${entry.source} | ${entry.provider}/${entry.model} | ${
|
|
341
|
+
: entries.map(entry => `| ${entry.flow} | ${entry.source} | ${entry.provider}/${entry.model} | ${formatEntryTokens(entry)} | ${formatCost(entry.cost, entry.currency)} | ${renderLisaUsageEntryToken(entry)}`);
|
|
327
342
|
const lines = [
|
|
328
343
|
LISA_USAGE_HEADING,
|
|
329
344
|
"",
|
|
@@ -358,12 +373,13 @@ export function parseLisaUsageSection(document) {
|
|
|
358
373
|
outputTokens: parseNullableNumber(match[9] ?? ""),
|
|
359
374
|
reasoningTokens: parseNullableNumber(match[10] ?? ""),
|
|
360
375
|
totalTokens: parseNullableNumber(match[11] ?? ""),
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
376
|
+
measuredSubsetTokens: match[12] === undefined ? null : parseNullableNumber(match[12]),
|
|
377
|
+
cost: parseNullableNumber(match[13] ?? ""),
|
|
378
|
+
currency: parseNullableString(match[14] ?? ""),
|
|
379
|
+
pricingStatus: decodeTokenValue(match[15] ?? ""),
|
|
380
|
+
pricingSource: parseNullableString(match[16] ?? ""),
|
|
381
|
+
artifactRef: decodeTokenValue(match[17] ?? ""),
|
|
382
|
+
parentArtifactRef: parseNullableString(match[18] ?? ""),
|
|
367
383
|
}));
|
|
368
384
|
const rollupMatch = ROLLUP_PATTERN.exec(section);
|
|
369
385
|
const rollup = rollupMatch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-accounting.js","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAAA,uHAAuH;AAEvH,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AA2DlD,MAAM,aAAa,GACjB,uUAAuU,CAAC;AAE1U,MAAM,cAAc,GAClB,iPAAiP,CAAC;AAEpP,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,KAAa;IACrC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,KAAK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/C,MAAM,aAAa,GAAG,qBAAqB,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3E,MAAM,MAAM,GACV,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM;QACxC,CAAC,CAAC,KAAK,CAAC,MAAM;QACd,CAAC,CAAC,qBAAqB,CACnB,aAAa,EACb,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,EAC7B,KAAK,CAAC,cAAc,CACrB,CAAC;IACR,MAAM,YAAY,GAAG,sBAAsB,CAAC;QAC1C,OAAO,EAAE,aAAa;QACtB,MAAM;KACP,CAAC,CAAC,OAAO,EAAE,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,wBAAwB,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAE3E,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,YAAY,IAAI,CAAC;IACvE,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,GAAG,MAAM,OAAO,YAAY,IAAI,CAAC;IAC1C,CAAC;IAED,OAAO,GAAG,MAAM,OAAO,YAAY,OAAO,KAAK,IAAI,CAAC;AACtD,CAAC;AAED,6EAA6E"}
|
package/package.json
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"form-data": ">=4.0.6"
|
|
103
103
|
},
|
|
104
104
|
"name": "@codyswann/lisa",
|
|
105
|
-
"version": "2.
|
|
105
|
+
"version": "2.222.0",
|
|
106
106
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
107
107
|
"main": "dist/index.js",
|
|
108
108
|
"exports": {
|
|
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
|
|
|
67
67
|
missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
|
|
68
68
|
fields.
|
|
69
69
|
|
|
70
|
+
When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
|
|
71
|
+
write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
|
|
72
|
+
known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
|
|
73
|
+
|
|
70
74
|
## Return shape
|
|
71
75
|
|
|
72
76
|
Return structured output so callers can persist or log what happened without reparsing prose:
|
|
@@ -16,7 +16,8 @@ Every artifact with inline body content gets exactly one section:
|
|
|
16
16
|
|
|
17
17
|
Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is the stable dedupe key — rewriting the same logical run with the same `entry_id` updates in place; a different run gets a different `entry_id`.
|
|
18
18
|
|
|
19
|
-
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `unavailable`.
|
|
19
|
+
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `measured-subset` (a trustworthy subtotal exists, but the complete run total is unknown) / `unavailable`.
|
|
20
|
+
- **`measured_subset_tokens`**: measured subtotal for `measured-subset` entries only. Keep `total_tokens = null` so rollups do not treat a subset as a complete total.
|
|
20
21
|
- **`pricing_status`**: same trinary plus `missing` (cost not known but should be).
|
|
21
22
|
- **Absence ≠ zero.** `null` means unknown; `0` means explicitly zero. Always write the entry — never silently omit.
|
|
22
23
|
- Do NOT replace observed counts with estimates.
|
|
@@ -25,4 +26,4 @@ Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is th
|
|
|
25
26
|
|
|
26
27
|
Container artifacts (Epic, PRD, etc.) roll up usage from their direct children. Roll-up is recursive — a parent's `## Lisa Usage` aggregates its descendants' direct entries. Re-writes are idempotent: re-running an intake or lifecycle skill must not duplicate entries.
|
|
27
28
|
|
|
28
|
-
Full schema (all
|
|
29
|
+
Full schema (all 18 fields, pricing semantics, rollup math, idempotent-rewrite rules): [reference/usage-accounting.md](../reference/usage-accounting.md).
|
|
@@ -25,12 +25,13 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
25
25
|
| `run_id` | Runtime/session identifier when available; empty only when the runtime exposes no stable run id. |
|
|
26
26
|
| `provider` | Model provider name. |
|
|
27
27
|
| `model` | Model identifier. |
|
|
28
|
-
| `source` | `observed`, `estimated`, or `unavailable`. |
|
|
28
|
+
| `source` | `observed`, `estimated`, `measured-subset`, or `unavailable`. |
|
|
29
29
|
| `input_tokens` | Prompt/input tokens, or `null` when unavailable. |
|
|
30
30
|
| `cached_input_tokens` | Cached/reused input tokens, or `null` when unavailable/not exposed. |
|
|
31
31
|
| `output_tokens` | Output/completion tokens, or `null` when unavailable. |
|
|
32
32
|
| `reasoning_tokens` | Reasoning/internal tokens, or `null` when unavailable/not exposed. |
|
|
33
33
|
| `total_tokens` | Total trustworthy tokens for the entry, or `null`. |
|
|
34
|
+
| `measured_subset_tokens` | Trustworthy measured subtotal for a known subset of the run, or `null`. |
|
|
34
35
|
| `cost` | Observed or estimated cost for this entry, or `null`. |
|
|
35
36
|
| `currency` | ISO currency code when `cost` is known, otherwise `null`. |
|
|
36
37
|
| `pricing_status` | `observed`, `estimated`, `missing`, or `unavailable`. |
|
|
@@ -46,13 +47,17 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
46
47
|
|
|
47
48
|
- `observed`: the runtime supplied the usage directly. Do not replace observed counts with estimates.
|
|
48
49
|
- `estimated`: Lisa derived counts or cost from trustworthy runtime metadata plus an explicit pricing contract. Estimates are allowed only when the derivation inputs are real and attributable to the run.
|
|
50
|
+
- `measured-subset`: Lisa measured a known subset of the run, but not enough to claim a complete `total_tokens` value. Preserve the subtotal in `measured_subset_tokens`, keep `total_tokens = null`, and keep rollup totals unknown instead of treating the subset as the whole run.
|
|
49
51
|
- `unavailable`: Lisa could not obtain trustworthy usage data. Write the entry anyway with `null` token/cost fields rather than silently omitting the row.
|
|
50
52
|
|
|
51
53
|
The absence of data is never treated as zero. `null` means unknown; `0` means explicitly observed or derived zero.
|
|
52
54
|
|
|
53
55
|
For example, an unavailable Verify run still records a direct entry with `source = unavailable`,
|
|
54
56
|
`pricing_status = unavailable`, and `null` token/cost fields so downstream readers can distinguish
|
|
55
|
-
"missing telemetry" from "zero usage."
|
|
57
|
+
"missing telemetry" from "zero usage." A Plan run with measured sub-agent usage but unmeasured
|
|
58
|
+
main-loop usage records `source = measured-subset`, `measured_subset_tokens = <subtotal>`, and
|
|
59
|
+
`total_tokens = null` so the subtotal is durable without being misrepresented as the complete run
|
|
60
|
+
total.
|
|
56
61
|
|
|
57
62
|
## Pricing semantics
|
|
58
63
|
|
|
@@ -70,7 +75,7 @@ Runtime-observed cost always wins over estimates. Estimated cost never overwrite
|
|
|
70
75
|
Every visible direct entry row ends with exactly one machine-readable token:
|
|
71
76
|
|
|
72
77
|
```text
|
|
73
|
-
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
78
|
+
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> measured_subset_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
Field order is fixed. A reader parses the usage ledger by matching `<!-- lisa:usage-entry ` lines only; it never needs to scrape prose or table cell positions. String fields are percent-encoded before rendering and decoded after parsing, so whitespace, commas, and HTML comment terminators inside source values cannot split or truncate the token.
|
|
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
|
|
|
67
67
|
missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
|
|
68
68
|
fields.
|
|
69
69
|
|
|
70
|
+
When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
|
|
71
|
+
write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
|
|
72
|
+
known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
|
|
73
|
+
|
|
70
74
|
## Return shape
|
|
71
75
|
|
|
72
76
|
Return structured output so callers can persist or log what happened without reparsing prose:
|
|
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
|
|
|
67
67
|
missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
|
|
68
68
|
fields.
|
|
69
69
|
|
|
70
|
+
When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
|
|
71
|
+
write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
|
|
72
|
+
known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
|
|
73
|
+
|
|
70
74
|
## Return shape
|
|
71
75
|
|
|
72
76
|
Return structured output so callers can persist or log what happened without reparsing prose:
|
|
@@ -16,7 +16,8 @@ Every artifact with inline body content gets exactly one section:
|
|
|
16
16
|
|
|
17
17
|
Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is the stable dedupe key — rewriting the same logical run with the same `entry_id` updates in place; a different run gets a different `entry_id`.
|
|
18
18
|
|
|
19
|
-
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `unavailable`.
|
|
19
|
+
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `measured-subset` (a trustworthy subtotal exists, but the complete run total is unknown) / `unavailable`.
|
|
20
|
+
- **`measured_subset_tokens`**: measured subtotal for `measured-subset` entries only. Keep `total_tokens = null` so rollups do not treat a subset as a complete total.
|
|
20
21
|
- **`pricing_status`**: same trinary plus `missing` (cost not known but should be).
|
|
21
22
|
- **Absence ≠ zero.** `null` means unknown; `0` means explicitly zero. Always write the entry — never silently omit.
|
|
22
23
|
- Do NOT replace observed counts with estimates.
|
|
@@ -25,4 +26,4 @@ Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is th
|
|
|
25
26
|
|
|
26
27
|
Container artifacts (Epic, PRD, etc.) roll up usage from their direct children. Roll-up is recursive — a parent's `## Lisa Usage` aggregates its descendants' direct entries. Re-writes are idempotent: re-running an intake or lifecycle skill must not duplicate entries.
|
|
27
28
|
|
|
28
|
-
Full schema (all
|
|
29
|
+
Full schema (all 18 fields, pricing semantics, rollup math, idempotent-rewrite rules): [reference/usage-accounting.md](../reference/usage-accounting.md).
|
|
@@ -25,12 +25,13 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
25
25
|
| `run_id` | Runtime/session identifier when available; empty only when the runtime exposes no stable run id. |
|
|
26
26
|
| `provider` | Model provider name. |
|
|
27
27
|
| `model` | Model identifier. |
|
|
28
|
-
| `source` | `observed`, `estimated`, or `unavailable`. |
|
|
28
|
+
| `source` | `observed`, `estimated`, `measured-subset`, or `unavailable`. |
|
|
29
29
|
| `input_tokens` | Prompt/input tokens, or `null` when unavailable. |
|
|
30
30
|
| `cached_input_tokens` | Cached/reused input tokens, or `null` when unavailable/not exposed. |
|
|
31
31
|
| `output_tokens` | Output/completion tokens, or `null` when unavailable. |
|
|
32
32
|
| `reasoning_tokens` | Reasoning/internal tokens, or `null` when unavailable/not exposed. |
|
|
33
33
|
| `total_tokens` | Total trustworthy tokens for the entry, or `null`. |
|
|
34
|
+
| `measured_subset_tokens` | Trustworthy measured subtotal for a known subset of the run, or `null`. |
|
|
34
35
|
| `cost` | Observed or estimated cost for this entry, or `null`. |
|
|
35
36
|
| `currency` | ISO currency code when `cost` is known, otherwise `null`. |
|
|
36
37
|
| `pricing_status` | `observed`, `estimated`, `missing`, or `unavailable`. |
|
|
@@ -46,13 +47,17 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
46
47
|
|
|
47
48
|
- `observed`: the runtime supplied the usage directly. Do not replace observed counts with estimates.
|
|
48
49
|
- `estimated`: Lisa derived counts or cost from trustworthy runtime metadata plus an explicit pricing contract. Estimates are allowed only when the derivation inputs are real and attributable to the run.
|
|
50
|
+
- `measured-subset`: Lisa measured a known subset of the run, but not enough to claim a complete `total_tokens` value. Preserve the subtotal in `measured_subset_tokens`, keep `total_tokens = null`, and keep rollup totals unknown instead of treating the subset as the whole run.
|
|
49
51
|
- `unavailable`: Lisa could not obtain trustworthy usage data. Write the entry anyway with `null` token/cost fields rather than silently omitting the row.
|
|
50
52
|
|
|
51
53
|
The absence of data is never treated as zero. `null` means unknown; `0` means explicitly observed or derived zero.
|
|
52
54
|
|
|
53
55
|
For example, an unavailable Verify run still records a direct entry with `source = unavailable`,
|
|
54
56
|
`pricing_status = unavailable`, and `null` token/cost fields so downstream readers can distinguish
|
|
55
|
-
"missing telemetry" from "zero usage."
|
|
57
|
+
"missing telemetry" from "zero usage." A Plan run with measured sub-agent usage but unmeasured
|
|
58
|
+
main-loop usage records `source = measured-subset`, `measured_subset_tokens = <subtotal>`, and
|
|
59
|
+
`total_tokens = null` so the subtotal is durable without being misrepresented as the complete run
|
|
60
|
+
total.
|
|
56
61
|
|
|
57
62
|
## Pricing semantics
|
|
58
63
|
|
|
@@ -70,7 +75,7 @@ Runtime-observed cost always wins over estimates. Estimated cost never overwrite
|
|
|
70
75
|
Every visible direct entry row ends with exactly one machine-readable token:
|
|
71
76
|
|
|
72
77
|
```text
|
|
73
|
-
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
78
|
+
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> measured_subset_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
Field order is fixed. A reader parses the usage ledger by matching `<!-- lisa:usage-entry ` lines only; it never needs to scrape prose or table cell positions. String fields are percent-encoded before rendering and decoded after parsing, so whitespace, commas, and HTML comment terminators inside source values cannot split or truncate the token.
|
|
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
|
|
|
67
67
|
missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
|
|
68
68
|
fields.
|
|
69
69
|
|
|
70
|
+
When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
|
|
71
|
+
write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
|
|
72
|
+
known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
|
|
73
|
+
|
|
70
74
|
## Return shape
|
|
71
75
|
|
|
72
76
|
Return structured output so callers can persist or log what happened without reparsing prose:
|
|
@@ -30,12 +30,13 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
30
30
|
| `run_id` | Runtime/session identifier when available; empty only when the runtime exposes no stable run id. |
|
|
31
31
|
| `provider` | Model provider name. |
|
|
32
32
|
| `model` | Model identifier. |
|
|
33
|
-
| `source` | `observed`, `estimated`, or `unavailable`. |
|
|
33
|
+
| `source` | `observed`, `estimated`, `measured-subset`, or `unavailable`. |
|
|
34
34
|
| `input_tokens` | Prompt/input tokens, or `null` when unavailable. |
|
|
35
35
|
| `cached_input_tokens` | Cached/reused input tokens, or `null` when unavailable/not exposed. |
|
|
36
36
|
| `output_tokens` | Output/completion tokens, or `null` when unavailable. |
|
|
37
37
|
| `reasoning_tokens` | Reasoning/internal tokens, or `null` when unavailable/not exposed. |
|
|
38
38
|
| `total_tokens` | Total trustworthy tokens for the entry, or `null`. |
|
|
39
|
+
| `measured_subset_tokens` | Trustworthy measured subtotal for a known subset of the run, or `null`. |
|
|
39
40
|
| `cost` | Observed or estimated cost for this entry, or `null`. |
|
|
40
41
|
| `currency` | ISO currency code when `cost` is known, otherwise `null`. |
|
|
41
42
|
| `pricing_status` | `observed`, `estimated`, `missing`, or `unavailable`. |
|
|
@@ -51,13 +52,17 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
51
52
|
|
|
52
53
|
- `observed`: the runtime supplied the usage directly. Do not replace observed counts with estimates.
|
|
53
54
|
- `estimated`: Lisa derived counts or cost from trustworthy runtime metadata plus an explicit pricing contract. Estimates are allowed only when the derivation inputs are real and attributable to the run.
|
|
55
|
+
- `measured-subset`: Lisa measured a known subset of the run, but not enough to claim a complete `total_tokens` value. Preserve the subtotal in `measured_subset_tokens`, keep `total_tokens = null`, and keep rollup totals unknown instead of treating the subset as the whole run.
|
|
54
56
|
- `unavailable`: Lisa could not obtain trustworthy usage data. Write the entry anyway with `null` token/cost fields rather than silently omitting the row.
|
|
55
57
|
|
|
56
58
|
The absence of data is never treated as zero. `null` means unknown; `0` means explicitly observed or derived zero.
|
|
57
59
|
|
|
58
60
|
For example, an unavailable Verify run still records a direct entry with `source = unavailable`,
|
|
59
61
|
`pricing_status = unavailable`, and `null` token/cost fields so downstream readers can distinguish
|
|
60
|
-
"missing telemetry" from "zero usage."
|
|
62
|
+
"missing telemetry" from "zero usage." A Plan run with measured sub-agent usage but unmeasured
|
|
63
|
+
main-loop usage records `source = measured-subset`, `measured_subset_tokens = <subtotal>`, and
|
|
64
|
+
`total_tokens = null` so the subtotal is durable without being misrepresented as the complete run
|
|
65
|
+
total.
|
|
61
66
|
|
|
62
67
|
## Pricing semantics
|
|
63
68
|
|
|
@@ -75,7 +80,7 @@ Runtime-observed cost always wins over estimates. Estimated cost never overwrite
|
|
|
75
80
|
Every visible direct entry row ends with exactly one machine-readable token:
|
|
76
81
|
|
|
77
82
|
```text
|
|
78
|
-
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
83
|
+
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> measured_subset_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
79
84
|
```
|
|
80
85
|
|
|
81
86
|
Field order is fixed. A reader parses the usage ledger by matching `<!-- lisa:usage-entry ` lines only; it never needs to scrape prose or table cell positions. String fields are percent-encoded before rendering and decoded after parsing, so whitespace, commas, and HTML comment terminators inside source values cannot split or truncate the token.
|
|
@@ -21,7 +21,8 @@ Every artifact with inline body content gets exactly one section:
|
|
|
21
21
|
|
|
22
22
|
Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is the stable dedupe key — rewriting the same logical run with the same `entry_id` updates in place; a different run gets a different `entry_id`.
|
|
23
23
|
|
|
24
|
-
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `unavailable`.
|
|
24
|
+
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `measured-subset` (a trustworthy subtotal exists, but the complete run total is unknown) / `unavailable`.
|
|
25
|
+
- **`measured_subset_tokens`**: measured subtotal for `measured-subset` entries only. Keep `total_tokens = null` so rollups do not treat a subset as a complete total.
|
|
25
26
|
- **`pricing_status`**: same trinary plus `missing` (cost not known but should be).
|
|
26
27
|
- **Absence ≠ zero.** `null` means unknown; `0` means explicitly zero. Always write the entry — never silently omit.
|
|
27
28
|
- Do NOT replace observed counts with estimates.
|
|
@@ -30,4 +31,4 @@ Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is th
|
|
|
30
31
|
|
|
31
32
|
Container artifacts (Epic, PRD, etc.) roll up usage from their direct children. Roll-up is recursive — a parent's `## Lisa Usage` aggregates its descendants' direct entries. Re-writes are idempotent: re-running an intake or lifecycle skill must not duplicate entries.
|
|
32
33
|
|
|
33
|
-
Full schema (all
|
|
34
|
+
Full schema (all 18 fields, pricing semantics, rollup math, idempotent-rewrite rules): [reference/usage-accounting.md](usage-accounting-reference.mdc).
|
|
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
|
|
|
67
67
|
missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
|
|
68
68
|
fields.
|
|
69
69
|
|
|
70
|
+
When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
|
|
71
|
+
write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
|
|
72
|
+
known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
|
|
73
|
+
|
|
70
74
|
## Return shape
|
|
71
75
|
|
|
72
76
|
Return structured output so callers can persist or log what happened without reparsing prose:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.222.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.222.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.222.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.222.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.222.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -16,7 +16,8 @@ Every artifact with inline body content gets exactly one section:
|
|
|
16
16
|
|
|
17
17
|
Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is the stable dedupe key — rewriting the same logical run with the same `entry_id` updates in place; a different run gets a different `entry_id`.
|
|
18
18
|
|
|
19
|
-
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `unavailable`.
|
|
19
|
+
- **`source`**: `observed` (runtime supplied) / `estimated` (derived from trustworthy metadata + pricing contract) / `measured-subset` (a trustworthy subtotal exists, but the complete run total is unknown) / `unavailable`.
|
|
20
|
+
- **`measured_subset_tokens`**: measured subtotal for `measured-subset` entries only. Keep `total_tokens = null` so rollups do not treat a subset as a complete total.
|
|
20
21
|
- **`pricing_status`**: same trinary plus `missing` (cost not known but should be).
|
|
21
22
|
- **Absence ≠ zero.** `null` means unknown; `0` means explicitly zero. Always write the entry — never silently omit.
|
|
22
23
|
- Do NOT replace observed counts with estimates.
|
|
@@ -25,4 +26,4 @@ Each direct entry records ONE logical Lisa run on ONE artifact. `entry_id` is th
|
|
|
25
26
|
|
|
26
27
|
Container artifacts (Epic, PRD, etc.) roll up usage from their direct children. Roll-up is recursive — a parent's `## Lisa Usage` aggregates its descendants' direct entries. Re-writes are idempotent: re-running an intake or lifecycle skill must not duplicate entries.
|
|
27
28
|
|
|
28
|
-
Full schema (all
|
|
29
|
+
Full schema (all 18 fields, pricing semantics, rollup math, idempotent-rewrite rules): [reference/usage-accounting.md](../reference/usage-accounting.md).
|
|
@@ -25,12 +25,13 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
25
25
|
| `run_id` | Runtime/session identifier when available; empty only when the runtime exposes no stable run id. |
|
|
26
26
|
| `provider` | Model provider name. |
|
|
27
27
|
| `model` | Model identifier. |
|
|
28
|
-
| `source` | `observed`, `estimated`, or `unavailable`. |
|
|
28
|
+
| `source` | `observed`, `estimated`, `measured-subset`, or `unavailable`. |
|
|
29
29
|
| `input_tokens` | Prompt/input tokens, or `null` when unavailable. |
|
|
30
30
|
| `cached_input_tokens` | Cached/reused input tokens, or `null` when unavailable/not exposed. |
|
|
31
31
|
| `output_tokens` | Output/completion tokens, or `null` when unavailable. |
|
|
32
32
|
| `reasoning_tokens` | Reasoning/internal tokens, or `null` when unavailable/not exposed. |
|
|
33
33
|
| `total_tokens` | Total trustworthy tokens for the entry, or `null`. |
|
|
34
|
+
| `measured_subset_tokens` | Trustworthy measured subtotal for a known subset of the run, or `null`. |
|
|
34
35
|
| `cost` | Observed or estimated cost for this entry, or `null`. |
|
|
35
36
|
| `currency` | ISO currency code when `cost` is known, otherwise `null`. |
|
|
36
37
|
| `pricing_status` | `observed`, `estimated`, `missing`, or `unavailable`. |
|
|
@@ -46,13 +47,17 @@ Each direct usage entry records one logical Lisa run or sub-run on one artifact.
|
|
|
46
47
|
|
|
47
48
|
- `observed`: the runtime supplied the usage directly. Do not replace observed counts with estimates.
|
|
48
49
|
- `estimated`: Lisa derived counts or cost from trustworthy runtime metadata plus an explicit pricing contract. Estimates are allowed only when the derivation inputs are real and attributable to the run.
|
|
50
|
+
- `measured-subset`: Lisa measured a known subset of the run, but not enough to claim a complete `total_tokens` value. Preserve the subtotal in `measured_subset_tokens`, keep `total_tokens = null`, and keep rollup totals unknown instead of treating the subset as the whole run.
|
|
49
51
|
- `unavailable`: Lisa could not obtain trustworthy usage data. Write the entry anyway with `null` token/cost fields rather than silently omitting the row.
|
|
50
52
|
|
|
51
53
|
The absence of data is never treated as zero. `null` means unknown; `0` means explicitly observed or derived zero.
|
|
52
54
|
|
|
53
55
|
For example, an unavailable Verify run still records a direct entry with `source = unavailable`,
|
|
54
56
|
`pricing_status = unavailable`, and `null` token/cost fields so downstream readers can distinguish
|
|
55
|
-
"missing telemetry" from "zero usage."
|
|
57
|
+
"missing telemetry" from "zero usage." A Plan run with measured sub-agent usage but unmeasured
|
|
58
|
+
main-loop usage records `source = measured-subset`, `measured_subset_tokens = <subtotal>`, and
|
|
59
|
+
`total_tokens = null` so the subtotal is durable without being misrepresented as the complete run
|
|
60
|
+
total.
|
|
56
61
|
|
|
57
62
|
## Pricing semantics
|
|
58
63
|
|
|
@@ -70,7 +75,7 @@ Runtime-observed cost always wins over estimates. Estimated cost never overwrite
|
|
|
70
75
|
Every visible direct entry row ends with exactly one machine-readable token:
|
|
71
76
|
|
|
72
77
|
```text
|
|
73
|
-
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
78
|
+
<!-- lisa:usage-entry entry_id=<id> flow=<flow> run_id=<run-id> provider=<provider> model=<model> source=<source> input_tokens=<n|null> cached_input_tokens=<n|null> output_tokens=<n|null> reasoning_tokens=<n|null> total_tokens=<n|null> measured_subset_tokens=<n|null> cost=<decimal|null> currency=<code|null> pricing_status=<status> pricing_source=<ref|null> artifact_ref=<ref> parent_artifact_ref=<ref-or-empty> -->
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
Field order is fixed. A reader parses the usage ledger by matching `<!-- lisa:usage-entry ` lines only; it never needs to scrape prose or table cell positions. String fields are percent-encoded before rendering and decoded after parsing, so whitespace, commas, and HTML comment terminators inside source values cannot split or truncate the token.
|
|
@@ -67,6 +67,10 @@ and artifact refs. Callers do not get to omit the "unavailable" case; when trust
|
|
|
67
67
|
missing they still pass an explicit entry with `source: unavailable` and nullable token/cost
|
|
68
68
|
fields.
|
|
69
69
|
|
|
70
|
+
When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
|
|
71
|
+
write the subtotal to `measured_subset_tokens`, and leave `total_tokens: null`. Do not coerce a
|
|
72
|
+
known subset into `total_tokens`; rollups use `total_tokens` only for complete totals.
|
|
73
|
+
|
|
70
74
|
## Return shape
|
|
71
75
|
|
|
72
76
|
Return structured output so callers can persist or log what happened without reparsing prose:
|