Repository navigation
refactor: delegate session-handoff rendering to acp-kernel - #434
ranxianglei wants to merge 2 commits into
Conversation
Replaces the local renderHandoff/renderMessage/matchSession in src/export.ts with the kernel's shared implementations (acp-kernel PR #183), so the proxy and the Pi adapter no longer duplicate the handoff markdown logic. - The v3-snapshot path (s.lastMessages) now delegates the whole doc (metadata + folded/full conversation) to kernel renderHandoff. - The v2 fallback (block summaries + blockContents) is unchanged and stays byte-identical; matchSession now comes from the kernel. - Bumps acp-kernel 0.0.47 -> 0.0.49 (the release that ships the handoff exports). package-lock.json is refreshed once 0.0.49 is published on npm. Local pre-validation against acp-kernel#183's build: typecheck clean, 892/892 tests pass, build success.
[bot] 🏷 PR opened: #435 (branch Implemented exactly as described in the issue:
Verification (local, against acp-kernel#183's build
Status: blocked on acp-kernel#183 merging + acp-kernel 0.0.49 publishing (currently open/unmerged; latest stable on npm is 0.0.48). CI will be red at |
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-434Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr434.tgz
npm install -g packageThis comment is automatically updated on each push. |
|
Review vs master 3cd85b6: ❌ needs rework before merge — superseded in part by #587 (PR#587), which rewrote What still holds:
What breaks vs #587:
Rework direction (see #601): keep the host renderer for the (tracking: #601) |
Closes #601 — tracking issue for this PR.
What
Removes the duplicated session-handoff markdown logic from the proxy by delegating to the kernel's shared renderer (acp-kernel PR #183), so the proxy and
billion-context-pino longer each carry a copy ofrenderHandoff/renderMessage/matchSession(requested in ranxianglei/billion-context-pi#271).Changes (
src/export.ts)s.lastMessages) now delegates the whole doc — metadata header + folded (prune) / full conversation — to kernelrenderHandoff({coreMessages, state, full, meta}), with protocol / upstream / requests injected viameta.extraBullets.blockContentsoriginals) is unchanged and stays byte-identical.matchSessionnow comes from the kernel (label accessor =s.meta.label).acp-kernel0.0.47→0.0.49(the release that ships the handoff exports).package-lock.jsonis refreshed once0.0.49is on npm.Verification (local pre-validation against acp-kernel#183's build)
npm run typecheck— cleannpm test— 892 pass, 0 fail (incl.tests/cli-export.test.ts, which asserts the v2-fallback output is byte-identical)npm run build— successDependency / merge order
Blocked on acp-kernel#183 merging + acp-kernel 0.0.49 publishing. Until then CI is red at
npm ci(cannot resolve 0.0.49). After 0.0.49 is live, runnpm installto refresh the lockfile and the PR goes green.