Skip to content

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

Commits on main

6196a84
fix(prompt): append the tool-policy boundary instead of prepending it (#5704)\n\n`build_system_prompt` put the `## Tool Policy Boundary` block in front of the\nwhole assembled prompt. Every line of that block is session-scoped — agent id,\nchannel, entry point, risk level, allowed permission, the allowed-tool list,\na restricted count — so the prompt's first diverging byte sat at offset 0 and\nthe inference backend's automatic prefix cache had nothing to reuse behind it,\neven when the safety preamble, tool catalogue and workspace sections were\nbyte-identical.\n\nThat contradicts what the surrounding code already protects:\n`SystemPromptBuilder::for_subagent` keeps `DateTimeSection` out precisely to\navoid one varying value inside the prompt, and the connected-server overview is\nsorted so it "does not reshuffle between turns and cost its cached prefix".\n\nIt also restores the archetype/persona as the prompt's opening line. The\nprepend replaced it with the same constant heading for every agent, which is a\nsilent layout change for anything that identified an agent that way.\n\nThe composition moved into a pure `append_tool_policy_boundary(prompt,\nboundary)` so the ordering is testable without standing up a session.\n\nFour tests, three of which fail against the prepend:\n\n - the boundary lands after the prompt body\n - the persona stays the opening line\n - two agents differing only in the boundary share the whole body as a\n common leading prefix (this is the cache property itself, not a proxy)\n - no boundary leaves the prompt untouched (passes either way)\n\n`cargo test --lib turn::context` 4 passed; reverting the helper to prepend\ngives 1 passed / 3 failed. `cargo fmt --all` clean.\n
Nguyen Thanh Dat committed 3 months ago
6872c28
Re-anchor the composio scopes refusal on the message it now emits\n\n`Rust Core Coverage` is red on main:\n\n composio_raw_coverage_e2e::composio_controller_registry_and_scope_handlers_cover_validation_edges\n assertion failed: memory_missing.contains("memory client not initialised")\n\nThe string does not exist anywhere in `src/`. `bafc23214` ("Stop booting the\nsecond in-process memory engine", #5725, merged 15:39) removed the\nin-process engine handle that produced it and moved the storage half onto\nthe bound driver. The assertion was never re-anchored, so it has been\nasserting a message the product no longer emits ever since — an orphaned\ntest in the sense of #5757 / #5776.\n\nIt survived its own PR because the coverage lane is changed-modules-scoped\nand that PR did not touch a module which routes to `tests/raw_coverage`.\n\n`ops::user_scopes::save` refuses on three deliberately distinguishable\ngrounds: "memory driver unavailable" (nothing bound), "does not serve Graph"\n(bound, wrong family), and "kv_put failed" (bound, right family, the write\nitself failed). Measured rather than assumed — the first re-anchor here\nguessed the Graph arm and was wrong. What this path actually reaches is:\n\n [composio][scopes] kv_put failed: the module host policy was never\n published, so module 'tinymemory' cannot be loaded; ...\n\nThe module provider binds and does serve Graph; the cdylib is simply never\nloaded in a test binary that runs no boot sequence.\n\nPinned: the `[composio][scopes]` tag and the `kv_put failed` arm, which is\nwhat makes this a fail-closed assertion — the handler must refuse rather\nthan report a save it did not perform, and it must refuse on the write\nrather than on one of the other two grounds. Deliberately NOT pinned: the\nreason after the colon, which belongs to the module loader rather than to\nthis handler. Pinning another component's wording here is how the previous\nassertion came to be orphaned in the first place.\n\nSwept the rest of the suite rather than assuming this was the only one: of\n399 distinct long `.contains("…")` assertions under tests/raw_coverage, 202\nname strings absent from `src/`, but all 202 are fixture data — none was\npresent in `src/` at 2026-08-20 and removed since. Against unfixed main the\nsame sweep returns exactly one true orphan, this one, which is how I know\nthe method sees what it is meant to see.\n\nVerified: the target passes with the fix and fails without it, naming this\nassertion ("must fail CLOSED on the backing write ...").\n
M3gA-Mind committed 3 months ago
4ff4c44
feat(mcp): finish the per-config connection lookups (#5701)
Nguyen Thanh Dat committed 3 months ago
330be8d
feat(mcp): finish the per-config connection lookups (#5701)\n\n`connections::connect` resolves per-config via `host::for_config`, while the\nby-server-id lookups read the process-global `host::try_service`. A host that\nconnects through the facade could never see the connection it just made.\n\n`main` is already midway through the answer: `all_connected_tools_for_config`\nand `disconnect_for_config` both exist, and `disconnect_for_config`'s own docs\ndescribe this exact trap. Neither was present at `ac6454177`, the revision the\nissue was written against, which is why the issue reads it as one odd function\nout of eight rather than as a migration with two of seven done.\n\nThis finishes it — the same shape, next to each ambient counterpart:\n\n connected_overview_for_config\n server_tools_for_config\n is_connected_for_config\n auth_hint_for_config\n last_error_for_config\n\nAdditive, so nothing existing changes signature and no caller has to move.\n\nEach `Err` arm logs the workspace-resolution failure instead of folding it\nsilently into `false` / `None` / `Vec::new()`, which is the issue's second ask:\n"the service is not up" and "the server is not connected" should not be\nindistinguishable.\n\n`server_tools_for_config` breaks the mechanical `_for_config` suffix on purpose:\n`tools_for_config` would sit directly below `all_connected_tools_for_config` and\nread as its every-server sibling.\n\nTest: `per_config_lookups_see_a_per_config_connection` opens two workspaces so\n`try_service` has no honest answer, connects through the facade in one, and\nasserts the per-config lookups see it and that the other workspace does not.\nVerified discriminating — reimplementing one variant over `try_service` turns it\nred.\n\n`cargo test --features mcp --test mcp_registry_e2e` 17 passed.\n`cargo check --lib --features mcp` and `--no-default-features` both clean.\n
Nguyen Thanh Dat committed 3 months ago
d92f197
7f30132
2bfae8b
fix(tinyplace): only demote a 404 when nothing is provisioned locally\n\nReview follow-up on #5809.\n\nThe first revision demoted every 404 from the two `signal_key_status` probes,\nwhich silenced a state that is not benign. `signal_provision` writes the local\nstore *before* its network calls, so local-keys-without-remote means the upload\nnever landed or the backend lost the record. In that state the agent believes\nitself ready — `ensure_signal_keys_published` derives readiness from the local\nstore and the directory card, never from remote health — so the supervisor\nstops probing while peers keep 404ing on the bundle, and the warning this PR\nremoved was the only signal.\n\n`is_first_run_gap(e, has_local_keys)` now gates the demotion: quiet only when\nnothing has been provisioned locally. With local keys present the same 404\ntakes a warn arm that says which half is missing. This is the narrower of the\ntwo remedies the review offered; folding remote health into the readiness\ndecision would change `ensure_signal_keys_published`'s retry semantics, which\nthis PR deliberately leaves alone.\n\nAlso from review:\n\n- Reset `not_discoverable_cycles` on the orchestration-disabled branch. Cycles\n spent opted out are not failed publication attempts, so carrying the count\n across an opt-out let one failure after re-enabling trip the threshold\n immediately.\n- Redact `agent_id` in the four new log lines via `util::redact::redact`, per\n AGENTS.md "never log secrets or full PII". No new line emits a full\n identifier.\n\nTests: two more cases pinning that local keys defeat the demotion and that\nlocal state never rescues a non-404.\n
M3gA-Mind committed 3 months ago
27d53c3