Repository navigation
[PR] feat: Built-in chat prompt compression package — default compression rules for long-term companionship / multi-session m | feat: 内置 chat 提示压缩包——长期陪伴 / 多会话记忆场景的默认压缩规则(#5319) - #5320
Merged
Conversation
…on (#5319) Compress philosophy + how-to-compress rewritten for long-term companionship / multi-session memory use (people, relationships, ongoing threads, promises over code detail); only those two slots change, all other surface pieces stay at host defaults, adapters.pi mirrors them (#2335 pattern). Resolution chain becomes project > user > shipped > builtin using kernel-exported PackSource primitives — no kernel/** change (Kernel Boundary), same-name user/project files override the built-in. Docs (EN+ZH) list the new builtin name. Co-authored-by: qwen3.8-27b <agent@billion-context.local>
Owner
Author
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 同主题仅本 PR 对应的 feature request #5323(即本 PR 应关闭的 issue);#5058(陪伴类长会话 nudge 自我放大)同属「陪伴场景」家族但症状与机制均不同(nudge 放大 vs. 内置文案预设),不构成重复。 标签: 初审已发现一个必须修的问题: PR 全文(Closes 行、commit message、src/chat-pack.ts / tests / CONFIGURATION.md 注释与文档)引用的都是 #5319——但 #5319 是「OpenCode V2 ACP reports in OpenChamber」那个不相关的 open issue;真正的 feature request 是 #5323。按现状合并会把无关的 #5319 一并关掉。我会在 PR 分支上直接把引用改成 #5323(PR body + commit message + 代码/文档内引用),作为独立标注 commit。其余审查项(kernel 导出原语核对、解析链等价性、timeline 契约、双模式消费路径、CI)继续进行中。 |
This was referenced Oct 31, 2026
ranxianglei
added a commit
that referenced
this pull request
Oct 31, 2026
Fixes master red in docs-sync: PR #5320 hand-edited this generated-block line (added 'chat') without updating the website/config-reference/compress.yaml seed. Revert to exactly what the generator emits today. Note: chat IS real but belongs to the shipped-pack layer, not builtin — the durable fix is updating the yaml seed + regenerate (follow-up for #5319/#5320 owner).
ranxianglei
added a commit
that referenced
this pull request
Oct 31, 2026
Previous head conflicted (add/add on src/pack-install.ts): this branch pre-dated PR #5331, which added that file to master while the branch carried its own copy. Sandbox cannot clone full objects, so the branch is reconstructed as one clean commit on today's master via the Git data API. Contents unchanged from the reviewed work: workflows - ci-janitor: feed the sweep loop its run list (it was never wired up — zombie cancels were dead code since 10-30); add backlog breaker (starvedQueueLimit warn + starvedQueuedMaxMinutes pruning, push-to-master exempt) - concurrency groups: master-build, release, release-kernel (no-cancel), theorem (skip-lane suffix per house rules) - timeout-minutes on six workflows left on the 6h default (release 90, release-kernel 90, release-bugfix 90, release-manual 90, advisories 30, pages 30, ci-gate-plugins 30) master-reds fixed here so every gate passes - LIFECYCLE.md: register BILI_SPAWN_FINGERPRINT (#5303/#4125) and BILI_SESSION_CONTENT_STORE_PIN (#5292 phase2) - src/codex-models.ts: drop unused `export` on CodexWindowSource (zero named references; tsconfig has no declaration emit) - CONFIGURATION{,.zh-CN}.md: restore promptPack row to generator output ("chat" is host-shipped, not builtin; follow-up for #5320: add chat to website/config-reference/compress.yaml and regenerate) - src/pack-install.ts: PackInstallOptions -> internal (callers pass options structurally) latent test fixes (surfaced once gates went green) - src/launcher.ts: #4125 rewrite dropped the phrase tests/issue5103 asserts verbatim; restored - tests/store.test.ts: move fault injection to the real write point so adopt() runs before the disk sabotage
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.
(ai: sglang-gpu0/qwen3.8-27b)
Closes #5319
What changed
src/chat-pack.ts:内置chat提示压缩包——只为长期陪伴 / 多会话记忆场景重写了压缩哲学段与 how-to-compress 规则段(保「人、关系、进行中的线、承诺与偏好」,而不是代码细节);只声明这两个槽位,其余表面全部沿用宿主默认,adapters.pi镜像同一对象(照 lean 的 promptPack=lean 在代理上只改工具描述:系统提示词静默保持 default — 精简契约/召回纪律从未投递(抓包实证) #2335 模式)。src/compress-settings.ts:解析链从[project > user > builtin]变为[project > user > shipped(本包自带) > builtin],全部用 kernel 已导出的 PackSource 原语拼装;同名用户/项目文件可覆盖内置 chat。tests/chat-pack.test.ts:链顺序 project>user>shipped>builtin、用户/项目影子覆盖、listPacks 去重、buildCompressSystemPrompt端到端替换、open-objective carry-forward 关键行防漂移守卫(5/5 通过)。chat。Why
default 压缩面为文档/多轮编程调优(#5307 评测确认),陪伴型使用没有一方预设。机制早就齐备(promptPack #729/#731、三态 section 覆盖 #2335、可插拔 PackSource 链),本 PR 只加文案 + 一个宿主侧注册位。
Kernel Boundary
kernel/**零改动。pack 链设计本来就支持宿主干扩 discovery chain(kernel/src/packs.ts 头注释),无需kernel-change:声明、无需 kernel 版本 bump、不触发 human-only kernel review 层。kernel BUILTIN_REGISTRY 保持 default+lean。Config surface
无新增/改名/改语义字段:
compress.promptPack已存在且接受任意合法包名,本 PR 只是让"chat"默认可解析。未设置时行为字节级不变(identity surface);lean不受影响。双压缩模式推理
buildCompressSystemPrompt(prompts, sections)(inject.ts / preflight.ts 消费 reqSurface.promptSections)——chat 文案到达压缩模型;线上载体(acp_summary)不受影响。adapters.pi.promptSections(已镜像 ✓)。其他未消费 promptSections 的插件宿主维持其自身默认组装——与 lean 的 section 现状一致。Preflight
npm ci+npm run typecheckcleannpm run buildOK(dist-import-annotations/dist-external OK)