feat(windows): add Gateway Tool Runtime Bridge shared profiles - #92
MythiliMur wants to merge 4 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed September 22, 2026, 1:10 AM ET / 05:10 UTC (Revision 3). ClawSweeper reviewWhat this changesAdds persistent executable registrations, a local Windows broker, workspace profiles, and command shims that expose selected tools to the isolated Gateway. Merge readiness⛔ Blocked before merge - 17 items remain Keep open: the contribution remains distinct from main, but all six prior correctness findings remain unresolved. The latest design revision does not repair the runtime implementation, and the changed authority boundary still lacks production-path proof. Priority: P2 Review scores
Verification
How this fits togetherThe Windows package launches OpenClaw inside a separate agent session. This bridge accepts desktop tool registrations and prepares commands that the Gateway can discover through its process PATH. flowchart LR
A[Desktop caller] --> B[Local pipe authorization]
B --> C[Tool registration store]
C --> D[Workspace profiles and shims]
D --> E[Gateway process PATH]
E --> F[Registered executable]
Decision needed
Why: The branch activates host-to-agent authority while its stated profile, setup, and verification contracts remain unfinished; choosing the supported landing boundary requires owner intent. Before merge
Findings
Agent review detailsSecurityNeeds attention: The patch introduces unsafe desktop-host filesystem effects and does not yet enforce verified executable authority at use. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use one package-owned, AOT-safe bridge with trusted filesystem operations, verified executable identity, and reviewed per-tool profile configuration, preserving existing Gateway startup through demonstrated upgrade compatibility. Do we have a high-confidence way to reproduce the issue? Yes, the reported patch defects have direct source paths: redirected workspace entries reach host writes/deletes, registration bypasses verification, and connected pipe I/O has no deadline. These paths were not executed in this read-only review. Is this the best way to solve the issue? No, the current implementation activates the bridge before satisfying its own verification and profile contracts; extending the existing trusted workspace and session owners is the narrower safe approach. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 207d19d0fd28. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
Summary
Add the package-owned Gateway Tool Runtime Bridge: a generic, controlled execution and managed-profile layer for user-installed command-line tools that must later run under the isolated Gateway-agent identity.
A user installs a tool independently and explicitly registers an installed executable. The bridge validates and records the approved absolute target; the Gateway later invokes only that approved target through a controlled launch policy.
The bridge does not implement, inspect, or automate an external service's authorization protocol. It starts the registered tool's normal interactive setup in the human desktop session, applying a managed profile through that tool's documented configuration mechanism.
What this adds
A package-managed persistent profile root:
C:\ProgramData\OpenClaw\GatewayTools\profiles\<opaque-profile-id>\Opaque registration and profile IDs.
A Gateway Tool Runtime Bridge responsible for:
Migration from workspace-owned runtime profiles.
A package-owned Control UI Adapter contract with a fixed allowlist of browser-facing broker operations.
Tests for profile location, opaque IDs, redaction, ACL intent, migration, approved-target invocation, and bounded result mapping.
Managed Tool Profile Contract
A tool can use the Runtime Bridge only when it documents a supported way to redirect its own profile/configuration/state location.
The per-tool contract declares one supported profile mechanism, for example:
When the Runtime Bridge starts the registered tool, it supplies that setting only to the approved child process:
The tool—not the bridge—then writes its own configuration and credential state to the managed profile rather than its normal per-user default location.
The bridge does not use filesystem redirection, change global environment variables, alter the tool's normal user profile, or import existing desktop state.
User flow
Security model
The managed profile is intentional shared integration state, not a hard security boundary between the desktop user and Gateway-agent identity.
Its ACL permits only:
A protected secret, when a reviewed contract requires one, is injected only into approved child processes. It must not appear in shims, registry JSON, ordinary configuration, User/Machine environment variables, browser responses, plugin responses, logs, diagnostics, or model context.
Explicit non-goals
Everyone:F.Follow-up package UI
The dependent package-owned Control UI implementation is tracked in #94. #94 depends on this PR and must not merge first. It consumes the constrained Control UI Adapter contract and does not duplicate broker or runtime-bridge authority.
Status and validation
This draft includes the initial package implementation: a provider-neutral registry, canonical executable registration, Gateway-only shims, per-registration runtime profile directories, and a Gateway-only PATH prefix. The authenticated broker, package-managed profile provisioning, protected-secret mechanism, and package Control UI Adapter remain subsequent implementation slices.
Validation completed for the existing implementation:
git diff --check