The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Commits on main
fix(security): make the credential_ref gate order structural and name-free\n\nFour review findings on the `credential_ref` resolver, all in the same\narea: the module promised a gate order and a redaction contract that its\nown code did not fully keep.\n\n**The availability probe ran before consent could refuse.**\n`preflight(check_secret_access(), keyring::is_available())` evaluates both\narguments before the function is entered, so a `ConsentRequired` or\n`Declined` decision still reached `is_available()` — whose first call is a\nreal backend round-trip, since `keyring::ops`' availability cache starts\nempty. The keychain was therefore touched on exactly the paths the gate\nexists to stop. `preflight` now takes availability as `impl FnOnce() ->\nbool`, which makes the order a property of the code rather than of the\ncall site, and is testable: a `Cell`-backed probe asserts it is never\ninvoked after a refusal, and *is* invoked after `Proceed` so the gate\ncannot pass vacuously.\n\n**A declined prompt was reported as a pending one.** `PolicyDecision` has\nthree variants and `!= Proceed` folded two of them together, telling an\noperator who had already said no to wait for a dialog that will never\nappear. `preflight` now matches exhaustively — so a variant added upstream\nis a compile error here rather than a silent fold — and `Declined` maps to\na new `ConsentDenied`.\n\n**`KeyringError` was formatted into a warn-level log.** Its `Display`\ninterpolates the key (`"OS keychain error for key '{key}'"`), and so does\n`diagnostic()`, which is `{self:?}`. The module's own docs called this out\nas the sharp edge and then logged it anyway, writing the credential name\nto retained logs while returning a redacted error. A private\n`keyring_error_kind` now classifies the failure into a fixed label; the\ntest pins both that the label is name-free and that the error's own\nrenderings still are not, so the premise cannot rot silently.\n\n**`UnsupportedScheme` echoed operator-typed text.** The scheme is whatever\nprecedes the first colon in a hand-edited `config.toml`, not fixed\nvocabulary as the doc claimed: `sk-abc:123` parses as the scheme\n`sk-abc`, which put a fragment of a pasted secret into a string rendered\ninto `subsystems_status`. The variant is now payload-free — with exactly\none scheme defined, naming the expectation is the actionable half — and\nparsing uses `eq_ignore_ascii_case` so the normalised form is never\nmaterialised at all.\n\nNo behaviour change outside this module: nothing calls it yet, and the\nexternal-driver refusal in `memory/binding.rs` is untouched.\n\nTests: 13 -> 16, all green.\n Maciej Myszkiewicz committed 3 months ago
6b3df9d fix(tinyagents): deliver TurnCompleted instead of dropping it on a full channel\n\n`AgentProgress` rides a bounded 256-slot mpsc whose producer is `try_send`, so\nevents are dropped when the consumer is behind. The terminal `TurnCompleted` was\nemitted through that same lossy path as `let _ = sink.try_send(...)`.\n\nThe web-chat progress bridge sets `parent_completed` on `TurnCompleted` and on\nnothing else. When the event is dropped the bridge falls out of its loop on\nsender-drop with `parent_completed == false`, records the run as `interrupted`\n("progress bridge exited before turn completion") and never emits `chat_done`.\n\nThe turn itself has already succeeded at that point: the journal records\n`run_completed`, and the reply is persisted to the journal, the session\ntranscript and the memory tree. Only the user-visible thread misses it, so the\nUI shows a tool running and then silence forever, while the agent reads its own\nreply back as context on the next turn and behaves as though it had answered.\n\nOnly tool-heavy turns are affected, because only they generate enough events to\nfill the buffer. Observed: turns with 5 tool calls were reliably lost while\n0-tool turns always completed.\n\nBlocking is safe at this call site specifically. It is guarded by\n`subagent_scope.is_none()`, so it runs only on a parent turn that nothing is\nawaiting. The sub-agent stall documented on `harness::session::tool_progress::emit`\nrequires parking a *sub-agent's* loop while the orchestrator awaits its tool\ncall, which is unreachable here. Deltas and sub-agent lifecycle events keep the\nlossy `emit` path deliberately.\n\nVerified against a self-hosted core: a 16-tool turn now completes and emits\n`chat_done`, where 5 tools previously produced `interrupted`.\n MuscleGear5 committed 3 months ago
d43b0f2 test(e2e): assert the prose-prompt create succeeds; narrow the schemaless tolerance\n\nBoth reviewers flagged the tolerated-error pattern in the strict-create accept\ntests. Probing the running stack shows they are right about one of the two and\nwrong about the other, so the two are treated differently.\n\nThe prose-prompt fixture is a trigger plus one agent node — no bindings, no\nconnections, no external-tool args — and the create demonstrably SUCCEEDS,\nreturning a flow id. The old `if let Some(refusal)` form would have gone green\non a structural error, a transport failure or a renamed diagnostic, and green\nagain if no refusal came back at all, proving nothing either way. Now asserts\nassert_no_jsonrpc_error plus the saved flow's name and a non-empty id.\n\nThe schemaless fixture is NOT the same case, contrary to the review note that\nit shares the pattern. It legitimately trips a LATER, unrelated gate: strict\nmode refuses it because the Slack node's `channel` arg binds to an upstream\nfield that resolves to null under a sandboxed dry run. Asserting success there\nwould fail. The original tolerance was still too broad though, so it is now\nnarrowed to require a strict-validation refusal specifically — closing the\nstructural/transport false positive the reviewers were pointing at, without\nasserting an outcome the graph cannot produce.\n\nVerified: 4 passed, cargo fmt clean.\n M3gA-Mind committed 3 months ago
cbcba2b test(e2e): backfill coverage for the embeddings dimension probe and the flows authoring gates\n\nTwo of the five gaps from the e2e coverage audit, in the lane that matches\neach change and with every assertion revert-checked.\n\nopenhuman#5859 — tests/embeddings_rpc_e2e.rs\n `embeddings_update_settings_adopts_custom_endpoint_native_dimension`\n configures dimensions: 1024 against a mock returning 3-wide vectors and\n asserts the save is not refused and that get_settings afterwards reports 3.\n The existing custom-endpoint test configures 3 against a 3-wide mock, so\n "honoured the guess" and "discovered the native width" produce the same\n number there and its dimensions == 3 assertion cannot separate them — which\n is precisely the #4056 case.\n\nopenhuman#5846 — tests/json_rpc_e2e.rs\n Four cases driving flows_create with strict: true, which reaches\n strict_gate -> run_builder_gates -> validate_binding_resolvability ->\n tinyflows::gates::failures. ops_tests_part_06_tests.rs already pins the gate\n function at unit level; what nothing covered is that the evicted gate is\n still WIRED into the strict RPC path. The eviction moved the implementation\n out of this repository, so the wiring is exactly what can now rot silently.\n\n - refuses_binding_to_undeclared_agent_field\n - accepts_binding_to_schemaless_agent (the deliberate carve-out)\n - accepts_prose_prompt_beside_real_messages\n - still_refuses_prose_prompt_without_messages\n\n On the carve-out: #5846's summary says a tool_call arg binding to a\n "schema-less agent" is refused. The gate deliberately does the opposite —\n gates/mod.rs treats a missing schema as unverifiable rather than invalid,\n and tinyflows' own unit test pins that. These tests follow the implemented\n contract, and the carve-out has its own case so tightening it fails loudly.\n\nRevert-checks, each confirming the failure names the new assertion:\n - final_probe_dims forced to keep the guess -> the 5859 test fails on\n "must adopt the endpoint's native vector width (3), not the guessed 1024".\n - both gate carve-outs reverted -> the two acceptance tests fail, the two\n refusal tests still pass.\n - agent_prompt_failures + agent_schema_failures unwired from failures() ->\n the two refusal tests fail, the two acceptance tests still pass.\n\nTests only. No production code, no submodule pin, and no gate weakened.\n M3gA-Mind committed 3 months ago
77347a4