The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Commits on main
fix(memory): keep the exit path's tests off the process-global state\n\nThe exit-path tests that landed with #6017 called the process-wide\n`shutdown_for_exit()`. In a test binary that is every other test's cached\ndriver (snapshotted, shut down and evicted mid-flight — the next lookup\nrebinds to the fallback and reads an empty store), the whole shutdown-hook\nregistry (drained and run, the shared memory engine's own shutdown hook\namong them), and the process's exit gate (raised, so every concurrent bind\nis refused). The coverage lane failed on a read_rpc test this branch does\nnot touch, and the same pairings failed locally on main.\n\nProduction behaviour is unchanged. `shutdown_for_exit()` is now the gate\nstep plus `run_exit(cached_bindings(), take_hooks())`, and the tests drive\n`run_exit` with bindings and hooks of their own. `core::shutdown` gains\n`take_hooks`, `run_hook_list` and `boxed_hook` (the signal path keeps its\nsequential `run_hooks`); the gate is an `ExitGate` with the process's\ninstance in a static, so the gate test exercises an instance of its own\nand the eviction test needs none. The test-only gate seams are gone.\n\nVerified: `memory::exit_tests` beside `memory::binding` three times and\nbeside `memory::read_rpc` twice, all green; both pairings failed before.\n Shanu committed 3 months ago
3124376 fix(security): stop `resolve` handing back a secret that `Debug` prints\n\n`resolve` returned `Zeroizing<String>`, which wipes on drop but renders the\nvalue: `Zeroizing` is a `#[derive(Debug)]` tuple struct\n(`zeroize-1.9.0/src/lib.rs:602-604`), and a derived `Debug` prints the field\nwhatever its visibility, so `format!("{secret:?}")` yields\n`Zeroizing("s3cret")`.\n\nThat made the module incoherent. It redacts the credential *name* through a\nmanual `Debug`, refuses to name it in any error, and classifies `KeyringError`\nrather than formatting it — then handed back a type that prints the *value*\nthe name refers to. A single `tracing::debug!(?secret, ...)` at any future\ncall site would have undone all of it, and this is the cheapest moment to fix\nit: nothing calls `resolve` yet, so changing the return type costs no caller.\n\n`ResolvedSecret` wraps the `Zeroizing<String>`, keeping the wipe-on-drop, and\nadds the half it lacks — a manual `Debug` rendering `<redacted>`. The value is\nreachable only through `expose_secret()`, named for the `secrecy` crate's\nconvention so every disclosure is greppable in an audit. Deliberately no\n`Deref`, no `into_inner` and no `PartialEq`: each is another exit the type's\nname does not mention.\n\nTwo tests. One pins the redaction and that `expose_secret` still returns the\nvalue. The other guards the *premise* — that `Zeroizing`'s own `Debug` leaks —\nso if zeroize changes it, the wrapper's justification is re-examined rather\nthan silently carried. That is the same shape as the `keyring_error_kind`\nguard added in the previous commit.\n\nAlso documents in the module header that the redaction promise covers the\nreturned type, and links the one part it does NOT cover (`keyring::get` logging\nits `key=`) to the open question on #5372, so a reader learns the boundary from\nthe code rather than from a review thread.\n\nTests: 16 -> 18, all green.\n Maciej Myszkiewicz committed 3 months ago
568afe3 fix(memory-sources): keep a sync's live state when the Sources screen goes away\n\nStart a Gmail sync on Brain › Sources, switch tab or page, come back: the\nprogress bar was gone and the row showed its last-synced state, as if the\nsync had stopped. It had not. The core runs the sync in a detached task and\nkeeps narrating it over the socket; the screen kept the resulting state in\ncomponent state, with its window listener registered in an effect, and\nBrain unmounts the screen off the Sources tab. The state went with it,\nevery stage event during the absence landed on nobody, and on remount\nnothing could rehydrate: the status list carries chunk counts and\nfreshness, and a connector still paging has written nothing yet.\n\nThe state now lives in a module-level store the screen reads through\n`useSyncExternalStore`, with the window listener installed once for the\nlife of the page. A screen that mounts mid-run finds the bar where the run\nis, and a run that ended while no screen was showing lands as the row's\nresult chip. The screen keeps only the toast for a run that ends while it\nis mounted.\n\nThe core now also says what it has in flight: a bus subscriber beside the\nsync-stage bridge remembers every stage that names a source (a non-terminal\nstage puts the source in flight, `completed` or `failed` takes it out, an\nentry without a terminal stage goes stale after a ceiling, since the bus's\nlocal delivery can drop under lag), and `memory_sources.status_list` carries\nit as `sync_stage` and `sync_detail`. The store folds that in on every\npoll: a cold mount or an app reload mid-sync seeds the bar from it, and a\nbar whose terminal event was lost comes down once the core has reported\nthe row idle for longer than a grace period. Both fields serialise as\n`null` when nothing runs, so a client can tell "idle" from "a core that\ndoes not report it".\n\nCloses #6019\n Shanu committed 3 months ago
1bf0f0c fix(memory): evict shut-down drivers, run exit hooks side by side, scope the depth lookup\n\nReview follow-ups on the exit path and the sync pass.\n\nThe shell restarts the embedded server in place (permission refresh, app\nupdate). Exit shut every cached driver down but left it in the binding\ncache, so the next server was handed drivers whose workers had already\nstopped. Exit now evicts what it shut down (by identity, under the cache\nlock); a server starting again binds anew. A test walks the restart.\n\n`core::shutdown::run_hooks` awaits hooks in registration order, and the\nexit path runs it under a deadline: one hook that never answered would\nkeep every hook behind it, the memory lease release included, from\nstarting. `run_hooks_now` runs the drained hooks concurrently; the signal\npath keeps its order.\n\n`run_sync_pass` resolved the per-source sync depth through the process\nenvironment. A pass is bound to one workspace, and the global registry\npath can answer a caller bound to workspace B with workspace A's rows,\nwhich the registry's `_in` variants exist to prevent. The lookup now\nreads `list_sources_in(config)`.\n\nThe completed toast appended the "more to sync" note beside a nonzero\ncount but not the spent-budget note, so a pass that filed some mail and\nthen ran out for the day read as finished. Both notes ride beside the\ncount now.\n\nThe repair button carries an analytics id and a confirmed run reports\n`memory_repair_succeeded` with a count only, per the analytics rule.\n\nThe Tauri workspace lock still named tinyconnectors-bus 0.7.1; refreshed\nto 0.8.0 alongside the root lock.\n Shanu committed 3 months ago
bc131d6