Skip to content

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

Commits on main

style: rustfmt the lines this branch added
M3gA-Mind committed 3 months ago
a3836c7
style: rustfmt the lines this branch added\n
M3gA-Mind committed 3 months ago
54e833c
test(e2e): backfill coverage for dispatch gates, probe outcomes, and settings failure paths\n\nSix merged PRs changed behaviour that no e2e test exercised. An audit of the\nthree lanes found the changed symbols present in e2e files for three of them —\n`run_subagent` in nine, `handoff` in eighteen, both profile panels in a\nPlaywright spec — with none of those tests driving the changed path. The repo's\ndomain e2e gate counts literals, so all three read as covered.\n\nRust:\n\n- #5810 `run_subagent` refuses a dispatch after a cap pause, and when less\n wall-clock remains than the turn's slowest completed child. Both cases install\n a real `turn_dispatch_guard` (the gate is a no-op outside a turn scope, so a\n test that skips it exercises nothing) and assert the provider was never\n reached — the refusal is meant to cost nothing. Each drives an allowed\n dispatch through the same guard first, so a gate that refused unconditionally\n could not pass.\n- #5772 `probe_alive` returns a four-variant `ProbeOutcome`; the existing test\n only asked `.is_alive()`, which is false for all three non-alive variants\n alike. Pins `Missing` for an entry that was never connected, `TimedOut` for a\n demonstrably healthy server probed with an unmeetable window, and that the\n session survives it. Also pins the 8s default probe window that b44b958d\n restored.\n- #5852 `wait_agents` prunes a terminal child, so a second wait misses. The one\n semantic change in an otherwise-deletion PR; it lived only in prose.\n- #5839 the `memory_diff` RPC surface answers unknown-method on the live router,\n and the memory domain still answers. The existing removal regression reads the\n registry as a data structure, so a re-registration behind a different\n namespace would satisfy it.\n\nPlaywright:\n\n- #5944 a failing profile save, activate and delete each show the backend's\n reason and not `[object Object]`. Every existing test in that spec is a happy\n path, which is how the defect shipped and was then pinned as expected.\n- #5925 a settings-load failure disables every compression switch; a savings\n failure leaves them usable. The second is the half the old `Promise.all`\n broke.\n
M3gA-Mind committed 3 months ago
7f47d90
style: rustfmt the new observability e2e target
M3gA-Mind committed 3 months ago
a1808c9
fix(mcp): file a supervisor notification under its own workspace, never drop it\n\nCodeRabbit was right that the previous commit's drop was the wrong half of the\ntrade. `NotificationBridgeSubscriber` is registered once, from\n`bootstrap_core_runtime`'s per-`DomainGroup` first-time set, with the workspace\nthat booted — and the MCP supervisor ticks every workspace the process has\nopened. Comparing the event against that binding fixes the case where the\nbinding is the active workspace and breaks the case where it is the stale one:\nafter a switch, the workspace the user is actually in would get no unavailable,\nreconnected or parked notification at all. That is worse than the bug it was\nmeant to fix.\n\nNeither answer works while the store is addressed by the subscriber, so it is\naddressed by the event instead. `store_target` redirects\n`Config::workspace_dir` — the only field `store::with_connection` reads — to\nthe workspace the event names, and nothing is dropped. One account's outage no\nlonger lands in another's inbox, the active workspace is never silenced, and\nthe binding's freshness stops being load-bearing.\n\nBroadcast is deliberately unchanged: `NOTIFICATION_BUS` is process-wide and\nalways has been, so this commit does not narrow what a connected client sees.\n\n`an_outage_is_filed_under_its_own_workspace_not_the_bridge_s` is the A-to-B\nregression test the review asked for, driven through `handle` over two real\ntemp workspaces: B's outage lands in B's store, A's store stays empty, and A's\nown outage still works. The `store_target` unit tests cover all five variants\nplus the process-wide events, which keep this bridge's store.\n\nClaude-Session: https://claude.ai/code/session_01933KF1SGNrJtQ9RhoDxY9i\n
Shanu committed 3 months ago
d0dd1d1
fix(agent): stop the compact→retrieve→re-run infinite loop\n\nA large tool result is compacted to a summary plus a `retrieve_tool_output(hash)`\n/ `⟦tj:hash⟧` marker, with the original offloaded to the CCR store. When the\nmodel later retrieves that hash and the store misses, the error told it to\n"re-run the tool to regenerate it" — so it re-ran, produced the same oversized\nresult, which was compacted and offloaded again under a new hash that missed\njust as fast. On a live instance this made chat never answer: a parent agent\nre-delegated to a subagent forever on an evicted result, burning turns and cost\nwith no reply.\n\nTwo changes remove the loop:\n\n- The retrieve-miss message no longer instructs a blind re-run. It tells the\n model the original is gone, to NOT re-run the same call, and to proceed with\n the compacted summary it already has (retrying only with narrower arguments if\n a specific detail is essential). A worst case is now a slightly less detailed\n answer, not an unbounded loop. Applies to both `retrieve_tool_output` and\n `tokenjuice_retrieve`.\n\n- `ccr_disk_enabled` now defaults ON. The in-memory CCR store is FIFO-bounded\n (256 entries) and lost on restart, so a retrieve footer the model was handed\n can go stale within a single busy turn — the disk tier (TTL + size-cap gc'd)\n keeps those originals recoverable, so a compaction footer is a promise the\n store can actually keep.\n\nClaude-Session: https://claude.ai/code/session_01SRSNnqQsokuGmkbpLoLCGy\n
yh928 committed 4 months ago
b9bd21a
fix(memory): store only what a person sent as a conversation memory\n\n`auto_save` says the workspace keeps its chat in memory; it did not say whether\na turn is chat at all. An internal agent is built from the same config\n(`Agent::from_config_for_agent`), so it inherits the flag — and its "user\nmessage" is the prompt the host wrote for it.\n\nLive, that put `memory_goals::enrich`'s prompt in the `global` namespace as a\n`Conversation` document keyed `user_msg:<uuid>`:\n\n "Maintain the existing goals list. Call goals_list first, then make the\n MINIMAL set of changes (goals_add / goals_edit / goals_delete)…\n ## Context\n Recent conversation recap (segment seg-18c746e3…)…"\n\nPrompt boilerplate then competes for slots in every later recall, which is what\nmade a namespace-wide search read like a transcript dump.\n\nThe distinction already existed: `AgentTurnOrigin`. `WebChat` and\n`ExternalChannel` carry what a person sent; `TrustedAutomation` (cron,\nsubconscious, goal continuation, workflow), `Cli` — documented as "command-line\n/ sub-agent / one-off internal" — and an unscoped `Unknown` carry host text.\n`AgentTurnOrigin::is_user_authored` is an allowlist for the same reason the\npermission gate uses one: a new origin is a turn nobody has classified, and\nmistaking host text for a user message writes it where the user's own words\nbelong, indistinguishable afterwards.\n\nGated at the session, not at each caller, so a new internal agent cannot forget\nto opt out — the kind of omission nothing surfaces until the store is inspected.\n\nExisting rows are left alone; this is the write path only.\n\nTests: an automation turn and an unscoped turn store no `user_msg:*` document;\nthe existing round-trip test now scopes `WebChat`, as every production entry\npoint does. agent::tests 100, turn_origin 3, agent::harness::session 205,\nmemory_goals 7. clippy clean.\n\nCloses #5312\n\nClaude-Session: https://claude.ai/code/session_01SRSNnqQsokuGmkbpLoLCGy\n
yh928 committed 4 months ago
0829e7f