The v4 document, or a per-request function (e.g. (c) => projectDocument(doc, viewerOf(c))).
OptionalbaseOptionalapiOpenRouter API key (or a per-request resolver, e.g. (c) => c.env.OPENROUTER_API_KEY). Absent → graceful 503.
OptionalmodelExplicit OpenRouter model id; omit to let @suluk/models pick one (default: tool-reliable).
OptionalselectModel-selection inputs when model is omitted.
OptionalcatalogThe catalog the model is selected from when model is omitted. Defaults to the lean built-in SEED_CATALOG (a
handful of strong, tool-reliable models) — which keeps this widget's edge-worker bundle small (the full 337-model
OPENROUTER_CATALOG adds ~150KB gzipped, and under the default tool-reliable profile it selects a pricier
FRONTIER model — e.g. claude-sonnet-4.5 vs the seed's gemini-2.5-flash). Pass OPENROUTER_CATALOG from
@suluk/models for always-current, full-catalog selection (mind the cost/bundle trade-off).
Execute a tool call against the store (e.g. appExec(app) bound per request).
OptionalsystemOptionalclientSet false to ignore any browser-declared client tools / state snapshot from the request (default: accept,
validated). Client tools are browser-executed and unprivileged; server tools always stay gated by exec.
OptionalauthorizeGate the endpoint (default: open — anonymous users may chat; mutations are still gated by exec).
OptionalmaxOptionaltemperatureOptionalrefererOpenRouter attribution.
OptionaltitleOptionalbaseOptionalgreetingShown by GET /info (e.g. the widget's opening line).
Optionalinclude"read" (default) exposes only GET/HEAD operations; "all" also exposes mutations.
OptionalhideOperation names to omit.
OptionalonlyIf set, expose ONLY these operation names (after hide).
@suluk/chat— a contract-driven chat AGENT for any suluk app. The same OpenAPI v4 operations that drive the API, SDK, docs, admin, panel, and MCP server are projected (via @suluk/mcp) into tools an in-page assistant can call; an OpenRouter tool-use loop drives them, with the model chosen by @suluk/models (never hardcoded) and every call executed through the store's own access gate — so the agent can BROWSE and, when the user is permitted, ACT. Ships the server loop (chatApp, Hono-mountable SSE) + a theme-aware floatingchatWidget. Pure pieces (runAgent,parseSSEStream,toolsToOpenAI) are independently testable. CANDIDATE tooling — NOT official OAS.