Skip to content

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

Commits on main

cc99ba9
build(memory): cut the engine out of the test build\n\n`tinycortex`, `tinymemory-core` and `tinymemory-tinycortex` leave\n`[dev-dependencies]`; `memory-engine-seams`, `rss-bench` and `rss-bench-dhat`\nleave `[features]`; `memory/host_impls.rs`, `src/bin/library_profile/`,\n`src/bin/rss_bench.rs` and `memory/direct_engine_refs_tests.rs` are deleted.\nThe `[patch.crates-io]` entries for `tinycortex` / `tinycortex-api` go with\nthem — nothing names either by version requirement any more, and cargo\nreports the patches unused.\n\nThe order was: cut the manifest first, then fix what the compiler named. Doing\nit the other way round means hunting call sites by inspection, and inspection\nhad already been shown to under-count — `golden_fixture_rows_read_back_and_\nschema_is_stable_after_reopen` imports the engine zero times and still needed\nit, through this crate's own `memory::*` re-exports. With the dependency gone\nthe compiler enumerates the work instead: 204 errors, then a checklist.\n\nNot everything the engine served had to die with it.\n\n * `create_memory(&cfg, path)` with `backend: "none"` appeared 17 times — an\n engine call whose whole purpose was to obtain something that does not\n store. That is `memory::test_support::noop_memory()` now.\n * `MockMemory` was `pub use tinymemory_core::tool_memory::test_helpers`, and\n a `HashMap` behind a mutex never needed an engine to exist. Ported.\n * `NamespaceMemoryHit`, `MemoryItemKind` and `RetrievalScoreBreakdown` are\n contract types that happened to be reached through the engine's re-export.\n Repointed at `tinymemory_api::types`; no test lost.\n * `shared_memory_test_workspace()` is one agreed temp directory and stayed.\n Its neighbour `ensure_shared_memory_client()` booted a global engine\n client and did not.\n * `archivist::recap` and `archivist::tree_ingest` each had a `#[cfg(test)]`\n arm reaching the engine beside a `#[cfg(not(test))]` arm going through the\n driver. Both now use the driver arm in every build, so the tests exercise\n the path production does — which the divergence was preventing.\n\nWhat did die: 210 test functions whose assertions depend on what the *driver*\nreturns rather than on what this crate does with it. Chunk filtering, entity\nextraction, tree assembly, the ingest pipeline, connector-sync cascades. Every\none is engine behaviour, upstream owns it, and repointing them onto a fake\nwould have been worse than deleting them — they would then asserted the fake's\nfiltering, which is code written to make a test pass.\n\nTwo ratchets caught real breakage and both were fixed rather than silenced.\nThe bypass allowlist held a stale entry for the deleted `library_profile`, so\nthe list shrank, which is the only direction it may move. And the\n`sync_events_bridge` tests emitted nothing, because they had been getting\n`install_memory_event_sink()` as a side effect of the deleted seam installer;\nthey call it directly now. It is the host's own bus sink and names no engine.\n\nOne deliberate loss worth naming: `summary_budget_constants_match_the_engine`\npinned `recap.rs`'s copies of `INPUT_TOKEN_BUDGET` and\n`SUMMARY_OVERHEAD_RESERVE_TOKENS` against the engine's originals. Those\nconstants are not in the contract crate, so the drift guard cannot be\nexpressed here any more. The copies survive with no guard on them.\n\nRefs #6161\n
Shanu committed 2 months ago
8f7828f
fix(shell): make the sidebar drag regions cover their subtrees\n\nTauri's injected drag.js treats a bare `data-tauri-drag-region` (React\nrenders the JSX shorthand as `="true"`) as direct-hit-only: it drags only\nwhen the mousedown target *is* the marked element. Every unmarked wrapper\ninside one of those bands was therefore dead window chrome on macOS, which\nis why the top of the chat column drags and parts of the sidebar do not.\n\nTwo surfaces were marked that way:\n\n- `SidebarHeader` marks the header band but nests the icon row inside it,\n so the row's own box did not drag. Small today (three ~2px gutters), but\n any non-button content added to that row would have landed undraggable.\n- `AppSidebar`'s collapsed branch marked only a 28px strip. The column is\n SIDEBAR_ICON_WIDTH (56px) around 32px buttons, so ~12px either side of\n every rail icon, the `gap-0.5` bands and the `mt-1 pt-1` wrapper were all\n unmarked container — the band sitting directly between the traffic lights\n (`trafficLightPosition.y = 28`) and the rail's Home icon.\n\nBoth now use `="deep"`, which drags the whole subtree. The controls are\nunaffected: `isDragRegion` returns false on a clickable element before it\nreaches the `deep` branch, and every control in both surfaces is a real\n`<button>` (`Button`, `SidebarTrigger` and `SidebarMenuButton` all default\nto one, and `Tooltip` clones its child rather than wrapping it).\n\nThe 28px strip keeps its element — it also reserves the traffic-light\nheight, so removing it would slide the reopen trigger under the lights —\nand loses only its now-redundant attribute. `WindowDragBar` stays bare,\nwhich is correct for a band with no children, and now records why.\n\nThe tests asserted only that the attribute was present, which passed both\nbefore and after the bug. They now assert the invariant instead: a childless\nband is `"true"` and has no children; a container is `"deep"` and contains\nits controls.\n\nCloses #6126\n
Shanu committed 2 months ago
449193a
fix(ai-settings): send claude-code: for a Claude Code CLI route in the routing Test\n\n`currentProviderString` in the custom-routing dialog branched only on `cloud`,\nso every other non-managed source kind fell into the `ollama:` arm. A workload\nrouted to the Claude Code CLI therefore sent `ollama:<model>` to\n`openhuman.inference_test_provider_model`, which routes an `ollama:` prefix down\nthe local-runtime branch — the CLI was never spawned and Test could only fail,\nwhile the dialog above the banner read "Claude Code CLI · <model>".\n\nSave was unaffected: `serializeProviderRef` already switches exhaustively, so the\nstored route was always right and chat worked. Only Test was broken.\n\nReplace the ternary with an exhaustive switch on `CustomDialogSource['kind']`, so\na future source kind is a compile error rather than another silent `ollama:`\nfallback (verified: adding a fifth kind fails tsc with TS2366).\n\nThe `@<temp>` suffix is appended on the claude-code arm rather than dropped, as\nthe issue suggested. `TemperatureOverrideField` is rendered for every source\nkind, so a claude-code route really can carry an override and\n`serializeProviderRef` writes it into the stored route; a Test that dropped it\nwould exercise a different provider string than the one Save persists.\n\nThe cloud and local arms are byte-identical to before —\n`appendTemperatureToProviderString` and `joinModelAndTemp` share the same\nrounding and finite guards.\n\nAdds CustomRoutingDialog.test.tsx, which had no test coverage at all. The two\nclaude-code cases fail against the previous code and the cloud/local/managed\ncases pass in both directions, confirming nothing re-baselines.\n\nCloses #6125\n
Shanu committed 2 months ago
a056d91
test(memory): drop the integration targets that drive the engine directly\n\nSeven `tests/` targets exist to exercise TinyCortex and tinymemory-core\nthrough a thin host wrapper — the sync pipeline, the chunk and tree stores,\nthe thread and source suites. Between them they import the engine 84 times and\nassert what it stores, filters and summarises. Upstream owns every one of\nthose behaviours and covers them with ~2,800 tests of its own; these are\nengine tests that ended up in the wrong repository.\n\n`install_memory_host_seams` goes from the 25 targets that called it. It\ninstalls an embedder, a chat provider, a config loader, an NLP host, a\nscheduler gate and a shutdown hook into `tinymemory_core`'s process statics.\nWith no in-process engine there is nothing to install into, so the call is not\nmerely unnecessary — after the manifest is cut it will not resolve.\n\nOne test is deleted on its own rather than with a file:\n`golden_fixture_rows_read_back_and_schema_is_stable_after_reopen`. It is worth\nnaming because it is the counter-example to how the rest were classified. It\nimports the engine zero times, so an import census says it is engine-free —\nand it still fails without the seam, because it binds a global memory client\nand asserts the engine's SQLite schema survives a reopen. It reaches the engine\nthrough this crate's own `memory::*` re-exports.\n\n**An import census under-counts.** The remaining sweep has to be driven by what\nfails without the engine, not by what names it. The other five tests in that\nfile pass untouched and stay.\n\nRefs #6161\n
Shanu committed 2 months ago
58aa8a2
test(memory): bind a fake driver instead of an in-process engine\n\n`memory/test_support` built a real `TinycortexProvider` over a temp workspace\nfor 59 call sites, and that is what kept `tinycortex` and `tinymemory-core` —\n133k lines — on this crate's test critical path long after they left the\nproduct build (#5560).\n\nIts docstring justified the engine on the grounds that the only alternative was\nthe bus, and a `dlopen`ed module is a process singleton that hangs when a second\ntest loads it. That was a false choice: the third option is a driver that is\nneither the engine nor the bus. `tinymemory-conformance` now ships one, held to\nthe same contract as TinyCortex by `assert_provider` — the engine is run against\nthose same assertions upstream, so what a test observes here is contract\nbehaviour rather than one engine's behaviour.\n\nThe fixture is renamed with it. `install_tinycortex_for_test` installing a\nconformance fake would be the kind of name that costs someone an hour.\n\n45 tests are deleted rather than repointed. Each one fails against a driver that\ndoes not filter, rank, aggregate or extract — which is to say each one was\nasserting engine behaviour through a host wrapper, and upstream owns every one\nof those behaviours. Repointing them would have been worse than deleting them:\nthey would then assert the fake's filtering, which is code written to make the\ntest pass.\n\nThe line was drawn by measurement, not by reading. Binding a driver that answers\nempty separates the two populations by construction — a test that passes with no\ndata is asserting what this crate does, and one that fails is asserting data the\ndriver returned. 997 of 1030 memory tests passed that way, so the repoint is\nfree for everything that stays and the decision surface was 45 tests, not the\n~300 a file-by-file reading would have suggested.\n\nTwo of those 45 turned out not to belong there. `driver_memory_round_trips_\nthrough_the_bound_driver` and `experience_store_round_trips_over_the_bound_\ndriver` are about the binding rather than the engine, and they failed only\nbecause the fake had a defect — it accepted writes and discarded them\n(tinyhumansai/tinymemory#150). With that fixed they pass, and they stay.\n\nThe engine is still a dev-dependency at this commit, deliberately. Both drivers\nare constructible in the same build until the manifest is cut, which is what\nmakes the comparison above repeatable rather than a claim.\n\nRefs #6161\n
Shanu committed 2 months ago
e9e3b43
fix(composer): stop the DOM bridge racing Lexical and reordering typed text\n\nTyping `hello` into an empty chat composer produced `holle`. The first\ncharacter landed, the caret then stopped advancing, and every later\ncharacter was inserted at offset 1.\n\nMeasured in Chrome with a Selection/Range probe and a MutationObserver,\nper keystroke:\n\n ArrowRight (caret moves, text unchanged) -> [] no mutations\n 'e' (text changes) -> characterData on #text,\n childList on DIV\n {added: 1, removed: 1}\n\nThat second record is `root.clear()` plus a full rebuild inside\nreact-lexical's SyncPlugin, reached from its *runtime subscription* —\nthe path for an edit made by something other than the editor. An\nordinary keystroke should never take it.\n\nIt took it because this file writes to the composer store too:\n`onInputCapture` read `textContent` and pushed it in on a microtask.\nLexical had not reconciled yet, so the store moved `h` -> `he` through\nthe external path, the plugin read that as a foreign edit, and the\nrebuild restored the caret to the offset captured from the editor\nstate — which still held `h`. Hence a caret pinned at 1.\n\nThe bridge exists for jsdom, where SyncPlugin never commits editor state\nand it is the only path from a synthetic `input` to the store; #5763\ngated it rather than deleting it because 54 composer tests depend on it.\nSo gate it on the capability that actually distinguishes the two:\n`InputEvent.prototype.getTargetRanges`, which Lexical needs to reconcile\nfrom `beforeinput`, is absent in jsdom and present in every browser.\njsdom keeps the bridge unchanged; browsers stop writing, the rebuild\nstops happening, and the caret survives.\n\nVerified in Chrome against the live app: `hello` typed one key at a time\ngives `hello` with the caret at 5 and zero node replacements, and\nmid-string insertion gives `heXllo` with the caret at 3 (#5893's case).\nThe 132 jsdom composer tests still pass — and run in 19s instead of\n121s, because they are no longer racing.\n\nThe Playwright spec's header recorded the opposite conclusion: that the\ndefect was inside `ComposerPrimitive.Input`, with the host suspects\neliminated. Those suspects were eliminated correctly, but all of them\nlive in `ChatComposer`, which `/chat` never mounts — `Conversations.tsx`\nselects `assistantUiMainPanel`, and the textarea composer is in\n`legacyMainPanel`, reached only in mic-cloud voice mode. The real writer\nwas never among the candidates. Header rewritten to the measured cause,\nand a per-keystroke test added for the empty-composer case, which every\nexisting test missed by seeding text first.\n\nCloses #6163\n\nClaude-Session: https://claude.ai/code/session_016ipSkHi47nsBmnxX5dC4dA\n
M3gA-Mind committed 2 months ago
8aabee0
1a190b1