Conversation
The crate used to be its own workspace rooted at runtime/, so cargo only worked from inside that directory: `cargo test --workspace` at the repo root had no manifest to find. Moving the workspace manifest (and the lock) to the root makes the whole-repo commands behave the way every other Rust repo's do, while `cd runtime && cargo …` keeps working through the member. Dockerfile and Dockerfile.nightly pick up the new manifest/lock layout; dependabot and the CI cache now look at the root workspace. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
openabdev#39) OPENAB_TOOLS_MCP_URL put the loopback endpoint in the child's environment, but wiring it into the CLI was manual: `mcp add` per session plus a hand-edited allowlist, and both hard-coded a URL whose key dies on the next spawn. At spawn the runtime now writes the session-independent form for the CLI variants it knows — kiro-cli first: - ~/.kiro/settings/mcp.json gains a `computer` server that runs a small stdio bridge on the installer's bundled bun (or node). The bridge reads the URL from *its* environment — `${OPENAB_TOOLS_MCP_URL}` in `env`, the one place kiro expands variables — so the shared workspace file serves every session and never holds a key. A hard-coded per-session URL was the live failure in the field report: three sessions, one computer. - every ~/.kiro/agents/*.json gains `@computer/*` in allowedTools — the sandbox-served set under the platform-neutral alias — plus `@computer` in a restrictive `tools` list, and an agent that opted out of mcp.json gets its own copy of the server entry. Agent files are merged in place, never created. - nothing is written for a CLI the runtime does not know, when the tools plane is off, or when no JS runtime exists; the §9.3 env-var manual path stands in all three, and a failed merge never costs a spawn. Refs openabdev#39 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Refs #39
Summary
OPENAB_TOOLS_MCP_URLput the loopback endpoint in the child's environment,but wiring it into the CLI was manual:
mcp addper session plus ahand-edited allowlist, and both hard-coded a URL whose key dies on the next
spawn. At spawn the runtime now writes the session-independent form for
the CLI variants it knows — kiro-cli first:
~/.local/share/openab-pty/computer-mcp-bridge.js— a small stdio bridgeembedded in the binary and rewritten each spawn; every stdin line is one
JSON-RPC message POSTed to
$OPENAB_TOOLS_MCP_URL(JSON and SSE replies,Mcp-Session-Idechoed, per-id JSON-RPC errors on HTTP failure).~/.kiro/settings/mcp.jsongains exactly thecomputerserver{command: <bundled bun / PATH bun / node>=18, args: [bridge], env: {OPENAB_TOOLS_MCP_URL: "${OPENAB_TOOLS_MCP_URL}"}}— every otherserver and setting is preserved, and the file never holds a URL or key, so
the shared workspace config needs no refresh when the key rotates.
~/.kiro/agents/*.jsongains@computer/*inallowedTools, plus@computerin a restrictivetoolslist and acomputerentry inmcpServersfor agents that opt out of the shared mcp.json. Agent filesare merged, never created.
symlinks, preserve existing file modes). Malformed, non-object, or
foreign-shaped files are left byte-identical; dangling symlinks are left
alone rather than replaced.
stands.
tools_listenunset → injection never runs. A failed merge warnsand never costs a spawn.
Detection:
kiro-clion the child's PATH or under the installer's~/.locallayout; JS runtime = bundled bun →~/.local/share/kiro-cli/bun→ PATH bun → PATH node (with a
--versionprobe, node ≥ 18 required forfetch).Also includes a preparatory commit hoisting the crate into a repo-root
Cargo workspace (
Cargo.toml/Cargo.lockat root), socargo test/fmt/clippy --workspacework from a checkout root as well as fromruntime/; Dockerfiles, CI cache, and dependabot updated to match.Test plan
cargo fmt --all -- --checkcargo test --workspace(175 unit + 13 config tests incl. injectionmerge/preservation, unknown-variant, tools-off, node<18, dangling
symlink, mode-preservation, and restart-rotation byte-identical)
cargo clippy --workspace --all-targets -- -D warningsround-trip, SSE multi-line normalization, notification silence
rotates the env key while the file stays byte-identical; unwritable
workspace still spawns
Docs:
runtime/CLIENT-CONTRACT.md§9.3 rewritten for the auto-injection +manual fallback;
docs/k8s-howto.md§6 notes the zero-step CLI side.Generated with Devin