perf(agent-runtime): isolate leaf capability closures - #2275
Merged
limityan merged 1 commit intoAug 14, 2026
Conversation
Split DeepResearch and native Hook settings from the full portable runtime, close all direct consumer feature profiles, and preserve provider-owned workspace IO semantics. BREAKING CHANGE: Rust Runtime SDK v6 embedders must explicitly enable the agent-runtime feature; DeepResearch report helpers now require an injected WorkspaceFileSystem.
limityan
marked this pull request as ready for review
August 14, 2026 03:13
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.
背景
bitfun-agent-runtime的空默认构建此前仍等同完整 Runtime。DeepResearch 纯编号与 Hook 设置解析等窄 consumer 会被迫编译 Session、Tool、Runtime Services 和进程执行能力;Services Integrations 的deep-research/hook-import也通过完整 Agent Runtime 继承无关闭包。本 PR 按真实 owner 在同一 crate 内切分源码和依赖,不新增 crate、transport、兼容
fullumbrella、CI job 或 workspace package。变更
default、deep-research、native-hook-settings、native-hook-runtime和完整agent-runtime。WorkspaceFileSystem,不再把 Remote SSH 路径交给 Windows host 文件系统探测。PathBuf语义,Remote SSH 对/、~、~/repo、相对 root 和.保持 POSIX。std::io::Error/PathBuf并保留ErrorKind。编译图
按
normal,build的版本化 package instance 去重,target 为 Windows x86_64、macOS arm64、Linux x86_64:agent-runtimeproduct-full这里报告依赖图和 focused-test 输入,不宣称完整产品 wall-clock 提速。
Cargo.lock字节不变,无新增、升级或降级 package;.github/**不变。兼容边界
bitfun-agent-runtime/agent-runtime;启用后原sdk路径和运行行为保持不变。run_for_session_workspace/try_renumber_research_report现在要求注入WorkspaceFileSystem,用于消除远程路径向宿主文件系统回退。这是有意的 Rust source migration。WorkspaceFileSystem::join_path是带默认实现的 additive port;现有本地 provider 无需改写,Remote provider 显式覆盖路径方言。验证
node --test scripts/check-core-boundaries.test.mjs:119/119node scripts/check-core-boundaries.mjscargo test --locked -p bitfun-agent-runtime --no-default-features --features agent-runtime,deep-research --lib --testscargo test --locked -p bitfun-services-integrations --no-default-features --features deep-research --lib deep_research::tests::cargo check --locked -p bitfun-core --no-default-features --features product-fullcargo check --locked -p bitfun-agent-runtime --no-default-features --features agent-runtime --example sdk_minimalcargo metadata --locked --offline --no-depspnpm run check:repo-hygiene本地未连接真实 SSH/SFTP/container,也未在 Windows 主机执行 macOS 编译;这些平台集成继续由现有 CI 验证,不新增流水线检查。