Repository navigation
Conversation
Advertise the computer tool's Gateway target only when the resolved paired surface reports a configured Gateway provider. With configured: false, offer target: node and point guidance at omitted targeting for the sole paired node; the explicit-Gateway error now names the paired-node retry instead of asking for an unwanted provider.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
|
Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
1 similar comment
|
Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
…178783) Omit the Gateway computer target when prepared capabilities report no configured Gateway desktop. Share a node-only target scope across schema, guidance, bindings and cache identity, preserving configured and session-owned desktop behavior. Closes #178604 Supersedes #178744 Validation: schema and guidance regressions fail on the baseline; all 91 focused tests pass, including routing and prompt-prefix stability. The exact-head CI failure in run 40376678279 is the unrelated ReplyOperation fixture error reproduced by scheduled main run 40380874869 and subsequently fixed by #184907. Live-proof scope is recorded in the PR. Co-authored-by: HeZ2z <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…penclaw#178783) Omit the Gateway computer target when prepared capabilities report no configured Gateway desktop. Share a node-only target scope across schema, guidance, bindings and cache identity, preserving configured and session-owned desktop behavior. Closes openclaw#178604 Supersedes openclaw#178744 Validation: schema and guidance regressions fail on the baseline; all 91 focused tests pass, including routing and prompt-prefix stability. The exact-head CI failure in run 40376678279 is the unrelated ReplyOperation fixture error reproduced by scheduled main run 40380874869 and subsequently fixed by openclaw#184907. Live-proof scope is recorded in the PR. Co-authored-by: HeZ2z <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes #178604.
On a host whose Gateway has no computer provider configured and whose only screen belongs to one paired node advertising
computer.actandscreen.snapshot, thecomputertool surface still advertisedtarget: "gateway" | "node"and listed "the Gateway desktop" first. Models opened desktop turns withtarget: "gateway";resolveComputerBindingthen threw "Gateway computer is unavailable; enable its computer provider and desktop session" before node discovery, so desktop turns started with a recoverable failed call. Only the retry withouttargetreached the paired node.Solution
computer-tool-schema.ts: thetargetenum and description now derive from the resolved Gateway computer status that already travels with the prepared paired surface. Whenconfigured: false, the schema advertises onlytarget: "node"and states thattarget: "gateway"is unavailable. A configured or unknown status keeps both targets, preserving remote/override callers and hand-built tools. The cached-schema key includes the new flag.computer-tool-guidance.ts: guidance tells the model to omittargetfor automatic routing, and when the Gateway has no provider it describes the paired node instead of the Gateway desktop.computer-tool-bindings.ts: an explicittarget: "gateway"against an unconfigured Gateway now reports the missing provider and names the paired-node retry (Omit target, or use target: node). Explicit host selection is still never redirected silently.docs/nodes/computer-use.md: documents the selector behavior.The schema depends only on
configured(a config/provider-lifecycle fact already resolved for the turn byloadPairedComputerUseAvailabilityForSurface), not on volatile readiness. The tool surface was already rebuilt per turn from those owner-held facts, so this does not introduce a new prompt-cache input class.Impact
target: "gateway"keeps its documented semantics: configured-but-unavailable reports the provider error; unconfigured now points at the paired-node recovery instead of telling the operator to enable an unwanted provider.Evidence
Base
bbc5e3a7c(new tests applied, fix absent):computer-tool.schema.test.tsnew case failed:properties.target.enumexpected["node"], received["gateway","node"].computer-tool-guidance.test.tsnew case failed: the description still began "Control the Gateway desktop, ..." instead of naming the unconfigured Gateway.With the fix:
pnpm test src/agents/tools/computer-tool.schema.test.ts src/agents/tools/computer-tool.gateway.test.ts src/agents/tools/computer-tool-guidance.test.ts --maxWorkers=1-> passed 3 Vitest shards, 58 tests (39 + 15 + 4).pnpm test src/agents/tools/computer-tool.node-resolution.test.ts src/agents/agent-tools.prefix-stability.test.ts --maxWorkers=1-> passed 2 shards, 25 tests (20 + 5), including prompt-prefix stability.pnpm tsgo:core-> passed.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.agents-tools.json --incremental-> passed.node scripts/run-format.mts --check <touched files>-> passed for all 8 files.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json <touched files>-> 0 warnings, 0 errors.git diff --check-> clean.Reproduction boundary and gap: the new tests exercise the production tool-registry composition (
loadPairedComputerUseAvailabilityForSurface->createComputerTool->resolveComputerBinding) with the Gateway unconfigured and one eligible paired node, using the repository's mocked Gateway/node transport. No physical paired desktop or live vision model was available in this checkout, so the reported model-choice frequency was not reproduced end to end; the advertised surface and the explicit-Gateway recovery are covered deterministically.AI-assisted: yes. Authored by an AI coding agent; every check below executed in this checkout.