Skip to content

refactor(agent-runtime): own prompt cache and registry facts#1036

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/agent-runtime-sdk-deep-migration
Jun 2, 2026
Merged

refactor(agent-runtime): own prompt cache and registry facts#1036
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/agent-runtime-sdk-deep-migration

Conversation

@limityan
Copy link
Copy Markdown
Collaborator

@limityan limityan commented Jun 2, 2026

背景

关联 #970。PR-A 的目标是迁移无 IO、无副作用、可通过 contract tests 证明等价的 Agent Runtime SDK owner 事实,同时保留 core 旧路径兼容。

变更内容

  • 将 prompt cache schema、policy、identity、DTO、scope key 和 in-memory store 迁入 bitfun-agent-runtime::prompt_cache
  • 将 shared coding mode profile/context policy、mode presentation rank、SubAgentSource、source kind / presentation rank 迁入 bitfun-agent-runtime::agents
  • bitfun-core 保留 prompt cache、agent mode module、registry DTO 的旧路径 re-export;session persistence、cold restore、agent definition loading、custom subagent IO、scheduler lifecycle、event delivery、permission handler 继续留在 core。
  • 更新 check-core-boundaries,防止 prompt cache、shared mode profile/context、mode/source presentation、SubAgentSource owner 定义回流到 core。
  • 将计划文档收敛为 PR-A / PR-B / PR-C 三段大 PR,并同步 AGENTS 边界说明。

功能与边界影响

  • 不修改产品命令、UI、默认 feature、release / fast build 脚本或产品能力集合。
  • 不迁移 concrete scheduler lifecycle、event delivery / post-turn hook、permission Tool handler、custom subagent file IO。
  • bitfun-agent-runtime 依赖仍保持轻量:bitfun-runtime-portsdashmapserdeserde_json

验证

  • node scripts/check-core-boundaries.mjs
  • pnpm run check:repo-hygiene
  • cargo test -p bitfun-agent-runtime -- --nocapture
  • cargo test -p bitfun-core agentic::agents -- --nocapture
  • cargo test -p bitfun-core prompt_cache -- --nocapture
  • cargo check -p bitfun-core --features product-full

@limityan limityan force-pushed the yanzhn/agent-runtime-sdk-deep-migration branch from c5535ed to 5c34b03 Compare June 2, 2026 07:27
@limityan limityan merged commit c65b9f3 into GCWing:main Jun 2, 2026
4 checks passed
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