Repository navigation
refactor(packs): consume acp-kernel 0.0.66 pack layer; delete local src/packs - #404
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-404Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr404.tgz
pi install ./packageThis comment is automatically updated on each push. |
…store PackSurface signature #403 landed the kernel-pack refactor but its mergeSurface built promptSections only from adapters.pi + inline, silently dropping the shared section keys the kernel sanitizer keeps at the generic top level (acpTags/tools/summariesInContext) — a behavior regression vs pre-refactor and vs the documented merge semantics. This aligns the implementation with the intended design: - promptSections merge: inline > adapters.pi > sanitized generic top level - mergeSurface(PackSurface | null) signature restored (pre-refactor contract; #403 had changed it to Pack) - re-export kernel defaultPackSources as-is instead of a local cwd wrapper - tests: port home/cwd acp.json precedence test (with USERPROFILE override) from #403; add pi-extras sanitization coverage lost when piAdapterSurface was removed; assert shared-key retention through mergeSurface
f0e8fcf to
9dac793
Compare
…nce; add changelog entry CONFIGURATION.md (+zh-CN) Prompt Packs section now documents the kernel-owned mechanism, the adapters.pi sub-schema (promptSections 13-key tri-state, toolExtras promptSnippet/promptGuidelines, delegatePrompt), and the three-tier merge precedence including generic top-level shared section keys. CHANGELOG entry for the kernel-pack sink closes #401.
9dac793 to
88b12eb
Compare
[bot] 🏷 PR Review #404 — rebased onto master, delta verified, ready for human merge. Duplicate screening: this PR is a superseded-twice situation, not a clean duplicate. It shares base Actions taken on the PR branch (pushed as 2 commits; head is now
Bug found in the merged #403 code — this is what makes the delta worth landing: #403's promptSections: { ...pi.promptSections, ...(inline.promptSections ?? {}) }The kernel sanitizer keeps shared section keys at the generic top level ( Verification (run on the pushed tree):
Final diff vs master: exactly 6 files, −42 lines net. I cannot merge — merges are human-only. Please review and merge when ready: #404 中文摘要:修复了 #403 已合并代码中 |
|
队列清理 #484:核心已落 master —— |
|
Closing as landed: the code half shipped via master |
Status — rebased onto master (supersedes original head f0e8fcf)
The original head duplicated #403, which merged 5 seconds before this PR was opened (same base
fbbeb4c, same goal). It is now rebased onto current master, which already carries the kernel-pack refactor (incl. theacp-kernel0.0.65→0.0.66 pin and lockfile). What remains is the genuine delta below.Changes (vs current master)
mergeSurfacehonors generic top-level shared sections. The merged refactor(packs): consume acp-kernel 0.0.66 pack API #403 implementation builtpromptSectionsonly fromadapters.pi+ inline, silently dropping the shared section keys the kernel sanitizer keeps at the generic top level (acpTags/tools/summariesInContext) — a behavior regression vs pre-refactor and a contradiction of the documented merge semantics. Now:inline > adapters.pi > sanitized generic top level.mergeSurface(PackSurface | null)signature (refactor(packs): consume acp-kernel 0.0.66 pack API #403 had changed it toPack; call sites pass.surface).defaultPackSources(opts)as-is instead of a local cwd wrapper.tests/prompt-pack.test.ts, now 14): ported refactor(packs): consume acp-kernel 0.0.66 pack API #403's home/cwdacp.jsonprecedence test (withUSERPROFILEoverride for Windows); added pi-extras sanitization coverage (bad types dropped, unknown tools dropped) that was lost whenpiAdapterSurfacewas removed; assert shared-key retention throughmergeSurface.adapters.pisub-schema (13-key tri-state promptSections, toolExtras promptSnippet/promptGuidelines, delegatePrompt), and the three-tier merge precedence; CHANGELOG entry added.Behavior notes (documented)
tier2,whenToCompress, …) must live underadapters.pi.promptSections— the kernel sanitizer only keeps shared keys at top level and silently drops the rest. Same for pi-only tool fields:promptSnippet/promptGuidelinesbelong inadapters.pi.toolExtras(top-leveltoolPromptskeepsdescription+paramDescriptionsonly).toolPromptsno longer filters by tool name (unknown names likebashare kept in the surface); consumers read only the four ACP tools, so no functional impact.delegatePromptis no longer a top-level pack-file field — it lives atadapters.pi.delegatePrompt.Lean behavior is identical to before (aligned recall rules from #399/#400, null sections, tool one-liners).
Verification
npm cion a clean tree installs exactlyacp-kernel@0.0.66✅npm run typecheck✅npm test✅ (786 pass / 0 fail / 6 skip; 792 total)npm run build✅ (kernel pack code inlined in dist)Fixes #401 (already closed by #403's merge; kept for traceability)