Repository navigation
feat(mod): load marker and cached-vs-repo status (#442, #444) - #446
Merged
Merged
Conversation
…442, #444) - cost-ledger.ts writes one {loaded, cli, mh} row per module load to cost-ledger.jsonl from the first hook call, so modules-off reads apart from loaded-but-idle (#444). - In an mh checkout, session.start shows the cached vs repo version via $.ui.status and skill.prompt toasts once per skill whose repo SKILL.md differs from the cached copy (#442). - cost-report prints 'module loaded: N of M sessions' and skips marker rows in the ledger sum. - Observer contract unchanged: every handler is wrapped and ends in next(e).
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #442, #444. Both extend the one hooks module,
hooks/mod/cost-ledger.ts.What changed
{ t, session_id, loaded: true, cli, mh }to the existingcost-ledger.jsonl, not the UI log. If modules are off, no row is written, and that missing row is the signal.module loaded: N of M sessions since the first load marker (<date>), ormodule loaded: no load marker (...)when there is none. Marker rows are kept out of the ledger sum and out of the no-finite-usd warning.plugin.jsonname matches$.plugin.name). Onsession.start, a$.ui.statusline compares the cached version ($.plugin.root) with the repo version. Onskill.prompt, a skill whose repoSKILL.mddiffers from the cached copy gets one$.ui.toastper load. The prompt text passes through unchanged.next(e). With modules off, nothing changes.docs/reference/cost-ledger-module.mdplus one line each inrepo-gotchas.md, cost-report'sSKILL.mdanddata-model.md.Evidence
claude plugin test .(CLI 2.1.289): 14 pass (8 new).tests/skills/test-cost-report.sh: 27/27 (4 new; the new checks failed before the report change).claude plugin validate .lists the new calls. The API names were checked against theclaude-code.d.tsthat 2.1.289 writes.Not done, on purpose
claude -pprobe was not run. The subagent gate blocks nested sessions. These points are checked against the d.ts only:$.plugin.rootis the folder above.claude-plugin/,skill.prompt'sskillmay or may not carry themh:prefix (the code handles both), andsession.startfires under-p. If any of them is wrong, the feature shows nothing; nothing breaks. The probe steps are incost-ledger-module.md.