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(agent): keep a content-returning action on the Gmail sub-agent surface\n\nAsking the agent to read Gmail through `delegate_to_integrations_agent`\ncame back with no email content. Three defects stacked up.\n\nThe fuzzy ranker derives an intent verb from the prompt and drops every\ntool whose own name-verb conflicts with it. `FETCH`/`GET` are the `Read`\nverb and `find`/`search` are `List`, so "find job opportunities from the\nlast 5 days" removed `GMAIL_FETCH_EMAILS` and both\n`GMAIL_FETCH_MESSAGE_BY_*` before scoring began; a flat verb-alignment\nbonus then let zero-overlap tools fill the budget, leaving twelve\n`GMAIL_LIST_*` actions that return ids and settings and nothing that\nreturns a message body.\n\n- `TOOLKIT_ESSENTIAL_ACTIONS` reserves a toolkit's must-have actions\n **inside** the existing top-K budget — essentials first, ranked hits\n after, deduplicated and truncated — so the surface can no longer lose\n its only content-returning action. It never appends past `top_k`:\n `TOOL_FILTER_TOP_K_HEAVY` exists because Gmail at top-K=25 produced a\n 276k-token first-iteration prompt. Only Gmail is seeded.\n- A `Completed` sub-agent whose output is only tool-call markup is now\n framed with the `[SUBAGENT_INCOMPLETE]` envelope instead of being\n passed through as a finished answer (#4096 precedent). The marker\n vocabulary stays in one place: the archivist's\n `looks_like_unexecuted_tool_call`, which its own strip now uses.\n- Blocking delegations register no worker, but the orchestrator's\n `[active_subagents]` guidance tells it to collect completed work with\n `wait_subagent`. The result now says it ran inline and there is no\n worker to wait for.\n- The narrowed surface logs the action names it kept, not just a count.\n\nCloses #6033\n
Shanu committed 2 months ago
50b6ee1
59ef1f9
test(flows): invert the two e2e assertions #6093 fixed\n\n#6055 merged at 08:40:39 UTC with two assertions that deliberately pinned\nbehaviour reported as buggy, each carrying a comment saying so. #6093 merged\nat 08:44:56 UTC and fixed exactly those two bugs, so the assertions have\nfailed on main ever since — four minutes' overlap its author could not have\nseen.\n\nPinning current buggy behaviour is a legitimate way to make a fix argue past\na reviewer, but it is a tripwire whose author owns inverting it. These are\nmine.\n\nBoth now assert what #6093 implemented, read from its diff:\n\n- `flows_approval_manifest_classifies_every_gated_node_kind` — `split_manifest_trust`\n returns two empty lists when no gate is installed, so `already_trusted` is\n empty where it previously carried every approvable key and claimed grants\n the flow did not hold. The gate-installed branch is untouched.\n\n- `flows_tool_catalog_surface_degrades_without_composio_credentials` —\n `toolkit_for_contract_slug` requires non-empty segments either side of the\n first `_`, so `nodashhere` is refused by the shape guard instead of being\n accepted as its own toolkit and failing later at the catalog. A second\n assertion pins that no catalog round trip happens, which is the property\n #6093's doc comment calls out.\n\nThe "current behaviour" and "Pinned as-is" comments are rewritten: they\ndescribed a bug that no longer exists, and leaving them would tell the next\nreader it is still live.\n\nTest-only; no production code touched. Unblocks main and the open PRs\ninheriting this failure (#6115, #6116, #6117, #6124), which need a re-run\nrather than a change.\n
M3gA-Mind committed 2 months ago
7023f86
fix(socket): publish `status` in one vocabulary across the namespace\n\n`socket_connect`, `socket_disconnect` and `socket_connect_with_session` built\ntheir payload with `json!({ "status": format!("{:?}", state.status) })` — Rust's\n`Debug`, so `"Connecting"` / `"Disconnected"` — while `socket_state` serialises\nthe same `ConnectionStatus` through `#[serde(rename_all = "lowercase")]` and\nanswers `"connecting"` / `"disconnected"`. One namespace, one field, two\nencodings.\n\nAligned on serde, as decided on #6111: `socket_state` and `connectivity_diag`\nalready publish that spelling, so the three lifecycle handlers were the outliers,\nand `app/src` consumes neither return value (`SocketProvider.tsx:53` discards it),\nso there is no renderer risk.\n\nThe shared `status_payload` helper routes through `serde_json::to_value` rather\nthan a hand-written match, so the mapping cannot drift from the `rename_all`\nattribute `socket_state` depends on.\n\nTests:\n\n * `status_payload_matches_the_serde_encoding_for_every_variant` pins the\n handlers against the serde encoding itself — derived from `SocketState`'s own\n serialisation, not a hardcoded list — for all five variants, and asserts the\n `Debug` spelling is *not* what comes out.\n * `status_slug_is_lowercase_for_every_variant` pins the property\n `connectivity_diag` and the frontend's lowercase comparisons rely on.\n * The four `channel_socket_e2e.rs` assertions that pinned the `Debug` spelling\n (`:414`, `:425`, `:503`, `:512`) now expect the serde one. The assertions\n that already pinned serde (`:300`, `:354`, `:433`, `:476`) are untouched, as\n is `connectivity_raw_coverage_e2e.rs`.\n\nRevert-check: restoring `format!("{:?}", state.status)` on the three handlers\nfails `socket_connect_then_disconnect_round_trips_state` and\n`socket_connect_with_session_requires_a_stored_session` with\n`left: Some("Connecting"), right: Some("connecting")`.\n
M3gA-Mind committed 2 months ago
4f93f41
fix(webhooks): gate the unregister side-effect tail on a real removal, and stop clamping list_logs' limit to 1\n\nTwo defects in `WebhookRouter`, both surfaced by the e2e coverage wave.\n\n#6091 — `unregister` ran `publish_event("registration_changed")`, `persist()` and\n`BUS.publish(WebhookUnregistered)` unconditionally, including on the branch where\nthe tunnel was never registered. Unregistering a typo'd UUID therefore announced\na state change that never happened, and the caller had no way to tell that from a\nreal removal: both returned `Ok(())`.\n\n`unregister` now returns `Ok(true)` / `Ok(false)` and the whole side-effect tail\nsits behind the real-removal branch — the same gate `unregister_skill` already\napplies with its `if !removed_tunnels.is_empty()`. The wire shape is deliberately\nunchanged (the issue leaves that a separate contract call): `unregister_echo`\nstill returns the full registration list, but its log line no longer claims a\nremoval that did not happen.\n\n#6090 — `list_logs` clamped with `let limit = limit.unwrap_or(100).max(1)`. The\nabsent case is already covered by `unwrap_or(100)`, so `.max(1)` could only ever\nrewrite a caller-supplied `0` into a `1`, making `limit: 0` and `limit: 1`\nindistinguishable while every other value was honoured exactly. `Iterator::take(0)`\nis well-defined, so the clamp is simply removed.\n\nTests, each revert-checked:\n\n * `unregister_of_an_absent_tunnel_announces_nothing` — asserts no\n `registration_changed` for an absent tunnel and exactly one for a real\n removal. Note `WEBHOOK_DEBUG_EVENTS` is a process-global `broadcast::Sender`\n shared by every router, so the assertions filter on this test's own UUIDs\n rather than on the channel being empty, which raced.\n * `unregister_nonexistent_tunnel_is_noop` — now asserts the `false` return.\n * `list_logs_limit_zero_returns_no_entries` — plus limits 1, 2 and absent, so\n it cannot pass by returning nothing for everything.\n * `webhooks_debug_log_ring_records_and_clears` and\n `webhooks_registration_lifecycle_and_ownership_guards` gain the same two\n checks over the real JSON-RPC surface.\n\n`unregister` has exactly one caller (`ops::unregister_echo`), and no subscriber\nin the tree acts on `DomainEvent::WebhookUnregistered` — `src/core/events.rs`\nonly classifies it — so the narrowed publish changes no behaviour beyond the\nevent log.\n
M3gA-Mind committed 2 months ago
b0498a6
fix(channels): render the channel prompt from the active profile and refresh it on identity changes\n\nNative channel turns (Telegram/Discord/Slack bot-token listeners, iMessage,\nWhatsApp) were seeded with a system prompt rendered once in `start_channels`\nfrom the workspace-root SOUL.md. The active agent profile was never consulted\n(#6027), and the rendered String lived for the process, so a profile switch, a\nSOUL.md edit or the archivist writing MEMORY.md stayed invisible until restart\n(#6028). The managed-DM path goes through `web_chat` and already applied both.\n\n- `channels_prompt::build_system_prompt_with_identity` takes a\n `PromptIdentityOverride` (profile SOUL.md / MEMORY.md replace the root files\n in their slot, IDENTITY.md and PROFILE.md stay root — the desktop\n `IdentitySection` rule). `build_system_prompt` delegates with an empty\n override and renders byte-identically; `inject_workspace_file` now shares\n `inject_inline_content` with the desktop path.\n- New `channels::system_prompt::ChannelSystemPrompt`: `Fixed` for tests,\n `Refreshing` in production. It keeps the render inputs (tools, skills, model,\n the tool-instruction + access-context suffix) and re-renders only when an\n identity fingerprint — (mtime, len) of agent_profiles.json, the four root\n identity files and the active profile's SOUL/MEMORY — changes. Steady state\n hands back the same Arc, so the prompt stays byte-stable for prefix caching.\n An unreadable profile store warns once and renders the root identity;\n channel startup never fails on it.\n- `ChannelRuntimeContext.system_prompt` is that type; the dispatch loop calls\n `current()` per message. `DispatchHarnessOptions` gains `workspace_dir` and\n `system_prompt` so a test can share one prompt across dispatches.\n\nCloses #6027\nCloses #6028\n
Shanu committed 2 months ago
f0e898a