[codex] add summary envelopes and ghost-surface text matching
Summary
- Add SDK-owned summary report and time-series envelopes with schema/version, capabilities, normalized window metadata, bucket metadata, and
untilsupport. - Expose
summaryReport(),summaryTimeseries(), andcapabilities()through the napi crate and@relayburn/sdkESM/CJS/type facade. - Load matched user text into ghost-surface analysis so Claude/Codex slash-command invocations do not show as unused when they are active.
- Fix local native binding lookup and strengthen Node conformance coverage for the new envelope APIs.
Validation
cargo test --workspacecargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningspnpm --filter @relayburn/sdk build:napiRELAYBURN_SDK_NAPI_BUILT=1 pnpm --filter @relayburn/sdk testpnpm --filter @relayburn/sdk test:bundlepnpm run testgit diff --check
Notes
- Left pre-existing macOS edits in
apps/macos/Sources/Burn/BurnApp.swiftandBurnLedger.swiftunstaged and out of this PR. - Left local relay/planning scratch directories untracked and out of this PR.
[!NOTE]
Medium Risk
Changes public SDK/Node report APIs and inclusive time-window semantics; ghost-surface findings behavior shifts when prompts exist only in content, not tool calls.
Overview
Adds versioned summary report contracts for apps and presenters: summaryReport / summaryTimeseries envelopes carry schema name/version, capability flags, and a normalized query window (since, inclusive until, optional bucket width). Whole-second until values are widened to the end of that second so millisecond ledger rows are not dropped; bucketed summary/compare paths honor until for the partition end and reject zero bucket width.
Node (@relayburn/sdk) exposes summaryReport(), summaryTimeseries(), and capabilities() via a new napi module; BigIntPromoting moves into its own crate module and also promotes u64 counters under fidelity, report, timeseries, and bucket subtrees.
Hotspots ghost-surface findings now load user prompt text from the ledger content sidecar (timestamp-aligned to selected turns) so Claude/Codex slash-command invocations count as used even when they never appear as tool calls.
Reviewed by Cursor Bugbot for commit 7fef3a792f6ad9b02535ea753a2f9bf86eefbe54. Bugbot is set up for automated code reviews on this repo. Configure here.