@suluk/chat - v0.2.1
    Preparing search index...

    Function sanitizeClientTools

    @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 floating chatWidget. Pure pieces (runAgent, parseSSEStream, toolsToOpenAI) are independently testable. CANDIDATE tooling — NOT official OAS.

    • Validate client-declared browser tools: well-formed names only, capped, and NEVER allowed to shadow a server tool (a forged client tool with a server tool's name would otherwise hijack a privileged op into the browser).

      Parameters

      • input: unknown
      • serverNames: Set<string>

      Returns ClientToolDef[]