Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/MCP.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ Cargo all-packages provenance is a bounded package-selection witness, not a comp

For ordinary portable Rust/Go builds, prefer `project_build`. It accepts only an exact registered `project`, optional project-relative `cwd`, an optional `auto` / `rust` / `go` adapter hint, optional portable `scope` selecting either bounded `packages` (1..8 entries) or `all_packages=true`, and total `timeout_secs`. The Runner resolves the nearest unambiguous recipe and owns canonical argv: Rust maps explicit packages to repeated `-p` selectors and all-packages to `cargo build --workspace` only after proving the effective Cargo workspace root is the registered Project root; Go maps explicit package patterns directly and all-packages to `go build ./...`. Go project builds execute with Runner-owned `GO111MODULE=on` and `GOWORK=off`; full `go.work` workspace semantics are outside the v1 gateway rather than inherited implicitly from the Runner host. The request cannot provide an executable, argv, shell, script, release/profile/target/features, native workspace/exclude flags, offline/network policy, or artifact-discovery contract. Portable all-packages requests require the additive `project_all_packages_v1` Runner capability. Node/Python recipes fail closed as unsupported in v1.

Both gateways optionally accept `dependency_policy: {"mode":"locked"}`. This is a portable dependency-resolution guarantee, not a literal cross-ecosystem flag contract: Rust build/check/test use Cargo `--locked`, while Go build/vet/test use `-mod=readonly`. The policy tells the adapter not to repair project dependency selection state in order to make the operation succeed; it does **not** disable registry/module/toolchain network access. Offline/network policy remains a separate #599 extension. `project_validate(action="format_check")` rejects the dependency policy instead of silently ignoring it. Policy-bearing planning and typed Job admission both require the additive `project_dependency_policy_v1` Runner capability. Locked validation derives a distinct durable validation target identity, while requests that omit the policy preserve the historical argv and identity.
Both gateways optionally accept `dependency_policy: {"mode":"locked"}`. This is a portable dependency-resolution guarantee, not a literal cross-ecosystem flag contract: Rust build/check/test use Cargo `--locked`, while Go build/vet/test use `-mod=readonly`. The policy tells the adapter not to repair project dependency selection state in order to make the operation succeed; it does **not** disable registry/module/toolchain network access. Offline/network policy is tracked as an additive lifecycle extension in #962. `project_validate(action="format_check")` rejects the dependency policy instead of silently ignoring it. Policy-bearing planning and typed Job admission both require the additive `project_dependency_policy_v1` Runner capability. Locked validation derives a distinct durable validation target identity, while requests that omit the policy preserve the historical argv and identity.

`project_build` requires the additive `project_build_v1` Runner capability at both planning and typed Job admission. Go project-build Job admission additionally requires `project_go_single_module_v1`. Admission replans the registered project/root, recipe, manifest/lock provenance, package scope, and canonical invocation; the worker rechecks that same plan after any local queue wait, before native process execution. A stale plan fails as `not_started` and releases its Job slot rather than silently rebuilding or executing the outdated intent. Long builds keep the same durable Job and return the ordinary sparse pending continuation; pending never authorizes retry or redispatch. The closed gateway bounds WebCodex's command authority but is not an OS sandbox: Cargo/Go build logic and project build scripts may still have their own filesystem or network effects. Existing lower-level execution tools remain explicit escape hatches for build forms outside this v1 contract.

Expand All @@ -447,7 +447,7 @@ format_check. Any supplied test block requires the additive
`project_validation_test_options_v1` Runner capability; it is checked at both
planning and Job admission. Old calls without that block retain their old wire
and execution defaults. See [project-validation test options](implementation/project-validation-test-options.md)
for exact scope, identity, and remaining #599 work.
for exact scope and identity; additive lifecycle extensions are tracked in #962.

Adaptive Runtime may expose common tools directly and long-tail tools through `call_runtime_tool`. Direct versus gateway exposure never changes schema validation, OAuth scope, Project authority, permission policy, Runner capability checks, Session fences, or effects.

Expand Down
4 changes: 2 additions & 2 deletions docs/MCP.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Cargo all-packages provenance 是有界的 package-selection witness,并非完

普通的 portable Rust/Go 构建优先使用 `project_build`。它只接受精确 registered `project`、可选的 project-relative `cwd`、可选的 `auto` / `rust` / `go` adapter hint、portable `scope`(有界 `packages` 1..8 项,或 `all_packages=true`,二者不可同时出现)以及总 `timeout_secs`。Runner 解析最近且无歧义的 recipe 并拥有 canonical argv:Rust 的显式 packages 使用重复 `-p` selector,all-packages 只有在 effective Cargo workspace root 与 registered Project root 完全一致时才映射为 `cargo build --workspace`;Go 的显式 package pattern 直接传入,all-packages 映射为 `go build ./...`。Go project build 由 Runner 固定以 `GO111MODULE=on`、`GOWORK=off` 执行;完整 `go.work` workspace 语义不属于 v1 gateway,也不会从 Runner host 隐式继承。请求不能携带 executable、argv、shell、script、release/profile/target/features、原生 workspace/exclude flag、offline/network 策略或 artifact discovery contract;portable all-packages request 额外要求 additive `project_all_packages_v1` Runner capability;v1 检测到 Node/Python recipe 时 fail closed。

两个 gateway 都可选接受 `dependency_policy: {"mode":"locked"}`。这是 portable 的依赖解析保证,而不是宣称不同生态的原生 flag 完全等价:Rust build/check/test 映射为 Cargo `--locked`,Go build/vet/test 映射为 `-mod=readonly`。它要求 adapter 不得为了让本次操作成功而修复或改写项目级依赖选择状态,但**不**表示关闭 registry/module/toolchain 网络访问;offline/network policy 仍是 #599 后续独立扩展。`project_validate(action="format_check")` 会拒绝该 policy,而不是静默忽略。携带 policy 的 planning 与 typed Job admission 都要求 additive `project_dependency_policy_v1` Runner capability。locked validation 使用独立的 durable validation target identity;省略 policy 的请求保持原有 argv 与 identity。
两个 gateway 都可选接受 `dependency_policy: {"mode":"locked"}`。这是 portable 的依赖解析保证,而不是宣称不同生态的原生 flag 完全等价:Rust build/check/test 映射为 Cargo `--locked`,Go build/vet/test 映射为 `-mod=readonly`。它要求 adapter 不得为了让本次操作成功而修复或改写项目级依赖选择状态,但**不**表示关闭 registry/module/toolchain 网络访问;offline/network policy 由 #962 作为增量 lifecycle 扩展跟踪。`project_validate(action="format_check")` 会拒绝该 policy,而不是静默忽略。携带 policy 的 planning 与 typed Job admission 都要求 additive `project_dependency_policy_v1` Runner capability。locked validation 使用独立的 durable validation target identity;省略 policy 的请求保持原有 argv 与 identity。

`project_build` 在 planning 与 typed Job admission 两处都要求 additive `project_build_v1` Runner capability;Go project-build Job 准入还额外要求 `project_go_single_module_v1`。Job 准入会重新规划 registered project/root、recipe、manifest/lock provenance、package scope 与 canonical invocation;若经过本地排队,worker 会在原生进程执行前再次核验同一个计划。计划 stale 时以 `not_started` 拒绝并释放 Job 槽位,不会静默重建或执行过期意图。长构建继续使用同一个 durable Job,并返回普通的 sparse pending continuation;pending 绝不授权 retry/redispatch。这个 closed gateway 限制的是 WebCodex 自己的命令权限,并不是 OS sandbox:Cargo/Go 构建逻辑以及项目 build script 仍可能产生自己的文件系统或网络副作用。超出 v1 contract 的构建继续显式使用 lower-level execution 工具。

Expand Down Expand Up @@ -403,7 +403,7 @@ Go/Python 保留有意义的空格;空字符串或省略表示不加过滤。
长任务仍观察同一个 Job,不能因 Host 中断而重跑。

构建产物、修改源码的格式化、lint、Node 与其他 Python 生产适配器,以及更广泛的
workspace/依赖策略仍是 #599 后续工作;现有 cargo_*、go_test 与显式进程工具保留。
workspace/exclude、offline/network 策略由 #962 跟踪;现有 cargo_*、go_test 与显式进程工具保留。

### ChatGPT 文件桥接

Expand Down
4 changes: 2 additions & 2 deletions docs/implementation/project-validation-test-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ That validation slice deferred `project_build`. The current tree now has a
separate Rust/Go `project_build` v1 gateway with Runner-owned recipe planning,
typed `StartBuild`, manifest/lock provenance, and same-Job admission fencing.
Build profile/target/artifact identity, mutating `project_format`, lint,
production Node/Python adapters, workspace/exclude and locked/offline dependency
policies remain separate #599 work. Existing lower-level Cargo/Go tools retain
production Node and additional Python adapters, workspace/exclude, and offline/network
policies are tracked as additive lifecycle extensions in #962. Existing lower-level Cargo/Go tools retain
their options and default behavior. No claim of complete CLI parity is made.

## Request and planning
Expand Down
Loading