Skip to content

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

Commits on main

fix: serialize core and store teardown
Steven Enamakel committed 2 months ago
5e8c441
53aeede
fix: require effective library routes
Steven Enamakel committed 2 months ago
9c6bfde
fix(inference): key the managed 401 on whether the session was actually sent\n\nReview follow-up on #6206. The previous commit used `!managed_token.is_empty()`\nas a stand-in for "the request carried the app session token". That proxy is\nwrong in one case, and it reintroduced the very bug this PR exists to fix.\n\n`url_is_credential_safe` refuses to put a bearer token on a non-https,\nnon-loopback URL. With a live session and a misconfigured backend URL the\nrequest therefore goes out unauthenticated, and the 401 that comes back\ndescribes the URL, not the session — but `managed_token` is still non-empty, so\nthe catalog degraded to an empty list and hid the misconfiguration.\n\nTrack the fact instead of inferring it. `managed_session_attaches` is the single\nplace that decides, and its result is threaded into the 401 predicate:\n\n fn managed_session_attaches(managed_token: &str, url: &str) -> bool {\n !managed_token.is_empty() && url_is_credential_safe(url)\n }\n\nThe reduction is exact: whenever `managed_token` is non-empty it is the token\nbeing sent, so the caller's separate emptiness check is subsumed.\n\nExtracting it rather than passing a bare bool is what makes the case testable —\na bool argument cannot express "a live session that was withheld", so a test\ntaking one could only restate the fallback-key case. The new test drives the\nhelper over a matrix of safe and unsafe URLs, and a second test composes the two\nhalves to pin the end-to-end contract.\n\nClaude-Session: https://claude.ai/code/session_01TE9ECLDivW9LsMZmEkbK9F\n
Ghost Scripter committed 2 months ago
bbf5579
9c1748e
85a3828
3f62fc9
fbac28f
fix: harden concurrent store lifecycle
Steven Enamakel committed 2 months ago
0bd3c8a
fix(inference): stop the managed catalog swallowing real credential faults\n\nReview follow-up on #6206. The signed-out degradation added earlier was too\nbroad in two places, and hid faults the picker should surface.\n\n1. A 401 against the provider-scoped fallback key was read as "stale session".\n `managed_401_means_signed_out` keyed only on `auth_style == OpenhumanJwt`,\n but a self-hosted entry with no session sends its own API key instead. A\n wrong or revoked key then produced a silently empty dropdown rather than an\n actionable error. It now also requires that the request actually carried the\n session token.\n\n2. A credential-store failure was reported as an empty catalog.\n `require_live_session_token` flattens "signed out" and "could not read the\n store" into one opaque Err, so a lock timeout or filesystem error became a\n successful empty list. Classify the session directly instead: only a\n genuinely absent or expired session degrades, and a store error propagates.\n\nClassifying directly meant losing the `SessionExpired` publish that\n`require_live_session_token` performs on the expired arm — without it an\nexpired token stays in the store with the scheduler gate open and nothing\nprompts a re-auth. Extracted that publish (dedupe gate included) as\n`publish_local_session_expiry` so both paths share one implementation;\n`require_live_session_token` is behaviourally unchanged.\n\nClaude-Session: https://claude.ai/code/session_01TE9ECLDivW9LsMZmEkbK9F\n
Ghost Scripter committed 2 months ago
a6017ac
c9620e3
fix: honor library host boundaries
Steven Enamakel committed 2 months ago
d3cd401
fix: continue conversation repair past unreadable threads
Steven Enamakel committed 2 months ago
8c0cfc4
e30940e
docs: record library concurrency coverage
Steven Enamakel committed 2 months ago
aa0dacb
da3db99
feat(agents): let an agent default to a managed OpenRouter model\n\nThe composer's picker (#6201) sets `composerModelOverride`, which is React state\nscoped to the current conversation — it resets on every launch, so there was no\nway to make a managed catalog model the default for new chats.\n\nAn agent profile's `model_override` IS that default: the composer sends\n`profile?.modelOverride ?? 'hint:chat'`, and it persists in agent_profiles.json.\nThe core already forwards a non-tier id verbatim to the managed backend\n(`resolve_managed_backend_with_model_override` applies model_override last, and\nits `None` arm forwards a raw id rather than collapsing it onto a tier), and the\nbackend accepts `openrouter/<author>/<slug>` when the passthrough is enabled. So\nthe plumbing was in place; only the selection UI was missing.\n\nThe agent editor's model dropdown now lists the managed catalog alongside the\nexisting hints and tiers, labelled by display name and charged price rather than\na bare slug. It reuses the same `listProviderModels('openhuman')` fetch the\ncomposer picker uses. An empty result — the backend returns one when the\npassthrough is off or the session is stale — simply omits the optgroup, so this\nis inert against a backend without it, and the free-text custom escape hatch is\nuntouched.\n\nA saved catalog id is not in KNOWN_MODELS, so the initial load flips the editor\ninto free-text "custom" mode for it; the catalog arrives after that load, so it\nis re-checked once available and the entry selected properly. That only ever\nclears custom mode — a genuine BYOK id the catalog does not contain keeps its\ntext box.\n\nClaude-Session: https://claude.ai/code/session_01TE9ECLDivW9LsMZmEkbK9F\n
Ghost Scripter committed 2 months ago
9185748