feat: add stable stream IDs and deploy-time OpenCode LSP toggle#87
Merged
liujuanjuan1984 merged 8 commits intomainfrom Feb 15, 2026
Merged
feat: add stable stream IDs and deploy-time OpenCode LSP toggle#87liujuanjuan1984 merged 8 commits intomainfrom
liujuanjuan1984 merged 8 commits intomainfrom
Conversation
Collaborator
Author
|
补充提交已推送到当前 PR(
回归结果保持通过:
|
Collaborator
Author
|
补充提交已推送(
回归保持通过:
|
Collaborator
Author
|
补充提交已推送(
回归保持通过:
|
Collaborator
Author
|
补充提交已推送(
回归保持通过:
|
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.
背景
本 PR 汇总了三类改动:
message_id/event_id语义;关联 Issues
提交概览
chore提交,对应 [chore] 清理冗余与重复实现(stream 提取、payload 判别、测试脚手架) #86)。feat: 提供稳定消息级与事件级 ID(#88)。feat: 部署默认关闭 LSP + 精简流元数据(#89 #90)。按模块变更
1. 流式协议与事件元数据(
src/opencode_a2a_serve/agent.py)message_id回退策略(<task_id>:<context_id>:assistant)。event_id(命名空间 +sequence)。metadata.opencode.event_type。last_chunk仅在true时输出,省略false以减少冗余字段。2. App 层请求解析与日志判别去重(
src/opencode_a2a_serve/app.py)3. OpenCode 文本提取逻辑复用(
src/opencode_a2a_serve/text_parts.py、src/opencode_a2a_serve/opencode_client.py、src/opencode_a2a_serve/jsonrpc_ext.py)parts -> text行为。4. 部署参数与启动行为(
scripts/deploy.sh、scripts/deploy/setup_instance.sh、scripts/deploy/run_opencode.sh)opencode_lspCLI 参数并写入实例配置。OPENCODE_LSP=false。OPENCODE_CONFIG_CONTENT时,自动注入最小配置:{"$schema":"https://opencode.ai/config.json","lsp":<true|false>}OPENCODE_CONFIG_CONTENT,保持外部配置优先。5. 文档同步(
docs/deployment.md)opencode_lsp参数、默认值与使用示例。OPENCODE_LSP行为与优先级。6. 测试体系收敛(
tests/helpers.py及多测试文件)_settings/RequestContext/Dummy*Client样板。message_id/event_id的关键断言。验证
bash -n scripts/deploy.sh scripts/deploy/run_opencode.sh scripts/deploy/setup_instance.shuv run pre-commit run --all-filesuv run pytest结果:均通过(
60 passed)。风险与边界
#89的覆盖主要在实时流事件标识与元数据收敛;extensions 历史路径与实时路径的全链路一致性仍建议在联调中继续验证。