You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #553 (group 2 — depends on burn #557 backend; parallel with #558/#561).
Problem
@relayburn/sdk is a napi-rs facade (crates/relayburn-sdk-node → packages/sdk-node, prebuilt @relayburn/sdk-<platform> packages) and @relayburn/mcp sits on top of it. The Node surface exposes no reader/parser API (packages/sdk-node/src/index.d.ts is verbs only: ingest, writePendingStamp, summary, hotspots, …), and IngestOptions is { sessionId?, harness?: 'claude-code'|'codex'|'opencode', ledgerHome? } — it does not expose IngestRoots, so nothing in JS needs to change semantically. What changes is the build:
The ai-hist Rust crate links statically into relayburn-sdk-node, so no second native addon is needed and ai-hist-native (relayhistory's own napi package) must not become a dependency — a JS consumer that also installs ai-hist would otherwise load two SQLite copies against the same DB file.
Both crates bundle SQLite (rusqlite bundled); one binary, one SQLite.
CI: extend napi-build.yml/cli-build.yml so every platform artefact runs burn --ledger-path <tmp> ingest with RELAYBURN_SOURCE=relayhistory against a corpus fixture HOME and asserts appendedTurns > 0; extend verify-publish.yml accordingly.
@relayburn/mcp: no tool changes; add a test that burn mcp-server over a relayhistory-backed ledger returns the same summary as the builtin ledger (fixture).
Docs: packages/sdk-node/README + index.d.ts JSDoc for the new options; state that @relayburn/sdk does not depend on ai-hist-native.
Acceptance
npm ls in a project with both @relayburn/sdk and ai-hist shows no shared native package; both open the same ai-history.db sequentially without error (WAL, read-only in burn).
All platform artefacts pass the ingest smoke under the relayhistory backend.
Part of #553 (group 2 — depends on burn #557 backend; parallel with #558/#561).
Problem
@relayburn/sdkis a napi-rs facade (crates/relayburn-sdk-node→packages/sdk-node, prebuilt@relayburn/sdk-<platform>packages) and@relayburn/mcpsits on top of it. The Node surface exposes no reader/parser API (packages/sdk-node/src/index.d.tsis verbs only:ingest,writePendingStamp,summary,hotspots, …), andIngestOptionsis{ sessionId?, harness?: 'claude-code'|'codex'|'opencode', ledgerHome? }— it does not exposeIngestRoots, so nothing in JS needs to change semantically. What changes is the build:ai-histRust crate links statically intorelayburn-sdk-node, so no second native addon is needed andai-hist-native(relayhistory's own napi package) must not become a dependency — a JS consumer that also installsai-histwould otherwise load two SQLite copies against the same DB file.rusqlite bundled); one binary, one SQLite..github/workflows/napi-build.yml/cli-build.ymlmust still build (glibc floor, musl, Windows — burn Add Windows targets to napi sdk-node + CLI binary distribution #359 is open for Windows).pnpm run test:bundle(esbuild smoke) must keep passing.Scope
IngestOptionsgainssource?: 'builtin' | 'relayhistory'andhistoryDbPath?: string(maps toStoreOptions.db_path; default = relayhistory's own default path resolution incl.AI_HIST_DB).LedgerOpenOptionsgains the same soLedger.opencan pin a backend for the process.writePendingStamp.harnesstype widened per [G3] Harness expansion through relayhistory: Cursor and Grok in burn (SourceKind, pricing, TOOL_ALIASES, overhead mapping, fidelity policy) and collector-backlog transfer #560.Errorvariants (SyncLocked,WatermarkAheadOfStore,SourceMismatch, database-open failure) as@relayburn/sdkerror classes with codes, alongside the existing ledger errors.relayhistory-sourcefeature in the napi and CLI release builds (feature stays off for the plaincargo builduntil [G3] Cutover: relayhistory becomes the default and only source; delete the harness readers, walkers, cursors and fs watcher; ship as a major release #562); verify binary size delta and startup time; document inpackages/sdk-node/CHANGELOG.md.napi-build.yml/cli-build.ymlso every platform artefact runsburn --ledger-path <tmp> ingestwithRELAYBURN_SOURCE=relayhistoryagainst a corpus fixture HOME and assertsappendedTurns > 0; extendverify-publish.ymlaccordingly.@relayburn/mcp: no tool changes; add a test thatburn mcp-serverover a relayhistory-backed ledger returns the samesummaryas the builtin ledger (fixture).packages/sdk-node/README+index.d.tsJSDoc for the new options; state that@relayburn/sdkdoes not depend onai-hist-native.Acceptance
npm lsin a project with both@relayburn/sdkandai-histshows no shared native package; both open the sameai-history.dbsequentially without error (WAL, read-only in burn).pnpm run testandpnpm run test:bundlegreen.Out of scope
Default flip (#562).