Skip to content

refactor(host-internal): LSP 宿主实现迁入 host-internal 并收口 agent-core 契约#70

Merged
N123999 merged 5 commits into
mainfrom
refactor/lsp-host-internal
Jun 5, 2026
Merged

refactor(host-internal): LSP 宿主实现迁入 host-internal 并收口 agent-core 契约#70
N123999 merged 5 commits into
mainfrom
refactor/lsp-host-internal

Conversation

@N123999

@N123999 N123999 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 将 LSP 宿主实现(TLS 进程、PATH 探测、文档同步、写后 append、workspace cache)从 agent-core 迁至 @spirit-agent/host-internal/lspagent-core/lsp 仅保留工具契约与诊断格式化。
  • Desktop 与 CLI 消费者改从 host-internal 导入 LspService 等实现;CLI host-bridge 经 CliHostInternalModule 动态注入 LSP,避免 agent-core 静态依赖 host-internal。
  • vscode-jsonrpc / vscode-languageserver-protocol 依赖与 NOTICE 归属 host-internal;新增 windows-path.ts 避免依赖 agent-core 内部路径。
  • 更新边界文档,明确 LSP 契约 vs 宿主实现分层。

Test plan

  • npm run build(agent-core + host-internal + desktop)
  • npm --prefix packages/host-internal run test:lsp(10/10)
  • agent-core LSP 契约测试(format-diagnostics、tool-request、host-tools-lsp-ask,7/7)
  • npm --prefix apps/desktop run test:host(116/116,含 lsp-snapshot 与 lspWriteDiagnostics)
  • npm --prefix packages/host-internal run smoke:lsp

N123999 added 5 commits June 5, 2026 07:57
将 TLS 连接、PATH 探测、文档同步与写后 append 从 agent-core 迁至
host-internal/lsp;agent-core 仅保留工具契约与格式化;CLI bridge 经
host-internal 动态绑定 LSP 能力。
将 service-lsp 工作区缓存/dispose 逻辑迁至 host-internal/lsp/workspace-cache,
Desktop service 改从 @spirit-agent/host-internal/lsp 引用。
agent-core/lsp 现仅含 types、constants、tool-definitions、tool-request 与
format-diagnostics;jsonrpc 依赖已移至 host-internal,NOTICE 同步重生成。
CLI bridge 通过 CliHostInternalModule 注入 LspService 与 write-append;
agent-core smoke:lsp 脚本转发至 host-internal。
全量 build、host-internal LSP 单测、agent-core 契约测试、desktop test:host
与 smoke:lsp 均已通过;NOTICE 中 jsonrpc 归属 host-internal。
@N123999

N123999 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit acbd00c. Configure here.

@N123999 N123999 merged commit e19b78d into main Jun 5, 2026
1 check passed
@N123999 N123999 deleted the refactor/lsp-host-internal branch June 5, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant