Skip to content

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

Commits on main

Pin v1.10.0 and route memory-source sync through the driver\n\nThe last of the three ways this branch broke sync by deleting the host's\nin-process engine, and the one that was not about Composio at all.\n\n`sources::sync::sync_source` reaches `engine::run_source_pipeline`, whose\nnon-Composio branch opens with `global::client_if_ready()`. With no host engine\nthat slot is empty, so "sync now" and "sync everything" failed for EVERY source\nkind — folders, repositories, RSS feeds, web pages — with "memory client is not\nready", raised inside a spawned task that logs rather than propagates.\n\ntinymemory#104 adds `MemorySourceSync::run_source_sync`, which the driver\nanswers by resolving the id against the registry it already reads and running\nthe same pipeline. Inside the module the global slot IS filled, because #100\nmade setup call `global::bind`, so routing through the driver is what makes this\nwork at all.\n\n`sync_rpc` also loses its own registry lookup. The driver resolves the id\nagainst the registry that carries the per-source budgets the pipeline applies,\nand a second read here is a second answer that can disagree about caps which\ncost money when they are wrong.\n\n`backend_api_url` (tinymemory#103) is now passed in the module config. Without\nit the proxied Composio branch builds its request against an empty base and\nfails inside the HTTP client with `builder error`, naming neither cause nor\nfield — which is exactly how it failed locally before the field existed.\n\n## What the audit found, and did not\n\nThe four remaining host reaches into the engine's sync layer —\n`reconcile::ensure_composio_sources`, `sync::derive_scopes`,\n`status::status_list` and `SourceStatus` — were checked against the same\nfailure: none touches the global client or a pipeline. They are registry and\nstatus reads, so they are safe where the sync paths were not.\n\nAll five pins move together, digests taken verbatim from the release's own\nchecksum.toml and verified back against it.\n
Shanu committed 3 months ago
3fd1de3
Route Composio sync through the driver, now that it can resolve a backend session\n\ntinymemory#102 gives `ComposioHost` a `session_bearer` member, so the proxied\nbranch of the engine's `composio_config` can reach this host for a bearer\ninstead of reading a snapshot that has none. That was the one thing keeping\nthese four call sites on the engine: the driver refused backend mode by design,\nand backend is this product's default, so routing them earlier would have broken\nmanual sync for anyone who had not switched to direct.\n\nThis host now serves that member from a LIVE config read, which is the whole\npoint of it being a bus call rather than a `ModuleConfig` field — the bearer is\na session JWT this host refreshes, and a value the module captured at load would\nwork until it expired and then read as a signed-out user on every sync.\n\nThe four sites move to `MemorySourceSync::run_connection_sync`, which drops the\nconfig argument the engine call took: the driver resolves its own. Each resolves\nits binding BEFORE spawning, so a driver that serves no sync is an error the\ncaller sees rather than a log line in a detached task nobody is reading.\n\n`slack::sync_status_rpc` moves to `source_sync_state`. Two shape changes, both\nrecorded at the call site: the contract answers `Option`, where `None` is a\nconnection that has never synced — the engine returned a freshly defaulted state\nthere, so `unwrap_or_default` reproduces exactly the all-zeroes row it produced,\nand skipping the row instead would drop a source from the report the moment it\nwas connected. And the state carries `synced_item_count` where the engine\ncarried the id set itself; same number, and the set was never read here for\nanything but its length.\n\nOne thing is genuinely lost, and it is logged rather than dropped quietly. The\ninitial-sync failure arm used to read `actions_called` and `provider_cost_usd`\noff the error. The contract has one error channel and the driver folds that\nusage into the message, because a partial-success shape is not available on an\nerror path — so the spend a failed run incurred is now in the text. It is logged\nwhole rather than parsed back out: re-deriving numbers from a message is how a\nlog line becomes a fragile API.\n
Shanu committed 3 months ago
c17de2d
test(agent): assert worker overlap structurally, not by substring\n\nAddresses four review threads. All four were right; the first two were\nright about the same underlying mistake.\n\nCodex was correct that the alpha/beta assertion was vacuous. Every captured\nrequest carries its full conversation history, so after the spawn turn the\norchestrator's OWN follow-up contains both `Find PARALLEL_*` strings inside\nthe prior assistant message's `tool_calls`. Searching the serialized body\ntherefore matched the echo, and one worker could be dropped with the test\nstill green. Measured rather than assumed: a run with one spawn and one\nchild shows the alpha prompt twice — once as the worker's request, once as\nthe echo.\n\n`canary_worker_request` now identifies a worker's own request by shape:\nlast message, `role == "user"`, content carrying the canary. The\norchestrator's follow-up ends with a `tool` result, so it cannot match.\n\nCodex and CodeRabbit were both correct that "each worker eventually issued\na request" is satisfied by strictly serial execution, which is the opposite\nof the property this test exists to pin. The mock now holds each armed\nworker's response until a second armed worker has arrived; overlap is\nrecorded only when two are parked at once. Serial execution parks on the\nfirst, expires, and leaves the flag clear. The old doc comment claimed\nconcurrency the assertions did not establish; now they do.\n\nCodeRabbit was correct that `spawn_subagent_description_redirects_fanout_to_parallel`\nstill required guidance for the retired tool. It is deleted rather than\nre-anchored, and the reasoning is left in its place: `spawn_subagent`\nsurvives in exactly one agent, `trigger_reactor`, whose whole spawn surface\nis `spawn_subagent` alone — no `spawn_parallel_agents` and no\n`spawn_async_subagent`. Pointing the redirect at the new tool would leave it\ndangling for its only caller. The defect is in the description itself and\nbelongs to #5757's author, so it is reported, not guessed at.\n\nEvery new assertion proven load-bearing, on the new assertions rather than\nthe old ones: dropping the beta spawn fails on the structural check;\nmaking overlap unreachable fails on the overlap check; removing\n`spawn_async_subagent` from agent.toml fails on the structural check.\n\nRefs #5757, 02d81f6cf, #4754.\n
M3gA-Mind committed 3 months ago
8cfabfb
Pin tinymemory v1.7.0 and route the sources, tree and flows reads through it\n\nv1.7.0 was cut to close the last gaps this migration had: two capability\nfamilies and a diagnosis member that the host had no way to ask for. Pinning it\nmoves all five places together — the eleven registry digests taken verbatim from\nthe release's own checksum.toml, the capabilities pin, the workflow version and\ndigest pair, and the vendored gitlink.\n\n`ModuleMemoryProvider` and `MemoryGuard` gain both families. The guard's tier\nchoices are deliberate: `run_connection_sync` and `rebuild_from_raw_archive`\nadmit as writes because they fetch and ingest, the rest as reads, and\n`ingest_coding_sessions` carries the egress flag because the request holds the\nsession transcripts themselves.\n\n`sources/rpc.rs` is fully routed — the coding-session pipeline, raw-archive\ncoverage, the sync audit log and the cost model all now go through the contract,\nwhich is what v1.7.0 existed for. Three deltas are recorded at their call sites\nrather than left to be discovered: the audit log is a capped read where the\nengine returned the whole file, an unreadable log is now an error instead of an\nempty list that read as "no syncs have run", and the monthly cost total carries\na `totals_complete` flag that is only true when a row older than the month came\nback to prove the read crossed the boundary.\n\n## What was reverted, and why it matters more than the count\n\nThe four composio sync call sites were routed onto `run_connection_sync` and are\nnow back on the engine. `EngineRuntimeConfig::session_token()` answers\n`NO_BACKEND_SESSION` by design, so the driver refuses backend-mode composio —\nand `default_composio_mode()` is backend. Routing there would have broken manual\n"sync now" for every user who has not switched to direct mode, silently, because\nthe failure is a refusal the spawned task swallows into a status line.\n\nTheir ratchet entries are restored with that reason recorded, so the next person\ndoes not spend the same afternoon rediscovering it. Four references stay for a\nreal cause rather than being cleared by an edit that moves the count and not the\ncoupling.\n\n## Ratchets\n\nSeventeen `direct_engine_refs` entries and seven `bypass_allowlist` entries are\nstruck because those files no longer reference the engine or no longer bypass\nanything. Three `BYPASS_PATTERNS` needles are retired rather than renamed —\n`active_memory_client(`, `global::client(` and `.memory_handle(` all named ways\nof getting an undecorated client out of the process-global engine slot, and that\nslot no longer exists, so there is nothing to rename them to. The module docs say\nso, because a needle that matches nothing is a guard that guards nothing.\n\n`sources/rpc.rs`'s null-driver test moved to a sibling `rpc_tests.rs`. The\nscanner skips `*_tests.rs` by path but not an inline `mod tests`, and\nconstructing a null driver to prove a refusal names it is not a production\nbypass — but the list it guards may shrink and must never grow, so the honest\nfix is to put the test where the repo already puts tests.\n
Shanu committed 3 months ago
67b5050
test(agent): re-anchor the fan-out tests on the async spawn surface\n\n`main` has been red since #5757 (`02d81f6cf`), which retired six sub-agent\ntools from the orchestrator — `spawn_parallel_agents`, `wait`, `wait_loop`,\n`wait_subagent`, `steer_subagent`, `close_subagent` — cutting the surface\nfrom 11 tools to 3. That was deliberate and is pinned both ways in\n`agents/loader.rs`: three tools required, the six asserted absent. Two test\nsites were still written against the retired fan-out tool.\n\nNeither is deleted. The property they protect still holds; only the\nmechanism moved, from one dedicated fan-out call to several ordinary async\nspawns issued together.\n\n`parallel_subagent_fanout` now scripts one assistant message carrying two\n`spawn_async_subagent` calls — the "issued together" shape, which the\nsingle-call helper could not express — and asserts both workers were\nactually dispatched. It asserts on the captured upstream requests rather\nthan on the synthesis text: the children are detached and race the\norchestrator's own reply for the global scripted FIFO, so anything keyed on\nscript order is a coin flip. What each worker was asked is deterministic;\nwhen it asked is not.\n\nThe other half of the old assertion — both results reaching the user — is\nnot asserted here and the test says why. Results now return through\n`background_delivery`, which is idle-gated and debounced onto a later\nsystem turn, and it is registered from `bootstrap_core_runtime`, which\n`boot_stack` does not call. No delivery turn can fire in this harness.\n\n`orchestrator_parallel_fanout_routing` anchored on the retired tool name,\nso it asserted against a prompt that no longer mentions it. It now pins the\ncurrent guidance — the concurrent primitive, that fan-out is several spawns,\nand that they run concurrently — which is the same anti-pattern guard #4754\nadded, against the tool that exists. A second test pins the other half of\nthe contract: the prompt must not teach a tool `agent.toml` retired, because\na prompt teaching an uncallable tool costs a turn to discover.\n
M3gA-Mind committed 3 months ago
656488f
Route the remaining engine-handle, tree and archivist paths through the contract\n\nTwenty-two more production references gone. The last `global::init` sites in\n`memory/ops`, `agent/experience` and the session builder now resolve the bound\ndriver instead of booting an engine, and the archivist, tree and tool-memory\nshims repoint at the contract crate.\n\nTwo findings worth recording, because both are places where making the number\ngo down would have been the wrong move.\n\n`memory/sources/rpc.rs` did not move and cannot yet. Its ten references span\nfour engine-owned surfaces — the coding-session pipeline, raw-archive coverage,\nthe sync audit log and the sync cost model — and none has a contract member;\neach symbol is defined in the engine crate rather than re-exported from\nsomething this manifest already takes. Verified against the contract at HEAD,\nwhich leads the pinned release, so an absence there is an absence in the pin.\n\nTwo of those, `read_audit_log` and `estimate_cost_usd`, ARE reachable through an\nexisting host shim. Routing them that way would take the file off the scanner\nand remove no coupling at all — which is exactly what the ratchet's own docs\ncall the one edit that would make the lint lie. Left alone deliberately.\n`estimate_cost_usd` was also not copied host-side: the same constants back\n`SyncAuditEntry::effective_cost_usd`, so a copy is a second price that drifts\nfrom the one audit rows were written with.\n\nThe ratchet's reason string for that file was itself under-describing the work,\nnaming two of the four surfaces, so it is corrected here.\n
Shanu committed 3 months ago
36579b7
8f62726
Pin tinymemory v1.6.0, hand the sync loops to the module, and move the golden fixture out of the library\n\nv1.6.0 carries the periodic composio and workspace-source sync loops, so the\nhost stops starting them. That was not tidying: `services.rs` was starting\nENGINE code in this process, reached through a `pub use` shim, against the\nengine this branch stopped booting — so the loops would have failed with\n"memory client is not ready", and the provider-profile writes underneath them\ndegrade silently rather than erroring. Restoring either call would be worse than\na duplicate: the cdylib carries its own copy of the engine crate, so each loop's\n`OnceLock` is a different static from this process's and two pairs of loops\nwould run over one store, neither able to see the other.\n\n`modules::ops` now passes the three fields those loops need. Without the cadence\nthe module answers manual-only and skips every source in silence; without the\ncomposio mode its credential branch is never selected. All three are\n`#[serde(default)]` upstream, so an older module ignores them rather than\nfailing to load.\n\nThe golden-workspace fixture moves from `memory/store_golden.rs` to\n`tests/support/memory_golden.rs`. It was `pub mod` — not `#[cfg(test)]` — so it\ncompiled into the shipped library and its seven engine references were\nproduction references, keeping the crate in the product graph to seed a test\nfixture. Its own doc justified living in-crate by needing `pub(crate)` reach an\nintegration test lacks, naming three crate-private escape hatches. That was true\nbefore the memory extraction and is not true now: all three live in\n`tinymemory-core`, a different crate, where crate-privacy never applied to this\none either way.\n\nNineteen `direct_engine_refs` entries and six `bypass_allowlist` entries are\nstruck, because the files no longer reference the engine or no longer bypass\nanything. Both lists are evidence, and an entry that outlives what it described\nmakes them evidence of nothing.\n\nEpisodic writes gain the test that was missing: `RecordingProvider::insert_event`\ndiscarded the event instead of recording its content, so no assertion could see\nwhat the driver was handed — which is why the missing `redact_outbound` on that\npath went unnoticed in the first place.\n
Shanu committed 3 months ago
012d204
1bf2037
Stop booting the second in-process memory engine\n\nThe host booted two memory engines over one SQLite file: the loaded TinyMemory\nmodule, reached over the bus, and a second in-process copy of the engine crate.\n`context.rs` created both in the same `if plan.memory` block. This removes the\nsecond one and every production path that depended on having a handle to it.\n\n`global::init` is gone from the boot site, from login, logout and revalidation,\nand from the CLI. The tree had already argued for this — `memory/binding.rs` and\n`context.rs` both say the workspace-keyed map supersedes the process-global slot\n— and this executes it. The login/logout sites needed no replacement warm: the\nbinding accessor keys on the workspace dir and the subsystem config, both of\nwhich those sites already re-point.\n\n`host_impls.rs` is the host side of seam traits the ENGINE declares, so it exists\nonly for a build that embeds one. It moves behind a gate rather than being\ndeleted, because the test suite legitimately still embeds the engine.\n\n## Why the gate is a feature and not `#[cfg(test)]`\n\n`#[cfg(test)]` does not reach integration tests — a target under `tests/` is a\nseparate crate that links this one as a normal dependency and never sees it. Ten\nof those bind the in-process TinyCortex driver, so a bare `cfg(test)` compiled\nthe seams for unit tests and left every integration test unable to name them.\n\n`memory-embedded-test-seams` is therefore default-OFF, absent from\n`product-features.txt`, and enabled only by `scripts/test-rust-with-mock.sh`.\nForwarding it to the desktop shell would put the engine back into the shipped\ndependency graph, which is the one thing this work exists to prevent.\n\n## The CLI\n\n`openhuman memory ingest` and `query` route through the binding. The ingest\nreport is narrower than it was and the code says so at the call site: it used to\ncall the engine's `ingest_doc` and print the extraction tally that returned —\nchunk, entity, relation, preference and decision counts, the model and the\nextraction mode. The contract's `put_document` answers a document id and\n`IngestOutcome` carries only written/skipped counts and ids, so there is nothing\non the wire to print those from. The extraction still happens; only the report\nshrank. Widening it is a contract member and a release, not a host change.\n\n`query` renders JSON because the contract answers a structured\n`NamespaceRetrievalContext` where the engine handed back a rendered string —\na scripted caller can read it, and it cannot silently diverge from what the\ndriver returned.\n\n## Not finished\n\nProduction references are down from 137 to 83, and dropping the two crates from\n`[dependencies]` still fails with 99 errors across about thirty files, so the\nengine cannot leave the graph yet. `flows/ops.rs`, `memory/sources/rpc.rs`,\n`store_golden.rs` and `read_rpc/admin.rs` are the heaviest remaining, and\n`store_golden.rs` needs a contract write door it does not have.\n
Shanu committed 3 months ago
bafc232