Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Commits on main

fix(mcp): scope supervisor events to their workspace and surface their reason\n\nReview follow-ups on #5931.\n\n**Workspace scoping (Codex P1).** The supervisor loop walks `host::all_hosts()`,\nwhich returns every workspace the process has opened — the map is never evicted\nand `mcp::host`'s own docs say a workspace can be switched in place. The events\nit published carried no workspace identity, and `NotificationBridgeSubscriber`\nis registered once with the `Config` that booted, so a switched-away account's\noutage was announced from, and persisted into, the current workspace's store.\n\nEach of the five supervisor variants now carries `workspace_dir`, stamped from\nthe loop's own key, and the bridge drops an event that is not its own. This is\nthe shape `ChannelMessageReceived` / `ArtifactReady` already use for the same\nreason, and the drop mirrors `telegram::bus`'s stale-workspace check. An event\nthat names no workspace is unaffected, so every variant the bridge handled\nbefore this change still reaches it.\n\n**Event Log detail (Codex P2).** The `/events/domain` envelope carries only the\ndomain, variant name, agent hint and timestamp, so a transport that broke and\none that timed out reached the UI as the same row and the error this change\nexists to expose was discarded. `DomainEvent::log_detail` is an opt-in\none-liner: the supervisor variants return an already-redacted summary (clipped\nat 160 chars on a character boundary, never the workspace path), every other\nvariant returns `None` and its row is unchanged. The panel renders it after the\nevent name and the filter box matches against it.\n\n**Catalog version (Codex P2).** `EVENTS_VERSION` 1.0.0 -> 1.1.0. `core::bus`'s\nown contract doc requires a minor bump for an added variant, so peers report\nskew at startup instead of failing to decode one of these later.\n\n**Docs wording (CodeRabbit).** "Every liveness-probe outcome" overstated it — an\nanswered probe is deliberately not an event. Both the capability catalog and the\ngitbook now say non-nominal, and say so explicitly.\n\nClaude-Session: https://claude.ai/code/session_01933KF1SGNrJtQ9RhoDxY9i\n
Shanu committed 3 months ago
ab71c83
docs(triage): say why acknowledge writes nothing, not that it will one day\n\nThe arm logged `memory-write is a future addition`, which described an\nunimplemented plan rather than the behaviour — and the plan was wrong. Writing a\nsummary here would duplicate a document the connector sync has already ingested:\nthe same mail, a second copy, competing with extracted memories for the same\nrecall slots. That is #5312, and #5315 is the fix; this arm should not reopen it.\n\nAcknowledge is a classification, not a write, and the two things worth keeping\nare already kept. What the trigger *was* is durable in the composio\ntrigger-history JSONL, written before the triage gates so it survives even with\ntriage disabled. What it was *judged to be* went out as `TriggerEvaluated` a few\nlines above, for every action.\n\nWhat is actually missing is a record of what happened *after* the verdict — for\nevery action, not just this one — which belongs in its own surface rather than\nbolted onto one branch. Filed as #5408, and referenced from the comment so the\nnext reader finds the work instead of re-deriving the note.\n\nThe log line now states what happened and where to look, and carries `source`\nand `card_linked`. The sibling DROP arm gets the same two fields: both are\n"no downstream work" verdicts, and a dashboard filtering on `source=` would\notherwise silently see only half of them.\n\nagent::triage 70 tests pass.\n\nClaude-Session: https://claude.ai/code/session_01SRSNnqQsokuGmkbpLoLCGy\n
yh928 committed 4 months ago
4b79557
0859491
fix(git_operations): report a config refusal as a refusal, not "not a repository"\n\nWith the layout gate green, `Rust Core Coverage` runs for the first time and\nfails: 3160 passed, 7 failed, all of them the #5494 repository-config\nhardening tests. That lane is gated behind `Rust Quality`, which fails on\n`main` at the layout step, so the lane has been reporting `skipped` and these\ntests have not executed on any branch. They fail identically on an unmodified\n`main` checkout — this PR did not break them, it revealed them.\n\nThe bug is an ordering inversion. `execute_in_context` decides whether it is\nin a repository by probing through `run_git_command_in`:\n\n let is_worktree = self\n .run_git_command_in(&effective_dir, &["rev-parse", "--is-inside-work-tree"])\n .await\n .is_ok_and(|output| output.trim() == "true");\n\nBut `run_git_command_in` refuses up front when the repository config carries a\ndisallowed key, bailing with the message that names it. `is_ok_and` discards\nthat error, so a repository setting `core.fsmonitor`, `credential.helper`,\n`core.worktree`, a worktree-scoped `core.hooksPath` or an LFS `filter.*` was\nreported to the user as **"Not in a git repository"** — false, and stripped of\nthe only text explaining which key caused it.\n\n`first_disallowed_repo_config_key` documents the ordering this restores: it\nsays the caller "has already confirmed `dir` — or one of its parents —\ncontains a `.git`". No such check exists in the file; the probe that stands in\nfor it routes back through the guard, which is circular.\n\nThe security property was never at risk — the command is refused and never\nexecutes, and every one of these tests asserts that separately. What was lost\nwas the diagnostic.\n\nTwo changes:\n\n- The probe runs `hardened_git` directly instead of `run_git_command_in`. Safe\n unguarded: `hardened_git` already neutralises every config key that names a\n command, so the probe cannot be turned into an execution primitive, and the\n real command still goes through the full allow-list check.\n\n- A failed probe no longer means "no repository". It can fail *because* the\n repository is misconfigured — a `core.worktree` redirect git cannot follow,\n or a config it cannot read — so the guard is consulted before concluding:\n a disallowed key yields the refusal naming it, an unreadable config yields\n "could not inspect its repository config", and only a genuinely clean\n non-repository yields "Not in a git repository".\n\n`disallowed_config_refusal` is extracted so the two paths that now produce\nthat refusal cannot word it differently.\n\n`cargo test --lib git_operations`: 42 passed, 0 failed (was 35/7).\n\nClaude-Session: https://claude.ai/code/session_014U1r9R4iFTNoq9vwyrLe7h\n
Shanu committed 3 months ago
39a3cbd
feat(mcp): surface reconnect-supervisor outcomes as events (#5931)\n\nThe reconnect supervisor probed every installed MCP server each minute and\nkept a field log of what it found, and none of it reached the product: the\nEvent Log never showed a probe outcome, and a user whose server had been\ndown for an hour heard nothing. `tinymcp::Supervisor::tick` returned `()`\nand only logged, so the host had no seam to publish from.\n\ntinymcp#13 gives `tick` a `TickReport`. This bumps `vendor/tinymcp` onto it\nand does the host's half:\n\n- Five new `DomainEvent`s in the `mcp_client` domain, published by the new\n `mcp::registry::supervisor_events` from each tick's report:\n `McpServerProbeTimedOut` (a kept session, with its place in the streak),\n `McpServerTransportDropped` (the outcome, the redacted error, how long the\n failing probe took), `McpServerReconnected` (with `after_failures`, which\n is what separates a same-tick rebuild nobody noticed from a server that\n had stayed down), `McpServerReconnectFailed` (failure count and backoff)\n and `McpServerParked`. An answered probe is deliberately not an event.\n- `agent_hint` names the server for every MCP row, so the Event Log's agent\n column reads `ac.inference.sh/mcp` rather than blank — the registry name\n for the supervisor's verdicts, the install id for the RPC lifecycle.\n- The notification bridge notifies on exactly three of them: the first\n failed reconnect of an episode ("MCP server unavailable", with the retry\n delay and the error), a recovery after failures, and a parked server with\n the disable/re-enable recovery path. Timeouts, same-tick rebuilds and\n later retries stay Event Log only; fourteen banners a day is the noise\n this replaces.\n- `supervisor::run` now delays missed ticks instead of bursting them —\n tinymcp#5 pointed out this host drives `tick` from its own timer and got\n none of that protection.\n\nInvestigation, for the record: `api.inference.sh` is Cloudflare-fronted,\nanswers `tools/list` (25 tools) in 0.18–0.28s on both a reused keep-alive\nconnection and a fresh dial, and holds an idle connection open for at least\n150s; 49 probes over 50 minutes from this network produced zero failures\nand nothing near the 8s window. The reporter's timeouts and 0.3–3.5s\ntransport failures do not reproduce from here and look specific to their\nnetwork path at the time. Every one of their `timed_out` lines was at\n`consecutive_timeouts=1`, so the streak rule from tinymcp#5 already kept\nthose sessions; what actually reconnected were `Broken` outcomes, whose\nerror text the issue truncated. That text now rides on\n`McpServerTransportDropped.detail`, so the next report can say what it was.\n\nCloses #5931\n\n
Shanu committed 3 months ago
f689609
chore(layout): bring the Rust layout gate back to green\n\n`Rust Quality` — and therefore `PR CI Gate` — is failing on `main` itself\n(4ef68c5ea), so no PR branched from it can go green. Three files trip\n`scripts/ci/check-openhuman-rust-layout.mjs`:\n\n - session/turn/context.rs: inline test module\n - tools/impl/filesystem/git_operations.rs: 949 lines (limit 750)\n - tools/impl/filesystem/git_operations_tests.rs: 929 lines (limit 750)\n\nPure code movement — no behaviour change, nothing renamed, no test dropped.\n\n`context.rs` keeps its four tool-policy-boundary tests, moved to the sibling\n`context_tests.rs` the gate asks for.\n\n`git_operations.rs` sheds two cohesive units rather than being cut at an\narbitrary line: the ambient-config hardening (the allow-list, the neutralised\nkeys and the helpers that build a hardened `git` invocation) becomes\n`git_operations_config.rs`, and the result formatters become\n`git_operations_render.rs`. Reviewing the config policy is easier when it is\nnot interleaved with the command implementations.\n\nThe tests split along the same seam, so the #5494 hardening tests sit beside\nthe module they exercise. `git_operations_config_tests.rs` attaches to\n`git_operations` rather than to the config module, so `use super::*` still\nresolves `GitOperationsTool` exactly as before; the fixtures stay in\n`git_operations_tests.rs` and are shared via `pub(super)` rather than\nduplicated, since both modules are children of `git_operations`.\n\nTest-count parity checked against main: git_operations 42 = 30 + 12, and\ncontext.rs 4 = 4.\n\nNote for reviewers: `cargo test --lib git_operations` reports 35 passed /\n7 failed **both before and after this commit**, with an identical set of\nfailing test names. Those seven are the #5494 config-hardening tests failing\nin a local sandbox ("Not in a git repository"); they are pre-existing and\nuntouched by this change, not a regression introduced here.\n\nClaude-Session: https://claude.ai/code/session_014U1r9R4iFTNoq9vwyrLe7h\n
Shanu committed 3 months ago
fc84a40