@codyswann/lisa 2.222.0 → 2.222.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.
Files changed (73) hide show
  1. package/dist/utils/usage-accounting.d.ts +3 -2
  2. package/dist/utils/usage-accounting.d.ts.map +1 -1
  3. package/dist/utils/usage-accounting.js +127 -48
  4. package/dist/utils/usage-accounting.js.map +1 -1
  5. package/package.json +1 -1
  6. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  7. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  8. package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/SKILL.md +9 -1
  9. package/plugins/lisa/hooks/parity-safety-net.sh +58 -7
  10. package/plugins/lisa/rules/eager/usage-accounting.md +6 -2
  11. package/plugins/lisa/rules/reference/usage-accounting.md +42 -5
  12. package/plugins/lisa/skills/lisa-usage-accounting/SKILL.md +9 -1
  13. package/plugins/lisa-agy/plugin.json +1 -1
  14. package/plugins/lisa-agy/skills/lisa-usage-accounting/SKILL.md +9 -1
  15. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  17. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  18. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-copilot/hooks/parity-safety-net.sh +58 -7
  22. package/plugins/lisa-copilot/rules/eager/usage-accounting.md +6 -2
  23. package/plugins/lisa-copilot/rules/reference/usage-accounting.md +42 -5
  24. package/plugins/lisa-copilot/skills/lisa-usage-accounting/SKILL.md +9 -1
  25. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cursor/hooks/parity-safety-net.sh +58 -7
  27. package/plugins/lisa-cursor/rules/usage-accounting-reference.mdc +42 -5
  28. package/plugins/lisa-cursor/rules/usage-accounting.mdc +6 -2
  29. package/plugins/lisa-cursor/skills/lisa-usage-accounting/SKILL.md +9 -1
  30. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  32. package/plugins/lisa-expo-agy/plugin.json +1 -1
  33. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  43. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  47. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  48. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  53. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails-agy/plugin.json +1 -1
  58. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  63. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  68. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/src/base/hooks/parity-safety-net.sh +58 -7
  71. package/plugins/src/base/rules/eager/usage-accounting.md +6 -2
  72. package/plugins/src/base/rules/reference/usage-accounting.md +42 -5
  73. package/plugins/src/base/skills/lisa-usage-accounting/SKILL.md +9 -1
@@ -69,7 +69,10 @@ fields.
69
69
 
70
70
  When the runtime exposes only a trustworthy subtotal, callers MUST use `source: measured-subset`,
71
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.
72
+ known subset into `total_tokens`; rollups use `total_tokens` only for complete totals. The
73
+ `measured_subset_tokens` field is optional for backward compatibility with callers that construct
74
+ ordinary observed, estimated, or unavailable entries; the shared serializer normalizes omission
75
+ to `null`. A trustworthy whole-run cost remains valid independently of incomplete token telemetry.
73
76
 
74
77
  ## Return shape
75
78
 
@@ -168,6 +171,11 @@ failures into a generic "usage update failed."
168
171
  canonical `usage-accounting` rule.
169
172
  - Never append a second `## Lisa Usage` section or a second managed usage comment.
170
173
  - Never treat missing usage as zero. Callers must record explicit `source: unavailable` entries.
174
+ - Never add a measured subset to complete token totals. A mixed complete-plus-measured-subset
175
+ direct or child scope has `null` token rollups, while trustworthy whole-run cost rolls up
176
+ independently.
177
+ - Never discard the optional child-token incompleteness state parsed from an existing rollup when
178
+ `child_refs` were not refreshed. Preserve it through ordinary direct-entry rewrites.
171
179
  - Never skip rollup dedupe. Child totals are keyed by stable `entry_id`, not by child ref count.
172
180
  - Never silently drop to comments. Return `outcome: comment-fallback` so the caller can surface the
173
181
  writable surface that actually holds the ledger.