Repository navigation
fix(protocol): cli-hop 出站统一收成官方两段样板 - #641
Merged
Merged
Conversation
dofastted
commented
Oct 20, 2026
dofastted
left a comment
Owner
Author
There was a problem hiding this comment.
发版侧结论:要改(不合)
无法对本人 PR 点 REQUEST_CHANGES,以评论代替。
阻塞
formatCacheBreak未实现:本 PR 在handle-protocol.mjs新增import { …, formatCacheBreak }并调用,但cache-prefix.mjs没有该 export。unit 全挂:SyntaxError: The requested module './cache-prefix.mjs' does not provide an export named 'formatCacheBreak'(gateway failed to start)。请补 export,或改回 tip 上的内联where。- CHANGELOG「未发布」缺 #641:当前仅有 #639 行。
次要
outbound-attempt.mjs仍 import 未使用的promoteContentToBlocks。
发版建议(修好+五职绿后)
本 PR 会改线上 cli-hop 出站样板 / 缓存 / eager / thinking 默认,按常规则 须主聊单独拍板。拍板通过后建议 merge-no-tip→203,勿 tip-cut 单发。Latest/TG 仍 v1.3.202 / 24107。
cursor Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
- Add formatCacheBreak to cache-prefix.mjs for handle-protocol logging - Document PR #641 under 未发布 in CHANGELOG - Remove unused promoteContentToBlocks import from outbound-attempt Co-authored-by: ted <kuhlmangarry24@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
- crs-persona: billing + identity_cli + reporting + agent + continuation (+ leftover) - official_full vs overwrite harness expectations split by mode - web persona-template preview ids include reporting and dynamic_boundary Co-authored-by: ted <kuhlmangarry24@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
#641 strips invalid caller cache_control and restamps the last user text; thinking/redacted-only turns leave no message markers after strip. Co-authored-by: ted <kuhlmangarry24@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
- Add formatCacheBreak to cache-prefix.mjs for handle-protocol logging - Document PR #641 under 未发布 in CHANGELOG - Remove unused promoteContentToBlocks import from outbound-attempt Co-authored-by: ted <kuhlmangarry24@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
- crs-persona: billing + identity_cli + reporting + agent + continuation (+ leftover) - official_full vs overwrite harness expectations split by mode - web persona-template preview ids include reporting and dynamic_boundary Co-authored-by: ted <kuhlmangarry24@gmail.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
#641 strips invalid caller cache_control and restamps the last user text; thinking/redacted-only turns leave no message markers after strip. Co-authored-by: ted <kuhlmangarry24@gmail.com>
cursor
Bot
force-pushed
the
fix/official-cli-template
branch
from
October 20, 2026 22:10
916be28 to
7dc2da0
Compare
所有请求在前置收成身份句加调用方正文,标记不写 TTL,并去掉 eager、工具缓存标记、temperature 和 context_management。缓存标记跟到最新用户消息,尾随 role=system 保持字符串。
- Add formatCacheBreak to cache-prefix.mjs for handle-protocol logging - Document PR #641 under 未发布 in CHANGELOG - Remove unused promoteContentToBlocks import from outbound-attempt Co-authored-by: ted <kuhlmangarry24@gmail.com>
没有粘性绑定时不再用每次请求的时间戳重算出站 session。入站 device id 在剥离前写入日志,并在详情页显示。
preserveSystem 已无调用方。非法缓存标记收成官方样板,不再返回 400。
Co-authored-by: ted <kuhlmangarry24@gmail.com>
- crs-persona: billing + identity_cli + reporting + agent + continuation (+ leftover) - official_full vs overwrite harness expectations split by mode - web persona-template preview ids include reporting and dynamic_boundary Co-authored-by: ted <kuhlmangarry24@gmail.com>
#641 strips invalid caller cache_control and restamps the last user text; thinking/redacted-only turns leave no message markers after strip. Co-authored-by: ted <kuhlmangarry24@gmail.com>
Co-authored-by: ted <kuhlmangarry24@gmail.com>
第一处在 system,最后一条 user 只带 ephemeral,不再要求 ttl。
cursor
Bot
force-pushed
the
fix/official-cli-template
branch
from
October 20, 2026 22:21
db10bba to
1ed89d2
Compare
040 已被 macOS 节点平台迁移占用。
dofastted
added a commit
that referenced
this pull request
Oct 20, 2026
云端 #641 在这些提交之后合入。重放时保留本地最终形态,只留下入站 device 日志。
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.
摘要
{type: ephemeral},不写 TTL。role=system保持字符串。eager_input_streaming、工具cache_control、temperature 和 context_management。thinking display 默认 summarized。测试
node --test test/unit/cli-hop-body.test.mjs test/unit/eager-tool-streaming.test.mjsNote
Medium Risk
Changes outbound request shaping, cache markers, and tool/thinking fields on the cli-hop path, which can affect upstream acceptance, prompt caching continuity, and streaming behavior for official Claude Code traffic.
Overview
cli-hop outbound requests are normalized to match captured Claude Code wire shape instead of re-stamping persona/cache with configurable TTLs.
Every cli-hop body is rebuilt with a two-block
system(official CLI identity plus caller text), both using{ type: 'ephemeral' }withoutttl, and a single ephemeral marker on the latest user message tail. Caller markers elsewhere are cleared;temperature/top_p/top_k/context_managementare dropped; tools loseeager_input_streamingandcache_control. Thinking display follows routing and defaults tosummarizedwhen unset.Official inbound traffic gets
preserve_content_shapethrough conversion/sanitize so stringrole=systemturns and block layout stay closer to the client.eager_tool_streamingis opt-in (failover.eager_tool_streaming === true) rather than on by default. Cache stamping supports TTL-less ephemeral markers when appropriate.The cli-hop path in
handle-protocolno longer runs the extra persona rewrite panel path (panelRewriteis false); tests were updated for the new templates and defaults.Reviewed by Cursor Bugbot for commit 75c3635. Configure here.