Repository navigation
feat(ptc): support Python through a unified script runtime - #3635
Open
Raing5Days wants to merge 2 commits into
Open
Raing5Days wants to merge 2 commits into
Raing5Days wants to merge 2 commits into
Conversation
Raing5Days
marked this pull request as ready for review
October 30, 2026 13:42
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.
Summary
Closes #3625
RunCode增加可选language: "python",未指定语言仍默认执行 TypeScript。ScriptPtcRuntime,共享工具 RPC、超时、输出限制及进程树取消;保留NodePtcRuntime兼容别名。Type and Areas
Type: Feature / refactor / test / docs
Areas: Rust services、Core 工具管线、tool contracts、Desktop 文档、Web UI 国际化与能力目录。
Motivation / Impact
Python PTC 不再依赖 Node.js,可使用 CPython 3.8+ 编写异步函数体,通过
await tools.Name({...})、tools[name]({...})和asyncio.gather调用工具。TypeScript 仍要求 Node.js 22.6+,旧请求与配置无需迁移。Verification
以下命令已在本地 Windows 执行通过:
cargo test --locked -p openbitfun-services-integrations --no-default-features --features ptc-runtime,remote-ssh-concrete --lib ptc_runtime::tests:: -- --nocapture— 15 passed,无解释器缺失跳过;覆盖 Python 并发、延迟工具、异常、UTF-8、输出限制、CPU-bound 超时、取消、权限拒绝、未完成嵌套调用清理、离线 SSH 不回退本机及 Node 回归。cargo test --locked -p openbitfun-agent-tools --no-default-features --lib ptc::tests::— 10 passed。cargo test --locked -p openbitfun-core --no-default-features --features ptc-runtime --lib agentic::tools::product_runtime::— 39 passed。cargo test --locked -p openbitfun-core --no-default-features --features ptc-runtime --lib ptc_— 10 passed,包含默认 TypeScript / Python 完整工具管线与旧请求兼容性。pnpm run fmt:rs— passed。node scripts/check-core-boundaries.mjs— passed。node scripts/check-repo-hygiene.mjs— passed(未运行整个 repo-hygiene umbrella)。pnpm run capabilities:generate/pnpm run capabilities:check— passed。pnpm run i18n:audit— passed,0 warnings;通过NODE_PATH复用相邻工作区已安装的依赖,未修改依赖或锁文件。git diff --cached --check— passed。未执行 Desktop GUI、真实 SSH、Peer Device、Remote Control 或 Detached Dispatch 端到端验证。远程验证仅覆盖 SSH launcher 编译和离线目标不得回退本机的契约测试,不将本地测试视为远程行为证明。
Reviewer Notes
typescript_sdk,新增input_schema/output_schema;未变更持久化配置形状。Checklist
Generated with OpenBitFun