/docs(.md) and /llms.txt still explained own_product routing with
"(rally.*, menivor.*)" and a CLI example calling rally.email.verify --
real copy, but still naming an unintegrated product (0 rally tools
deployed). Narrowed the own_product examples to menivor.* only and swapped
the CLI example to a real, currently-reachable tool (menivor.video.status).
page_shell() builds the markdown twin link as {canonical}.md, which works
for /pricing.md and /docs.md, but for the root path (canonical == base +
"/") that produces base + "/.md" -- a real 404, since the homepage's
markdown twin is actually served at /index.md. Special-cased path == "/"
so the <link rel="alternate" type="text/markdown"> on the homepage points
at the real route.
Real third-party MCP clients (Superhuman x3, Flowy, "Toffu") registered via
DCR and tried to sign in, but 0 ever completed: /oauth/authorize's sign-in
fallback was a form asking a human to paste a raw Scribase session token,
which no real user can produce. A redirect to console.scribase.com's login
was considered and rejected (plans/railyard.md 2026-11-12): console's own
session cookie is host-only and differently named (ry_session, not
scribase_session) and there is no cross-domain bridge, so that redirect
would just strand the user on the wrong subdomain.
Real fix: Toolgate now does its own two-step email-code sign-in, entirely
on toolgate.scribase.com, against the platform's own public, unauthenticated,
enumeration-safe magic-link endpoints
(POST {api}/v1/auth/builtin/magic-link/request + /verify) -- confirmed live
to return session.token in the exact shape ScribaseIdentity.user_from_session
already verifies via GET /v1/account, so no new verification path was
needed, only a new way to obtain the token.
- IdentityProvider gets 3 new methods (supports_email_signin,
request_email_code, verify_email_code), all default-unimplemented (501)
so dev's StaticIdentity is unaffected.
- ScribaseIdentity implements them against the real magic-link endpoints.
- New routes POST /oauth/signin/email and POST /oauth/signin/code; sign_in_page
renders the real email form when the identity provider supports it (falls
back to login_url() redirect, then the old paste form, for other
deployments).
- Caught and fixed a real bug in the new code before it shipped: the
session+clear-email Set-Cookie pair was built as an array literal, which
axum's header IntoResponse impl inserts (last-wins), silently dropping the
session cookie -- a new integration test driving the full email+code+
redirect+consent flow caught it; fixed by appending both headers directly.
- 3 new unit tests (return_to/email/code validation) + 1 new end-to-end
integration test (wrong code rejected, right code opens a session, reaches
the real consent screen). cargo test --workspace: 0 failures.
Rally has 0 tools in the deployed catalog (hidden, no
SWITCHYARD_RALLY_TOKEN configured in prod) — the landing page, /docs.md
and /llms.txt still named it as an integrated "own product" in four
places (site.rs). Dropped "Rally" from all four so the copy matches what
is actually live: Scribase and Menivor.
Menivor's legacy /videos, /audio and /tasks/{id} routes are hidden under
MENIVOR_API_SURFACE=allowlist in production (confirmed live, 404 for every
caller). The real product surface is POST /api/v1/jobs + GET
/api/v1/jobs/{job_id}.
- menivor.video.render now POSTs /api/v1/jobs with layout fixed to
captions_only, so it never needs a paid HeyGen avatar plan (every other
layout is gated 402 sku_locked on the shared service account's free tier,
confirmed live against api.menivor.com).
- menivor.video.status now polls GET /api/v1/jobs/{job_id}, the same id
space render creates, and maps the new result_url field.
- menivor.tts.speak removed from the catalog (own.yaml + its capability
entry): there is no standalone TTS job on /api/v1/jobs, and the separate
POST /api/v1/media/audio gateway's flagship elevenlabs model can never
take a caller voice_id (AudioBody has no such field — confirmed by
reading app/domains/routing/providers/voice_gen.py), so it is a permanent
elevenlabs requires a voice_id failure for every caller regardless of
balance. The self-hosted tts/kokoro|chatterbox fallback's real
availability is unverifiable from Toolgate; shipping it would be exactly
the broken-tool-left-in-the-catalog outcome this fix exists to avoid.
Updated fixtures/contract tests for the new endpoints and response shape;
cargo test --workspace: 0 failures.
web.search.searxng called the internal products-net SearXNG host over plain
http and the egress client's https-only policy blocked it ("only https is
allowed: http://"). EgressConfig gets a new http_hosts: exact host:port
entries (never a wildcard) derived only from SWITCHYARD_SEARXNG_URL when it
is http -- those hosts, and only those, are also exempted from the
private/internal-address block (the whole point of allowing http for an
internal Docker-network service name). Every other host keeps the existing
SSRF policy unchanged: https only, no private IPs, no other internal hosts.
4 new egress tests cover the scoping (own host only, not via allow_hosts,
not via IP literal).
Separately, Toolgate's native Menivor adapter sent the platform credential
as `Authorization: Bearer <token>`, but Menivor's resolve_principal only
accepts a raw key via `x-api-key` (Bearer is Clerk-JWT-only there) -- a
protocol mismatch that made every menivor.* call 401 regardless of token
validity (confirmed live: the same real service-account key gets 401 via
Bearer, 200 against GET /api/v1/jobs via x-api-key). Added with_api_key()
(send the credential verbatim, no prefix) and switched menivor_render/
menivor_status/menivor_tts to it; left Scribase/Rally on with_bearer
unchanged. Catalog's menivor provider credential placement corrected to
match (x-api-key, no prefix) for documentation accuracy.
cargo test --workspace: 0 failures.
catalog.md and llms-full.txt showed {"ticker":"example"} for company.sec.filings,
which answers 422 provider_rejected_input. Every tool now has a manifest example.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The real, reproduced bug (found by the toolgate-mcp-listing pass earlier
today, documented but not fixed because the repo was claimed): /catalog.md
and /llms-full.txt -- the exact markdown surface llms.txt tells agents to
read first -- only ever listed Tool/Provider/Effect/Price, no parameter
names, while /catalog (HTML) already rendered a real example-derived curl
snippet per tool. An agent guessing a field name from the capability id
(domain.dns.lookup -> "domain") gets a verified-live 422 ("name" is the
real field) on a syntactically reasonable first try, only discoverable via
a second round-trip to GET /v1/tools/{id}.
catalog_markdown() now emits the same curl_snippet()/example_input() both
renderers already shared for HTML, so catalog.md and llms-full.txt (which
concatenates catalog_markdown's output) can never drift from /catalog
again. No change to catalog_page::html() or any pricing/schema data.
Verified: `cargo check -p switchyard-server` clean; live post-deploy check
in plans/railyard.md.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
docs.md/llms.txt said 422 means a schema error, but the live server also
returns 422 no_provider for a syntactically-valid call to an own_product
tool (rally.*, menivor.*) whose platform credential isn't connected on
this deployment -- verified live: POST /v1/tools/rally.company.enrich/call
with the catalog's own documented example body ({"domain":"stripe.com"})
422s with no_provider, same for menivor.video.status despite being priced
free in the catalog. catalog.md/llms-full.txt themselves have no wrong
field names (checked every example against each tool's real input_schema
live; all match) -- the real first-call trap is that an agent following
/catalog top-to-bottom hits a correctly-shaped but platform-credential-
gated call before reaching a free one. Docs now say so explicitly and
point at knowledge.wikipedia.summary/relay.chat.complete as the reliable
first call, and name GET /v1/tools/{id}'s routing.skipped as where the
real reason always shows.
Root cause (SWITCHYARD_RALLY_TOKEN/SWITCHYARD_MENIVOR_TOKEN platform
credentials not configured on toolgate.scribase.com) is a real infra gap,
not a docs bug -- out of scope here, logged in plans/railyard.md.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Closes the "Not done" item from plans/gtm/geo-2026-11-12/README.md: neither
toolgate.scribase.com nor mail.scribase.com served the IndexNow key file,
and mail.scribase.com had no llms.txt/robots.txt at all.
- apps/toolgate: toolgate.scribase.com already served llms.txt/robots.txt;
added the missing GET /7f3f677310caeed6257f96d8c72c8a0c.txt IndexNow key
route (same key already live on scribase.com/docs.scribase.com).
- apps/mail: added GET /llms.txt, /robots.txt and the same IndexNow key
route to mail-server's public router (mail.scribase.com had none).
Verified locally: cargo build -p switchyard-server and -p mail-server both
clean. Deployed for real (not under the *.ereboslab.com freeze): rebuilt
and recreated both containers (railyard-box for toolgate, box1 for mail),
curl-verified all new routes live and 200 on both public hosts.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a 1200×630 card (GET /og.png, compiled in via include_bytes, 1-day
cache) in the same visual style as scribase.com's og-v2.png, and wires
og:image / og:image:alt / twitter:card=summary_large_image / twitter:image
into the shared page_shell (/, /pricing, /docs) and the /catalog page.
Before: no og:image anywhere, so X/Telegram/Slack/LinkedIn previews were
text-only. The PNG is excluded from LFS by path so the distroless build on
railyard-box (plain git checkout) embeds real bytes, not a pointer.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- 301-redirect 6 llms.txt/llms-full.txt spelling/convention variants
(/llm.txt, /LLMs.txt, /llms, /.well-known/llms.txt, /llm-full.txt,
/.well-known/llms-full.txt) to the two real files, via a shared
redirect_301() helper (StatusCode::MOVED_PERMANENTLY, not axum's
Redirect::permanent which answers 308).
- Add <link rel="alternate" type="text/markdown" title="llms.txt"> to
page_shell()'s <head>, alongside the existing per-page canonical .md
link and footer llms.txt link.
- Add a real GET /robots.txt route (meta::robots_txt): explicitly allows
GPTBot/ClaudeBot/Claude-SearchBot/OAI-SearchBot/PerplexityBot/
Google-Extended/Applebot-Extended, disallows /admin and /v1/, points at
/sitemap.xml and /llms.txt. The app previously had no robots.txt route
at all (confirmed 404 direct to the app on :4200); the public 200 with
generic IETF content-signals boilerplate and no real directives was
Cloudflare's edge-level managed-robots.txt fallback filling in for the
origin's 404, not anything Caddy or the app served.
POST /v1/balance/topup always 503'd "billing is not configured for this
org" for every self-serve org: signup.rs creates orgs with
mint_account_id: None, and the only code path that ever set one was the
operator-only POST /admin/api/orgs, by pasting in an id created out of
band. No self-serve org could ever reach billing.
Adds MintTransport::create_account (POST /v1/accounts; Mint's AccountKind
has no serde rename_all, so the wire contract is "Org", not "org" --
confirmed against the real mint-server handler and the same mismatch
vend-mint-client already translates around) and
Store::set_org_mint_account (race-safe: a no-op if the org already has
one, so two concurrent first top-ups can't clobber each other's account).
routes::account::topup opens an account on the spot when an org has none
and persists it, which also backfills every pre-existing self-serve org
the moment it first tries to pay -- no separate migration needed.
cargo test -p switchyard-server: 44/44 passing, 0 regressions.
cargo clippy (switchyard-server/testkit/meter/store, --all-targets): 0 warnings.
GET /v1/account only ever returns subject (never email), so every real
Scribase-authenticated consent page showed a blank name. Falls back to
user.id, same pattern as ensure_starter_org's owner_label.
Live-verified against production: real signup + PAT + full OAuth consent
flow (register -> authorize -> approve -> token -> MCP tool call) all
succeeded end to end on toolgate.scribase.com.
SWITCHYARD_SCRIBASE_API_URL/_LOGIN_URL were unset in prod, so the identity
provider was the empty StaticIdentity and /oauth/authorize always fell back
to a "paste your session" form that could never verify anything -- OAuth
login for MCP clients was non-functional (reported 2026-11-12 DCR review).
Setting SWITCHYARD_SCRIBASE_API_URL alone exposed a second, previously
unreachable gap: /v1/auth/signup never links the org it creates to any
user identity, so even a correctly Scribase-authenticated user had zero
Toolgate memberships and the authorize/device pages dead-ended on "ask an
owner to add you" for every single sign-in, including the very first one.
ensure_starter_org() closes that gap: a Scribase-authenticated user with no
existing membership gets a default org + project + owner membership on the
spot, the same shape /v1/auth/signup already creates for itself. Reuses
signup.rs's slugify/random_suffix (now pub(crate)) instead of duplicating
the slug logic.
SWITCHYARD_SCRIBASE_LOGIN_URL is deliberately left unset: the console's own
safeNextPath only accepts same-origin relative paths, so a login_url-based
redirect would strand a signing-in user on console.scribase.com with no way
back to toolgate.scribase.com's /oauth/authorize -- worse than today's
working-once-API_URL-is-set "paste your Scribase personal access token"
form. Wiring a real redirect-based login needs a cross-domain session
bridge on the Scribase side; tracked as follow-up, not done here.
cargo test -p switchyard-server: 44/44 passing, 0 regressions.
cargo clippy -p switchyard-server --all-targets: 0 warnings.
Live check after 03e4cd21: the url crate accepts a literal '*' in a
host, so https://*.example.com/cb registered (exact-match meant it could
never redirect anywhere real, but it is still a wildcard on the books).
Refused by name now.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
rustfmt run on lib.rs/main.rs recursed into every module and rewrapped
16 files with no code change in them. Restored to their prior content;
the 10 files the DCR hardening actually edited keep their formatting.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Security report 2026-11-12: open DCR stays (MCP clients self-register),
but the consent step now carries the trust decision.
- Consent page marks dcr/cimd clients "Unverified app", shows the
redirect host (or "an app on this computer") as the thing to check,
says when the client registered itself, and warns that any app can
call itself Claude or Scribase. First-party CLI is labelled as such.
- admin scope can no longer be requested by dcr/cimd clients (authorize
and device flows); only the first-party CLI may hold it.
- redirect_uris: no userinfo, host required, <=2048 chars each, deduped;
error text spells the rules out.
- POST /oauth/register: per-address 10/10min + global 200/h sliding
window (429 + Retry-After), 16 KB body cap, client_name stripped of
control chars.
- Store: delete_client + prune_dcr_clients; server drops dcr clients
that never got a grant in 7 days or had none in 60, at start and
every 6 h.
- MCP serverInfo is scribase-toolgate / Scribase Toolgate (was
switchyard).
- Catalog: relay.chat.complete example uses
tensorzero::model_name::openai/gpt-oss-20b, which Relay accepts
(the old openrouter:: name returned 400).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Landing, pricing, docs, catalog, signup, llms.txt, ai.txt, openapi title and
the OAuth pages now say "Scribase Toolgate" and link to scribase.com/toolgate.
Canonical URLs follow SWITCHYARD_PUBLIC_URL, which moves to
https://toolgate.scribase.com on railyard-box. Internal crate/CLI names
(switchyard-*, sy) are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The 2026-11-11 public-site commit (336d13fa) added a real one-page /docs
(quickstart, auth, catalog, billing/metering) but POST /v1/auth/signup's
response still pointed docs_url at /catalog, the pre-existing pricing page --
a self-serve signup's first-ever outbound link should land a new developer
on the real docs, not the pricing table. Verified: cargo test -p
switchyard-server 43/43 passing, cargo clippy -p switchyard-server
--all-targets 0 warnings; re-ran the real local server (SWITCHYARD_STORE=memory)
and confirmed POST /v1/auth/signup now returns docs_url ending in /docs.
Toolgate had a real self-serve signup, catalog and billing engine but no
way for an outside developer to find or try it: `GET /` was unrouted
(404) and the only public page was `/catalog`. Adds `GET /`, `/pricing`
and `/docs` (each with a `.md` mirror), following the landing-page
convention already shipped for Vend (hero, launch-flow steps, feature
cards, pricing table, canonical/noindex markdown-mirror headers, llms.txt
Pages section, SEO meta/ld+json). Every number quoted (tool/capability
counts, free-vs-paid split, price range) is computed live from
`st.catalog`, the same source `/catalog` and `/llms.txt` already render
from, so it cannot drift out of sync with real pricing data.
`/sitemap.xml` and `/llms.txt`'s Pages section now list the new pages
alongside `/catalog`.
Verified against the real server running locally (SWITCHYARD_STORE=memory):
self-serve `POST /v1/auth/signup` creates a real org + project + a
per-org-scoped `sk-t0-` key end to end, the key calls a real tool
(Wikipedia summary) and `GET /v1/usage` reflects it scoped to that
project only; a second signup proves isolation (different org, different
key). `cargo test -p switchyard-server`: 43/43 passing, 0 regressions
(includes the existing `project_caps_stop_calls_with_429_naming_the_cap`
test, confirming the synchronous per-tenant spend cutoff in the request
path -- caps.rs's check-and-reserve-before-hold -- was already shipped).
`cargo clippy -p switchyard-server --all-targets`: 0 warnings.
scribase_url/rally_url/menivor_url being unset made config_url fail every
call regardless of auth kind (byo_required still needs a server-known base
URL, only the credential is BYO) — so scribase.*/rally.*/menivor.* catalog
tools were dead on every deployment that never set these three non-secret
URLs, including the live box. Default them to the real, live production
hosts (api.scribase.com, vcpeer.com, api.menivor.com) when unset, same
on-by-default rule signup_enabled already uses; explicit env still wins.
4 new unit tests in config.rs; cargo test -p switchyard-server 43/43 pass,
cargo clippy 0 warnings. Not deployed to railyard-box per the standing
no-default-deploys-to-ereboslab.com instruction — code default only.
The catalog page's own "Get a key" CTA is a clickable <a href> pointing
straight at this POST-only API path. Found by curling every link reachable
from the real /catalog page (same technique that already found live bugs
on Al-Sat and Bidstage): clicking that CTA as any real visitor would
produced a blank 405 Method Not Allowed with zero body -- a dead end on
Toolgate's one real conversion CTA. GET now serves a human-readable landing
page with the exact curl call and a link back to the catalog.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same pattern as the companion Vend commit, adapted to Toolgate's one real
public page. /llms.txt and /openapi.json already existed here; this adds
the pieces that didn't: a markdown mirror of /catalog, /llms-full.txt,
/ai.txt, and the ai-summary/markdown-alternate tags.
- GET /catalog.md: markdown mirror generated from the same st.catalog data
html() already renders from (not hand-copied, so the two can never
drift), text/markdown, noindex/follow, Content-Location + Link:
rel="canonical" back to /catalog.
- GET /llms-full.txt: the existing /llms.txt body (factored into a shared
render_llms_txt() so the two can't drift) plus the full catalog markdown.
- GET /ai.txt (ai-visibility.org.uk convention).
- catalog_page.rs's HTML head: <meta name="ai-summary"> + <link
rel="alternate" type="text/markdown">; a visible /catalog.md link added
next to the existing llms.txt/openapi.json links.
Verified for real: cargo build -p switchyard-server clean; cargo test
-p switchyard-server 2 lib + 35 + 2 integration tests, 0 regressions; a
throwaway test against the real harness (deleted before this commit)
proved /catalog.md, /llms-full.txt, /ai.txt all return 200 with the real
expected headers/content (including real tool ids like
rally.email.verify), /catalog's HTML carries the new tags, and a bogus
path still 404s. cargo clippy -p switchyard-server --all-targets
-D warnings: clean, 0 warnings.
toolgate.ereboslab.com/ 404s — /catalog is Switchyard's only real public,
indexable page (root has no route). It had a <title> but no meta
description, no canonical link, no Open Graph/Twitter Card tags, and no
structured data. /sitemap.xml 404'd (no route registered).
Added a meta description, <link rel="canonical">, og:*/twitter:* tags, and
a SoftwareApplication JSON-LD block to the catalog page, plus a
GET /sitemap.xml route listing only /catalog. /admin (401-gated operator
console) correctly stays out of the sitemap. robots.txt is a shared
Cloudflare-edge default across all *.ereboslab.com hosts (not app-owned
code) — confirmed correct (no Disallow), left untouched.
cargo build -p switchyard-server and cargo test -p switchyard-server --lib
(2 passed) both green.
The read-only cloudflare-api MCP connection was never the only Cloudflare
credential available — ~/products/.env's CLOUDFLARE_DNS_API_TOKEN is a
separate, real, write-scoped token. Created the four missing A records
(ledgerline/vend/toolgate/context-passport.ereboslab.com -> railyard-box),
reloaded Caddy, confirmed real Let's Encrypt certs obtained within seconds,
and verified every sub-app live over HTTPS through Cloudflare. Docs-only;
no application code changed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Switchyard/Toolgate had never been deployed anywhere — every prior session
(2026-10-16 audit, 2026-10-25 hardening pass) only ever ran it as a local
throwaway process against a local throwaway mint-server. This pass actually
deployed it: profile "toolgate" in the box's railyard compose stack, its own
Postgres database/role, a real KEK/JWT seed/admin token, wired to the real
Railyard Mint (shadow mode) with a real Provider-kind revenue account, and a
Caddy site (toolgate.ereboslab.com, DNS record pending — see README).
Verified live end-to-end against the deployed container: self-serve signup,
tool search, a real free Wikipedia tool call, MCP initialize/tools/list, the
sy CLI, and a paid-tool call that correctly read a real zero balance live
from Mint's own balance endpoint before refusing with insufficient_balance.
Documents the deploy in DEPLOY-SHARED-PLANE.md's topology/port/env tables
(toolgate alongside vend/turnstile/abacus) and in apps/toolgate/README.md.
No application code changed; this is the ops record of what's now live.
Every "Call it" curl snippet on the live /catalog page (the page a fresh
signup's docs_url sends a real developer to) hardcoded `{"input": {}}`
regardless of the tool's actual schema. A real developer copy-pasting any
of those snippets verbatim got an opaque 422 invalid_input on nearly every
tool with required fields -- 26 of 27, confirmed live against a running
switchyard-server. Same failure class as today's Turnstile bech32 bug: a
documented quickstart example that never actually worked.
Added Catalog::example_input(), used by catalog_page.rs's curl_snippet:
prefers the manifest's own documented example.input, otherwise derives a
placeholder covering every required property (handling anyOf alternatives
like ticker-or-cik, and pattern-aware string values so e.g. a `domain`
field gets "example.com" instead of a plain word that fails its own regex).
Verified live: rebuilt and ran switchyard-server with the in-memory store,
signed up for a real key via /v1/auth/signup, fetched the live /catalog
page, and replayed all 27 generated snippets verbatim as real HTTP
requests. Before the fix, the hardcoded body failed schema validation on
every tool with required input. After: 26/27 now pass validation and
return a real response from the real upstream (Wikipedia, arXiv, OpenAlex,
GitHub, HN Algolia, RDAP, DNS-over-HTTPS, Nominatim, Open-Meteo, Photon)
or a correct 402 from a real Mint hold attempt against a real mint-server
for the paid rally.email.verify path; the 1 remaining failure is a
legitimate byo_required/not-connected provider error, unrelated to input
shape. Also exercised the CLI (sy search/describe/call/balance/topup/cred/
bundle), MCP JSON-RPC round trip, and a real Mint-backed paid-call attempt
(real POST /v1/holds landing on a real mint-server, real 402) -- all
correct and unaffected by this change. cargo test --workspace: unchanged,
all green.
POST /v1/auth/signup creates an org, default project and a full-scope
sk-t0- key in one unauthenticated call, replacing the admin-token-
curl-only onboarding; SWITCHYARD_SIGNUP_DISABLED=1 reverts to it.
GET /catalog (human, with curl snippets) and GET /v1/catalog (JSON)
give every capability's live pricing and share the same signup flow.
Verified against a live switchyard-server (memory store): signup ->
authenticated project read and free tool search, validation errors,
the disable flag, and both catalog endpoints. cargo check/test clean.
POST /v1/credentials/oauth/{provider}/connect returns the provider's
authorize URL with PKCE S256 and a signed, expiring state (no server
session); the callback exchanges the code and seals the access token
(expiry in meta) and the refresh token as write-only credentials.
Credential resolution renews an access token that is about to expire.
Providers opt in with an oauth block; apps come from
SWITCHYARD_OAUTH_CLIENTS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cache hit or single-flight follower now pays price.cache_micros when
the caller is metered for the tool: caps are checked, a Mint hold is
placed and captured at once, and a Rago tool_call event goes through the
outbox. Free tools and the caller's own credentials still hit for free.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clippy --all-targets now reports zero warnings. Reworded the
reported_cost doc comment in price.rs, which the originality check found
matched a phrase in treg's models.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Per-tool caps now match a cap keyed by either the capability or a
concrete tool id, whichever name the caller uses (calling email.send
used to skip a rally.email.send cap and vice versa).
- Batches check per-tool caps and the daily send limit call by call; a
batch used to count as one send and skip tool caps entirely.
- Concurrent requests sharing an Idempotency-Key: only the first runs,
the rest get 409 idempotency_in_progress, so a raced retry can no longer
send or bill twice.
- Upstream error text that echoes an injected credential or the caller's
key is redacted before it reaches the response, audit log or logs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- scribase.auth.magic_link.send now fails closed when
SWITCHYARD_SCRIBASE_PROJECT_DOMAIN is unset; before, a caller could name
any project_url and receive the org's stored anon key in the apikey header.
- web.read classifies blocked, unreachable or failing pages as input
errors. Before, three SSRF probes (or any three bad URLs) from one caller
opened the shared circuit breaker and took web.read down for everyone
for a minute.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Multi-arch distroless Dockerfile (build context apps/toolgate), app README
with layout, configuration, bootstrap, usage and the MVP's deviations from
the spec, and a Switchyard row and section in the Railyard README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`switchyard` / `sy`: device-code login (token stored 0600, refreshed and
rotated transparently, no raw key on disk), search, describe, call
(JSON, @file or stdin input; pin, dry run, max cost, idempotency key,
cache bypass), balance, Dodo top-up, usage, audit log, keys (one key for
Relay and Switchyard), write-only credentials from stdin, SKILL.md bundle
push/install, project caps/policy/pins, and `sy mcp` forwarding stdio
JSON-RPC to /mcp. SWITCHYARD_TOKEN + SWITCHYARD_URL for CI. No telemetry.
Tests drive every command against a live local server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- switchyard-mcp: MCP JSON-RPC layer (initialize, tools, resources,
ping, batches) for streamable HTTP; tool failures come back as
isError results the agent can act on.
- switchyard-server: one pipeline for every call: validate (422 with
JSON Pointers, nothing spent), idempotent replay at zero cost (409 on a
changed body), cache and single-flight dedupe, per-project/key/tool
and daily-send caps (429 names the cap), Mint hold sized for the chain,
free-first routing with accepts filtering, token buckets and circuit
breakers, disclosed fallback (424 when every provider fails, nothing
billed), exact capture or release, and an atomic audit row plus outbox
(Rago tool_call events, Mint capture/release retries).
- Routes: search/describe/call/batch, BYO passthrough, keys minted in
Relay's key store, write-only credentials, SKILL.md bundles, project
caps and pinned MCP tools, usage with hash-chain proofs, balance and
Dodo top-up via Mint, /mcp with meta-tools and annotated pinned tools,
OAuth 2.1 (metadata, DCR, CIMD, PKCE, consent, device flow, per-tool
send/spend consent), /admin console, llms.txt and openapi.json.
- 28 end-to-end tests over fakes, plus a Postgres-backed run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Declarative HTTP adapter driven by the YAML manifests (SearXNG, Brave
BYO, Nominatim, Photon, Open-Meteo, Wikipedia, OpenAlex, GitHub, GLEIF,
DNS over HTTPS, HN Algolia).
- Native adapters: Relay chat (caller's key), Scribase query/branch/magic
link, Rally lead search/enrich/verify/send (idempotency key forwarded),
Menivor render/status/TTS, readability extractor, arXiv Atom, package
registries, SEC EDGAR with ticker lookup, RDAP via IANA bootstrap.
- switchyard-testkit: fake upstreams, fake Mint with AITP receipts, fake
Rago, and one provider-shaped fixture per catalog tool; contract tests
validate every tool's output against its capability schema, plus an
opt-in live smoke run (17 public tools passed live).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- switchyard-store: Store trait with in-memory and Postgres (sqlx)
implementations and one conformance suite; append-only hash-chained
calls table (trigger refuses UPDATE/DELETE) written atomically with its
outbox events and idempotency entry.
- switchyard-meter: Mint hold/capture/release/balance/checkout client
with AITP receipt decoding, Rago tool_call events via a durable outbox
with backoff, per-project/key/tool/send caps counting in-flight holds.
- switchyard-auth: Relay sk-t0 keys verified against Relay's own key
table (one key for both rails), EdDSA access tokens bound to a
resource, OAuth 2.1 AS logic: PKCE S256, DCR, client ID metadata
documents, rotating refresh tokens with family revocation on reuse,
device authorization grant, Scribase-backed identity.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- switchyard-egress: host allowlist (exact and *.suffix), block of
loopback/RFC1918/CGNAT/link-local/metadata/multicast/reserved and IPv6
forms that embed them, DNS answers validated then pinned so reqwest
never re-resolves, https only, 3 re-checked redirects, credential
headers dropped when a redirect leaves the host, caller Authorization
and Cookie stripped, size and time caps.
- switchyard-vault: per-org XChaCha20-Poly1305 data keys wrapped by a
versioned KEK, org|credential associated data, zero-downtime re-wrap.
- switchyard-cache: TTL cache with a byte budget and single-flight dedupe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>