diff --git a/.changeset/collapse-tilde-facades.md b/.changeset/collapse-tilde-facades.md new file mode 100644 index 00000000..05d6b614 --- /dev/null +++ b/.changeset/collapse-tilde-facades.md @@ -0,0 +1,37 @@ +--- +"@tryopenbot/agent-provider": minor +"@tryopenbot/agent-service-provider": minor +"@tryopenbot/auth-provider": minor +"openbot": minor +"@tryopenbot/computer-service-provider": minor +"@tryopenbot/client-runtime": minor +"@tryopenbot/computer-tools": minor +"@tryopenbot/computer-service": minor +"@tryopenbot/computer-service-proto": minor +"@tryopenbot/configuration": minor +"@tryopenbot/desktop": minor +"@tryopenbot/utilities": minor +"@tryopenbot/platform-integrations": minor +"@tryopenbot/control-service-provider": minor +"@tryopenbot/runtime-provider": minor +"@tryopenbot/control-service": minor +"@tryopenbot/ui": minor +"@tryopenbot/web": minor +"@tryopenbot/git-provider": minor +--- + +Use native Tilde plugin, connector, routine, and signal resources through one authenticated allowlisted bridge, and remove the corresponding control-service route APIs. + +Plugin inventory now pages Tilde's native MCP, skill, provider, and registry collections directly; it no longer depends on Tilde's OpenBot-specific aggregate catalogue or its first-page limit. + +Routines now consume Tilde's native trigger/version contract, and signal history uses native trigger IDs while accepting legacy rule IDs during the migration window. Signal provider and instance inventories follow every continuation token. + +Development agent creation retains the completed source-generation result until asynchronous Tilde bundle provisioning becomes active, so queued provisioning no longer turns the next status poll into “job not found”. + +Fresh installations and future agents now explicitly select ChatKit `agentLoop` response mode, matching the required SDK endpoint contract. + +The ChatKit credential bridge now permits only the workspace, queue, observation, and attachment operations used by Client Runtime instead of forwarding the complete ChatKit namespace. + +Migration: +- Replace direct calls to `/api/plugins`, `/api/connectors`, `/api/routines`, and `/api/signals` with `@tryopenbot/client-runtime`. +- Replace `registerConnectorRoutes` with `registerConnectorAuthorizedRoute` when constructing a custom control service. diff --git a/README.md b/README.md index 9f2b18d6..e5977e0a 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ The production build stages the web app in the control provider's `.vercel/outpu - `packages/agent-service-provider` owns Eve-compatible agent-directory discovery, instrumentation startup, concurrent per-agent Vercel bundles, the local agent server, and deployment. - `apps/web` owns the workspace, agent selection, conversation composer, and frontend routes. - `packages/client-runtime` owns grouped UI contracts, Tilde REST/SSE parsing, live-event reducers, and shared Zustand vanilla state without platform APIs. Every major UX surface and state interaction goes through it; renderers keep only presentation-only state. -- `apps/control-service` owns the portable Hono application, built web UI fallback, `/healthz`, the allowlisted Tilde ChatKit REST/SSE bridge under `/api/chat/*`, and the local control-service entrypoint. +- `apps/control-service` owns the portable Hono application, built web UI fallback, `/healthz`, raw operation-allowlisted Tilde bridges under `/api/chat/*` and `/api/tilde/*`, and the local control-service entrypoint. Plugin, connector, routine, and signal projections belong to Client Runtime rather than control-service domain facades. - `packages/computer-service-proto` owns the API-key-protected internal computer API. - `packages/git-provider` owns brokered GitHub access: the Tilde-managed GitHub App credential and the REST and git-over-HTTPS reverse-proxy profiles used by the trusted development sandbox and the factory agent. - No control database is retained while the reset application has no persisted control state. diff --git a/apps/control-service/README.md b/apps/control-service/README.md index 21b94e7c..0724d90d 100644 --- a/apps/control-service/README.md +++ b/apps/control-service/README.md @@ -1,6 +1,6 @@ # @tryopenbot/control-service -The portable Hono control application. It serves health, exposes an allowlisted same-origin Tilde ChatKit REST bridge under `/api/chat/*`, exchanges an HttpOnly browser session for a single-use registered-Origin ticket or an authenticated native bearer for an Origin-free native ticket, and serves the built web UI with SPA fallback both locally and in a Vercel Function. Client Runtime uses that ticket to connect directly to Tilde's team WebSocket. +The portable Hono control application. It serves health, exposes raw allowlisted same-origin Tilde bridges under `/api/chat/*` and `/api/tilde/*`, exchanges an HttpOnly browser session for a single-use registered-Origin ticket or an authenticated native bearer for an Origin-free native ticket, and serves the built web UI with SPA fallback both locally and in a Vercel Function. Client Runtime uses that ticket to connect directly to Tilde's team WebSocket and projects Tilde-owned settings resources without domain facades in this service. ## Public API @@ -8,14 +8,15 @@ The portable Hono control application. It serves health, exposes an allowlisted - `createApp(options)` constructs the portable control application with its configured authentication, Computer preview, ChatKit proxy, background agent-creation executor, and web-root behavior. - `registerOwnerAuth(app, provider, options)` installs browser PKCE login, callback, session, and logout routes. Development options preserve a validated loopback browser origin through the Vite proxy. - `requireOwner(provider, options)` returns the owner-authentication middleware used to protect browser-facing control routes. -- `registerTildeChatProxy(app, options)` preserves Tilde ChatKit request, response, and attachment semantics and exposes only the short-lived ChatKit realtime ticket needed for a direct browser WebSocket. +- `registerTildeChatProxy(app, options)` preserves Tilde ChatKit request, response, and attachment semantics for an exact Client Runtime operation allowlist and exposes only the short-lived ChatKit realtime ticket needed for a direct browser WebSocket. +- `registerTildeProxy(app, options)` preserves request and response bodies for a strict allowlist of Tilde-owned settings operations while keeping the installation API key out of clients. - `registerComputerPreview(app, provider, options)` exposes the narrow owner preview redirect without making Computer service browser-accessible. -- `registerConnectorRoutes(app, options)` serves owner-authenticated connector (Tilde tool-provider) configuration under `/api/connectors/*` — provider catalog, enabled accounts, and new-account creation that encrypts credentials server-side and starts brokered OAuth — plus the public `/connectors/authorized` OAuth return page that returns Electron flows to the `openbot://` deep link. +- `registerConnectorAuthorizedRoute(app)` serves only the public OAuth completion page that bounces desktop flows to the `openbot://` deep link. Connector resources and setup use native Tilde APIs through `registerTildeProxy`. The package default application also exposes `GET /healthz`. There is no owner-facing ConnectRPC surface or pairing-code setup route. Owner-authenticated `POST /api/agents` starts `openbot new-agent` inside the trusted development Computer as a background job. `GET /api/agents/setup/:jobId` reports that job without exposing the -Computer API key or shell output to the browser. When Tilde is configured, the status route also -establishes the new ChatKit Agent Resource Bundle with the deployment API key delegated by the -signed-in human, so later machine-only deployments preserve that individual lifecycle owner. +Computer API key or shell output to the browser. The command owns source creation and idempotent +Tilde reconciliation; the status route does not provision a second time or require a separate +human credential. diff --git a/apps/control-service/src/agent-create.ts b/apps/control-service/src/agent-create.ts index 593bb030..0be3e26c 100644 --- a/apps/control-service/src/agent-create.ts +++ b/apps/control-service/src/agent-create.ts @@ -5,14 +5,12 @@ import { createConnectTransport } from "@connectrpc/connect-node"; import type { Hono } from "hono"; import { ComputerService } from "@tryopenbot/computer-service-proto"; import { agentIdFromName } from "@tryopenbot/utilities"; -import { tildeJson, tildeOptionsFromEnvironment } from "./tilde-upstream.js"; export interface AgentCreationOptions { environment?: NodeJS.ProcessEnv; repositoryRoot?: string; execute?: AgentCreationExecutor; awaitExecution?: AgentCreationWaiter; - tildeFetch?: typeof globalThis.fetch; } export interface AgentCreationRequest { @@ -130,60 +128,16 @@ export function registerAgentCreation(app: Hono, options: AgentCreationOptions = { authorization: apiKey ? `Bearer ${apiKey}` : "", signal: context.req.raw.signal }, ); if (response.running) return context.json({ status: "setting_up" }); - if (response.exitCode !== 0) + if (response.exitCode !== 0) { + localCreation?.forget(jobId); return context.json({ status: "failed", error: commandError(response) }); + } const created = parseCreatedAgent(response.stdout); - if (!created) + if (!created) { + localCreation?.forget(jobId); return context.json({ status: "failed", error: "Agent creation returned no result" }); - const tilde = tildeOptionsFromEnvironment(environment); - if (tilde && options.tildeFetch) tilde.fetch = options.tildeFetch; - const agentServiceOrigin = environment.AGENT_SERVICE_ORIGIN?.trim(); - const headerAuthorization = context.req.header("authorization"); - const ownerAccessToken = context.get("ownerAccessToken") as string | undefined; - const authorization = ownerAccessToken ? `Bearer ${ownerAccessToken}` : headerAuthorization; - if (tilde && agentServiceOrigin) { - if (!authorization) - return context.json({ - status: "failed", - error: "Owner authorization is unavailable for Tilde agent provisioning", - }); - try { - const operation = (await tildeJson( - tilde, - `/chatkit/agents/${encodeURIComponent(created.id)}/provision`, - { - method: "PUT", - authorization, - body: { - agent: { - display_name: created.name, - endpoint: { - url: new URL(`/api/agents/${created.id}`, `${agentServiceOrigin}/`).toString(), - streaming: true, - timeout_ms: 300_000, - local_running_endpoint: false, - concurrency_policy: "queue", - }, - status: "enabled", - credential_strategy: "preserve", - }, - }, - }, - )) as { status?: string; error_message?: string }; - if (operation.status === "error") - return context.json({ - status: "failed", - error: operation.error_message ?? "Tilde agent provisioning failed", - }); - if (operation.status !== "active") - return context.json({ status: "setting_up", job_id: jobId, agent: created }); - } catch (error) { - return context.json({ - status: "failed", - error: error instanceof Error ? error.message : "Tilde agent provisioning failed", - }); - } } + localCreation?.forget(jobId); return context.json({ status: "ready", agent: created }); }); } @@ -191,7 +145,11 @@ export function registerAgentCreation(app: Hono, options: AgentCreationOptions = function createLocalAgentCreation( repositoryRoot: string, environment: NodeJS.ProcessEnv = process.env, -): { execute: AgentCreationExecutor; awaitExecution: AgentCreationWaiter } { +): { + execute: AgentCreationExecutor; + awaitExecution: AgentCreationWaiter; + forget(jobId: string): boolean; +} { const jobs = new Map(); return { execute: async (request) => { @@ -222,16 +180,14 @@ function createLocalAgentCreation( }); return jobs.get(jobId)!; }, - awaitExecution: async ({ jobId }) => { - const result = jobs.get(jobId) ?? { + awaitExecution: async ({ jobId }) => + jobs.get(jobId) ?? { exitCode: 1, stdout: "", stderr: "Agent creation job was not found", jobId, - }; - if (!result.running) jobs.delete(jobId); - return result; - }, + }, + forget: (jobId: string) => jobs.delete(jobId), }; } diff --git a/apps/control-service/src/app.test.ts b/apps/control-service/src/app.test.ts index 571aba28..cdd8279a 100644 --- a/apps/control-service/src/app.test.ts +++ b/apps/control-service/src/app.test.ts @@ -57,6 +57,113 @@ describe("bare OpenBot server", () => { expect(response.status).toBe(404); }); + it("serves the public connector OAuth completion handoff", async () => { + const response = await createApp({ webRoot: "/missing" }).request( + "https://openbot.test/connectors/authorized?client=electron", + ); + expect(response.status).toBe(200); + expect(response.headers.get("cache-control")).toBe("no-store"); + await expect(response.text()).resolves.toContain("openbot://connectors/authorized"); + }); + + it("passes allowlisted owner settings operations through to Tilde unchanged", async () => { + const tildeFetch = vi.fn(async (input, init) => { + const request = input instanceof Request ? input : new Request(input, init); + expect(request.url).toBe( + "https://tilde.test/api/v1/team/team-one/automations/routine-one?view=owner", + ); + expect(request.method).toBe("PUT"); + expect(request.headers.get("x-api-key")).toBe("tilde-key"); + expect(request.headers.get("x-tilde-org-id")).toBe("org-one"); + expect(request.headers.get("x-tilde-team-id")).toBe("team-one"); + expect(request.headers.get("authorization")).toBeNull(); + await expect(request.json()).resolves.toEqual({ enabled: true }); + return Response.json({ id: "routine-one", enabled: true }, { status: 201 }); + }); + const tildeApp = createApp({ + webRoot: "/missing", + tildeProxy: { + apiKey: "tilde-key", + orgId: "org-one", + teamId: "team-one", + baseUrl: "https://tilde.test", + fetch: tildeFetch, + }, + }); + + const response = await tildeApp.request( + "https://openbot.test/api/tilde/automations/routine-one?view=owner", + { + method: "PUT", + headers: { + authorization: "Bearer browser-token", + "content-type": "application/json", + }, + body: JSON.stringify({ enabled: true }), + }, + ); + + expect(response.status).toBe(201); + await expect(response.json()).resolves.toEqual({ id: "routine-one", enabled: true }); + expect(tildeFetch).toHaveBeenCalledTimes(1); + }); + + it("rejects Tilde operations outside the owner settings allowlist", async () => { + const tildeFetch = vi.fn(); + const tildeApp = createApp({ + webRoot: "/missing", + tildeProxy: { + apiKey: "tilde-key", + orgId: "org-one", + teamId: "team-one", + fetch: tildeFetch, + }, + }); + + const unsupported = [ + ["/api/tilde/identity/api-key", "POST"], + ["/api/tilde/openbot/plugins/catalog", "GET"], + ["/api/tilde/provider-setup/catalog", "GET"], + ["/api/tilde/provider-setup/setup-one/resume", "POST"], + ["/api/tilde/signals/deliveries/delivery-one/retry", "POST"], + ["/api/tilde/mcp/proxied-mcp-servers/server-one", "GET"], + ["/api/tilde/credential/source/oauth/resource-server", "POST"], + ] as const; + for (const [path, method] of unsupported) { + const response = await tildeApp.request(`https://openbot.test${path}`, { method }); + expect(response.status, `${method} ${path}`).toBe(404); + } + expect(tildeFetch).not.toHaveBeenCalled(); + }); + + it("preserves encoded resource IDs in allowlisted Tilde paths", async () => { + const tildeFetch = vi.fn(async (input) => { + const request = input instanceof Request ? input : new Request(input); + expect(request.url).toBe( + "https://tilde.test/api/v1/team/team-one/mcp/tool-group/github%2Fwork", + ); + return Response.json({ ok: true }); + }); + const tildeApp = createApp({ + webRoot: "/missing", + tildeProxy: { + apiKey: "tilde-key", + orgId: "org-one", + teamId: "team-one", + baseUrl: "https://tilde.test", + fetch: tildeFetch, + }, + }); + + const response = await tildeApp.request( + "https://openbot.test/api/tilde/mcp/tool-group/github%2Fwork", + { method: "DELETE" }, + ); + + expect(response.status).toBe(200); + expect(tildeFetch).toHaveBeenCalledTimes(1); + }); + it("starts agent setup in the trusted development computer and reports readiness", async () => { const jobId = "11111111-1111-4111-8111-111111111111"; const execute = vi.fn(async () => ({ @@ -73,31 +180,12 @@ describe("bare OpenBot server", () => { jobId, running: false, })); - const tildeFetch = vi - .fn() - .mockResolvedValueOnce( - new Response(JSON.stringify({ status: "queued" }), { - status: 202, - headers: { "content-type": "application/json" }, - }), - ) - .mockResolvedValueOnce( - new Response(JSON.stringify({ status: "active" }), { - status: 202, - headers: { "content-type": "application/json" }, - }), - ); const agentApp = createApp({ environment: { COMPUTER_SERVICE_API_KEY: "computer-key", DEVELOPMENT_SANDBOX_SERVICE_URL: "https://computer.test/rpc", - AGENT_SERVICE_ORIGIN: "https://agents.openbot.test", - TILDE_API_KEY: "tilde-key", - TILDE_ORG_ID: "org-one", - TILDE_TEAM_ID: "team-one", - TILDE_BASE_URL: "https://tilde.test", }, - agentCreation: { execute, awaitExecution, tildeFetch }, + agentCreation: { execute, awaitExecution }, }); const response = await agentApp.request("https://openbot.test/api/agents", { @@ -122,14 +210,6 @@ describe("bare OpenBot server", () => { expect.objectContaining({ authorization: "Bearer computer-key" }), ); - const provisioning = await agentApp.request(`https://openbot.test/api/agents/setup/${jobId}`, { - headers: { authorization: "Bearer owner-token" }, - }); - await expect(provisioning.json()).resolves.toEqual({ - status: "setting_up", - job_id: jobId, - agent: { id: "test", name: "Test" }, - }); const status = await agentApp.request(`https://openbot.test/api/agents/setup/${jobId}`, { headers: { authorization: "Bearer owner-token" }, }); @@ -142,17 +222,6 @@ describe("bare OpenBot server", () => { { agentId: "factory", jobId, timeoutMilliseconds: 0 }, expect.objectContaining({ authorization: "Bearer computer-key" }), ); - expect(tildeFetch).toHaveBeenLastCalledWith( - new URL("https://tilde.test/api/v1/team/team-one/chatkit/agents/test/provision"), - expect.objectContaining({ - method: "PUT", - headers: expect.objectContaining({ - authorization: "Bearer owner-token", - "x-api-key": "tilde-key", - }), - body: expect.stringContaining('"display_name":"Test"'), - }), - ); }); it("starts development agent setup in the checkout served by the live agent runtime", async () => { @@ -222,54 +291,6 @@ describe("bare OpenBot server", () => { expect(status).toEqual({ status: "ready", agent: { id: "tasa", name: "Tasa" } }); }); - it("forwards a verified cookie access token when establishing bundle ownership", async () => { - const jobId = "33333333-3333-4333-8333-333333333333"; - const tildeFetch = vi.fn(async (input, init) => { - const request = input instanceof Request ? input : new Request(input, init); - expect(request.headers.get("authorization")).toBe("Bearer cookie-owner-token"); - return Response.json({ status: "active" }, { status: 202 }); - }); - const authProvider = ownerAuthProvider(); - const agentApp = createApp({ - authProvider, - webRoot: "/missing", - environment: { - COMPUTER_SERVICE_API_KEY: "computer-key", - DEVELOPMENT_SANDBOX_SERVICE_URL: "https://computer.test/rpc", - AGENT_SERVICE_ORIGIN: "https://agents.openbot.test", - TILDE_API_KEY: "tilde-key", - TILDE_ORG_ID: "org-one", - TILDE_TEAM_ID: "team-one", - TILDE_BASE_URL: "https://tilde.test", - }, - agentCreation: { - tildeFetch, - awaitExecution: async () => ({ - exitCode: 0, - stdout: '{"ok":true,"agent":{"id":"cookie-agent","name":"Cookie Agent"}}\n', - stderr: "", - jobId, - running: false, - }), - }, - }); - - const response = await agentApp.request(`https://openbot.test/api/agents/setup/${jobId}`, { - headers: { - authorization: "Basic unverified", - cookie: "openbot_access=cookie-owner-token", - }, - }); - - expect(response.status).toBe(200); - await expect(response.json()).resolves.toEqual({ - status: "ready", - agent: { id: "cookie-agent", name: "Cookie Agent" }, - }); - expect(authProvider.verify).toHaveBeenCalledWith("cookie-owner-token"); - expect(tildeFetch).toHaveBeenCalledOnce(); - }); - it("reports a running or failed background agent setup without exposing command details", async () => { const jobId = "22222222-2222-4222-8222-222222222222"; const awaitExecution = vi @@ -610,6 +631,31 @@ describe("bare OpenBot server", () => { expect(invalid.status).toBe(400); }); + it("rejects ChatKit operations outside the client allowlist", async () => { + let upstreamCalls = 0; + const chatApp = createApp({ + tildeChatProxy: { + apiKey: "secret-api-key", + orgId: "openbot-org", + teamId: "openbot-team", + fetch: async () => { + upstreamCalls += 1; + return new Response(null, { status: 204 }); + }, + }, + }); + + const response = await chatApp.request("https://openbot.test/api/chat/agents/agent-one", { + method: "DELETE", + }); + + expect(response.status).toBe(404); + await expect(response.json()).resolves.toEqual({ + error: "Unsupported Tilde ChatKit operation", + }); + expect(upstreamCalls).toBe(0); + }); + it("proxies root ChatKit attachment content only for the configured org and team", async () => { const calls: string[] = []; const chatApp = createApp({ @@ -694,24 +740,3 @@ describe("bare OpenBot server", () => { await expect(frontendRoute.text()).resolves.toBe("
OpenBot web
"); }); }); - -function ownerAuthProvider() { - return { - initialization: { id: "test-auth", label: "Test auth", questions: [] }, - deployable: { plan: async () => ({ summary: "test" }), deploy: async () => ({}) }, - nativeClientConfiguration: () => ({ - authorizationEndpoint: "https://identity.test/authorize", - tokenEndpoint: "https://identity.test/token", - clientId: "client-one", - scope: "openid offline_access openbot:control", - }), - authorizationUrl: vi.fn(() => new URL("https://identity.test/authorize")), - exchangeCode: vi.fn(async () => ({ accessToken: "fresh-token", expiresIn: 3600 })), - refresh: vi.fn(async () => ({ accessToken: "fresh-token", expiresIn: 3600 })), - verify: vi.fn(async () => ({ - subject: "human-one", - groups: [], - scope: ["openbot:control"], - })), - } as unknown as AuthProvider & { verify: ReturnType }; -} diff --git a/apps/control-service/src/app.ts b/apps/control-service/src/app.ts index b339adfb..fc611ab3 100644 --- a/apps/control-service/src/app.ts +++ b/apps/control-service/src/app.ts @@ -9,10 +9,9 @@ import type { AuthProvider } from "@tryopenbot/auth-provider"; import type { ComputerProvider } from "@tryopenbot/computer-service-provider"; import { registerAgentCreation, type AgentCreationOptions } from "./agent-create.js"; import { registerTildeChatProxy, type TildeChatProxyOptions } from "./chat-proxy.js"; -import { registerConnectorRoutes, type ConnectorRouteOptions } from "./connectors.js"; +import { registerTildeProxy, type TildeProxyOptions } from "./tilde-proxy.js"; +import { registerConnectorAuthorizedRoute } from "./connector-authorized.js"; import { registerComputerPreview } from "./computer-preview.js"; -import { registerRoutineRoutes, type RoutineRouteOptions } from "./routines.js"; -import { registerSignalRoutes, type SignalRouteOptions } from "./signals.js"; import { registerOwnerAuth, requireOwner } from "./auth.js"; const sourceWebRoot = fileURLToPath(new URL("../../web/dist", import.meta.url)); const workingDirectoryWebRoot = resolve(process.cwd(), "apps/web/dist"); @@ -25,14 +24,9 @@ export interface AppOptions { devMode?: boolean; environment?: NodeJS.ProcessEnv; tildeChatProxy?: TildeChatProxyOptions; - connectors?: ConnectorRouteOptions; - routines?: RoutineRouteOptions; - signals?: SignalRouteOptions; + tildeProxy?: TildeProxyOptions; authProvider?: AuthProvider; - agentCreation?: Pick< - AgentCreationOptions, - "repositoryRoot" | "execute" | "awaitExecution" | "tildeFetch" - >; + agentCreation?: Pick; } export function createApp(options: AppOptions = {}): Hono { @@ -44,15 +38,10 @@ export function createApp(options: AppOptions = {}): Hono { registerOwnerAuth(app, options.authProvider, options); const middleware = requireOwner(options.authProvider, options); app.use("/api/chat/*", middleware); + app.use("/api/tilde/*", middleware); app.use("/api/computer/*", middleware); app.use("/api/agents", middleware); - app.use("/api/connectors/*", middleware); - app.use("/api/plugins/*", middleware); - app.use("/api/plugins", middleware); app.use("/api/agents/*", middleware); - app.use("/api/routines", middleware); - app.use("/api/routines/*", middleware); - app.use("/api/signals/*", middleware); } else app.get("/auth/native-config", (context) => context.json({ error: "Owner authentication is not configured" }, 503), @@ -63,9 +52,8 @@ export function createApp(options: AppOptions = {}): Hono { }); registerAgentCreation(app, { environment: options.environment, ...options.agentCreation }); registerTildeChatProxy(app, options.tildeChatProxy); - registerConnectorRoutes(app, options.connectors); - registerRoutineRoutes(app, options.routines); - registerSignalRoutes(app, options.signals); + registerTildeProxy(app, options.tildeProxy ?? options.tildeChatProxy); + registerConnectorAuthorizedRoute(app); if (existsSync(webRoot)) { const cacheHeaders = ( path: string, diff --git a/apps/control-service/src/auth.test.ts b/apps/control-service/src/auth.test.ts index 8d6e8c3b..1ec5cc72 100644 --- a/apps/control-service/src/auth.test.ts +++ b/apps/control-service/src/auth.test.ts @@ -98,10 +98,15 @@ describe("owner authentication", () => { const provider = stubProvider(); const app = createApp({ authProvider: provider, webRoot: "/missing" }); expect((await app.request("/api/computer/missing/preview")).status).toBe(401); + expect((await app.request("/api/tilde/mcp/available-tool-groups")).status).toBe(401); const authorized = await app.request("/api/computer/missing/preview", { headers: { authorization: "Bearer valid-token" }, }); expect(authorized.status).toBe(503); + const authorizedTilde = await app.request("/api/tilde/mcp/available-tool-groups", { + headers: { authorization: "Bearer valid-token" }, + }); + expect(authorizedTilde.status).toBe(503); expect(provider.verify).toHaveBeenCalledWith("valid-token"); }); @@ -128,7 +133,11 @@ describe("owner authentication", () => { organization: { id: "org-one", name: "Tilde", role: "owner" }, workspace: { id: "team-one", name: "OpenBot", role: "owner" }, })); - const app = createApp({ authProvider: provider, webRoot: "/missing" }); + const app = createApp({ + authProvider: provider, + webRoot: "/missing", + environment: { TILDE_TEAM_ID: "team-one", TILDE_BASE_URL: "https://tilde.test" }, + }); const response = await app.request("/auth/session", { headers: { authorization: "Bearer valid-token" }, }); @@ -137,6 +146,7 @@ describe("owner authentication", () => { expect(response.headers.get("cache-control")).toBe("no-store"); await expect(response.json()).resolves.toEqual({ authenticated: true, + tilde: { team_id: "team-one", api_base_url: "https://tilde.test" }, user: { subject: "human-one", name: "Daniel Blignaut", diff --git a/apps/control-service/src/auth.ts b/apps/control-service/src/auth.ts index 214c26a4..a50b1b01 100644 --- a/apps/control-service/src/auth.ts +++ b/apps/control-service/src/auth.ts @@ -88,6 +88,9 @@ export function registerOwnerAuth( } return context.json({ authenticated: true, + ...(tildePublicContext(options.environment ?? process.env) + ? { tilde: tildePublicContext(options.environment ?? process.env) } + : {}), user: { subject: session.principal.subject, name: account.name, @@ -107,6 +110,17 @@ export function registerOwnerAuth( }); } +function tildePublicContext( + environment: NodeJS.ProcessEnv, +): { team_id: string; api_base_url: string } | undefined { + const teamId = environment.TILDE_TEAM_ID?.trim(); + if (!teamId) return undefined; + return { + team_id: teamId, + api_base_url: environment.TILDE_BASE_URL?.trim() || "https://api.trytilde.ai", + }; +} + export function requireOwner( provider: AuthProvider, options: OwnerAuthOptions = {}, diff --git a/apps/control-service/src/chat-proxy.ts b/apps/control-service/src/chat-proxy.ts index 634fb851..d72cbcc9 100644 --- a/apps/control-service/src/chat-proxy.ts +++ b/apps/control-service/src/chat-proxy.ts @@ -14,6 +14,61 @@ const hopByHopHeaders = new Set([ "upgrade", ]); +type AllowedMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; + +interface AllowedRoute { + methods: ReadonlySet; + pattern: RegExp; +} + +const methods = (...values: AllowedMethod[]): ReadonlySet => new Set(values); + +/** Exact ChatKit operations consumed by Client Runtime. */ +const allowedTeamRoutes: readonly AllowedRoute[] = [ + { pattern: /^workspace\/sidebar$/, methods: methods("GET") }, + { pattern: /^workspace\/bootstrap$/, methods: methods("GET") }, + { pattern: /^workspace\/search$/, methods: methods("GET") }, + { pattern: /^workspace\/agents\/[^/]+\/sessions$/, methods: methods("GET", "POST") }, + { + pattern: /^workspace\/agents\/[^/]+\/sessions\/[^/]+\/messages$/, + methods: methods("POST"), + }, + { pattern: /^workspace\/agents\/[^/]+\/turns$/, methods: methods("POST") }, + { pattern: /^workspace\/sessions\/[^/]+\/snapshot$/, methods: methods("GET") }, + { pattern: /^workspace\/sessions\/[^/]+\/messages$/, methods: methods("GET") }, + { pattern: /^workspace\/sessions\/[^/]+\/rename$/, methods: methods("PATCH") }, + { pattern: /^workspace\/sessions\/[^/]+\/read-state$/, methods: methods("PUT") }, + { pattern: /^workspace\/sessions\/[^/]+\/interrupt$/, methods: methods("POST") }, + { pattern: /^session\/[^/]+\/observe$/, methods: methods("GET") }, + { pattern: /^agent-turn-queue$/, methods: methods("GET") }, + { pattern: /^agent-turn-queue\/[^/]+$/, methods: methods("DELETE") }, + { pattern: /^agent-turn-queue\/[^/]+\/steer$/, methods: methods("POST") }, + { pattern: /^agent-turn-queue\/[^/]+\/order$/, methods: methods("PATCH") }, + { pattern: /^session\/[^/]+\/attachment\/upload$/, methods: methods("POST") }, + { pattern: /^session\/[^/]+\/attachments\/upload$/, methods: methods("POST") }, + { + pattern: /^session\/[^/]+\/attachment\/[^/]+\/complete$/, + methods: methods("POST"), + }, + { + pattern: /^session\/[^/]+\/attachment\/[^/]+\/content$/, + methods: methods("GET", "PUT"), + }, + { + pattern: /^session\/[^/]+\/attachment\/[^/]+\/download-url$/, + methods: methods("GET"), + }, + { pattern: /^session\/[^/]+\/attachment\/[^/]+$/, methods: methods("DELETE") }, +]; + +/** Object-store attachment keys returned by Tilde in API-origin URLs. */ +const allowedRootRoutes: readonly AllowedRoute[] = [ + { + pattern: /^org\/[^/]+\/team\/[^/]+\/session\/[^/]+\/attachment\/[^/]+\/[^/]+$/, + methods: methods("GET", "PUT"), + }, +]; + export interface TildeChatProxyOptions { apiKey: string; orgId: string; @@ -100,6 +155,10 @@ export function registerTildeChatProxy(app: Hono, configuredOptions?: TildeChatP return context.json({ error: "Invalid Tilde ChatKit path" }, 400); } + const method = context.req.method as AllowedMethod; + if (!isAllowedChatKitOperation(relativePath, method)) + return context.json({ error: "Unsupported Tilde ChatKit operation" }, 404); + const incomingUrl = new URL(context.req.url); const upstreamPath = resolveUpstreamPath(relativePath, options); if (!upstreamPath) { @@ -277,6 +336,14 @@ function isSafeChatKitPath(value: string): boolean { return decoded.split("/").every((segment) => segment !== "." && segment !== ".."); } +function isAllowedChatKitOperation(path: string, method: AllowedMethod): boolean { + const routes = path.startsWith(rootChatKitPrefix) ? allowedRootRoutes : allowedTeamRoutes; + const candidate = path.startsWith(rootChatKitPrefix) + ? path.slice(rootChatKitPrefix.length) + : path; + return routes.some((route) => route.methods.has(method) && route.pattern.test(candidate)); +} + function upstreamHeaders(context: Context, options: TildeChatProxyOptions): Headers { const headers = new Headers(); for (const [name, value] of context.req.raw.headers) { diff --git a/apps/control-service/src/connector-authorized.ts b/apps/control-service/src/connector-authorized.ts new file mode 100644 index 00000000..ea29a1df --- /dev/null +++ b/apps/control-service/src/connector-authorized.ts @@ -0,0 +1,33 @@ +import type { Hono } from "hono"; + +/** Public OAuth completion page; it carries no state or secrets. */ +export function registerConnectorAuthorizedRoute(app: Hono): void { + app.get("/connectors/authorized", (context) => { + const requested = context.req.query("client"); + const client = + requested === "electron" || requested === "mobile" ? requested : ("web" as const); + context.header("cache-control", "no-store"); + return context.html(connectorAuthorizedPage(client)); + }); +} + +function connectorAuthorizedPage(client: "electron" | "mobile" | "web"): string { + const deepLinked = client === "electron" || client === "mobile"; + const hint = deepLinked + ? "Returning you to OpenBot… If nothing happens, switch back to the OpenBot app." + : "You can close this tab and return to OpenBot."; + const redirect = deepLinked + ? '' + : ""; + return [ + "", + 'OpenBot', + "", + "
", + "

Authorization complete

", + `

${hint}

`, + "
", + redirect, + "", + ].join(""); +} diff --git a/apps/control-service/src/connectors.test.ts b/apps/control-service/src/connectors.test.ts deleted file mode 100644 index c34b6586..00000000 --- a/apps/control-service/src/connectors.test.ts +++ /dev/null @@ -1,1041 +0,0 @@ -import { describe, expect, it, vi } from "vite-plus/test"; -import { createApp } from "./app.js"; - -const providersPage = { - items: [ - { - type_id: "google_mail", - name: "Google Mail", - metadata: { - icon_url: "https://icons.tilde.test/google-mail.svg", - icon_slug: "google-mail", - }, - categories: ["email"], - tools: [ - { type_id: "google_mail_search", name: "Search mail", documentation: "Search messages" }, - ], - credential_sources: [ - { - type_id: "google_mail_managed_oauth", - display_name: "Sign in with your browser", - requires_brokering: true, - supports_auto_display_name: true, - configuration_schema: { resource_server: {}, user_credential: {} }, - }, - ], - }, - { - type_id: "tavily", - name: "Tavily", - metadata: { logoUrl: "https://icons.tilde.test/tavily.svg", icon: "tavily" }, - credential_sources: [ - { - type_id: "tavily_api_key", - name: "api_key", - requires_brokering: false, - configuration_schema: { - resource_server: {}, - user_credential: { - type: "object", - required: ["api_key"], - properties: { api_key: { type: "string", format: "password" } }, - }, - }, - }, - ], - }, - ], -}; - -const accountsPage = { - items: [ - { - id: "tgi-work", - display_name: "Work Gmail", - status: "active", - tool_group_source_type_id: "google_mail", - credential_source_type_id: "google_mail_managed_oauth", - }, - { - id: "tgi-tavily", - display_name: "Tavily", - status: "active", - tool_group_source_type_id: "tavily", - }, - ], -}; - -interface UpstreamCall { - method: string; - path: string; - body?: unknown; -} - -function connectorApp( - respond: (call: UpstreamCall) => Response | undefined, - environment?: NodeJS.ProcessEnv, -): { - app: ReturnType; - calls: UpstreamCall[]; -} { - const calls: UpstreamCall[] = []; - const fetch = vi.fn(async (input: URL | string, init?: RequestInit) => { - const url = input instanceof URL ? input : new URL(input); - const call: UpstreamCall = { - method: init?.method ?? "GET", - path: url.pathname, - body: typeof init?.body === "string" ? JSON.parse(init.body) : undefined, - }; - calls.push(call); - const response = respond(call); - if (response) return response; - if (call.path === "/api/v1/team/team-1/openbot/plugins/catalog") { - const items = async (path: string): Promise => { - const legacy = respond({ method: "GET", path }); - if (!legacy) return []; - const payload = (await legacy.json()) as { items?: unknown[] }; - return payload.items ?? []; - }; - return Response.json({ - tool_providers: await items("/api/v1/team/team-1/mcp/available-tool-groups"), - tool_accounts: await items("/api/v1/team/team-1/mcp/tool-group"), - mcp_servers: await items("/api/v1/team/team-1/mcp/mcp-server"), - proxied_mcp_servers: await items("/api/v1/team/team-1/mcp/proxied-mcp-servers"), - skills: await items("/api/v1/team/team-1/skill"), - skill_providers: await items("/api/v1/team/team-1/skill-providers"), - skill_registries: await items("/api/v1/team/team-1/skill-registry"), - }); - } - return new Response(JSON.stringify({ error: "unexpected" }), { status: 500 }); - }); - const app = createApp({ - connectors: { - apiKey: "key", - orgId: "org-1", - teamId: "team-1", - baseUrl: "https://tilde.test", - fetch: fetch as unknown as typeof globalThis.fetch, - ...(environment ? { environment } : {}), - }, - }); - return { app, calls }; -} - -function catalogResponses(call: UpstreamCall): Response | undefined { - if (call.path === "/api/v1/team/team-1/provider-setup/start") { - const body = call.body as { - provider_id?: string; - form_values?: Record; - return_url?: string | null; - }; - if (body.provider_id === "nope") - return Response.json({ error: "Unknown connector provider" }, { status: 404 }); - const oauth = body.provider_id === "google_mail"; - return Response.json({ - resource: { - id: oauth ? "tgi-oauth" : "tgi-new", - display_name: body.form_values?.displayName, - status: oauth ? "brokering_initiated" : "active", - tool_group_source_type_id: body.provider_id, - credential_source_type_id: oauth ? "google_mail_managed_oauth" : "tavily_api_key", - }, - next_action: oauth - ? { type: "redirect", url: "https://accounts.google.com/authorize" } - : { type: "complete" }, - }); - } - if (call.path === "/api/v1/team/team-1/provider-setup/catalog") - return Response.json({ - domain: "mcp", - providers: providersPage.items.map((provider) => ({ - provider_id: provider.type_id, - display_name: provider.name, - description: provider.name, - categories: provider.categories ?? [], - icon_url: provider.metadata?.icon_url ?? provider.metadata?.logoUrl, - icon_slug: provider.metadata?.icon_slug ?? provider.metadata?.icon, - auth_methods: provider.credential_sources.map((rawSource) => { - const source = rawSource as { - type_id: string; - display_name?: string; - name?: string; - requires_brokering: boolean; - supports_auto_display_name?: boolean; - configuration_schema: { - user_credential?: { - properties?: Record; - required?: string[]; - }; - }; - }; - return { - id: source.type_id, - credential_source_type_id: source.type_id, - display_name: source.display_name ?? source.name, - setup_kind: source.requires_brokering ? "oauth" : "api_key", - supports_auto_display_name: source.supports_auto_display_name ?? false, - fields: Object.entries( - source.configuration_schema.user_credential?.properties ?? {}, - ).map(([name, field]) => ({ - name, - label: name, - field_type: field.format === "password" ? "password" : "text", - required: - source.configuration_schema.user_credential?.required?.includes(name) ?? false, - })), - }; - }), - })), - resources: accountsPage.items, - }); - if (call.path === "/api/v1/team/team-1/mcp/available-tool-groups") - return Response.json(providersPage); - if (call.path === "/api/v1/team/team-1/mcp/provider-catalog") return Response.json({ items: [] }); - if (call.path === "/api/v1/team/team-1/mcp/tool-group") return Response.json(accountsPage); - if (call.path === "/api/v1/team/team-1/skill-providers") return Response.json({ items: [] }); - if (call.path === "/api/v1/team/team-1/mcp/proxied-mcp-servers") - return Response.json({ items: [] }); - return undefined; -} - -describe("connector routes", () => { - it("serves the public OAuth return page and bounces desktop flows to the deep link", async () => { - const app = createApp({}); - const web = await app.request("https://openbot.test/connectors/authorized?client=web"); - expect(web.status).toBe(200); - const webPage = await web.text(); - expect(webPage).toContain("Authorization complete"); - expect(webPage).not.toContain("openbot://"); - const desktop = await app.request("https://openbot.test/connectors/authorized?client=electron"); - const desktopPage = await desktop.text(); - expect(desktopPage).toContain("openbot://connectors/authorized"); - }); - - it("is unavailable without Tilde credentials", async () => { - const app = createApp({}); - const response = await app.request("https://openbot.test/api/connectors/providers"); - expect(response.status).toBe(503); - }); - - it("serializes the provider catalog with credential sources", async () => { - const { app } = connectorApp(catalogResponses); - const response = await app.request("https://openbot.test/api/connectors/providers"); - expect(response.status).toBe(200); - const body = (await response.json()) as { items: Record[] }; - expect(body.items.map((item) => item.type_id)).toEqual(["google_mail", "tavily"]); - const sources = body.items[0]?.credential_sources as Record[]; - expect(body.items[0]).toMatchObject({ - icon_url: "https://icons.tilde.test/google-mail.svg", - icon_slug: "google-mail", - }); - expect(body.items[1]).toMatchObject({ - icon_url: "https://icons.tilde.test/tavily.svg", - icon_slug: "tavily", - }); - expect(sources[0]).toMatchObject({ - type_id: "google_mail_managed_oauth", - name: "Sign in with your browser", - requires_brokering: true, - supports_auto_display_name: true, - }); - }); - - it("filters accounts by provider", async () => { - const { app } = connectorApp(catalogResponses); - const response = await app.request( - "https://openbot.test/api/connectors/accounts?provider=google_mail", - ); - const body = (await response.json()) as { items: Record[] }; - expect(body.items).toEqual([ - { - id: "tgi-work", - display_name: "Work Gmail", - status: "active", - provider_type_id: "google_mail", - credential_source_type_id: "google_mail_managed_oauth", - }, - ]); - }); - - it("deletes a toolkit account through the cascading tool-group endpoint", async () => { - const { app, calls } = connectorApp((call) => { - if (call.method === "DELETE" && call.path === "/api/v1/team/team-1/mcp/tool-group/tgi-work") - return Response.json({}); - const catalog = catalogResponses(call); - if (catalog) return catalog; - return undefined; - }); - - const response = await app.request("https://openbot.test/api/connectors/accounts", { - method: "DELETE", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ account_ids: ["tgi-work"] }), - }); - - expect(response.status).toBe(200); - await expect(response.json()).resolves.toEqual({ ok: true }); - expect(calls).toContainEqual({ - method: "DELETE", - path: "/api/v1/team/team-1/mcp/tool-group/tgi-work", - body: undefined, - }); - }); - - it("deletes a proxied MCP account through its dedicated cascading endpoint", async () => { - const { app, calls } = connectorApp((call) => { - if (call.method === "GET" && call.path === "/api/v1/team/team-1/mcp/proxied-mcp-servers") - return Response.json({ - items: [ - { - server: { - id: "proxied-apollo", - display_name: "Sales team", - endpoint_configuration: {}, - status: "active", - tool_group_instance_id: "apollo-account", - tool_group_source_type_id: "proxied_mcp_apollo_account", - }, - tool_group_instance: { - id: "apollo-account", - display_name: "Sales team", - status: "active", - }, - tool_count: 12, - }, - ], - }); - if ( - call.method === "DELETE" && - call.path === "/api/v1/team/team-1/mcp/proxied-mcp-servers/apollo-account" - ) - return Response.json({}); - return undefined; - }); - - const response = await app.request("https://openbot.test/api/connectors/accounts", { - method: "DELETE", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ account_ids: ["apollo-account"] }), - }); - - expect(response.status).toBe(200); - expect(calls).toContainEqual({ - method: "DELETE", - path: "/api/v1/team/team-1/mcp/proxied-mcp-servers/apollo-account", - body: undefined, - }); - expect( - calls.some( - (call) => call.method === "DELETE" && call.path.includes("/mcp/tool-group/apollo-account"), - ), - ).toBe(false); - }); - - it("includes unconnected managed MCP providers in the plugins catalog", async () => { - const { app } = connectorApp((call) => { - if (call.path.endsWith("/mcp/provider-catalog")) { - return Response.json({ - items: [ - { - id: "apollo", - tool_provider_type_id: "managed_mcp:apollo", - name: "Apollo.io", - description: "Search and enrich sales intelligence.", - endpoint_url: "https://mcp.apollo.io/mcp", - categories: ["sales", "productivity"], - connection_method: "oauth_dynamic_client_registration", - }, - ], - }); - } - if (call.path.endsWith("/mcp/available-tool-groups")) return Response.json({ items: [] }); - if (call.path.endsWith("/mcp/tool-group")) return Response.json({ items: [] }); - if (call.path.endsWith("/mcp/mcp-server")) return Response.json({ items: [] }); - if (call.path.endsWith("/mcp/proxied-mcp-servers")) return Response.json({ items: [] }); - if (call.path.endsWith("/skill")) return Response.json({ items: [] }); - if (call.path.endsWith("/skill-providers")) return Response.json({ items: [] }); - if (call.path.endsWith("/skill-registry")) return Response.json({ items: [] }); - return undefined; - }); - - const response = await app.request("https://openbot.test/api/plugins"); - expect(response.status).toBe(200); - const body = (await response.json()) as { - tools: { - provider: Record; - accounts: unknown[]; - }[]; - }; - expect(body.tools).toEqual([ - { - provider: expect.objectContaining({ - type_id: "managed_mcp:apollo", - name: "Apollo.io", - icon_slug: "apollo", - categories: ["sales", "productivity"], - credential_sources: [ - expect.objectContaining({ - type_id: "managed_mcp_oauth", - requires_brokering: true, - }), - ], - }), - accounts: [], - }, - ]); - }); - - it("connects a managed MCP provider through its server-authored catalog entry", async () => { - const { app, calls } = connectorApp((call) => { - if (call.path.endsWith("/mcp/provider-catalog")) { - return Response.json({ - items: [ - { - id: "apollo", - tool_provider_type_id: "managed_mcp:apollo", - name: "Apollo.io", - description: "Search and enrich sales intelligence.", - endpoint_url: "https://mcp.apollo.io/mcp", - categories: ["sales", "productivity"], - connection_method: "oauth_dynamic_client_registration", - }, - ], - }); - } - if (call.path.endsWith("/mcp/provider-catalog/apollo/connect")) { - return Response.json({ - status: "authorization_required", - oauth: { - tool_group_instance: { - id: "apollo-account", - display_name: "Sales team", - status: "pending", - tool_group_source_type_id: "proxied_mcp_apollo_account", - }, - broker_response: { - type: "broker_state", - action: { Redirect: { url: "https://apollo.test/authorize" } }, - }, - }, - }); - } - return undefined; - }); - - const response = await app.request("https://openbot.test/api/connectors/accounts", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ - provider_type_id: "managed_mcp:apollo", - credential_source_type_id: "managed_mcp_oauth", - display_name: "Sales team", - return_url: "https://openbot.test/connectors/authorized", - }), - }); - - expect(response.status).toBe(201); - await expect(response.json()).resolves.toMatchObject({ - status: "authorize", - account: { id: "apollo-account", display_name: "Sales team" }, - authorization_url: "https://apollo.test/authorize", - }); - expect(calls.find((call) => call.path.endsWith("/apollo/connect"))?.body).toEqual({ - display_name: "Sales team", - return_url: "https://openbot.test/connectors/authorized", - }); - }); - - it("polls a connected managed MCP account through its stable provider identity", async () => { - const { app } = connectorApp((call) => { - if (call.path.endsWith("/mcp/proxied-mcp-servers")) { - return Response.json({ - items: [ - { - server: { - id: "proxied-apollo", - display_name: "Sales team", - endpoint_configuration: { - url: "https://mcp.apollo.io/mcp", - catalog_provider_id: "apollo", - }, - status: "active", - tool_group_instance_id: "apollo-account", - tool_group_source_type_id: "proxied_mcp_apollo_account", - }, - tool_group_instance: { - id: "apollo-account", - display_name: "Sales team", - status: "active", - tool_group_source_type_id: "proxied_mcp_apollo_account", - credential_source_type_id: "oauth_auth_flow", - }, - tool_count: 12, - }, - ], - }); - } - return undefined; - }); - - const response = await app.request( - "https://openbot.test/api/connectors/accounts?provider=managed_mcp%3Aapollo", - ); - expect(response.status).toBe(200); - await expect(response.json()).resolves.toEqual({ - items: [ - { - id: "apollo-account", - display_name: "Sales team", - status: "active", - provider_type_id: "managed_mcp:apollo", - credential_source_type_id: "oauth_auth_flow", - }, - ], - }); - }); - - it("projects Tilde MCP mappings and skill registries into the plugins catalog", async () => { - const { app } = connectorApp( - (call) => { - if (call.path.endsWith("/mcp/available-tool-groups")) - return Response.json({ - items: [ - ...providersPage.items, - { - type_id: "tilde_control_plane", - name: "Tilde Control Plane", - categories: ["tilde"], - }, - { - type_id: "tilde_skill_registry", - name: "Tilde Skill Registry", - categories: ["skills"], - }, - { type_id: "tilde_wallet", name: "Tilde Pay", categories: ["payments"] }, - { type_id: "tilde_browser", name: "Tilde Browser", categories: ["browser"] }, - { - type_id: "chatkit_internal_agent", - name: "Message internal agent", - categories: ["chat"], - }, - { - type_id: "custom_tool_provider:custom-data", - name: "Custom Data", - categories: ["custom_tool_provider"], - }, - { - type_id: "proxied_mcp_vercel_hello", - name: "OpenBot hello-world Vercel", - categories: ["proxied_mcp"], - }, - { - type_id: "proxied_mcp_vercel_other", - name: "OpenBot other Vercel", - categories: ["proxied_mcp"], - }, - ], - }); - if (call.path.endsWith("/mcp/proxied-mcp-servers")) - return Response.json({ - items: [ - { - server: { - id: "proxied-hello", - display_name: "OpenBot hello-world Vercel", - endpoint_configuration: { url: "https://mcp.vercel.com/" }, - status: "active", - tool_group_instance_id: "vercel-hello", - tool_group_source_type_id: "proxied_mcp_vercel_hello", - }, - tool_group_instance: { - id: "vercel-hello", - display_name: "OpenBot hello-world Vercel", - status: "active", - tool_group_source_type_id: "proxied_mcp_vercel_hello", - }, - tool_count: 180, - }, - { - server: { - id: "proxied-other", - display_name: "OpenBot other Vercel", - endpoint_configuration: { url: "https://mcp.vercel.com" }, - status: "active", - tool_group_instance_id: "vercel-other", - tool_group_source_type_id: "proxied_mcp_vercel_other", - }, - tool_group_instance: { - id: "vercel-other", - display_name: "OpenBot other Vercel", - status: "active", - tool_group_source_type_id: "proxied_mcp_vercel_other", - }, - tool_count: 37, - }, - ], - }); - if (call.path.endsWith("/skill-providers")) - return Response.json({ - items: [ - { - id: "provider-cloudflare", - name: "Cloudflare", - description: "Cloudflare hosted skills", - categories: ["infrastructure", "developer_tools"], - repository_url: "https://github.com/cloudflare/skills", - trust_status: "trusted", - skills: [ - { - id: "cloudflare-workers", - name: "Workers", - description: "Build and deploy Workers", - source_path: "skills/workers/SKILL.md", - }, - ], - }, - { - id: "provider-aws", - name: "AWS", - description: "AWS hosted skills", - repository_url: "https://github.com/aws/skills", - trust_status: "trusted", - skills: [ - { - id: "aws-cdk", - name: "AWS CDK", - description: "Build cloud infrastructure with CDK", - source_path: "skills/cdk/SKILL.md", - }, - ], - }, - ], - }); - const catalog = catalogResponses(call); - if (catalog) return catalog; - if (call.path.endsWith("/mcp/mcp-server")) - return Response.json({ - items: [ - { - id: "openbot-hello-world", - tools: [ - { - tool_source_type_id: "google_mail_search", - tool_group_source_type_id: "google_mail", - tool_group_instance_id: "tgi-work", - }, - ], - }, - ], - }); - if (call.path.endsWith("/skill")) - return Response.json({ - items: [ - { - id: "skill-1", - name: "hello-world-code-review", - description: "Review code", - source_kind: "openbot", - category: "OpenBot", - source_provider_id: "google_mail", - metadata: { provider_icon_key: "gmail" }, - }, - { - id: "materialized-cloudflare-workers", - name: "Workers", - description: "Build and deploy Workers", - source_kind: "trusted_provider", - source_provider_id: "provider-cloudflare", - source_path: "skills/workers/SKILL.md", - }, - ], - }); - if (call.path.endsWith("/skill-registry")) - return Response.json({ - items: [ - { - id: "registry-1", - name: "OpenBot hello-world", - skills: [ - { id: "skill-1", name: "hello-world-code-review" }, - { id: "materialized-cloudflare-workers", name: "Workers" }, - ], - }, - ], - }); - return undefined; - }, - { - AGENT_HELLO_WORLD_VERCEL_MCP_SERVER_ID: "vercel-hello", - }, - ); - const response = await app.request("https://openbot.test/api/plugins?agent_id=hello-world"); - expect(response.status).toBe(200); - const body = (await response.json()) as { - tools: { - provider: { name: string; categories: string[]; can_add_account?: boolean }; - accounts: { id: string; assigned_agent_ids: string[] }[]; - }[]; - skills: { - id: string; - name: string; - description: string; - categories: string[]; - icon_url?: string; - icon_key?: string; - skills: { id: string; name: string; assigned_agent_ids: string[] }[]; - }[]; - }; - expect(body.tools[0]?.accounts[0]).toMatchObject({ - id: "tgi-work", - assigned_agent_ids: ["hello-world"], - }); - expect(body.tools.filter(({ provider }) => provider.name === "Vercel")).toEqual([ - expect.objectContaining({ - provider: expect.objectContaining({ - name: "Vercel", - categories: ["other"], - can_add_account: false, - }), - accounts: [ - expect.objectContaining({ id: "vercel-hello", assigned_agent_ids: ["hello-world"] }), - expect.objectContaining({ id: "vercel-other", assigned_agent_ids: [] }), - ], - }), - ]); - expect( - body.tools.find(({ provider }) => provider.name === "Custom Data")?.provider.categories, - ).toEqual(["other"]); - expect( - body.tools.find(({ provider }) => provider.name === "Tilde Control Plane")?.provider - .categories, - ).toEqual(["system"]); - expect( - body.tools.find(({ provider }) => provider.name === "Tilde Skill Registry")?.provider - .categories, - ).toEqual(["system"]); - expect( - body.tools.find(({ provider }) => provider.name === "Tilde Pay")?.provider.categories, - ).toEqual(["system"]); - expect( - body.tools.find(({ provider }) => provider.name === "Tilde Browser")?.provider.categories, - ).toEqual(["system"]); - expect( - body.tools.find(({ provider }) => provider.name === "Message internal agent")?.provider - .categories, - ).toEqual(["system"]); - expect(body.tools.some(({ provider }) => provider.name === "OpenBot hello-world Vercel")).toBe( - false, - ); - expect(body.skills).toContainEqual( - expect.objectContaining({ - id: "team:OpenBot", - name: "OpenBot", - categories: ["OpenBot"], - icon_url: "https://icons.tilde.test/google-mail.svg", - icon_key: "gmail", - skills: [ - expect.objectContaining({ - id: "skill-1", - name: "code-review", - assigned_agent_ids: ["hello-world"], - }), - ], - }), - ); - expect(body.skills).toContainEqual( - expect.objectContaining({ - id: "provider-cloudflare", - name: "Cloudflare", - categories: ["infrastructure", "developer_tools"], - icon_key: "cloudflare", - skills: [ - expect.objectContaining({ - id: 'trusted:["provider-cloudflare","cloudflare-workers"]', - name: "Workers", - assigned_agent_ids: ["hello-world"], - }), - ], - }), - ); - expect(body.skills).toContainEqual( - expect.objectContaining({ - id: "provider-aws", - name: "AWS", - categories: ["other"], - icon_key: "aws", - skills: [ - expect.objectContaining({ - id: 'trusted:["provider-aws","aws-cdk"]', - name: "AWS CDK", - assigned_agent_ids: [], - }), - ], - }), - ); - expect(body.skills).toHaveLength(3); - }); - - it("bulk enables and binds a tool account idempotently while preserving skill assignment", async () => { - const { app, calls } = connectorApp((call) => { - const catalog = catalogResponses(call); - if (catalog) return catalog; - if (call.path.endsWith("/mcp/mcp-server")) - return Response.json({ items: [{ id: "openbot-hello-world", tools: [] }] }); - if (call.path.endsWith("/tools/enable-and-bind")) return Response.json({ complete: true }); - if (call.path.endsWith("/skill")) - return Response.json({ items: [{ id: "skill-1", name: "code-review" }] }); - if (call.path.endsWith("/skill-registry")) - return Response.json({ - items: [{ id: "registry-1", name: "OpenBot hello-world", skills: [] }], - }); - if (call.path.endsWith("/skill-registry/registry-1")) return Response.json({}); - return undefined; - }); - - const tool = await app.request( - "https://openbot.test/api/plugins/tools/tgi-work/agents/hello-world", - { method: "POST" }, - ); - expect(tool.status).toBe(200); - const retry = await app.request( - "https://openbot.test/api/plugins/tools/tgi-work/agents/hello-world", - { method: "POST" }, - ); - expect(retry.status).toBe(200); - expect(calls.filter((call) => call.path.endsWith("/tools/enable-and-bind"))).toEqual([ - { - method: "POST", - path: "/api/v1/team/team-1/mcp/tool-group/tgi-work/tools/enable-and-bind", - body: { - all_tools: true, - tool_source_type_ids: [], - mcp_server_instance_ids: ["openbot-hello-world"], - }, - }, - { - method: "POST", - path: "/api/v1/team/team-1/mcp/tool-group/tgi-work/tools/enable-and-bind", - body: { - all_tools: true, - tool_source_type_ids: [], - mcp_server_instance_ids: ["openbot-hello-world"], - }, - }, - ]); - expect(calls.some((call) => call.path.includes("/tool/google_mail_search/enable"))).toBe(false); - expect( - calls.some((call) => call.path.endsWith("/mcp/mcp-server/openbot-hello-world/function")), - ).toBe(false); - - const skill = await app.request( - "https://openbot.test/api/plugins/skills/skill-1/agents/hello-world", - { method: "POST" }, - ); - expect(skill.status).toBe(200); - expect(calls).toContainEqual( - expect.objectContaining({ - method: "PATCH", - path: "/api/v1/team/team-1/skill-registry/registry-1", - body: { skill_ids: ["skill-1"] }, - }), - ); - }); - - it("reports an incomplete bulk tool assignment as an upstream failure", async () => { - const { app } = connectorApp((call) => { - if (call.path.endsWith("/mcp/mcp-server")) - return Response.json({ items: [{ id: "openbot-hello-world", tools: [] }] }); - if (call.path.endsWith("/tools/enable-and-bind")) - return Response.json({ complete: false, failed_tools: ["google_mail_search"] }); - return undefined; - }); - - const response = await app.request( - "https://openbot.test/api/plugins/tools/tgi-work/agents/hello-world", - { method: "POST" }, - ); - - expect(response.status).toBe(502); - await expect(response.json()).resolves.toEqual({ - error: "Tilde could not enable and bind every tool", - }); - }); - - it("adds and removes trusted hosted skills through Tilde's provider-skill workflow", async () => { - const { app, calls } = connectorApp((call) => { - if (call.path.endsWith("/skill-providers")) - return Response.json({ - items: [ - { - id: "provider-cloudflare", - name: "Cloudflare", - description: "Cloudflare hosted skills", - categories: ["infrastructure", "developer_tools"], - repository_url: "https://github.com/cloudflare/skills", - trust_status: "trusted", - skills: [ - { - id: "cloudflare-workers", - name: "Workers", - description: "Build and deploy Workers", - source_path: "skills/workers/SKILL.md", - }, - ], - }, - { - id: "provider-aws", - name: "AWS", - description: "AWS hosted skills", - categories: ["cloud_infrastructure", "developer_tools"], - repository_url: "https://github.com/aws/skills", - trust_status: "trusted", - skills: [ - { - id: "aws-cdk", - name: "AWS CDK", - description: "Build cloud infrastructure with CDK", - source_path: "skills/cdk/SKILL.md", - }, - ], - }, - ], - }); - const catalog = catalogResponses(call); - if (catalog) return catalog; - if (call.path.endsWith("/skill")) - return Response.json({ - items: [ - { - id: "materialized-cloudflare-workers", - name: "Workers", - source_provider_id: "provider-cloudflare", - source_path: "skills/workers/SKILL.md", - }, - ], - }); - if (call.path.endsWith("/skill-registry")) - return Response.json({ - items: [ - { - id: "registry-1", - name: "OpenBot hello-world", - skills: [{ id: "materialized-cloudflare-workers", name: "Workers" }], - }, - ], - }); - if (call.path.endsWith("/provider-skills")) return Response.json({}); - if (call.path.endsWith("/skill-registry/registry-1")) return Response.json({}); - return undefined; - }); - - const awsId = encodeURIComponent('trusted:["provider-aws","aws-cdk"]'); - const add = await app.request( - `https://openbot.test/api/plugins/skills/${awsId}/agents/hello-world`, - { method: "POST" }, - ); - expect(add.status).toBe(200); - expect(calls).toContainEqual({ - method: "POST", - path: "/api/v1/team/team-1/skill-registry/registry-1/provider-skills", - body: { provider_id: "provider-aws", skill_ids: ["aws-cdk"] }, - }); - - const cloudflareId = encodeURIComponent('trusted:["provider-cloudflare","cloudflare-workers"]'); - const remove = await app.request( - `https://openbot.test/api/plugins/skills/${cloudflareId}/agents/hello-world`, - { method: "DELETE" }, - ); - expect(remove.status).toBe(200); - expect(calls).toContainEqual({ - method: "PATCH", - path: "/api/v1/team/team-1/skill-registry/registry-1", - body: { skill_ids: [] }, - }); - }); - - it("creates an API-key account through one provider-setup call", async () => { - const { app, calls } = connectorApp(catalogResponses); - const response = await app.request("https://openbot.test/api/connectors/accounts", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ - provider_type_id: "tavily", - credential_source_type_id: "tavily_api_key", - display_name: "Research", - user_credential_values: { api_key: "tvly-secret" }, - }), - }); - expect(response.status).toBe(201); - await expect(response.json()).resolves.toEqual({ - status: "created", - account: { - id: "tgi-new", - display_name: "Research", - status: "active", - provider_type_id: "tavily", - credential_source_type_id: "tavily_api_key", - }, - }); - expect(calls).toEqual([ - { - method: "POST", - path: "/api/v1/team/team-1/provider-setup/start", - body: { - domain: "mcp", - provider_id: "tavily", - auth_method_id: "tavily_api_key", - form_values: { displayName: "Research", api_key: "tvly-secret" }, - return_url: null, - }, - }, - ]); - }); - - it("returns the brokered authorization URL for OAuth providers", async () => { - const { app, calls } = connectorApp(catalogResponses); - const response = await app.request("https://openbot.test/api/connectors/accounts", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ - provider_type_id: "google_mail", - credential_source_type_id: "google_mail_managed_oauth", - display_name: "New Gmail", - return_url: "https://openbot.test/?connector_setup=complete", - }), - }); - expect(response.status).toBe(201); - const body = (await response.json()) as Record; - expect(body.status).toBe("authorize"); - expect(body.authorization_url).toBe("https://accounts.google.com/authorize"); - expect(calls).toEqual([ - expect.objectContaining({ - method: "POST", - path: "/api/v1/team/team-1/provider-setup/start", - body: expect.objectContaining({ - provider_id: "google_mail", - return_url: "https://openbot.test/?connector_setup=complete", - }), - }), - ]); - }); - - it("rejects unknown providers and malformed bodies", async () => { - const { app } = connectorApp(catalogResponses); - const unknown = await app.request("https://openbot.test/api/connectors/accounts", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ - provider_type_id: "nope", - credential_source_type_id: "nope", - display_name: "x", - }), - }); - expect(unknown.status).toBe(404); - const invalid = await app.request("https://openbot.test/api/connectors/accounts", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ provider_type_id: "tavily" }), - }); - expect(invalid.status).toBe(400); - }); -}); diff --git a/apps/control-service/src/connectors.ts b/apps/control-service/src/connectors.ts deleted file mode 100644 index b7f39c37..00000000 --- a/apps/control-service/src/connectors.ts +++ /dev/null @@ -1,1604 +0,0 @@ -import type { Context, Hono } from "hono"; - -const defaultBaseUrl = "https://api.trytilde.ai"; - -function teamDefaultDekAlias(teamId: string): string { - return `team:${teamId}:default`; -} - -export interface ConnectorRouteOptions { - apiKey: string; - orgId: string; - teamId: string; - baseUrl?: string; - fetch?: typeof globalThis.fetch; - environment?: NodeJS.ProcessEnv; -} - -interface UpstreamCredentialSource { - type_id: string; - name?: string; - display_name?: string; - documentation?: string; - requires_brokering?: boolean; - supports_auto_display_name?: boolean; - display_name_description?: string; - configuration_schema?: { resource_server?: unknown; user_credential?: unknown }; -} - -interface UpstreamProvider { - type_id: string; - name?: string; - documentation?: string; - icon_url?: string; - icon_slug?: string; - categories?: string[]; - credential_sources?: UpstreamCredentialSource[]; - metadata?: Record; - tools?: UpstreamToolSource[]; -} - -interface UpstreamToolSource { - type_id: string; - name?: string; - documentation?: string; -} - -interface UpstreamAccount { - id: string; - display_name?: string; - status?: string; - tool_group_source_type_id?: string; - credential_source_type_id?: string; -} - -interface UpstreamMappedTool { - tool_source_type_id: string; - tool_group_source_type_id: string; - tool_group_instance_id: string; -} - -interface UpstreamMcpServer { - id: string; - name?: string; - tools?: UpstreamMappedTool[]; -} - -interface UpstreamProxiedMcpServerListItem { - server: { - id: string; - display_name: string; - endpoint_configuration: unknown; - status: string; - tool_group_instance_id: string; - tool_group_source_type_id: string; - }; - tool_group_instance: UpstreamAccount; - tool_count: number; -} - -interface UpstreamManagedMcpProvider { - id: string; - name: string; - description: string; - endpoint_url: string; - categories: string[]; - connection_method: "manual" | "no_auth" | "oauth_dynamic_client_registration"; - suggested_auth_mode?: "api_key" | "bearer_token" | "oauth_authorization_code" | null; - api_key_location?: "header" | "query_parameter" | null; - api_key_header_name?: string | null; - api_key_header_prefix?: string | null; - api_key_query_param_name?: string | null; - oauth_authorization_endpoint?: string | null; - oauth_token_endpoint?: string | null; - oauth_scopes?: string[]; - tool_provider_type_id?: string; -} - -interface UpstreamSkill { - id: string; - name: string; - description?: string; - category?: string; - source_kind?: string; - source_provider_id?: string; - source_path?: string; - icon_url?: string; - provider_icon_key?: string; - providerIconKey?: string; - metadata?: Record; -} - -interface UpstreamTrustedSkill { - id: string; - name: string; - description: string; - source_path: string; -} - -interface UpstreamTrustedSkillProvider { - id: string; - name: string; - description: string; - categories?: string[]; - repository_url: string; - trust_status: string; - skills: UpstreamTrustedSkill[]; -} - -interface UpstreamSkillRegistry { - id: string; - name: string; - description?: string; - skills?: UpstreamSkill[]; -} - -/** - * Owner-facing connector (Tilde tool-provider) configuration. Keeps credential - * values on a server-side round trip to Tilde — encrypt, create, broker — so - * secrets never travel through the chat transcript or reach the agent. - */ -export function registerConnectorRoutes( - app: Hono, - configuredOptions?: ConnectorRouteOptions, -): void { - const options = (): ConnectorRouteOptions | undefined => - configuredOptions ?? optionsFromEnvironment(); - - // Universal OAuth return target. Tilde redirects the authorization tab here - // after brokering succeeds; the page carries no state or secrets — clients - // learn the outcome by polling the account status — so it stays public. The - // desktop flow lands in the system browser and is bounced to the openbot:// - // deep link, which focuses the app window. - app.get("/connectors/authorized", (context) => { - const requested = context.req.query("client"); - const client = requested === "electron" ? requested : ("web" as const); - context.header("cache-control", "no-store"); - return context.html(connectorAuthorizedPage(client)); - }); - - app.get("/api/connectors/providers", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - try { - const providers = await listProviders(resolved); - return context.json({ items: providers.map(serializeProvider) }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.get("/api/connectors/accounts", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - const provider = context.req.query("provider")?.trim(); - try { - const managedProviderId = provider ? managedMcpProviderId(provider) : undefined; - if (managedProviderId) { - const proxiedServers = await listProxiedMcpServers(resolved, context.req.raw.signal); - return context.json({ - items: proxiedServers - .filter((item) => managedMcpCatalogId(item) === managedProviderId) - .map((item) => ({ - ...serializeAccount(item.tool_group_instance), - display_name: item.server.display_name, - provider_type_id: provider, - })), - }); - } - const accounts = await listAccounts(resolved); - const filtered = provider - ? accounts.filter((account) => account.tool_group_source_type_id === provider) - : accounts; - return context.json({ items: filtered.map(serializeAccount) }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.get("/api/connectors/accounts/:id/wait", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - try { - const response = valueRecord( - await tildeJson( - resolved, - `/mcp/tool-group/${encodeURIComponent(context.req.param("id"))}?wait_for_status=active&timeout_ms=30000`, - ), - ); - const account = valueRecord(response?.tool_group_instance); - if (!account?.id) - throw new ConnectorUpstreamError("Tilde returned no connector account", 502); - return context.json(serializeAccount(account as unknown as UpstreamAccount)); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.post("/api/connectors/accounts", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - let body: CreateAccountBody; - try { - body = parseCreateAccountBody(await context.req.json()); - } catch (error) { - return context.json({ error: error instanceof Error ? error.message : "Invalid body" }, 400); - } - try { - const managedProviderId = managedMcpProviderId(body.providerTypeId); - if (managedProviderId) { - return await createManagedMcpAccount(context, resolved, managedProviderId, body); - } - const setup = valueRecord( - await tildeJson(resolved, "/provider-setup/start", { - domain: "mcp", - provider_id: body.providerTypeId, - auth_method_id: body.credentialSourceTypeId, - form_values: { - displayName: body.displayName, - ...body.resourceServerValues, - ...body.userCredentialValues, - }, - return_url: body.returnUrl ?? null, - }), - ); - const account = valueRecord(setup?.resource) as UpstreamAccount | undefined; - if (!account?.id) - throw new ConnectorUpstreamError("Tilde returned no connector account", 502); - const nextAction = valueRecord(setup?.next_action); - const authorizationUrl = nextAction?.type === "redirect" ? text(nextAction.url) : ""; - if (!authorizationUrl) - return context.json({ status: "created", account: serializeAccount(account) }, 201); - return context.json( - { - status: "authorize", - account: serializeAccount(account), - authorization_url: authorizationUrl, - }, - 201, - ); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.delete("/api/connectors/accounts", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - let accountIds: string[]; - try { - accountIds = parseDeleteAccountIds(await context.req.json()); - } catch (error) { - return context.json({ error: error instanceof Error ? error.message : "Invalid body" }, 400); - } - try { - await deleteConnectorAccounts(resolved, accountIds, context.req.raw.signal); - return context.json({ ok: true }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.get("/api/plugins", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - const agentIds = [ - ...new Set((context.req.queries("agent_id") ?? []).map((id) => id.trim()).filter(Boolean)), - ]; - try { - const [catalog, managedProviders] = await Promise.all([ - listOpenBotPluginsCatalog(resolved, context.req.raw.signal), - listManagedMcpProviders(resolved, context.req.raw.signal), - ]); - const providers = catalog.tool_providers as UpstreamProvider[]; - const accounts = catalog.tool_accounts as UpstreamAccount[]; - const servers = catalog.mcp_servers as UpstreamMcpServer[]; - const proxiedServers = catalog.proxied_mcp_servers as UpstreamProxiedMcpServerListItem[]; - const skills = catalog.skills as UpstreamSkill[]; - const trustedSkillProviders = catalog.skill_providers as UpstreamTrustedSkillProvider[]; - const registries = catalog.skill_registries as UpstreamSkillRegistry[]; - const agentServers = new Map( - agentIds.map((agentId) => [agentId, resolveMcpServer(resolved, servers, agentId)]), - ); - const agentRegistries = new Map( - agentIds.map((agentId) => [agentId, resolveSkillRegistry(resolved, registries, agentId)]), - ); - return context.json({ - tools: serializeToolsCatalog( - resolved, - providers, - managedProviders, - accounts, - proxiedServers, - agentIds, - agentServers, - ), - skills: serializeSkillsCatalog( - skills, - trustedSkillProviders, - providers, - agentIds, - agentRegistries, - ), - }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.post("/api/plugins/tools/:accountId/agents/:agentId", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - try { - await assignToolAccount( - resolved, - context.req.param("accountId"), - context.req.param("agentId"), - context.req.raw.signal, - ); - return context.json({ ok: true }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.delete("/api/plugins/tools/:accountId/agents/:agentId", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - try { - await removeToolAccount( - resolved, - context.req.param("accountId"), - context.req.param("agentId"), - context.req.raw.signal, - ); - return context.json({ ok: true }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.post("/api/plugins/skills/:skillId/agents/:agentId", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - try { - await setSkillAssignment( - resolved, - context.req.param("skillId"), - context.req.param("agentId"), - true, - context.req.raw.signal, - ); - return context.json({ ok: true }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.delete("/api/plugins/skills/:skillId/agents/:agentId", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - try { - await setSkillAssignment( - resolved, - context.req.param("skillId"), - context.req.param("agentId"), - false, - context.req.raw.signal, - ); - return context.json({ ok: true }); - } catch (error) { - return upstreamFailure(context, error); - } - }); - - app.post("/api/connectors/bind", async (context) => { - const resolved = options(); - if (!resolved) return unavailable(context); - const body = valueRecord(await context.req.json().catch(() => undefined)); - const agentId = text(body?.agent_id); - const accountId = text(body?.account_id); - if (!agentId || !accountId) - return context.json({ error: "agent_id and account_id are required" }, 400); - try { - await assignToolAccount(resolved, accountId, agentId, context.req.raw.signal); - return context.json({ bound: true }); - } catch (error) { - return upstreamFailure(context, error); - } - }); -} - -interface CreateAccountBody { - providerTypeId: string; - credentialSourceTypeId: string; - displayName: string; - resourceServerValues?: Record; - userCredentialValues?: Record; - returnUrl?: string; -} - -async function createManagedMcpAccount( - context: Context, - options: ConnectorRouteOptions, - providerId: string, - body: CreateAccountBody, -): Promise { - const provider = (await listManagedMcpProviders(options, context.req.raw.signal)).find( - (candidate) => - candidate.id === providerId && managedMcpProviderTypeId(candidate) === body.providerTypeId, - ); - if (!provider) return context.json({ error: "Unknown managed MCP provider" }, 404); - - if (provider.connection_method !== "manual") { - const result = (await tildeJson( - options, - `/mcp/provider-catalog/${encodeURIComponent(provider.id)}/connect`, - { display_name: body.displayName, return_url: body.returnUrl ?? null }, - context.req.raw.signal, - )) as Record; - return managedMcpAccountResponse(context, result); - } - - if (provider.suggested_auth_mode === "oauth_authorization_code") { - const values = body.resourceServerValues; - const clientId = text(values?.client_id); - const clientSecret = text(values?.client_secret); - if (!clientId || !clientSecret) { - throw new ConnectorUpstreamError("Client ID and client secret are required", 400); - } - const oauth = (await tildeJson( - options, - "/mcp/proxied-mcp-servers/oauth/start", - { - catalog_provider_id: provider.id, - name: body.displayName, - url: provider.endpoint_url, - auth_uri: provider.oauth_authorization_endpoint, - token_uri: provider.oauth_token_endpoint, - client_id: clientId, - client_secret: clientSecret, - scopes: provider.oauth_scopes ?? [], - return_url: body.returnUrl ?? null, - }, - context.req.raw.signal, - )) as Record; - return managedMcpAuthorizationResponse(context, oauth); - } - - const credentialSource = managedMcpCredentialSource(provider); - const resourceServerCredentialId = await maybeCreateCredential( - options, - credentialSource.type_id, - "resource-server", - credentialSource.configuration_schema?.resource_server, - body.resourceServerValues, - ); - const connection = (await tildeJson( - options, - "/mcp/proxied-mcp-servers", - { - catalog_provider_id: provider.id, - name: body.displayName, - url: provider.endpoint_url, - auth_mode: provider.suggested_auth_mode, - api_key_location: provider.api_key_location ?? "header", - api_key_header_name: provider.api_key_header_name ?? "Authorization", - api_key_header_prefix: provider.api_key_header_prefix ?? null, - api_key_query_param_name: provider.api_key_query_param_name ?? "api_key", - local_running_endpoint: false, - oauth_scopes: [], - resource_server_credential_id: resourceServerCredentialId ?? null, - user_credential_id: null, - }, - context.req.raw.signal, - )) as Record; - return managedMcpCreatedResponse(context, connection); -} - -function managedMcpAccountResponse(context: Context, result: Record): Response { - if (result.status === "authorization_required" && isRecord(result.oauth)) { - return managedMcpAuthorizationResponse(context, result.oauth); - } - if (result.status === "connected" && isRecord(result.connection)) { - return managedMcpCreatedResponse(context, result.connection); - } - throw new ConnectorUpstreamError("Tilde returned an invalid managed provider response", 502); -} - -function managedMcpAuthorizationResponse( - context: Context, - oauth: Record, -): Response { - const account = valueRecord(oauth.tool_group_instance); - const broker = valueRecord(oauth.broker_response); - if (!account || !broker) { - throw new ConnectorUpstreamError("Tilde returned an invalid OAuth response", 502); - } - const authorizationUrl = brokerRedirectUrl(broker); - if (!authorizationUrl) { - throw new ConnectorUpstreamError("Tilde returned no authorization URL", 502); - } - return context.json( - { - status: "authorize", - account: serializeAccount(account as unknown as UpstreamAccount), - authorization_url: authorizationUrl, - }, - 201, - ); -} - -function managedMcpCreatedResponse( - context: Context, - connection: Record, -): Response { - const account = valueRecord(connection.tool_group_instance); - if (!account) throw new ConnectorUpstreamError("Tilde returned no managed provider account", 502); - return context.json( - { status: "created", account: serializeAccount(account as unknown as UpstreamAccount) }, - 201, - ); -} - -function parseCreateAccountBody(value: unknown): CreateAccountBody { - if (typeof value !== "object" || value === null) throw new Error("Invalid connector request"); - const record = value as Record; - const providerTypeId = text(record.provider_type_id); - const credentialSourceTypeId = text(record.credential_source_type_id); - const displayName = text(record.display_name); - if (!providerTypeId || !credentialSourceTypeId || !displayName) - throw new Error("provider_type_id, credential_source_type_id, and display_name are required"); - const returnUrl = text(record.return_url); - if (returnUrl && !/^https?:\/\//.test(returnUrl)) - throw new Error("return_url must be an absolute http(s) URL"); - return { - providerTypeId, - credentialSourceTypeId, - displayName, - resourceServerValues: valueRecord(record.resource_server_values), - userCredentialValues: valueRecord(record.user_credential_values), - ...(returnUrl ? { returnUrl } : {}), - }; -} - -function parseDeleteAccountIds(value: unknown): string[] { - const record = valueRecord(value); - if (!record || !Array.isArray(record.account_ids)) throw new Error("account_ids is required"); - const accountIds = [ - ...new Set( - record.account_ids.map((accountId) => text(accountId)).filter((accountId) => accountId), - ), - ]; - if (accountIds.length === 0) throw new Error("account_ids must contain at least one account"); - return accountIds; -} - -async function deleteConnectorAccounts( - options: ConnectorRouteOptions, - accountIds: readonly string[], - signal?: AbortSignal, -): Promise { - const proxiedServers = await listProxiedMcpServers(options, signal); - const proxiedAccountIds = new Set( - proxiedServers.map((item) => item.server.tool_group_instance_id), - ); - await Promise.all( - accountIds.map((accountId) => { - const path = proxiedAccountIds.has(accountId) - ? `/mcp/proxied-mcp-servers/${encodeURIComponent(accountId)}` - : `/mcp/tool-group/${encodeURIComponent(accountId)}`; - return tildeRequest(options, path, "DELETE", undefined, signal); - }), - ); -} - -function text(value: unknown): string { - return typeof value === "string" ? value.trim() : ""; -} - -function valueRecord(value: unknown): Record | undefined { - return typeof value === "object" && value !== null && !Array.isArray(value) - ? (value as Record) - : undefined; -} - -/** Encrypt then persist one credential; skipped when its schema declares no fields. */ -async function maybeCreateCredential( - options: ConnectorRouteOptions, - credentialSourceTypeId: string, - kind: "resource-server" | "user-credential", - schema: unknown, - values: Record | undefined, -): Promise { - if (!schemaHasProperties(schema)) return undefined; - if (!values || Object.keys(values).length === 0) { - throw new ConnectorUpstreamError( - `The ${kind === "resource-server" ? "app" : "account"} credential form is required for this connector`, - 400, - ); - } - const basePath = `/credential/source/${encodeURIComponent(credentialSourceTypeId)}/${kind}`; - const dekAlias = teamDefaultDekAlias(options.teamId); - const encrypted = await tildeJson(options, `${basePath}/encrypt`, { - dek_alias: dekAlias, - value: values, - }); - const bodyKey = - kind === "resource-server" ? "resource_server_configuration" : "user_credential_configuration"; - const created = (await tildeJson(options, basePath, { - dek_alias: dekAlias, - [bodyKey]: encrypted, - metadata: null, - })) as { id?: unknown }; - const id = typeof created.id === "string" ? created.id : undefined; - if (!id) throw new ConnectorUpstreamError("Tilde returned no credential id", 502); - return id; -} -export function schemaHasProperties(schema: unknown): boolean { - if (typeof schema !== "object" || schema === null) return false; - const properties = (schema as { properties?: unknown }).properties; - return ( - typeof properties === "object" && properties !== null && Object.keys(properties).length > 0 - ); -} - -export function brokerRedirectUrl(response: Record): string | undefined { - if (response.type !== "broker_state") return undefined; - const action = response.action; - if (typeof action !== "object" || action === null) return undefined; - const redirect = (action as { Redirect?: { url?: unknown } }).Redirect; - return typeof redirect?.url === "string" ? redirect.url : undefined; -} - -async function listProviders( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise { - const catalog = valueRecord( - await tildeJson(options, "/provider-setup/catalog?domain=mcp", undefined, signal), - ); - const providers = Array.isArray(catalog?.providers) - ? catalog.providers.map(valueRecord).filter((item): item is Record => !!item) - : []; - return providers.map((provider) => ({ - type_id: text(provider.provider_id), - name: text(provider.display_name), - documentation: text(provider.description), - categories: Array.isArray(provider.categories) - ? provider.categories.filter((value): value is string => typeof value === "string") - : [], - metadata: { - ...(text(provider.icon_url) ? { icon_url: text(provider.icon_url) } : {}), - ...(text(provider.icon_slug) ? { icon_slug: text(provider.icon_slug) } : {}), - }, - credential_sources: (Array.isArray(provider.auth_methods) ? provider.auth_methods : []) - .map(valueRecord) - .filter((item): item is Record => !!item) - .map((source) => ({ - type_id: text(source.credential_source_type_id) || text(source.id), - display_name: text(source.display_name), - documentation: text(source.description), - requires_brokering: text(source.setup_kind).includes("oauth"), - supports_auto_display_name: source.supports_auto_display_name === true, - configuration_schema: { - resource_server: setupFieldsSchema(source.fields), - user_credential: null, - }, - })), - })); -} - -async function listOpenBotPluginsCatalog( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise<{ - tool_providers: unknown[]; - tool_accounts: unknown[]; - mcp_servers: unknown[]; - proxied_mcp_servers: unknown[]; - skills: unknown[]; - skill_providers: unknown[]; - skill_registries: unknown[]; -}> { - return (await tildeJson(options, "/openbot/plugins/catalog", undefined, signal)) as { - tool_providers: unknown[]; - tool_accounts: unknown[]; - mcp_servers: unknown[]; - proxied_mcp_servers: unknown[]; - skills: unknown[]; - skill_providers: unknown[]; - skill_registries: unknown[]; - }; -} - -async function listManagedMcpProviders( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise { - const page = (await tildeJson(options, "/mcp/provider-catalog", undefined, signal)) as Record< - string, - unknown - >; - return pageItems(page) as UpstreamManagedMcpProvider[]; -} - -async function listAccounts( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise { - const catalog = valueRecord( - await tildeJson(options, "/provider-setup/catalog?domain=mcp", undefined, signal), - ); - return (Array.isArray(catalog?.resources) ? catalog.resources : []) - .map(valueRecord) - .filter((item): item is Record => !!item) - .map((item) => item as unknown as UpstreamAccount); -} - -function setupFieldsSchema(value: unknown): Record | null { - if (!Array.isArray(value) || value.length === 0) return null; - const fields = value.map(valueRecord).filter((item): item is Record => !!item); - return { - type: "object", - properties: Object.fromEntries( - fields.map((field) => [ - text(field.name), - { - type: "string", - title: text(field.label) || text(field.name), - ...(text(field.help_text) ? { description: text(field.help_text) } : {}), - ...(text(field.field_type) === "password" ? { format: "password" } : {}), - }, - ]), - ), - required: fields.filter((field) => field.required === true).map((field) => text(field.name)), - }; -} - -async function listProxiedMcpServers( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise { - const page = (await tildeJson( - options, - "/mcp/proxied-mcp-servers?page_size=500&include_catalog_managed=true", - undefined, - signal, - )) as Record; - return pageItems(page) as UpstreamProxiedMcpServerListItem[]; -} - -async function listSkills( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise { - const page = (await tildeJson(options, "/skill?page_size=500", undefined, signal)) as Record< - string, - unknown - >; - return pageItems(page) as UpstreamSkill[]; -} - -async function listTrustedSkillProviders( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise { - const response = (await tildeJson(options, "/skill-providers", undefined, signal)) as Record< - string, - unknown - >; - return pageItems(response) as UpstreamTrustedSkillProvider[]; -} - -async function listSkillRegistries( - options: ConnectorRouteOptions, - signal?: AbortSignal, -): Promise { - const page = (await tildeJson( - options, - "/skill-registry?page_size=500", - undefined, - signal, - )) as Record; - return pageItems(page) as UpstreamSkillRegistry[]; -} - -function agentEnvironmentPrefix(agentId: string): string { - return `AGENT_${agentId.replaceAll("-", "_").toUpperCase()}`; -} - -function resolveMcpServer( - options: ConnectorRouteOptions, - servers: readonly UpstreamMcpServer[], - agentId: string, -): UpstreamMcpServer | undefined { - const configured = (options.environment ?? process.env)[ - `${agentEnvironmentPrefix(agentId)}_MCP_SERVER_ID` - ]?.trim(); - return servers.find((server) => server.id === (configured || `openbot-${agentId}`)); -} - -function resolveSkillRegistry( - options: ConnectorRouteOptions, - registries: readonly UpstreamSkillRegistry[], - agentId: string, -): UpstreamSkillRegistry | undefined { - const configured = (options.environment ?? process.env)[ - `${agentEnvironmentPrefix(agentId)}_SKILL_REGISTRY_ID` - ]?.trim(); - return registries.find( - (registry) => - registry.id === configured || (!configured && registry.name === `OpenBot ${agentId}`), - ); -} - -function displaySkillName(name: string, agentIds: readonly string[]): string { - const owner = agentIds.find((agentId) => name.startsWith(`${agentId}-`)); - return owner ? name.slice(owner.length + 1) : name; -} - -function serializeToolsCatalog( - options: ConnectorRouteOptions, - providers: readonly UpstreamProvider[], - managedProviders: readonly UpstreamManagedMcpProvider[], - accounts: readonly UpstreamAccount[], - proxiedServers: readonly UpstreamProxiedMcpServerListItem[], - agentIds: readonly string[], - agentServers: ReadonlyMap, -) { - const proxiedSourceIds = new Set( - proxiedServers.map((item) => item.server.tool_group_source_type_id), - ); - const toolkitProviders = providers - .filter((provider) => !proxiedSourceIds.has(provider.type_id)) - .map((provider) => ({ - provider: serializeProvider(provider), - accounts: accounts - .filter((account) => account.tool_group_source_type_id === provider.type_id) - .map((account) => ({ - ...serializeAccount(account), - assigned_agent_ids: assignedAgentIds(account.id, agentIds, agentServers), - })), - })); - const managedMcpProviders = managedProviders.map((provider) => { - const providerId = managedMcpProviderTypeId(provider); - const connections = proxiedServers.filter((item) => managedMcpCatalogId(item) === provider.id); - return { - provider: serializeProvider(managedMcpProviderSource(provider)), - accounts: connections.map((item) => ({ - ...serializeAccount(item.tool_group_instance), - display_name: item.server.display_name, - provider_type_id: providerId, - assigned_agent_ids: assignedAgentIds(item.tool_group_instance.id, agentIds, agentServers), - })), - }; - }); - const groups = new Map(); - for (const item of proxiedServers) { - if (managedMcpCatalogId(item)) continue; - const url = proxiedMcpUrl(item); - if (!url) continue; - const group = groups.get(url) ?? []; - group.push(item); - groups.set(url, group); - } - const proxiedProviders = [...groups].map(([url, items]) => { - const name = proxiedMcpProviderName(url, items, agentIds); - const providerId = `proxied-mcp:${url}`; - return { - provider: { - type_id: providerId, - name, - documentation: url, - icon_slug: proxiedMcpIconKey(url, name), - categories: ["other"], - credential_sources: [], - can_add_account: false, - }, - accounts: items.map((item) => ({ - ...serializeAccount(item.tool_group_instance), - display_name: item.server.display_name, - provider_type_id: providerId, - assigned_agent_ids: agentIds.filter( - (agentId) => - assignedAgentIds(item.tool_group_instance.id, [agentId], agentServers).length > 0 || - configuredProxiedServerId(options, agentId) === item.tool_group_instance.id, - ), - })), - }; - }); - return [...toolkitProviders, ...managedMcpProviders, ...proxiedProviders]; -} - -const managedMcpPrefix = "managed_mcp:"; - -function managedMcpProviderTypeId(provider: UpstreamManagedMcpProvider): string { - return provider.tool_provider_type_id || `${managedMcpPrefix}${provider.id}`; -} - -function managedMcpProviderId(typeId: string): string | undefined { - return typeId.startsWith(managedMcpPrefix) ? typeId.slice(managedMcpPrefix.length) : undefined; -} - -function managedMcpCatalogId(item: UpstreamProxiedMcpServerListItem): string | undefined { - if (!isRecord(item.server.endpoint_configuration)) return undefined; - return firstText(item.server.endpoint_configuration.catalog_provider_id); -} - -function managedMcpProviderSource(provider: UpstreamManagedMcpProvider): UpstreamProvider { - return { - type_id: managedMcpProviderTypeId(provider), - name: provider.name, - documentation: provider.description, - icon_slug: provider.id, - categories: provider.categories, - credential_sources: [managedMcpCredentialSource(provider)], - }; -} - -function managedMcpCredentialSource( - provider: UpstreamManagedMcpProvider, -): UpstreamCredentialSource { - const emptySchema = { type: "object", properties: {}, additionalProperties: false }; - if (provider.connection_method !== "manual") { - const oauth = provider.connection_method === "oauth_dynamic_client_registration"; - return { - type_id: oauth ? "managed_mcp_oauth" : "managed_mcp_no_auth", - display_name: oauth ? "Sign in with your browser" : "No authentication", - documentation: oauth - ? "Sign in with your provider account." - : "This provider does not require credentials.", - requires_brokering: oauth, - supports_auto_display_name: false, - display_name_description: `A label for this ${provider.name} connection.`, - configuration_schema: { resource_server: emptySchema, user_credential: emptySchema }, - }; - } - - if (provider.suggested_auth_mode === "oauth_authorization_code") { - return { - type_id: "oauth_auth_flow", - display_name: "OAuth application", - documentation: "Enter the OAuth application registered with this provider.", - requires_brokering: true, - supports_auto_display_name: false, - display_name_description: `A label for this ${provider.name} connection.`, - configuration_schema: { - resource_server: { - type: "object", - properties: { - client_id: { type: "string", title: "Client ID" }, - client_secret: { type: "string", title: "Client secret", format: "password" }, - }, - required: ["client_id", "client_secret"], - additionalProperties: false, - }, - user_credential: emptySchema, - }, - }; - } - - const bearer = provider.suggested_auth_mode === "bearer_token"; - const label = bearer ? "Bearer token" : "API key"; - return { - type_id: "api_key", - display_name: label, - documentation: `Enter the ${label.toLowerCase()} for this provider.`, - requires_brokering: false, - supports_auto_display_name: false, - display_name_description: `A label for this ${provider.name} connection.`, - configuration_schema: { - resource_server: { - type: "object", - properties: { api_key: { type: "string", title: label, format: "password" } }, - required: ["api_key"], - additionalProperties: false, - }, - user_credential: emptySchema, - }, - }; -} - -function assignedAgentIds( - accountId: string, - agentIds: readonly string[], - agentServers: ReadonlyMap, -): string[] { - return agentIds.filter((agentId) => - agentServers.get(agentId)?.tools?.some((tool) => tool.tool_group_instance_id === accountId), - ); -} - -function configuredProxiedServerId( - options: ConnectorRouteOptions, - agentId: string, -): string | undefined { - return (options.environment ?? process.env)[ - `${agentEnvironmentPrefix(agentId)}_VERCEL_MCP_SERVER_ID` - ]?.trim(); -} - -function proxiedMcpUrl(item: UpstreamProxiedMcpServerListItem): string | undefined { - if (!isRecord(item.server.endpoint_configuration)) return undefined; - const value = item.server.endpoint_configuration.url; - if (typeof value !== "string" || !value.trim()) return undefined; - try { - const url = new URL(value); - url.hash = ""; - url.search = ""; - url.hostname = url.hostname.toLowerCase(); - url.pathname = url.pathname === "/" ? "" : url.pathname.replace(/\/$/, ""); - return url.toString().replace(/\/$/, ""); - } catch { - return undefined; - } -} - -function proxiedMcpProviderName( - url: string, - items: readonly UpstreamProxiedMcpServerListItem[], - agentIds: readonly string[], -): string { - const inferred = items - .map((item) => { - const owner = agentIds.find((agentId) => - item.server.display_name.startsWith(`OpenBot ${agentId} `), - ); - return owner ? item.server.display_name.slice(`OpenBot ${owner} `.length).trim() : undefined; - }) - .filter((value): value is string => Boolean(value)); - const firstInferred = inferred[0]; - if (firstInferred && inferred.every((value) => value === firstInferred)) return firstInferred; - const hostname = new URL(url).hostname; - const label = hostname - .split(".") - .find((part) => !["api", "mcp", "www"].includes(part.toLowerCase())); - return displayCategory(label || hostname); -} - -function proxiedMcpIconKey(url: string, name: string): string { - const hostname = new URL(url).hostname.toLowerCase(); - if (hostname.includes("vercel")) return "vercel"; - return name; -} - -function isRecord(value: unknown): value is Record { - return typeof value === "object" && value !== null && !Array.isArray(value); -} - -function serializeSkillsCatalog( - skills: readonly UpstreamSkill[], - trustedProviders: readonly UpstreamTrustedSkillProvider[], - toolProviders: readonly UpstreamProvider[], - agentIds: readonly string[], - agentRegistries: ReadonlyMap, -) { - const materializedTrustedSkillIds = new Set(); - const trustedSkillProviders = trustedProviders.map((provider) => ({ - id: provider.id, - name: provider.name, - description: provider.description, - categories: provider.categories?.length ? provider.categories : ["other"], - icon_key: trustedProviderIconKey(provider), - skills: provider.skills.map((trustedSkill) => { - const materialized = findMaterializedTrustedSkill( - skills, - provider.id, - trustedSkill.source_path, - ); - if (materialized) materializedTrustedSkillIds.add(materialized.id); - return { - id: trustedCatalogSkillId(provider.id, trustedSkill.id), - name: trustedSkill.name, - description: trustedSkill.description, - assigned_agent_ids: materialized - ? agentIds.filter((agentId) => - agentRegistries - .get(agentId) - ?.skills?.some((candidate) => candidate.id === materialized.id), - ) - : [], - }; - }), - })); - const teamSkills = skills - .filter((skill) => !materializedTrustedSkillIds.has(skill.id)) - .map((skill) => { - const sourceProvider = toolProviders.find( - (provider) => provider.type_id === skill.source_provider_id, - ); - const iconUrl = skillIconUrl(skill) ?? (sourceProvider && providerIconUrl(sourceProvider)); - const iconKey = skillIconKey(skill) ?? (sourceProvider && providerIconKey(sourceProvider)); - return { - id: skill.id, - name: displaySkillName(skill.name, agentIds), - description: skill.description ?? "", - provider: skillCategory(skill), - ...(iconUrl ? { iconUrl } : {}), - ...(iconKey ? { iconKey } : {}), - assigned_agent_ids: agentIds.filter((agentId) => - agentRegistries.get(agentId)?.skills?.some((candidate) => candidate.id === skill.id), - ), - }; - }); - const teamSkillProviders = new Map< - string, - { - id: string; - name: string; - description: string; - categories: string[]; - icon_url?: string; - icon_key?: string; - skills: { id: string; name: string; description: string; assigned_agent_ids: string[] }[]; - } - >(); - for (const skill of teamSkills) { - const existing = teamSkillProviders.get(skill.provider); - if (existing) { - existing.skills.push(skill); - continue; - } - teamSkillProviders.set(skill.provider, { - id: `team:${skill.provider}`, - name: skill.provider, - description: `Skills available from ${skill.provider}.`, - categories: [skill.provider], - ...(skill.iconUrl ? { icon_url: skill.iconUrl } : {}), - ...(skill.iconKey ? { icon_key: skill.iconKey } : {}), - skills: [skill], - }); - } - return [...trustedSkillProviders, ...teamSkillProviders.values()]; -} - -function findMaterializedTrustedSkill( - skills: readonly UpstreamSkill[], - providerId: string, - sourcePath: string, -): UpstreamSkill | undefined { - return skills.find( - (skill) => skill.source_provider_id === providerId && skill.source_path === sourcePath, - ); -} - -function trustedCatalogSkillId(providerId: string, skillId: string): string { - return `trusted:${JSON.stringify([providerId, skillId])}`; -} - -function parseTrustedCatalogSkillId( - value: string, -): { providerId: string; skillId: string } | undefined { - if (!value.startsWith("trusted:")) return undefined; - try { - const parsed: unknown = JSON.parse(value.slice("trusted:".length)); - if ( - !Array.isArray(parsed) || - parsed.length !== 2 || - parsed.some((item) => typeof item !== "string" || item.length === 0) - ) - return undefined; - return { providerId: parsed[0] as string, skillId: parsed[1] as string }; - } catch { - return undefined; - } -} - -function trustedProviderIconKey(provider: UpstreamTrustedSkillProvider): string { - const identity = `${provider.name} ${provider.repository_url}`.toLowerCase(); - if (/\baws\b|amazon/.test(identity)) return "aws"; - if (identity.includes("cloudflare")) return "cloudflare"; - return provider.name; -} - -async function assignToolAccount( - options: ConnectorRouteOptions, - accountId: string, - agentId: string, - signal?: AbortSignal, -): Promise { - const serverId = - (options.environment ?? process.env)[ - `${agentEnvironmentPrefix(agentId)}_MCP_SERVER_ID` - ]?.trim() || `openbot-${agentId}`; - - const result = await tildeRequest( - options, - `/mcp/tool-group/${encodeURIComponent(accountId)}/tools/enable-and-bind`, - "POST", - { - all_tools: true, - tool_source_type_ids: [], - mcp_server_instance_ids: [serverId], - }, - signal, - ); - if ( - typeof result !== "object" || - result === null || - (result as { complete?: unknown }).complete !== true - ) { - throw new ConnectorUpstreamError("Tilde could not enable and bind every tool", 502); - } -} - -async function removeToolAccount( - options: ConnectorRouteOptions, - accountId: string, - agentId: string, - signal?: AbortSignal, -): Promise { - const serverId = - (options.environment ?? process.env)[ - `${agentEnvironmentPrefix(agentId)}_MCP_SERVER_ID` - ]?.trim() || `openbot-${agentId}`; - await tildeRequest( - options, - `/mcp/mcp-server/${encodeURIComponent(serverId)}/tool-group/${encodeURIComponent(accountId)}`, - "DELETE", - undefined, - signal, - ); -} - -async function setSkillAssignment( - options: ConnectorRouteOptions, - skillId: string, - agentId: string, - enabled: boolean, - signal?: AbortSignal, -): Promise { - const [skills, trustedSkillProviders, registries] = await Promise.all([ - listSkills(options, signal), - listTrustedSkillProviders(options, signal), - listSkillRegistries(options, signal), - ]); - const registry = resolveSkillRegistry(options, registries, agentId); - if (!registry) throw new ConnectorUpstreamError("This bot has no Tilde skill registry", 404); - const currentIds = (registry.skills ?? []).map((skill) => skill.id); - const trustedReference = parseTrustedCatalogSkillId(skillId); - if (trustedReference) { - const provider = trustedSkillProviders.find( - (candidate) => candidate.id === trustedReference.providerId, - ); - const trustedSkill = provider?.skills.find( - (candidate) => candidate.id === trustedReference.skillId, - ); - if (!provider || !trustedSkill) throw new ConnectorUpstreamError("Unknown skill", 404); - const materialized = findMaterializedTrustedSkill( - skills, - provider.id, - trustedSkill.source_path, - ); - if (enabled) { - if (materialized && currentIds.includes(materialized.id)) return; - await tildeRequest( - options, - `/skill-registry/${encodeURIComponent(registry.id)}/provider-skills`, - "POST", - { provider_id: provider.id, skill_ids: [trustedSkill.id] }, - signal, - ); - return; - } - if (!materialized || !currentIds.includes(materialized.id)) return; - await replaceRegistrySkills( - options, - registry.id, - currentIds.filter((id) => id !== materialized.id), - signal, - ); - return; - } - if (!skills.some((skill) => skill.id === skillId)) - throw new ConnectorUpstreamError("Unknown skill", 404); - const skillIds = enabled - ? [...new Set([...currentIds, skillId])] - : currentIds.filter((id) => id !== skillId); - await replaceRegistrySkills(options, registry.id, skillIds, signal); -} - -async function replaceRegistrySkills( - options: ConnectorRouteOptions, - registryId: string, - skillIds: readonly string[], - signal?: AbortSignal, -): Promise { - await tildeRequest( - options, - `/skill-registry/${encodeURIComponent(registryId)}`, - "PATCH", - { skill_ids: skillIds }, - signal, - ); -} - -function pageItems(page: Record): unknown[] { - if (Array.isArray(page.items)) return page.items; - if (Array.isArray(page.data)) return page.data; - if (Array.isArray(page)) return page as unknown[]; - return []; -} - -function serializeProvider(provider: UpstreamProvider) { - const iconUrl = providerIconUrl(provider); - const iconSlug = providerIconKey(provider); - return { - type_id: provider.type_id, - name: provider.name ?? provider.type_id, - ...(provider.documentation ? { documentation: provider.documentation } : {}), - // Provider branding straight from Tilde catalog metadata. - ...(iconUrl ? { icon_url: iconUrl } : {}), - ...(iconSlug ? { icon_slug: iconSlug } : {}), - categories: toolProviderCategories(provider), - credential_sources: (provider.credential_sources ?? []).map((source) => ({ - type_id: source.type_id, - name: source.display_name || source.name || source.type_id, - ...(source.documentation ? { documentation: source.documentation } : {}), - requires_brokering: source.requires_brokering ?? false, - supports_auto_display_name: source.supports_auto_display_name ?? false, - ...(source.display_name_description - ? { display_name_description: source.display_name_description } - : {}), - resource_server_schema: source.configuration_schema?.resource_server ?? null, - user_credential_schema: source.configuration_schema?.user_credential ?? null, - })), - }; -} - -const otherToolCategoryIds = new Set([ - "custom", - "custom_tool", - "custom_tools", - "custom_tool_provider", - "proxied_mcp", - "proxied_mcp_server", -]); - -function toolProviderCategories(provider: UpstreamProvider): string[] { - if (systemToolProvider(provider)) return ["system"]; - const categories = provider.categories ?? []; - const isCustomProvider = provider.type_id.startsWith("custom_tool_provider:"); - const belongsInOther = categories.some((category) => - otherToolCategoryIds.has( - category - .trim() - .toLowerCase() - .replaceAll(/[\s-]+/g, "_"), - ), - ); - return isCustomProvider || belongsInOther || categories.length === 0 ? ["other"] : categories; -} - -const hiddenSystemProviderIds = new Set([ - "chatkit_internal_agent", - "message_agent", - "tilde_browser", - "tilde_control_plane", - "tilde_human_approval", - "tilde_memory", - "tilde_memory_bank", - "tilde_skill_registry", - "tilde_wallet", - "tilde_wiki", -]); -const hiddenSystemProviderNames = new Set([ - "message agent", - "message internal agent", - "tilde browser", - "tilde control plane", - "tilde human approval", - "tilde memory bank", - "tilde skill registry", - "tilde pay", - "tilde wiki", -]); - -function systemToolProvider(provider: UpstreamProvider): boolean { - const id = provider.type_id.toLowerCase(); - return ( - hiddenSystemProviderIds.has(id) || - hiddenSystemProviderNames.has((provider.name ?? "").trim().toLowerCase()) - ); -} - -function providerIconUrl(provider: UpstreamProvider): string | undefined { - return imageUrl( - provider.icon_url, - provider.metadata?.icon_url, - provider.metadata?.iconUrl, - provider.metadata?.logo_url, - provider.metadata?.logoUrl, - provider.metadata?.icon, - ); -} - -function providerIconKey(provider: UpstreamProvider): string | undefined { - return firstText( - provider.icon_slug, - provider.metadata?.icon_slug, - provider.metadata?.iconSlug, - provider.metadata?.icon, - ); -} - -function skillIconUrl(skill: UpstreamSkill): string | undefined { - return imageUrl( - skill.icon_url, - skill.metadata?.icon_url, - skill.metadata?.iconUrl, - skill.metadata?.logo_url, - skill.metadata?.logoUrl, - ); -} - -function skillIconKey(skill: UpstreamSkill): string | undefined { - return firstText( - skill.provider_icon_key, - skill.providerIconKey, - skill.metadata?.provider_icon_key, - skill.metadata?.providerIconKey, - skill.metadata?.icon_slug, - skill.metadata?.iconSlug, - skill.source_provider_id, - ); -} - -function imageUrl(...candidates: unknown[]): string | undefined { - return candidates.find( - (candidate): candidate is string => - typeof candidate === "string" && /^(?:https?:\/\/|data:image\/)/.test(candidate), - ); -} - -function firstText(...candidates: unknown[]): string | undefined { - return candidates.find( - (candidate): candidate is string => - typeof candidate === "string" && candidate.trim().length > 0, - ); -} - -function skillCategory(skill: UpstreamSkill): string { - const metadataCategory = skill.metadata?.category; - const category = - skill.category || - (typeof metadataCategory === "string" ? metadataCategory : undefined) || - skill.source_provider_id || - skill.source_kind; - const display = category ? displayCategory(category) : ""; - return display || "Other"; -} - -function displayCategory(value: string): string { - const display = value - .trim() - .replaceAll(/[_-]+/g, " ") - .replace(/\b\w/g, (character) => character.toUpperCase()); - return display.toLowerCase() === "openbot" ? "OpenBot" : display; -} - -function serializeAccount(account: UpstreamAccount) { - return { - id: account.id, - display_name: account.display_name ?? account.id, - status: account.status ?? "unknown", - ...(account.tool_group_source_type_id - ? { provider_type_id: account.tool_group_source_type_id } - : {}), - ...(account.credential_source_type_id - ? { credential_source_type_id: account.credential_source_type_id } - : {}), - }; -} - -class ConnectorUpstreamError extends Error { - constructor( - message: string, - readonly status: number, - ) { - super(message); - } -} - -async function tildeJson( - options: ConnectorRouteOptions, - teamPath: string, - body?: unknown, - signal?: AbortSignal, -): Promise { - return tildeRequest(options, teamPath, body === undefined ? "GET" : "POST", body, signal); -} - -async function tildeRequest( - options: ConnectorRouteOptions, - teamPath: string, - method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT", - body?: unknown, - signal?: AbortSignal, -): Promise { - const url = new URL( - `/api/v1/team/${encodeURIComponent(options.teamId)}${teamPath}`, - options.baseUrl ?? defaultBaseUrl, - ); - const response = await (options.fetch ?? globalThis.fetch)(url, { - method, - headers: { - accept: "application/json", - ...(body === undefined ? {} : { "content-type": "application/json" }), - "x-api-key": options.apiKey, - "x-tilde-org-id": options.orgId, - "x-tilde-team-id": options.teamId, - }, - ...(body === undefined ? {} : { body: JSON.stringify(body) }), - ...(signal ? { signal } : {}), - }); - const payload = await response.json().catch(() => undefined); - if (!response.ok) { - const detail = - typeof payload === "object" && payload !== null - ? ((payload as { error?: string; message?: string }).error ?? - (payload as { message?: string }).message) - : undefined; - throw new ConnectorUpstreamError( - detail ?? `Tilde connector request failed (${response.status})`, - response.status >= 500 ? 502 : response.status, - ); - } - return payload; -} - -function unavailable(context: Context): Response { - return context.json( - { error: "Connectors are unavailable because Tilde server credentials are not configured" }, - 503, - ); -} - -function upstreamFailure(context: Context, error: unknown): Response { - if (error instanceof ConnectorUpstreamError) - return context.json({ error: error.message }, error.status as 400); - return context.json( - { - error: "Tilde connector request failed", - detail: error instanceof Error ? error.message : "Unknown upstream failure", - }, - 502, - ); -} - -function connectorAuthorizedPage(client: "electron" | "web"): string { - // Electron registers the openbot:// scheme; bouncing to it brings the app - // forward while its dialog polls the account status. - const deepLinked = client === "electron"; - const hint = deepLinked - ? "Returning you to OpenBot… If nothing happens, switch back to the OpenBot app." - : "You can close this tab and return to OpenBot."; - const redirect = deepLinked - ? '' - : ""; - return [ - "", - 'OpenBot', - "", - "
", - "

Authorization complete

", - `

${hint}

`, - "
", - redirect, - "", - ].join(""); -} - -function optionsFromEnvironment(): ConnectorRouteOptions | undefined { - const apiKey = process.env.TILDE_API_KEY?.trim(); - const orgId = process.env.TILDE_ORG_ID?.trim(); - const teamId = process.env.TILDE_TEAM_ID?.trim(); - if (!apiKey || !orgId || !teamId) return undefined; - return { - apiKey, - orgId, - teamId, - baseUrl: process.env.TILDE_BASE_URL?.trim() || undefined, - }; -} diff --git a/apps/control-service/src/index.ts b/apps/control-service/src/index.ts index 3a1ccd18..779f850c 100644 --- a/apps/control-service/src/index.ts +++ b/apps/control-service/src/index.ts @@ -1,6 +1,6 @@ export { app, createApp } from "./app.js"; export { registerTildeChatProxy, type TildeChatProxyOptions } from "./chat-proxy.js"; +export { registerTildeProxy, type TildeProxyOptions } from "./tilde-proxy.js"; export { registerComputerPreview } from "./computer-preview.js"; +export { registerConnectorAuthorizedRoute } from "./connector-authorized.js"; export { registerOwnerAuth, requireOwner } from "./auth.js"; -export { registerRoutineRoutes, type RoutineRouteOptions } from "./routines.js"; -export { registerSignalRoutes, type SignalRouteOptions } from "./signals.js"; diff --git a/apps/control-service/src/routines.test.ts b/apps/control-service/src/routines.test.ts deleted file mode 100644 index 4fbca474..00000000 --- a/apps/control-service/src/routines.test.ts +++ /dev/null @@ -1,303 +0,0 @@ -import { describe, expect, it, vi } from "vite-plus/test"; -import { createApp } from "./app.js"; - -const automationId = "29fcfbfb-6de3-4b6b-bc35-a1bbf15e923b"; -const scheduleId = "7412204e-ce8e-4822-a9ee-b7a4eb6990a5"; -const eventId = "8dcc09db-fbc3-4d54-8c33-d7dfbd70dc52"; - -const automation = { - id: automationId, - org_id: "org-1", - team_id: "team-1", - authorization: { visibility: "private", ownership: "private" }, - created_by_user_id: "user-1", - agent_id: "inbox-1", - name: "Deploy watchdog", - instruction: "Check deploy health", - enabled: true, - status: "active", - generation: 3, - applied_generation: 3, - error_message: null, - last_run_at: "2026-08-26T07:00:00Z", - last_session_id: "64099782-8536-4caa-9f7b-2f6b453eafc6", - last_error: "last execution failed", - triggers: [ - { - id: scheduleId, - kind: "schedule", - schedule: "0 7 * * *", - schedule_description: "Daily at 07:00 UTC", - next_run_at: "2026-08-27T07:00:00Z", - materialized_resource_id: "44c021e1-5d1a-4c39-9029-c545f17339bf", - created_at: "2026-08-01T00:00:00Z", - updated_at: "2026-08-20T00:00:00Z", - }, - { - id: eventId, - kind: "event", - signal_provider_instance_id: "spi_abc", - signal_type: "github.pull_request.opened", - filter: { json_equals: [{ path: "pull_request.draft", value: false }] }, - session_policy: { - type: "session_key_template", - namespace: "openbot", - template: "repo#{{ repository.full_name }}", - create_if_missing: true, - }, - materialized_resource_id: "45e6efdf-080d-40a6-89d4-7d5fcd9b7303", - created_at: "2026-08-02T00:00:00Z", - updated_at: "2026-08-21T00:00:00Z", - }, - ], - created_at: "2026-08-01T00:00:00Z", - updated_at: "2026-08-21T00:00:00Z", -}; - -interface UpstreamCall { - method: string; - path: string; - query: URLSearchParams; - body?: unknown; -} - -function routineApp(respond: (call: UpstreamCall) => Response | undefined): { - app: ReturnType; - calls: UpstreamCall[]; -} { - const calls: UpstreamCall[] = []; - const fetch = vi.fn(async (input: URL | string, init?: RequestInit) => { - const url = input instanceof URL ? input : new URL(input); - const call: UpstreamCall = { - method: init?.method ?? "GET", - path: url.pathname, - query: url.searchParams, - body: typeof init?.body === "string" ? JSON.parse(init.body) : undefined, - }; - calls.push(call); - return respond(call) ?? new Response(JSON.stringify({ error: "unexpected" }), { status: 500 }); - }); - return { - app: createApp({ - routines: { - apiKey: "key", - orgId: "org-1", - teamId: "team-1", - baseUrl: "https://tilde.test", - fetch: fetch as unknown as typeof globalThis.fetch, - }, - }), - calls, - }; -} - -function defaultResponses(call: UpstreamCall): Response | undefined { - if (call.method === "GET" && call.path.endsWith(`/automations/${automationId}`)) - return Response.json(automation); - if (call.method === "GET" && call.path.endsWith("/automations")) - return Response.json({ items: [automation], next_page_token: null }); - if (call.method === "PUT" && call.path.includes("/automations/")) - return Response.json(automation); - if (call.method === "DELETE" && call.path.endsWith(`/automations/${automationId}`)) - return Response.json({ deleted: true }); - if (call.method === "POST" && call.path.endsWith(`/automations/${automationId}/run`)) - return Response.json({ - run_id: (call.body as { run_id: string }).run_id, - session_id: "8e0e2208-d42e-4e30-a5f2-56d4780e1445", - duplicate: false, - }); - return undefined; -} - -describe("routine automation facade", () => { - it("is unavailable without Tilde credentials and requires agent_id", async () => { - const unavailable = await createApp({}).request( - "https://openbot.test/api/routines?agent_id=inbox-1", - ); - expect(unavailable.status).toBe(503); - const missing = await routineApp(defaultResponses).app.request( - "https://openbot.test/api/routines", - ); - expect(missing.status).toBe(400); - }); - - it("pages authoritative automations and preserves the client Routine shape", async () => { - const { app, calls } = routineApp((call) => { - if (call.method !== "GET" || !call.path.endsWith("/automations")) return undefined; - if (!call.query.has("next_page_token")) - return Response.json({ items: [automation], next_page_token: "page-2" }); - return Response.json({ items: [], next_page_token: null }); - }); - const response = await app.request("https://openbot.test/api/routines?agent_id=inbox-1"); - expect(response.status).toBe(200); - await expect(response.json()).resolves.toEqual({ - items: [ - expect.objectContaining({ - id: automationId, - agent_id: "inbox-1", - status: "active", - generation: 3, - applied_generation: 3, - last_error: "last execution failed", - error_message: null, - last_run_at: "2026-08-26T07:00:00Z", - last_session_id: "64099782-8536-4caa-9f7b-2f6b453eafc6", - triggers: [ - expect.objectContaining({ - id: scheduleId, - kind: "schedule", - description: "Daily at 07:00 UTC", - next_run_at: "2026-08-27T07:00:00Z", - routine_id: "44c021e1-5d1a-4c39-9029-c545f17339bf", - }), - expect.objectContaining({ - id: eventId, - kind: "event", - instance_id: "spi_abc", - provider_type: "github", - rule_id: "45e6efdf-080d-40a6-89d4-7d5fcd9b7303", - }), - ], - }), - ], - }); - const pages = calls.filter((call) => call.path.endsWith("/automations")); - expect(pages).toHaveLength(2); - expect(pages[0]?.query.get("agent_id")).toBe("inbox-1"); - expect(pages[0]?.query.get("page_size")).toBe("100"); - expect(pages[1]?.query.get("next_page_token")).toBe("page-2"); - }); - - it("creates one automation with server-shaped triggers and generated UUIDs", async () => { - const { app, calls } = routineApp(defaultResponses); - const response = await app.request("https://openbot.test/api/routines", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ - agent_id: "inbox-1", - name: "Deploy watchdog", - instruction: "Check deploy health", - triggers: [ - { kind: "schedule", schedule: "0 7 * * *" }, - { - kind: "event", - instance_id: "spi_abc", - signal_type: "github.pull_request.opened", - filters: [{ path: "pull_request.draft", value: false }], - }, - ], - }), - }); - expect(response.status).toBe(201); - const put = calls.find((call) => call.method === "PUT"); - expect(put?.path).toMatch(/\/automations\/[0-9a-f-]{36}$/); - expect(put?.body).toMatchObject({ - agent_id: "inbox-1", - name: "Deploy watchdog", - instruction: "Check deploy health", - enabled: true, - triggers: [ - { id: expect.stringMatching(/^[0-9a-f-]{36}$/), kind: "schedule", schedule: "0 7 * * *" }, - { - id: expect.stringMatching(/^[0-9a-f-]{36}$/), - kind: "event", - signal_provider_instance_id: "spi_abc", - signal_type: "github.pull_request.opened", - filter: { json_equals: [{ path: "pull_request.draft", value: false }] }, - }, - ], - }); - }); - - it("GETs then fully PUTs an edit, preserving trigger ids and authorization", async () => { - const { app, calls } = routineApp(defaultResponses); - const response = await app.request( - `https://openbot.test/api/routines/${automationId}?agent_id=inbox-1`, - { - method: "PATCH", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ name: "Renamed", enabled: false }), - }, - ); - expect(response.status).toBe(200); - const put = calls.find((call) => call.method === "PUT"); - if (!put) throw new Error("Expected an automation PUT request"); - expect(put.body).toMatchObject({ - agent_id: "inbox-1", - name: "Renamed", - instruction: "Check deploy health", - enabled: false, - authorization: automation.authorization, - triggers: [ - { id: scheduleId, kind: "schedule" }, - { id: eventId, kind: "event" }, - ], - }); - expect((put.body as { triggers: unknown[] }).triggers[1]).toMatchObject({ - session_policy: automation.triggers[1]?.session_policy, - }); - }); - - it("delegates delete and run while checking the routine belongs to the requested agent", async () => { - const deleted = routineApp(defaultResponses); - const deleteResponse = await deleted.app.request( - `https://openbot.test/api/routines/${automationId}?agent_id=inbox-1`, - { method: "DELETE" }, - ); - expect(deleteResponse.status).toBe(200); - expect(deleted.calls.some((call) => call.method === "DELETE")).toBe(true); - - const run = routineApp(defaultResponses); - const runResponse = await run.app.request( - `https://openbot.test/api/routines/${automationId}/run?agent_id=inbox-1`, - { method: "POST" }, - ); - expect(runResponse.status).toBe(200); - await expect(runResponse.json()).resolves.toEqual({ - session_id: "8e0e2208-d42e-4e30-a5f2-56d4780e1445", - }); - const runCall = run.calls.find((call) => call.path.endsWith("/run")); - expect(runCall?.body).toEqual({ run_id: expect.stringMatching(/^[0-9a-f-]{36}$/) }); - - const wrongAgent = routineApp(defaultResponses); - const hidden = await wrongAgent.app.request( - `https://openbot.test/api/routines/${automationId}?agent_id=inbox-2`, - { method: "DELETE" }, - ); - expect(hidden.status).toBe(404); - expect(wrongAgent.calls.some((call) => call.method === "DELETE")).toBe(false); - }); - - it("keeps authoritative run failures separate from reconciliation errors", async () => { - const failedRoot = { - ...automation, - status: "error", - error_message: "signal rule rejected", - last_error: "agent execution failed", - }; - const root = routineApp((call) => { - if (call.path.endsWith("/automations")) - return Response.json({ items: [failedRoot], next_page_token: null }); - return undefined; - }); - const response = await root.app.request("https://openbot.test/api/routines?agent_id=inbox-1"); - await expect(response.json()).resolves.toMatchObject({ - items: [ - { - status: "error", - error_message: "signal rule rejected", - last_error: "agent execution failed", - }, - ], - }); - }); - - it("maps upstream failures", async () => { - const upstream = routineApp( - () => new Response(JSON.stringify({ error: "kaput" }), { status: 500 }), - ); - const failed = await upstream.app.request("https://openbot.test/api/routines?agent_id=inbox-1"); - expect(failed.status).toBe(502); - await expect(failed.json()).resolves.toEqual({ error: "kaput" }); - }); -}); diff --git a/apps/control-service/src/routines.ts b/apps/control-service/src/routines.ts deleted file mode 100644 index 0f486c8d..00000000 --- a/apps/control-service/src/routines.ts +++ /dev/null @@ -1,402 +0,0 @@ -import type { Hono } from "hono"; -import { - pageItems, - text, - tildeJson, - tildeOptionsFromEnvironment, - tildeUnavailable, - tildeUpstreamFailure, - valueRecord, - type TildeRouteOptions, -} from "./tilde-upstream.js"; - -export type RoutineRouteOptions = TildeRouteOptions; - -interface JsonEqualsPredicate { - path: string; - value: unknown; -} - -type TriggerSpec = - | { kind: "schedule"; id?: string; schedule: string } - | { - kind: "event"; - id?: string; - instanceId: string; - signalType: string; - filters?: JsonEqualsPredicate[]; - sessionPolicy?: unknown; - }; - -interface CreateRoutineBody { - agentId: string; - name: string; - instruction: string; - enabled: boolean; - triggers: TriggerSpec[]; -} - -interface UpdateRoutineBody { - name?: string; - instruction?: string; - enabled?: boolean; - triggers?: TriggerSpec[]; -} - -interface UpstreamTrigger { - id: string; - kind: "schedule" | "event"; - schedule?: string; - signal_provider_instance_id?: string; - signal_type?: string; - filter?: { json_equals?: JsonEqualsPredicate[] } | null; - materialized_resource_id?: string | null; - schedule_description?: string | null; - next_run_at?: string | null; - session_policy?: unknown; - created_at?: string; - updated_at?: string; -} - -interface UpstreamAutomation { - id: string; - agent_id: string; - name: string; - instruction: string; - enabled: boolean; - status?: "reconciling" | "active" | "error" | "deleting"; - generation?: number; - applied_generation?: number; - error_message?: string | null; - last_run_at?: string | null; - last_session_id?: string | null; - last_error?: string | null; - authorization?: unknown; - triggers: UpstreamTrigger[]; - created_at: string; - updated_at: string; -} - -/** Thin compatibility facade over Tilde's authoritative unified automations API. */ -export function registerRoutineRoutes(app: Hono, configuredOptions?: RoutineRouteOptions): void { - const options = (): RoutineRouteOptions | undefined => - configuredOptions ?? tildeOptionsFromEnvironment(); - - app.get("/api/routines", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Routines"); - const agentId = context.req.query("agent_id")?.trim(); - if (!agentId) return context.json({ error: "agent_id is required" }, 400); - try { - return context.json({ items: await listRoutines(resolved, agentId) }); - } catch (error) { - return tildeUpstreamFailure(context, "routines", error); - } - }); - - app.post("/api/routines", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Routines"); - let body: CreateRoutineBody; - try { - body = parseCreateRoutineBody(await context.req.json()); - } catch (error) { - return context.json({ error: error instanceof Error ? error.message : "Invalid body" }, 400); - } - try { - await putAutomation(resolved, crypto.randomUUID(), body); - return context.json({ items: await listRoutines(resolved, body.agentId) }, 201); - } catch (error) { - return tildeUpstreamFailure(context, "routines", error); - } - }); - - app.patch("/api/routines/:automationId", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Routines"); - const agentId = context.req.query("agent_id")?.trim(); - if (!agentId) return context.json({ error: "agent_id is required" }, 400); - let body: UpdateRoutineBody; - try { - body = parseUpdateRoutineBody(await context.req.json()); - } catch (error) { - return context.json({ error: error instanceof Error ? error.message : "Invalid body" }, 400); - } - try { - const automationId = context.req.param("automationId"); - const current = await getAutomation(resolved, automationId); - if (current.agent_id !== agentId) return context.json({ error: "Routine not found" }, 404); - await putAutomation(resolved, automationId, { - agentId, - name: body.name ?? current.name, - instruction: body.instruction ?? current.instruction, - enabled: body.enabled ?? current.enabled, - triggers: - body.triggers === undefined - ? current.triggers.map(upstreamTriggerSpec) - : preserveSessionPolicies(body.triggers, current.triggers), - authorization: current.authorization, - }); - return context.json({ items: await listRoutines(resolved, agentId) }); - } catch (error) { - return tildeUpstreamFailure(context, "routines", error); - } - }); - - app.delete("/api/routines/:automationId", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Routines"); - const agentId = context.req.query("agent_id")?.trim(); - if (!agentId) return context.json({ error: "agent_id is required" }, 400); - try { - const automationId = context.req.param("automationId"); - const current = await getAutomation(resolved, automationId); - if (current.agent_id !== agentId) return context.json({ error: "Routine not found" }, 404); - await tildeJson(resolved, `/automations/${encodeURIComponent(automationId)}`, { - method: "DELETE", - }); - return context.json({ items: await listRoutines(resolved, agentId) }); - } catch (error) { - return tildeUpstreamFailure(context, "routines", error); - } - }); - - app.post("/api/routines/:automationId/run", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Routines"); - const agentId = context.req.query("agent_id")?.trim(); - if (!agentId) return context.json({ error: "agent_id is required" }, 400); - try { - const automationId = context.req.param("automationId"); - const current = await getAutomation(resolved, automationId); - if (current.agent_id !== agentId) return context.json({ error: "Routine not found" }, 404); - const result = valueRecord( - await tildeJson(resolved, `/automations/${encodeURIComponent(automationId)}/run`, { - method: "POST", - body: { run_id: crypto.randomUUID() }, - }), - ); - const sessionId = text(result?.session_id); - if (!sessionId) return context.json({ error: "Tilde returned no session id" }, 502); - return context.json({ session_id: sessionId }); - } catch (error) { - return tildeUpstreamFailure(context, "routines", error); - } - }); -} - -async function listRoutines(options: RoutineRouteOptions, agentId: string) { - const items: UpstreamAutomation[] = []; - let token: string | undefined; - for (let page = 0; page < 100; page += 1) { - const query = new URLSearchParams({ agent_id: agentId, page_size: "100" }); - if (token) query.set("next_page_token", token); - const response = valueRecord(await tildeJson(options, `/automations?${query.toString()}`)); - if (!response) throw new Error("Tilde returned an invalid automation page"); - items.push(...(pageItems(response) as UpstreamAutomation[])); - const next = text(response.next_page_token); - if (!next) return items.map(serializeRoutine); - token = next; - } - throw new Error("Tilde automation pagination exceeded 100 pages"); -} - -async function getAutomation( - options: RoutineRouteOptions, - automationId: string, -): Promise { - const result = valueRecord( - await tildeJson(options, `/automations/${encodeURIComponent(automationId)}`), - ); - if (!result) throw new Error("Tilde returned an invalid automation"); - return result as unknown as UpstreamAutomation; -} - -async function putAutomation( - options: RoutineRouteOptions, - automationId: string, - body: CreateRoutineBody & { authorization?: unknown }, -): Promise { - await tildeJson(options, `/automations/${encodeURIComponent(automationId)}`, { - method: "PUT", - body: { - agent_id: body.agentId, - name: body.name, - instruction: body.instruction, - enabled: body.enabled, - ...(body.authorization === undefined ? {} : { authorization: body.authorization }), - triggers: body.triggers.map((trigger) => ({ - id: trigger.id ?? crypto.randomUUID(), - ...(trigger.kind === "schedule" - ? { kind: "schedule", schedule: trigger.schedule } - : { - kind: "event", - signal_provider_instance_id: trigger.instanceId, - signal_type: trigger.signalType, - filter: { json_equals: trigger.filters ?? [] }, - ...(trigger.sessionPolicy === undefined - ? {} - : { session_policy: trigger.sessionPolicy }), - }), - })), - }, - }); -} - -function serializeRoutine(automation: UpstreamAutomation) { - return { - id: automation.id, - agent_id: automation.agent_id, - name: automation.name, - instruction: automation.instruction, - enabled: automation.enabled, - triggers: automation.triggers.map(serializeTrigger), - last_run_at: automation.last_run_at ?? null, - last_session_id: automation.last_session_id ?? null, - last_error: automation.last_error ?? null, - error_message: automation.error_message ?? null, - created_at: automation.created_at, - updated_at: automation.updated_at, - status: automation.status, - generation: automation.generation, - applied_generation: automation.applied_generation, - }; -} - -function serializeTrigger(trigger: UpstreamTrigger) { - const resourceId = trigger.materialized_resource_id ?? trigger.id; - if (trigger.kind === "schedule") { - return { - id: trigger.id, - kind: "schedule" as const, - schedule: trigger.schedule ?? "", - ...(trigger.schedule_description ? { description: trigger.schedule_description } : {}), - next_run_at: trigger.next_run_at ?? null, - routine_id: resourceId, - }; - } - const signalType = trigger.signal_type ?? ""; - return { - id: trigger.id, - kind: "event" as const, - instance_id: trigger.signal_provider_instance_id ?? "", - provider_type: signalType.split(".")[0] ?? "", - signal_type: signalType, - filters: trigger.filter?.json_equals ?? [], - rule_id: resourceId, - }; -} - -function upstreamTriggerSpec(trigger: UpstreamTrigger): TriggerSpec { - if (trigger.kind === "schedule") - return { id: trigger.id, kind: "schedule", schedule: trigger.schedule ?? "" }; - return { - id: trigger.id, - kind: "event", - instanceId: trigger.signal_provider_instance_id ?? "", - signalType: trigger.signal_type ?? "", - filters: trigger.filter?.json_equals ?? [], - ...(trigger.session_policy === undefined ? {} : { sessionPolicy: trigger.session_policy }), - }; -} - -function preserveSessionPolicies( - desired: TriggerSpec[], - current: UpstreamTrigger[], -): TriggerSpec[] { - const currentById = new Map(current.map((trigger) => [trigger.id, trigger])); - return desired.map((trigger) => { - if (trigger.kind !== "event" || !trigger.id) return trigger; - const existing = currentById.get(trigger.id); - if ( - existing?.kind !== "event" || - existing.signal_provider_instance_id !== trigger.instanceId || - existing.signal_type !== trigger.signalType || - existing.session_policy === undefined - ) - return trigger; - return { ...trigger, sessionPolicy: existing.session_policy }; - }); -} - -function parseCreateRoutineBody(value: unknown): CreateRoutineBody { - const record = valueRecord(value); - if (!record) throw new Error("Invalid routine request"); - const agentId = text(record.agent_id); - const name = text(record.name); - const instruction = typeof record.instruction === "string" ? record.instruction : ""; - if (!agentId || !name || !instruction) - throw new Error("agent_id, name, and instruction are required"); - if (record.enabled !== undefined && typeof record.enabled !== "boolean") - throw new Error("enabled must be a boolean"); - return { - agentId, - name, - instruction, - enabled: record.enabled ?? true, - triggers: parseTriggerSpecs(record.triggers, false), - }; -} - -function parseUpdateRoutineBody(value: unknown): UpdateRoutineBody { - const record = valueRecord(value); - if (!record) throw new Error("Invalid routine request"); - if (record.name !== undefined && !text(record.name)) throw new Error("name must not be empty"); - if (record.instruction !== undefined && typeof record.instruction !== "string") - throw new Error("instruction must be a string"); - if (record.enabled !== undefined && typeof record.enabled !== "boolean") - throw new Error("enabled must be a boolean"); - return { - ...(record.name !== undefined ? { name: text(record.name) } : {}), - ...(record.instruction !== undefined ? { instruction: record.instruction as string } : {}), - ...(record.enabled !== undefined ? { enabled: record.enabled } : {}), - ...(record.triggers !== undefined - ? { triggers: parseTriggerSpecs(record.triggers, true) } - : {}), - }; -} - -function parseTriggerSpecs(value: unknown, allowIds: boolean): TriggerSpec[] { - if (!Array.isArray(value) || value.length < 1 || value.length > 8) - throw new Error("triggers must contain between 1 and 8 entries"); - const parsed = value.map((entry) => parseTriggerSpec(entry, allowIds)); - const ids = parsed.flatMap((trigger) => (trigger.id ? [trigger.id] : [])); - if (new Set(ids).size !== ids.length) throw new Error("Trigger ids must be unique"); - return parsed; -} - -function parseTriggerSpec(value: unknown, allowIds: boolean): TriggerSpec { - const record = valueRecord(value); - if (!record) throw new Error("Invalid trigger"); - const id = record.id === undefined ? undefined : text(record.id); - if (id !== undefined && (!id || !allowIds)) throw new Error("Invalid trigger id"); - if (record.kind === "schedule") { - const schedule = text(record.schedule); - if (!schedule) throw new Error("A schedule trigger requires a schedule"); - return { kind: "schedule", schedule, ...(id ? { id } : {}) }; - } - if (record.kind === "event") { - const instanceId = text(record.instance_id); - const signalType = text(record.signal_type); - if (!instanceId || !signalType) - throw new Error("An event trigger requires instance_id and signal_type"); - return { - kind: "event", - instanceId, - signalType, - ...(record.filters === undefined ? {} : { filters: parseFilters(record.filters) }), - ...(id ? { id } : {}), - }; - } - throw new Error('Trigger kind must be "schedule" or "event"'); -} - -function parseFilters(value: unknown): JsonEqualsPredicate[] { - if (!Array.isArray(value)) throw new Error("filters must be an array"); - return value.map((entry) => { - const record = valueRecord(entry); - const path = text(record?.path); - if (!record || !path || !("value" in record)) throw new Error("Invalid trigger filter"); - return { path, value: record.value }; - }); -} diff --git a/apps/control-service/src/signals.test.ts b/apps/control-service/src/signals.test.ts deleted file mode 100644 index fae19f0a..00000000 --- a/apps/control-service/src/signals.test.ts +++ /dev/null @@ -1,429 +0,0 @@ -import { describe, expect, it, vi } from "vite-plus/test"; -import { createApp } from "./app.js"; - -const providersPage = { - items: [ - { - type_id: "github", - name: "GitHub", - documentation: "GitHub repository events.", - instructions: "Point your webhook at {{webhook_url}}.", - auth_methods: ["webhook"], - route_descriptors: [{ path: "events", method: "POST", description: "GitHub webhooks" }], - signal_types: [ - { - type_id: "github.pull_request.opened", - name: "Pull request opened", - documentation: "A pull request was opened.", - categories: [], - default_session_key_template: "chat#{{ repository.full_name }}#{{ number }}", - default_session_title_template: "{{ repository.full_name }}#{{ number }}", - }, - ], - credential_sources: [ - { - type_id: "github_managed", - name: "Managed", - requires_brokering: true, - display_name_description: "Managed GitHub credential", - }, - { - type_id: "github_webhook", - name: "Webhook", - requires_brokering: false, - display_name_description: "Name this connection", - }, - ], - interpolation_variables: [ - { key: "repository.full_name", description: "Repository", example: "org/repo" }, - ], - }, - ], -}; - -const upstreamInstance = { - id: "spi_existing", - display_name: "Main GitHub", - signal_provider_source_type_id: "github", - credential_source_type_id: "github_webhook", - status: "enabled", - ingress_mode: "webhook", - configuration: { repository: "org/repo", some_secret: "********" }, - polling_state: {}, - poll_interval_seconds: null, - last_error: null, - created_at: "2026-08-01T00:00:00Z", - updated_at: "2026-08-20T00:00:00Z", -}; - -interface UpstreamCall { - method: string; - path: string; - query: URLSearchParams; - body?: unknown; -} - -function signalApp(respond: (call: UpstreamCall) => Response | undefined): { - app: ReturnType; - calls: UpstreamCall[]; -} { - const calls: UpstreamCall[] = []; - const fetch = vi.fn(async (input: URL | string, init?: RequestInit) => { - const url = input instanceof URL ? input : new URL(input); - const call: UpstreamCall = { - method: init?.method ?? "GET", - path: url.pathname, - query: url.searchParams, - body: typeof init?.body === "string" ? JSON.parse(init.body) : undefined, - }; - calls.push(call); - return respond(call) ?? new Response(JSON.stringify({ error: "unexpected" }), { status: 500 }); - }); - const app = createApp({ - signals: { - apiKey: "key", - orgId: "org-1", - teamId: "team-1", - baseUrl: "https://tilde.test", - fetch: fetch as unknown as typeof globalThis.fetch, - }, - }); - return { app, calls }; -} - -function catalogResponses(call: UpstreamCall): Response | undefined { - if (call.method === "GET" && call.path === "/api/v1/team/team-1/signals/providers") - return Response.json(providersPage); - if (call.method === "GET" && call.path === "/api/v1/team/team-1/signals/instances") - return Response.json({ items: [upstreamInstance], next_page_token: null }); - return undefined; -} - -describe("signal routes", () => { - it("is unavailable without Tilde credentials", async () => { - const app = createApp({}); - const response = await app.request("https://openbot.test/api/signals/providers"); - expect(response.status).toBe(503); - }); - - it("projects the provider catalog", async () => { - const { app } = signalApp(catalogResponses); - const response = await app.request("https://openbot.test/api/signals/providers"); - expect(response.status).toBe(200); - const body = (await response.json()) as { items: Record[] }; - expect(body.items[0]).toMatchObject({ - type_id: "github", - name: "GitHub", - instructions: "Point your webhook at {{webhook_url}}.", - auth_methods: ["webhook"], - requires_signing_key: false, - signing_key_description: null, - route_path: "events", - }); - expect(body.items[0]?.signal_types).toEqual([ - { - type_id: "github.pull_request.opened", - name: "Pull request opened", - documentation: "A pull request was opened.", - categories: [], - default_session_key_template: "chat#{{ repository.full_name }}#{{ number }}", - default_session_title_template: "{{ repository.full_name }}#{{ number }}", - }, - ]); - expect(body.items[0]?.credential_sources).toEqual([ - { - type_id: "github_managed", - name: "Managed", - requires_brokering: true, - display_name_description: "Managed GitHub credential", - }, - { - type_id: "github_webhook", - name: "Webhook", - requires_brokering: false, - display_name_description: "Name this connection", - }, - ]); - }); - - it("only requires a signing key when upstream says the provider signs", async () => { - const { app } = signalApp((call) => { - if (call.method === "GET" && call.path === "/api/v1/team/team-1/signals/providers") - return Response.json({ - items: [ - { - ...providersPage.items[0], - type_id: "firecrawl", - webhook_verification: { - verification_method: "none", - requires_signing_key: false, - signing_key_description: null, - }, - }, - { - ...providersPage.items[0], - type_id: "sentry", - webhook_verification: { - verification_method: "hmac_sha256", - requires_signing_key: true, - signing_key_description: "The client secret", - }, - }, - ], - }); - return catalogResponses(call); - }); - const response = await app.request("https://openbot.test/api/signals/providers"); - const body = (await response.json()) as { items: Record[] }; - expect(body.items[0]).toMatchObject({ - type_id: "firecrawl", - requires_signing_key: false, - signing_key_description: null, - }); - expect(body.items[1]).toMatchObject({ - type_id: "sentry", - requires_signing_key: true, - signing_key_description: "The client secret", - }); - }); - - it("asks upstream for a large page and fails only when it overflows", async () => { - const instancesPage = (length: number) => - Response.json({ - items: Array.from({ length }, (_unused, index) => ({ - ...upstreamInstance, - id: `spi_${index}`, - })), - next_page_token: null, - }); - const listApp = (length: number) => - signalApp((call) => { - if (call.method === "GET" && call.path === "/api/v1/team/team-1/signals/instances") - return instancesPage(length); - return catalogResponses(call); - }); - - // Upstream queries LIMIT page_size + 1, so a full page is 1001 rows. - const full = listApp(1000); - const complete = await full.app.request("https://openbot.test/api/signals/instances"); - expect(complete.status).toBe(200); - const list = full.calls.find((call) => call.path.endsWith("/signals/instances")); - expect(list?.query.get("page_size")).toBe("1000"); - - const response = await listApp(1001).app.request("https://openbot.test/api/signals/instances"); - expect(response.status).toBe(502); - await expect(response.json()).resolves.toMatchObject({ - error: expect.stringContaining("maximum 1000 results"), - }); - }); - - it("lists instances with computed webhook URLs and without configuration", async () => { - const { app } = signalApp(catalogResponses); - const response = await app.request("https://openbot.test/api/signals/instances"); - expect(response.status).toBe(200); - const body = (await response.json()) as { items: Record[] }; - expect(body.items).toEqual([ - { - id: "spi_existing", - display_name: "Main GitHub", - provider_type: "github", - status: "enabled", - ingress_mode: "webhook", - webhook_url: "https://tilde.test/api/v1/webhooks/github-signals-spi_existing/events", - poll_interval_seconds: null, - last_error: null, - created_at: "2026-08-01T00:00:00Z", - updated_at: "2026-08-20T00:00:00Z", - }, - ]); - }); - - it("creates an instance with a pre-generated id and the signing secret in configuration", async () => { - const { app, calls } = signalApp((call) => { - if (call.method === "POST" && call.path === "/api/v1/team/team-1/signals/instances") { - const body = call.body as Record; - return Response.json({ - ...upstreamInstance, - id: body.id, - display_name: body.display_name, - configuration: {}, - }); - } - return catalogResponses(call); - }); - const response = await app.request("https://openbot.test/api/signals/instances", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ - provider_type: "github", - display_name: "New GitHub", - signing_secret: "whsec_123", - configuration: { repository: "org/repo" }, - }), - }); - expect(response.status).toBe(201); - const create = calls.find( - (call) => call.method === "POST" && call.path.endsWith("/signals/instances"), - ); - const sent = create?.body as Record; - expect(sent.id).toMatch(/^spi_[0-9a-f-]{36}$/); - expect(sent).toMatchObject({ - display_name: "New GitHub", - signal_provider_source_type_id: "github", - credential_source_type_id: "github_webhook", - ingress_mode: "webhook", - configuration: { repository: "org/repo", provider_webhook_signing_key: "whsec_123" }, - }); - const body = (await response.json()) as Record; - expect(body.id).toBe(sent.id); - expect(body.webhook_url).toBe( - `https://tilde.test/api/v1/webhooks/github-signals-${sent.id as string}/events`, - ); - expect(body).not.toHaveProperty("configuration"); - }); - - it("read-modify-writes instance updates and rotates the signing secret", async () => { - const { app, calls } = signalApp((call) => { - if ( - call.method === "GET" && - call.path === "/api/v1/team/team-1/signals/instances/spi_existing" - ) - return Response.json(upstreamInstance); - if ( - call.method === "PATCH" && - call.path === "/api/v1/team/team-1/signals/instances/spi_existing" - ) - return Response.json({ ...upstreamInstance, display_name: "Renamed" }); - return catalogResponses(call); - }); - const response = await app.request("https://openbot.test/api/signals/instances/spi_existing", { - method: "PATCH", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ display_name: "Renamed", signing_secret: "whsec_next" }), - }); - expect(response.status).toBe(200); - const update = calls.find((call) => call.method === "PATCH"); - expect(update?.body).toEqual({ - display_name: "Renamed", - status: "enabled", - configuration: { repository: "org/repo", provider_webhook_signing_key: "whsec_next" }, - polling_state: {}, - }); - const body = (await response.json()) as Record; - expect(body.display_name).toBe("Renamed"); - expect(body).not.toHaveProperty("configuration"); - }); - - it("deletes an instance", async () => { - const { app } = signalApp((call) => { - if (call.method === "DELETE") return Response.json({ success: true }); - return catalogResponses(call); - }); - const response = await app.request("https://openbot.test/api/signals/instances/spi_existing", { - method: "DELETE", - }); - expect(response.status).toBe(200); - await expect(response.json()).resolves.toEqual({ deleted: true }); - }); - - it("test-fires a signal", async () => { - const { app, calls } = signalApp((call) => { - if (call.method === "POST" && call.path.endsWith("/signals/instances/spi_existing/test")) - return Response.json({ accepted: 1, delivery_ids: ["d-1"] }); - return catalogResponses(call); - }); - const response = await app.request( - "https://openbot.test/api/signals/instances/spi_existing/test", - { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ signal_type: "fake.issue.opened", summary: "Test" }), - }, - ); - expect(response.status).toBe(200); - await expect(response.json()).resolves.toEqual({ accepted: 1, delivery_ids: ["d-1"] }); - const fire = calls.find((call) => call.path.endsWith("/test")); - expect(fire?.body).toEqual({ signal_type: "fake.issue.opened", summary: "Test", data: {} }); - }); - - it("lists recent deliveries for one instance", async () => { - const { app, calls } = signalApp((call) => { - if (call.method === "GET" && call.path === "/api/v1/team/team-1/signals/deliveries") - return Response.json({ - items: [ - { - id: "d-1", - signal_provider_instance_id: "spi_existing", - signal_type: "github.pull_request.opened", - summary: "PR opened", - status: "completed", - chatkit_session_id: "sess-1", - error_message: null, - matched_rule_ids: ["rule-1", "rule-2"], - created_at: "2026-08-24T09:00:00Z", - }, - { - id: "d-2", - signal_provider_instance_id: "spi_existing", - signal_type: "github.pull_request.opened", - summary: null, - status: "pending", - chatkit_session_id: null, - error_message: null, - created_at: "2026-08-24T09:05:00Z", - }, - ], - next_page_token: null, - }); - return catalogResponses(call); - }); - const response = await app.request( - "https://openbot.test/api/signals/deliveries?instance_id=spi_existing", - ); - expect(response.status).toBe(200); - await expect(response.json()).resolves.toEqual({ - items: [ - { - id: "d-1", - instance_id: "spi_existing", - signal_type: "github.pull_request.opened", - summary: "PR opened", - status: "completed", - session_id: "sess-1", - error_message: null, - matched_rule_ids: ["rule-1", "rule-2"], - created_at: "2026-08-24T09:00:00Z", - }, - { - id: "d-2", - instance_id: "spi_existing", - signal_type: "github.pull_request.opened", - summary: null, - status: "pending", - session_id: null, - error_message: null, - matched_rule_ids: [], - created_at: "2026-08-24T09:05:00Z", - }, - ], - }); - const list = calls.find((call) => call.path.endsWith("/signals/deliveries")); - expect(list?.query.get("page_size")).toBe("20"); - expect(list?.query.get("instance_id")).toBe("spi_existing"); - }); - - it("requires instance_id when listing deliveries", async () => { - const { app } = signalApp(catalogResponses); - const response = await app.request("https://openbot.test/api/signals/deliveries"); - expect(response.status).toBe(400); - }); - - it("maps upstream failures onto the response", async () => { - const { app } = signalApp( - () => new Response(JSON.stringify({ error: "kaput" }), { status: 500 }), - ); - const response = await app.request("https://openbot.test/api/signals/providers"); - expect(response.status).toBe(502); - await expect(response.json()).resolves.toEqual({ error: "kaput" }); - }); -}); diff --git a/apps/control-service/src/signals.ts b/apps/control-service/src/signals.ts deleted file mode 100644 index 6dad8f85..00000000 --- a/apps/control-service/src/signals.ts +++ /dev/null @@ -1,419 +0,0 @@ -import type { Hono } from "hono"; -import { - defaultTildeBaseUrl, - tildeJson, - tildeOptionsFromEnvironment, - tildeUnavailable, - tildeUnpagedItems, - tildeUpstreamFailure, - pageItems, - text, - valueRecord, - type TildeRouteOptions, -} from "./tilde-upstream.js"; - -export type SignalRouteOptions = TildeRouteOptions; - -interface UpstreamSignalType { - type_id: string; - name?: string; - documentation?: string; - categories?: string[]; - default_session_key_template?: string; - default_session_title_template?: string | null; -} - -interface UpstreamCredentialSource { - type_id: string; - name?: string; - requires_brokering?: boolean; - display_name_description?: string; -} - -interface UpstreamSignalProvider { - type_id: string; - name?: string; - documentation?: string; - instructions?: string; - auth_methods?: string[]; - route_descriptors?: Array<{ path?: string }>; - signal_types?: UpstreamSignalType[]; - credential_sources?: UpstreamCredentialSource[]; - interpolation_variables?: Array<{ key?: string; description?: string; example?: string }>; - metadata?: Record; - webhook_verification?: { - verification_method?: string; - requires_signing_key?: boolean; - signing_key_description?: string | null; - } | null; -} - -interface UpstreamSignalInstance { - id: string; - display_name?: string; - signal_provider_source_type_id?: string; - status?: string; - ingress_mode?: string; - configuration?: Record; - polling_state?: Record; - poll_interval_seconds?: number | null; - last_error?: string | null; - created_at?: string; - updated_at?: string; -} - -interface UpstreamSignalDelivery { - id: string; - signal_provider_instance_id?: string; - signal_type?: string; - summary?: string | null; - status?: string; - chatkit_session_id?: string | null; - error_message?: string | null; - matched_rule_ids?: string[]; - created_at?: string; -} - -interface CreateInstanceBody { - providerType: string; - displayName: string; - signingSecret?: string; - credentialSourceTypeId?: string; - configuration?: Record; - ingressMode: string; -} - -interface UpdateInstanceBody { - displayName?: string; - status?: string; - signingSecret?: string; - configuration?: Record; -} - -/** - * Owner-facing signal provider management: catalog, provider instances with - * OpenBot-computed webhook URLs and write-only signing secrets, test-fire, and - * recent deliveries. - */ -export function registerSignalRoutes(app: Hono, configuredOptions?: SignalRouteOptions): void { - const options = (): SignalRouteOptions | undefined => - configuredOptions ?? tildeOptionsFromEnvironment(); - - app.get("/api/signals/providers", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Signals"); - try { - const providers = await listProviders(resolved); - return context.json({ items: providers.map(serializeProvider) }); - } catch (error) { - return tildeUpstreamFailure(context, "signals", error); - } - }); - - app.get("/api/signals/instances", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Signals"); - try { - const [instances, providers] = await Promise.all([ - tildeUnpagedItems(resolved, "/signals/instances") as Promise, - listProviders(resolved), - ]); - const routes = routePathsByProvider(providers); - return context.json({ - items: instances.map((instance) => serializeInstance(resolved, instance, routes)), - }); - } catch (error) { - return tildeUpstreamFailure(context, "signals", error); - } - }); - - app.post("/api/signals/instances", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Signals"); - let body: CreateInstanceBody; - try { - body = parseCreateInstanceBody(await context.req.json()); - } catch (error) { - return context.json({ error: error instanceof Error ? error.message : "Invalid body" }, 400); - } - try { - const providers = await listProviders(resolved); - const provider = providers.find((candidate) => candidate.type_id === body.providerType); - if (!provider) return context.json({ error: "Unknown signal provider" }, 404); - const credentialSourceTypeId = - body.credentialSourceTypeId ?? - provider.credential_sources?.find((source) => source.requires_brokering !== true)?.type_id; - if (!credentialSourceTypeId) - return context.json({ error: "credential_source_type_id is required" }, 400); - const id = `spi_${crypto.randomUUID()}`; - const configuration = { - ...body.configuration, - ...(body.signingSecret ? { provider_webhook_signing_key: body.signingSecret } : {}), - }; - const instance = (await tildeJson(resolved, "/signals/instances", { - method: "POST", - body: { - id, - display_name: body.displayName, - signal_provider_source_type_id: body.providerType, - credential_source_type_id: credentialSourceTypeId, - ingress_mode: body.ingressMode, - configuration, - }, - })) as UpstreamSignalInstance; - return context.json( - serializeInstance(resolved, instance, routePathsByProvider(providers)), - 201, - ); - } catch (error) { - return tildeUpstreamFailure(context, "signals", error); - } - }); - - app.patch("/api/signals/instances/:id", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Signals"); - const id = context.req.param("id"); - let body: UpdateInstanceBody; - try { - body = parseUpdateInstanceBody(await context.req.json()); - } catch (error) { - return context.json({ error: error instanceof Error ? error.message : "Invalid body" }, 400); - } - try { - const existing = (await tildeJson( - resolved, - `/signals/instances/${encodeURIComponent(id)}`, - )) as UpstreamSignalInstance; - const configuration = { - ...withoutRedactedValues(body.configuration ?? existing.configuration ?? {}), - ...(body.signingSecret ? { provider_webhook_signing_key: body.signingSecret } : {}), - }; - const updated = (await tildeJson(resolved, `/signals/instances/${encodeURIComponent(id)}`, { - method: "PATCH", - body: { - display_name: body.displayName ?? existing.display_name ?? id, - status: body.status ?? existing.status ?? "enabled", - configuration, - polling_state: existing.polling_state ?? {}, - ...(existing.poll_interval_seconds != null - ? { poll_interval_seconds: existing.poll_interval_seconds } - : {}), - }, - })) as UpstreamSignalInstance; - const providers = await listProviders(resolved); - return context.json(serializeInstance(resolved, updated, routePathsByProvider(providers))); - } catch (error) { - return tildeUpstreamFailure(context, "signals", error); - } - }); - - app.delete("/api/signals/instances/:id", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Signals"); - const id = context.req.param("id"); - try { - await tildeJson(resolved, `/signals/instances/${encodeURIComponent(id)}`, { - method: "DELETE", - }); - return context.json({ deleted: true }); - } catch (error) { - return tildeUpstreamFailure(context, "signals", error); - } - }); - - app.post("/api/signals/instances/:id/test", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Signals"); - const id = context.req.param("id"); - const record = valueRecord(await context.req.json().catch(() => undefined)) ?? {}; - try { - const response = (await tildeJson( - resolved, - `/signals/instances/${encodeURIComponent(id)}/test`, - { - method: "POST", - body: { - ...(text(record.signal_type) ? { signal_type: text(record.signal_type) } : {}), - ...(text(record.summary) ? { summary: text(record.summary) } : {}), - data: record.data ?? {}, - }, - }, - )) as { accepted?: number; delivery_ids?: string[] }; - return context.json({ - accepted: response.accepted ?? 0, - delivery_ids: response.delivery_ids ?? [], - }); - } catch (error) { - return tildeUpstreamFailure(context, "signals", error); - } - }); - - app.get("/api/signals/deliveries", async (context) => { - const resolved = options(); - if (!resolved) return tildeUnavailable(context, "Signals"); - const instanceId = context.req.query("instance_id")?.trim(); - if (!instanceId) return context.json({ error: "instance_id is required" }, 400); - try { - // Deliveries are display-only run history: one small unpaginated page. - const page = (await tildeJson( - resolved, - `/signals/deliveries?page_size=20&instance_id=${encodeURIComponent(instanceId)}`, - )) as Record; - const deliveries = pageItems(page) as UpstreamSignalDelivery[]; - return context.json({ items: deliveries.map(serializeDelivery) }); - } catch (error) { - return tildeUpstreamFailure(context, "signals", error); - } - }); -} - -async function listProviders(options: SignalRouteOptions): Promise { - return (await tildeUnpagedItems(options, "/signals/providers")) as UpstreamSignalProvider[]; -} - -function serializeProvider(provider: UpstreamSignalProvider) { - const authMethods = provider.auth_methods ?? []; - const verification = provider.webhook_verification ?? null; - const signingKeyDescription = - verification?.signing_key_description ?? provider.metadata?.signing_key_description; - return { - type_id: provider.type_id, - name: provider.name ?? provider.type_id, - documentation: provider.documentation ?? "", - instructions: provider.instructions ?? "", - auth_methods: authMethods, - // Only the upstream descriptor knows whether a provider signs its webhooks; - // webhook capability alone does not imply a signing key. - requires_signing_key: verification?.requires_signing_key ?? false, - signing_key_description: - typeof signingKeyDescription === "string" ? signingKeyDescription : null, - route_path: provider.route_descriptors?.[0]?.path ?? "", - signal_types: (provider.signal_types ?? []).map((signalType) => ({ - type_id: signalType.type_id, - name: signalType.name ?? signalType.type_id, - documentation: signalType.documentation ?? "", - categories: signalType.categories ?? [], - default_session_key_template: signalType.default_session_key_template ?? "", - default_session_title_template: signalType.default_session_title_template ?? null, - })), - credential_sources: (provider.credential_sources ?? []).map((source) => ({ - type_id: source.type_id, - name: source.name ?? source.type_id, - requires_brokering: source.requires_brokering ?? false, - display_name_description: source.display_name_description ?? "", - })), - interpolation_variables: (provider.interpolation_variables ?? []).map((variable) => ({ - key: variable.key ?? "", - description: variable.description ?? "", - example: variable.example ?? "", - })), - }; -} - -function routePathsByProvider(providers: UpstreamSignalProvider[]): Map { - const routes = new Map(); - for (const provider of providers) { - const path = provider.route_descriptors?.[0]?.path; - if (typeof path === "string" && path) routes.set(provider.type_id, path); - } - return routes; -} - -function serializeInstance( - options: SignalRouteOptions, - instance: UpstreamSignalInstance, - routes: Map, -) { - const providerType = instance.signal_provider_source_type_id ?? ""; - const ingressMode = instance.ingress_mode ?? "webhook"; - return { - id: instance.id, - display_name: instance.display_name ?? instance.id, - provider_type: providerType, - status: instance.status ?? "enabled", - ingress_mode: ingressMode, - webhook_url: - ingressMode === "webhook" - ? webhookUrl(options, providerType, instance.id, routes.get(providerType)) - : null, - poll_interval_seconds: instance.poll_interval_seconds ?? null, - last_error: instance.last_error ?? null, - created_at: instance.created_at ?? "", - updated_at: instance.updated_at ?? "", - }; -} - -function webhookUrl( - options: SignalRouteOptions, - providerType: string, - instanceId: string, - routePath: string | undefined, -): string | null { - if (!providerType || !routePath) return null; - const base = (options.baseUrl ?? defaultTildeBaseUrl).replace(/\/+$/, ""); - return `${base}/api/v1/webhooks/${providerType}-signals-${instanceId}/${routePath}`; -} - -/** Drop upstream-redacted secret placeholders so they never round-trip as values. */ -function withoutRedactedValues(configuration: Record): Record { - return Object.fromEntries( - Object.entries(configuration).filter(([, value]) => value !== "********"), - ); -} - -function serializeDelivery(delivery: UpstreamSignalDelivery) { - return { - id: delivery.id, - instance_id: delivery.signal_provider_instance_id ?? "", - signal_type: delivery.signal_type ?? "", - summary: delivery.summary ?? null, - status: delivery.status ?? "pending", - session_id: delivery.chatkit_session_id ?? null, - error_message: delivery.error_message ?? null, - // Clients filter run history by rule, so the matched rules must survive. - matched_rule_ids: delivery.matched_rule_ids ?? [], - created_at: delivery.created_at ?? "", - }; -} - -function parseCreateInstanceBody(value: unknown): CreateInstanceBody { - const record = valueRecord(value); - if (!record) throw new Error("Invalid signal instance request"); - const providerType = text(record.provider_type); - const displayName = text(record.display_name); - if (!providerType || !displayName) throw new Error("provider_type and display_name are required"); - const ingressMode = record.ingress_mode === undefined ? "webhook" : text(record.ingress_mode); - if (ingressMode !== "webhook") throw new Error('ingress_mode must be "webhook"'); - const signingSecret = text(record.signing_secret); - const credentialSourceTypeId = text(record.credential_source_type_id); - return { - providerType, - displayName, - ingressMode, - ...(signingSecret ? { signingSecret } : {}), - ...(credentialSourceTypeId ? { credentialSourceTypeId } : {}), - ...(valueRecord(record.configuration) - ? { configuration: valueRecord(record.configuration) } - : {}), - }; -} - -function parseUpdateInstanceBody(value: unknown): UpdateInstanceBody { - const record = valueRecord(value); - if (!record) throw new Error("Invalid signal instance request"); - const displayName = record.display_name === undefined ? undefined : text(record.display_name); - if (displayName === "") throw new Error("display_name must not be empty"); - const status = record.status === undefined ? undefined : text(record.status); - if (status !== undefined && status !== "enabled" && status !== "disabled") - throw new Error('status must be "enabled" or "disabled"'); - const signingSecret = text(record.signing_secret); - return { - ...(displayName !== undefined ? { displayName } : {}), - ...(status !== undefined ? { status } : {}), - ...(signingSecret ? { signingSecret } : {}), - ...(record.configuration !== undefined - ? { configuration: valueRecord(record.configuration) ?? {} } - : {}), - }; -} diff --git a/apps/control-service/src/tilde-proxy.ts b/apps/control-service/src/tilde-proxy.ts new file mode 100644 index 00000000..ca796b22 --- /dev/null +++ b/apps/control-service/src/tilde-proxy.ts @@ -0,0 +1,198 @@ +import type { Context, Hono } from "hono"; + +const defaultTildeBaseUrl = "https://api.trytilde.ai"; + +const proxyPrefix = "/api/tilde/"; +const hopByHopHeaders = new Set([ + "connection", + "host", + "keep-alive", + "proxy-authenticate", + "proxy-authorization", + "te", + "trailer", + "transfer-encoding", + "upgrade", +]); + +type AllowedMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; + +interface AllowedRoute { + methods: ReadonlySet; + pattern: RegExp; +} + +const methods = (...values: AllowedMethod[]): ReadonlySet => new Set(values); + +/** + * Owner-facing Tilde resources that OpenBot renders but does not own. This is + * deliberately an operation allowlist rather than an unrestricted API proxy. + */ +const allowedRoutes: readonly AllowedRoute[] = [ + { pattern: /^provider-setup\/start$/, methods: methods("POST") }, + { pattern: /^automations$/, methods: methods("GET") }, + { pattern: /^automations\/[^/]+$/, methods: methods("GET", "PUT", "DELETE") }, + { pattern: /^automations\/[^/]+\/run$/, methods: methods("POST") }, + { pattern: /^signals\/providers$/, methods: methods("GET") }, + { pattern: /^signals\/instances$/, methods: methods("GET", "POST") }, + { pattern: /^signals\/instances\/[^/]+$/, methods: methods("GET", "PATCH", "DELETE") }, + { pattern: /^signals\/instances\/[^/]+\/test$/, methods: methods("POST") }, + { pattern: /^signals\/deliveries$/, methods: methods("GET") }, + { pattern: /^mcp\/available-tool-groups$/, methods: methods("GET") }, + { pattern: /^mcp\/provider-catalog$/, methods: methods("GET") }, + { pattern: /^mcp\/provider-catalog\/[^/]+\/connect$/, methods: methods("POST") }, + { pattern: /^mcp\/proxied-mcp-servers$/, methods: methods("GET", "POST") }, + { pattern: /^mcp\/proxied-mcp-servers\/oauth\/start$/, methods: methods("POST") }, + { pattern: /^mcp\/proxied-mcp-servers\/[^/]+$/, methods: methods("DELETE") }, + { pattern: /^mcp\/tool-group$/, methods: methods("GET") }, + { pattern: /^mcp\/tool-group\/[^/]+$/, methods: methods("GET", "DELETE") }, + { + pattern: /^mcp\/tool-group\/[^/]+\/tools\/enable-and-bind$/, + methods: methods("POST"), + }, + { pattern: /^mcp\/mcp-server$/, methods: methods("GET") }, + { pattern: /^mcp\/mcp-server\/[^/]+\/tool-group\/[^/]+$/, methods: methods("DELETE") }, + { pattern: /^skill$/, methods: methods("GET") }, + { pattern: /^skill-providers$/, methods: methods("GET") }, + { pattern: /^skill-registry$/, methods: methods("GET") }, + { pattern: /^skill-registry\/[^/]+\/provider-skills$/, methods: methods("POST") }, + { pattern: /^skill-registry\/[^/]+$/, methods: methods("PATCH") }, + { + pattern: /^credential\/source\/api_key\/resource-server(?:\/encrypt)?$/, + methods: methods("POST"), + }, +]; + +export interface TildeProxyOptions { + apiKey: string; + orgId: string; + teamId: string; + baseUrl?: string; + fetch?: typeof globalThis.fetch; +} + +/** Raw, same-origin bridge for Tilde-owned settings resources. */ +export function registerTildeProxy(app: Hono, configuredOptions?: TildeProxyOptions): void { + app.all("/api/tilde/*", async (context) => { + const options = configuredOptions ?? optionsFromEnvironment(); + if (!options) + return context.json( + { error: "Tilde is unavailable because its server credentials are not configured" }, + 503, + ); + + const relativePath = safeRelativePath(context.req.path.slice(proxyPrefix.length)); + const method = context.req.method as AllowedMethod; + if (!relativePath || !isAllowed(relativePath, method)) + return context.json({ error: "Unsupported Tilde operation" }, 404); + + const incomingUrl = new URL(context.req.url); + const upstreamUrl = new URL( + `/api/v1/team/${encodeURIComponent(options.teamId)}/${relativePath}`, + options.baseUrl ?? defaultTildeBaseUrl, + ); + upstreamUrl.search = incomingUrl.search; + + try { + const upstream = await (options.fetch ?? globalThis.fetch)(upstreamUrl, { + method, + headers: upstreamHeaders(context, options), + body: await requestBody(context), + signal: context.req.raw.signal, + redirect: "manual", + }); + const headers = responseHeaders(upstream.headers); + headers.set("cache-control", "no-store"); + return new Response(upstream.body, { + status: upstream.status, + statusText: upstream.statusText, + headers, + }); + } catch (error) { + if (context.req.raw.signal.aborted) throw error; + return context.json( + { + error: "Tilde request failed", + detail: error instanceof Error ? error.message : "Unknown upstream failure", + }, + 502, + ); + } + }); +} + +function optionsFromEnvironment( + environment: NodeJS.ProcessEnv = process.env, +): TildeProxyOptions | undefined { + const apiKey = environment.TILDE_API_KEY?.trim(); + const orgId = environment.TILDE_ORG_ID?.trim(); + const teamId = environment.TILDE_TEAM_ID?.trim(); + if (!apiKey || !orgId || !teamId) return undefined; + return { + apiKey, + orgId, + teamId, + baseUrl: environment.TILDE_BASE_URL?.trim() || undefined, + }; +} + +function safeRelativePath(value: string): string | undefined { + if (!value || value.startsWith("/") || value.includes("\\")) return undefined; + for (const segment of value.split("/")) { + let decoded: string; + try { + decoded = decodeURIComponent(segment); + } catch { + return undefined; + } + if (!decoded || decoded === "." || decoded === ".." || decoded.includes("\\")) return undefined; + } + return value; +} + +function isAllowed(path: string, method: AllowedMethod): boolean { + return allowedRoutes.some((route) => route.methods.has(method) && route.pattern.test(path)); +} + +function upstreamHeaders(context: Context, options: TildeProxyOptions): Headers { + const headers = new Headers(); + for (const [name, value] of context.req.raw.headers) { + const lowerName = name.toLowerCase(); + if ( + hopByHopHeaders.has(lowerName) || + lowerName === "authorization" || + lowerName === "cookie" || + lowerName === "x-api-key" || + lowerName === "x-tilde-org-id" || + lowerName === "x-tilde-team-id" + ) + continue; + headers.append(name, value); + } + headers.set("x-api-key", options.apiKey); + headers.set("x-tilde-org-id", options.orgId); + headers.set("x-tilde-team-id", options.teamId); + headers.set("accept-encoding", "identity"); + return headers; +} + +async function requestBody(context: Context): Promise { + if (context.req.method === "GET" || context.req.method === "HEAD") return undefined; + return await context.req.raw.arrayBuffer(); +} + +function responseHeaders(upstream: Headers): Headers { + const headers = new Headers(); + for (const [name, value] of upstream) { + const lowerName = name.toLowerCase(); + if ( + hopByHopHeaders.has(lowerName) || + lowerName === "set-cookie" || + lowerName === "content-encoding" || + lowerName === "content-length" + ) + continue; + headers.append(name, value); + } + return headers; +} diff --git a/apps/control-service/src/tilde-upstream.ts b/apps/control-service/src/tilde-upstream.ts deleted file mode 100644 index 635a22b7..00000000 --- a/apps/control-service/src/tilde-upstream.ts +++ /dev/null @@ -1,169 +0,0 @@ -import type { Context } from "hono"; - -export const defaultTildeBaseUrl = "https://api.trytilde.ai"; - -export interface TildeRouteOptions { - apiKey: string; - orgId: string; - teamId: string; - baseUrl?: string; - fetch?: typeof globalThis.fetch; -} - -export function tildeOptionsFromEnvironment( - environment: NodeJS.ProcessEnv = process.env, -): TildeRouteOptions | undefined { - const apiKey = environment.TILDE_API_KEY?.trim(); - const orgId = environment.TILDE_ORG_ID?.trim(); - const teamId = environment.TILDE_TEAM_ID?.trim(); - if (!apiKey || !orgId || !teamId) return undefined; - return { - apiKey, - orgId, - teamId, - baseUrl: environment.TILDE_BASE_URL?.trim() || undefined, - }; -} - -export class TildeUpstreamError extends Error { - constructor( - message: string, - readonly status: number, - ) { - super(message); - } -} - -export async function tildeJson( - options: TildeRouteOptions, - teamPath: string, - init?: { - method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; - body?: unknown; - authorization?: string; - }, -): Promise { - const method = init?.method ?? (init && "body" in init ? "POST" : "GET"); - const body = init?.body; - const url = new URL( - `/api/v1/team/${encodeURIComponent(options.teamId)}${teamPath}`, - options.baseUrl ?? defaultTildeBaseUrl, - ); - const response = await (options.fetch ?? globalThis.fetch)(url, { - method, - headers: { - accept: "application/json", - ...(body === undefined ? {} : { "content-type": "application/json" }), - "x-api-key": options.apiKey, - "x-tilde-org-id": options.orgId, - "x-tilde-team-id": options.teamId, - ...(init?.authorization ? { authorization: init.authorization } : {}), - }, - ...(body === undefined ? {} : { body: JSON.stringify(body) }), - }); - const payload = await response.json().catch(() => undefined); - if (!response.ok) { - const detail = - typeof payload === "object" && payload !== null - ? ((payload as { error?: string; message?: string }).error ?? - (payload as { message?: string }).message) - : undefined; - throw new TildeUpstreamError( - detail ?? `Tilde request failed (${response.status})`, - response.status >= 500 ? 502 : response.status, - ); - } - return payload; -} - -const maxPages = 20; - -export async function tildePages( - options: TildeRouteOptions, - teamPath: string, - pageSize: number, -): Promise { - const separator = teamPath.includes("?") ? "&" : "?"; - const items: unknown[] = []; - let token: string | undefined; - for (let page = 0; page < maxPages; page += 1) { - const query = `${separator}page_size=${pageSize}${ - token ? `&next_page_token=${encodeURIComponent(token)}` : "" - }`; - const response = (await tildeJson(options, `${teamPath}${query}`)) as Record; - items.push(...pageItems(response)); - const next = response.next_page_token; - if (typeof next !== "string" || !next) break; - token = next; - } - return items; -} - -/** - * Page size the unpaginated `/signals/*` lists are asked for. They apply no - * clamp of their own, so this is far above any realistic team's row count and - * the truncation tripwire below is effectively unreachable. (ChatKit routines - * are separate: they page properly and clamp to 1..=100.) - */ -export const unpagedTildePageSize = 1000; - -/** - * The `/signals/*` list endpoints are unpaginated upstream: they always answer - * `next_page_token: null`, so `page_size` is a hard cap rather than a window. - * They query `LIMIT page_size + 1`, so a full page is one row longer than the - * size asked for. Fail loudly when it fills, because silently truncating - * orphans routine members from their group. - */ -export async function tildeUnpagedItems( - options: TildeRouteOptions, - teamPath: string, -): Promise { - const separator = teamPath.includes("?") ? "&" : "?"; - const response = (await tildeJson( - options, - `${teamPath}${separator}page_size=${unpagedTildePageSize}`, - )) as Record; - const items = pageItems(response); - if (items.length > unpagedTildePageSize) - throw new TildeUpstreamError( - `Tilde returned more than the maximum ${unpagedTildePageSize} results for ${teamPath}, which OpenBot cannot page past`, - 502, - ); - return items; -} - -export function pageItems(page: Record): unknown[] { - if (Array.isArray(page.items)) return page.items; - if (Array.isArray(page.data)) return page.data; - if (Array.isArray(page)) return page as unknown[]; - return []; -} - -export function tildeUnavailable(context: Context, feature: string): Response { - return context.json( - { error: `${feature} are unavailable because Tilde server credentials are not configured` }, - 503, - ); -} - -export function tildeUpstreamFailure(context: Context, feature: string, error: unknown): Response { - if (error instanceof TildeUpstreamError) - return context.json({ error: error.message }, error.status as 400); - return context.json( - { - error: `Tilde ${feature} request failed`, - detail: error instanceof Error ? error.message : "Unknown upstream failure", - }, - 502, - ); -} - -export function text(value: unknown): string { - return typeof value === "string" ? value.trim() : ""; -} - -export function valueRecord(value: unknown): Record | undefined { - return typeof value === "object" && value !== null && !Array.isArray(value) - ? (value as Record) - : undefined; -} diff --git a/apps/web/README.md b/apps/web/README.md index 0f0312f6..fd19a92b 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -6,4 +6,4 @@ The React 19 and Vite owner interface for OpenBot. It uses TanStack Router and i This package is a browser application and declares no importable package exports. Its generated route tree is not a public API and must not be hand-edited. Owner chat uses Tilde's native REST resource shapes through the same-origin `/api/chat/*` bridge. ChatKit workspace events connect directly to Tilde's WebSocket using a short-lived ticket obtained through the authenticated control route; Computer service remains internal and must not be called by the browser. -The development server proxies `/healthz`, `/api/chat`, `/api/computer`, and `/auth` to the local control service with forwarded-origin headers enabled, so the control service can keep browser-facing OAuth callbacks on the Vite origin. +The development server proxies `/healthz`, `/api/chat`, `/api/tilde`, `/api/computer`, and `/auth` to the local control service with forwarded-origin headers enabled, so the control service can keep browser-facing OAuth callbacks on the Vite origin and keep the installation API key out of browser code. diff --git a/apps/web/src/screens/settings-app.tsx b/apps/web/src/screens/settings-app.tsx index 581e4804..78ed1118 100644 --- a/apps/web/src/screens/settings-app.tsx +++ b/apps/web/src/screens/settings-app.tsx @@ -145,7 +145,7 @@ function PluginsSettings({ async function refresh(): Promise { setError(""); try { - setCatalog(await openBotRuntime.client.getPluginsCatalog(agentIds)); + setCatalog(await openBotRuntime.client.getPluginsCatalog()); } catch (reason) { setError(reason instanceof Error ? reason.message : "Could not load plugins"); } finally { diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 2892e917..8a172dd8 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -25,9 +25,9 @@ export default defineConfig({ : {}), "/healthz": controlProxy(), "/api/chat": controlProxy(), + "/api/tilde": controlProxy(), "/api/computer": controlProxy(), "/api/agents": controlProxy(), - "/api/connectors": controlProxy(), "/connectors": controlProxy(), "/auth": controlProxy(), }, diff --git a/cli/src/initialization.test.ts b/cli/src/initialization.test.ts index a53e002c..37880b21 100644 --- a/cli/src/initialization.test.ts +++ b/cli/src/initialization.test.ts @@ -429,6 +429,7 @@ describe("OpenBot initialization", () => { expect(primaryAgent).toContain("createTildeAttachmentMessageHandlers(client, context)"); expect(primaryAgent).toContain("createTildeMediaUploader"); expect(primaryAgent).toContain("createTildeMediaDownloader"); + expect(primaryAgent).toContain('responseMode: "agentLoop"'); expect(primaryAgent).not.toContain("createChatKitAttachmentFilePartHandler"); expect(primaryAgent).not.toContain("base64"); expect(primaryAgent).not.toContain("@tryopenbot/agent-provider"); @@ -477,6 +478,9 @@ describe("OpenBot initialization", () => { expect( await readFile(join(repositoryRoot, "configuration/instrumentation.ts"), "utf8"), ).toContain("defineInstrumentation"); + expect( + await readFile(join(repositoryRoot, "configuration/templates/agent/agent.ts.hbs"), "utf8"), + ).toContain('responseMode: "agentLoop"'); expect( await readFile(join(repositoryRoot, "configuration/templates/agent/agent.ts.hbs"), "utf8"), ).toContain("AGENT_{{AGENT_ENV_PREFIX}}_API_KEY"); diff --git a/docs/adrs/0004-domain-provider-packages.md b/docs/adrs/0004-domain-provider-packages.md index c98a53ef..99a5ddb7 100644 --- a/docs/adrs/0004-domain-provider-packages.md +++ b/docs/adrs/0004-domain-provider-packages.md @@ -65,6 +65,11 @@ flowchart LR ## Updates +- 2026-08-29T14:55:00Z: Made the Agent Provider omit memory from new bundle + requests. Tilde memory banks are paid, opt-in resources; agent creation must + not enroll or fail on them implicitly. Bundle omission preserves an existing + agent-owned bank, so users can enable memory explicitly without OpenBot + deleting it on later reconciliation. - 2026-08-25T12:35:12+02:00: Replaced client-side agent/MCP/registry choreography with Tilde's durable Agent Resource Bundle API. OpenBot still authors runtime source and reconciles ChatKit realtime plus credential-bearing platform integrations, while Tilde owns the canonical MCP server, skill registry, default memory bank, bindings, credential rotation, and deletion cleanup. - 2026-08-25T19:41:00+02:00: Made Tilde's stable machine-user profile the canonical agent identity. The Agent Provider renders and uploads a deterministic PNG avatar after bundle convergence; display-name and avatar updates no longer depend on device-local onboarding state. - 2026-08-25T20:12:00+02:00: The owner-facing agent-creation route establishes the initial bundle with the deployment API key delegated by the signed-in human. Later machine-only deploys reconcile the same bundle without replacing that individual lifecycle owner. diff --git a/docs/adrs/0019-sandbox-live-runtime-and-background-sdlc.md b/docs/adrs/0019-sandbox-live-runtime-and-background-sdlc.md index b8252554..e03cfee9 100644 --- a/docs/adrs/0019-sandbox-live-runtime-and-background-sdlc.md +++ b/docs/adrs/0019-sandbox-live-runtime-and-background-sdlc.md @@ -93,3 +93,7 @@ git work. - 2026-08-27T15:15:00+02:00: Added the optional exe.dev mode from ADR-0032, where the trusted development lifecycle is itself the continuously running deployment and therefore never flips back to a separately built runtime. +- 2026-08-29T14:12:00+02:00: Made `openbot new-agent` the sole source and remote-resource + reconciliation lifecycle for owner-facing creation. The control service now reports the + background command result instead of repeating Tilde bundle provisioning with a separate human + bearer token; an authorized installation agent API key may establish the new agent lifecycle. diff --git a/docs/adrs/0027-in-chat-connector-configuration.md b/docs/adrs/0027-in-chat-connector-configuration.md index 5c8bb5b7..e68db1be 100644 --- a/docs/adrs/0027-in-chat-connector-configuration.md +++ b/docs/adrs/0027-in-chat-connector-configuration.md @@ -4,8 +4,8 @@ - Bot configure own connectors. Agent tool `configure_connector` show account picker card in chat. - Card payload travel as normal tool output (`connector_selection` key). No new message type, no proxy change. -- User picks account → client binds it directly to the agent MCP server through one idempotent Tilde API operation. -- Credentials never in chat. New-account forms post to owner-auth `/api/connectors/*` control-service routes, which encrypt and create credentials against Tilde and return a broker redirect URL for OAuth. +- User picks account → client binds it to the agent MCP server through one idempotent native Tilde API operation. +- Credentials never enter chat. New-account forms use native Tilde provider-setup, managed-credential, and MCP operations through the owner-authenticated `/api/tilde/*` credential bridge; control-service owns no connector domain API. - Contracts and schema-to-field logic live in `client-runtime`; web and Expo render from the same payload. `packages/ui` stays presentation-only. - Every agent template ships the tool plus eight Tilde platform skills (`tilde-connectors`, `tilde-tools`, `tilde-chatkit`, `tilde-memory`, `tilde-skills`, `tilde-state`, `tilde-dev-tunnels`, `tilde-control-plane`) synced into its Tilde skill registry. @@ -22,16 +22,17 @@ sequenceDiagram participant CS as control-service participant T as Tilde API A->>C: configure_connector tool output (connector_selection) - C->>T: bind selected account to agent MCP server - C->>CS: POST /api/connectors/accounts (new account) - CS->>T: encrypt + create credentials + instance + broker + C->>CS: native Tilde bind or setup path + CS->>T: allowlisted raw request + installation credential + T->>T: encrypt + create credentials + instance + broker T-->>C: OAuth redirect via authorization_url ``` - The tool result carries both model-facing `instructions` ("card shown, end turn") and the client-facing payload, so the picker rides an ordinary tool part without adding a transcript message type. - `splitMessageSegments` routes completed `configure_connector` parts to their own transcript row so ADR-0025 tool-chip collapsing does not swallow the card. -- The selection is a direct client mutation carrying `tool_group_source_type_id` and `tool_group_instance_id`. Tilde enables and maps the selected account atomically, so connector setup does not consume a second model turn. -- The control service, which already holds the team API key for the chat proxy, owns the credential write path so secrets stay server-side. +- The selection is a native Tilde mutation carrying `tool_group_source_type_id` and `tool_group_instance_id`. Tilde enables and maps the selected account atomically, so connector setup does not consume a second model turn. +- The control service, which already holds the team API key for the chat proxy, remains only the authenticated credential boundary. It strips browser credentials, injects the installation credential, and forwards an exact method/path allowlist without translating connector resources. +- Plugin inventory pages Tilde's native MCP servers, tool groups, proxied servers, skills, trusted providers, and skill registries. Their `agent_id` and binding fields are authoritative; the browser never submits a list of agent IDs and no OpenBot-specific aggregate catalogue is required. ## Consequences @@ -46,3 +47,4 @@ sequenceDiagram ## Updates - 2026-08-25T12:00:00+02:00: Replaced the model-mediated selection hand-back with direct client-to-Tilde account binding and consolidated provider catalog, account, and setup reads behind server-authored provider setup operations. +- 2026-08-29T02:19:16+02:00: Removed the connector and plugin domain facades. Client Runtime now projects generated, paginated native Tilde resources through one operation-allowlisted credential bridge, while control-service retains only the HttpOnly owner-session and secret boundary. diff --git a/docs/adrs/0031-routines-and-signals.md b/docs/adrs/0031-routines-and-signals.md index 09e82238..e38e8ab8 100644 --- a/docs/adrs/0031-routines-and-signals.md +++ b/docs/adrs/0031-routines-and-signals.md @@ -3,44 +3,43 @@ ## In brief - One user concept: Routine. Name, instruction, 1–8 triggers. -- Trigger is schedule or provider event; Tilde persists one authoritative Automation root and - reconciles its ChatKit routine and signal-rule members. -- Legacy `metadata.openbot` groups are adopted idempotently by Tilde during listing. -- Control service keeps a thin compatibility facade at `/api/routines/*` and `/api/signals/*`; - never rides `/api/chat/*` (ADR-0014). +- Trigger is schedule or provider event; Tilde persists one native Routine root with native + triggers and durable executions. +- Tilde migrates prior Automation, ChatKit Routine, and SignalRule state into the native root. +- Client Runtime projects native Tilde Automation and Signals responses through the installation's + operation-allowlisted `/api/tilde/*` credential bridge; there is no domain facade. - Web renders an agent details pane; mobile is deferred. - Self-hosted deviation: webhook URL and signing secret are user-visible. ## Decision -Tilde persists an Automation root containing the name, instruction, enabled state, -authorization planes, generation, reconciliation status, and 1–8 OR'd schedule or event -triggers. ChatKit routines and signal rules are materialized members rather than the public -source of truth. OpenBot retains the Routine product name and its existing client contract. +Tilde persists a Routine root containing the name, instruction, enabled state, +authorization planes, optimistic version, and 1–8 OR'd native schedule or event triggers. +Schedule leases, event retry progress, and durable executions belong to that root. ChatKit +and Signals remain execution substrates rather than derived authorization resources. -### Authoritative Tilde aggregate and legacy adoption +### Authoritative Tilde root and legacy migration -OpenBot creates or replaces one Automation with one PUT. Tilde validates the complete desired -state, persists it with a generation, creates or updates desired members before deleting obsolete -ones, and records partial failure on the root for retry. List/get return authoritative trigger -membership and schedule/run projections; run uses a durable client run ID. +OpenBot creates or replaces one Routine through the compatibility `/automations` path. Tilde +validates the complete trigger set and atomically persists the root and children. OpenBot sends the +current `version` as `expected_version`, and preserves server-owned action/session/metadata fields +when editing the presentation subset. List/get return native trigger membership; run uses a durable +client run ID. -Resources created by the previous implementation retain -`metadata.openbot = { group, trigger, instruction? }`. Tilde performs a bounded legacy scan during -Automation listing and atomically adopts each group as a generation-1 root. Concurrent or repeated -listing cannot duplicate the root or its materialized members. OpenBot does not retain a metadata -scan or a mapping database. +Tilde's data migration copies prior Automation roots/members and standalone SignalRules before the +native API starts. OpenBot has no metadata scan or mapping database. ```mermaid flowchart LR - UI[Routine card] --> CS[thin control-service facade] - CS --> A[Tilde Automation API] - A -->|schedule trigger| R[Tilde ChatKit routine] - A -->|event trigger| SR[Tilde signal rule] - SR --> SPI[signal provider instance] + UI[Routine card] --> CR[Client Runtime projection] + CR --> B[allowlisted credential bridge] + B --> A[Tilde Routine API] + A -->|schedule trigger| R[schedule lease] + A -->|event trigger| E[event matcher] + E --> SPI[signal provider instance] SPI --> WH[/api/v1/webhooks/... ingress/] - R -->|cron fire| S1[new chatkit-workspace session] - SR -->|delivery| S2[session via session_policy] + R -->|cron fire| S1[new ChatKit session] + E -->|delivery| S2[session via session_policy] ``` ### Contracts and state @@ -54,27 +53,26 @@ never patch caches. ### Semantics -- Unified `enabled`, reconciliation status, generation, and error are authoritative root fields. - Tilde ensures disabled event members are created disabled rather than briefly firing. -- Updates are full desired-state PUTs. Tilde preserves member identity where possible and - safely replaces members whose immutable upstream identity changes. +- Root and per-trigger `enabled` state are authoritative. There is no reconciliation generation or + derived member that can briefly fire. +- Updates are full desired-state PUTs. Stable native trigger IDs preserve telemetry and retry + progress; `expected_version` rejects concurrent replacement. - Test run calls the Automation run endpoint with a durable UUID, making retries idempotent. - Root run history projects the latest scheduled run and its paired session/error. Signal delivery history remains available through the existing Signals API. -- One event trigger maps to exactly one signal rule and one signal type; filters are +- One event trigger selects one provider instance and signal type; filters are `filter.json_equals` equality on the provider's normalized payload. ### Pagination -The control facade follows Tilde Automation continuation tokens until exhausted and never rebuilds -the aggregate from independently paginated routine/rule collections. Legacy adoption is bounded and -fails visibly on overflow rather than silently producing an incomplete root. +Client Runtime follows Tilde Routine and Signals continuation tokens until exhausted and never +rebuilds the root from derived ChatKit/SignalRule collections. ### Provider connections Signal provider instances are managed inline from the trigger card and inventoried at `/settings/signals`. OpenBot is self-hosted, so provisioning is user-visible: the -control service pre-assigns `spi_` ids to render the deterministic webhook URL, and +client runtime pre-assigns `spi_` ids to render the deterministic webhook URL, and the signing secret is supplied by the owner, write-only, placed in `configuration.provider_webhook_signing_key`. Providers are catalog-driven, not hardcoded; providers upstream cannot auto-provision (Slack today) surface the @@ -100,8 +98,8 @@ Work: render the routines list, editor, and provider connect flow natively again ## Upstream dependencies -- `trytilde/api`: persisted Automations API, bounded legacy metadata adoption, schedule/run - projections, authorization/grants, ownership lifecycle participation, and the serialized +- `trytilde/api`: native Routine API, data-preserving migration, schedule/event execution, + authorization/grants, ownership lifecycle participation, and the serialized `webhook_verification` descriptor in the signals provider catalog. - `@trytilde/api-client`: generated routines, signals, metadata, and webhook verification contracts. Stable hand-authored behavior remains owned by @@ -110,3 +108,5 @@ Work: render the routines list, editor, and provider connect flow natively again ## Updates - 2026-08-26T16:18:13+01:00: Replaced OpenBot's stateless metadata composition and mutation fan-out with Tilde's persisted Automation aggregate, retaining a thin owner-authenticated compatibility facade and automatic legacy adoption. +- 2026-08-29T00:34:00+02:00: Removed the Routines and Signals domain facades. Client Runtime now validates and projects the native Tilde resources through one operation-allowlisted credential bridge, retaining the HttpOnly installation session without duplicating Tilde APIs. +- 2026-08-29T03:18:00+02:00: Replaced materialized ChatKit Routine and SignalRule members with Tilde's native Routine triggers. Client Runtime now preserves optimistic versions and native trigger metadata, pages Signals completely, and uses trigger IDs for delivery history. diff --git a/docs/updates/108.md b/docs/updates/108.md new file mode 100644 index 00000000..357b13b7 --- /dev/null +++ b/docs/updates/108.md @@ -0,0 +1,159 @@ +# Intent of the change + +OpenBot had four owner APIs that copied Tilde domains: plugins/connectors, +routines, and signals. They fetched Tilde, renamed fields, rebuilt assignments +from browser-supplied agent IDs, and sent another OpenBot-shaped response. + +Remove those facades. Keep only the credential boundary OpenBot genuinely owns: +the browser has an HttpOnly installation session, while the Tilde API key must +stay server-side. Clients now call native Tilde operations through one strict +allowlist and validate/project the responses in shared Client Runtime. + +Result: settings no longer send every agent ID, both active OpenBot clients share +one transport, and control-service loses more than four thousand lines of +duplicated routes and tests. Plugin inventory also no longer calls Tilde's +OpenBot-specific aggregate: it exhausts the native MCP and Skills pages instead. +The remaining ChatKit credential bridge now admits only the exact workspace, +queue, observation, and attachment operations Client Runtime consumes; it no +longer forwards the whole ChatKit namespace. + +# Architecture changes + +```mermaid +flowchart LR + W[Web / Electron] --> CR[Client Runtime] + CR -->|native Tilde path| B[/api/tilde allowlist] + CR -->|native ChatKit path| CB[/api/chat allowlist] + B -->|installation credential| T[Tilde API] + CB -->|installation credential| T + T --> P[Plugins, MCP, Skills] + T --> A[Native Routines] + T --> S[Signals] + W -->|OAuth completion only| O[/connectors/authorized] + W -->|local source mutation| C[/api/agents] + W -->|capability preview| V[/api/computer] +``` + +- `apps/control-service` owns authentication, header stripping, exact + method/path allowlisting, raw forwarding, local agent creation, Computer + preview, health, and the public OAuth completion page. It no longer owns + plugin, connector, routine, or signal domain contracts. +- `packages/client-runtime` owns boundary validation and presentation projections + over Tilde's generated MCP and Skills resource contracts. MCP server and skill + registry `agent_id` fields are the assignment source of truth. +- The native resource loaders follow every continuation token. This removes the + OpenBot aggregate endpoint's silent first-100-items ceiling. +- Connector setup uses Tilde `provider-setup`, managed MCP, credential, binding, + and registry operations directly through the bridge. Secrets still travel + browser → authenticated OpenBot bridge → Tilde and never enter chat messages. +- Routines page the authoritative native root and preserve `version`, root and + trigger metadata, enablement, event action, instruction policy, and + `session_policy` during full desired-state PUTs. +- Signals keep signing values write-only, drop redacted placeholders during + updates, and derive webhook URLs from the public Tilde origin returned by the + authenticated installation session. Provider and instance inventories exhaust + continuation tokens, and delivery history associates native trigger IDs while + accepting legacy rule IDs during migration. +- ADR-0027 and ADR-0031 now record the native-resource, no-facade boundary. + +# Summarized package changes + +- `@tryopenbot/control-service` + - Add `registerTildeProxy` and `registerConnectorAuthorizedRoute`. + - Remove `registerConnectorRoutes` and `/api/plugins`, `/api/connectors`, + `/api/routines`, `/api/signals`. + - Add owner-auth, unsafe-path, header, raw-body, and encoded-ID coverage. + - Restrict the ChatKit bridge to Client Runtime's workspace, queue, + observation, and attachment operations; reject unrendered administrative + operations before they reach Tilde. + - Expose only public Tilde team/origin metadata in `/auth/session`. + - Treat `openbot new-agent` as the sole source-and-Tilde reconciliation + lifecycle. A completed background command is ready; control-service no + longer repeats bundle provisioning or requires a second owner bearer token. + - Generate primary and future agent endpoints with explicit `agentLoop` + response mode, matching the required ChatKit SDK contract. +- `@tryopenbot/client-runtime` + - Add native Tilde plugin/connector, Routine, and signal clients. + - Replace Tilde's OpenBot-specific plugin aggregate with paginated native MCP, + skill, provider, and registry reads typed by `@trytilde/api-client`. + - Discover assignments from Tilde resources; no `agent_id[]` catalog query. + - Keep pagination, secret-redaction, OAuth, managed-provider, binding, and + webhook behavior shared across renderers. + - Add focused native-resource, optimistic-version, complete pagination, + trigger-progress, and custom-origin regressions. +- `@tryopenbot/platform-integrations` + - Remove the permanent API-key-plus-human-bearer delegation path. The Tilde + platform now sends exactly one installation API key whose owning user is + authorized by Tilde as a human or agent. + - Keep the package README aligned with that single-credential contract; the + retired machine-on-behalf terminology is no longer presented as supported. +- `@tryopenbot/agent-provider` + - Stop provisioning a paid memory bank for every new agent. Memory remains + opt-in on Tilde, and omission preserves any existing agent-owned bank. +- `@tryopenbot/web` + - Proxy `/api/tilde` during development. + - Stop supplying all agent IDs to plugin catalog loads. +- Browser tests + - Replace facade mocks with native Tilde resource mocks. + - Complete Playwright result: 15 passed, 1 existing skip. +- Documentation/release + - Update root/package READMEs and ADR-0031. + - Add the fixed-group pre-1.0 breaking Changeset. + - Refresh the generated Tilde API client from merged API #168, #192, and #193. The + checked-in spec now also carries `ChatRequest.agent` and its canonical + agent/avatar schemas, exposes only human/agent identities, and exactly + matches Tilde `main`. + - Rebase on merged OpenBot #109 so the public `context.agent` SDK surface is + baseline behavior rather than duplicated by this PR. + - Rebase on merged OpenBot #110; the facade collapse now targets the active + web and Electron clients while the native client remains archived in #111. + - Validate all 606 OpenAPI operations plus packaged SDK artifacts. + +Checks run on the final implementation head: + +- `pnpm --filter @tryopenbot/control-service test` — 34 passed after removing + the duplicate provisioning-path tests. +- `pnpm --filter @tryopenbot/client-runtime test` — 94 passed. +- `pnpm --filter @tryopenbot/ui test` — 67 passed. +- `pnpm --filter @trytilde/sdk-vercel-ai-node test` — 86 passed. +- `pnpm check` — passed; only existing repository warnings remain. +- `pnpm build` — passed after merged #110 removed the paused native clients, + including web, desktop, package, and CLI artifact verification. +- `TILDE_OPENAPI_PATH= pnpm openbot sdk refresh` — + passed after #193 merged; generated spec exactly matches Tilde `main` and all + five SDK package suites pass. +- `pnpm openbot sdk validate` — passed; 606 operations and all five SDK packages. +- `CI=1 pnpm test:e2e` — 15 passed, 1 existing skip. +- `git diff --check` — passed. + +# Critical to apply to forks + +yes + +This removes public pre-1.0 control-service APIs. A customized fork must: + +1. Replace direct `/api/plugins`, `/api/connectors`, `/api/routines`, and + `/api/signals` calls with `@tryopenbot/client-runtime`. +2. Replace `registerConnectorRoutes` imports with `registerTildeProxy` and + `registerConnectorAuthorizedRoute` when constructing a custom control app. +3. Route `/api/tilde/*` to control-service on any custom CDN, reverse proxy, or + packaged shell, while preserving owner authentication and Origin checks. +4. Re-run the control-service/client-runtime tests and browser settings, + connector, routine, and signal flows against the fork's Tilde environment. + +Deploy Tilde API #168, #193, #195, #196, and #197 before this OpenBot release. Signal deliveries now expose +`matched_trigger_ids`; Routine updates must preserve the complete trigger set +and send the current `version` as `expected_version`. Agent creation now relies +on the installation API key being recognized as an authorized agent actor; the +control service no longer supplies a human bearer token or provisions twice. +The durable worker must run as the recorded owner, and private team-scoped MCP +reads must preserve that user-team owner so retries remain idempotent. +Private-agent updates must also avoid the retired per-agent MCP message provider; +agent messaging is connection-scoped. New-agent creation no longer requires a +paid Hindsight memory entitlement; memory is explicitly opt-in. + +No database, protobuf, Tilde state import/export, provider resource identity, +secret name, SOPS document, or external tool installation changes. Existing +fork configuration remains valid. The bridge continues to use the existing +`TILDE_API_KEY`, `TILDE_ORG_ID`, `TILDE_TEAM_ID`, and optional +`TILDE_BASE_URL` values without exposing them to clients. diff --git a/packages/agent-provider/README.md b/packages/agent-provider/README.md index b40cd201..d8406c09 100644 --- a/packages/agent-provider/README.md +++ b/packages/agent-provider/README.md @@ -22,8 +22,9 @@ the control service's allowlisted same-origin bridge. Reconciliation now submits one typed Tilde Agent Resource Bundle and polls its durable status. Tilde owns the agent, dynamic MCP server, control-plane toolkit, -exact managed/custom skill registry, default per-agent memory bank, bindings, -credential rotation, and cleanup. OpenBot claims endpoint secrets once and +exact managed/custom skill registry, credential rotation, and cleanup. Memory is +opt-in on Tilde; omitting it preserves any existing agent-owned bank without +making a paid bank a prerequisite for new-agent creation. OpenBot claims endpoint secrets once and uploads a deterministic canonical avatar to the stable machine-user profile, then retains its ChatKit realtime channel plus credential-bearing deployment-platform integrations. diff --git a/packages/agent-provider/src/tilde/index.test.ts b/packages/agent-provider/src/tilde/index.test.ts index 11ff378c..ceb7a1fa 100644 --- a/packages/agent-provider/src/tilde/index.test.ts +++ b/packages/agent-provider/src/tilde/index.test.ts @@ -61,7 +61,7 @@ describe("TildeAgentProvider", () => { requests.push(request.clone()); const path = new URL(request.url).pathname; if (request.method === "PUT" && path.endsWith("/agents/scout/provision")) { - const body = (await request.json()) as { memory: { wiki?: unknown } }; + const body = (await request.json()) as { memory?: unknown }; expect(body).toMatchObject({ agent: { credential_strategy: "rotate", endpoint: { concurrency_policy: "queue" } }, mcp_server: { enabled: true, id: "openbot-scout", enable_tilde_control_plane: true }, @@ -69,9 +69,8 @@ describe("TildeAgentProvider", () => { enabled: true, enabled_skills: { managed: [{ provider_id: "cua" }] }, }, - memory: { bank: { enabled: true, name: "OpenBot scout memory" } }, }); - expect(body.memory.wiki).toBeUndefined(); + expect(body.memory).toBeUndefined(); return Response.json(operation("queued", false)); } if (request.method === "GET" && path.endsWith("/agents/scout/provision")) { diff --git a/packages/agent-provider/src/tilde/index.ts b/packages/agent-provider/src/tilde/index.ts index a89f1d0e..c077e50f 100644 --- a/packages/agent-provider/src/tilde/index.ts +++ b/packages/agent-provider/src/tilde/index.ts @@ -159,13 +159,6 @@ export class TildeAgentProvider implements AgentProvider { description: `Skills available to the ${slug} OpenBot agent.`, enabled_skills: enabledSkills, }, - memory: { - bank: { - enabled: true, - name: `OpenBot ${slug} memory`, - description: `Memory owned by the ${slug} OpenBot agent.`, - }, - }, }, signal, }), diff --git a/packages/api-client/specs/openapi.cloud.json b/packages/api-client/specs/openapi.cloud.json index 67e0111a..fca75e3e 100644 --- a/packages/api-client/specs/openapi.cloud.json +++ b/packages/api-client/specs/openapi.cloud.json @@ -437,7 +437,7 @@ "v1" ], "summary": "Enroll current human in a product", - "description": "Creates one deduplicated human Core or Pay seat, synchronizes the exact organization quantity with Autumn, and never bills machine or API-key identities.", + "description": "Creates one deduplicated human Core or Pay seat, synchronizes the exact organization quantity with Autumn, and never bills agent identities.", "operationId": "billing-product-enroll-current-human", "parameters": [ { @@ -462,7 +462,7 @@ } }, "400": { - "description": "Unknown product or machine caller", + "description": "Unknown product or agent caller", "content": { "application/json": { "schema": { @@ -2388,7 +2388,7 @@ { "name": "user_type", "in": "query", - "description": "Filter to `human` users or `machine` agents.", + "description": "Filter to `human` or `agent` users.", "required": false, "schema": { "type": "string" @@ -3549,7 +3549,7 @@ { "name": "user_type", "in": "query", - "description": "Filter to `human` users or `machine` agents.", + "description": "Filter to `human` or `agent` users.", "required": false, "schema": { "type": "string" @@ -4304,7 +4304,7 @@ { "name": "user_type", "in": "query", - "description": "Filter to `human` users or `machine` agents.", + "description": "Filter to `human` or `agent` users.", "required": false, "schema": { "type": "string" @@ -4596,7 +4596,7 @@ { "name": "user_type", "in": "query", - "description": "Filter to `human` users or `machine` agents.", + "description": "Filter to `human` or `agent` users.", "required": false, "schema": { "type": "string" @@ -4905,7 +4905,7 @@ { "name": "user_type", "in": "query", - "description": "Filter to `human` users or `machine` agents.", + "description": "Filter to `human` or `agent` users.", "required": false, "schema": { "type": "string" @@ -5578,8 +5578,8 @@ "automations", "v1" ], - "summary": "List unified automations", - "description": "Lists authoritative automation roots, filterable by agent and reconciliation status.", + "summary": "List unified routines", + "description": "Lists native Routine roots and their schedule or event triggers, filterable by agent.", "operationId": "automations-list", "parameters": [ { @@ -5601,21 +5601,6 @@ ] } }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/AutomationStatus" - } - ] - } - }, { "name": "page_size", "in": "query", @@ -5652,7 +5637,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutomationPaginatedResponse" + "$ref": "#/components/schemas/RoutinePaginatedResponse" } } } @@ -5668,14 +5653,14 @@ ] } }, - "/api/v1/team/{team_id}/automations/{automation_id}": { + "/api/v1/team/{team_id}/automations/{routine_id}": { "get": { "tags": [ "automations", "v1" ], - "summary": "Get a unified automation", - "description": "Gets the persisted root, trigger membership, generation, and reconciliation status.", + "summary": "Get a unified routine", + "description": "Gets the native root, trigger configuration, schedule telemetry, and version.", "operationId": "automations-get", "parameters": [ { @@ -5687,7 +5672,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -5710,7 +5695,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Automation" + "$ref": "#/components/schemas/Routine" } } } @@ -5740,8 +5725,8 @@ "automations", "v1" ], - "summary": "Create or replace a unified automation", - "description": "Persists and serially reconciles desired schedule and event triggers. Reconciliation failure remains observable on the root.", + "summary": "Create or replace a unified routine", + "description": "Atomically persists the Routine root and its complete native schedule/event trigger set.", "operationId": "automations-put", "parameters": [ { @@ -5753,7 +5738,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -5774,7 +5759,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PutAutomationBody" + "$ref": "#/components/schemas/PutRoutineBody" } } }, @@ -5786,7 +5771,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Automation" + "$ref": "#/components/schemas/Routine" } } } @@ -5816,8 +5801,8 @@ "automations", "v1" ], - "summary": "Delete a unified automation", - "description": "Deletes all materialized members before deleting the authoritative root.", + "summary": "Delete a unified routine", + "description": "Deletes the Routine root and cascading triggers when no schedule execution holds a live lease.", "operationId": "automations-delete", "parameters": [ { @@ -5829,13 +5814,102 @@ } }, { - "name": "automation_id", + "name": "routine_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteRoutineResponse" + } + } + } + } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + } + }, + "/api/v1/team/{team_id}/automations/{routine_id}/executions": { + "get": { + "tags": [ + "automations", + "v1" + ], + "summary": "List routine executions", + "description": "Lists durable manual, schedule, and event executions for one visible Routine.", + "operationId": "automations-list-executions", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "routine_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" } }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, { "name": "team_id", "in": "path", @@ -5852,7 +5926,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteAutomationResponse" + "$ref": "#/components/schemas/RoutineExecutionPaginatedResponse" } } } @@ -5868,13 +5942,13 @@ ] } }, - "/api/v1/team/{team_id}/automations/{automation_id}/ownership": { + "/api/v1/team/{team_id}/automations/{routine_id}/ownership": { "post": { "tags": [ "automations", "v1" ], - "summary": "Set automation ownership", + "summary": "Set routine ownership", "description": "Sets the persisted ownership mode and preserves an effective-user grant when made private.", "operationId": "automations-set-ownership", "parameters": [ @@ -5887,7 +5961,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -5936,13 +6010,13 @@ ] } }, - "/api/v1/team/{team_id}/automations/{automation_id}/run": { + "/api/v1/team/{team_id}/automations/{routine_id}/run": { "post": { "tags": [ "automations", "v1" ], - "summary": "Run a unified automation", + "summary": "Run a unified routine", "description": "Runs once for the supplied durable run ID and returns the existing result on retry.", "operationId": "automations-run", "parameters": [ @@ -5955,7 +6029,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -5976,7 +6050,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunAutomationBody" + "$ref": "#/components/schemas/RunRoutineBody" } } }, @@ -5988,7 +6062,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunAutomationResponse" + "$ref": "#/components/schemas/RunRoutineResponse" } } } @@ -6004,13 +6078,13 @@ ] } }, - "/api/v1/team/{team_id}/automations/{automation_id}/visibility": { + "/api/v1/team/{team_id}/automations/{routine_id}/visibility": { "post": { "tags": [ "automations", "v1" ], - "summary": "Set automation visibility", + "summary": "Set routine visibility", "description": "Sets the persisted visibility mode and preserves an effective-user grant when made private.", "operationId": "automations-set-visibility", "parameters": [ @@ -6023,7 +6097,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -6072,14 +6146,14 @@ ] } }, - "/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants": { + "/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants": { "get": { "tags": [ "automations", "v1" ], - "summary": "List automation grants", - "description": "Lists grants on the selected automation authorization plane.", + "summary": "List routine grants", + "description": "Lists grants on the selected routine authorization plane.", "operationId": "automations-list-grants", "parameters": [ { @@ -6091,7 +6165,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -6145,7 +6219,7 @@ "automations", "v1" ], - "summary": "Add an automation grant", + "summary": "Add a routine grant", "description": "Validates and adds a principal grant on the selected authorization plane.", "operationId": "automations-add-grant", "parameters": [ @@ -6158,7 +6232,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -6215,13 +6289,13 @@ ] } }, - "/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ "automations", "v1" ], - "summary": "Remove an automation grant", + "summary": "Remove a routine grant", "description": "Idempotently removes a principal grant while retaining at least one private ownership grant.", "operationId": "automations-remove-grant", "parameters": [ @@ -6234,7 +6308,7 @@ } }, { - "name": "automation_id", + "name": "routine_id", "in": "path", "required": true, "schema": { @@ -7257,7 +7331,7 @@ "v1" ], "summary": "Download a ChatKit agent avatar", - "description": "Returns the canonical avatar bytes from the agent's stable machine-user profile.", + "description": "Returns the canonical avatar bytes from the stable agent-user profile.", "operationId": "chatkit-get-agent-avatar", "parameters": [ { @@ -7329,7 +7403,7 @@ "v1" ], "summary": "Upload a ChatKit agent avatar", - "description": "Stores a PNG, JPEG, or WebP avatar on the agent's stable machine-user profile.", + "description": "Stores a PNG, JPEG, or WebP avatar on the stable agent-user profile.", "operationId": "chatkit-update-agent-avatar", "parameters": [ { @@ -7661,6 +7735,117 @@ ] } }, + "/api/v1/team/{team_id}/chatkit/agents/{agent_id}/permissions": { + "put": { + "tags": [ + "chatkit", + "v1" + ], + "summary": "Update ChatKit agent permissions", + "description": "Sets whether an agent may delegate to other agents and create multi-party sessions, and which agents or users it may reach. Permissions narrow reach: they intersect with the visibility plane and never grant access to an agent the caller cannot already see. An agent with no permissions is offered no delegation tools at all.", + "operationId": "chatkit-set-agent-permissions", + "parameters": [ + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "agent_id", + "in": "path", + "description": "ChatKit agent inbox ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentPermissions" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Update what a ChatKit agent may reach", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChatKitAgent" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + {}, + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + } + }, "/api/v1/team/{team_id}/chatkit/agents/{agent_id}/provision": { "get": { "tags": [ @@ -9876,15 +10061,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/routines": { + "/api/v1/team/{team_id}/chatkit/session": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "List ChatKit routines", - "description": "Lists scheduled prompts for one team.", - "operationId": "chatkit-list-routines", + "summary": "List sessions", + "description": "List all chat sessions with pagination. Optionally filter by inbox_id to get sessions for a specific inbox.", + "operationId": "list-sessions", "parameters": [ { "name": "team_id", @@ -9898,6 +10083,7 @@ { "name": "page_size", "in": "query", + "description": "Number of items to return per page", "required": false, "schema": { "type": "integer", @@ -9907,6 +10093,19 @@ { "name": "next_page_token", "in": "query", + "description": "Token for the next page of results", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "inbox_id", + "in": "query", + "description": "Filter sessions by inbox_id (via session_inbox_instance join)", "required": false, "schema": { "type": [ @@ -9927,11 +10126,31 @@ ], "responses": { "200": { - "description": "Routine list", + "description": "List sessions", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoutinePaginatedResponse" + "$ref": "#/components/schemas/SessionPaginatedResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -9952,9 +10171,9 @@ "chatkit", "v1" ], - "summary": "Create a ChatKit routine", - "description": "Creates a minute-granularity UTC cron schedule that prompts one ChatKit agent.", - "operationId": "chatkit-create-routine", + "summary": "Create session", + "description": "Create a new chat session. Optionally include inbox_instances to register participants.", + "operationId": "create-session", "parameters": [ { "name": "team_id", @@ -9979,7 +10198,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRoutineRequestInner" + "$ref": "#/components/schemas/CreateSessionInner" } } }, @@ -9987,17 +10206,17 @@ }, "responses": { "200": { - "description": "Created routine", + "description": "Create a session", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Routine" + "$ref": "#/components/schemas/Session" } } } }, "400": { - "description": "Invalid schedule or routine", + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -10028,15 +10247,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}": { - "get": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/upload": { + "post": { "tags": [ "chatkit", "v1" ], - "summary": "Get a ChatKit routine", - "description": "Gets one scheduled prompt.", - "operationId": "chatkit-get-routine", + "summary": "Create attachment upload", + "description": "Create a ChatKit attachment row and return presigned object-store upload and download URLs.", + "operationId": "create-attachment-upload", "parameters": [ { "name": "team_id", @@ -10048,9 +10267,9 @@ } }, { - "name": "routine_id", + "name": "session_id", "in": "path", - "description": "Routine ID", + "description": "Session ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" @@ -10066,13 +10285,43 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAttachmentUploadInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Routine", + "description": "Create attachment upload", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Routine" + "$ref": "#/components/schemas/CreateAttachmentUploadResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10087,15 +10336,17 @@ "bearer_token": [] } ] - }, + } + }, + "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}": { "delete": { "tags": [ "chatkit", "v1" ], - "summary": "Delete a ChatKit routine", - "description": "Deletes one scheduled prompt.", - "operationId": "chatkit-delete-routine", + "summary": "Delete attachment", + "description": "Mark a ChatKit attachment deleted and delete its backing object best-effort.", + "operationId": "delete-attachment", "parameters": [ { "name": "team_id", @@ -10107,9 +10358,18 @@ } }, { - "name": "routine_id", + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "attachment_id", "in": "path", - "description": "Routine ID", + "description": "Attachment ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" @@ -10127,11 +10387,41 @@ ], "responses": { "200": { - "description": "Deletion result", + "description": "Delete attachment", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteRoutineResponse" + "$ref": "#/components/schemas/Attachment" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Attachment Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10146,15 +10436,17 @@ "bearer_token": [] } ] - }, - "patch": { + } + }, + "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}/complete": { + "post": { "tags": [ "chatkit", "v1" ], - "summary": "Update a ChatKit routine", - "description": "Updates a routine and recomputes its next UTC occurrence.", - "operationId": "chatkit-update-routine", + "summary": "Complete attachment upload", + "description": "Mark a direct-to-object-store attachment upload as complete.", + "operationId": "complete-attachment-upload", "parameters": [ { "name": "team_id", @@ -10166,9 +10458,18 @@ } }, { - "name": "routine_id", + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "attachment_id", "in": "path", - "description": "Routine ID", + "description": "Attachment ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" @@ -10188,7 +10489,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRoutineRequestInner" + "$ref": "#/components/schemas/CompleteAttachmentUploadInner" } } }, @@ -10196,11 +10497,41 @@ }, "responses": { "200": { - "description": "Updated routine", + "description": "Complete attachment upload", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Routine" + "$ref": "#/components/schemas/Attachment" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Attachment Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -10217,25 +10548,38 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/ownership": { - "post": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}/content": { + "get": { "tags": [ "chatkit", "v1" ], - "operationId": "set-chatkit-routine-ownership", + "summary": "Download attachment content", + "description": "Download ChatKit attachment bytes through the API server. Debug builds return this endpoint as the attachment download URL.", + "operationId": "download-attachment-content", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "routine_id", + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "attachment_id", "in": "path", + "description": "Attachment ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" @@ -10251,49 +10595,94 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "responses": { + "200": { + "description": "Download attachment content", + "content": { + "application/octet-stream": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } } } }, - "required": true - }, - "responses": { - "200": { - "description": "", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Attachment Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - } - }, - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/visibility": { - "post": { + }, + "security": [ + {}, + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + }, + "put": { "tags": [ "chatkit", "v1" ], - "operationId": "set-chatkit-routine-visibility", + "summary": "Upload attachment content", + "description": "Upload ChatKit attachment bytes through the API server. Debug builds return this endpoint as the upload URL instead of a browser-direct object-store URL.", + "operationId": "upload-attachment-content", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "routine_id", + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "attachment_id", "in": "path", + "description": "Attachment ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" @@ -10311,9 +10700,14 @@ ], "requestBody": { "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "minimum": 0 + } } } }, @@ -10321,48 +10715,92 @@ }, "responses": { "200": { - "description": "", + "description": "Upload attachment content", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/Attachment" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Attachment Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + {}, + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}/download-url": { "get": { "tags": [ "chatkit", "v1" ], - "operationId": "list-chatkit-routine-grants", + "summary": "Get attachment download URL", + "description": "Create a short-lived signed download URL for a ChatKit attachment.", + "operationId": "get-attachment-download-url", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "routine_id", + "name": "session_id", "in": "path", + "description": "Session ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" } }, { - "name": "plane", + "name": "attachment_id", "in": "path", + "description": "Attachment ID", "required": true, "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -10377,51 +10815,85 @@ ], "responses": { "200": { - "description": "", + "description": "Get attachment download URL", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } + "$ref": "#/components/schemas/GetAttachmentDownloadUrlResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Attachment Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - }, + }, + "security": [ + {}, + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + } + }, + "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachments/upload": { "post": { "tags": [ "chatkit", "v1" ], - "operationId": "add-chatkit-routine-grant", + "summary": "Create attachment uploads", + "description": "Creates up to ten ChatKit attachment rows and returns their presigned uploads in one request.", + "operationId": "create-attachment-uploads", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "routine_id", + "name": "session_id", "in": "path", + "description": "Session ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" } }, - { - "name": "plane", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" - } - }, { "name": "team_id", "in": "path", @@ -10436,7 +10908,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + "$ref": "#/components/schemas/CreateAttachmentUploadsInner" } } }, @@ -10444,92 +10916,56 @@ }, "responses": { "200": { - "description": "", + "description": "Create attachment uploads", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/CreateAttachmentUploadsResponse" } } } - } - } - } - }, - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants/{principal_type}/{principal_id}": { - "delete": { - "tags": [ - "chatkit", - "v1" - ], - "operationId": "remove-chatkit-routine-grant", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "routine_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } }, - { - "name": "plane", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "principal_type", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourcePrincipalType" + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } - }, + } + }, + "security": [ + {}, { - "name": "principal_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "api_key": [] }, { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" + "bearer_token": [] } - } + ] } }, - "/api/v1/team/{team_id}/chatkit/session": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/event-history": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "List sessions", - "description": "List all chat sessions with pagination. Optionally filter by inbox_id to get sessions for a specific inbox.", - "operationId": "list-sessions", + "summary": "Get session event history", + "description": "Get paginated historical events for a session. Optionally include events from child sessions.", + "operationId": "get-session-event-history", "parameters": [ { "name": "team_id", @@ -10540,6 +10976,15 @@ "type": "string" } }, + { + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "page_size", "in": "query", @@ -10563,13 +11008,13 @@ } }, { - "name": "inbox_id", + "name": "include_child_sessions", "in": "query", - "description": "Filter sessions by inbox_id (via session_inbox_instance join)", + "description": "Whether to include events from child sessions", "required": false, "schema": { "type": [ - "string", + "boolean", "null" ] } @@ -10586,11 +11031,11 @@ ], "responses": { "200": { - "description": "List sessions", + "description": "Event history", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionPaginatedResponse" + "$ref": "#/components/schemas/StoredEventPaginatedResponse" } } } @@ -10625,15 +11070,17 @@ "bearer_token": [] } ] - }, - "post": { + } + }, + "/api/v1/team/{team_id}/chatkit/session/{session_id}/inbox-instances": { + "get": { "tags": [ "chatkit", "v1" ], - "summary": "Create session", - "description": "Create a new chat session. Optionally include inbox_instances to register participants.", - "operationId": "create-session", + "summary": "List session inbox instances", + "description": "Get all inbox instances (participants) registered in a session.", + "operationId": "list-session-inbox-instances", "parameters": [ { "name": "team_id", @@ -10645,7 +11092,16 @@ } }, { - "name": "team_id", + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", "in": "path", "description": "Team ID", "required": true, @@ -10654,23 +11110,16 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSessionInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Create a session", + "description": "List inbox instances for a session", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Session" + "type": "array", + "items": { + "$ref": "#/components/schemas/InboxInstance" + } } } } @@ -10707,15 +11156,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/upload": { - "post": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/member": { + "get": { "tags": [ "chatkit", "v1" ], - "summary": "Create attachment upload", - "description": "Create a ChatKit attachment row and return presigned object-store upload and download URLs.", - "operationId": "create-attachment-upload", + "summary": "List private session members", + "description": "List Tilde users authorized to access a private ChatKit session. These users are distinct from ChatKit inbox participants.", + "operationId": "list-session-user-members", "parameters": [ { "name": "team_id", @@ -10729,10 +11178,10 @@ { "name": "session_id", "in": "path", - "description": "Session ID", + "description": "Private session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -10745,39 +11194,22 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAttachmentUploadInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Create attachment upload", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAttachmentUploadResponse" - } - } - } - }, - "400": { - "description": "Bad Request", + "description": "Private session authorization members", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionUserMembership" + } } } } }, - "500": { - "description": "Internal Server Error", + "404": { + "description": "Session not found", "content": { "application/json": { "schema": { @@ -10796,17 +11228,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}": { - "delete": { + }, + "post": { "tags": [ "chatkit", "v1" ], - "summary": "Delete attachment", - "description": "Mark a ChatKit attachment deleted and delete its backing object best-effort.", - "operationId": "delete-attachment", + "summary": "Add a private session member", + "description": "Grant a Tilde user access to a private ChatKit session. The user must retain membership in the session team to use the grant.", + "operationId": "add-session-user-member", "parameters": [ { "name": "team_id", @@ -10820,19 +11250,10 @@ { "name": "session_id", "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "attachment_id", - "in": "path", - "description": "Attachment ID", + "description": "Private session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -10845,39 +11266,29 @@ } } ], - "responses": { - "200": { - "description": "Delete attachment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attachment" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddSessionUserMemberRequest" } } }, - "400": { - "description": "Bad Request", + "required": true + }, + "responses": { + "200": { + "description": "Added authorization member", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/SessionUserMembership" } } } }, "404": { - "description": "Attachment Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "Session not found", "content": { "application/json": { "schema": { @@ -10898,15 +11309,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}/complete": { - "post": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/member/{user_id}": { + "delete": { "tags": [ "chatkit", "v1" ], - "summary": "Complete attachment upload", - "description": "Mark a direct-to-object-store attachment upload as complete.", - "operationId": "complete-attachment-upload", + "summary": "Remove a private session member", + "description": "Revoke a non-owner user's access to a private ChatKit session. Ownership must be transferred before removing the owner.", + "operationId": "remove-session-user-member", "parameters": [ { "name": "team_id", @@ -10920,19 +11331,19 @@ { "name": "session_id", "in": "path", - "description": "Session ID", + "description": "Private session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { - "name": "attachment_id", + "name": "user_id", "in": "path", - "description": "Attachment ID", + "description": "Tilde user ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -10945,49 +11356,19 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CompleteAttachmentUploadInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Complete attachment upload", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attachment" - } - } - } - }, - "400": { - "description": "Bad Request", + "description": "Removed authorization member", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/RemoveSessionUserMemberResponse" } } } }, "404": { - "description": "Attachment Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "Session not found", "content": { "application/json": { "schema": { @@ -11008,15 +11389,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}/content": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/message": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "Download attachment content", - "description": "Download ChatKit attachment bytes through the API server. Debug builds return this endpoint as the attachment download URL.", - "operationId": "download-attachment-content", + "summary": "List messages in session", + "description": "List all messages in a session with pagination", + "operationId": "list-messages", "parameters": [ { "name": "team_id", @@ -11037,12 +11418,86 @@ } }, { - "name": "attachment_id", - "in": "path", - "description": "Attachment ID", - "required": true, + "name": "page_size", + "in": "query", + "required": false, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "channel_inbox_id", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "participant_inbox_instance_id", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "user_external_id", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "created_after", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + ] + } + }, + { + "name": "created_before", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + ] } }, { @@ -11057,16 +11512,11 @@ ], "responses": { "200": { - "description": "Download attachment content", + "description": "List messages", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32", - "minimum": 0 - } + "$ref": "#/components/schemas/MessagePaginatedResponse" } } } @@ -11082,7 +11532,7 @@ } }, "404": { - "description": "Attachment Not Found", + "description": "Session Not Found", "content": { "application/json": { "schema": { @@ -11112,14 +11562,14 @@ } ] }, - "put": { + "post": { "tags": [ "chatkit", "v1" ], - "summary": "Upload attachment content", - "description": "Upload ChatKit attachment bytes through the API server. Debug builds return this endpoint as the upload URL instead of a browser-direct object-store URL.", - "operationId": "upload-attachment-content", + "summary": "Create message", + "description": "Create a new message in a session", + "operationId": "create-message", "parameters": [ { "name": "team_id", @@ -11139,15 +11589,6 @@ "$ref": "#/components/schemas/WrappedUuidV4" } }, - { - "name": "attachment_id", - "in": "path", - "description": "Attachment ID", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, { "name": "team_id", "in": "path", @@ -11160,14 +11601,9 @@ ], "requestBody": { "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32", - "minimum": 0 - } + "$ref": "#/components/schemas/CreateMessageRequest" } } }, @@ -11175,11 +11611,11 @@ }, "responses": { "200": { - "description": "Upload attachment content", + "description": "Create a message", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attachment" + "$ref": "#/components/schemas/Message" } } } @@ -11195,7 +11631,7 @@ } }, "404": { - "description": "Attachment Not Found", + "description": "Session Not Found", "content": { "application/json": { "schema": { @@ -11226,15 +11662,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachment/{attachment_id}/download-url": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/message/{message_id}": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "Get attachment download URL", - "description": "Create a short-lived signed download URL for a ChatKit attachment.", - "operationId": "get-attachment-download-url", + "summary": "Get message", + "description": "Retrieve a message by its ID", + "operationId": "get-message", "parameters": [ { "name": "team_id", @@ -11255,9 +11691,9 @@ } }, { - "name": "attachment_id", + "name": "message_id", "in": "path", - "description": "Attachment ID", + "description": "Message ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" @@ -11275,11 +11711,11 @@ ], "responses": { "200": { - "description": "Get attachment download URL", + "description": "Get message", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetAttachmentDownloadUrlResponse" + "$ref": "#/components/schemas/Message" } } } @@ -11295,7 +11731,7 @@ } }, "404": { - "description": "Attachment Not Found", + "description": "Not Found", "content": { "application/json": { "schema": { @@ -11324,17 +11760,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/attachments/upload": { - "post": { + }, + "delete": { "tags": [ "chatkit", "v1" ], - "summary": "Create attachment uploads", - "description": "Creates up to ten ChatKit attachment rows and returns their presigned uploads in one request.", - "operationId": "create-attachment-uploads", + "summary": "Delete message", + "description": "Delete a message by its ID", + "operationId": "delete-message", "parameters": [ { "name": "team_id", @@ -11354,6 +11788,15 @@ "$ref": "#/components/schemas/WrappedUuidV4" } }, + { + "name": "message_id", + "in": "path", + "description": "Message ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, { "name": "team_id", "in": "path", @@ -11364,23 +11807,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAttachmentUploadsInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Create attachment uploads", + "description": "Delete message", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAttachmentUploadsResponse" + "$ref": "#/components/schemas/DeleteMessageResponse" } } } @@ -11395,6 +11828,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "500": { "description": "Internal Server Error", "content": { @@ -11417,15 +11860,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/event-history": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/observe": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "Get session event history", - "description": "Get paginated historical events for a session. Optionally include events from child sessions.", - "operationId": "get-session-event-history", + "summary": "Observe session events via SSE", + "description": "Subscribe to real-time events on a session via Server-Sent Events. Optionally filter by event types and cascade into child sessions.", + "operationId": "observe-session", "parameters": [ { "name": "team_id", @@ -11439,26 +11882,16 @@ { "name": "session_id", "in": "path", - "description": "Session ID", + "description": "Session ID to observe", "required": true, "schema": { "type": "string" } }, { - "name": "page_size", - "in": "query", - "description": "Number of items to return per page", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", + "name": "subscribe_to_events", "in": "query", - "description": "Token for the next page of results", + "description": "Comma-separated event types to subscribe to (e.g. \"message_created,message_streaming\").\nIf not set, all events are forwarded.", "required": false, "schema": { "type": [ @@ -11468,9 +11901,9 @@ } }, { - "name": "include_child_sessions", + "name": "attach_to_child_sessions", "in": "query", - "description": "Whether to include events from child sessions", + "description": "Whether to auto-attach to child sessions created under the observed session", "required": false, "schema": { "type": [ @@ -11491,14 +11924,7 @@ ], "responses": { "200": { - "description": "Event history", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StoredEventPaginatedResponse" - } - } - } + "description": "SSE stream of session events" }, "400": { "description": "Bad Request", @@ -11510,8 +11936,8 @@ } } }, - "500": { - "description": "Internal Server Error", + "404": { + "description": "Session not found", "content": { "application/json": { "schema": { @@ -11532,20 +11958,19 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/inbox-instances": { - "get": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/ownership": { + "post": { "tags": [ "chatkit", "v1" ], - "summary": "List session inbox instances", - "description": "Get all inbox instances (participants) registered in a session.", - "operationId": "list-session-inbox-instances", + "summary": "Update session ownership", + "description": "Set the session ownership plane to team or private. Private mode retains a creator ownership grant.", + "operationId": "update-session-ownership", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" @@ -11554,7 +11979,6 @@ { "name": "session_id", "in": "path", - "description": "Session ID", "required": true, "schema": { "type": "string" @@ -11570,22 +11994,29 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetResourceAccessModeRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "List inbox instances for a session", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InboxInstance" - } + "$ref": "#/components/schemas/ResourceAuthorization" } } } }, "400": { - "description": "Bad Request", + "description": "", "content": { "application/json": { "schema": { @@ -11594,8 +12025,8 @@ } } }, - "500": { - "description": "Internal Server Error", + "404": { + "description": "", "content": { "application/json": { "schema": { @@ -11616,20 +12047,19 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/member": { - "get": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/visibility": { + "post": { "tags": [ "chatkit", "v1" ], - "summary": "List private session members", - "description": "List Tilde users authorized to access a private ChatKit session. These users are distinct from ChatKit inbox participants.", - "operationId": "list-session-user-members", + "summary": "Update session visibility", + "description": "Set the session visibility plane to team or private. Private mode retains a creator visibility grant.", + "operationId": "update-session-visibility", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" @@ -11638,7 +12068,6 @@ { "name": "session_id", "in": "path", - "description": "Private session ID", "required": true, "schema": { "type": "string" @@ -11654,22 +12083,39 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetResourceAccessModeRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Private session authorization members", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionUserMembership" - } + "$ref": "#/components/schemas/ResourceAuthorization" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } }, "404": { - "description": "Session not found", + "description": "", "content": { "application/json": { "schema": { @@ -11688,16 +12134,42 @@ "bearer_token": [] } ] - }, - "post": { + } + }, + "/api/v1/team/{team_id}/chatkit/session/{session_id}/{plane}/grants": { + "get": { "tags": [ "chatkit", "v1" ], - "summary": "Add a private session member", - "description": "Grant a Tilde user access to a private ChatKit session. The user must retain membership in the session team to use the grant.", - "operationId": "add-session-user-member", + "summary": "List session grants", + "description": "List binary user and group grants for one session authorization plane.", + "operationId": "list-session-resource-grants", "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "plane", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "team_id", "in": "path", @@ -11706,11 +12178,71 @@ "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceGrant" + } + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + {}, + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + }, + "post": { + "tags": [ + "chatkit", + "v1" + ], + "summary": "Add session grant", + "description": "Grant a same-team user or group access to one session authorization plane.", + "operationId": "add-session-resource-grant", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, { "name": "session_id", "in": "path", - "description": "Private session ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "plane", + "in": "path", "required": true, "schema": { "type": "string" @@ -11730,7 +12262,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddSessionUserMemberRequest" + "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" } } }, @@ -11738,17 +12270,27 @@ }, "responses": { "200": { - "description": "Added authorization member", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionUserMembership" + "$ref": "#/components/schemas/ResourceGrant" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } }, "404": { - "description": "Session not found", + "description": "", "content": { "application/json": { "schema": { @@ -11769,20 +12311,19 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/member/{user_id}": { + "/api/v1/team/{team_id}/chatkit/session/{session_id}/{plane}/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ "chatkit", "v1" ], - "summary": "Remove a private session member", - "description": "Revoke a non-owner user's access to a private ChatKit session. Ownership must be transferred before removing the owner.", - "operationId": "remove-session-user-member", + "summary": "Remove session grant", + "description": "Remove one binary principal grant without removing the required creator grant from a private plane.", + "operationId": "remove-session-resource-grant", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" @@ -11791,16 +12332,30 @@ { "name": "session_id", "in": "path", - "description": "Private session ID", "required": true, "schema": { "type": "string" } }, { - "name": "user_id", + "name": "plane", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "principal_type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "principal_id", "in": "path", - "description": "Tilde user ID", "required": true, "schema": { "type": "string" @@ -11818,17 +12373,27 @@ ], "responses": { "200": { - "description": "Removed authorization member", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RemoveSessionUserMemberResponse" + "$ref": "#/components/schemas/ResourceGrant" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } }, "404": { - "description": "Session not found", + "description": "", "content": { "application/json": { "schema": { @@ -11849,15 +12414,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/message": { + "/api/v1/team/{team_id}/chatkit/sessions": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "List messages in session", - "description": "List all messages in a session with pagination", - "operationId": "list-messages", + "summary": "List ChatKit sessions", + "description": "Lists ChatKit sessions through the existing inbox session storage.", + "operationId": "chatkit-list-sessions", "parameters": [ { "name": "team_id", @@ -11868,15 +12433,6 @@ "type": "string" } }, - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, { "name": "page_size", "in": "query", @@ -11898,29 +12454,7 @@ } }, { - "name": "channel_inbox_id", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "participant_inbox_instance_id", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "user_external_id", + "name": "inbox_id", "in": "query", "required": false, "schema": { @@ -11930,36 +12464,6 @@ ] } }, - { - "name": "created_after", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedChronoDateTime" - } - ] - } - }, - { - "name": "created_before", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedChronoDateTime" - } - ] - } - }, { "name": "team_id", "in": "path", @@ -11972,11 +12476,11 @@ ], "responses": { "200": { - "description": "List messages", + "description": "List ChatKit sessions", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessagePaginatedResponse" + "$ref": "#/components/schemas/SessionPaginatedResponse" } } } @@ -11991,16 +12495,6 @@ } } }, - "404": { - "description": "Session Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "500": { "description": "Internal Server Error", "content": { @@ -12027,9 +12521,9 @@ "chatkit", "v1" ], - "summary": "Create message", - "description": "Create a new message in a session", - "operationId": "create-message", + "summary": "Create ChatKit session", + "description": "Creates a ChatKit session with explicit participants, or wires the session to agent_id and its registered Vercel UI channel when agent_id is provided.", + "operationId": "chatkit-create-session", "parameters": [ { "name": "team_id", @@ -12040,15 +12534,6 @@ "type": "string" } }, - { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, { "name": "team_id", "in": "path", @@ -12063,7 +12548,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMessageRequest" + "$ref": "#/components/schemas/CreateChatKitSessionRequestInner" } } }, @@ -12071,11 +12556,11 @@ }, "responses": { "200": { - "description": "Create a message", + "description": "Create ChatKit session", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Message" + "$ref": "#/components/schemas/ChatKitSessionWithParticipants" } } } @@ -12090,16 +12575,6 @@ } } }, - "404": { - "description": "Session Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "500": { "description": "Internal Server Error", "content": { @@ -12122,15 +12597,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/message/{message_id}": { - "get": { + "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/join": { + "post": { "tags": [ "chatkit", "v1" ], - "summary": "Get message", - "description": "Retrieve a message by its ID", - "operationId": "get-message", + "summary": "Join ChatKit session", + "description": "Alias for adding or linking the caller-provided participant to a ChatKit session.", + "operationId": "chatkit-join-session", "parameters": [ { "name": "team_id", @@ -12150,15 +12625,6 @@ "$ref": "#/components/schemas/WrappedUuidV4" } }, - { - "name": "message_id", - "in": "path", - "description": "Message ID", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, { "name": "team_id", "in": "path", @@ -12169,13 +12635,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddChatKitParticipantRequestInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Get message", + "description": "Join ChatKit session", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Message" + "$ref": "#/components/schemas/ChatKitParticipant" } } } @@ -12220,15 +12696,17 @@ "bearer_token": [] } ] - }, - "delete": { + } + }, + "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/messages": { + "get": { "tags": [ "chatkit", "v1" ], - "summary": "Delete message", - "description": "Delete a message by its ID", - "operationId": "delete-message", + "summary": "List ChatKit message history", + "description": "Lists chronological message history for a ChatKit session with channel, participant, external user, and time filters.", + "operationId": "chatkit-list-message-history", "parameters": [ { "name": "team_id", @@ -12249,12 +12727,86 @@ } }, { - "name": "message_id", - "in": "path", - "description": "Message ID", - "required": true, + "name": "page_size", + "in": "query", + "required": false, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "channel_inbox_id", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "participant_inbox_instance_id", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "user_external_id", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "created_after", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + ] + } + }, + { + "name": "created_before", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + ] } }, { @@ -12269,17 +12821,17 @@ ], "responses": { "200": { - "description": "Delete message", + "description": "List ChatKit message history", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteMessageResponse" + "$ref": "#/components/schemas/MessagePaginatedResponse" } } } }, "400": { - "description": "Bad Request", + "description": "", "content": { "application/json": { "schema": { @@ -12289,7 +12841,7 @@ } }, "404": { - "description": "Not Found", + "description": "", "content": { "application/json": { "schema": { @@ -12299,7 +12851,7 @@ } }, "500": { - "description": "Internal Server Error", + "description": "", "content": { "application/json": { "schema": { @@ -12320,15 +12872,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/observe": { + "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/participants": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "Observe session events via SSE", - "description": "Subscribe to real-time events on a session via Server-Sent Events. Optionally filter by event types and cascade into child sessions.", - "operationId": "observe-session", + "summary": "List ChatKit session participants", + "description": "Lists explicit human and agent participants attached to a ChatKit session.", + "operationId": "chatkit-list-session-participants", "parameters": [ { "name": "team_id", @@ -12342,34 +12894,10 @@ { "name": "session_id", "in": "path", - "description": "Session ID to observe", + "description": "Session ID", "required": true, "schema": { - "type": "string" - } - }, - { - "name": "subscribe_to_events", - "in": "query", - "description": "Comma-separated event types to subscribe to (e.g. \"message_created,message_streaming\").\nIf not set, all events are forwarded.", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "attach_to_child_sessions", - "in": "query", - "description": "Whether to auto-attach to child sessions created under the observed session", - "required": false, - "schema": { - "type": [ - "boolean", - "null" - ] + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -12384,7 +12912,17 @@ ], "responses": { "200": { - "description": "SSE stream of session events" + "description": "List ChatKit participants", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatKitParticipant" + } + } + } + } }, "400": { "description": "Bad Request", @@ -12397,7 +12935,17 @@ } }, "404": { - "description": "Session not found", + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { @@ -12416,21 +12964,20 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/ownership": { + }, "post": { "tags": [ "chatkit", "v1" ], - "summary": "Update session ownership", - "description": "Set the session ownership plane to team or private. Private mode retains a creator ownership grant.", - "operationId": "update-session-ownership", + "summary": "Add ChatKit participant", + "description": "Adds or links a human or agent participant to a ChatKit session.", + "operationId": "chatkit-add-session-participant", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" @@ -12439,9 +12986,10 @@ { "name": "session_id", "in": "path", + "description": "Session ID", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -12458,7 +13006,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "$ref": "#/components/schemas/AddChatKitParticipantRequestInner" } } }, @@ -12466,17 +13014,17 @@ }, "responses": { "200": { - "description": "", + "description": "Add ChatKit participant", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/ChatKitParticipant" } } } }, "400": { - "description": "", + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -12486,7 +13034,17 @@ } }, "404": { - "description": "", + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { @@ -12507,19 +13065,20 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/visibility": { - "post": { + "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/participants/{participant_instance_id}": { + "delete": { "tags": [ "chatkit", "v1" ], - "summary": "Update session visibility", - "description": "Set the session visibility plane to team or private. Private mode retains a creator visibility grant.", - "operationId": "update-session-visibility", + "summary": "Remove ChatKit participant", + "description": "Unlinks a participant from a ChatKit session.", + "operationId": "chatkit-remove-session-participant", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" @@ -12528,6 +13087,16 @@ { "name": "session_id", "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "participant_instance_id", + "in": "path", + "description": "Participant inbox instance ID", "required": true, "schema": { "type": "string" @@ -12543,29 +13112,19 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "", + "description": "Remove ChatKit participant", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/RemoveChatKitParticipantResponse" } } } }, "400": { - "description": "", + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -12575,7 +13134,17 @@ } }, "404": { - "description": "", + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { @@ -12596,19 +13165,20 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/{plane}/grants": { - "get": { + "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/tools/sendMessage": { + "post": { "tags": [ "chatkit", "v1" ], - "summary": "List session grants", - "description": "List binary user and group grants for one session authorization plane.", - "operationId": "list-session-resource-grants", + "summary": "Send a session-bound provider message", + "description": "Invokes the session provider's sendMessage capability with server-validated participant routing and persists the canonical ChatKit message.", + "operationId": "chatkit-send-session-message", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" @@ -12617,17 +13187,10 @@ { "name": "session_id", "in": "path", + "description": "Session ID", "required": true, "schema": { - "type": "string" - } - }, - { - "name": "plane", - "in": "path", - "required": true, - "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -12640,16 +13203,33 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendSessionMessageBody" + } + } + }, + "required": true + }, "responses": { "200": { + "description": "Provider message delivered", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendSessionMessageResponse" + } + } + } + }, + "400": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } + "$ref": "#/components/schemas/Error" } } } @@ -12663,6 +13243,16 @@ } } } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } }, "security": [ @@ -12674,15 +13264,17 @@ "bearer_token": [] } ] - }, + } + }, + "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/tools/{tool_name}": { "post": { "tags": [ "chatkit", "v1" ], - "summary": "Add session grant", - "description": "Grant a same-team user or group access to one session authorization plane.", - "operationId": "add-session-resource-grant", + "summary": "Invoke a session-bound provider tool", + "description": "Invokes a provider action with server-bound session and message routing.", + "operationId": "chatkit-invoke-session-provider-tool", "parameters": [ { "name": "team_id", @@ -12697,11 +13289,11 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { - "name": "plane", + "name": "tool_name", "in": "path", "required": true, "schema": { @@ -12722,7 +13314,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + "$ref": "#/components/schemas/InvokeSessionProviderToolBody" } } }, @@ -12734,7 +13326,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/InvokeSessionProviderToolResponse" } } } @@ -12771,54 +13363,74 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/session/{session_id}/{plane}/grants/{principal_type}/{principal_id}": { - "delete": { + "/api/v1/team/{team_id}/chatkit/workspace/agents/{agent_id}/sessions": { + "get": { "tags": [ "chatkit", "v1" ], - "summary": "Remove session grant", - "description": "Remove one binary principal grant without removing the required creator grant from a private plane.", - "operationId": "remove-session-resource-grant", + "summary": "List ChatKit workspace agent sessions", + "description": "Lists more sessions for one ChatKit agent in ChatKit workspace.", + "operationId": "chatkit-workspace-agent-sessions", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "session_id", + "name": "agent_id", "in": "path", + "description": "Agent inbox ID", "required": true, "schema": { "type": "string" } }, { - "name": "plane", - "in": "path", - "required": true, + "name": "page_size", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { - "name": "principal_type", - "in": "path", - "required": true, + "name": "next_page_token", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": [ + "string", + "null" + ] } }, { - "name": "principal_id", - "in": "path", - "required": true, + "name": "session_sort", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": [ + "string", + "null" + ] + } + }, + { + "name": "q", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] } }, { @@ -12833,31 +13445,11 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceGrant" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "", + "description": "ChatKit workspace agent sessions", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ChatKitWorkspaceAgentSessionsResponse" } } } @@ -12872,17 +13464,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/chatkit/sessions": { - "get": { + }, + "post": { "tags": [ "chatkit", "v1" ], - "summary": "List ChatKit sessions", - "description": "Lists ChatKit sessions through the existing inbox session storage.", - "operationId": "chatkit-list-sessions", + "summary": "Create ChatKit workspace session", + "description": "Creates a ChatKit session wired to the selected agent and its Vercel UI channel.", + "operationId": "chatkit-workspace-create-session", "parameters": [ { "name": "team_id", @@ -12894,34 +13484,12 @@ } }, { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "inbox_id", - "in": "query", - "required": false, + "name": "agent_id", + "in": "path", + "description": "Agent inbox ID", + "required": true, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -12934,33 +13502,23 @@ } } ], - "responses": { - "200": { - "description": "List ChatKit sessions", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionPaginatedResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatKitWorkspaceSessionRequestInner" } } }, - "500": { - "description": "Internal Server Error", + "required": true + }, + "responses": { + "200": { + "description": "Created ChatKit workspace session", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ChatKitSessionWithParticipants" } } } @@ -12975,15 +13533,17 @@ "bearer_token": [] } ] - }, + } + }, + "/api/v1/team/{team_id}/chatkit/workspace/agents/{agent_id}/sessions/{session_id}/messages": { "post": { "tags": [ "chatkit", "v1" ], - "summary": "Create ChatKit session", - "description": "Creates a ChatKit session with explicit participants, or wires the session to agent_id and its registered Vercel UI channel when agent_id is provided.", - "operationId": "chatkit-create-session", + "summary": "Send ChatKit workspace message", + "description": "Sends a user message to the selected ChatKit agent session and invokes the registered Vercel UI-compatible agent endpoint.", + "operationId": "chatkit-workspace-send-message", "parameters": [ { "name": "team_id", @@ -12994,6 +13554,24 @@ "type": "string" } }, + { + "name": "agent_id", + "in": "path", + "description": "Agent inbox ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "team_id", "in": "path", @@ -13008,7 +13586,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateChatKitSessionRequestInner" + "$ref": "#/components/schemas/SendChatKitWorkspaceMessageRequestInner" } } }, @@ -13016,31 +13594,11 @@ }, "responses": { "200": { - "description": "Create ChatKit session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatKitSessionWithParticipants" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "ChatKit workspace messages after sending", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/MessagePaginatedResponse" } } } @@ -13057,15 +13615,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/join": { + "/api/v1/team/{team_id}/chatkit/workspace/agents/{agent_id}/turns": { "post": { "tags": [ "chatkit", "v1" ], - "summary": "Join ChatKit session", - "description": "Alias for adding or linking the caller-provided participant to a ChatKit session.", - "operationId": "chatkit-join-session", + "summary": "Submit ChatKit workspace turn", + "description": "Creates a session when needed, finalizes uploaded attachments, sends the owner message, and returns canonical conversation state.", + "operationId": "chatkit-workspace-submit-turn", "parameters": [ { "name": "team_id", @@ -13077,12 +13635,12 @@ } }, { - "name": "session_id", + "name": "agent_id", "in": "path", - "description": "Session ID", + "description": "Agent inbox ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -13099,7 +13657,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddChatKitParticipantRequestInner" + "$ref": "#/components/schemas/SubmitChatKitWorkspaceTurnRequestInner" } } }, @@ -13107,41 +13665,11 @@ }, "responses": { "200": { - "description": "Join ChatKit session", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatKitParticipant" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "Submitted ChatKit workspace turn", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/SubmitChatKitWorkspaceTurnResponse" } } } @@ -13158,15 +13686,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/messages": { + "/api/v1/team/{team_id}/chatkit/workspace/bootstrap": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "List ChatKit message history", - "description": "Lists chronological message history for a ChatKit session with channel, participant, external user, and time filters.", - "operationId": "chatkit-list-message-history", + "summary": "Bootstrap ChatKit workspace", + "description": "Returns the sidebar and an optional active conversation snapshot in one request.", + "operationId": "chatkit-workspace-bootstrap", "parameters": [ { "name": "team_id", @@ -13178,16 +13706,7 @@ } }, { - "name": "session_id", - "in": "path", - "description": "Session ID", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "page_size", + "name": "agent_page_size", "in": "query", "required": false, "schema": { @@ -13196,7 +13715,7 @@ } }, { - "name": "next_page_token", + "name": "agent_next_page_token", "in": "query", "required": false, "schema": { @@ -13207,40 +13726,34 @@ } }, { - "name": "channel_inbox_id", + "name": "session_page_size", "in": "query", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "integer", + "format": "int64" } }, { - "name": "participant_inbox_instance_id", + "name": "message_page_size", "in": "query", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "integer", + "format": "int64" } }, { - "name": "user_external_id", + "name": "queue_page_size", "in": "query", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "integer", + "format": "int64" } }, { - "name": "created_after", + "name": "active_session_id", "in": "query", "required": false, "schema": { @@ -13249,23 +13762,41 @@ "type": "null" }, { - "$ref": "#/components/schemas/WrappedChronoDateTime" + "$ref": "#/components/schemas/WrappedUuidV4" } ] } }, { - "name": "created_before", + "name": "agent_sort", "in": "query", "required": false, "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedChronoDateTime" - } + "type": [ + "string", + "null" + ] + } + }, + { + "name": "session_sort", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "q", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" ] } }, @@ -13281,41 +13812,11 @@ ], "responses": { "200": { - "description": "List ChatKit message history", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessagePaginatedResponse" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "", + "description": "ChatKit workspace bootstrap projection", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ChatKitWorkspaceBootstrapResponse" } } } @@ -13332,15 +13833,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/participants": { + "/api/v1/team/{team_id}/chatkit/workspace/search": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "List ChatKit session participants", - "description": "Lists explicit human and agent participants attached to a ChatKit session.", - "operationId": "chatkit-list-session-participants", + "summary": "Search ChatKit", + "description": "Searches visible session titles, participating agents, and messages across the team. When session_id is provided, searches messages only within that visible session.", + "operationId": "chatkit-search", "parameters": [ { "name": "team_id", @@ -13352,40 +13853,71 @@ } }, { - "name": "session_id", - "in": "path", - "description": "Session ID", + "name": "q", + "in": "query", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" + "name": "session_id", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedUuidV4" + } + ] + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" } } ], "responses": { "200": { - "description": "List ChatKit participants", + "description": "Consolidated ChatKit search results", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChatKitParticipant" - } + "$ref": "#/components/schemas/ChatKitSearchHitPaginatedResponse" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid query or pagination cursor", "content": { "application/json": { "schema": { @@ -13395,17 +13927,7 @@ } }, "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "Scoped session not found", "content": { "application/json": { "schema": { @@ -13424,15 +13946,17 @@ "bearer_token": [] } ] - }, + } + }, + "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/interrupt": { "post": { "tags": [ "chatkit", "v1" ], - "summary": "Add ChatKit participant", - "description": "Adds or links a human or agent participant to a ChatKit session.", - "operationId": "chatkit-add-session-participant", + "summary": "Interrupt ChatKit workspace session", + "description": "Interrupts the active ChatKit HTTP agent response for a ChatKit workspace session.", + "operationId": "chatkit-workspace-interrupt-session", "parameters": [ { "name": "team_id", @@ -13462,53 +13986,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddChatKitParticipantRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Add ChatKit participant", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatKitParticipant" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "ChatKit workspace session interruption requested", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/InterruptChatKitSessionResponse" } } } @@ -13525,15 +14009,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/participants/{participant_instance_id}": { - "delete": { + "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/messages": { + "get": { "tags": [ "chatkit", "v1" ], - "summary": "Remove ChatKit participant", - "description": "Unlinks a participant from a ChatKit session.", - "operationId": "chatkit-remove-session-participant", + "summary": "List ChatKit workspace messages", + "description": "Lists newest-first message history for a ChatKit workspace session with standard pagination.", + "operationId": "chatkit-workspace-messages", "parameters": [ { "name": "team_id", @@ -13550,16 +14034,27 @@ "description": "Session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { - "name": "participant_instance_id", - "in": "path", - "description": "Participant inbox instance ID", - "required": true, + "name": "page_size", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] } }, { @@ -13574,41 +14069,11 @@ ], "responses": { "200": { - "description": "Remove ChatKit participant", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RemoveChatKitParticipantResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "ChatKit workspace messages", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/MessagePaginatedResponse" } } } @@ -13625,15 +14090,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/tools/sendMessage": { - "post": { + "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/read-state": { + "put": { "tags": [ "chatkit", "v1" ], - "summary": "Send a session-bound provider message", - "description": "Invokes the session provider's sendMessage capability with server-validated participant routing and persists the canonical ChatKit message.", - "operationId": "chatkit-send-session-message", + "summary": "Update ChatKit session read state", + "description": "Marks the shared ChatKit session read or unread for only the authenticated user.", + "operationId": "chatkit-workspace-update-session-read-state", "parameters": [ { "name": "team_id", @@ -13667,7 +14132,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SendSessionMessageBody" + "$ref": "#/components/schemas/UpdateChatKitSessionUserStateRequestInner" } } }, @@ -13675,41 +14140,11 @@ }, "responses": { "200": { - "description": "Provider message delivered", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendSessionMessageResponse" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "", + "description": "Current user's ChatKit session read state", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ChatKitSessionUserState" } } } @@ -13726,19 +14161,20 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/sessions/{session_id}/tools/{tool_name}": { - "post": { + "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/rename": { + "patch": { "tags": [ "chatkit", "v1" ], - "summary": "Invoke a session-bound provider tool", - "description": "Invokes a provider action with server-bound session and message routing.", - "operationId": "chatkit-invoke-session-provider-tool", + "summary": "Rename ChatKit workspace thread", + "description": "Renames the selected ChatKit workspace ChatKit session.", + "operationId": "chatkit-workspace-rename-thread", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" @@ -13747,19 +14183,12 @@ { "name": "session_id", "in": "path", + "description": "Session ID", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" } }, - { - "name": "tool_name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -13774,7 +14203,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvokeSessionProviderToolBody" + "$ref": "#/components/schemas/RenameChatKitWorkspaceThreadRequestInner" } } }, @@ -13782,31 +14211,90 @@ }, "responses": { "200": { - "description": "", + "description": "Renamed ChatKit workspace thread", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvokeSessionProviderToolResponse" + "$ref": "#/components/schemas/Session" } } } + } + }, + "security": [ + {}, + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + } + }, + "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/snapshot": { + "get": { + "tags": [ + "chatkit", + "v1" + ], + "summary": "Get ChatKit workspace conversation snapshot", + "description": "Returns messages, pending queued turns, and the durable event revision for one session.", + "operationId": "chatkit-workspace-conversation-snapshot", + "parameters": [ + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "session_id", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" } }, - "404": { - "description": "", + { + "name": "message_page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "queue_page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ChatKit workspace conversation snapshot", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ChatKitWorkspaceConversationSnapshot" } } } @@ -13823,15 +14311,15 @@ ] } }, - "/api/v1/team/{team_id}/chatkit/workspace/agents/{agent_id}/sessions": { + "/api/v1/team/{team_id}/chatkit/workspace/sidebar": { "get": { "tags": [ "chatkit", "v1" ], - "summary": "List ChatKit workspace agent sessions", - "description": "Lists more sessions for one ChatKit agent in ChatKit workspace.", - "operationId": "chatkit-workspace-agent-sessions", + "summary": "List ChatKit workspace sidebar", + "description": "Lists ChatKit agents with nested session previews for ChatKit workspace.", + "operationId": "chatkit-workspace-sidebar", "parameters": [ { "name": "team_id", @@ -13843,16 +14331,27 @@ } }, { - "name": "agent_id", - "in": "path", - "description": "Agent inbox ID", - "required": true, + "name": "agent_page_size", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { - "name": "page_size", + "name": "agent_next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "session_page_size", "in": "query", "required": false, "schema": { @@ -13861,7 +14360,40 @@ } }, { - "name": "next_page_token", + "name": "message_page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "queue_page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "active_session_id", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedUuidV4" + } + ] + } + }, + { + "name": "agent_sort", "in": "query", "required": false, "schema": { @@ -13905,11 +14437,11 @@ ], "responses": { "200": { - "description": "ChatKit workspace agent sessions", + "description": "ChatKit workspace sidebar", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChatKitWorkspaceAgentSessionsResponse" + "$ref": "#/components/schemas/ChatKitWorkspaceSidebarResponse" } } } @@ -13924,29 +14456,24 @@ "bearer_token": [] } ] - }, + } + }, + "/api/v1/team/{team_id}/credential/broker/{broker_state_id}/resume": { "post": { - "tags": [ - "chatkit", - "v1" - ], - "summary": "Create ChatKit workspace session", - "description": "Creates a ChatKit session wired to the selected agent and its Vercel UI channel.", - "operationId": "chatkit-workspace-create-session", + "summary": "Resume a user-credential brokering flow", + "operationId": "resume_user_credential_brokering", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "agent_id", + "name": "broker_state_id", "in": "path", - "description": "Agent inbox ID", "required": true, "schema": { "type": "string" @@ -13966,7 +14493,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateChatKitWorkspaceSessionRequestInner" + "$ref": "#/components/schemas/ResumeUserCredentialBrokeringParams" } } }, @@ -13974,59 +14501,51 @@ }, "responses": { "200": { - "description": "Created ChatKit workspace session", + "description": "Brokering response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChatKitSessionWithParticipants" + "$ref": "#/components/schemas/UserCredentialBrokeringResponse" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/agents/{agent_id}/sessions/{session_id}/messages": { - "post": { + "/api/v1/team/{team_id}/credential/common-provider-installation": { + "get": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Send ChatKit workspace message", - "description": "Sends a user message to the selected ChatKit agent session and invokes the registered Vercel UI-compatible agent endpoint.", - "operationId": "chatkit-workspace-send-message", + "summary": "List common provider installations", + "description": "Lists common-provider bundles visible to the caller.", + "operationId": "listCommonProviderInstallations", "parameters": [ { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, + "name": "page_size", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { - "name": "agent_id", - "in": "path", - "description": "Agent inbox ID", - "required": true, + "name": "next_page_token", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": [ + "string", + "null" + ] } }, { - "name": "session_id", + "name": "team_id", "in": "path", - "description": "Session ID", "required": true, "schema": { "type": "string" @@ -14042,62 +14561,41 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendChatKitWorkspaceMessageRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "ChatKit workspace messages after sending", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessagePaginatedResponse" + "$ref": "#/components/schemas/CommonProviderInstallationPage" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/agents/{agent_id}/turns": { - "post": { + "/api/v1/team/{team_id}/credential/common-provider-installation/{id}": { + "get": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Submit ChatKit workspace turn", - "description": "Creates a session when needed, finalizes uploaded attachments, sends the owner message, and returns canonical conversation state.", - "operationId": "chatkit-workspace-submit-turn", - "parameters": [ + "summary": "Get common provider installation", + "description": "Gets a common-provider bundle visible to the caller.", + "operationId": "getCommonProviderInstallation", + "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "agent_id", + "name": "id", "in": "path", - "description": "Agent inbox ID", "required": true, "schema": { "type": "string" @@ -14113,151 +14611,44 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitChatKitWorkspaceTurnRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Submitted ChatKit workspace turn", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubmitChatKitWorkspaceTurnResponse" + "$ref": "#/components/schemas/CommonProviderInstallationSerialized" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/bootstrap": { - "get": { + "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/ownership": { + "post": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Bootstrap ChatKit workspace", - "description": "Returns the sidebar and an optional active conversation snapshot in one request.", - "operationId": "chatkit-workspace-bootstrap", + "summary": "Set installation ownership", + "description": "Set bundle administration to team or private; requires current ownership authority.", + "operationId": "setCommonProviderInstallationOwnership", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "agent_page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "agent_next_page_token", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "session_page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "message_page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "queue_page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "active_session_id", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedUuidV4" - } - ] - } - }, - { - "name": "agent_sort", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "session_sort", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "q", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -14270,91 +14661,56 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetResourceAccessModeRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "ChatKit workspace bootstrap projection", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChatKitWorkspaceBootstrapResponse" + "$ref": "#/components/schemas/ResourceAuthorization" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/search": { + "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/ownership/grants": { "get": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Search ChatKit", - "description": "Searches visible session titles, participating agents, and messages across the team. When session_id is provided, searches messages only within that visible session.", - "operationId": "chatkit-search", + "summary": "List installation ownership grants", + "description": "List private bundle administrators; requires ownership authority.", + "operationId": "listCommonProviderInstallationOwnershipGrants", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "q", - "in": "query", + "name": "id", + "in": "path", "required": true, "schema": { "type": "string" } }, - { - "name": "session_id", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedUuidV4" - } - ] - } - }, - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, { "name": "team_id", "in": "path", @@ -14367,73 +14723,43 @@ ], "responses": { "200": { - "description": "Consolidated ChatKit search results", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChatKitSearchHitPaginatedResponse" - } - } - } - }, - "400": { - "description": "Invalid query or pagination cursor", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Scoped session not found", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceGrant" + } } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/interrupt": { + } + }, "post": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Interrupt ChatKit workspace session", - "description": "Interrupts the active ChatKit HTTP agent response for a ChatKit workspace session.", - "operationId": "chatkit-workspace-interrupt-session", + "summary": "Add installation ownership grant", + "description": "Grant same-tenant private administration; requires ownership authority.", + "operationId": "addCommonProviderInstallationOwnershipGrant", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "session_id", + "name": "id", "in": "path", - "description": "Session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -14446,75 +14772,70 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "ChatKit workspace session interruption requested", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InterruptChatKitSessionResponse" + "$ref": "#/components/schemas/ResourceGrant" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/messages": { - "get": { + "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/ownership/grants/{principal_type}/{principal_id}": { + "delete": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "List ChatKit workspace messages", - "description": "Lists newest-first message history for a ChatKit workspace session with standard pagination.", - "operationId": "chatkit-workspace-messages", + "summary": "Remove installation ownership grant", + "description": "Remove an administrator while preserving the last private owner.", + "operationId": "removeCommonProviderInstallationOwnershipGrant", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "session_id", + "name": "id", "in": "path", - "description": "Session ID", "required": true, "schema": { "type": "string" } }, { - "name": "page_size", - "in": "query", - "required": false, + "name": "principal_type", + "in": "path", + "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { - "name": "next_page_token", - "in": "query", - "required": false, + "name": "principal_id", + "in": "path", + "required": true, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -14529,53 +14850,35 @@ ], "responses": { "200": { - "description": "ChatKit workspace messages", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessagePaginatedResponse" - } - } - } - } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] + "description": "" } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/read-state": { - "put": { + "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/visibility": { + "post": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Update ChatKit session read state", - "description": "Marks the shared ChatKit session read or unread for only the authenticated user.", - "operationId": "chatkit-workspace-update-session-read-state", + "summary": "Set installation visibility", + "description": "Set bundle discovery and use to team or private; requires ownership authority.", + "operationId": "setCommonProviderInstallationVisibility", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "session_id", + "name": "id", "in": "path", - "description": "Session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -14592,7 +14895,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateChatKitSessionUserStateRequestInner" + "$ref": "#/components/schemas/SetResourceAccessModeRequest" } } }, @@ -14600,53 +14903,42 @@ }, "responses": { "200": { - "description": "Current user's ChatKit session read state", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChatKitSessionUserState" + "$ref": "#/components/schemas/ResourceAuthorization" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/rename": { - "patch": { + "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/visibility/grants": { + "get": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Rename ChatKit workspace thread", - "description": "Renames the selected ChatKit workspace ChatKit session.", - "operationId": "chatkit-workspace-rename-thread", + "summary": "List installation visibility grants", + "description": "List private bundle visibility principals; requires ownership authority.", + "operationId": "listCommonProviderInstallationVisibilityGrants", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "session_id", + "name": "id", "in": "path", - "description": "Session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -14659,83 +14951,45 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RenameChatKitWorkspaceThreadRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Renamed ChatKit workspace thread", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Session" + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceGrant" + } } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/chatkit/workspace/sessions/{session_id}/snapshot": { - "get": { + } + }, + "post": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "Get ChatKit workspace conversation snapshot", - "description": "Returns messages, pending queued turns, and the durable event revision for one session.", - "operationId": "chatkit-workspace-conversation-snapshot", + "summary": "Add installation visibility grant", + "description": "Grant same-tenant private visibility; requires ownership authority.", + "operationId": "addCommonProviderInstallationVisibilityGrant", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "session_id", + "name": "id", "in": "path", - "description": "Session ID", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "message_page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "queue_page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { @@ -14748,141 +15002,195 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "ChatKit workspace conversation snapshot", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChatKitWorkspaceConversationSnapshot" + "$ref": "#/components/schemas/ResourceGrant" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/chatkit/workspace/sidebar": { - "get": { + "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/visibility/grants/{principal_type}/{principal_id}": { + "delete": { "tags": [ - "chatkit", + "managed-credential", "v1" ], - "summary": "List ChatKit workspace sidebar", - "description": "Lists ChatKit agents with nested session previews for ChatKit workspace.", - "operationId": "chatkit-workspace-sidebar", + "summary": "Remove installation visibility grant", + "description": "Remove one private visibility principal; requires ownership authority.", + "operationId": "removeCommonProviderInstallationVisibilityGrant", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "agent_page_size", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { - "name": "agent_next_page_token", - "in": "query", - "required": false, + "name": "principal_type", + "in": "path", + "required": true, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { - "name": "session_page_size", - "in": "query", - "required": false, + "name": "principal_id", + "in": "path", + "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { - "name": "message_page_size", - "in": "query", - "required": false, + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/api/v1/team/{team_id}/credential/provider-provisioner/catalog": { + "get": { + "summary": "List provider provisioner catalog entries", + "description": "Lists built-in provider provisioners with instructions and creation form metadata.", + "operationId": "list_provider_provisioner_catalog", + "parameters": [ { - "name": "queue_page_size", - "in": "query", - "required": false, + "name": "team_id", + "in": "path", + "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } }, { - "name": "active_session_id", - "in": "query", - "required": false, + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Provider provisioner catalog", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Vec" } - ] + } + } + } + } + } + }, + "/api/v1/team/{team_id}/credential/provider-provisioning/start": { + "post": { + "summary": "Start provider app provisioning", + "description": "Starts upstream app provisioning for a provider-specific one-shot setup flow.", + "operationId": "start_provider_app_provisioning", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, { - "name": "agent_sort", - "in": "query", - "required": false, + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProviderAppProvisioningBody" + } } }, + "required": true + }, + "responses": { + "200": { + "description": "Provider app provisioning response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderAppProvisioningResponse" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/credential/provider-provisioning/{state_id}/action": { + "get": { + "summary": "Get a provider provisioning browser action", + "description": "Returns the authenticated, expiring browser handoff for a provider provisioning flow.", + "operationId": "get_provider_provisioning_human_action", + "parameters": [ { - "name": "session_sort", - "in": "query", - "required": false, + "name": "team_id", + "in": "path", + "required": true, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { - "name": "q", - "in": "query", - "required": false, + "name": "state_id", + "in": "path", + "required": true, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -14897,31 +15205,23 @@ ], "responses": { "200": { - "description": "ChatKit workspace sidebar", + "description": "Provider provisioning browser action", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChatKitWorkspaceSidebarResponse" + "$ref": "#/components/schemas/ProviderProvisioningHumanAction" } } } } - }, - "security": [ - {}, - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/credential/broker/{broker_state_id}/resume": { + "/api/v1/team/{team_id}/credential/provider-provisioning/{state_id}/resume": { "post": { - "summary": "Resume a user-credential brokering flow", - "operationId": "resume_user_credential_brokering", + "summary": "Resume provider app provisioning", + "description": "Resumes upstream app provisioning after redirect, form post, or manual provider step.", + "operationId": "resume_provider_app_provisioning", "parameters": [ { "name": "team_id", @@ -14932,7 +15232,7 @@ } }, { - "name": "broker_state_id", + "name": "state_id", "in": "path", "required": true, "schema": { @@ -14953,7 +15253,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResumeUserCredentialBrokeringParams" + "$ref": "#/components/schemas/ResumeProviderAppProvisioningBody" } } }, @@ -14961,11 +15261,11 @@ }, "responses": { "200": { - "description": "Brokering response", + "description": "Provider app provisioning response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserCredentialBrokeringResponse" + "$ref": "#/components/schemas/ProviderAppProvisioningResponse" } } } @@ -14973,16 +15273,19 @@ } } }, - "/api/v1/team/{team_id}/credential/common-provider-installation": { + "/api/v1/team/{team_id}/credential/resource-server": { "get": { - "tags": [ - "managed-credential", - "v1" - ], - "summary": "List common provider installations", - "description": "Lists common-provider bundles visible to the caller.", - "operationId": "listCommonProviderInstallations", + "summary": "List resource-server credentials", + "operationId": "list_resource_server_credentials", "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "page_size", "in": "query", @@ -14997,15 +15300,49 @@ "in": "query", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { "name": "team_id", "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Page of credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceServerCredentialSerializedPaginatedResponse" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/credential/resource-server/{id}": { + "get": { + "summary": "Get a resource-server credential", + "operationId": "get_resource_server_credential", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", "required": true, "schema": { "type": "string" @@ -15023,27 +15360,56 @@ ], "responses": { "200": { - "description": "", + "description": "Credential", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommonProviderInstallationPage" + "$ref": "#/components/schemas/ResourceServerCredentialSerialized" } } } } } - } - }, - "/api/v1/team/{team_id}/credential/common-provider-installation/{id}": { - "get": { - "tags": [ - "managed-credential", - "v1" + }, + "delete": { + "summary": "Delete a resource-server credential", + "operationId": "delete_resource_server_credential", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get common provider installation", - "description": "Gets a common-provider bundle visible to the caller.", - "operationId": "getCommonProviderInstallation", + "responses": { + "200": { + "description": "Deleted" + } + } + }, + "patch": { + "summary": "Update a resource-server credential", + "operationId": "update_resource_server_credential", "parameters": [ { "name": "team_id", @@ -15071,13 +15437,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCredentialBody" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "", + "description": "Updated credential", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommonProviderInstallationSerialized" + "$ref": "#/components/schemas/ResourceServerCredentialSerialized" } } } @@ -15085,15 +15461,12 @@ } } }, - "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/ownership": { + "/api/v1/team/{team_id}/credential/resource-server/{id}/ownership": { "post": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "Set installation ownership", - "description": "Set bundle administration to team or private; requires current ownership authority.", - "operationId": "setCommonProviderInstallationOwnership", + "operationId": "set_rsc_ownership", "parameters": [ { "name": "team_id", @@ -15108,7 +15481,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15145,15 +15518,12 @@ } } }, - "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/ownership/grants": { + "/api/v1/team/{team_id}/credential/resource-server/{id}/ownership/grants": { "get": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "List installation ownership grants", - "description": "List private bundle administrators; requires ownership authority.", - "operationId": "listCommonProviderInstallationOwnershipGrants", + "operationId": "list_rsc_ownership_grants", "parameters": [ { "name": "team_id", @@ -15168,7 +15538,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15199,12 +15569,9 @@ }, "post": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "Add installation ownership grant", - "description": "Grant same-tenant private administration; requires ownership authority.", - "operationId": "addCommonProviderInstallationOwnershipGrant", + "operationId": "add_rsc_ownership_grant", "parameters": [ { "name": "team_id", @@ -15219,7 +15586,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15256,15 +15623,12 @@ } } }, - "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/ownership/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/credential/resource-server/{id}/ownership/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "Remove installation ownership grant", - "description": "Remove an administrator while preserving the last private owner.", - "operationId": "removeCommonProviderInstallationOwnershipGrant", + "operationId": "remove_rsc_ownership_grant", "parameters": [ { "name": "team_id", @@ -15279,7 +15643,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15315,15 +15679,12 @@ } } }, - "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/visibility": { + "/api/v1/team/{team_id}/credential/resource-server/{id}/visibility": { "post": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "Set installation visibility", - "description": "Set bundle discovery and use to team or private; requires ownership authority.", - "operationId": "setCommonProviderInstallationVisibility", + "operationId": "set_rsc_visibility", "parameters": [ { "name": "team_id", @@ -15338,7 +15699,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15375,15 +15736,12 @@ } } }, - "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/visibility/grants": { + "/api/v1/team/{team_id}/credential/resource-server/{id}/visibility/grants": { "get": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "List installation visibility grants", - "description": "List private bundle visibility principals; requires ownership authority.", - "operationId": "listCommonProviderInstallationVisibilityGrants", + "operationId": "list_rsc_visibility_grants", "parameters": [ { "name": "team_id", @@ -15398,7 +15756,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15429,12 +15787,9 @@ }, "post": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "Add installation visibility grant", - "description": "Grant same-tenant private visibility; requires ownership authority.", - "operationId": "addCommonProviderInstallationVisibilityGrant", + "operationId": "add_rsc_visibility_grant", "parameters": [ { "name": "team_id", @@ -15449,7 +15804,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15486,15 +15841,12 @@ } } }, - "/api/v1/team/{team_id}/credential/common-provider-installation/{id}/visibility/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/credential/resource-server/{id}/visibility/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ - "managed-credential", - "v1" + "managed-credential" ], - "summary": "Remove installation visibility grant", - "description": "Remove one private visibility principal; requires ownership authority.", - "operationId": "removeCommonProviderInstallationVisibilityGrant", + "operationId": "remove_rsc_visibility_grant", "parameters": [ { "name": "team_id", @@ -15509,7 +15861,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -15545,11 +15897,10 @@ } } }, - "/api/v1/team/{team_id}/credential/provider-provisioner/catalog": { + "/api/v1/team/{team_id}/credential/setup-items": { "get": { - "summary": "List provider provisioner catalog entries", - "description": "Lists built-in provider provisioners with instructions and creation form metadata.", - "operationId": "list_provider_provisioner_catalog", + "summary": "List credential setup items", + "operationId": "list_credential_setup_items", "parameters": [ { "name": "team_id", @@ -15560,41 +15911,38 @@ } }, { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, + "name": "page_size", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } - } - ], - "responses": { - "200": { - "description": "Provider provisioner catalog", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Vec" - } - } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] } - } - } - } - }, - "/api/v1/team/{team_id}/credential/provider-provisioning/start": { - "post": { - "summary": "Start provider app provisioning", - "description": "Starts upstream app provisioning for a provider-specific one-shot setup flow.", - "operationId": "start_provider_app_provisioning", - "parameters": [ + }, { - "name": "team_id", - "in": "path", - "required": true, + "name": "status", + "in": "query", + "required": false, "schema": { - "type": "string" + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/CredentialSetupItemStatus" + } + ] } }, { @@ -15607,23 +15955,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartProviderAppProvisioningBody" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Provider app provisioning response", + "description": "Credential setup items", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderAppProvisioningResponse" + "$ref": "#/components/schemas/CredentialSetupItemPaginatedResponse" } } } @@ -15631,11 +15969,10 @@ } } }, - "/api/v1/team/{team_id}/credential/provider-provisioning/{state_id}/action": { + "/api/v1/team/{team_id}/credential/setup-items/{id}": { "get": { - "summary": "Get a provider provisioning browser action", - "description": "Returns the authenticated, expiring browser handoff for a provider provisioning flow.", - "operationId": "get_provider_provisioning_human_action", + "summary": "Get a credential setup item", + "operationId": "get_credential_setup_item", "parameters": [ { "name": "team_id", @@ -15646,7 +15983,7 @@ } }, { - "name": "state_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -15665,11 +16002,11 @@ ], "responses": { "200": { - "description": "Provider provisioning browser action", + "description": "Credential setup item", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderProvisioningHumanAction" + "$ref": "#/components/schemas/CredentialSetupItem" } } } @@ -15677,11 +16014,10 @@ } } }, - "/api/v1/team/{team_id}/credential/provider-provisioning/{state_id}/resume": { + "/api/v1/team/{team_id}/credential/setup-items/{id}/complete": { "post": { - "summary": "Resume provider app provisioning", - "description": "Resumes upstream app provisioning after redirect, form post, or manual provider step.", - "operationId": "resume_provider_app_provisioning", + "summary": "Complete a credential setup item", + "operationId": "complete_credential_setup_item", "parameters": [ { "name": "team_id", @@ -15692,7 +16028,7 @@ } }, { - "name": "state_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -15713,7 +16049,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResumeProviderAppProvisioningBody" + "$ref": "#/components/schemas/CompleteCredentialSetupItemBody" } } }, @@ -15721,11 +16057,11 @@ }, "responses": { "200": { - "description": "Provider app provisioning response", + "description": "Credential setup completion response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderAppProvisioningResponse" + "$ref": "#/components/schemas/StartCredentialSetupItemResponse" } } } @@ -15733,10 +16069,10 @@ } } }, - "/api/v1/team/{team_id}/credential/resource-server": { - "get": { - "summary": "List resource-server credentials", - "operationId": "list_resource_server_credentials", + "/api/v1/team/{team_id}/credential/setup-items/{id}/resume": { + "post": { + "summary": "Resume a credential setup item", + "operationId": "resume_credential_setup_item", "parameters": [ { "name": "team_id", @@ -15747,18 +16083,9 @@ } }, { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -15773,13 +16100,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResumeCredentialSetupItemBody" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Page of credentials", + "description": "Credential setup resume response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceServerCredentialSerializedPaginatedResponse" + "$ref": "#/components/schemas/StartCredentialSetupItemResponse" } } } @@ -15787,10 +16124,10 @@ } } }, - "/api/v1/team/{team_id}/credential/resource-server/{id}": { - "get": { - "summary": "Get a resource-server credential", - "operationId": "get_resource_server_credential", + "/api/v1/team/{team_id}/credential/setup-items/{id}/start": { + "post": { + "summary": "Start a credential setup item", + "operationId": "start_credential_setup_item", "parameters": [ { "name": "team_id", @@ -15818,22 +16155,34 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartCredentialSetupItemBody" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Credential", + "description": "Credential setup start response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceServerCredentialSerialized" + "$ref": "#/components/schemas/StartCredentialSetupItemResponse" } } } } } - }, - "delete": { - "summary": "Delete a resource-server credential", - "operationId": "delete_resource_server_credential", + } + }, + "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/resource-server": { + "post": { + "summary": "Create a resource-server credential", + "operationId": "create_resource_server_credential", "parameters": [ { "name": "team_id", @@ -15844,7 +16193,7 @@ } }, { - "name": "id", + "name": "credential_source_type_id", "in": "path", "required": true, "schema": { @@ -15861,15 +16210,35 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateResourceServerCredentialParamsInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Deleted" + "description": "Created credential", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceServerCredentialSerialized" + } + } + } } } - }, - "patch": { - "summary": "Update a resource-server credential", - "operationId": "update_resource_server_credential", + } + }, + "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/resource-server/encrypt": { + "post": { + "summary": "Encrypt a resource-server credential configuration", + "description": "Field-level encrypts the supplied raw configuration using the credential source's encrypter and the supplied dek_alias.", + "operationId": "encrypt_resource_server_configuration", "parameters": [ { "name": "team_id", @@ -15880,7 +16249,7 @@ } }, { - "name": "id", + "name": "credential_source_type_id", "in": "path", "required": true, "schema": { @@ -15901,7 +16270,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCredentialBody" + "$ref": "#/components/schemas/EncryptCredentialConfigurationParamsInner" } } }, @@ -15909,24 +16278,15 @@ }, "responses": { "200": { - "description": "Updated credential", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceServerCredentialSerialized" - } - } - } + "description": "Encrypted configuration" } } } }, - "/api/v1/team/{team_id}/credential/resource-server/{id}/ownership": { + "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/user-credential": { "post": { - "tags": [ - "managed-credential" - ], - "operationId": "set_rsc_ownership", + "summary": "Create a user credential", + "operationId": "create_user_credential", "parameters": [ { "name": "team_id", @@ -15937,11 +16297,11 @@ } }, { - "name": "id", + "name": "credential_source_type_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -15958,7 +16318,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "$ref": "#/components/schemas/CreateUserCredentialParamsInner" } } }, @@ -15966,11 +16326,11 @@ }, "responses": { "200": { - "description": "", + "description": "Created credential", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/UserCredentialSerialized" } } } @@ -15978,12 +16338,10 @@ } } }, - "/api/v1/team/{team_id}/credential/resource-server/{id}/ownership/grants": { - "get": { - "tags": [ - "managed-credential" - ], - "operationId": "list_rsc_ownership_grants", + "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/user-credential/broker": { + "post": { + "summary": "Start a user-credential brokering flow", + "operationId": "start_user_credential_brokering", "parameters": [ { "name": "team_id", @@ -15994,11 +16352,11 @@ } }, { - "name": "id", + "name": "credential_source_type_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -16011,27 +16369,34 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartBrokeringBodyExternal" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "", + "description": "Brokering response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } + "$ref": "#/components/schemas/UserCredentialBrokeringResponse" } } } } } - }, + } + }, + "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/user-credential/encrypt": { "post": { - "tags": [ - "managed-credential" - ], - "operationId": "add_rsc_ownership_grant", + "summary": "Encrypt a user-credential configuration", + "operationId": "encrypt_user_credential_configuration", "parameters": [ { "name": "team_id", @@ -16042,11 +16407,11 @@ } }, { - "name": "id", + "name": "credential_source_type_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -16063,7 +16428,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + "$ref": "#/components/schemas/EncryptCredentialConfigurationParamsInner" } } }, @@ -16071,11 +16436,58 @@ }, "responses": { "200": { - "description": "", + "description": "Encrypted configuration" + } + } + } + }, + "/api/v1/team/{team_id}/credential/user-credential": { + "get": { + "summary": "List user credentials", + "operationId": "list_user_credentials", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Page of credentials", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/UserCredentialSerializedPaginatedResponse" } } } @@ -16083,12 +16495,53 @@ } } }, - "/api/v1/team/{team_id}/credential/resource-server/{id}/ownership/grants/{principal_type}/{principal_id}": { - "delete": { - "tags": [ - "managed-credential" + "/api/v1/team/{team_id}/credential/user-credential/{id}": { + "get": { + "summary": "Get a user credential", + "operationId": "get_user_credential", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } ], - "operationId": "remove_rsc_ownership_grant", + "responses": { + "200": { + "description": "Credential", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserCredentialSerialized" + } + } + } + } + } + }, + "delete": { + "summary": "Delete a user credential", + "operationId": "delete_user_credential", "parameters": [ { "name": "team_id", @@ -16103,11 +16556,31 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { - "name": "principal_type", + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Deleted" + } + } + }, + "patch": { + "summary": "Update a user credential", + "operationId": "update_user_credential", + "parameters": [ + { + "name": "team_id", "in": "path", "required": true, "schema": { @@ -16115,7 +16588,7 @@ } }, { - "name": "principal_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -16132,19 +16605,36 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCredentialBody" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "" + "description": "Updated credential", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserCredentialSerialized" + } + } + } } } } }, - "/api/v1/team/{team_id}/credential/resource-server/{id}/visibility": { + "/api/v1/team/{team_id}/credential/user-credential/{id}/ownership": { "post": { "tags": [ "managed-credential" ], - "operationId": "set_rsc_visibility", + "operationId": "set_uc_ownership", "parameters": [ { "name": "team_id", @@ -16196,12 +16686,12 @@ } } }, - "/api/v1/team/{team_id}/credential/resource-server/{id}/visibility/grants": { + "/api/v1/team/{team_id}/credential/user-credential/{id}/ownership/grants": { "get": { "tags": [ "managed-credential" ], - "operationId": "list_rsc_visibility_grants", + "operationId": "list_uc_ownership_grants", "parameters": [ { "name": "team_id", @@ -16249,7 +16739,7 @@ "tags": [ "managed-credential" ], - "operationId": "add_rsc_visibility_grant", + "operationId": "add_uc_ownership_grant", "parameters": [ { "name": "team_id", @@ -16301,12 +16791,12 @@ } } }, - "/api/v1/team/{team_id}/credential/resource-server/{id}/visibility/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/credential/user-credential/{id}/ownership/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ "managed-credential" ], - "operationId": "remove_rsc_visibility_grant", + "operationId": "remove_uc_ownership_grant", "parameters": [ { "name": "team_id", @@ -16357,10 +16847,12 @@ } } }, - "/api/v1/team/{team_id}/credential/setup-items": { - "get": { - "summary": "List credential setup items", - "operationId": "list_credential_setup_items", + "/api/v1/team/{team_id}/credential/user-credential/{id}/visibility": { + "post": { + "tags": [ + "managed-credential" + ], + "operationId": "set_uc_visibility", "parameters": [ { "name": "team_id", @@ -16371,38 +16863,11 @@ } }, { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "status", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/CredentialSetupItemStatus" - } - ] + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -16415,13 +16880,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetResourceAccessModeRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Credential setup items", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CredentialSetupItemPaginatedResponse" + "$ref": "#/components/schemas/ResourceAuthorization" } } } @@ -16429,10 +16904,12 @@ } } }, - "/api/v1/team/{team_id}/credential/setup-items/{id}": { + "/api/v1/team/{team_id}/credential/user-credential/{id}/visibility/grants": { "get": { - "summary": "Get a credential setup item", - "operationId": "get_credential_setup_item", + "tags": [ + "managed-credential" + ], + "operationId": "list_uc_visibility_grants", "parameters": [ { "name": "team_id", @@ -16447,7 +16924,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -16462,22 +16939,25 @@ ], "responses": { "200": { - "description": "Credential setup item", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CredentialSetupItem" + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceGrant" + } } } } } } - } - }, - "/api/v1/team/{team_id}/credential/setup-items/{id}/complete": { + }, "post": { - "summary": "Complete a credential setup item", - "operationId": "complete_credential_setup_item", + "tags": [ + "managed-credential" + ], + "operationId": "add_uc_visibility_grant", "parameters": [ { "name": "team_id", @@ -16492,7 +16972,7 @@ "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -16509,7 +16989,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompleteCredentialSetupItemBody" + "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" } } }, @@ -16517,11 +16997,11 @@ }, "responses": { "200": { - "description": "Credential setup completion response", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StartCredentialSetupItemResponse" + "$ref": "#/components/schemas/ResourceGrant" } } } @@ -16529,10 +17009,12 @@ } } }, - "/api/v1/team/{team_id}/credential/setup-items/{id}/resume": { - "post": { - "summary": "Resume a credential setup item", - "operationId": "resume_credential_setup_item", + "/api/v1/team/{team_id}/credential/user-credential/{id}/visibility/grants/{principal_type}/{principal_id}": { + "delete": { + "tags": [ + "managed-credential" + ], + "operationId": "remove_uc_visibility_grant", "parameters": [ { "name": "team_id", @@ -16546,6 +17028,22 @@ "name": "id", "in": "path", "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "principal_type", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "principal_id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -16560,34 +17058,21 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResumeCredentialSetupItemBody" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Credential setup resume response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartCredentialSetupItemResponse" - } - } - } + "description": "" } } } }, - "/api/v1/team/{team_id}/credential/setup-items/{id}/start": { + "/api/v1/team/{team_id}/human-approval": { "post": { - "summary": "Start a credential setup item", - "operationId": "start_credential_setup_item", + "tags": [ + "v1" + ], + "summary": "Create a human approval action", + "description": "Create a human approval action and return a secure approval URL token.", + "operationId": "create_human_approval_action", "parameters": [ { "name": "team_id", @@ -16597,14 +17082,6 @@ "type": "string" } }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -16619,7 +17096,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StartCredentialSetupItemBody" + "$ref": "#/components/schemas/CreateHumanApprovalActionRequestInner" } } }, @@ -16627,66 +17104,41 @@ }, "responses": { "200": { - "description": "Credential setup start response", + "description": "Human approval action created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StartCredentialSetupItemResponse" + "$ref": "#/components/schemas/CreateHumanApprovalActionResponse" } } } - } - } - } - }, - "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/resource-server": { - "post": { - "summary": "Create a resource-server credential", - "operationId": "create_resource_server_credential", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } }, - { - "name": "credential_source_type_id", - "in": "path", - "required": true, - "schema": { - "type": "string" + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateResourceServerCredentialParamsInner" + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } } } }, - "required": true - }, - "responses": { - "200": { - "description": "Created credential", + "500": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceServerCredentialSerialized" + "$ref": "#/components/schemas/Error" } } } @@ -16694,23 +17146,19 @@ } } }, - "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/resource-server/encrypt": { + "/api/v1/team/{team_id}/identity/oauth/register": { "post": { - "summary": "Encrypt a resource-server credential configuration", - "description": "Field-level encrypts the supplied raw configuration using the credential source's encrypter and the supplied dek_alias.", - "operationId": "encrypt_resource_server_configuration", + "tags": [ + "identity" + ], + "summary": "Register team-scoped OAuth client", + "description": "Register a public PKCE OAuth client through Dynamic Client Registration. This endpoint is intentionally scoped by an org subdomain and /team/{team_id} path so MCP clients do not need Tilde-specific registration fields.", + "operationId": "register_team_oauth_client", "parameters": [ { "name": "team_id", "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "credential_source_type_id", - "in": "path", + "description": "Tilde team ID", "required": true, "schema": { "type": "string" @@ -16730,35 +17178,64 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EncryptCredentialConfigurationParamsInner" + "$ref": "#/components/schemas/RegisterOAuthClientRequest" } } }, "required": true }, "responses": { - "200": { - "description": "Encrypted configuration" + "201": { + "description": "OAuth client registered", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterOAuthClientResponse" + } + } + } + }, + "400": { + "description": "Invalid registration request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } + }, + "security": [ + {} + ] } }, - "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/user-credential": { + "/api/v1/team/{team_id}/identity/openbot/chatkit-realtime-ticket": { "post": { - "summary": "Create a user credential", - "operationId": "create_user_credential", + "tags": [ + "identity", + "chatkit", + "v1" + ], + "summary": "Issue an OpenBot ChatKit realtime socket ticket", + "description": "Exchanges an installation-audience OpenBot bearer token for a 60-second credential accepted only by the requested team's ChatKit realtime WebSocket. Present it as the `tilde.chatkit-realtime.ticket.` WebSocket subprotocol; the long-lived access token never enters a URL or browser JavaScript.", + "operationId": "issue_openbot_chatkit_realtime_ticket", "parameters": [ { "name": "team_id", "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "credential_source_type_id", - "in": "path", + "description": "Tilde team ID", "required": true, "schema": { "type": "string" @@ -16778,7 +17255,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateUserCredentialParamsInner" + "$ref": "#/components/schemas/IssueChatKitRealtimeSocketTicketRequest" } } }, @@ -16786,34 +17263,57 @@ }, "responses": { "200": { - "description": "Created credential", + "description": "Short-lived ChatKit realtime socket ticket", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserCredentialSerialized" + "$ref": "#/components/schemas/ChatKitRealtimeSocketTicket" + } + } + } + }, + "401": { + "description": "Invalid OpenBot access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Token is not bound to this team", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/user-credential/broker": { - "post": { - "summary": "Start a user-credential brokering flow", - "operationId": "start_user_credential_brokering", + "/api/v1/team/{team_id}/identity/openbot/deployments": { + "get": { + "tags": [ + "identity", + "v1" + ], + "summary": "List OpenBot deployments", + "description": "Lists OpenBot OAuth registrations owned by the selected Tilde team.", + "operationId": "list_openbot_deployments", "parameters": [ { "name": "team_id", "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "credential_source_type_id", - "in": "path", + "description": "Tilde team ID", "required": true, "schema": { "type": "string" @@ -16829,46 +17329,60 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartBrokeringBodyExternal" + "responses": { + "200": { + "description": "OpenBot deployments", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListOpenBotDeploymentsResponse" + } } } }, - "required": true - }, - "responses": { - "200": { - "description": "Brokering response", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserCredentialBrokeringResponse" + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Not a team member", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - } - }, - "/api/v1/team/{team_id}/credential/source/{credential_source_type_id}/user-credential/encrypt": { + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + }, "post": { - "summary": "Encrypt a user-credential configuration", - "operationId": "encrypt_user_credential_configuration", + "tags": [ + "identity", + "v1" + ], + "summary": "Register an OpenBot deployment", + "description": "Creates or reconciles a public PKCE OAuth client for an OpenBot deployment owned by the selected Tilde team.", + "operationId": "register_openbot_deployment", "parameters": [ { "name": "team_id", "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "credential_source_type_id", - "in": "path", + "description": "Tilde team ID", "required": true, "schema": { "type": "string" @@ -16888,7 +17402,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EncryptCredentialConfigurationParamsInner" + "$ref": "#/components/schemas/RegisterOpenBotDeploymentRequest" } } }, @@ -16896,15 +17410,55 @@ }, "responses": { "200": { - "description": "Encrypted configuration" + "description": "OpenBot deployment registered", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenBotDeployment" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Not a team member", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/credential/user-credential": { + "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}": { "get": { - "summary": "List user credentials", - "operationId": "list_user_credentials", + "tags": [ + "identity", + "v1" + ], + "summary": "Get a hosted OpenBot instance", + "description": "Returns the server-owned canonical Vercel runtime project, Sandbox, image, hostname, and lifecycle state for one team-isolated OpenBot instance. Pre-consolidation instances have no runtime project and retain their readable deprecated split control and agent project fields.", + "operationId": "get_hosted_openbot_instance", "parameters": [ { "name": "team_id", @@ -16915,18 +17469,9 @@ } }, { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, + "name": "instance_id", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -16943,22 +17488,45 @@ ], "responses": { "200": { - "description": "Page of credentials", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserCredentialSerializedPaginatedResponse" + "$ref": "#/components/schemas/HostedOpenBotInstance" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/credential/user-credential/{id}": { - "get": { - "summary": "Get a user credential", - "operationId": "get_user_credential", + "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/computer-image": { + "put": { + "tags": [ + "identity", + "v1" + ], + "summary": "Set the hosted OpenBot computer image", + "description": "Records an immutable VCR digest owned by this instance's canonical runtime project, or by its legacy control project for a pre-consolidation instance, for subsequent OIDC-authenticated Sandbox creation.", + "operationId": "update_hosted_openbot_computer_image", "parameters": [ { "name": "team_id", @@ -16969,7 +17537,7 @@ } }, { - "name": "id", + "name": "instance_id", "in": "path", "required": true, "schema": { @@ -16986,58 +17554,57 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHostedOpenBotComputerImageRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Credential", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserCredentialSerialized" + "$ref": "#/components/schemas/HostedOpenBotInstance" } } } - } - } - }, - "delete": { - "summary": "Delete a user credential", - "operationId": "delete_user_credential", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } + } + }, + "security": [ + { + "api_key": [] }, { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } + "bearer_token": [] } + ] + } + }, + "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/configuration": { + "put": { + "tags": [ + "identity", + "v1" ], - "responses": { - "200": { - "description": "Deleted" - } - } - }, - "patch": { - "summary": "Update a user credential", - "operationId": "update_user_credential", + "summary": "Configure a hosted OpenBot instance", + "description": "Installs allowlisted user-owned OpenBot runtime values into the instance's canonical runtime project and derives VERCEL_RUNTIME_PROJECT server-side. Pre-consolidation instances continue to receive values in both existing split projects. Tenant, OAuth, Computer, and platform identity are derived from authenticated server state.", + "operationId": "configure_hosted_openbot_instance", "parameters": [ { "name": "team_id", @@ -17048,7 +17615,7 @@ } }, { - "name": "id", + "name": "instance_id", "in": "path", "required": true, "schema": { @@ -17069,7 +17636,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCredentialBody" + "$ref": "#/components/schemas/ConfigureHostedOpenBotInstanceRequest" } } }, @@ -17077,24 +17644,45 @@ }, "responses": { "200": { - "description": "Updated credential", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserCredentialSerialized" + "$ref": "#/components/schemas/HostedOpenBotInstance" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/credential/user-credential/{id}/ownership": { + "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases": { "post": { "tags": [ - "managed-credential" + "identity", + "v1" ], - "operationId": "set_uc_ownership", + "summary": "Create a hosted OpenBot release", + "description": "Creates an uploading content-addressed Build Output API release. Consolidated instances require service=runtime and deploy the combined web, control, and agent artifact to the canonical runtime project. Pre-consolidation instances continue to accept the deprecated control and agents services.", + "operationId": "create_hosted_openbot_release", "parameters": [ { "name": "team_id", @@ -17105,11 +17693,11 @@ } }, { - "name": "id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -17126,7 +17714,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "$ref": "#/components/schemas/CreateHostedOpenBotReleaseRequest" } } }, @@ -17138,20 +17726,41 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/HostedOpenBotRelease" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/credential/user-credential/{id}/ownership/grants": { + "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases/{release_id}": { "get": { "tags": [ - "managed-credential" + "identity", + "v1" ], - "operationId": "list_uc_ownership_grants", + "summary": "Get a hosted OpenBot release", + "description": "Returns upload and deployment status, refreshing an in-progress deployment from Vercel when necessary.", + "operationId": "get_hosted_openbot_release", "parameters": [ { "name": "team_id", @@ -17162,11 +17771,19 @@ } }, { - "name": "id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" + } + }, + { + "name": "release_id", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, { @@ -17185,21 +17802,41 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } + "$ref": "#/components/schemas/HostedOpenBotRelease" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } - }, - "post": { + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + } + }, + "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases/{release_id}/files/{sha1}": { + "put": { "tags": [ - "managed-credential" + "identity", + "v1" ], - "operationId": "add_uc_ownership_grant", + "summary": "Upload a hosted OpenBot release file", + "description": "Validates one declared digest and size, then streams the bytes to Vercel's content-addressed deployment file API without exposing the platform token.", + "operationId": "upload_hosted_openbot_release_file", "parameters": [ { "name": "team_id", @@ -17210,11 +17847,27 @@ } }, { - "name": "id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" + } + }, + { + "name": "release_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sha1", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, { @@ -17229,9 +17882,14 @@ ], "requestBody": { "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + "type": "array", + "items": { + "type": "integer", + "format": "int32", + "minimum": 0 + } } } }, @@ -17243,20 +17901,41 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/HostedOpenBotRelease" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/credential/user-credential/{id}/ownership/grants/{principal_type}/{principal_id}": { - "delete": { + "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases/{release_id}/finalize": { + "post": { "tags": [ - "managed-credential" + "identity", + "v1" ], - "operationId": "remove_uc_ownership_grant", + "summary": "Finalize a hosted OpenBot release", + "description": "Requires every manifest file to be uploaded, derives the canonical runtime project or legacy service-specific project server-side, and idempotently creates its production deployment.", + "operationId": "finalize_hosted_openbot_release", "parameters": [ { "name": "team_id", @@ -17267,15 +17946,15 @@ } }, { - "name": "id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { - "name": "principal_type", + "name": "release_id", "in": "path", "required": true, "schema": { @@ -17283,13 +17962,81 @@ } }, { - "name": "principal_id", + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostedOpenBotRelease" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + } + }, + "/api/v1/team/{team_id}/managed-user-credential": { + "get": { + "summary": "List typed managed user credentials", + "description": "Lists typed user-owned credentials with redacted summaries only.", + "operationId": "list_managed_user_credentials", + "parameters": [ + { + "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, { "name": "team_id", "in": "path", @@ -17302,17 +18049,23 @@ ], "responses": { "200": { - "description": "" + "description": "Managed user credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManagedUserCredentialSummaryPaginatedResponse" + } + } + } } } } }, - "/api/v1/team/{team_id}/credential/user-credential/{id}/visibility": { + "/api/v1/team/{team_id}/managed-user-credential/type/{type_id}": { "post": { - "tags": [ - "managed-credential" - ], - "operationId": "set_uc_visibility", + "summary": "Create a typed managed user credential", + "description": "Creates a typed user-owned credential from plaintext secretValue and stores encrypted fields at rest.", + "operationId": "create_managed_user_credential", "parameters": [ { "name": "team_id", @@ -17323,11 +18076,11 @@ } }, { - "name": "id", + "name": "type_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -17344,7 +18097,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "$ref": "#/components/schemas/CreateManagedUserCredentialBody" } } }, @@ -17352,11 +18105,11 @@ }, "responses": { "200": { - "description": "", + "description": "Created managed user credential", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/ManagedUserCredentialSummary" } } } @@ -17364,12 +18117,11 @@ } } }, - "/api/v1/team/{team_id}/credential/user-credential/{id}/visibility/grants": { + "/api/v1/team/{team_id}/managed-user-credential/type/{type_id}/{id}": { "get": { - "tags": [ - "managed-credential" - ], - "operationId": "list_uc_visibility_grants", + "summary": "Get encrypted typed managed user credential secret", + "description": "Returns the decrypted credential secret re-encrypted to the requesting trusted runtime.", + "operationId": "get_managed_user_credential_secret", "parameters": [ { "name": "team_id", @@ -17379,6 +18131,14 @@ "type": "string" } }, + { + "name": "type_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "id", "in": "path", @@ -17387,6 +18147,18 @@ "$ref": "#/components/schemas/WrappedUuidV4" } }, + { + "name": "totp_at_unix_seconds", + "in": "query", + "required": false, + "schema": { + "type": [ + "integer", + "null" + ], + "format": "int64" + } + }, { "name": "team_id", "in": "path", @@ -17399,25 +18171,21 @@ ], "responses": { "200": { - "description": "", + "description": "Encrypted secret", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } + "$ref": "#/components/schemas/ManagedUserCredentialSecretResponse" } } } } } }, - "post": { - "tags": [ - "managed-credential" - ], - "operationId": "add_uc_visibility_grant", + "put": { + "summary": "Update a typed managed user credential", + "description": "Replaces a typed user-owned credential and stores encrypted fields at rest.", + "operationId": "update_managed_user_credential", "parameters": [ { "name": "team_id", @@ -17427,6 +18195,14 @@ "type": "string" } }, + { + "name": "type_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "id", "in": "path", @@ -17449,7 +18225,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + "$ref": "#/components/schemas/UpdateManagedUserCredentialBody" } } }, @@ -17457,11 +18233,11 @@ }, "responses": { "200": { - "description": "", + "description": "Updated managed user credential", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/ManagedUserCredentialSummary" } } } @@ -17469,12 +18245,11 @@ } } }, - "/api/v1/team/{team_id}/credential/user-credential/{id}/visibility/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/managed-user-credential/{id}": { "delete": { - "tags": [ - "managed-credential" - ], - "operationId": "remove_uc_visibility_grant", + "summary": "Delete a typed managed user credential", + "description": "Deletes a typed user-owned credential.", + "operationId": "delete_managed_user_credential", "parameters": [ { "name": "team_id", @@ -17492,22 +18267,6 @@ "$ref": "#/components/schemas/WrappedUuidV4" } }, - { - "name": "principal_type", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "principal_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -17520,28 +18279,67 @@ ], "responses": { "200": { - "description": "" + "description": "Deleted managed user credential" } } } }, - "/api/v1/team/{team_id}/human-approval": { - "post": { + "/api/v1/team/{team_id}/mcp/available-tool-groups": { + "get": { "tags": [ + "mcp", "v1" ], - "summary": "Create a human approval action", - "description": "Create a human approval action and return a secure approval URL token.", - "operationId": "create_human_approval_action", + "summary": "List tool groups", + "description": "List all available tool group types that can be instantiated, filtered by deployment alias", + "operationId": "list-available-tool-groups", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, + { + "name": "page_size", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "deployment_alias", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "include_global", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { "name": "team_id", "in": "path", @@ -17552,29 +18350,19 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateHumanApprovalActionRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Human approval action created", + "description": "List available tool groups", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateHumanApprovalActionResponse" + "$ref": "#/components/schemas/ToolGroupSourceSerializedPaginatedResponse" } } } }, "400": { - "description": "", + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -17584,7 +18372,17 @@ } }, "401": { - "description": "", + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -17594,7 +18392,7 @@ } }, "500": { - "description": "", + "description": "Internal Server Error", "content": { "application/json": { "schema": { @@ -17603,22 +18401,47 @@ } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/identity/oauth/register": { + "/api/v1/team/{team_id}/mcp/available-tool-groups/{tool_group_source_type_id}/available-credentials/{credential_source_type_id}": { "post": { "tags": [ - "identity" + "mcp", + "v1" ], - "summary": "Register team-scoped OAuth client", - "description": "Register a public PKCE OAuth client through Dynamic Client Registration. This endpoint is intentionally scoped by an org subdomain and /team/{team_id} path so MCP clients do not need Tilde-specific registration fields.", - "operationId": "register_team_oauth_client", + "summary": "Create tool group", + "description": "Create a new tool group instance with the specified configuration", + "operationId": "create-tool-group-instance", "parameters": [ { "name": "team_id", "in": "path", - "description": "Tilde team ID", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tool_group_source_type_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "credential_source_type_id", + "in": "path", "required": true, "schema": { "type": "string" @@ -17638,25 +18461,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisterOAuthClientRequest" + "$ref": "#/components/schemas/CreateToolGroupInstanceParamsInner" } } }, "required": true }, "responses": { - "201": { - "description": "OAuth client registered", + "200": { + "description": "Create tool group instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisterOAuthClientResponse" + "$ref": "#/components/schemas/ToolGroupInstanceSerialized" } } } }, "400": { - "description": "Invalid registration request", + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -17666,7 +18509,7 @@ } }, "500": { - "description": "Internal server error", + "description": "Internal Server Error", "content": { "application/json": { "schema": { @@ -17677,25 +18520,45 @@ } }, "security": [ - {} + { + "api_key": [] + }, + { + "bearer_token": [] + } ] } }, - "/api/v1/team/{team_id}/identity/openbot/chatkit-realtime-ticket": { + "/api/v1/team/{team_id}/mcp/available-tool-groups/{tool_group_source_type_id}/available-credentials/{credential_source_type_id}/auto-provision": { "post": { "tags": [ - "identity", - "chatkit", + "mcp", "v1" ], - "summary": "Issue an OpenBot ChatKit realtime socket ticket", - "description": "Exchanges an installation-audience OpenBot bearer token for a 60-second credential accepted only by the requested team's ChatKit realtime WebSocket. Present it as the `tilde.chatkit-realtime.ticket.` WebSocket subprotocol; the long-lived access token never enters a URL or browser JavaScript.", - "operationId": "issue_openbot_chatkit_realtime_ticket", + "summary": "Auto-provision tool group", + "description": "Provision an upstream provider app, create the tool group instance, and start credential brokering when required.", + "operationId": "auto-provision-tool-group-instance", "parameters": [ { "name": "team_id", "in": "path", - "description": "Tilde team ID", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tool_group_source_type_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "credential_source_type_id", + "in": "path", "required": true, "schema": { "type": "string" @@ -17715,7 +18578,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IssueChatKitRealtimeSocketTicketRequest" + "$ref": "#/components/schemas/AutoProvisionToolGroupInstanceParamsInner" } } }, @@ -17723,17 +18586,27 @@ }, "responses": { "200": { - "description": "Short-lived ChatKit realtime socket ticket", + "description": "Auto-provision tool group instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChatKitRealtimeSocketTicket" + "$ref": "#/components/schemas/AutoProvisionToolGroupInstanceResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } }, "401": { - "description": "Invalid OpenBot access token", + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -17743,7 +18616,7 @@ } }, "403": { - "description": "Token is not bound to this team", + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -17751,34 +18624,66 @@ } } } - } - }, - "security": [ - { - "bearer_token": [] + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] } ] } }, - "/api/v1/team/{team_id}/identity/openbot/deployments": { + "/api/v1/team/{team_id}/mcp/custom-tool-providers": { "get": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "List OpenBot deployments", - "description": "Lists OpenBot OAuth registrations owned by the selected Tilde team.", - "operationId": "list_openbot_deployments", + "summary": "List custom tool providers", + "description": "List custom HTTP tool providers for a team", + "operationId": "list-custom-tool-providers", "parameters": [ { "name": "team_id", "in": "path", - "description": "Tilde team ID", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, + { + "name": "page_size", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, { "name": "team_id", "in": "path", @@ -17791,31 +18696,11 @@ ], "responses": { "200": { - "description": "OpenBot deployments", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListOpenBotDeploymentsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Not a team member", + "description": "List custom tool providers", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CustomToolProviderListItemPaginatedResponse" } } } @@ -17832,17 +18717,17 @@ }, "post": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Register an OpenBot deployment", - "description": "Creates or reconciles a public PKCE OAuth client for an OpenBot deployment owned by the selected Tilde team.", - "operationId": "register_openbot_deployment", + "summary": "Create custom tool provider", + "description": "Create a custom HTTP tool provider from its discovery manifest", + "operationId": "create-custom-tool-provider", "parameters": [ { "name": "team_id", "in": "path", - "description": "Tilde team ID", + "description": "Team ID", "required": true, "schema": { "type": "string" @@ -17862,7 +18747,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisterOpenBotDeploymentRequest" + "$ref": "#/components/schemas/CreateCustomToolProviderRequestInner" } } }, @@ -17870,31 +18755,11 @@ }, "responses": { "200": { - "description": "OpenBot deployment registered", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenBotDeployment" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Not a team member", + "description": "Create custom tool provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CreateCustomToolProviderResponse" } } } @@ -17910,27 +18775,29 @@ ] } }, - "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}": { + "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}": { "get": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Get a hosted OpenBot instance", - "description": "Returns the server-owned canonical Vercel runtime project, Sandbox, image, hostname, and lifecycle state for one team-isolated OpenBot instance. Pre-consolidation instances have no runtime project and retain their readable deprecated split control and agent project fields.", - "operationId": "get_hosted_openbot_instance", + "summary": "Get custom tool provider", + "description": "Get a custom HTTP tool provider", + "operationId": "get-custom-tool-provider", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -17948,21 +18815,11 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HostedOpenBotInstance" - } - } - } - }, - "404": { - "description": "", + "description": "Get custom tool provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CustomToolProviderDetails" } } } @@ -17976,29 +18833,29 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/computer-image": { - "put": { + }, + "delete": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Set the hosted OpenBot computer image", - "description": "Records an immutable VCR digest owned by this instance's canonical runtime project, or by its legacy control project for a pre-consolidation instance, for subsequent OIDC-authenticated Sandbox creation.", - "operationId": "update_hosted_openbot_computer_image", + "summary": "Delete custom tool provider", + "description": "Delete a custom HTTP tool provider", + "operationId": "delete-custom-tool-provider", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -18014,36 +18871,9 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateHostedOpenBotComputerImageRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HostedOpenBotInstance" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "description": "Delete custom tool provider" } }, "security": [ @@ -18054,29 +18884,29 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/configuration": { - "put": { + }, + "patch": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Configure a hosted OpenBot instance", - "description": "Installs allowlisted user-owned OpenBot runtime values into the instance's canonical runtime project and derives VERCEL_RUNTIME_PROJECT server-side. Pre-consolidation instances continue to receive values in both existing split projects. Tenant, OAuth, Computer, and platform identity are derived from authenticated server state.", - "operationId": "configure_hosted_openbot_instance", + "summary": "Update custom tool provider", + "description": "Update and rediscover a custom HTTP tool provider", + "operationId": "update-custom-tool-provider", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -18096,7 +18926,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConfigureHostedOpenBotInstanceRequest" + "$ref": "#/components/schemas/UpdateCustomToolProviderRequestInner" } } }, @@ -18104,21 +18934,11 @@ }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HostedOpenBotInstance" - } - } - } - }, - "400": { - "description": "", + "description": "Update custom tool provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CustomToolProviderDetails" } } } @@ -18134,27 +18954,29 @@ ] } }, - "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases": { + "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/disable": { "post": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Create a hosted OpenBot release", - "description": "Creates an uploading content-addressed Build Output API release. Consolidated instances require service=runtime and deploy the combined web, control, and agent artifact to the canonical runtime project. Pre-consolidation instances continue to accept the deprecated control and agents services.", - "operationId": "create_hosted_openbot_release", + "summary": "Disable custom tool provider", + "description": "Disable a custom HTTP tool provider", + "operationId": "disable-custom-tool-provider", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -18170,33 +18992,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateHostedOpenBotReleaseRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HostedOpenBotRelease" - } - } - } - }, - "400": { - "description": "", + "description": "Disable custom tool provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CustomToolProviderDetails" } } } @@ -18212,35 +19014,29 @@ ] } }, - "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases/{release_id}": { - "get": { + "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/enable": { + "post": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Get a hosted OpenBot release", - "description": "Returns upload and deployment status, refreshing an in-progress deployment from Vercel when necessary.", - "operationId": "get_hosted_openbot_release", + "summary": "Enable custom tool provider", + "description": "Enable a custom HTTP tool provider", + "operationId": "enable-custom-tool-provider", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "release_id", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -18258,21 +19054,11 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HostedOpenBotRelease" - } - } - } - }, - "404": { - "description": "", + "description": "Enable custom tool provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CustomToolProviderDetails" } } } @@ -18288,43 +19074,29 @@ ] } }, - "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases/{release_id}/files/{sha1}": { - "put": { + "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/refresh": { + "post": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Upload a hosted OpenBot release file", - "description": "Validates one declared digest and size, then streams the bytes to Vercel's content-addressed deployment file API without exposing the platform token.", - "operationId": "upload_hosted_openbot_release_file", + "summary": "Refresh custom tool provider", + "description": "Rediscover custom HTTP tool provider tools", + "operationId": "refresh-custom-tool-provider", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "release_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "sha1", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -18340,38 +19112,13 @@ } } ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32", - "minimum": 0 - } - } - } - }, - "required": true - }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HostedOpenBotRelease" - } - } - } - }, - "400": { - "description": "", + "description": "Refresh custom tool provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/RefreshCustomToolProviderResponse" } } } @@ -18387,35 +19134,29 @@ ] } }, - "/api/v1/team/{team_id}/identity/openbot/instances/{instance_id}/releases/{release_id}/finalize": { + "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/rotate-signing-secret": { "post": { "tags": [ - "identity", + "mcp", "v1" ], - "summary": "Finalize a hosted OpenBot release", - "description": "Requires every manifest file to be uploaded, derives the canonical runtime project or legacy service-specific project server-side, and idempotently creates its production deployment.", - "operationId": "finalize_hosted_openbot_release", + "summary": "Rotate custom tool provider signing key", + "description": "Rotate the shared webhook signing key for a custom HTTP tool provider", + "operationId": "rotate-custom-tool-provider-signing-key", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "release_id", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -18433,21 +19174,11 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HostedOpenBotRelease" - } - } - } - }, - "400": { - "description": "", + "description": "Rotate custom tool provider signing key", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/RotateCustomToolProviderSigningKeyResponse" } } } @@ -18463,40 +19194,16 @@ ] } }, - "/api/v1/team/{team_id}/managed-user-credential": { - "get": { - "summary": "List typed managed user credentials", - "description": "Lists typed user-owned credentials with redacted summaries only.", - "operationId": "list_managed_user_credentials", + "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/tools/{tool_source_type_id}/invoke": { + "post": { + "tags": [ + "mcp", + "v1" + ], + "summary": "Invoke custom tool", + "description": "Invoke a custom HTTP tool provider tool directly", + "operationId": "invoke-custom-tool", "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, { "name": "team_id", "in": "path", @@ -18505,39 +19212,20 @@ "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "Managed user credentials", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManagedUserCredentialSummaryPaginatedResponse" - } - } - } - } - } - } - }, - "/api/v1/team/{team_id}/managed-user-credential/type/{type_id}": { - "post": { - "summary": "Create a typed managed user credential", - "description": "Creates a typed user-owned credential from plaintext secretValue and stores encrypted fields at rest.", - "operationId": "create_managed_user_credential", - "parameters": [ + }, { - "name": "team_id", + "name": "tool_group_instance_id", "in": "path", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" } }, { - "name": "type_id", + "name": "tool_source_type_id", "in": "path", + "description": "Tool source type ID", "required": true, "schema": { "type": "string" @@ -18557,7 +19245,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateManagedUserCredentialBody" + "$ref": "#/components/schemas/InvokeCustomToolRequestInner" } } }, @@ -18565,238 +19253,79 @@ }, "responses": { "200": { - "description": "Created managed user credential", + "description": "Invoke custom tool", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ManagedUserCredentialSummary" + "$ref": "#/components/schemas/InvokeResult" } } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/managed-user-credential/type/{type_id}/{id}": { + "/api/v1/team/{team_id}/mcp/mcp-server": { "get": { - "summary": "Get encrypted typed managed user credential secret", - "description": "Returns the decrypted credential secret re-encrypted to the requesting trusted runtime.", - "operationId": "get_managed_user_credential_secret", + "tags": [ + "mcp", + "v1" + ], + "summary": "List MCP server instances", + "description": "List all MCP server instances with pagination", + "operationId": "list-mcp-server-instances", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "type_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "id", - "in": "path", + "name": "page_size", + "in": "query", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } + "type": "integer", + "format": "int64" + }, + "style": "form" }, { - "name": "totp_at_unix_seconds", + "name": "next_page_token", "in": "query", "required": false, - "schema": { - "type": [ - "integer", - "null" - ], - "format": "int64" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Encrypted secret", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManagedUserCredentialSecretResponse" - } - } - } - } - } - }, - "put": { - "summary": "Update a typed managed user credential", - "description": "Replaces a typed user-owned credential and stores encrypted fields at rest.", - "operationId": "update_managed_user_credential", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateManagedUserCredentialBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Updated managed user credential", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManagedUserCredentialSummary" - } - } - } - } - } - } - }, - "/api/v1/team/{team_id}/managed-user-credential/{id}": { - "delete": { - "summary": "Delete a typed managed user credential", - "description": "Deletes a typed user-owned credential.", - "operationId": "delete_managed_user_credential", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Deleted managed user credential" - } - } - } - }, - "/api/v1/team/{team_id}/mcp/available-tool-groups": { - "get": { - "tags": [ - "mcp", - "v1" - ], - "summary": "List tool groups", - "description": "List all available tool group types that can be instantiated, filtered by deployment alias", - "operationId": "list-available-tool-groups", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, "schema": { "type": "string" - } - }, - { - "name": "page_size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" }, "style": "form" }, { - "name": "next_page_token", + "name": "include_global", "in": "query", "required": false, "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "deployment_alias", - "in": "query", - "required": true, - "schema": { - "type": "string" + "type": "boolean" }, "style": "form" }, { - "name": "include_global", + "name": "agent_id", "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "string" }, "style": "form" }, @@ -18812,21 +19341,11 @@ ], "responses": { "200": { - "description": "List available tool groups", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolGroupSourceSerializedPaginatedResponse" - } - } - } - }, - "400": { - "description": "Bad Request", + "description": "List MCP server instances", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctionsPaginatedResponse" } } } @@ -18870,17 +19389,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/mcp/available-tool-groups/{tool_group_source_type_id}/available-credentials/{credential_source_type_id}": { + }, "post": { "tags": [ "mcp", "v1" ], - "summary": "Create tool group", - "description": "Create a new tool group instance with the specified configuration", - "operationId": "create-tool-group-instance", + "summary": "Create MCP server instance", + "description": "Create a new MCP server instance with a user-provided ID", + "operationId": "create-mcp-server-instance", "parameters": [ { "name": "team_id", @@ -18891,22 +19408,6 @@ "type": "string" } }, - { - "name": "tool_group_source_type_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "credential_source_type_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -18921,7 +19422,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateToolGroupInstanceParamsInner" + "$ref": "#/components/schemas/CreateMcpServerInstanceRequestInner" } } }, @@ -18929,11 +19430,11 @@ }, "responses": { "200": { - "description": "Create tool group instance", + "description": "Create MCP server instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolGroupInstanceSerialized" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" } } } @@ -18989,15 +19490,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/available-tool-groups/{tool_group_source_type_id}/available-credentials/{credential_source_type_id}/auto-provision": { - "post": { + "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}": { + "get": { "tags": [ "mcp", "v1" ], - "summary": "Auto-provision tool group", - "description": "Provision an upstream provider app, create the tool group instance, and start credential brokering when required.", - "operationId": "auto-provision-tool-group-instance", + "summary": "Get MCP server instance", + "description": "Retrieve an MCP server instance by its ID", + "operationId": "get-mcp-server-instance", "parameters": [ { "name": "team_id", @@ -19009,16 +19510,9 @@ } }, { - "name": "tool_group_source_type_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "credential_source_type_id", + "name": "mcp_server_instance_id", "in": "path", + "description": "MCP server instance ID", "required": true, "schema": { "type": "string" @@ -19034,29 +19528,19 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AutoProvisionToolGroupInstanceParamsInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Auto-provision tool group instance", + "description": "Get MCP server instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AutoProvisionToolGroupInstanceResponse" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" } } } }, - "400": { - "description": "Bad Request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -19065,8 +19549,8 @@ } } }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -19075,8 +19559,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -19104,17 +19588,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/mcp/custom-tool-providers": { - "get": { + }, + "delete": { "tags": [ "mcp", "v1" ], - "summary": "List custom tool providers", - "description": "List custom HTTP tool providers for a team", - "operationId": "list-custom-tool-providers", + "summary": "Delete MCP server instance", + "description": "Delete an MCP server instance and all its tool mappings", + "operationId": "delete-mcp-server-instance", "parameters": [ { "name": "team_id", @@ -19126,23 +19608,13 @@ } }, { - "name": "page_size", - "in": "query", + "name": "mcp_server_instance_id", + "in": "path", + "description": "MCP server instance ID", "required": true, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, "schema": { "type": "string" - }, - "style": "form" + } }, { "name": "team_id", @@ -19156,11 +19628,44 @@ ], "responses": { "200": { - "description": "List custom tool providers", + "description": "Delete MCP server instance" + }, + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomToolProviderListItemPaginatedResponse" + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19175,14 +19680,14 @@ } ] }, - "post": { + "patch": { "tags": [ "mcp", "v1" ], - "summary": "Create custom tool provider", - "description": "Create a custom HTTP tool provider from its discovery manifest", - "operationId": "create-custom-tool-provider", + "summary": "Update MCP server instance", + "description": "Update an MCP server instance name", + "operationId": "update-mcp-server-instance", "parameters": [ { "name": "team_id", @@ -19193,6 +19698,15 @@ "type": "string" } }, + { + "name": "mcp_server_instance_id", + "in": "path", + "description": "MCP server instance ID", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "team_id", "in": "path", @@ -19207,7 +19721,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateCustomToolProviderRequestInner" + "$ref": "#/components/schemas/UpdateMcpServerInstanceBody" } } }, @@ -19215,11 +19729,51 @@ }, "responses": { "200": { - "description": "Create custom tool provider", + "description": "Update MCP server instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateCustomToolProviderResponse" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19235,15 +19789,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}": { - "get": { + "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/function": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "Get custom tool provider", - "description": "Get a custom HTTP tool provider", - "operationId": "get-custom-tool-provider", + "summary": "Add function to MCP server instance", + "description": "Add a tool mapping to an MCP server instance with a custom name", + "operationId": "add-mcp-server-instance-function", "parameters": [ { "name": "team_id", @@ -19255,9 +19809,9 @@ } }, { - "name": "tool_group_instance_id", + "name": "mcp_server_instance_id", "in": "path", - "description": "Tool group instance ID", + "description": "MCP server instance ID", "required": true, "schema": { "type": "string" @@ -19273,13 +19827,83 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddMcpServerInstanceFunctionBody" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Get custom tool provider", + "description": "Add function to MCP server instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomToolProviderDetails" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict (tool name already exists)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19293,15 +19917,17 @@ "bearer_token": [] } ] - }, + } + }, + "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/function/{tool_deployment_type_id}/{tool_group_deployment_type_id}/{tool_group_instance_id}": { "delete": { "tags": [ "mcp", "v1" ], - "summary": "Delete custom tool provider", - "description": "Delete a custom HTTP tool provider", - "operationId": "delete-custom-tool-provider", + "summary": "Remove tool from MCP server instance", + "description": "Remove a tool mapping from an MCP server instance", + "operationId": "remove-mcp-server-instance-function", "parameters": [ { "name": "team_id", @@ -19313,51 +19939,27 @@ } }, { - "name": "tool_group_instance_id", + "name": "mcp_server_instance_id", "in": "path", - "description": "Tool group instance ID", + "description": "MCP server instance ID", "required": true, "schema": { "type": "string" } }, { - "name": "team_id", + "name": "tool_deployment_type_id", "in": "path", - "description": "Team ID", + "description": "Tool source type ID", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "Delete custom tool provider" - } - }, - "security": [ - { - "api_key": [] }, { - "bearer_token": [] - } - ] - }, - "patch": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Update custom tool provider", - "description": "Update and rediscover a custom HTTP tool provider", - "operationId": "update-custom-tool-provider", - "parameters": [ - { - "name": "team_id", + "name": "tool_group_deployment_type_id", "in": "path", - "description": "Team ID", + "description": "Tool group source type ID", "required": true, "schema": { "type": "string" @@ -19382,83 +19984,53 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateCustomToolProviderRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Update custom tool provider", + "description": "Remove tool from MCP server instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomToolProviderDetails" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" } } } - } - }, - "security": [ - { - "api_key": [] }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/disable": { - "post": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Disable custom tool provider", - "description": "Disable a custom HTTP tool provider", - "operationId": "disable-custom-tool-provider", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } - } - ], - "responses": { - "200": { - "description": "Disable custom tool provider", + }, + "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomToolProviderDetails" + "$ref": "#/components/schemas/Error" } } } @@ -19472,17 +20044,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/enable": { - "post": { + }, + "patch": { "tags": [ "mcp", "v1" ], - "summary": "Enable custom tool provider", - "description": "Enable a custom HTTP tool provider", - "operationId": "enable-custom-tool-provider", + "summary": "Update tool in MCP server instance", + "description": "Update the tool name and description for a tool mapping", + "operationId": "update-mcp-server-instance-function", "parameters": [ { "name": "team_id", @@ -19494,60 +20064,27 @@ } }, { - "name": "tool_group_instance_id", + "name": "mcp_server_instance_id", "in": "path", - "description": "Tool group instance ID", + "description": "MCP server instance ID", "required": true, "schema": { "type": "string" } }, { - "name": "team_id", + "name": "tool_deployment_type_id", "in": "path", - "description": "Team ID", + "description": "Tool source type ID", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "Enable custom tool provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomToolProviderDetails" - } - } - } - } - }, - "security": [ - { - "api_key": [] }, { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/refresh": { - "post": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Refresh custom tool provider", - "description": "Rediscover custom HTTP tool provider tools", - "operationId": "refresh-custom-tool-provider", - "parameters": [ - { - "name": "team_id", + "name": "tool_group_deployment_type_id", "in": "path", - "description": "Team ID", + "description": "Tool group source type ID", "required": true, "schema": { "type": "string" @@ -19572,73 +20109,73 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMcpServerInstanceToolBody" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Refresh custom tool provider", + "description": "Update tool in MCP server instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RefreshCustomToolProviderResponse" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" } } } - } - }, - "security": [ - { - "api_key": [] }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/rotate-signing-secret": { - "post": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Rotate custom tool provider signing key", - "description": "Rotate the shared webhook signing key for a custom HTTP tool provider", - "operationId": "rotate-custom-tool-provider-signing-key", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } - } - ], - "responses": { - "200": { - "description": "Rotate custom tool provider signing key", + }, + "409": { + "description": "Conflict (tool name already exists)", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RotateCustomToolProviderSigningKeyResponse" + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -19654,15 +20191,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/custom-tool-providers/{tool_group_instance_id}/tools/{tool_source_type_id}/invoke": { + "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/functions": { "post": { "tags": [ "mcp", "v1" ], - "summary": "Invoke custom tool", - "description": "Invoke a custom HTTP tool provider tool directly", - "operationId": "invoke-custom-tool", + "summary": "Add MCP server functions in bulk", + "description": "Atomically add 1-500 tool mappings from one provider account. Exact existing mappings are idempotent no-ops, including concurrent retries. Any invalid or conflicting item rejects the entire database batch. A 5xx from post-commit reconciliation has unknown commit visibility; retrying the same request is safe.", + "operationId": "bulk-add-mcp-server-instance-functions", "parameters": [ { "name": "team_id", @@ -19674,18 +20211,9 @@ } }, { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_source_type_id", + "name": "mcp_server_instance_id", "in": "path", - "description": "Tool source type ID", + "description": "MCP server instance ID", "required": true, "schema": { "type": "string" @@ -19705,7 +20233,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvokeCustomToolRequestInner" + "$ref": "#/components/schemas/BulkAddMcpServerInstanceFunctionsBody" } } }, @@ -19713,99 +20241,21 @@ }, "responses": { "200": { - "description": "Invoke custom tool", + "description": "All function mappings were added, or already existed unchanged", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvokeResult" + "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" } } } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/mcp-server": { - "get": { - "tags": [ - "mcp", - "v1" - ], - "summary": "List MCP server instances", - "description": "List all MCP server instances with pagination", - "operationId": "list-mcp-server-instances", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page_size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "include_global", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "name": "agent_id", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "List MCP server instances", + "400": { + "description": "Invalid batch; no mappings were added", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctionsPaginatedResponse" + "$ref": "#/components/schemas/Error" } } } @@ -19830,8 +20280,18 @@ } } }, + "404": { + "description": "MCP server or tool instance not found; no mappings were added", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "500": { - "description": "Internal Server Error", + "description": "Internal Server Error. Database write failures roll back the batch; reconciliation failures can occur after commit, and retrying is safe", "content": { "application/json": { "schema": { @@ -19850,14 +20310,14 @@ } ] }, - "post": { + "delete": { "tags": [ "mcp", "v1" ], - "summary": "Create MCP server instance", - "description": "Create a new MCP server instance with a user-provided ID", - "operationId": "create-mcp-server-instance", + "summary": "Remove MCP server functions in bulk", + "description": "Atomically remove 1-500 tool mappings from one provider account. Missing mappings are idempotent no-ops. Any invalid item rejects the entire database batch. A 5xx from post-commit reconciliation has unknown commit visibility; retrying the same request is safe.", + "operationId": "bulk-remove-mcp-server-instance-functions", "parameters": [ { "name": "team_id", @@ -19868,6 +20328,15 @@ "type": "string" } }, + { + "name": "mcp_server_instance_id", + "in": "path", + "description": "MCP server instance ID", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "team_id", "in": "path", @@ -19882,7 +20351,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMcpServerInstanceRequestInner" + "$ref": "#/components/schemas/BulkRemoveMcpServerInstanceFunctionsBody" } } }, @@ -19890,7 +20359,7 @@ }, "responses": { "200": { - "description": "Create MCP server instance", + "description": "All requested mappings were removed or already absent", "content": { "application/json": { "schema": { @@ -19900,7 +20369,7 @@ } }, "400": { - "description": "Bad Request", + "description": "Invalid batch; no mappings were removed", "content": { "application/json": { "schema": { @@ -19929,8 +20398,18 @@ } } }, + "404": { + "description": "MCP server not found; no mappings were removed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "500": { - "description": "Internal Server Error", + "description": "Internal Server Error. Database write failures roll back the batch; reconciliation failures can occur after commit, and retrying is safe", "content": { "application/json": { "schema": { @@ -19950,15 +20429,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}": { + "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/mcp": { "get": { "tags": [ "mcp", "v1" ], - "summary": "Get MCP server instance", - "description": "Retrieve an MCP server instance by its ID", - "operationId": "get-mcp-server-instance", + "summary": "MCP protocol endpoint (GET)", + "description": "Handle MCP protocol GET requests for SSE event streams.", + "operationId": "mcp-protocol-get", "parameters": [ { "name": "team_id", @@ -19990,17 +20469,10 @@ ], "responses": { "200": { - "description": "Get MCP server instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" - } - } - } + "description": "MCP SSE stream" }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -20009,8 +20481,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -20049,14 +20521,14 @@ } ] }, - "delete": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "Delete MCP server instance", - "description": "Delete an MCP server instance and all its tool mappings", - "operationId": "delete-mcp-server-instance", + "summary": "MCP protocol endpoint (POST)", + "description": "Handle MCP protocol requests (JSON-RPC over HTTP). This is the main endpoint for MCP clients to communicate with the server.", + "operationId": "mcp-protocol-post", "parameters": [ { "name": "team_id", @@ -20088,10 +20560,10 @@ ], "responses": { "200": { - "description": "Delete MCP server instance" + "description": "MCP protocol response" }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -20100,8 +20572,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -20140,14 +20612,14 @@ } ] }, - "patch": { + "delete": { "tags": [ "mcp", "v1" ], - "summary": "Update MCP server instance", - "description": "Update an MCP server instance name", - "operationId": "update-mcp-server-instance", + "summary": "MCP protocol endpoint (DELETE)", + "description": "Handle MCP protocol DELETE requests for session cleanup.", + "operationId": "mcp-protocol-delete", "parameters": [ { "name": "team_id", @@ -20177,29 +20649,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMcpServerInstanceBody" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Update MCP server instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" - } - } - } + "description": "Session terminated" }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -20208,8 +20663,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -20249,15 +20704,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/function": { + "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/playground/chat": { "post": { "tags": [ "mcp", "v1" ], - "summary": "Add function to MCP server instance", - "description": "Add a tool mapping to an MCP server instance with a custom name", - "operationId": "add-mcp-server-instance-function", + "summary": "Chat with MCP server playground", + "description": "Run an ephemeral natural-language playground chat bound to one dynamic MCP server instance.", + "operationId": "mcp-server-playground-chat", "parameters": [ { "name": "team_id", @@ -20291,7 +20746,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddMcpServerInstanceFunctionBody" + "$ref": "#/components/schemas/McpPlaygroundAiSdkChatRequest" } } }, @@ -20299,14 +20754,7 @@ }, "responses": { "200": { - "description": "Add function to MCP server instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" - } - } - } + "description": "Vercel AI SDK UI message stream" }, "400": { "description": "Bad Request", @@ -20348,16 +20796,6 @@ } } }, - "409": { - "description": "Conflict (tool name already exists)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "500": { "description": "Internal Server Error", "content": { @@ -20379,15 +20817,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/function/{tool_deployment_type_id}/{tool_group_deployment_type_id}/{tool_group_instance_id}": { - "delete": { + "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/tool-group/{tool_group_instance_id}": { + "put": { "tags": [ "mcp", "v1" ], - "summary": "Remove tool from MCP server instance", - "description": "Remove a tool mapping from an MCP server instance", - "operationId": "remove-mcp-server-instance-function", + "summary": "Bind tool group to MCP server", + "description": "Enables every tool in a tool-group instance and maps it onto the MCP server idempotently.", + "operationId": "bind-tool-group-to-mcp-server", "parameters": [ { "name": "team_id", @@ -20407,24 +20845,6 @@ "type": "string" } }, - { - "name": "tool_deployment_type_id", - "in": "path", - "description": "Tool source type ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_deployment_type_id", - "in": "path", - "description": "Tool group source type ID", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "tool_group_instance_id", "in": "path", @@ -20446,7 +20866,7 @@ ], "responses": { "200": { - "description": "Remove tool from MCP server instance", + "description": "Bound tool group", "content": { "application/json": { "schema": { @@ -20455,18 +20875,8 @@ } } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -20505,14 +20915,14 @@ } ] }, - "patch": { + "delete": { "tags": [ "mcp", "v1" ], - "summary": "Update tool in MCP server instance", - "description": "Update the tool name and description for a tool mapping", - "operationId": "update-mcp-server-instance-function", + "summary": "Unbind tool group from MCP server", + "description": "Removes every mapping for a tool-group instance from the MCP server idempotently.", + "operationId": "unbind-tool-group-from-mcp-server", "parameters": [ { "name": "team_id", @@ -20532,24 +20942,6 @@ "type": "string" } }, - { - "name": "tool_deployment_type_id", - "in": "path", - "description": "Tool source type ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_deployment_type_id", - "in": "path", - "description": "Tool group source type ID", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "tool_group_instance_id", "in": "path", @@ -20569,19 +20961,9 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMcpServerInstanceToolBody" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Update tool in MCP server instance", + "description": "Unbound tool group", "content": { "application/json": { "schema": { @@ -20590,18 +20972,8 @@ } } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -20620,16 +20992,6 @@ } } }, - "409": { - "description": "Conflict (tool name already exists)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "500": { "description": "Internal Server Error", "content": { @@ -20651,15 +21013,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/functions": { - "post": { + "/api/v1/team/{team_id}/mcp/provider-catalog": { + "get": { "tags": [ "mcp", "v1" ], - "summary": "Add MCP server functions in bulk", - "description": "Atomically add 1-500 tool mappings from one provider account. Exact existing mappings are idempotent no-ops, including concurrent retries. Any invalid or conflicting item rejects the entire database batch. A 5xx from post-commit reconciliation has unknown commit visibility; retrying the same request is safe.", - "operationId": "bulk-add-mcp-server-instance-functions", + "summary": "List remote MCP provider catalogue", + "description": "List server-authored remote MCP provider descriptors and their generic connection methods", + "operationId": "list-mcp-provider-catalog", "parameters": [ { "name": "team_id", @@ -20670,15 +21032,6 @@ "type": "string" } }, - { - "name": "mcp_server_instance_id", - "in": "path", - "description": "MCP server instance ID", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -20689,33 +21042,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkAddMcpServerInstanceFunctionsBody" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "All function mappings were added, or already existed unchanged", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" - } - } - } - }, - "400": { - "description": "Invalid batch; no mappings were added", + "description": "List curated remote MCP providers", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ListMcpProviderCatalogResponse" } } } @@ -20740,18 +21073,8 @@ } } }, - "404": { - "description": "MCP server or tool instance not found; no mappings were added", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "500": { - "description": "Internal Server Error. Database write failures roll back the batch; reconciliation failures can occur after commit, and retrying is safe", + "description": "Internal Server Error", "content": { "application/json": { "schema": { @@ -20769,15 +21092,17 @@ "bearer_token": [] } ] - }, - "delete": { + } + }, + "/api/v1/team/{team_id}/mcp/provider-catalog/{provider_id}/connect": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "Remove MCP server functions in bulk", - "description": "Atomically remove 1-500 tool mappings from one provider account. Missing mappings are idempotent no-ops. Any invalid item rejects the entire database batch. A 5xx from post-commit reconciliation has unknown commit visibility; retrying the same request is safe.", - "operationId": "bulk-remove-mcp-server-instance-functions", + "summary": "Connect remote MCP provider catalogue entry", + "description": "Connect an unauthenticated provider immediately or discover OAuth metadata, dynamically register Tilde, and start PKCE authorization", + "operationId": "connect-mcp-provider-catalog-entry", "parameters": [ { "name": "team_id", @@ -20789,9 +21114,9 @@ } }, { - "name": "mcp_server_instance_id", + "name": "provider_id", "in": "path", - "description": "MCP server instance ID", + "description": "Stable catalogue provider ID", "required": true, "schema": { "type": "string" @@ -20811,7 +21136,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkRemoveMcpServerInstanceFunctionsBody" + "$ref": "#/components/schemas/ConnectMcpProviderCatalogEntryRequestInner" } } }, @@ -20819,17 +21144,17 @@ }, "responses": { "200": { - "description": "All requested mappings were removed or already absent", + "description": "Connect curated remote MCP provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" + "$ref": "#/components/schemas/ConnectMcpProviderCatalogEntryResponse" } } } }, "400": { - "description": "Invalid batch; no mappings were removed", + "description": "Provider requires manual setup", "content": { "application/json": { "schema": { @@ -20859,7 +21184,7 @@ } }, "404": { - "description": "MCP server not found; no mappings were removed", + "description": "Provider not found", "content": { "application/json": { "schema": { @@ -20869,7 +21194,7 @@ } }, "500": { - "description": "Internal Server Error. Database write failures roll back the batch; reconciliation failures can occur after commit, and retrying is safe", + "description": "Internal Server Error", "content": { "application/json": { "schema": { @@ -20889,15 +21214,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/mcp": { + "/api/v1/team/{team_id}/mcp/proxied-mcp-servers": { "get": { "tags": [ "mcp", "v1" ], - "summary": "MCP protocol endpoint (GET)", - "description": "Handle MCP protocol GET requests for SSE event streams.", - "operationId": "mcp-protocol-get", + "summary": "List proxied MCP servers", + "description": "List proxied MCP server records and their local tool provider instances for a team", + "operationId": "list-proxied-mcp-servers", "parameters": [ { "name": "team_id", @@ -20909,13 +21234,33 @@ } }, { - "name": "mcp_server_instance_id", - "in": "path", - "description": "MCP server instance ID", + "name": "page_size", + "in": "query", "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, "schema": { "type": "string" - } + }, + "style": "form" + }, + { + "name": "include_catalog_managed", + "in": "query", + "description": "Internal portability and control-plane callers can opt into managed entries.", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { "name": "team_id", @@ -20929,14 +21274,11 @@ ], "responses": { "200": { - "description": "MCP SSE stream" - }, - "400": { - "description": "Bad Request", + "description": "List proxied MCP servers", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ProxiedMcpServerListItemPaginatedResponse" } } } @@ -20951,8 +21293,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -20986,9 +21328,9 @@ "mcp", "v1" ], - "summary": "MCP protocol endpoint (POST)", - "description": "Handle MCP protocol requests (JSON-RPC over HTTP). This is the main endpoint for MCP clients to communicate with the server.", - "operationId": "mcp-protocol-post", + "summary": "Connect proxied MCP server", + "description": "Connect to an upstream MCP server, discover its tools, and persist them as a local tool group deployment", + "operationId": "connect-proxied-mcp-server", "parameters": [ { "name": "team_id", @@ -20999,15 +21341,6 @@ "type": "string" } }, - { - "name": "mcp_server_instance_id", - "in": "path", - "description": "MCP server instance ID", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -21018,9 +21351,26 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectProxiedMcpServerRequestInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "MCP protocol response" + "description": "Connect proxied MCP server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectProxiedMcpServerResponse" + } + } + } }, "400": { "description": "Bad Request", @@ -21042,8 +21392,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -21071,15 +21421,17 @@ "bearer_token": [] } ] - }, - "delete": { + } + }, + "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/oauth/start": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "MCP protocol endpoint (DELETE)", - "description": "Handle MCP protocol DELETE requests for session cleanup.", - "operationId": "mcp-protocol-delete", + "summary": "Start proxied MCP OAuth authorization", + "description": "Create a pending proxied MCP server and start generic OAuth authorization-code brokering. Tool discovery completes after the OAuth callback stores the user credential.", + "operationId": "start-proxied-mcp-server-oauth", "parameters": [ { "name": "team_id", @@ -21090,15 +21442,6 @@ "type": "string" } }, - { - "name": "mcp_server_instance_id", - "in": "path", - "description": "MCP server instance ID", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -21109,9 +21452,26 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProxiedMcpServerOauthRequestInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Session terminated" + "description": "Start proxied MCP OAuth authorization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProxiedMcpServerOauthResponse" + } + } + } }, "400": { "description": "Bad Request", @@ -21133,8 +21493,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -21164,15 +21524,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/playground/chat": { - "post": { + "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}": { + "get": { "tags": [ "mcp", "v1" ], - "summary": "Chat with MCP server playground", - "description": "Run an ephemeral natural-language playground chat bound to one dynamic MCP server instance.", - "operationId": "mcp-server-playground-chat", + "summary": "Get proxied MCP server", + "description": "Get proxied MCP server settings, discovery state, and discovered tools", + "operationId": "get-proxied-mcp-server", "parameters": [ { "name": "team_id", @@ -21184,9 +21544,9 @@ } }, { - "name": "mcp_server_instance_id", + "name": "tool_group_instance_id", "in": "path", - "description": "MCP server instance ID", + "description": "Proxied MCP tool group instance ID", "required": true, "schema": { "type": "string" @@ -21202,26 +21562,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/McpPlaygroundAiSdkChatRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Vercel AI SDK UI message stream" - }, - "400": { - "description": "Bad Request", + "description": "Get proxied MCP server", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ProxiedMcpServerDetails" } } } @@ -21275,17 +21622,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/mcp/mcp-server/{mcp_server_instance_id}/tool-group/{tool_group_instance_id}": { - "put": { + }, + "delete": { "tags": [ "mcp", "v1" ], - "summary": "Bind tool group to MCP server", - "description": "Enables every tool in a tool-group instance and maps it onto the MCP server idempotently.", - "operationId": "bind-tool-group-to-mcp-server", + "summary": "Delete proxied MCP server", + "description": "Delete a proxied MCP tool group instance and its enabled local tools", + "operationId": "delete-proxied-mcp-server", "parameters": [ { "name": "team_id", @@ -21296,19 +21641,10 @@ "type": "string" } }, - { - "name": "mcp_server_instance_id", - "in": "path", - "description": "MCP server instance ID", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "tool_group_instance_id", "in": "path", - "description": "Tool group instance ID", + "description": "Proxied MCP tool group instance ID", "required": true, "schema": { "type": "string" @@ -21326,17 +21662,20 @@ ], "responses": { "200": { - "description": "Bound tool group", + "description": "Delete proxied MCP server" + }, + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" + "$ref": "#/components/schemas/Error" } } } }, - "400": { - "description": "Bad Request", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -21374,15 +21713,17 @@ "bearer_token": [] } ] - }, - "delete": { + } + }, + "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}/disable": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "Unbind tool group from MCP server", - "description": "Removes every mapping for a tool-group instance from the MCP server idempotently.", - "operationId": "unbind-tool-group-from-mcp-server", + "summary": "Disable proxied MCP server", + "description": "Mark a proxied MCP server and its backing tool group instance disabled", + "operationId": "disable-proxied-mcp-server", "parameters": [ { "name": "team_id", @@ -21393,19 +21734,10 @@ "type": "string" } }, - { - "name": "mcp_server_instance_id", - "in": "path", - "description": "MCP server instance ID", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "tool_group_instance_id", "in": "path", - "description": "Tool group instance ID", + "description": "Proxied MCP tool group instance ID", "required": true, "schema": { "type": "string" @@ -21423,37 +21755,17 @@ ], "responses": { "200": { - "description": "Unbound tool group", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/McpServerInstanceSerializedWithFunctions" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", + "description": "Disable proxied MCP server", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ProxiedMcpServerDetails" } } } }, - "500": { - "description": "Internal Server Error", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -21461,60 +21773,9 @@ } } } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/provider-catalog": { - "get": { - "tags": [ - "mcp", - "v1" - ], - "summary": "List remote MCP provider catalogue", - "description": "List server-authored remote MCP provider descriptors and their generic connection methods", - "operationId": "list-mcp-provider-catalog", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "List curated remote MCP providers", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListMcpProviderCatalogResponse" - } - } - } }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -21523,8 +21784,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -21554,15 +21815,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/provider-catalog/{provider_id}/connect": { + "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}/enable": { "post": { "tags": [ "mcp", "v1" ], - "summary": "Connect remote MCP provider catalogue entry", - "description": "Connect an unauthenticated provider immediately or discover OAuth metadata, dynamically register Tilde, and start PKCE authorization", - "operationId": "connect-mcp-provider-catalog-entry", + "summary": "Enable proxied MCP server", + "description": "Mark a proxied MCP server and its backing tool group instance active", + "operationId": "enable-proxied-mcp-server", "parameters": [ { "name": "team_id", @@ -21574,9 +21835,9 @@ } }, { - "name": "provider_id", + "name": "tool_group_instance_id", "in": "path", - "description": "Stable catalogue provider ID", + "description": "Proxied MCP tool group instance ID", "required": true, "schema": { "type": "string" @@ -21592,33 +21853,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectMcpProviderCatalogEntryRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Connect curated remote MCP provider", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectMcpProviderCatalogEntryResponse" - } - } - } - }, - "400": { - "description": "Provider requires manual setup", + "description": "Enable proxied MCP server", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ProxiedMcpServerDetails" } } } @@ -21644,7 +21885,7 @@ } }, "404": { - "description": "Provider not found", + "description": "Not Found", "content": { "application/json": { "schema": { @@ -21674,15 +21915,115 @@ ] } }, - "/api/v1/team/{team_id}/mcp/proxied-mcp-servers": { + "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}/refresh": { + "post": { + "tags": [ + "mcp", + "v1" + ], + "summary": "Refresh proxied MCP server", + "description": "Reconnect to an upstream MCP server and refresh the locally stored tool deployment definitions", + "operationId": "refresh-proxied-mcp-server", + "parameters": [ + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tool_group_instance_id", + "in": "path", + "description": "Proxied MCP tool group instance ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Refresh proxied MCP server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectProxiedMcpServerResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] + } + }, + "/api/v1/team/{team_id}/mcp/tool-deployments/{alias}": { "get": { "tags": [ "mcp", "v1" ], - "summary": "List proxied MCP servers", - "description": "List proxied MCP server records and their local tool provider instances for a team", - "operationId": "list-proxied-mcp-servers", + "summary": "List tool deployments by alias", + "description": "List tool deployments joined with their tool group deployment, filtered by deployment alias", + "operationId": "list-tool-deployments-by-alias", "parameters": [ { "name": "team_id", @@ -21693,6 +22034,15 @@ "type": "string" } }, + { + "name": "alias", + "in": "path", + "description": "Deployment alias (e.g. 'latest')", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "page_size", "in": "query", @@ -21713,9 +22063,8 @@ "style": "form" }, { - "name": "include_catalog_managed", + "name": "include_global", "in": "query", - "description": "Internal portability and control-plane callers can opt into managed entries.", "required": false, "schema": { "type": "boolean" @@ -21734,27 +22083,17 @@ ], "responses": { "200": { - "description": "List proxied MCP servers", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProxiedMcpServerListItemPaginatedResponse" - } - } - } - }, - "401": { - "description": "Unauthorized", + "description": "List tool deployments by alias", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ToolDeploymentWithGroupSerializedPaginatedResponse" } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -21782,15 +22121,17 @@ "bearer_token": [] } ] - }, - "post": { + } + }, + "/api/v1/team/{team_id}/mcp/tool-group": { + "get": { "tags": [ "mcp", "v1" ], - "summary": "Connect proxied MCP server", - "description": "Connect to an upstream MCP server, discover its tools, and persist them as a local tool group deployment", - "operationId": "connect-proxied-mcp-server", + "summary": "List tool group instances", + "description": "List all tool group instances with optional filtering by status and tool group type", + "operationId": "list-tool-group-instances", "parameters": [ { "name": "team_id", @@ -21801,6 +22142,52 @@ "type": "string" } }, + { + "name": "page_size", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "tool_group_source_type_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "include_global", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { "name": "team_id", "in": "path", @@ -21811,23 +22198,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectProxiedMcpServerRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Connect proxied MCP server", + "description": "List tool group instances", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConnectProxiedMcpServerResponse" + "$ref": "#/components/schemas/ToolGroupInstanceListItemPaginatedResponse" } } } @@ -21883,15 +22260,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/oauth/start": { - "post": { + "/api/v1/team/{team_id}/mcp/tool-group/grouped-by-tool": { + "get": { "tags": [ "mcp", "v1" ], - "summary": "Start proxied MCP OAuth authorization", - "description": "Create a pending proxied MCP server and start generic OAuth authorization-code brokering. Tool discovery completes after the OAuth callback stores the user credential.", - "operationId": "start-proxied-mcp-server-oauth", + "summary": "List tool groups by tool", + "description": "List tool group instances grouped by their associated tools", + "operationId": "list-tool-group-instances-grouped-by-tool", "parameters": [ { "name": "team_id", @@ -21902,6 +22279,52 @@ "type": "string" } }, + { + "name": "page_size", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "tool_group_source_type_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "tool_category", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "include_global", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, { "name": "team_id", "in": "path", @@ -21912,23 +22335,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartProxiedMcpServerOauthRequestInner" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Start proxied MCP OAuth authorization", + "description": "List tool group instances grouped by tool", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StartProxiedMcpServerOauthResponse" + "$ref": "#/components/schemas/ToolConfigPaginatedResponse" } } } @@ -21984,15 +22397,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}": { + "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}": { "get": { "tags": [ "mcp", "v1" ], - "summary": "Get proxied MCP server", - "description": "Get proxied MCP server settings, discovery state, and discovered tools", - "operationId": "get-proxied-mcp-server", + "summary": "Get tool group", + "description": "Retrieve a tool group instance by its unique identifier", + "operationId": "get-tool-group-instance", "parameters": [ { "name": "team_id", @@ -22006,7 +22419,7 @@ { "name": "tool_group_instance_id", "in": "path", - "description": "Proxied MCP tool group instance ID", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -22024,17 +22437,17 @@ ], "responses": { "200": { - "description": "Get proxied MCP server", + "description": "Get tool group instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProxiedMcpServerDetails" + "$ref": "#/components/schemas/ToolGroupInstanceSerializedWithEverything" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -22043,8 +22456,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -22053,8 +22466,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -22088,9 +22501,9 @@ "mcp", "v1" ], - "summary": "Delete proxied MCP server", - "description": "Delete a proxied MCP tool group instance and its enabled local tools", - "operationId": "delete-proxied-mcp-server", + "summary": "Delete tool group", + "description": "Delete a tool group instance by its unique identifier", + "operationId": "delete-tool-group-instance", "parameters": [ { "name": "team_id", @@ -22104,7 +22517,7 @@ { "name": "tool_group_instance_id", "in": "path", - "description": "Proxied MCP tool group instance ID", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" @@ -22122,10 +22535,17 @@ ], "responses": { "200": { - "description": "Delete proxied MCP server" + "description": "Delete tool group instance", + "content": { + "application/json": { + "schema": { + "default": null + } + } + } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -22134,8 +22554,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -22144,8 +22564,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -22173,17 +22593,15 @@ "bearer_token": [] } ] - } - }, - "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}/disable": { - "post": { + }, + "patch": { "tags": [ "mcp", "v1" ], - "summary": "Disable proxied MCP server", - "description": "Mark a proxied MCP server and its backing tool group instance disabled", - "operationId": "disable-proxied-mcp-server", + "summary": "Update tool group", + "description": "Update an existing tool group instance configuration", + "operationId": "update-tool-group-instance", "parameters": [ { "name": "team_id", @@ -22197,12 +22615,34 @@ { "name": "tool_group_instance_id", "in": "path", - "description": "Proxied MCP tool group instance ID", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" } }, + { + "name": "wait_for_status", + "in": "query", + "description": "Hold the request until this status is observed or the timeout expires.", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "timeout_ms", + "in": "query", + "description": "Long-poll timeout in milliseconds, clamped to 30 seconds.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + }, + "style": "form" + }, { "name": "team_id", "in": "path", @@ -22213,19 +22653,29 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateToolGroupInstanceParamsInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Disable proxied MCP server", + "description": "Update tool group instance", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProxiedMcpServerDetails" + "$ref": "#/components/schemas/TupleUnit" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -22234,8 +22684,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -22244,8 +22694,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -22275,15 +22725,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}/enable": { - "post": { + "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/bound-params": { + "patch": { "tags": [ "mcp", "v1" ], - "summary": "Enable proxied MCP server", - "description": "Mark a proxied MCP server and its backing tool group instance active", - "operationId": "enable-proxied-mcp-server", + "summary": "Update tool bound_params", + "description": "Replace the bound_params JSON object on an enabled tool instance. Bound values are merged into LLM-supplied params at invoke time and win on collision.", + "operationId": "update-tool-bound-params", "parameters": [ { "name": "team_id", @@ -22297,7 +22747,16 @@ { "name": "tool_group_instance_id", "in": "path", - "description": "Proxied MCP tool group instance ID", + "description": "Tool group instance ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tool_source_type_id", + "in": "path", + "description": "Tool source type ID", "required": true, "schema": { "type": "string" @@ -22313,13 +22772,33 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateToolInstanceBoundParamsInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Enable proxied MCP server", + "description": "Updated tool bound_params", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProxiedMcpServerDetails" + "$ref": "#/components/schemas/ToolInstanceSerialized" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -22345,7 +22824,7 @@ } }, "404": { - "description": "Not Found", + "description": "Tool instance not found", "content": { "application/json": { "schema": { @@ -22375,15 +22854,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/proxied-mcp-servers/{tool_group_instance_id}/refresh": { + "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/disable": { "post": { "tags": [ "mcp", "v1" ], - "summary": "Refresh proxied MCP server", - "description": "Reconnect to an upstream MCP server and refresh the locally stored tool deployment definitions", - "operationId": "refresh-proxied-mcp-server", + "summary": "Disable tool", + "description": "Disable a tool for a tool group instance", + "operationId": "disable-tool", "parameters": [ { "name": "team_id", @@ -22397,7 +22876,16 @@ { "name": "tool_group_instance_id", "in": "path", - "description": "Proxied MCP tool group instance ID", + "description": "Tool group instance ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tool_source_type_id", + "in": "path", + "description": "Tool source type ID", "required": true, "schema": { "type": "string" @@ -22415,17 +22903,17 @@ ], "responses": { "200": { - "description": "Refresh proxied MCP server", + "description": "Disable tool", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConnectProxiedMcpServerResponse" + "$ref": "#/components/schemas/TupleUnit" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -22434,8 +22922,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -22444,8 +22932,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -22475,15 +22963,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/tool-deployments/{alias}": { - "get": { + "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/enable": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "List tool deployments by alias", - "description": "List tool deployments joined with their tool group deployment, filtered by deployment alias", - "operationId": "list-tool-deployments-by-alias", + "summary": "Enable tool", + "description": "Enable a tool for a tool group instance. Optional bound_params may be supplied and will be merged into invocation params for this enabled tool.", + "operationId": "enable-tool", "parameters": [ { "name": "team_id", @@ -22495,176 +22983,50 @@ } }, { - "name": "alias", + "name": "tool_group_instance_id", "in": "path", - "description": "Deployment alias (e.g. 'latest')", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" } }, { - "name": "page_size", - "in": "query", + "name": "tool_source_type_id", + "in": "path", + "description": "Tool source type ID", "required": true, "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" + "type": "string" + } }, { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "include_global", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "List tool deployments by alias", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolDeploymentWithGroupSerializedPaginatedResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnableToolInstanceParamsInner" } } }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } + "required": true }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tool-group": { - "get": { - "tags": [ - "mcp", - "v1" - ], - "summary": "List tool group instances", - "description": "List all tool group instances with optional filtering by status and tool group type", - "operationId": "list-tool-group-instances", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page_size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "tool_group_source_type_id", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "include_global", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { - "description": "List tool group instances", + "description": "Enable tool", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolGroupInstanceListItemPaginatedResponse" + "$ref": "#/components/schemas/ToolInstanceSerialized" } } } @@ -22720,15 +23082,15 @@ ] } }, - "/api/v1/team/{team_id}/mcp/tool-group/grouped-by-tool": { - "get": { + "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/invoke": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "List tool groups by tool", - "description": "List tool group instances grouped by their associated tools", - "operationId": "list-tool-group-instances-grouped-by-tool", + "summary": "Invoke tool", + "description": "Invoke a tool on a tool group instance", + "operationId": "invoke-tool", "parameters": [ { "name": "team_id", @@ -22740,146 +23102,18 @@ } }, { - "name": "page_size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "tool_group_source_type_id", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "tool_category", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "include_global", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "List tool group instances grouped by tool", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolConfigPaginatedResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}": { - "get": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Get tool group", - "description": "Retrieve a tool group instance by its unique identifier", - "operationId": "get-tool-group-instance", - "parameters": [ - { - "name": "team_id", + "name": "tool_group_instance_id", "in": "path", - "description": "Team ID", + "description": "Tool group instance ID", "required": true, "schema": { "type": "string" } }, { - "name": "tool_group_instance_id", + "name": "tool_source_type_id", "in": "path", - "description": "Tool group instance ID", + "description": "Tool source type ID", "required": true, "schema": { "type": "string" @@ -22895,111 +23129,23 @@ } } ], - "responses": { - "200": { - "description": "Get tool group instance", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolGroupInstanceSerializedWithEverything" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvokeToolInstanceParamsInner" } } }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } + "required": true }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - }, - "delete": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Delete tool group", - "description": "Delete a tool group instance by its unique identifier", - "operationId": "delete-tool-group-instance", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { - "description": "Delete tool group instance", + "description": "Invoke tool", "content": { "application/json": { "schema": { - "default": null + "$ref": "#/components/schemas/InvokeResult" } } } @@ -23053,15 +23199,17 @@ "bearer_token": [] } ] - }, - "patch": { + } + }, + "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tools/enable-and-bind": { + "post": { "tags": [ "mcp", "v1" ], - "summary": "Update tool group", - "description": "Update an existing tool group instance configuration", - "operationId": "update-tool-group-instance", + "summary": "Enable provider tools and bind them to MCP servers", + "description": "Idempotently enables either every provider tool or an explicit set, then adds those enabled tools to each of 1-50 MCP servers. Invalid selections and provider-account authorization fail before writes. Runtime enablement and server-binding failures are returned per item so partial progress is observable and the same request can be retried safely. Each individual MCP-server mapping batch remains atomic.", + "operationId": "enable-and-bind-provider-tools", "parameters": [ { "name": "team_id", @@ -23075,34 +23223,12 @@ { "name": "tool_group_instance_id", "in": "path", - "description": "Tool group instance ID", + "description": "Provider account / tool-group instance ID", "required": true, "schema": { "type": "string" } }, - { - "name": "wait_for_status", - "in": "query", - "description": "Hold the request until this status is observed or the timeout expires.", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "timeout_ms", - "in": "query", - "description": "Long-poll timeout in milliseconds, clamped to 30 seconds.", - "required": false, - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - }, - "style": "form" - }, { "name": "team_id", "in": "path", @@ -23117,7 +23243,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateToolGroupInstanceParamsInner" + "$ref": "#/components/schemas/EnableAndBindToolsBody" } } }, @@ -23125,17 +23251,17 @@ }, "responses": { "200": { - "description": "Update tool group instance", + "description": "Per-tool enablement and per-server binding results. The complete field is false when any item failed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TupleUnit" + "$ref": "#/components/schemas/EnableAndBindToolsResponse" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid or duplicate tool/server selection; no mutations were attempted", "content": { "application/json": { "schema": { @@ -23145,7 +23271,7 @@ } }, "401": { - "description": "Unauthorized", + "description": "Unauthorized; no mutations were attempted", "content": { "application/json": { "schema": { @@ -23155,7 +23281,17 @@ } }, "403": { - "description": "Forbidden", + "description": "Caller cannot manage the provider account; no mutations were attempted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Provider account or explicitly selected tool not found; no mutations were attempted", "content": { "application/json": { "schema": { @@ -23165,7 +23301,7 @@ } }, "500": { - "description": "Internal Server Error", + "description": "Failed before an observable per-item result could be returned", "content": { "application/json": { "schema": { @@ -23185,1391 +23321,61 @@ ] } }, - "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/bound-params": { - "patch": { + "/api/v1/team/{team_id}/mcp/tools": { + "get": { "tags": [ "mcp", "v1" ], - "summary": "Update tool bound_params", - "description": "Replace the bound_params JSON object on an enabled tool instance. Bound values are merged into LLM-supplied params at invoke time and win on collision.", - "operationId": "update-tool-bound-params", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_source_type_id", - "in": "path", - "description": "Tool source type ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateToolInstanceBoundParamsInner" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Updated tool bound_params", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolInstanceSerialized" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Tool instance not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/disable": { - "post": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Disable tool", - "description": "Disable a tool for a tool group instance", - "operationId": "disable-tool", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_source_type_id", - "in": "path", - "description": "Tool source type ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Disable tool", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TupleUnit" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/enable": { - "post": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Enable tool", - "description": "Enable a tool for a tool group instance. Optional bound_params may be supplied and will be merged into invocation params for this enabled tool.", - "operationId": "enable-tool", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_source_type_id", - "in": "path", - "description": "Tool source type ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnableToolInstanceParamsInner" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Enable tool", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolInstanceSerialized" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tool/{tool_source_type_id}/invoke": { - "post": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Invoke tool", - "description": "Invoke a tool on a tool group instance", - "operationId": "invoke-tool", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Tool group instance ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_source_type_id", - "in": "path", - "description": "Tool source type ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeToolInstanceParamsInner" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Invoke tool", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeResult" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tool-group/{tool_group_instance_id}/tools/enable-and-bind": { - "post": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Enable provider tools and bind them to MCP servers", - "description": "Idempotently enables either every provider tool or an explicit set, then adds those enabled tools to each of 1-50 MCP servers. Invalid selections and provider-account authorization fail before writes. Runtime enablement and server-binding failures are returned per item so partial progress is observable and the same request can be retried safely. Each individual MCP-server mapping batch remains atomic.", - "operationId": "enable-and-bind-provider-tools", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tool_group_instance_id", - "in": "path", - "description": "Provider account / tool-group instance ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnableAndBindToolsBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Per-tool enablement and per-server binding results. The complete field is false when any item failed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnableAndBindToolsResponse" - } - } - } - }, - "400": { - "description": "Invalid or duplicate tool/server selection; no mutations were attempted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized; no mutations were attempted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Caller cannot manage the provider account; no mutations were attempted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Provider account or explicitly selected tool not found; no mutations were attempted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Failed before an observable per-item result could be returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tools": { - "get": { - "tags": [ - "mcp", - "v1" - ], - "summary": "List tool instances", - "description": "List all tool instances with optional filtering by tool group instance", - "operationId": "list-tools", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page_size", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "tool_group_instance_id", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "include_global", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "List tool instances", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolInstanceSerializedPaginatedResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/mcp/tools/openapi.json": { - "get": { - "tags": [ - "mcp", - "v1" - ], - "summary": "Get tool OpenAPI spec", - "description": "Get the OpenAPI specification for all tool instances", - "operationId": "get-tools-openapi-spec", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Get tool instances openapi spec", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/memory/banks": { - "get": { - "tags": [ - "memory", - "v1" - ], - "summary": "List memory banks", - "description": "List the team's isolated memory banks.", - "operationId": "list-memory-banks", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBankPaginatedResponse" - } - } - } - } - } - }, - "post": { - "tags": [ - "memory", - "v1" - ], - "summary": "Create a memory bank", - "description": "Create an isolated Hindsight-backed memory bank and its enabled private tool provider.", - "operationId": "create-memory-bank", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateMemoryBankBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBank" - } - } - } - } - } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}": { - "get": { - "tags": [ - "memory", - "v1" - ], - "summary": "Get a memory bank", - "description": "Get one memory bank and its provisioning state.", - "operationId": "get-memory-bank", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBank" - } - } - } - } - } - }, - "delete": { - "tags": [ - "memory", - "v1" - ], - "summary": "Delete a memory bank", - "description": "Delete the provider bank, its private tools, and its Tilde record.", - "operationId": "delete-memory-bank", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - } - }, - "patch": { - "tags": [ - "memory", - "v1" - ], - "summary": "Update a memory bank", - "description": "Update bank metadata and its provider/tool configuration.", - "operationId": "update-memory-bank", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMemoryBankBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBank" - } - } - } - } - } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/config": { - "get": { - "tags": [ - "memory", - "v1" - ], - "summary": "Get memory bank configuration", - "description": "Return resolved configuration and explicit bank-level overrides.", - "operationId": "get-memory-bank-config", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBankConfig" - } - } - } - } - } - }, - "delete": { - "tags": [ - "memory", - "v1" - ], - "summary": "Reset memory bank configuration", - "description": "Remove every bank-level override and inherit provider defaults.", - "operationId": "reset-memory-bank-config", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBankConfig" - } - } - } - } - } - }, - "patch": { - "tags": [ - "memory", - "v1" - ], - "summary": "Update memory bank configuration", - "description": "Apply a partial set of bank-level configuration overrides.", - "operationId": "update-memory-bank-config", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMemoryBankConfigBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBankConfig" - } - } - } - } - } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/documents": { - "get": { - "tags": [ - "memory", - "v1" - ], - "summary": "List memory bank documents", - "description": "List retained documents with search and offset pagination.", - "operationId": "list-memory-bank-documents", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "q", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBankDocumentList" - } - } - } - } - } - }, - "delete": { - "tags": [ - "memory", - "v1" - ], - "summary": "Delete a memory document", - "description": "Delete a stable document and its extracted memories from the selected bank.", - "operationId": "delete-memory-document", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteMemoryDocumentBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/documents/{document_id}": { - "get": { - "tags": [ - "memory", - "v1" - ], - "summary": "Get memory bank document", - "description": "Get retained document content, metadata, tags, and extraction statistics.", - "operationId": "get-memory-bank-document", + "summary": "List tool instances", + "description": "List all tool instances with optional filtering by tool group instance", + "operationId": "list-tools", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "bank_id", - "in": "path", + "name": "page_size", + "in": "query", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } + "type": "integer", + "format": "int64" + }, + "style": "form" }, { - "name": "document_id", - "in": "path", - "required": true, + "name": "next_page_token", + "in": "query", + "required": false, "schema": { "type": "string" - } + }, + "style": "form" + }, + { + "name": "tool_group_instance_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "include_global", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" }, { "name": "team_id", @@ -24583,92 +23389,85 @@ ], "responses": { "200": { - "description": "", + "description": "List tool instances", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/ToolInstanceSerializedPaginatedResponse" + } } } - } - } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/health": { - "get": { - "tags": [ - "memory", - "v1" - ], - "summary": "Check memory bank health", - "description": "Check Tilde provisioning state and Hindsight reachability.", - "operationId": "check-memory-bank-health", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } - } - ], - "responses": { - "200": { - "description": "", + }, + "500": { + "description": "Internal Server Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemoryBankHealth" + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/ownership": { - "post": { + "/api/v1/team/{team_id}/mcp/tools/openapi.json": { + "get": { "tags": [ - "memory", + "mcp", "v1" ], - "summary": "Set memory-bank ownership", - "description": "Set the memory bank administration plane to team or private. Requires current ownership-plane authority.", - "operationId": "set-memory-bank-ownership-mode", + "summary": "Get tool OpenAPI spec", + "description": "Get the OpenAPI specification for all tool instances", + "operationId": "get-tools-openapi-spec", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, { "name": "team_id", "in": "path", @@ -24679,39 +23478,67 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "responses": { + "200": { + "description": "Get tool instances openapi spec", + "content": { + "text/plain": { + "schema": { + "type": "string" + } } } }, - "required": true - }, - "responses": { - "200": { - "description": "", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/ownership/grants": { + "/api/v1/team/{team_id}/memory/banks": { "get": { "tags": [ "memory", "v1" ], - "summary": "List memory-bank ownership grants", - "description": "List users and groups admitted to private memory-bank administration.", - "operationId": "list-memory-bank-ownership-grants", + "summary": "List memory banks", + "description": "List the team's isolated memory banks.", + "operationId": "list-memory-banks", "parameters": [ { "name": "team_id", @@ -24722,11 +23549,23 @@ } }, { - "name": "bank_id", - "in": "path", - "required": true, + "name": "page_size", + "in": "query", + "required": false, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] } }, { @@ -24745,10 +23584,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } + "$ref": "#/components/schemas/MemoryBankPaginatedResponse" } } } @@ -24760,9 +23596,9 @@ "memory", "v1" ], - "summary": "Add a memory-bank ownership grant", - "description": "Idempotently grant a same-team Identity user or group private administration.", - "operationId": "add-memory-bank-ownership-grant", + "summary": "Create a memory bank", + "description": "Create an isolated Hindsight-backed memory bank and its enabled private tool provider.", + "operationId": "create-memory-bank", "parameters": [ { "name": "team_id", @@ -24772,14 +23608,6 @@ "type": "string" } }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, { "name": "team_id", "in": "path", @@ -24794,7 +23622,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + "$ref": "#/components/schemas/CreateMemoryBankBody" } } }, @@ -24806,7 +23634,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/MemoryBank" } } } @@ -24814,74 +23642,15 @@ } } }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/ownership/grants/{principal_type}/{principal_id}": { - "delete": { - "tags": [ - "memory", - "v1" - ], - "summary": "Remove a memory-bank ownership grant", - "description": "Idempotently remove one ownership grant while retaining at least one owner for a private plane.", - "operationId": "remove-memory-bank-ownership-grant", - "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "principal_type", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourcePrincipalType" - } - }, - { - "name": "principal_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/recall": { - "post": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}": { + "get": { "tags": [ "memory", "v1" ], - "summary": "Recall memory", - "description": "Semantically recall relevant content from the selected memory bank.", - "operationId": "recall-memory", + "summary": "Get a memory bank", + "description": "Get one memory bank and its provisioning state.", + "operationId": "get-memory-bank", "parameters": [ { "name": "team_id", @@ -24909,39 +23678,27 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecallMemoryBody" - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemoryOperationResponse" + "$ref": "#/components/schemas/MemoryBank" } } } } } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/reflect": { - "post": { + }, + "delete": { "tags": [ "memory", "v1" ], - "summary": "Reflect on memory", - "description": "Generate a contextual answer from the selected memory bank.", - "operationId": "reflect-memory", + "summary": "Delete a memory bank", + "description": "Delete the provider bank, its private tools, and its Tilde record.", + "operationId": "delete-memory-bank", "parameters": [ { "name": "team_id", @@ -24969,39 +23726,20 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReflectMemoryBody" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryOperationResponse" - } - } - } + "description": "" } } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/retain": { - "post": { + }, + "patch": { "tags": [ "memory", "v1" ], - "summary": "Retain a memory document", - "description": "Upsert a provider-neutral document into the selected memory bank.", - "operationId": "retain-memory-document", + "summary": "Update a memory bank", + "description": "Update bank metadata and its provider/tool configuration.", + "operationId": "update-memory-bank", "parameters": [ { "name": "team_id", @@ -25033,7 +23771,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RetainMemoryBody" + "$ref": "#/components/schemas/UpdateMemoryBankBody" } } }, @@ -25045,7 +23783,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemoryOperationResponse" + "$ref": "#/components/schemas/MemoryBank" } } } @@ -25053,15 +23791,15 @@ } } }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/template": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/config": { "get": { "tags": [ "memory", "v1" ], - "summary": "Export memory bank template", - "description": "Export portable configuration overrides, mental models, and directives.", - "operationId": "export-memory-bank-template", + "summary": "Get memory bank configuration", + "description": "Return resolved configuration and explicit bank-level overrides.", + "operationId": "get-memory-bank-config", "parameters": [ { "name": "team_id", @@ -25095,21 +23833,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemoryBankTemplate" + "$ref": "#/components/schemas/MemoryBankConfig" } } } } } }, - "post": { + "delete": { "tags": [ "memory", "v1" ], - "summary": "Import memory bank template", - "description": "Validate or apply portable configuration, mental models, and directives.", - "operationId": "import-memory-bank-template", + "summary": "Reset memory bank configuration", + "description": "Remove every bank-level override and inherit provider defaults.", + "operationId": "reset-memory-bank-config", "parameters": [ { "name": "team_id", @@ -25137,39 +23875,27 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImportMemoryBankTemplateBody" - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImportMemoryBankTemplateResponse" + "$ref": "#/components/schemas/MemoryBankConfig" } } } } } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/visibility": { - "post": { + }, + "patch": { "tags": [ "memory", "v1" ], - "summary": "Set memory-bank visibility", - "description": "Set the memory bank discovery and content-use plane to team or private. Requires ownership-plane authority.", - "operationId": "set-memory-bank-visibility", + "summary": "Update memory bank configuration", + "description": "Apply a partial set of bank-level configuration overrides.", + "operationId": "update-memory-bank-config", "parameters": [ { "name": "team_id", @@ -25201,7 +23927,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "$ref": "#/components/schemas/UpdateMemoryBankConfigBody" } } }, @@ -25213,7 +23939,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/MemoryBankConfig" } } } @@ -25221,15 +23947,15 @@ } } }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/visibility/grants": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/documents": { "get": { "tags": [ "memory", "v1" ], - "summary": "List memory-bank visibility grants", - "description": "List users and groups admitted to private memory-bank visibility. Requires ownership-plane authority.", - "operationId": "list-memory-bank-visibility-grants", + "summary": "List memory bank documents", + "description": "List retained documents with search and offset pagination.", + "operationId": "list-memory-bank-documents", "parameters": [ { "name": "team_id", @@ -25248,54 +23974,32 @@ } }, { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, + "name": "limit", + "in": "query", + "required": false, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } - } - } + "type": "integer", + "format": "int64" } - } - } - }, - "post": { - "tags": [ - "memory", - "v1" - ], - "summary": "Add a memory-bank visibility grant", - "description": "Idempotently grant a same-team Identity user or group private visibility.", - "operationId": "add-memory-bank-visibility-grant", - "parameters": [ + }, { - "name": "team_id", - "in": "path", - "required": true, + "name": "offset", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { - "name": "bank_id", - "in": "path", - "required": true, + "name": "q", + "in": "query", + "required": false, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": [ + "string", + "null" + ] } }, { @@ -25308,39 +24012,27 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/MemoryBankDocumentList" } } } } } - } - }, - "/api/v1/team/{team_id}/memory/banks/{bank_id}/visibility/grants/{principal_type}/{principal_id}": { + }, "delete": { "tags": [ "memory", "v1" - ], - "summary": "Remove a memory-bank visibility grant", - "description": "Idempotently remove one private visibility grant.", - "operationId": "remove-memory-bank-visibility-grant", + ], + "summary": "Delete a memory document", + "description": "Delete a stable document and its extracted memories from the selected bank.", + "operationId": "delete-memory-document", "parameters": [ { "name": "team_id", @@ -25358,22 +24050,6 @@ "$ref": "#/components/schemas/WrappedUuidV4" } }, - { - "name": "principal_type", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourcePrincipalType" - } - }, - { - "name": "principal_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -25384,6 +24060,16 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteMemoryDocumentBody" + } + } + }, + "required": true + }, "responses": { "200": { "description": "" @@ -25391,15 +24077,15 @@ } } }, - "/api/v1/team/{team_id}/memory/banks/{memory_bank_id}/source-bindings": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/documents/{document_id}": { "get": { "tags": [ "memory", "v1" ], - "summary": "List memory-bank sources", - "description": "Inspect all active source bindings and synchronization state for one memory bank.", - "operationId": "list-memory-bank-source-bindings", + "summary": "Get memory bank document", + "description": "Get retained document content, metadata, tags, and extraction statistics.", + "operationId": "get-memory-bank-document", "parameters": [ { "name": "team_id", @@ -25410,13 +24096,21 @@ } }, { - "name": "memory_bank_id", + "name": "bank_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/WrappedUuidV4" } }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "team_id", "in": "path", @@ -25432,27 +24126,22 @@ "description": "", "content": { "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySourceBinding" - } - } + "schema": {} } } } } } }, - "/api/v1/team/{team_id}/memory/source-bindings": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/health": { "get": { "tags": [ "memory", "v1" ], - "summary": "List source memory-bank bindings", - "description": "Inspect the selected banks and synchronization state for one source.", - "operationId": "list-memory-source-bindings", + "summary": "Check memory bank health", + "description": "Check Tilde provisioning state and Hindsight reachability.", + "operationId": "check-memory-bank-health", "parameters": [ { "name": "team_id", @@ -25463,19 +24152,11 @@ } }, { - "name": "source_kind", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/MemorySourceKind" - } - }, - { - "name": "source_id", - "in": "query", + "name": "bank_id", + "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -25494,24 +24175,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySourceBinding" - } + "$ref": "#/components/schemas/MemoryBankHealth" } } } } } - }, - "put": { + } + }, + "/api/v1/team/{team_id}/memory/banks/{bank_id}/ownership": { + "post": { "tags": [ "memory", "v1" ], - "summary": "Replace source memory-bank bindings", - "description": "Atomically replace a source's selected banks and durably queue a full backfill.", - "operationId": "replace-memory-source-bindings", + "summary": "Set memory-bank ownership", + "description": "Set the memory bank administration plane to team or private. Requires current ownership-plane authority.", + "operationId": "set-memory-bank-ownership-mode", "parameters": [ { "name": "team_id", @@ -25521,6 +24201,14 @@ "type": "string" } }, + { + "name": "bank_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, { "name": "team_id", "in": "path", @@ -25535,7 +24223,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReplaceMemoryBankBindingsBody" + "$ref": "#/components/schemas/SetResourceAccessModeRequest" } } }, @@ -25547,10 +24235,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySourceBinding" - } + "$ref": "#/components/schemas/ResourceAuthorization" } } } @@ -25558,15 +24243,15 @@ } } }, - "/api/v1/team/{team_id}/memory/source-bindings/retry": { - "post": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/ownership/grants": { + "get": { "tags": [ "memory", "v1" ], - "summary": "Retry source synchronization", - "description": "Retry every memory-bank binding for a source.", - "operationId": "retry-memory-source-sync", + "summary": "List memory-bank ownership grants", + "description": "List users and groups admitted to private memory-bank administration.", + "operationId": "list-memory-bank-ownership-grants", "parameters": [ { "name": "team_id", @@ -25576,6 +24261,14 @@ "type": "string" } }, + { + "name": "bank_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, { "name": "team_id", "in": "path", @@ -25586,16 +24279,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RetryMemorySourceBody" - } - } - }, - "required": true - }, "responses": { "200": { "description": "", @@ -25604,24 +24287,22 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/MemorySourceBinding" + "$ref": "#/components/schemas/ResourceGrant" } } } } } } - } - }, - "/api/v1/team/{team_id}/openbot/agents/{agent_id}/bundle": { - "put": { + }, + "post": { "tags": [ - "openbot", + "memory", "v1" ], - "summary": "Reconcile OpenBot agent bundle", - "description": "Idempotently reconciles the agent, ChatKit workspace channel, authored skills and registry, MCP server, and tool-group bindings in one request.", - "operationId": "reconcile-openbot-agent-bundle", + "summary": "Add a memory-bank ownership grant", + "description": "Idempotently grant a same-team Identity user or group private administration.", + "operationId": "add-memory-bank-ownership-grant", "parameters": [ { "name": "team_id", @@ -25632,11 +24313,11 @@ } }, { - "name": "agent_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -25653,7 +24334,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReconcileOpenBotAgentBundleBody" + "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" } } }, @@ -25665,31 +24346,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReconcileOpenBotAgentBundleResponse" + "$ref": "#/components/schemas/ResourceGrant" } } } } - }, - "security": [ - { - "api_key": [] - }, - { - "bearer_token": [] - } - ] + } } }, - "/api/v1/team/{team_id}/openbot/plugins/catalog": { - "get": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/ownership/grants/{principal_type}/{principal_id}": { + "delete": { "tags": [ - "openbot", + "memory", "v1" ], - "summary": "Get the OpenBot plugins catalog", - "description": "Returns the MCP providers, accounts, servers, skills, providers, and registries needed by the OpenBot plugins screen in one request.", - "operationId": "get-openbot-plugins-catalog", + "summary": "Remove a memory-bank ownership grant", + "description": "Idempotently remove one ownership grant while retaining at least one owner for a private plane.", + "operationId": "remove-memory-bank-ownership-grant", "parameters": [ { "name": "team_id", @@ -25700,54 +24373,24 @@ } }, { - "name": "team_id", + "name": "bank_id", "in": "path", - "description": "Team ID", "required": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenBotPluginsCatalogResponse" - } - } + "$ref": "#/components/schemas/WrappedUuidV4" } - } - }, - "security": [ - { - "api_key": [] }, { - "bearer_token": [] - } - ] - } - }, - "/api/v1/team/{team_id}/provider-setup/catalog": { - "get": { - "summary": "List generic provider setup descriptors", - "description": "Returns server-authored provider setup descriptors for a product domain.", - "operationId": "provider_setup_catalog", - "parameters": [ - { - "name": "team_id", + "name": "principal_type", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/ResourcePrincipalType" } }, { - "name": "domain", - "in": "query", + "name": "principal_id", + "in": "path", "required": true, "schema": { "type": "string" @@ -25765,23 +24408,20 @@ ], "responses": { "200": { - "description": "Provider setup catalog", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListProviderSetupCatalogResponse" - } - } - } + "description": "" } } } }, - "/api/v1/team/{team_id}/provider-setup/start": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/recall": { "post": { - "summary": "Start generic provider setup", - "description": "Starts a server-authored provider setup workflow and returns the next generic UI action.", - "operationId": "provider_setup_start", + "tags": [ + "memory", + "v1" + ], + "summary": "Recall memory", + "description": "Semantically recall relevant content from the selected memory bank.", + "operationId": "recall-memory", "parameters": [ { "name": "team_id", @@ -25791,6 +24431,14 @@ "type": "string" } }, + { + "name": "bank_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, { "name": "team_id", "in": "path", @@ -25805,7 +24453,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StartProviderSetupBody" + "$ref": "#/components/schemas/RecallMemoryBody" } } }, @@ -25813,11 +24461,11 @@ }, "responses": { "200": { - "description": "Provider setup response", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderSetupResponse" + "$ref": "#/components/schemas/MemoryOperationResponse" } } } @@ -25825,11 +24473,15 @@ } } }, - "/api/v1/team/{team_id}/provider-setup/{setup_id}/resume": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/reflect": { "post": { - "summary": "Resume generic provider setup", - "description": "Resumes a server-authored provider setup workflow after user input or a provider callback.", - "operationId": "provider_setup_resume", + "tags": [ + "memory", + "v1" + ], + "summary": "Reflect on memory", + "description": "Generate a contextual answer from the selected memory bank.", + "operationId": "reflect-memory", "parameters": [ { "name": "team_id", @@ -25840,11 +24492,11 @@ } }, { - "name": "setup_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -25861,7 +24513,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResumeProviderSetupBody" + "$ref": "#/components/schemas/ReflectMemoryBody" } } }, @@ -25869,11 +24521,11 @@ }, "responses": { "200": { - "description": "Provider setup response", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderSetupResponse" + "$ref": "#/components/schemas/MemoryOperationResponse" } } } @@ -25881,94 +24533,30 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile": { - "get": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/retain": { + "post": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "List reverse proxy profiles", - "description": "Paginated list of reverse proxy profiles for the given team.", - "operationId": "reverse_proxy_list_profiles", + "summary": "Retain a memory document", + "description": "Upsert a provider-neutral document into the selected memory bank.", + "operationId": "retain-memory-document", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": [ - "string", - "null" - ] - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "Paginated reverse proxy profiles", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReverseProxyProfilePaginatedResponse" - } - } - } }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "post": { - "tags": [ - "reverse-proxy", - "v1" - ], - "summary": "Create reverse proxy profile", - "description": "Create a reverse proxy profile binding a credential, base_url, and template.", - "operationId": "reverse_proxy_create_profile", - "parameters": [ { - "name": "team_id", + "name": "bank_id", "in": "path", - "description": "Team ID", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -25985,7 +24573,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateReverseProxyProfileInner" + "$ref": "#/components/schemas/RetainMemoryBody" } } }, @@ -25993,31 +24581,11 @@ }, "responses": { "200": { - "description": "Created reverse proxy profile", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReverseProxyProfile" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/MemoryOperationResponse" } } } @@ -26025,75 +24593,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/template": { "get": { "tags": [ - "reverse-proxy", - "v1" - ], - "summary": "Get reverse proxy profile", - "description": "Retrieve a reverse proxy profile by id.", - "operationId": "reverse_proxy_get_profile", - "parameters": [ - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "profile_id", - "in": "path", - "description": "Profile slug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The reverse proxy profile", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReverseProxyProfile" - } - } - } - }, - "404": { - "description": "Profile not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "delete": { - "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "Delete reverse proxy profile", - "description": "Delete a profile. Requires ownership-plane access.", - "operationId": "reverse_proxy_delete_profile", + "summary": "Export memory bank template", + "description": "Export portable configuration overrides, mental models, and directives.", + "operationId": "export-memory-bank-template", "parameters": [ { "name": "team_id", @@ -26104,11 +24612,11 @@ } }, { - "name": "profile_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -26123,45 +24631,40 @@ ], "responses": { "200": { - "description": "" - }, - "404": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/MemoryBankTemplate" } } } } } }, - "patch": { + "post": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "Update reverse proxy profile", - "description": "Partial update of a reverse proxy profile. Only fields supplied as Some are written.", - "operationId": "reverse_proxy_update_profile", + "summary": "Import memory bank template", + "description": "Validate or apply portable configuration, mental models, and directives.", + "operationId": "import-memory-bank-template", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "profile_id", + "name": "bank_id", "in": "path", - "description": "Profile slug", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -26173,44 +24676,24 @@ "type": "string" } } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateReverseProxyProfileInner" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Updated reverse proxy profile", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReverseProxyProfile" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportMemoryBankTemplateBody" } } }, - "404": { - "description": "Profile not found", + "required": true + }, + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/ImportMemoryBankTemplateResponse" } } } @@ -26218,15 +24701,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/ownership": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/visibility": { "post": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "Set reverse proxy profile ownership", - "description": "Set one reverse proxy profile authorization plane.", - "operationId": "reverse_proxy_set_profile_ownership", + "summary": "Set memory-bank visibility", + "description": "Set the memory bank discovery and content-use plane to team or private. Requires ownership-plane authority.", + "operationId": "set-memory-bank-visibility", "parameters": [ { "name": "team_id", @@ -26237,11 +24720,11 @@ } }, { - "name": "profile_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -26278,15 +24761,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/ownership/grants": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/visibility/grants": { "get": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "List reverse proxy ownership grants", - "description": "List grants. Requires ownership-plane access.", - "operationId": "reverse_proxy_list_profile_ownership_grants", + "summary": "List memory-bank visibility grants", + "description": "List users and groups admitted to private memory-bank visibility. Requires ownership-plane authority.", + "operationId": "list-memory-bank-visibility-grants", "parameters": [ { "name": "team_id", @@ -26297,11 +24780,11 @@ } }, { - "name": "profile_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -26332,12 +24815,12 @@ }, "post": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "Add reverse proxy ownership grant", - "description": "Add a same-team user or group grant.", - "operationId": "reverse_proxy_add_profile_ownership_grant", + "summary": "Add a memory-bank visibility grant", + "description": "Idempotently grant a same-team Identity user or group private visibility.", + "operationId": "add-memory-bank-visibility-grant", "parameters": [ { "name": "team_id", @@ -26348,11 +24831,11 @@ } }, { - "name": "profile_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -26389,15 +24872,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/ownership/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/memory/banks/{bank_id}/visibility/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "Remove reverse proxy ownership grant", - "description": "Remove a grant idempotently.", - "operationId": "reverse_proxy_remove_profile_ownership_grant", + "summary": "Remove a memory-bank visibility grant", + "description": "Idempotently remove one private visibility grant.", + "operationId": "remove-memory-bank-visibility-grant", "parameters": [ { "name": "team_id", @@ -26408,11 +24891,11 @@ } }, { - "name": "profile_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -26448,15 +24931,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/visibility": { - "post": { + "/api/v1/team/{team_id}/memory/banks/{memory_bank_id}/source-bindings": { + "get": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "Set reverse proxy profile visibility", - "description": "Set one reverse proxy profile authorization plane.", - "operationId": "reverse_proxy_set_profile_visibility", + "summary": "List memory-bank sources", + "description": "Inspect all active source bindings and synchronization state for one memory bank.", + "operationId": "list-memory-bank-source-bindings", "parameters": [ { "name": "team_id", @@ -26467,11 +24950,11 @@ } }, { - "name": "profile_id", + "name": "memory_bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -26484,23 +24967,16 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "type": "array", + "items": { + "$ref": "#/components/schemas/MemorySourceBinding" + } } } } @@ -26508,15 +24984,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/visibility/grants": { + "/api/v1/team/{team_id}/memory/source-bindings": { "get": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "List reverse proxy visibility grants", - "description": "List grants. Requires ownership-plane access.", - "operationId": "reverse_proxy_list_profile_visibility_grants", + "summary": "List source memory-bank bindings", + "description": "Inspect the selected banks and synchronization state for one source.", + "operationId": "list-memory-source-bindings", "parameters": [ { "name": "team_id", @@ -26527,8 +25003,16 @@ } }, { - "name": "profile_id", - "in": "path", + "name": "source_kind", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/MemorySourceKind" + } + }, + { + "name": "source_id", + "in": "query", "required": true, "schema": { "type": "string" @@ -26552,7 +25036,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ResourceGrant" + "$ref": "#/components/schemas/MemorySourceBinding" } } } @@ -26560,14 +25044,14 @@ } } }, - "post": { + "put": { "tags": [ - "reverse-proxy", + "memory", "v1" ], - "summary": "Add reverse proxy visibility grant", - "description": "Add a same-team user or group grant.", - "operationId": "reverse_proxy_add_profile_visibility_grant", + "summary": "Replace source memory-bank bindings", + "description": "Atomically replace a source's selected banks and durably queue a full backfill.", + "operationId": "replace-memory-source-bindings", "parameters": [ { "name": "team_id", @@ -26578,7 +25062,54 @@ } }, { - "name": "profile_id", + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplaceMemoryBankBindingsBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemorySourceBinding" + } + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/memory/source-bindings/retry": { + "post": { + "tags": [ + "memory", + "v1" + ], + "summary": "Retry source synchronization", + "description": "Retry every memory-bank binding for a source.", + "operationId": "retry-memory-source-sync", + "parameters": [ + { + "name": "team_id", "in": "path", "required": true, "schema": { @@ -26599,7 +25130,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" + "$ref": "#/components/schemas/RetryMemorySourceBody" } } }, @@ -26611,7 +25142,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceGrant" + "type": "array", + "items": { + "$ref": "#/components/schemas/MemorySourceBinding" + } } } } @@ -26619,15 +25153,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/visibility/grants/{principal_type}/{principal_id}": { - "delete": { + "/api/v1/team/{team_id}/openbot/agents/{agent_id}/bundle": { + "put": { "tags": [ - "reverse-proxy", + "openbot", "v1" ], - "summary": "Remove reverse proxy visibility grant", - "description": "Remove a grant idempotently.", - "operationId": "reverse_proxy_remove_profile_visibility_grant", + "summary": "Reconcile OpenBot agent bundle", + "description": "Idempotently reconciles the agent, ChatKit workspace channel, authored skills and registry, MCP server, and tool-group bindings in one request.", + "operationId": "reconcile-openbot-agent-bundle", "parameters": [ { "name": "team_id", @@ -26638,7 +25172,7 @@ } }, { - "name": "profile_id", + "name": "agent_id", "in": "path", "required": true, "schema": { @@ -26646,15 +25180,59 @@ } }, { - "name": "principal_type", + "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { - "$ref": "#/components/schemas/ResourcePrincipalType" + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReconcileOpenBotAgentBundleBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReconcileOpenBotAgentBundleResponse" + } + } } + } + }, + "security": [ + { + "api_key": [] }, { - "name": "principal_id", + "bearer_token": [] + } + ] + } + }, + "/api/v1/team/{team_id}/openbot/plugins/catalog": { + "get": { + "tags": [ + "openbot", + "v1" + ], + "summary": "Get the OpenBot plugins catalog", + "description": "Returns the MCP providers, accounts, servers, skills, providers, and registries needed by the OpenBot plugins screen in one request.", + "operationId": "get-openbot-plugins-catalog", + "parameters": [ + { + "name": "team_id", "in": "path", "required": true, "schema": { @@ -26673,21 +25251,86 @@ ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenBotPluginsCatalogResponse" + } + } + } } - } + }, + "security": [ + { + "api_key": [] + }, + { + "bearer_token": [] + } + ] } }, - "/api/v1/team/{team_id}/reverse-proxy/provider": { + "/api/v1/team/{team_id}/provider-setup/catalog": { "get": { - "tags": [ - "reverse-proxy", - "v1" + "summary": "List generic provider setup descriptors", + "description": "Returns server-authored provider setup descriptors for a product domain.", + "operationId": "provider_setup_catalog", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "domain", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "List reverse proxy providers", - "description": "Providers registered with the reverse-proxy. Driven by the in-process `ReverseProxyProviderRegistry`; transport-only templates (no model catalogue).", - "operationId": "reverse_proxy_list_providers", + "responses": { + "200": { + "description": "Provider setup catalog", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListProviderSetupCatalogResponse" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/provider-setup/start": { + "post": { + "summary": "Start generic provider setup", + "description": "Starts a server-authored provider setup workflow and returns the next generic UI action.", + "operationId": "provider_setup_start", "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "team_id", "in": "path", @@ -26696,6 +25339,53 @@ "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProviderSetupBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Provider setup response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderSetupResponse" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/provider-setup/{setup_id}/resume": { + "post": { + "summary": "Resume generic provider setup", + "description": "Resumes a server-authored provider setup workflow after user input or a provider callback.", + "operationId": "provider_setup_resume", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "setup_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } }, { "name": "team_id", @@ -26707,13 +25397,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResumeProviderSetupBody" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Registered reverse proxy providers", + "description": "Provider setup response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListReverseProxyProvidersResponse" + "$ref": "#/components/schemas/ProviderSetupResponse" } } } @@ -26721,14 +25421,15 @@ } } }, - "/api/v1/team/{team_id}/reverse-proxy/{profile_id}/{*rest}": { + "/api/v1/team/{team_id}/reverse-proxy/profile": { "get": { "tags": [ - "reverse-proxy" + "reverse-proxy", + "v1" ], - "summary": "Proxy GET through profile", - "description": "Forward a GET to the profile's upstream with materialized credential headers.", - "operationId": "reverse_proxy_proxy_get", + "summary": "List reverse proxy profiles", + "description": "Paginated list of reverse proxy profiles for the given team.", + "operationId": "reverse_proxy_list_profiles", "parameters": [ { "name": "team_id", @@ -26740,18 +25441,71 @@ } }, { - "name": "profile_id", + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": [ + "string", + "null" + ] + } + }, + { + "name": "team_id", "in": "path", - "description": "Profile slug", + "description": "Team ID", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Paginated reverse proxy profiles", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReverseProxyProfilePaginatedResponse" + } + } + } }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "tags": [ + "reverse-proxy", + "v1" + ], + "summary": "Create reverse proxy profile", + "description": "Create a reverse proxy profile binding a credential, base_url, and template.", + "operationId": "reverse_proxy_create_profile", + "parameters": [ { - "name": "rest", + "name": "team_id", "in": "path", - "description": "Path tail forwarded to upstream", + "description": "Team ID", "required": true, "schema": { "type": "string" @@ -26767,19 +25521,59 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReverseProxyProfileInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Upstream response (streamed)" + "description": "Created reverse proxy profile", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReverseProxyProfile" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - }, - "post": { + } + }, + "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}": { + "get": { "tags": [ - "reverse-proxy" + "reverse-proxy", + "v1" ], - "summary": "Proxy POST through profile", - "description": "Forward a POST to the profile's upstream with materialized credential headers.", - "operationId": "reverse_proxy_proxy_post", + "summary": "Get reverse proxy profile", + "description": "Retrieve a reverse proxy profile by id.", + "operationId": "reverse_proxy_get_profile", "parameters": [ { "name": "team_id", @@ -26799,15 +25593,6 @@ "type": "string" } }, - { - "name": "rest", - "in": "path", - "description": "Path tail forwarded to upstream", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -26820,66 +25605,51 @@ ], "responses": { "200": { - "description": "Upstream response (streamed)" + "description": "The reverse proxy profile", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReverseProxyProfile" + } + } + } + }, + "404": { + "description": "Profile not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } - } - }, - "/api/v1/team/{team_id}/signals/deliveries": { - "get": { + }, + "delete": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "summary": "List signal deliveries", - "description": "List signal deliveries.", - "operationId": "signals-list-deliveries", + "summary": "Delete reverse proxy profile", + "description": "Delete a profile. Requires ownership-plane access.", + "operationId": "reverse_proxy_delete_profile", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "instance_id", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "status", - "in": "query", - "required": false, + "name": "profile_id", + "in": "path", + "required": true, "schema": { "type": "string" - }, - "style": "form" + } }, { "name": "team_id", @@ -26893,45 +25663,45 @@ ], "responses": { "200": { + "description": "" + }, + "404": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalDelivery" - } + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/api/v1/team/{team_id}/signals/deliveries/{delivery_id}": { - "get": { + }, + "patch": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "summary": "Get signal delivery", - "description": "Get signal delivery.", - "operationId": "signals-get-delivery", + "summary": "Update reverse proxy profile", + "description": "Partial update of a reverse proxy profile. Only fields supplied as Some are written.", + "operationId": "reverse_proxy_update_profile", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "delivery_id", + "name": "profile_id", "in": "path", + "description": "Profile slug", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -26944,13 +25714,43 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateReverseProxyProfileInner" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "", + "description": "Updated reverse proxy profile", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalDelivery" + "$ref": "#/components/schemas/ReverseProxyProfile" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Profile not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -26958,15 +25758,15 @@ } } }, - "/api/v1/team/{team_id}/signals/deliveries/{delivery_id}/retry": { + "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/ownership": { "post": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "summary": "Retry signal delivery", - "description": "Retry signal delivery.", - "operationId": "signals-retry-delivery", + "summary": "Set reverse proxy profile ownership", + "description": "Set one reverse proxy profile authorization plane.", + "operationId": "reverse_proxy_set_profile_ownership", "parameters": [ { "name": "team_id", @@ -26977,11 +25777,11 @@ } }, { - "name": "delivery_id", + "name": "profile_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -26994,13 +25794,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetResourceAccessModeRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalDelivery" + "$ref": "#/components/schemas/ResourceAuthorization" } } } @@ -27008,61 +25818,31 @@ } } }, - "/api/v1/team/{team_id}/signals/instances": { + "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/ownership/grants": { "get": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "summary": "List signal provider instances", - "description": "List configured signal provider instances.", - "operationId": "signals-list-provider-instances", + "summary": "List reverse proxy ownership grants", + "description": "List grants. Requires ownership-plane access.", + "operationId": "reverse_proxy_list_profile_ownership_grants", "parameters": [ { "name": "team_id", "in": "path", - "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "provider_type", - "in": "query", - "required": false, + "name": "profile_id", + "in": "path", + "required": true, "schema": { "type": "string" - }, - "style": "form" + } }, { "name": "team_id", @@ -27082,7 +25862,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/SignalProviderInstance" + "$ref": "#/components/schemas/ResourceGrant" } } } @@ -27092,12 +25872,12 @@ }, "post": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "summary": "Create signal provider instance", - "description": "Create a team-scoped signal provider instance.", - "operationId": "signals-create-provider-instance", + "summary": "Add reverse proxy ownership grant", + "description": "Add a same-team user or group grant.", + "operationId": "reverse_proxy_add_profile_ownership_grant", "parameters": [ { "name": "team_id", @@ -27107,6 +25887,14 @@ "type": "string" } }, + { + "name": "profile_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "team_id", "in": "path", @@ -27121,7 +25909,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSignalProviderInstanceRequestInner" + "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" } } }, @@ -27133,7 +25921,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalProviderInstance" + "$ref": "#/components/schemas/ResourceGrant" } } } @@ -27141,13 +25929,15 @@ } } }, - "/api/v1/team/{team_id}/signals/instances/{id}/ownership": { - "post": { + "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/ownership/grants/{principal_type}/{principal_id}": { + "delete": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "operationId": "set-signal-provider-ownership", + "summary": "Remove reverse proxy ownership grant", + "description": "Remove a grant idempotently.", + "operationId": "reverse_proxy_remove_profile_ownership_grant", "parameters": [ { "name": "team_id", @@ -27158,7 +25948,23 @@ } }, { - "name": "id", + "name": "profile_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "principal_type", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ResourcePrincipalType" + } + }, + { + "name": "principal_id", "in": "path", "required": true, "schema": { @@ -27175,37 +25981,22 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" - } - } - } + "description": "" } } } }, - "/api/v1/team/{team_id}/signals/instances/{id}/visibility": { + "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/visibility": { "post": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "operationId": "set-signal-provider-visibility", + "summary": "Set reverse proxy profile visibility", + "description": "Set one reverse proxy profile authorization plane.", + "operationId": "reverse_proxy_set_profile_visibility", "parameters": [ { "name": "team_id", @@ -27216,7 +26007,7 @@ } }, { - "name": "id", + "name": "profile_id", "in": "path", "required": true, "schema": { @@ -27257,13 +26048,15 @@ } } }, - "/api/v1/team/{team_id}/signals/instances/{id}/{plane}/grants": { + "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/visibility/grants": { "get": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "operationId": "list-signal-provider-grants", + "summary": "List reverse proxy visibility grants", + "description": "List grants. Requires ownership-plane access.", + "operationId": "reverse_proxy_list_profile_visibility_grants", "parameters": [ { "name": "team_id", @@ -27274,21 +26067,13 @@ } }, { - "name": "id", + "name": "profile_id", "in": "path", "required": true, "schema": { "type": "string" } }, - { - "name": "plane", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" - } - }, { "name": "team_id", "in": "path", @@ -27317,10 +26102,12 @@ }, "post": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "operationId": "add-signal-provider-grant", + "summary": "Add reverse proxy visibility grant", + "description": "Add a same-team user or group grant.", + "operationId": "reverse_proxy_add_profile_visibility_grant", "parameters": [ { "name": "team_id", @@ -27331,21 +26118,13 @@ } }, { - "name": "id", + "name": "profile_id", "in": "path", "required": true, "schema": { "type": "string" } }, - { - "name": "plane", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" - } - }, { "name": "team_id", "in": "path", @@ -27380,13 +26159,15 @@ } } }, - "/api/v1/team/{team_id}/signals/instances/{id}/{plane}/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/reverse-proxy/profile/{profile_id}/visibility/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "operationId": "remove-signal-provider-grant", + "summary": "Remove reverse proxy visibility grant", + "description": "Remove a grant idempotently.", + "operationId": "reverse_proxy_remove_profile_visibility_grant", "parameters": [ { "name": "team_id", @@ -27397,21 +26178,13 @@ } }, { - "name": "id", + "name": "profile_id", "in": "path", "required": true, "schema": { "type": "string" } }, - { - "name": "plane", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" - } - }, { "name": "principal_type", "in": "path", @@ -27445,27 +26218,20 @@ } } }, - "/api/v1/team/{team_id}/signals/instances/{instance_id}": { + "/api/v1/team/{team_id}/reverse-proxy/provider": { "get": { "tags": [ - "signals", + "reverse-proxy", "v1" ], - "summary": "Get signal provider instance", - "description": "Get a configured signal provider instance.", - "operationId": "signals-get-provider-instance", + "summary": "List reverse proxy providers", + "description": "Providers registered with the reverse-proxy. Driven by the in-process `ReverseProxyProviderRegistry`; transport-only templates (no model catalogue).", + "operationId": "reverse_proxy_list_providers", "parameters": [ { "name": "team_id", "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "instance_id", - "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" @@ -27483,37 +26249,49 @@ ], "responses": { "200": { - "description": "", + "description": "Registered reverse proxy providers", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalProviderInstance" + "$ref": "#/components/schemas/ListReverseProxyProvidersResponse" } } } } } - }, - "delete": { + } + }, + "/api/v1/team/{team_id}/reverse-proxy/{profile_id}/{*rest}": { + "get": { "tags": [ - "signals", - "v1" + "reverse-proxy" ], - "summary": "Delete signal provider instance", - "description": "Delete a configured signal provider instance.", - "operationId": "signals-delete-provider-instance", + "summary": "Proxy GET through profile", + "description": "Forward a GET to the profile's upstream with materialized credential headers.", + "operationId": "reverse_proxy_proxy_get", "parameters": [ { "name": "team_id", "in": "path", + "description": "Team ID", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", + "name": "profile_id", + "in": "path", + "description": "Profile slug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "rest", "in": "path", + "description": "Path tail forwarded to upstream", "required": true, "schema": { "type": "string" @@ -27531,42 +26309,18 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteSignalResponse" - } - } - } + "description": "Upstream response (streamed)" } } }, - "patch": { + "post": { "tags": [ - "signals", - "v1" + "reverse-proxy" ], - "summary": "Update signal provider instance", - "description": "Update a configured signal provider instance.", - "operationId": "signals-update-provider-instance", + "summary": "Proxy POST through profile", + "description": "Forward a POST to the profile's upstream with materialized credential headers.", + "operationId": "reverse_proxy_proxy_post", "parameters": [ - { - "name": "team_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "team_id", "in": "path", @@ -27575,53 +26329,20 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSignalProviderInstanceRequestInner" - } - } }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignalProviderInstance" - } - } - } - } - } - } - }, - "/api/v1/team/{team_id}/signals/instances/{instance_id}/test": { - "post": { - "tags": [ - "signals", - "v1" - ], - "summary": "Trigger fake signal", - "description": "Trigger a fake signal for testing.", - "operationId": "signals-trigger-fake", - "parameters": [ { - "name": "team_id", + "name": "profile_id", "in": "path", + "description": "Profile slug", "required": true, "schema": { "type": "string" } }, { - "name": "instance_id", + "name": "rest", "in": "path", + "description": "Path tail forwarded to upstream", "required": true, "schema": { "type": "string" @@ -27637,39 +26358,22 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerFakeSignalRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IngestSignalResponse" - } - } - } + "description": "Upstream response (streamed)" } } } }, - "/api/v1/team/{team_id}/signals/providers": { + "/api/v1/team/{team_id}/signals/deliveries": { "get": { "tags": [ "signals", "v1" ], - "summary": "List available signal providers", - "description": "List registered signal provider source types.", - "operationId": "signals-list-available-providers", + "summary": "List signal deliveries", + "description": "List signal deliveries.", + "operationId": "signals-list-deliveries", "parameters": [ { "name": "team_id", @@ -27699,6 +26403,24 @@ }, "style": "form" }, + { + "name": "instance_id", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, { "name": "team_id", "in": "path", @@ -27715,10 +26437,107 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalProviderSourceSerialized" - } + "$ref": "#/components/schemas/SignalDeliveryPaginatedResponse" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/signals/deliveries/{delivery_id}": { + "get": { + "tags": [ + "signals", + "v1" + ], + "summary": "Get signal delivery", + "description": "Get signal delivery.", + "operationId": "signals-get-delivery", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "delivery_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalDelivery" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/signals/deliveries/{delivery_id}/retry": { + "post": { + "tags": [ + "signals", + "v1" + ], + "summary": "Retry signal delivery", + "description": "Retry signal delivery.", + "operationId": "signals-retry-delivery", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "delivery_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalDelivery" } } } @@ -27726,15 +26545,15 @@ } } }, - "/api/v1/team/{team_id}/signals/rules": { + "/api/v1/team/{team_id}/signals/instances": { "get": { "tags": [ "signals", "v1" ], - "summary": "List SignalRules", - "description": "List SignalRules.", - "operationId": "signals-list-rules", + "summary": "List signal provider instances", + "description": "List configured signal provider instances.", + "operationId": "signals-list-provider-instances", "parameters": [ { "name": "team_id", @@ -27765,7 +26584,7 @@ "style": "form" }, { - "name": "instance_id", + "name": "status", "in": "query", "required": false, "schema": { @@ -27774,7 +26593,7 @@ "style": "form" }, { - "name": "status", + "name": "provider_type", "in": "query", "required": false, "schema": { @@ -27798,10 +26617,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalRule" - } + "$ref": "#/components/schemas/SignalProviderInstancePaginatedResponse" } } } @@ -27813,9 +26629,9 @@ "signals", "v1" ], - "summary": "Create SignalRule", - "description": "Create a SignalRule mapping incoming signals to ChatKit actions.", - "operationId": "signals-create-rule", + "summary": "Create signal provider instance", + "description": "Create a team-scoped signal provider instance.", + "operationId": "signals-create-provider-instance", "parameters": [ { "name": "team_id", @@ -27839,7 +26655,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSignalRuleRequestInner" + "$ref": "#/components/schemas/CreateSignalProviderInstanceRequestInner" } } }, @@ -27851,7 +26667,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalRule" + "$ref": "#/components/schemas/SignalProviderInstance" } } } @@ -27859,13 +26675,13 @@ } } }, - "/api/v1/team/{team_id}/signals/rules/{id}/ownership": { + "/api/v1/team/{team_id}/signals/instances/{id}/ownership": { "post": { "tags": [ "signals", "v1" ], - "operationId": "set-signal-rule-ownership", + "operationId": "set-signal-provider-ownership", "parameters": [ { "name": "team_id", @@ -27880,7 +26696,7 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -27917,13 +26733,13 @@ } } }, - "/api/v1/team/{team_id}/signals/rules/{id}/visibility": { + "/api/v1/team/{team_id}/signals/instances/{id}/visibility": { "post": { "tags": [ "signals", "v1" ], - "operationId": "set-signal-rule-visibility", + "operationId": "set-signal-provider-visibility", "parameters": [ { "name": "team_id", @@ -27938,7 +26754,7 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -27975,13 +26791,13 @@ } } }, - "/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants": { + "/api/v1/team/{team_id}/signals/instances/{id}/{plane}/grants": { "get": { "tags": [ "signals", "v1" ], - "operationId": "list-signal-rule-grants", + "operationId": "list-signal-provider-grants", "parameters": [ { "name": "team_id", @@ -27996,7 +26812,7 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -28038,7 +26854,7 @@ "signals", "v1" ], - "operationId": "add-signal-rule-grant", + "operationId": "add-signal-provider-grant", "parameters": [ { "name": "team_id", @@ -28053,7 +26869,7 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -28098,13 +26914,13 @@ } } }, - "/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/signals/instances/{id}/{plane}/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ "signals", "v1" ], - "operationId": "remove-signal-rule-grant", + "operationId": "remove-signal-provider-grant", "parameters": [ { "name": "team_id", @@ -28119,7 +26935,7 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -28163,15 +26979,15 @@ } } }, - "/api/v1/team/{team_id}/signals/rules/{rule_id}": { + "/api/v1/team/{team_id}/signals/instances/{instance_id}": { "get": { "tags": [ "signals", "v1" ], - "summary": "Get SignalRule", - "description": "Get a SignalRule.", - "operationId": "signals-get-rule", + "summary": "Get signal provider instance", + "description": "Get a configured signal provider instance.", + "operationId": "signals-get-provider-instance", "parameters": [ { "name": "team_id", @@ -28182,11 +26998,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -28205,7 +27021,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalRule" + "$ref": "#/components/schemas/SignalProviderInstance" } } } @@ -28217,9 +27033,9 @@ "signals", "v1" ], - "summary": "Delete SignalRule", - "description": "Delete a SignalRule.", - "operationId": "signals-delete-rule", + "summary": "Delete signal provider instance", + "description": "Delete a configured signal provider instance.", + "operationId": "signals-delete-provider-instance", "parameters": [ { "name": "team_id", @@ -28230,11 +27046,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -28265,9 +27081,9 @@ "signals", "v1" ], - "summary": "Update SignalRule", - "description": "Update a SignalRule.", - "operationId": "signals-update-rule", + "summary": "Update signal provider instance", + "description": "Update a configured signal provider instance.", + "operationId": "signals-update-provider-instance", "parameters": [ { "name": "team_id", @@ -28278,11 +27094,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -28299,7 +27115,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSignalRuleRequestInner" + "$ref": "#/components/schemas/UpdateSignalProviderInstanceRequestInner" } } }, @@ -28311,7 +27127,129 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalRule" + "$ref": "#/components/schemas/SignalProviderInstance" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/signals/instances/{instance_id}/test": { + "post": { + "tags": [ + "signals", + "v1" + ], + "summary": "Trigger fake signal", + "description": "Trigger a fake signal for testing.", + "operationId": "signals-trigger-fake", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "instance_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerFakeSignalRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IngestSignalResponse" + } + } + } + } + } + } + }, + "/api/v1/team/{team_id}/signals/providers": { + "get": { + "tags": [ + "signals", + "v1" + ], + "summary": "List available signal providers", + "description": "List registered signal provider source types.", + "operationId": "signals-list-available-providers", + "parameters": [ + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "team_id", + "in": "path", + "description": "Team ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalProviderSourceSerializedPaginatedResponse" } } } @@ -37381,480 +36319,13 @@ } } } - }, - "delete": { - "tags": [ - "memory", - "v1" - ], - "operationId": "delete-personal-memory-document", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteMemoryDocumentBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/documents/{document_id}": { - "get": { - "tags": [ - "memory", - "v1" - ], - "operationId": "get-personal-memory-bank-document", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "document_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/health": { - "get": { - "tags": [ - "memory", - "v1" - ], - "operationId": "check-personal-memory-bank-health", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBankHealth" - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/ownership": { - "post": { - "tags": [ - "memory", - "v1" - ], - "summary": "Set personal memory-bank ownership", - "description": "Set the personal memory bank administration plane. Requires current ownership-plane authority.", - "operationId": "set-personal-memory-bank-ownership-mode", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/ownership/grants": { - "get": { - "tags": [ - "memory", - "v1" - ], - "summary": "List personal memory-bank ownership grants", - "description": "List users and groups admitted to private administration.", - "operationId": "list-personal-memory-bank-ownership-grants", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrant" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "memory", - "v1" - ], - "summary": "Add a personal memory-bank ownership grant", - "description": "Idempotently grant a same-organization Identity user or group private administration.", - "operationId": "add-personal-memory-bank-ownership-grant", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateResourcePlaneGrantRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceGrant" - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/ownership/grants/{principal_type}/{principal_id}": { - "delete": { - "tags": [ - "memory", - "v1" - ], - "summary": "Remove a personal memory-bank ownership grant", - "description": "Idempotently remove one ownership grant while retaining at least one owner for a private plane.", - "operationId": "remove-personal-memory-bank-ownership-grant", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - }, - { - "name": "principal_type", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/ResourcePrincipalType" - } - }, - { - "name": "principal_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/recall": { - "post": { - "tags": [ - "memory", - "v1" - ], - "operationId": "recall-personal-memory", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecallMemoryBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryOperationResponse" - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/reflect": { - "post": { - "tags": [ - "memory", - "v1" - ], - "operationId": "reflect-personal-memory", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReflectMemoryBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryOperationResponse" - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/retain": { - "post": { - "tags": [ - "memory", - "v1" - ], - "operationId": "retain-personal-memory-document", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bank_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RetainMemoryBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryOperationResponse" - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/source-bindings": { - "get": { + }, + "delete": { "tags": [ "memory", "v1" ], - "operationId": "list-personal-memory-bank-source-bindings", + "operationId": "delete-personal-memory-document", "parameters": [ { "name": "user_id", @@ -37873,30 +36344,30 @@ } } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySourceBinding" - } - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteMemoryDocumentBody" } } + }, + "required": true + }, + "responses": { + "200": { + "description": "" } } } }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/template": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/documents/{document_id}": { "get": { "tags": [ "memory", "v1" ], - "operationId": "export-personal-memory-bank-template", + "operationId": "get-personal-memory-bank-document", "parameters": [ { "name": "user_id", @@ -37913,6 +36384,14 @@ "schema": { "$ref": "#/components/schemas/WrappedUuidV4" } + }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -37920,20 +36399,20 @@ "description": "", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryBankTemplate" - } + "schema": {} } } } } - }, - "post": { + } + }, + "/api/v1/user/{user_id}/memory/banks/{bank_id}/health": { + "get": { "tags": [ "memory", "v1" ], - "operationId": "import-personal-memory-bank-template", + "operationId": "check-personal-memory-bank-health", "parameters": [ { "name": "user_id", @@ -37952,23 +36431,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImportMemoryBankTemplateBody" - } - } - }, - "required": true - }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImportMemoryBankTemplateResponse" + "$ref": "#/components/schemas/MemoryBankHealth" } } } @@ -37976,15 +36445,15 @@ } } }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/visibility": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/ownership": { "post": { "tags": [ "memory", "v1" ], - "summary": "Set personal memory-bank visibility", - "description": "Set the personal memory bank discovery and content-use plane. Requires ownership-plane authority.", - "operationId": "set-personal-memory-bank-visibility", + "summary": "Set personal memory-bank ownership", + "description": "Set the personal memory bank administration plane. Requires current ownership-plane authority.", + "operationId": "set-personal-memory-bank-ownership-mode", "parameters": [ { "name": "user_id", @@ -38027,15 +36496,15 @@ } } }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/visibility/grants": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/ownership/grants": { "get": { "tags": [ "memory", "v1" ], - "summary": "List personal memory-bank visibility grants", - "description": "List users and groups admitted to private visibility.", - "operationId": "list-personal-memory-bank-visibility-grants", + "summary": "List personal memory-bank ownership grants", + "description": "List users and groups admitted to private administration.", + "operationId": "list-personal-memory-bank-ownership-grants", "parameters": [ { "name": "user_id", @@ -38075,9 +36544,9 @@ "memory", "v1" ], - "summary": "Add a personal memory-bank visibility grant", - "description": "Idempotently grant a same-organization Identity user or group private visibility.", - "operationId": "add-personal-memory-bank-visibility-grant", + "summary": "Add a personal memory-bank ownership grant", + "description": "Idempotently grant a same-organization Identity user or group private administration.", + "operationId": "add-personal-memory-bank-ownership-grant", "parameters": [ { "name": "user_id", @@ -38120,15 +36589,15 @@ } } }, - "/api/v1/user/{user_id}/memory/banks/{bank_id}/visibility/grants/{principal_type}/{principal_id}": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/ownership/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ "memory", "v1" ], - "summary": "Remove a personal memory-bank visibility grant", - "description": "Idempotently remove one private visibility grant.", - "operationId": "remove-personal-memory-bank-visibility-grant", + "summary": "Remove a personal memory-bank ownership grant", + "description": "Idempotently remove one ownership grant while retaining at least one owner for a private plane.", + "operationId": "remove-personal-memory-bank-ownership-grant", "parameters": [ { "name": "user_id", @@ -38170,84 +36639,13 @@ } } }, - "/api/v1/user/{user_id}/signals/deliveries": { - "get": { - "tags": [ - "signals", - "v1" - ], - "operationId": "signals-list-personal-deliveries", - "parameters": [ - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "instance_id", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalDelivery" - } - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/signals/deliveries/{delivery_id}": { - "get": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/recall": { + "post": { "tags": [ - "signals", + "memory", "v1" ], - "operationId": "signals-get-personal-delivery", + "operationId": "recall-personal-memory", "parameters": [ { "name": "user_id", @@ -38258,7 +36656,7 @@ } }, { - "name": "delivery_id", + "name": "bank_id", "in": "path", "required": true, "schema": { @@ -38266,13 +36664,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecallMemoryBody" + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalDelivery" + "$ref": "#/components/schemas/MemoryOperationResponse" } } } @@ -38280,13 +36688,13 @@ } } }, - "/api/v1/user/{user_id}/signals/deliveries/{delivery_id}/retry": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/reflect": { "post": { "tags": [ - "signals", + "memory", "v1" ], - "operationId": "signals-retry-personal-delivery", + "operationId": "reflect-personal-memory", "parameters": [ { "name": "user_id", @@ -38297,7 +36705,7 @@ } }, { - "name": "delivery_id", + "name": "bank_id", "in": "path", "required": true, "schema": { @@ -38305,13 +36713,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReflectMemoryBody" + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalDelivery" + "$ref": "#/components/schemas/MemoryOperationResponse" } } } @@ -38319,51 +36737,14 @@ } } }, - "/api/v1/user/{user_id}/signals/instances": { - "get": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/retain": { + "post": { "tags": [ - "signals", + "memory", "v1" ], - "operationId": "signals-list-personal-provider-instances", + "operationId": "retain-personal-memory-document", "parameters": [ - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "provider_type", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, { "name": "user_id", "in": "path", @@ -38371,37 +36752,13 @@ "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalProviderInstance" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "signals", - "v1" - ], - "operationId": "signals-create-personal-provider-instance", - "parameters": [ + }, { - "name": "user_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } } ], @@ -38409,7 +36766,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSignalProviderInstanceRequestInner" + "$ref": "#/components/schemas/RetainMemoryBody" } } }, @@ -38421,7 +36778,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalProviderInstance" + "$ref": "#/components/schemas/MemoryOperationResponse" } } } @@ -38429,13 +36786,13 @@ } } }, - "/api/v1/user/{user_id}/signals/instances/{instance_id}": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/source-bindings": { "get": { "tags": [ - "signals", + "memory", "v1" ], - "operationId": "signals-get-personal-provider-instance", + "operationId": "list-personal-memory-bank-source-bindings", "parameters": [ { "name": "user_id", @@ -38446,11 +36803,11 @@ } }, { - "name": "instance_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } } ], @@ -38460,19 +36817,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalProviderInstance" + "type": "array", + "items": { + "$ref": "#/components/schemas/MemorySourceBinding" + } } } } } } - }, - "delete": { + } + }, + "/api/v1/user/{user_id}/memory/banks/{bank_id}/template": { + "get": { "tags": [ - "signals", + "memory", "v1" ], - "operationId": "signals-delete-personal-provider-instance", + "operationId": "export-personal-memory-bank-template", "parameters": [ { "name": "user_id", @@ -38483,11 +36845,11 @@ } }, { - "name": "instance_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } } ], @@ -38497,70 +36859,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSignalResponse" + "$ref": "#/components/schemas/MemoryBankTemplate" } } } } } }, - "patch": { - "tags": [ - "signals", - "v1" - ], - "operationId": "signals-update-personal-provider-instance", - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateSignalProviderInstanceRequestInner" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignalProviderInstance" - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/signals/instances/{instance_id}/ownership": { "post": { "tags": [ - "signals", + "memory", "v1" ], - "summary": "Set personal signal provider ownership", - "description": "Set the persisted ownership mode for a personal signal provider. Personal providers cannot be widened to team ownership.", - "operationId": "signals-set-personal-provider-ownership", + "operationId": "import-personal-memory-bank-template", "parameters": [ { "name": "user_id", @@ -38571,11 +36882,11 @@ } }, { - "name": "instance_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } } ], @@ -38583,7 +36894,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetResourceAccessModeRequest" + "$ref": "#/components/schemas/ImportMemoryBankTemplateBody" } } }, @@ -38595,7 +36906,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceAuthorization" + "$ref": "#/components/schemas/ImportMemoryBankTemplateResponse" } } } @@ -38603,15 +36914,15 @@ } } }, - "/api/v1/user/{user_id}/signals/instances/{instance_id}/visibility": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/visibility": { "post": { "tags": [ - "signals", + "memory", "v1" ], - "summary": "Set personal signal provider visibility", - "description": "Set the persisted visibility mode for a personal signal provider. Personal providers cannot be widened to team visibility.", - "operationId": "signals-set-personal-provider-visibility", + "summary": "Set personal memory-bank visibility", + "description": "Set the personal memory bank discovery and content-use plane. Requires ownership-plane authority.", + "operationId": "set-personal-memory-bank-visibility", "parameters": [ { "name": "user_id", @@ -38622,11 +36933,11 @@ } }, { - "name": "instance_id", + "name": "bank_id", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/WrappedUuidV4" } } ], @@ -38654,15 +36965,15 @@ } } }, - "/api/v1/user/{user_id}/signals/instances/{instance_id}/{plane}/grants": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/visibility/grants": { "get": { "tags": [ - "signals", + "memory", "v1" ], - "summary": "List personal signal provider grants", - "description": "List persisted grants for one authorization plane on a personal signal provider.", - "operationId": "signals-list-personal-provider-grants", + "summary": "List personal memory-bank visibility grants", + "description": "List users and groups admitted to private visibility.", + "operationId": "list-personal-memory-bank-visibility-grants", "parameters": [ { "name": "user_id", @@ -38673,19 +36984,11 @@ } }, { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "plane", + "name": "bank_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" + "$ref": "#/components/schemas/WrappedUuidV4" } } ], @@ -38707,12 +37010,12 @@ }, "post": { "tags": [ - "signals", + "memory", "v1" ], - "summary": "Add personal signal provider grant", - "description": "Add a principal grant to the URL-selected authorization plane on a personal signal provider.", - "operationId": "signals-add-personal-provider-grant", + "summary": "Add a personal memory-bank visibility grant", + "description": "Idempotently grant a same-organization Identity user or group private visibility.", + "operationId": "add-personal-memory-bank-visibility-grant", "parameters": [ { "name": "user_id", @@ -38723,19 +37026,11 @@ } }, { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "plane", + "name": "bank_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" + "$ref": "#/components/schemas/WrappedUuidV4" } } ], @@ -38763,15 +37058,15 @@ } } }, - "/api/v1/user/{user_id}/signals/instances/{instance_id}/{plane}/grants/{principal_type}/{principal_id}": { + "/api/v1/user/{user_id}/memory/banks/{bank_id}/visibility/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ - "signals", + "memory", "v1" ], - "summary": "Remove personal signal provider grant", - "description": "Remove a principal grant from the URL-selected authorization plane on a personal signal provider.", - "operationId": "signals-remove-personal-provider-grant", + "summary": "Remove a personal memory-bank visibility grant", + "description": "Idempotently remove one private visibility grant.", + "operationId": "remove-personal-memory-bank-visibility-grant", "parameters": [ { "name": "user_id", @@ -38782,19 +37077,11 @@ } }, { - "name": "instance_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "plane", + "name": "bank_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/ResourceGrantPlane" + "$ref": "#/components/schemas/WrappedUuidV4" } }, { @@ -38821,66 +37108,13 @@ } } }, - "/api/v1/user/{user_id}/signals/providers": { - "get": { - "tags": [ - "signals", - "v1" - ], - "operationId": "signals-list-personal-available-providers", - "parameters": [ - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - }, - "style": "form" - }, - { - "name": "next_page_token", - "in": "query", - "required": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalProviderSourceSerialized" - } - } - } - } - } - } - } - }, - "/api/v1/user/{user_id}/signals/rules": { + "/api/v1/user/{user_id}/signals/deliveries": { "get": { "tags": [ "signals", "v1" ], - "operationId": "signals-list-personal-rules", + "operationId": "signals-list-personal-deliveries", "parameters": [ { "name": "page_size", @@ -38934,10 +37168,153 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalRule" - } + "$ref": "#/components/schemas/SignalDeliveryPaginatedResponse" + } + } + } + } + } + } + }, + "/api/v1/user/{user_id}/signals/deliveries/{delivery_id}": { + "get": { + "tags": [ + "signals", + "v1" + ], + "operationId": "signals-get-personal-delivery", + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "delivery_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalDelivery" + } + } + } + } + } + } + }, + "/api/v1/user/{user_id}/signals/deliveries/{delivery_id}/retry": { + "post": { + "tags": [ + "signals", + "v1" + ], + "operationId": "signals-retry-personal-delivery", + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "delivery_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/WrappedUuidV4" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalDelivery" + } + } + } + } + } + } + }, + "/api/v1/user/{user_id}/signals/instances": { + "get": { + "tags": [ + "signals", + "v1" + ], + "operationId": "signals-list-personal-provider-instances", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "provider_type", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalProviderInstancePaginatedResponse" } } } @@ -38949,7 +37326,7 @@ "signals", "v1" ], - "operationId": "signals-create-personal-rule", + "operationId": "signals-create-personal-provider-instance", "parameters": [ { "name": "user_id", @@ -38964,7 +37341,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSignalRuleRequestInner" + "$ref": "#/components/schemas/CreateSignalProviderInstanceRequestInner" } } }, @@ -38976,7 +37353,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalRule" + "$ref": "#/components/schemas/SignalProviderInstance" } } } @@ -38984,13 +37361,13 @@ } } }, - "/api/v1/user/{user_id}/signals/rules/{rule_id}": { + "/api/v1/user/{user_id}/signals/instances/{instance_id}": { "get": { "tags": [ "signals", "v1" ], - "operationId": "signals-get-personal-rule", + "operationId": "signals-get-personal-provider-instance", "parameters": [ { "name": "user_id", @@ -39001,11 +37378,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } } ], @@ -39015,7 +37392,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalRule" + "$ref": "#/components/schemas/SignalProviderInstance" } } } @@ -39027,7 +37404,7 @@ "signals", "v1" ], - "operationId": "signals-delete-personal-rule", + "operationId": "signals-delete-personal-provider-instance", "parameters": [ { "name": "user_id", @@ -39038,11 +37415,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } } ], @@ -39064,7 +37441,7 @@ "signals", "v1" ], - "operationId": "signals-update-personal-rule", + "operationId": "signals-update-personal-provider-instance", "parameters": [ { "name": "user_id", @@ -39075,11 +37452,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } } ], @@ -39087,7 +37464,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSignalRuleRequestInner" + "$ref": "#/components/schemas/UpdateSignalProviderInstanceRequestInner" } } }, @@ -39099,7 +37476,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignalRule" + "$ref": "#/components/schemas/SignalProviderInstance" } } } @@ -39107,15 +37484,15 @@ } } }, - "/api/v1/user/{user_id}/signals/rules/{rule_id}/ownership": { + "/api/v1/user/{user_id}/signals/instances/{instance_id}/ownership": { "post": { "tags": [ "signals", "v1" ], - "summary": "Set personal signal rule ownership", - "description": "Set the persisted ownership mode for a personal signal rule. Personal rules cannot be widened to team ownership.", - "operationId": "signals-set-personal-rule-ownership", + "summary": "Set personal signal provider ownership", + "description": "Set the persisted ownership mode for a personal signal provider. Personal providers cannot be widened to team ownership.", + "operationId": "signals-set-personal-provider-ownership", "parameters": [ { "name": "user_id", @@ -39126,11 +37503,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } } ], @@ -39158,15 +37535,15 @@ } } }, - "/api/v1/user/{user_id}/signals/rules/{rule_id}/visibility": { + "/api/v1/user/{user_id}/signals/instances/{instance_id}/visibility": { "post": { "tags": [ "signals", "v1" ], - "summary": "Set personal signal rule visibility", - "description": "Set the persisted visibility mode for a personal signal rule. Personal rules cannot be widened to team visibility.", - "operationId": "signals-set-personal-rule-visibility", + "summary": "Set personal signal provider visibility", + "description": "Set the persisted visibility mode for a personal signal provider. Personal providers cannot be widened to team visibility.", + "operationId": "signals-set-personal-provider-visibility", "parameters": [ { "name": "user_id", @@ -39177,11 +37554,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } } ], @@ -39209,15 +37586,15 @@ } } }, - "/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants": { + "/api/v1/user/{user_id}/signals/instances/{instance_id}/{plane}/grants": { "get": { "tags": [ "signals", "v1" ], - "summary": "List personal signal rule grants", - "description": "List persisted grants for one authorization plane on a personal signal rule.", - "operationId": "signals-list-personal-rule-grants", + "summary": "List personal signal provider grants", + "description": "List persisted grants for one authorization plane on a personal signal provider.", + "operationId": "signals-list-personal-provider-grants", "parameters": [ { "name": "user_id", @@ -39228,11 +37605,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -39265,9 +37642,9 @@ "signals", "v1" ], - "summary": "Add personal signal rule grant", - "description": "Add a principal grant to the URL-selected authorization plane on a personal signal rule.", - "operationId": "signals-add-personal-rule-grant", + "summary": "Add personal signal provider grant", + "description": "Add a principal grant to the URL-selected authorization plane on a personal signal provider.", + "operationId": "signals-add-personal-provider-grant", "parameters": [ { "name": "user_id", @@ -39278,11 +37655,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -39318,15 +37695,15 @@ } } }, - "/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants/{principal_type}/{principal_id}": { + "/api/v1/user/{user_id}/signals/instances/{instance_id}/{plane}/grants/{principal_type}/{principal_id}": { "delete": { "tags": [ "signals", "v1" ], - "summary": "Remove personal signal rule grant", - "description": "Remove a principal grant from the URL-selected authorization plane on a personal signal rule.", - "operationId": "signals-remove-personal-rule-grant", + "summary": "Remove personal signal provider grant", + "description": "Remove a principal grant from the URL-selected authorization plane on a personal signal provider.", + "operationId": "signals-remove-personal-provider-grant", "parameters": [ { "name": "user_id", @@ -39337,11 +37714,11 @@ } }, { - "name": "rule_id", + "name": "instance_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/WrappedUuidV4" + "type": "string" } }, { @@ -39376,6 +37753,56 @@ } } }, + "/api/v1/user/{user_id}/signals/providers": { + "get": { + "tags": [ + "signals", + "v1" + ], + "operationId": "signals-list-personal-available-providers", + "parameters": [ + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + }, + "style": "form" + }, + { + "name": "next_page_token", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalProviderSourceSerializedPaginatedResponse" + } + } + } + } + } + } + }, "/api/v1/user/{user_id}/skill": { "get": { "tags": [ @@ -41728,6 +40155,26 @@ } } }, + "Agent": { + "type": "object", + "description": "Authenticated agent identity.\n\nRepresents an agent user that authenticated via an API key.", + "required": [ + "sub" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Groups the agent belongs to." + }, + "sub": { + "type": "string", + "description": "Subject identifier (user ID) of the agent account." + } + } + }, "AgentCredentialStrategy": { "type": "string", "enum": [ @@ -41771,6 +40218,20 @@ "details" ] }, + "AgentMultiplayerPermissions": { + "type": "object", + "description": "Who an agent may pull into a session it creates.", + "properties": { + "with_agents": { + "$ref": "#/components/schemas/AgentReachScope", + "description": "Agents the agent may add." + }, + "with_users": { + "$ref": "#/components/schemas/AgentReachScope", + "description": "Tilde users the agent may add." + } + } + }, "AgentObservabilityConfiguration": { "type": "object", "required": [ @@ -41828,6 +40289,20 @@ } } }, + "AgentPermissions": { + "type": "object", + "description": "The reach recorded on an agent record.", + "properties": { + "create_multiplayer_sessions": { + "$ref": "#/components/schemas/AgentMultiplayerPermissions", + "description": "Whether the agent may create a session with more than two parties, and\nwho it may add." + }, + "delegate_to_other_agents": { + "$ref": "#/components/schemas/AgentReachScope", + "description": "Whether the agent may open a private child conversation with another\nagent, and with which agents." + } + } + }, "AgentProvisioningOperation": { "type": "object", "required": [ @@ -41918,6 +40393,64 @@ "deprovisioning" ] }, + "AgentReachScope": { + "oneOf": [ + { + "type": "object", + "description": "No one. The default, and what an unset permission means.", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "none" + ] + } + } + }, + { + "type": "object", + "description": "Anyone the agent can already see, subject to the visibility plane.", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "any" + ] + } + } + }, + { + "type": "object", + "description": "Only these, and still only those among them the agent can see.", + "required": [ + "ids", + "mode" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Agent inbox ids or Tilde user ids, depending on the field." + }, + "mode": { + "type": "string", + "enum": [ + "only" + ] + } + } + } + ], + "description": "Who an agent may reach for one kind of action." + }, "AgentSpec": { "type": "object", "required": [ @@ -42334,298 +40867,6 @@ } } }, - "Automation": { - "type": "object", - "required": [ - "id", - "org_id", - "team_id", - "authorization", - "created_by_user_id", - "agent_id", - "name", - "instruction", - "enabled", - "status", - "generation", - "applied_generation", - "triggers", - "created_at", - "updated_at" - ], - "properties": { - "agent_id": { - "type": "string" - }, - "applied_generation": { - "type": "integer", - "format": "int64" - }, - "authorization": { - "$ref": "#/components/schemas/ResourceAuthorizationModes" - }, - "created_at": { - "$ref": "#/components/schemas/WrappedChronoDateTime" - }, - "created_by_user_id": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "error_message": { - "type": [ - "string", - "null" - ] - }, - "generation": { - "type": "integer", - "format": "int64" - }, - "id": { - "$ref": "#/components/schemas/WrappedUuidV4" - }, - "instruction": { - "type": "string" - }, - "last_error": { - "type": [ - "string", - "null" - ], - "description": "Execution error paired with the latest materialized schedule execution." - }, - "last_run_at": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedChronoDateTime", - "description": "Latest materialized schedule execution, independent of reconciliation status." - } - ] - }, - "last_session_id": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedUuidV4", - "description": "Session created by `last_run_at`, when one was recorded." - } - ] - }, - "name": { - "type": "string" - }, - "org_id": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/AutomationStatus" - }, - "team_id": { - "type": "string" - }, - "triggers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AutomationTrigger" - } - }, - "updated_at": { - "$ref": "#/components/schemas/WrappedChronoDateTime" - } - } - }, - "AutomationPaginatedResponse": { - "type": "object", - "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Automation" - } - }, - "next_page_token": { - "type": "string" - } - } - }, - "AutomationStatus": { - "type": "string", - "enum": [ - "reconciling", - "active", - "error", - "deleting" - ] - }, - "AutomationTrigger": { - "allOf": [ - { - "$ref": "#/components/schemas/AutomationTriggerSpec" - }, - { - "type": "object", - "required": [ - "id", - "created_at", - "updated_at" - ], - "properties": { - "created_at": { - "$ref": "#/components/schemas/WrappedChronoDateTime" - }, - "id": { - "$ref": "#/components/schemas/WrappedUuidV4" - }, - "last_error": { - "type": [ - "string", - "null" - ], - "description": "Schedule-only live projection from the materialized ChatKit routine." - }, - "last_run_at": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedChronoDateTime", - "description": "Schedule-only live projection from the materialized ChatKit routine." - } - ] - }, - "last_session_id": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedUuidV4", - "description": "Schedule-only live projection from the materialized ChatKit routine." - } - ] - }, - "materialized_resource_id": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedUuidV4" - } - ] - }, - "next_run_at": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedChronoDateTime", - "description": "Schedule-only live projection from the materialized ChatKit routine." - } - ] - }, - "schedule_description": { - "type": [ - "string", - "null" - ], - "description": "Schedule-only live projection from the materialized ChatKit routine." - }, - "updated_at": { - "$ref": "#/components/schemas/WrappedChronoDateTime" - } - } - } - ] - }, - "AutomationTriggerInput": { - "allOf": [ - { - "$ref": "#/components/schemas/AutomationTriggerSpec" - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/WrappedUuidV4" - } - } - } - ] - }, - "AutomationTriggerSpec": { - "oneOf": [ - { - "type": "object", - "required": [ - "schedule", - "kind" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "schedule" - ] - }, - "schedule": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "signal_provider_instance_id", - "signal_type", - "kind" - ], - "properties": { - "filter": { - "$ref": "#/components/schemas/SignalRuleFilter" - }, - "kind": { - "type": "string", - "enum": [ - "event" - ] - }, - "session_policy": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/SignalSessionPolicy", - "description": "Omitted policies are resolved by Tilde to a new session per delivery." - } - ] - }, - "signal_provider_instance_id": { - "type": "string" - }, - "signal_type": { - "type": "string" - } - } - } - ] - }, "BillingContext": { "type": "object", "description": "Typed billing bootstrap response for the selected organization.", @@ -43546,6 +41787,67 @@ "native" ] }, + "ChatKitRequestAgent": { + "type": "object", + "description": "Public agent snapshot included in every signed HTTP-agent request.", + "required": [ + "id", + "displayName", + "providerId", + "status", + "createdAt", + "updatedAt" + ], + "properties": { + "avatar": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatKitRequestAgentAvatar" + } + ] + }, + "createdAt": { + "$ref": "#/components/schemas/WrappedChronoDateTime" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "principalUserId": { + "type": [ + "string", + "null" + ] + }, + "providerId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/InboxStatus" + }, + "updatedAt": { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + } + }, + "ChatKitRequestAgentAvatar": { + "type": "object", + "description": "Agent avatar resource included in the signed HTTP-agent request context.", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "description": "Authenticated Tilde API path that serves the current avatar bytes." + } + } + }, "ChatKitSearchAgent": { "type": "object", "description": "Agent context included when an agent identity or display name matched.", @@ -44239,6 +42541,17 @@ "messages" ], "properties": { + "agent": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChatKitRequestAgent", + "description": "Canonical public metadata for the agent receiving this turn." + } + ] + }, "chatId": { "type": [ "string", @@ -45852,53 +44165,6 @@ } } }, - "CreateRoutineRequestInner": { - "type": "object", - "description": "User-authored fields for a new routine.", - "required": [ - "agent_inbox_id", - "title", - "prompt", - "schedule" - ], - "properties": { - "agent_inbox_id": { - "type": "string" - }, - "authorization": { - "$ref": "#/components/schemas/ResourceAuthorizationModes" - }, - "enabled": { - "type": "boolean" - }, - "initial_grants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrantRequest" - } - }, - "metadata": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedJsonValue", - "description": "Opaque client-owned JSON metadata without server-side semantics." - } - ] - }, - "prompt": { - "type": "string" - }, - "schedule": { - "type": "string" - }, - "title": { - "type": "string" - } - } - }, "CreateSessionInner": { "type": "object", "description": "Inner create fields for a ChatKit session.", @@ -46172,72 +44438,6 @@ } } }, - "CreateSignalRuleRequestInner": { - "type": "object", - "required": [ - "signal_provider_instance_id", - "display_name", - "signal_type", - "session_policy", - "action" - ], - "properties": { - "action": { - "$ref": "#/components/schemas/SignalAction" - }, - "authorization": { - "$ref": "#/components/schemas/ResourceAuthorizationModes" - }, - "display_name": { - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/SignalRuleFilter" - }, - "id": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedUuidV4" - } - ] - }, - "initial_grants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceGrantRequest" - } - }, - "metadata": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedJsonValue", - "description": "Opaque client-owned JSON metadata without server-side semantics." - } - ] - }, - "session_policy": { - "$ref": "#/components/schemas/SignalSessionPolicy" - }, - "signal_provider_instance_id": { - "type": "string" - }, - "signal_type": { - "type": "string" - }, - "target_team_id": { - "type": [ - "string", - "null" - ] - } - } - }, "CreateSkillInner": { "type": "object", "description": "Inner create-skill payload with tenant fields supplied by the wrapper.", @@ -47264,7 +45464,7 @@ }, "CurrentSeatStatus": { "type": "string", - "description": "Current caller's seat state. Machine identities never consume seats.", + "description": "Current caller's seat state. Agent identities never consume seats.", "enum": [ "active", "not_assigned", @@ -47504,17 +45704,6 @@ } } }, - "DeleteAutomationResponse": { - "type": "object", - "required": [ - "deleted" - ], - "properties": { - "deleted": { - "type": "boolean" - } - } - }, "DeleteChatKitAgentTurnQueueItemResponse": { "type": "object", "required": [ @@ -47563,7 +45752,6 @@ }, "DeleteRoutineResponse": { "type": "object", - "description": "Routine deletion response.", "required": [ "deleted" ], @@ -48714,8 +46902,8 @@ { "allOf": [ { - "$ref": "#/components/schemas/Machine", - "description": "Machine identity (API key authentication)" + "$ref": "#/components/schemas/Agent", + "description": "Agent identity." }, { "type": "object", @@ -48726,19 +46914,19 @@ "type": { "type": "string", "enum": [ - "machine" + "agent" ] } } } ], - "description": "Machine identity (API key authentication)" + "description": "Agent identity." }, { "allOf": [ { "$ref": "#/components/schemas/Human", - "description": "Human identity (STS token authentication)" + "description": "Human identity." }, { "type": "object", @@ -48755,30 +46943,7 @@ } } ], - "description": "Human identity (STS token authentication)" - }, - { - "type": "object", - "description": "Machine acting on behalf of a human (both credentials provided)", - "required": [ - "machine", - "human", - "type" - ], - "properties": { - "human": { - "$ref": "#/components/schemas/Human" - }, - "machine": { - "$ref": "#/components/schemas/Machine" - }, - "type": { - "type": "string", - "enum": [ - "machine_on_behalf_of_human" - ] - } - } + "description": "Human identity." }, { "type": "object", @@ -48918,6 +47083,23 @@ "updated_at" ], "properties": { + "agent_permissions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/AgentPermissions", + "description": "What this agent is permitted to reach. Always `None` for a non-agent\ninbox, and `None` on an agent means it may reach no one.\n\nRead from its own tables rather than from a column, so it is loaded only\nwhere it is needed and cannot be written by an unrelated inbox edit." + } + ] + }, + "api_key_id": { + "type": [ + "string", + "null" + ] + }, "authorization": { "$ref": "#/components/schemas/ResourceAuthorizationModes" }, @@ -48927,6 +47109,12 @@ "null" ] }, + "concurrency_policy": { + "type": [ + "string", + "null" + ] + }, "configuration": { "$ref": "#/components/schemas/WrappedJsonValue" }, @@ -48939,12 +47127,32 @@ "null" ] }, + "display_name": { + "type": [ + "string", + "null" + ], + "description": "Human-readable name. Unique per team and inbox type." + }, + "endpoint_url": { + "type": [ + "string", + "null" + ], + "description": "Agent HTTP endpoint. `None` for anything that is not an agent." + }, "id": { "type": "string" }, "inbox_type": { "$ref": "#/components/schemas/InboxType" }, + "local_running_endpoint": { + "type": [ + "boolean", + "null" + ] + }, "lookup_key": { "type": [ "string", @@ -48970,9 +47178,22 @@ "status": { "$ref": "#/components/schemas/InboxStatus" }, + "streaming": { + "type": [ + "boolean", + "null" + ] + }, "team_id": { "type": "string" }, + "timeout_ms": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, "updated_at": { "$ref": "#/components/schemas/WrappedChronoDateTime" } @@ -49655,26 +47876,6 @@ } ] }, - "Machine": { - "type": "object", - "description": "Authenticated machine identity.\n\nRepresents an API client or automated service that authenticated via API key.", - "required": [ - "sub" - ], - "properties": { - "groups": { - "type": "array", - "items": { - "type": "string" - }, - "description": "System groups the machine belongs to (e.g. `[\"tilde_system:admin\"]`)" - }, - "sub": { - "type": "string", - "description": "Subject identifier (user ID) of the machine account" - } - } - }, "ManagedSkillSelection": { "type": "object", "required": [ @@ -53472,7 +51673,7 @@ ], "description": "How a stored credential is materialized into HTTP request shape when the\nproxy forwards a request upstream." }, - "PutAutomationBody": { + "PutRoutineBody": { "type": "object", "required": [ "agent_id", @@ -53490,6 +51691,13 @@ "enabled": { "type": "boolean" }, + "expected_version": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, "initial_grants": { "type": "array", "items": { @@ -53499,13 +51707,23 @@ "instruction": { "type": "string" }, + "metadata": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedJsonValue" + } + ] + }, "name": { "type": "string" }, "triggers": { "type": "array", "items": { - "$ref": "#/components/schemas/AutomationTriggerInput" + "$ref": "#/components/schemas/RoutineTriggerInput" } } } @@ -55136,24 +53354,23 @@ }, "Routine": { "type": "object", - "description": "A recurring prompt scheduled against one ChatKit agent.", "required": [ "id", "org_id", "team_id", "authorization", - "agent_inbox_id", - "title", - "prompt", - "schedule", - "schedule_description", + "created_by_user_id", + "agent_id", + "name", + "instruction", "enabled", - "next_run_at", + "version", + "triggers", "created_at", "updated_at" ], "properties": { - "agent_inbox_id": { + "agent_id": { "type": "string" }, "authorization": { @@ -55163,10 +53380,7 @@ "$ref": "#/components/schemas/WrappedChronoDateTime" }, "created_by_user_id": { - "type": [ - "string", - "null" - ] + "type": "string" }, "enabled": { "type": "boolean" @@ -55174,6 +53388,9 @@ "id": { "$ref": "#/components/schemas/WrappedUuidV4" }, + "instruction": { + "type": "string" + }, "last_error": { "type": [ "string", @@ -55206,36 +53423,132 @@ "type": "null" }, { - "$ref": "#/components/schemas/WrappedJsonValue", - "description": "Opaque client-owned JSON metadata without server-side semantics." + "$ref": "#/components/schemas/WrappedJsonValue" } ] }, - "next_run_at": { - "$ref": "#/components/schemas/WrappedChronoDateTime" + "name": { + "type": "string" }, "org_id": { "type": "string" }, - "prompt": { + "team_id": { "type": "string" }, - "schedule": { - "type": "string", - "description": "Minute-granularity cron expression evaluated in UTC." + "triggers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoutineTrigger" + } }, - "schedule_description": { - "type": "string", - "description": "Human-readable rendering of `schedule`." + "updated_at": { + "$ref": "#/components/schemas/WrappedChronoDateTime" }, - "team_id": { - "type": "string" + "version": { + "type": "integer", + "format": "int64" + } + } + }, + "RoutineEventInstructionPolicy": { + "type": "string", + "enum": [ + "signal_only", + "signal_and_instruction" + ] + }, + "RoutineExecution": { + "type": "object", + "required": [ + "id", + "routine_id", + "org_id", + "team_id", + "status", + "started_at" + ], + "properties": { + "completed_at": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + ] }, - "title": { + "error": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/WrappedUuidV4" + }, + "org_id": { "type": "string" }, - "updated_at": { + "routine_id": { + "$ref": "#/components/schemas/WrappedUuidV4" + }, + "session_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedUuidV4" + } + ] + }, + "signal_delivery_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedUuidV4" + } + ] + }, + "started_at": { "$ref": "#/components/schemas/WrappedChronoDateTime" + }, + "status": { + "type": "string" + }, + "team_id": { + "type": "string" + }, + "trigger_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedUuidV4" + } + ] + } + } + }, + "RoutineExecutionPaginatedResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RoutineExecution" + } + }, + "next_page_token": { + "type": "string" } } }, @@ -55256,19 +53569,201 @@ } } }, - "RunAutomationBody": { + "RoutineTrigger": { + "allOf": [ + { + "$ref": "#/components/schemas/RoutineTriggerSpec" + }, + { + "type": "object", + "required": [ + "id", + "enabled", + "created_at", + "updated_at" + ], + "properties": { + "created_at": { + "$ref": "#/components/schemas/WrappedChronoDateTime" + }, + "enabled": { + "type": "boolean" + }, + "id": { + "$ref": "#/components/schemas/WrappedUuidV4" + }, + "last_error": { + "type": [ + "string", + "null" + ] + }, + "last_run_at": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + ] + }, + "last_session_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedUuidV4" + } + ] + }, + "metadata": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedJsonValue" + } + ] + }, + "next_run_at": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + ] + }, + "schedule_description": { + "type": [ + "string", + "null" + ] + }, + "updated_at": { + "$ref": "#/components/schemas/WrappedChronoDateTime" + } + } + } + ] + }, + "RoutineTriggerInput": { + "allOf": [ + { + "$ref": "#/components/schemas/RoutineTriggerSpec" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "id": { + "$ref": "#/components/schemas/WrappedUuidV4" + }, + "metadata": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/WrappedJsonValue" + } + ] + } + } + } + ] + }, + "RoutineTriggerSpec": { + "oneOf": [ + { + "type": "object", + "required": [ + "schedule", + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "schedule" + ] + }, + "schedule": { + "type": "string" + } + } + }, + { + "type": "object", + "required": [ + "signal_provider_instance_id", + "signal_type", + "kind" + ], + "properties": { + "action": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SignalAction" + } + ] + }, + "filter": { + "$ref": "#/components/schemas/SignalRuleFilter" + }, + "instruction_policy": { + "$ref": "#/components/schemas/RoutineEventInstructionPolicy" + }, + "kind": { + "type": "string", + "enum": [ + "event" + ] + }, + "session_policy": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SignalSessionPolicy" + } + ] + }, + "signal_provider_instance_id": { + "type": "string" + }, + "signal_type": { + "type": "string" + } + } + } + ] + }, + "RunRoutineBody": { "type": "object", "required": [ "run_id" ], "properties": { "run_id": { - "$ref": "#/components/schemas/WrappedUuidV4", - "description": "Stable client run identity used for deduplication." + "$ref": "#/components/schemas/WrappedUuidV4" } } }, - "RunAutomationResponse": { + "RunRoutineResponse": { "type": "object", "required": [ "run_id", @@ -55797,7 +54292,7 @@ "raw_payload", "headers", "status", - "matched_rule_ids", + "matched_trigger_ids", "created_at", "updated_at" ], @@ -55838,7 +54333,7 @@ "id": { "$ref": "#/components/schemas/WrappedUuidV4" }, - "matched_rule_ids": { + "matched_trigger_ids": { "type": "array", "items": { "type": "string" @@ -55885,6 +54380,23 @@ } } }, + "SignalDeliveryPaginatedResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalDelivery" + } + }, + "next_page_token": { + "type": "string" + } + } + }, "SignalDeliveryStatus": { "type": "string", "enum": [ @@ -56217,6 +54729,23 @@ } } }, + "SignalProviderInstancePaginatedResponse": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalProviderInstance" + } + }, + "next_page_token": { + "type": "string" + } + } + }, "SignalProviderInstanceStatus": { "type": "string", "enum": [ @@ -56332,85 +54861,20 @@ } } }, - "SignalRule": { + "SignalProviderSourceSerializedPaginatedResponse": { "type": "object", "required": [ - "id", - "org_id", - "target_team_id", - "signal_provider_instance_id", - "display_name", - "status", - "signal_type", - "filter", - "session_policy", - "action", - "created_at", - "updated_at" + "items" ], "properties": { - "action": { - "$ref": "#/components/schemas/SignalAction" - }, - "authorization": { - "$ref": "#/components/schemas/ResourceAuthorizationModes" - }, - "created_at": { - "$ref": "#/components/schemas/WrappedChronoDateTime" - }, - "created_by_user_id": { - "type": [ - "string", - "null" - ] - }, - "display_name": { - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/SignalRuleFilter" - }, - "id": { - "$ref": "#/components/schemas/WrappedUuidV4" - }, - "metadata": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedJsonValue", - "description": "Opaque client-owned JSON metadata without server-side semantics." - } - ] - }, - "org_id": { - "type": "string" - }, - "session_policy": { - "$ref": "#/components/schemas/SignalSessionPolicy" - }, - "signal_provider_instance_id": { - "type": "string" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalProviderSourceSerialized" + } }, - "signal_type": { + "next_page_token": { "type": "string" - }, - "status": { - "$ref": "#/components/schemas/SignalRuleStatus" - }, - "target_team_id": { - "type": "string", - "description": "Team in which ChatKit sessions and agent actions execute. Personal\nrules require this explicit target and create user_team sessions." - }, - "team_id": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "$ref": "#/components/schemas/WrappedChronoDateTime" } } }, @@ -56425,13 +54889,6 @@ } } }, - "SignalRuleStatus": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, "SignalSessionPolicy": { "oneOf": [ { @@ -58118,7 +56575,10 @@ ], "properties": { "categories": { - "$ref": "#/components/schemas/WrappedJsonValue" + "type": "array", + "items": { + "type": "string" + } }, "created_at": { "$ref": "#/components/schemas/WrappedChronoDateTime" @@ -58133,7 +56593,10 @@ "type": "string" }, "tool_group_categories": { - "$ref": "#/components/schemas/WrappedJsonValue" + "type": "array", + "items": { + "type": "string" + } }, "tool_group_deployment_deployment_id": { "type": "string" @@ -59794,53 +58257,6 @@ } } }, - "UpdateRoutineRequestInner": { - "type": "object", - "description": "User-authored fields for editing a routine.", - "properties": { - "agent_inbox_id": { - "type": [ - "string", - "null" - ] - }, - "enabled": { - "type": [ - "boolean", - "null" - ] - }, - "metadata": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedJsonValue", - "description": "Opaque client-owned JSON metadata; absent leaves the stored value unchanged." - } - ] - }, - "prompt": { - "type": [ - "string", - "null" - ] - }, - "schedule": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": [ - "string", - "null" - ] - } - } - }, "UpdateSelfProfileRequest": { "type": "object", "properties": { @@ -59892,43 +58308,6 @@ } } }, - "UpdateSignalRuleRequestInner": { - "type": "object", - "required": [ - "display_name", - "status", - "session_policy", - "action" - ], - "properties": { - "action": { - "$ref": "#/components/schemas/SignalAction" - }, - "display_name": { - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/SignalRuleFilter" - }, - "metadata": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/WrappedJsonValue", - "description": "Opaque client-owned JSON metadata; the update body is a full replace,\nso an absent field clears the stored value, matching `filter`." - } - ] - }, - "session_policy": { - "$ref": "#/components/schemas/SignalSessionPolicy" - }, - "status": { - "$ref": "#/components/schemas/SignalRuleStatus" - } - } - }, "UpdateSkillBody": { "type": "object", "properties": { @@ -60242,7 +58621,7 @@ }, "User": { "type": "object", - "description": "A user entity in the system.\n\nRepresents both human users and machine accounts with their associated metadata.", + "description": "A user entity in the system.\n\nRepresents both human and agent users with their associated metadata.", "required": [ "id", "user_type", @@ -60284,7 +58663,7 @@ "string", "null" ], - "description": "Email address (required for human users, optional for machines)" + "description": "Email address (required for human users, optional for agents)." }, "id": { "type": "string", @@ -60296,13 +58675,13 @@ }, "user_type": { "$ref": "#/components/schemas/UserType", - "description": "Whether this is a machine or human user" + "description": "Whether this is an agent or human user." } } }, "UserAvatar": { "type": "object", - "description": "Uploaded profile image metadata for a human or machine user.", + "description": "Uploaded profile image metadata for a human or agent user.", "required": [ "bucket", "object_key", @@ -60641,9 +59020,9 @@ }, "UserType": { "type": "string", - "description": "Type of user identity in the system.\n\nDistinguishes between automated services and real users.", + "description": "Type of user identity in the system.\n\nDistinguishes first-class agent users from human users.", "enum": [ - "machine", + "agent", "human" ] }, diff --git a/packages/api-client/src/generated/index.ts b/packages/api-client/src/generated/index.ts index 84dbeece..6182f911 100644 --- a/packages/api-client/src/generated/index.ts +++ b/packages/api-client/src/generated/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { acceptInvitation, addChatkitRoutineGrant, addCommonProviderInstallationOwnershipGrant, addCommonProviderInstallationVisibilityGrant, addMcpResourceOwnershipGrant, addMcpResourceVisibilityGrant, addMcpServerInstanceFunction, addMemoryBankOwnershipGrant, addMemoryBankVisibilityGrant, addOrganizationMember, addPersonalMemoryBankOwnershipGrant, addPersonalMemoryBankVisibilityGrant, addPersonalRegistryOwnershipGrant, addPersonalRegistryVisibilityGrant, addPersonalRscOwnershipGrant, addPersonalRscVisibilityGrant, addPersonalSkillOwnershipGrant, addPersonalSkillVisibilityGrant, addPersonalUcOwnershipGrant, addPersonalUcVisibilityGrant, addPersonalWikiOwnershipGrant, addPersonalWikiVisibilityGrant, addProviderSkillsToSkillRegistry, addRscOwnershipGrant, addRscVisibilityGrant, addSessionResourceGrant, addSessionUserMember, addSignalProviderGrant, addSignalRuleGrant, addSkillOwnershipGrant, addSkillRegistryOwnershipGrant, addSkillRegistryVisibilityGrant, addSkillVisibilityGrant, addTeamGroupMember, addTeamMember, addUcOwnershipGrant, addUcVisibilityGrant, addWikiOwnershipGrant, addWikiVisibilityGrant, applyWikiOntologyTemplate, authorizeOauthDeviceCode, automationsAddGrant, automationsDelete, automationsGet, automationsList, automationsListGrants, automationsPut, automationsRemoveGrant, automationsRun, automationsSetOwnership, automationsSetVisibility, autoProvisionToolGroupInstance, autumnWebhookHandler, billingAutumnBridgePost, billingContextGet, billingMemoryBankReservationCommit, billingMemoryBankReservationCreate, billingMemoryBankReservationRelease, billingProductEnrollCurrentHuman, billingRedirect, billingWebhookStripeDeprecated, bindToolGroupToMcpServer, bulkAddMcpServerInstanceFunctions, bulkRemoveMcpServerInstanceFunctions, cancelHumanApprovalAction, changePersonalWikiOwnership, changeWikiOwnership, chatkitAddAgentResourceGrant, chatkitAddSessionParticipant, chatkitAutoProvisionSlackChannelInstallation, chatkitCacheConvertedMessages, chatkitClaimAgentResourceBundleOutputs, chatkitCompleteSlackProviderProvisionedSetup, chatkitCompleteSlackSelfManagedSetup, chatkitCreateRoutine, chatkitCreateSession, chatkitCreateSlackChannelInstallation, chatkitDeleteAgent, chatkitDeleteAgentTurnQueueItem, chatkitDeleteChatProvider, chatkitDeleteRoutine, chatkitGetAgent, chatkitGetAgentAvatar, chatkitGetAgentObservability, chatkitGetAgentResourceBundleProvisioning, chatkitGetRoutine, chatkitHydrateConvertedMessages, chatkitInvokeSessionProviderTool, chatkitJoinSession, chatkitListAgentResourceGrants, chatkitListAgents, chatkitListAgentTurnQueue, chatkitListAvailableChatChannels, chatkitListAvailableChatProviders, chatkitListChatProviders, chatkitListMessageHistory, chatkitListRoutines, chatkitListSessionParticipants, chatkitListSessions, chatkitProvisionAgentResourceBundle, chatkitRegisterAgentTools, chatkitRegisterChatProvider, chatkitRegisterHttpVercelAiSdkAgent, chatkitRegisterVercelUiChatProvider, chatkitRemoveAgentResourceGrant, chatkitRemoveSessionParticipant, chatkitReorderAgentTurnQueueItem, chatkitReportToolExecution, chatkitSearch, chatkitSendSessionMessage, chatkitSetAgentStatus, chatkitSetChatProviderStatus, chatkitStartSlackOauth, chatkitSteerAgentTurnQueueItem, chatkitUpdateAgent, chatkitUpdateAgentAvatar, chatkitUpdateAgentObservability, chatkitUpdateAgentOwnership, chatkitUpdateAgentToolVisibility, chatkitUpdateAgentVisibility, chatkitUpdateChatProvider, chatkitUpdateRoutine, chatkitWorkspaceAgentSessions, chatkitWorkspaceBootstrap, chatkitWorkspaceConversationSnapshot, chatkitWorkspaceCreateSession, chatkitWorkspaceInterruptSession, chatkitWorkspaceMessages, chatkitWorkspaceRenameThread, chatkitWorkspaceSendMessage, chatkitWorkspaceSidebar, chatkitWorkspaceSubmitTurn, chatkitWorkspaceUpdateSessionReadState, checkMemoryBankHealth, checkPersonalMemoryBankHealth, claimTemporaryAccount, completeAttachmentUpload, completeCredentialSetupItem, completeHumanApprovalAction, completeWikiAssetUpload, configureHostedOpenbotInstance, connectMcpProviderCatalogEntry, connectProxiedMcpServer, createAttachmentUpload, createAttachmentUploads, createCustomToolProvider, createHostedOpenbotDeployment, createHostedOpenbotRelease, createHumanApprovalAction, createManagedUserCredential, createMcpServerInstance, createMemoryBank, createMessage, createOrganization, createOrgOidcProvider, createPersonalMcpServerInstance, createPersonalMemoryBank, createPersonalSkill, createPersonalSkillRegistry, createPersonalToolGroupInstance, createPersonalUserCredential, createPersonalWiki, createPersonalWikiPage, createResourceServerCredential, createSession, createSkill, createSkillRegistry, createTeam, createTeamGroup, createTemporaryAccount, createToolGroupInstance, createTrustedRuntime, createTrustedSkillProvider, createUserCredential, createWiki, createWikiAssetUpload, createWikiPage, createWikiPageType, createWikiPageTypeVersion, createWikiRelationshipType, createWikiRelationshipTypeVersion, credentialGenericOauthCallback, deleteAttachment, deleteCustomToolProvider, deleteManagedUserCredential, deleteMcpServerInstance, deleteMemoryBank, deleteMemoryDocument, deleteMessage, deleteOrganization, deleteOrgOidcProvider, deletePersonalMcpServerInstance, deletePersonalMemoryBank, deletePersonalMemoryDocument, deletePersonalSkill, deletePersonalSkillRegistry, deletePersonalToolGroupInstance, deletePersonalWiki, deletePersonalWikiPage, deleteProxiedMcpServer, deleteResourceServerCredential, deleteSelfAvatar, deleteSkill, deleteSkillRegistry, deleteTeam, deleteTeamGroup, deleteToolGroupInstance, deleteTrustedRuntime, deleteUserCredential, deleteWiki, deleteWikiAsset, deleteWikiPage, deleteWikiPageRelationship, deleteWikiPageType, deleteWikiPageTypeVersion, deleteWikiRelationshipType, disableCustomToolProvider, disableProxiedMcpServer, disableTool, downloadAttachmentContent, downloadSkillPackageFile, downloadWikiAsset, downloadWikiAssetContent, enableAndBindProviderTools, enableCustomToolProvider, enableProxiedMcpServer, enableTool, encryptPersonalUserCredentialConfiguration, encryptResourceServerConfiguration, encryptUserCredentialConfiguration, exchangeOauthCode, expireTemporaryAccounts, exportMemoryBankTemplate, exportPersonalMemoryBankTemplate, finalizeHostedOpenbotRelease, generateLocalRuntimeTunnelApiKey, generateTemporaryAccountClaimUrl, getAttachmentDownloadUrl, getCommonProviderInstallation, getCredentialSetupItem, getCustomToolProvider, getHostedOpenbotInstance, getHostedOpenbotRelease, getHumanApprovalAction, getLocalRuntimeTunnelApiKey, getLocalRuntimeTunnelConnector, getManagedUserCredentialSecret, getMcpServerInstance, getMemoryBank, getMemoryBankConfig, getMemoryBankDocument, getMessage, getOpenbotPluginsCatalog, getOrganization, getOrgOidcProvider, getPersonalMcpServerInstance, getPersonalMemoryBank, getPersonalMemoryBankConfig, getPersonalMemoryBankDocument, getPersonalSkill, getPersonalSkillRegistry, getPersonalToolGroupInstance, getPersonalWiki, getPersonalWikiPage, getProviderProvisioningHumanAction, getProxiedMcpServer, getProxiedSkillProvider, getResourceServerCredential, getRuntimeConfig, getSelfAvatar, getSelfProfile, getSessionEventHistory, getSkill, getSkillPackage, getSkillRegistry, getSkillRegistrySkill, getSkillRegistrySkillByTitle, getSkillRegistrySkillDescription, getTeam, getTeamGroup, getToolGroupInstance, getToolsOpenapiSpec, getTrustedRuntime, getUserCredential, getWiki, getWikiPage, getWikiPageBacklinks, getWikiPageNeighborhood, getWikiPageRelationship, getWikiPageType, getWikiPageTypeVersion, getWikiRelationshipType, getWikiRelationshipTypeVersion, healthCheck, importMemoryBankTemplate, importPersonalMemoryBankTemplate, inspectWikiAssetReferences, inviteTeamUsers, invokeCustomTool, invokeTool, issueOpenbotChatkitRealtimeTicket, listAvailableToolGroups, listChatkitRoutineGrants, listCommonProviderInstallationOwnershipGrants, listCommonProviderInstallations, listCommonProviderInstallationVisibilityGrants, listCredentialSetupItems, listCustomToolProviders, listInboxAgents, listInboxes, listManagedUserCredentials, listMcpProviderCatalog, listMcpResourceOwnershipGrants, listMcpResourceVisibilityGrants, listMcpServerInstances, listMemoryBankDocuments, listMemoryBankOwnershipGrants, listMemoryBanks, listMemoryBankSourceBindings, listMemoryBankVisibilityGrants, listMemorySourceBindings, listMessages, listOpenbotDeployments, listOrganizationMembers, listOrganizations, listOrganizationTeamGroups, listOrgOidcProviders, listPersonalMcpServerInstances, listPersonalMemoryBankDocuments, listPersonalMemoryBankOwnershipGrants, listPersonalMemoryBanks, listPersonalMemoryBankSourceBindings, listPersonalMemoryBankVisibilityGrants, listPersonalRegistryOwnershipGrants, listPersonalRegistryVisibilityGrants, listPersonalRscOwnershipGrants, listPersonalRscVisibilityGrants, listPersonalSkillOwnershipGrants, listPersonalSkillRegistries, listPersonalSkills, listPersonalSkillVisibilityGrants, listPersonalToolGroupInstances, listPersonalUcOwnershipGrants, listPersonalUcVisibilityGrants, listPersonalWikiOwnershipGrants, listPersonalWikiPages, listPersonalWikis, listPersonalWikiVisibilityGrants, listProviderProvisionerCatalog, listProxiedMcpServers, listProxiedSkillProviders, listPublicAvailableToolGroups, listResourceServerCredentials, listRscOwnershipGrants, listRscVisibilityGrants, listSessionInboxInstances, listSessionResourceGrants, listSessions, listSessionUserMembers, listSignalProviderGrants, listSignalRuleGrants, listSkillOwnershipGrants, listSkillRegistries, listSkillRegistryOwnershipGrants, listSkillRegistrySkillSummaries, listSkillRegistryVisibilityGrants, listSkills, listSkillVisibilityGrants, listTeamGroupMembers, listTeamGroups, listTeamInvitations, listTeamMembers, listTeams, listToolDeploymentsByAlias, listToolGroupInstances, listToolGroupInstancesGroupedByTool, listTools, listTrustedRuntimes, listUcOwnershipGrants, listUcVisibilityGrants, listUserCredentials, listWikiAssets, listWikiOntologyInstallations, listWikiOntologyTemplates, listWikiOwnershipGrants, listWikiPageAssets, listWikiPageRelationships, listWikiPageRevisions, listWikiPages, listWikiPageTypes, listWikiPageTypeVersions, listWikiRelationshipTypes, listWikiRelationshipTypeVersions, listWikis, listWikiVisibilityGrants, mcpProtocolDelete, mcpProtocolGet, mcpProtocolPost, mcpServerPlaygroundChat, migrateWikiPageType, moveWikiPage, observeSession, type Options, personalMcpProtocolDelete, personalMcpProtocolGet, personalMcpProtocolPost, previewWikiPageTypeMigration, providerProvisioningCallback, providerSetupCatalog, providerSetupResume, providerSetupStart, recallMemory, recallPersonalMemory, reconcileOpenbotAgentBundle, redirectTemporaryAccountClaimPage, reflectMemory, reflectPersonalMemory, refreshCustomToolProvider, refreshProxiedMcpServer, registerOauthClient, registerOpenbotDeployment, registerTeamOauthClient, removeChatkitRoutineGrant, removeCommonProviderInstallationOwnershipGrant, removeCommonProviderInstallationVisibilityGrant, removeMcpResourceOwnershipGrant, removeMcpResourceVisibilityGrant, removeMcpServerInstanceFunction, removeMemoryBankOwnershipGrant, removeMemoryBankVisibilityGrant, removeOrganizationMember, removePersonalMemoryBankOwnershipGrant, removePersonalMemoryBankVisibilityGrant, removePersonalRegistryOwnershipGrant, removePersonalRegistryVisibilityGrant, removePersonalRscOwnershipGrant, removePersonalRscVisibilityGrant, removePersonalSkillOwnershipGrant, removePersonalSkillVisibilityGrant, removePersonalUcOwnershipGrant, removePersonalUcVisibilityGrant, removePersonalWikiOwnershipGrant, removePersonalWikiVisibilityGrant, removeRscOwnershipGrant, removeRscVisibilityGrant, removeSessionResourceGrant, removeSessionUserMember, removeSignalProviderGrant, removeSignalRuleGrant, removeSkillOwnershipGrant, removeSkillRegistryOwnershipGrant, removeSkillRegistryVisibilityGrant, removeSkillVisibilityGrant, removeTeamGroupMember, removeTeamMember, removeUcOwnershipGrant, removeUcVisibilityGrant, removeWikiOwnershipGrant, removeWikiVisibilityGrant, replaceMemorySourceBindings, resetMemoryBankConfig, resetPersonalMemoryBankConfig, resumeCredentialSetupItem, resumeProviderAppProvisioning, resumeUserCredentialBrokering, retainMemoryDocument, retainPersonalMemoryDocument, retryMemorySourceSync, retryWiki, reverseProxyAddProfileOwnershipGrant, reverseProxyAddProfileVisibilityGrant, reverseProxyCreateProfile, reverseProxyDeleteProfile, reverseProxyGetProfile, reverseProxyListProfileOwnershipGrants, reverseProxyListProfiles, reverseProxyListProfileVisibilityGrants, reverseProxyListProviders, reverseProxyProxyGet, reverseProxyProxyPost, reverseProxyRemoveProfileOwnershipGrant, reverseProxyRemoveProfileVisibilityGrant, reverseProxySetProfileOwnership, reverseProxySetProfileVisibility, reverseProxyUpdateProfile, revokeLocalRuntimeTunnelApiKey, revokeTeamInvitation, rotateCustomToolProviderSigningKey, routeAuthCallback, routeCreateApiKey, routeDeleteApiKey, routeGetJwks, routeListApiKeys, routeListDebugAuthProfiles, routeLogout, routeRefreshToken, routeResolveLoginProvider, routeSelectDebugAuthProfile, routeStartAuthorization, searchSkillRegistry, setChatkitRoutineOwnership, setChatkitRoutineVisibility, setCommonProviderInstallationOwnership, setCommonProviderInstallationVisibility, setMcpResourceOwnership, setMcpResourceVisibility, setMemoryBankOwnershipMode, setMemoryBankVisibility, setPersonalMemoryBankOwnershipMode, setPersonalMemoryBankVisibility, setPersonalRegistryOwnershipMode, setPersonalRegistryVisibility, setPersonalRscOwnership, setPersonalRscVisibility, setPersonalSkillOwnershipMode, setPersonalSkillVisibility, setPersonalUcOwnership, setPersonalUcVisibility, setPersonalWikiOwnershipMode, setPersonalWikiVisibility, setRscOwnership, setRscVisibility, setSelfOpenbotAvatar, setSignalProviderOwnership, setSignalProviderVisibility, setSignalRuleOwnership, setSignalRuleVisibility, setSkillOwnershipMode, setSkillRegistryOwnershipMode, setSkillRegistryVisibility, setSkillVisibility, setUcOwnership, setUcVisibility, setWikiOwnershipMode, setWikiVisibility, signalsAddPersonalProviderGrant, signalsAddPersonalRuleGrant, signalsCreatePersonalProviderInstance, signalsCreatePersonalRule, signalsCreateProviderInstance, signalsCreateRule, signalsDeletePersonalProviderInstance, signalsDeletePersonalRule, signalsDeleteProviderInstance, signalsDeleteRule, signalsGetDelivery, signalsGetPersonalDelivery, signalsGetPersonalProviderInstance, signalsGetPersonalRule, signalsGetProviderInstance, signalsGetRule, signalsListAvailableProviders, signalsListDeliveries, signalsListPersonalAvailableProviders, signalsListPersonalDeliveries, signalsListPersonalProviderGrants, signalsListPersonalProviderInstances, signalsListPersonalRuleGrants, signalsListPersonalRules, signalsListProviderInstances, signalsListRules, signalsRemovePersonalProviderGrant, signalsRemovePersonalRuleGrant, signalsRetryDelivery, signalsRetryPersonalDelivery, signalsSetPersonalProviderOwnership, signalsSetPersonalProviderVisibility, signalsSetPersonalRuleOwnership, signalsSetPersonalRuleVisibility, signalsTriggerFake, signalsUpdatePersonalProviderInstance, signalsUpdatePersonalRule, signalsUpdateProviderInstance, signalsUpdateRule, startCredentialSetupItem, startOauthDeviceCode, startProviderAppProvisioning, startProxiedMcpServerOauth, startUserCredentialBrokering, stateExport, stateGetImport, stateImport, stateImportEvents, statePlan, stateResolveSource, stateSchema, stateSchemaJson, stateValidate, traverseWikiGraph, unbindToolGroupFromMcpServer, updateCustomToolProvider, updateHostedOpenbotComputerImage, updateManagedUserCredential, updateMcpServerInstance, updateMcpServerInstanceFunction, updateMemoryBank, updateMemoryBankConfig, updateOrganization, updateOrganizationMemberRole, updateOrgOidcProvider, updatePersonalMcpServerInstance, updatePersonalMemoryBank, updatePersonalMemoryBankConfig, updatePersonalSkill, updatePersonalSkillRegistry, updatePersonalToolGroupInstance, updatePersonalWiki, updatePersonalWikiPage, updateResourceServerCredential, updateSelfProfile, updateSessionOwnership, updateSessionVisibility, updateSkill, updateSkillRegistry, updateTeam, updateTeamGroup, updateTeamMemberRole, updateToolBoundParams, updateToolGroupInstance, updateTrustedRuntime, updateUserCredential, updateWiki, updateWikiAsset, updateWikiPage, updateWikiPageRelationship, updateWikiPageType, updateWikiRelationshipType, uploadAttachmentContent, uploadHostedOpenbotReleaseFile, uploadSelfAvatar, uploadWikiAssetContent, upsertWikiPageRelationship, validateWikiPageTypeData, verifyOrgOidcProviderDomain, whoami } from './sdk.gen'; -export { type AcceptInvitationData, type AcceptInvitationError, type AcceptInvitationErrors, type AcceptInvitationRequest, type AcceptInvitationResponse, type AcceptInvitationResponses, type AddChatKitParticipantRequestInner, type AddChatkitRoutineGrantData, type AddChatkitRoutineGrantResponse, type AddChatkitRoutineGrantResponses, type AddCommonProviderInstallationOwnershipGrantData, type AddCommonProviderInstallationOwnershipGrantResponse, type AddCommonProviderInstallationOwnershipGrantResponses, type AddCommonProviderInstallationVisibilityGrantData, type AddCommonProviderInstallationVisibilityGrantResponse, type AddCommonProviderInstallationVisibilityGrantResponses, type AddMcpResourceOwnershipGrantData, type AddMcpResourceOwnershipGrantResponse, type AddMcpResourceOwnershipGrantResponses, type AddMcpResourceVisibilityGrantData, type AddMcpResourceVisibilityGrantResponse, type AddMcpResourceVisibilityGrantResponses, type AddMcpServerInstanceFunctionBody, type AddMcpServerInstanceFunctionData, type AddMcpServerInstanceFunctionError, type AddMcpServerInstanceFunctionErrors, type AddMcpServerInstanceFunctionResponse, type AddMcpServerInstanceFunctionResponses, type AddMemoryBankOwnershipGrantData, type AddMemoryBankOwnershipGrantResponse, type AddMemoryBankOwnershipGrantResponses, type AddMemoryBankVisibilityGrantData, type AddMemoryBankVisibilityGrantResponse, type AddMemoryBankVisibilityGrantResponses, type AddOrganizationMemberData, type AddOrganizationMemberError, type AddOrganizationMemberErrors, type AddOrganizationMemberRequest, type AddOrganizationMemberResponse, type AddOrganizationMemberResponses, type AddPersonalMemoryBankOwnershipGrantData, type AddPersonalMemoryBankOwnershipGrantResponse, type AddPersonalMemoryBankOwnershipGrantResponses, type AddPersonalMemoryBankVisibilityGrantData, type AddPersonalMemoryBankVisibilityGrantResponse, type AddPersonalMemoryBankVisibilityGrantResponses, type AddPersonalRegistryOwnershipGrantData, type AddPersonalRegistryOwnershipGrantResponse, type AddPersonalRegistryOwnershipGrantResponses, type AddPersonalRegistryVisibilityGrantData, type AddPersonalRegistryVisibilityGrantResponse, type AddPersonalRegistryVisibilityGrantResponses, type AddPersonalRscOwnershipGrantData, type AddPersonalRscOwnershipGrantResponse, type AddPersonalRscOwnershipGrantResponses, type AddPersonalRscVisibilityGrantData, type AddPersonalRscVisibilityGrantResponse, type AddPersonalRscVisibilityGrantResponses, type AddPersonalSkillOwnershipGrantData, type AddPersonalSkillOwnershipGrantResponse, type AddPersonalSkillOwnershipGrantResponses, type AddPersonalSkillVisibilityGrantData, type AddPersonalSkillVisibilityGrantResponse, type AddPersonalSkillVisibilityGrantResponses, type AddPersonalUcOwnershipGrantData, type AddPersonalUcOwnershipGrantResponse, type AddPersonalUcOwnershipGrantResponses, type AddPersonalUcVisibilityGrantData, type AddPersonalUcVisibilityGrantResponse, type AddPersonalUcVisibilityGrantResponses, type AddPersonalWikiOwnershipGrantData, type AddPersonalWikiOwnershipGrantResponse, type AddPersonalWikiOwnershipGrantResponses, type AddPersonalWikiVisibilityGrantData, type AddPersonalWikiVisibilityGrantResponse, type AddPersonalWikiVisibilityGrantResponses, type AddProviderSkillsToRegistryRequest, type AddProviderSkillsToSkillRegistryData, type AddProviderSkillsToSkillRegistryError, type AddProviderSkillsToSkillRegistryErrors, type AddProviderSkillsToSkillRegistryResponse, type AddProviderSkillsToSkillRegistryResponses, type AddRscOwnershipGrantData, type AddRscOwnershipGrantResponse, type AddRscOwnershipGrantResponses, type AddRscVisibilityGrantData, type AddRscVisibilityGrantResponse, type AddRscVisibilityGrantResponses, type AddSessionResourceGrantData, type AddSessionResourceGrantError, type AddSessionResourceGrantErrors, type AddSessionResourceGrantResponse, type AddSessionResourceGrantResponses, type AddSessionUserMemberData, type AddSessionUserMemberError, type AddSessionUserMemberErrors, type AddSessionUserMemberRequest, type AddSessionUserMemberResponse, type AddSessionUserMemberResponses, type AddSignalProviderGrantData, type AddSignalProviderGrantResponse, type AddSignalProviderGrantResponses, type AddSignalRuleGrantData, type AddSignalRuleGrantResponse, type AddSignalRuleGrantResponses, type AddSkillOwnershipGrantData, type AddSkillOwnershipGrantResponse, type AddSkillOwnershipGrantResponses, type AddSkillRegistryOwnershipGrantData, type AddSkillRegistryOwnershipGrantResponse, type AddSkillRegistryOwnershipGrantResponses, type AddSkillRegistryVisibilityGrantData, type AddSkillRegistryVisibilityGrantResponse, type AddSkillRegistryVisibilityGrantResponses, type AddSkillVisibilityGrantData, type AddSkillVisibilityGrantResponse, type AddSkillVisibilityGrantResponses, type AddTeamGroupMemberData, type AddTeamGroupMemberError, type AddTeamGroupMemberErrors, type AddTeamGroupMemberResponses, type AddTeamMemberBody, type AddTeamMemberData, type AddTeamMemberError, type AddTeamMemberErrors, type AddTeamMemberResponse, type AddTeamMemberResponses, type AddUcOwnershipGrantData, type AddUcOwnershipGrantResponse, type AddUcOwnershipGrantResponses, type AddUcVisibilityGrantData, type AddUcVisibilityGrantResponse, type AddUcVisibilityGrantResponses, type AddWikiOwnershipGrantData, type AddWikiOwnershipGrantResponse, type AddWikiOwnershipGrantResponses, type AddWikiVisibilityGrantData, type AddWikiVisibilityGrantResponse, type AddWikiVisibilityGrantResponses, AgentCredentialStrategy, type AgentEndpointSpec, AgentEventVisibility, type AgentObservabilityConfiguration, type AgentObservabilityPolicy, type AgentProvisioningOperation, type AgentProvisioningOutputs, AgentProvisioningStatus, type AgentSpec, type AgentToolCatalogEntry, AgentToolSource, AgentToolStatus, type ApplyOntologyTemplateResult, type ApplyWikiOntologyTemplateData, type ApplyWikiOntologyTemplateResponse, type ApplyWikiOntologyTemplateResponses, type Approval, ApprovalDecision, type Attachment, AttachmentUploadStatus, type AuthorizeOauthDeviceCodeData, type AuthorizeOauthDeviceCodeError, type AuthorizeOauthDeviceCodeErrors, type AuthorizeOauthDeviceCodeResponses, type Automation, type AutomationPaginatedResponse, type AutomationsAddGrantData, type AutomationsAddGrantResponse, type AutomationsAddGrantResponses, type AutomationsDeleteData, type AutomationsDeleteResponse, type AutomationsDeleteResponses, type AutomationsGetData, type AutomationsGetError, type AutomationsGetErrors, type AutomationsGetResponse, type AutomationsGetResponses, type AutomationsListData, type AutomationsListGrantsData, type AutomationsListGrantsResponse, type AutomationsListGrantsResponses, type AutomationsListResponse, type AutomationsListResponses, type AutomationsPutData, type AutomationsPutError, type AutomationsPutErrors, type AutomationsPutResponse, type AutomationsPutResponses, type AutomationsRemoveGrantData, type AutomationsRemoveGrantResponses, type AutomationsRunData, type AutomationsRunResponse, type AutomationsRunResponses, type AutomationsSetOwnershipData, type AutomationsSetOwnershipResponse, type AutomationsSetOwnershipResponses, type AutomationsSetVisibilityData, type AutomationsSetVisibilityResponse, type AutomationsSetVisibilityResponses, AutomationStatus, type AutomationTrigger, type AutomationTriggerInput, type AutomationTriggerSpec, type AutoProvisionSlackChannelInstallationRequestInner, type AutoProvisionSlackChannelInstallationResponse, type AutoProvisionToolGroupInstanceData, type AutoProvisionToolGroupInstanceError, type AutoProvisionToolGroupInstanceErrors, type AutoProvisionToolGroupInstanceParamsInner, type AutoProvisionToolGroupInstanceResponse, type AutoProvisionToolGroupInstanceResponse2, type AutoProvisionToolGroupInstanceResponses, type AutumnWebhookHandlerData, type AutumnWebhookHandlerErrors, type AutumnWebhookHandlerResponses, type BillingAutumnBridgePostData, type BillingAutumnBridgePostError, type BillingAutumnBridgePostErrors, type BillingAutumnBridgePostResponses, type BillingContext, type BillingContextGetData, type BillingContextGetError, type BillingContextGetErrors, type BillingContextGetResponse, type BillingContextGetResponses, type BillingMemoryBankReservationCommitData, type BillingMemoryBankReservationCommitError, type BillingMemoryBankReservationCommitErrors, type BillingMemoryBankReservationCommitResponse, type BillingMemoryBankReservationCommitResponses, type BillingMemoryBankReservationCreateData, type BillingMemoryBankReservationCreateError, type BillingMemoryBankReservationCreateErrors, type BillingMemoryBankReservationCreateResponse, type BillingMemoryBankReservationCreateResponses, type BillingMemoryBankReservationReleaseData, type BillingMemoryBankReservationReleaseError, type BillingMemoryBankReservationReleaseErrors, type BillingMemoryBankReservationReleaseResponse, type BillingMemoryBankReservationReleaseResponses, type BillingProductEnrollCurrentHumanData, type BillingProductEnrollCurrentHumanError, type BillingProductEnrollCurrentHumanErrors, type BillingProductEnrollCurrentHumanResponse, type BillingProductEnrollCurrentHumanResponses, BillingProductId, type BillingRedirectData, type BillingRedirectErrors, type BillingWebhookStripeDeprecatedData, type BillingWebhookStripeDeprecatedResponse, type BillingWebhookStripeDeprecatedResponses, type BindToolGroupToMcpServerData, type BindToolGroupToMcpServerError, type BindToolGroupToMcpServerErrors, type BindToolGroupToMcpServerResponse, type BindToolGroupToMcpServerResponses, type BrokerAction, type BrokerActionRedirect, type BrokerInput, type BrokerState, type BulkAddMcpServerInstanceFunctionItem, type BulkAddMcpServerInstanceFunctionsBody, type BulkAddMcpServerInstanceFunctionsData, type BulkAddMcpServerInstanceFunctionsError, type BulkAddMcpServerInstanceFunctionsErrors, type BulkAddMcpServerInstanceFunctionsResponse, type BulkAddMcpServerInstanceFunctionsResponses, type BulkRemoveMcpServerInstanceFunctionsBody, type BulkRemoveMcpServerInstanceFunctionsData, type BulkRemoveMcpServerInstanceFunctionsError, type BulkRemoveMcpServerInstanceFunctionsErrors, type BulkRemoveMcpServerInstanceFunctionsResponse, type BulkRemoveMcpServerInstanceFunctionsResponses, type CacheConvertedMessagesRequest, type CacheConvertedMessagesResponse, type CachedAgentRepresentation, type CancelHumanApprovalActionData, type CancelHumanApprovalActionError, type CancelHumanApprovalActionErrors, type CancelHumanApprovalActionRequest, type CancelHumanApprovalActionResponse, type CancelHumanApprovalActionResponses, type ChangePersonalWikiOwnershipData, type ChangePersonalWikiOwnershipResponse, type ChangePersonalWikiOwnershipResponses, type ChangeResourceOwnershipRequest, type ChangeWikiOwnershipData, type ChangeWikiOwnershipResponse, type ChangeWikiOwnershipResponses, type ChatApproval, ChatApprovalDecision, type ChatChannelInstallationInstructions, type ChatChannelProvider, type ChatChannelProviderAuthMethod, type ChatChannelSubscriptionOption, type ChatkitAddAgentResourceGrantData, type ChatkitAddAgentResourceGrantError, type ChatkitAddAgentResourceGrantErrors, type ChatkitAddAgentResourceGrantResponse, type ChatkitAddAgentResourceGrantResponses, type ChatkitAddSessionParticipantData, type ChatkitAddSessionParticipantError, type ChatkitAddSessionParticipantErrors, type ChatkitAddSessionParticipantResponse, type ChatkitAddSessionParticipantResponses, type ChatKitAgent, type ChatKitAgentAvatar, ChatKitAgentConcurrencyPolicy, type ChatKitAgentInvocationActor, type ChatKitAgentPaginatedResponse, type ChatKitAgentTurnQueueItem, type ChatKitAgentTurnQueueItemPaginatedResponse, ChatKitAgentTurnQueueStatus, type ChatkitAutoProvisionSlackChannelInstallationData, type ChatkitAutoProvisionSlackChannelInstallationError, type ChatkitAutoProvisionSlackChannelInstallationErrors, type ChatkitAutoProvisionSlackChannelInstallationResponse, type ChatkitAutoProvisionSlackChannelInstallationResponses, type ChatkitCacheConvertedMessagesData, type ChatkitCacheConvertedMessagesError, type ChatkitCacheConvertedMessagesErrors, type ChatkitCacheConvertedMessagesResponse, type ChatkitCacheConvertedMessagesResponses, type ChatKitChatProviderConfigField, type ChatkitClaimAgentResourceBundleOutputsData, type ChatkitClaimAgentResourceBundleOutputsResponse, type ChatkitClaimAgentResourceBundleOutputsResponses, type ChatkitCompleteSlackProviderProvisionedSetupData, type ChatkitCompleteSlackProviderProvisionedSetupError, type ChatkitCompleteSlackProviderProvisionedSetupErrors, type ChatkitCompleteSlackProviderProvisionedSetupResponse, type ChatkitCompleteSlackProviderProvisionedSetupResponses, type ChatkitCompleteSlackSelfManagedSetupData, type ChatkitCompleteSlackSelfManagedSetupError, type ChatkitCompleteSlackSelfManagedSetupErrors, type ChatkitCompleteSlackSelfManagedSetupResponse, type ChatkitCompleteSlackSelfManagedSetupResponses, type ChatkitCreateRoutineData, type ChatkitCreateRoutineError, type ChatkitCreateRoutineErrors, type ChatkitCreateRoutineResponse, type ChatkitCreateRoutineResponses, type ChatkitCreateSessionData, type ChatkitCreateSessionError, type ChatkitCreateSessionErrors, type ChatkitCreateSessionResponse, type ChatkitCreateSessionResponses, type ChatkitCreateSlackChannelInstallationData, type ChatkitCreateSlackChannelInstallationError, type ChatkitCreateSlackChannelInstallationErrors, type ChatkitCreateSlackChannelInstallationResponse, type ChatkitCreateSlackChannelInstallationResponses, type ChatkitDeleteAgentData, type ChatkitDeleteAgentError, type ChatkitDeleteAgentErrors, type ChatkitDeleteAgentResponse, type ChatkitDeleteAgentResponses, type ChatkitDeleteAgentTurnQueueItemData, type ChatkitDeleteAgentTurnQueueItemError, type ChatkitDeleteAgentTurnQueueItemErrors, type ChatkitDeleteAgentTurnQueueItemResponse, type ChatkitDeleteAgentTurnQueueItemResponses, type ChatkitDeleteChatProviderData, type ChatkitDeleteChatProviderError, type ChatkitDeleteChatProviderErrors, type ChatkitDeleteChatProviderResponse, type ChatkitDeleteChatProviderResponses, type ChatkitDeleteRoutineData, type ChatkitDeleteRoutineResponse, type ChatkitDeleteRoutineResponses, type ChatkitGetAgentAvatarData, type ChatkitGetAgentAvatarError, type ChatkitGetAgentAvatarErrors, type ChatkitGetAgentAvatarResponse, type ChatkitGetAgentAvatarResponses, type ChatkitGetAgentData, type ChatkitGetAgentError, type ChatkitGetAgentErrors, type ChatkitGetAgentObservabilityData, type ChatkitGetAgentObservabilityError, type ChatkitGetAgentObservabilityErrors, type ChatkitGetAgentObservabilityResponse, type ChatkitGetAgentObservabilityResponses, type ChatkitGetAgentResourceBundleProvisioningData, type ChatkitGetAgentResourceBundleProvisioningResponse, type ChatkitGetAgentResourceBundleProvisioningResponses, type ChatkitGetAgentResponse, type ChatkitGetAgentResponses, type ChatkitGetRoutineData, type ChatkitGetRoutineResponse, type ChatkitGetRoutineResponses, type ChatkitHydrateConvertedMessagesData, type ChatkitHydrateConvertedMessagesError, type ChatkitHydrateConvertedMessagesErrors, type ChatkitHydrateConvertedMessagesResponse, type ChatkitHydrateConvertedMessagesResponses, ChatKitIdentityKind, type ChatkitInvokeSessionProviderToolData, type ChatkitInvokeSessionProviderToolError, type ChatkitInvokeSessionProviderToolErrors, type ChatkitInvokeSessionProviderToolResponse, type ChatkitInvokeSessionProviderToolResponses, type ChatkitJoinSessionData, type ChatkitJoinSessionError, type ChatkitJoinSessionErrors, type ChatkitJoinSessionResponse, type ChatkitJoinSessionResponses, type ChatkitListAgentResourceGrantsData, type ChatkitListAgentResourceGrantsError, type ChatkitListAgentResourceGrantsErrors, type ChatkitListAgentResourceGrantsResponse, type ChatkitListAgentResourceGrantsResponses, type ChatkitListAgentsData, type ChatkitListAgentsError, type ChatkitListAgentsErrors, type ChatkitListAgentsResponse, type ChatkitListAgentsResponses, type ChatkitListAgentTurnQueueData, type ChatkitListAgentTurnQueueError, type ChatkitListAgentTurnQueueErrors, type ChatkitListAgentTurnQueueResponse, type ChatkitListAgentTurnQueueResponses, type ChatkitListAvailableChatChannelsData, type ChatkitListAvailableChatChannelsError, type ChatkitListAvailableChatChannelsErrors, type ChatkitListAvailableChatChannelsResponse, type ChatkitListAvailableChatChannelsResponses, type ChatkitListAvailableChatProvidersData, type ChatkitListAvailableChatProvidersError, type ChatkitListAvailableChatProvidersErrors, type ChatkitListAvailableChatProvidersResponse, type ChatkitListAvailableChatProvidersResponses, type ChatkitListChatProvidersData, type ChatkitListChatProvidersError, type ChatkitListChatProvidersErrors, type ChatkitListChatProvidersResponse, type ChatkitListChatProvidersResponses, type ChatkitListMessageHistoryData, type ChatkitListMessageHistoryError, type ChatkitListMessageHistoryErrors, type ChatkitListMessageHistoryResponse, type ChatkitListMessageHistoryResponses, type ChatkitListRoutinesData, type ChatkitListRoutinesResponse, type ChatkitListRoutinesResponses, type ChatkitListSessionParticipantsData, type ChatkitListSessionParticipantsError, type ChatkitListSessionParticipantsErrors, type ChatkitListSessionParticipantsResponse, type ChatkitListSessionParticipantsResponses, type ChatkitListSessionsData, type ChatkitListSessionsError, type ChatkitListSessionsErrors, type ChatkitListSessionsResponse, type ChatkitListSessionsResponses, type ChatKitMessageIdentity, type ChatKitParticipant, type ChatKitParticipantInput, ChatKitParticipantMembershipSource, ChatKitParticipantType, type ChatkitProvisionAgentResourceBundleData, type ChatkitProvisionAgentResourceBundleResponse, type ChatkitProvisionAgentResourceBundleResponses, type ChatKitRealtimeSocketTicket, ChatKitRealtimeTicketTransport, type ChatkitRegisterAgentToolsData, type ChatkitRegisterAgentToolsError, type ChatkitRegisterAgentToolsErrors, type ChatkitRegisterAgentToolsResponse, type ChatkitRegisterAgentToolsResponses, type ChatkitRegisterChatProviderData, type ChatkitRegisterChatProviderError, type ChatkitRegisterChatProviderErrors, type ChatkitRegisterChatProviderResponse, type ChatkitRegisterChatProviderResponses, type ChatkitRegisterHttpVercelAiSdkAgentData, type ChatkitRegisterHttpVercelAiSdkAgentError, type ChatkitRegisterHttpVercelAiSdkAgentErrors, type ChatkitRegisterHttpVercelAiSdkAgentResponse, type ChatkitRegisterHttpVercelAiSdkAgentResponses, type ChatkitRegisterVercelUiChatProviderData, type ChatkitRegisterVercelUiChatProviderError, type ChatkitRegisterVercelUiChatProviderErrors, type ChatkitRegisterVercelUiChatProviderResponse, type ChatkitRegisterVercelUiChatProviderResponses, type ChatkitRemoveAgentResourceGrantData, type ChatkitRemoveAgentResourceGrantError, type ChatkitRemoveAgentResourceGrantErrors, type ChatkitRemoveAgentResourceGrantResponse, type ChatkitRemoveAgentResourceGrantResponses, type ChatkitRemoveSessionParticipantData, type ChatkitRemoveSessionParticipantError, type ChatkitRemoveSessionParticipantErrors, type ChatkitRemoveSessionParticipantResponse, type ChatkitRemoveSessionParticipantResponses, type ChatkitReorderAgentTurnQueueItemData, type ChatkitReorderAgentTurnQueueItemError, type ChatkitReorderAgentTurnQueueItemErrors, type ChatkitReorderAgentTurnQueueItemResponse, type ChatkitReorderAgentTurnQueueItemResponses, type ChatkitReportToolExecutionData, type ChatkitReportToolExecutionError, type ChatkitReportToolExecutionErrors, type ChatkitReportToolExecutionResponse, type ChatkitReportToolExecutionResponses, type ChatKitSearchAgent, type ChatkitSearchData, type ChatkitSearchError, type ChatkitSearchErrors, type ChatKitSearchHit, ChatKitSearchHitKind, type ChatKitSearchHitPaginatedResponse, type ChatkitSearchResponse, type ChatkitSearchResponses, type ChatKitSearchSession, type ChatkitSendSessionMessageData, type ChatkitSendSessionMessageError, type ChatkitSendSessionMessageErrors, type ChatkitSendSessionMessageResponse, type ChatkitSendSessionMessageResponses, type ChatKitSessionUserState, type ChatKitSessionWithParticipants, type ChatkitSetAgentStatusData, type ChatkitSetAgentStatusError, type ChatkitSetAgentStatusErrors, type ChatkitSetAgentStatusResponse, type ChatkitSetAgentStatusResponses, type ChatkitSetChatProviderStatusData, type ChatkitSetChatProviderStatusError, type ChatkitSetChatProviderStatusErrors, type ChatkitSetChatProviderStatusResponse, type ChatkitSetChatProviderStatusResponses, type ChatkitStartSlackOauthData, type ChatkitStartSlackOauthError, type ChatkitStartSlackOauthErrors, type ChatkitStartSlackOauthResponse, type ChatkitStartSlackOauthResponses, type ChatkitSteerAgentTurnQueueItemData, type ChatkitSteerAgentTurnQueueItemError, type ChatkitSteerAgentTurnQueueItemErrors, type ChatkitSteerAgentTurnQueueItemResponse, type ChatkitSteerAgentTurnQueueItemResponses, type ChatkitUpdateAgentAvatarData, type ChatkitUpdateAgentAvatarError, type ChatkitUpdateAgentAvatarErrors, type ChatkitUpdateAgentAvatarResponse, type ChatkitUpdateAgentAvatarResponses, type ChatkitUpdateAgentData, type ChatkitUpdateAgentError, type ChatkitUpdateAgentErrors, type ChatkitUpdateAgentObservabilityData, type ChatkitUpdateAgentObservabilityError, type ChatkitUpdateAgentObservabilityErrors, type ChatkitUpdateAgentObservabilityResponse, type ChatkitUpdateAgentObservabilityResponses, type ChatkitUpdateAgentOwnershipData, type ChatkitUpdateAgentOwnershipError, type ChatkitUpdateAgentOwnershipErrors, type ChatkitUpdateAgentOwnershipResponse, type ChatkitUpdateAgentOwnershipResponses, type ChatkitUpdateAgentResponse, type ChatkitUpdateAgentResponses, type ChatkitUpdateAgentToolVisibilityData, type ChatkitUpdateAgentToolVisibilityError, type ChatkitUpdateAgentToolVisibilityErrors, type ChatkitUpdateAgentToolVisibilityResponse, type ChatkitUpdateAgentToolVisibilityResponses, type ChatkitUpdateAgentVisibilityData, type ChatkitUpdateAgentVisibilityError, type ChatkitUpdateAgentVisibilityErrors, type ChatkitUpdateAgentVisibilityResponse, type ChatkitUpdateAgentVisibilityResponses, type ChatkitUpdateChatProviderData, type ChatkitUpdateChatProviderError, type ChatkitUpdateChatProviderErrors, type ChatkitUpdateChatProviderResponse, type ChatkitUpdateChatProviderResponses, type ChatkitUpdateRoutineData, type ChatkitUpdateRoutineResponse, type ChatkitUpdateRoutineResponses, type ChatkitWorkspaceAgentSessionsData, type ChatkitWorkspaceAgentSessionsResponse, type ChatKitWorkspaceAgentSessionsResponse, type ChatkitWorkspaceAgentSessionsResponses, type ChatKitWorkspaceAgentSummary, type ChatKitWorkspaceAttachmentCompletion, type ChatkitWorkspaceBootstrapData, type ChatkitWorkspaceBootstrapResponse, type ChatKitWorkspaceBootstrapResponse, type ChatkitWorkspaceBootstrapResponses, type ChatKitWorkspaceConversationSnapshot, type ChatkitWorkspaceConversationSnapshotData, type ChatkitWorkspaceConversationSnapshotResponse, type ChatkitWorkspaceConversationSnapshotResponses, type ChatkitWorkspaceCreateSessionData, type ChatkitWorkspaceCreateSessionResponse, type ChatkitWorkspaceCreateSessionResponses, type ChatkitWorkspaceInterruptSessionData, type ChatkitWorkspaceInterruptSessionResponse, type ChatkitWorkspaceInterruptSessionResponses, type ChatkitWorkspaceMessagesData, type ChatkitWorkspaceMessagesResponse, type ChatkitWorkspaceMessagesResponses, type ChatKitWorkspaceQueuedTurns, type ChatkitWorkspaceRenameThreadData, type ChatkitWorkspaceRenameThreadResponse, type ChatkitWorkspaceRenameThreadResponses, type ChatkitWorkspaceSendMessageData, type ChatkitWorkspaceSendMessageResponse, type ChatkitWorkspaceSendMessageResponses, type ChatKitWorkspaceSessionSummary, type ChatkitWorkspaceSidebarData, type ChatkitWorkspaceSidebarResponse, type ChatKitWorkspaceSidebarResponse, type ChatkitWorkspaceSidebarResponses, type ChatkitWorkspaceSubmitTurnData, type ChatkitWorkspaceSubmitTurnResponse, type ChatkitWorkspaceSubmitTurnResponses, type ChatkitWorkspaceUpdateSessionReadStateData, type ChatkitWorkspaceUpdateSessionReadStateResponse, type ChatkitWorkspaceUpdateSessionReadStateResponses, type ChatMessage, type ChatMessagePart, type ChatRequest, type ChatSessionContext, ChatToolInvocationState, type CheckMemoryBankHealthData, type CheckMemoryBankHealthResponse, type CheckMemoryBankHealthResponses, type CheckPersonalMemoryBankHealthData, type CheckPersonalMemoryBankHealthResponse, type CheckPersonalMemoryBankHealthResponses, type ClaimTemporaryAccountData, type ClaimTemporaryAccountError, type ClaimTemporaryAccountErrors, type ClaimTemporaryAccountRequest, type ClaimTemporaryAccountResponse, type ClaimTemporaryAccountResponse2, type ClaimTemporaryAccountResponses, type ClientOptions, type CloudWhoamiResponse, type CommitMemoryBankReservationBody, type CommonProviderInstallationPage, type CommonProviderInstallationSerialized, type CompleteAttachmentUploadData, type CompleteAttachmentUploadError, type CompleteAttachmentUploadErrors, type CompleteAttachmentUploadInner, type CompleteAttachmentUploadResponse, type CompleteAttachmentUploadResponses, type CompleteCredentialSetupItemBody, type CompleteCredentialSetupItemData, type CompleteCredentialSetupItemResponse, type CompleteCredentialSetupItemResponses, type CompleteHumanApprovalActionData, type CompleteHumanApprovalActionError, type CompleteHumanApprovalActionErrors, type CompleteHumanApprovalActionRequest, type CompleteHumanApprovalActionResponse, type CompleteHumanApprovalActionResponses, type CompleteSlackProviderProvisionedSetupRequestInner, type CompleteSlackSelfManagedSetupRequestInner, type CompleteWikiAssetUploadData, type CompleteWikiAssetUploadResponse, type CompleteWikiAssetUploadResponses, type ConfigurationSchema, type ConfigureHostedOpenbotInstanceData, type ConfigureHostedOpenbotInstanceError, type ConfigureHostedOpenbotInstanceErrors, type ConfigureHostedOpenBotInstanceRequest, type ConfigureHostedOpenbotInstanceResponse, type ConfigureHostedOpenbotInstanceResponses, type ConnectMcpProviderCatalogEntryData, type ConnectMcpProviderCatalogEntryError, type ConnectMcpProviderCatalogEntryErrors, type ConnectMcpProviderCatalogEntryRequestInner, type ConnectMcpProviderCatalogEntryResponse, type ConnectMcpProviderCatalogEntryResponse2, type ConnectMcpProviderCatalogEntryResponses, type ConnectProxiedMcpServerData, type ConnectProxiedMcpServerError, type ConnectProxiedMcpServerErrors, type ConnectProxiedMcpServerRequestInner, type ConnectProxiedMcpServerResponse, type ConnectProxiedMcpServerResponse2, type ConnectProxiedMcpServerResponses, type CreateApiKeyInner, type CreateApiKeyResponse, type CreateAttachmentUploadData, type CreateAttachmentUploadError, type CreateAttachmentUploadErrors, type CreateAttachmentUploadInner, type CreateAttachmentUploadResponse, type CreateAttachmentUploadResponse2, type CreateAttachmentUploadResponses, type CreateAttachmentUploadsData, type CreateAttachmentUploadsError, type CreateAttachmentUploadsErrors, type CreateAttachmentUploadsInner, type CreateAttachmentUploadsResponse, type CreateAttachmentUploadsResponse2, type CreateAttachmentUploadsResponses, type CreateChatKitSessionRequestInner, type CreateChatKitWorkspaceSessionRequestInner, type CreateCustomToolProviderData, type CreateCustomToolProviderRequestInner, type CreateCustomToolProviderResponse, type CreateCustomToolProviderResponse2, type CreateCustomToolProviderResponses, type CreateHostedOpenbotDeploymentData, type CreateHostedOpenbotDeploymentError, type CreateHostedOpenbotDeploymentErrors, type CreateHostedOpenBotDeploymentRequest, type CreateHostedOpenbotDeploymentResponse, type CreateHostedOpenbotDeploymentResponses, type CreateHostedOpenbotReleaseData, type CreateHostedOpenbotReleaseError, type CreateHostedOpenbotReleaseErrors, type CreateHostedOpenBotReleaseFile, type CreateHostedOpenBotReleaseRequest, type CreateHostedOpenbotReleaseResponse, type CreateHostedOpenbotReleaseResponses, type CreateHumanApprovalActionData, type CreateHumanApprovalActionError, type CreateHumanApprovalActionErrors, type CreateHumanApprovalActionRequestInner, type CreateHumanApprovalActionResponse, type CreateHumanApprovalActionResponse2, type CreateHumanApprovalActionResponses, type CreateManagedUserCredentialBody, type CreateManagedUserCredentialData, type CreateManagedUserCredentialResponse, type CreateManagedUserCredentialResponses, type CreateMcpServerInstanceData, type CreateMcpServerInstanceError, type CreateMcpServerInstanceErrors, type CreateMcpServerInstanceRequestInner, type CreateMcpServerInstanceResponse, type CreateMcpServerInstanceResponses, type CreateMemoryBankBody, type CreateMemoryBankData, type CreateMemoryBankResponse, type CreateMemoryBankResponses, type CreateMessageData, type CreateMessageError, type CreateMessageErrors, type CreateMessageRequest, type CreateMessageResponse, type CreateMessageResponses, type CreateOrganizationData, type CreateOrganizationError, type CreateOrganizationErrors, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateOrganizationResponses, type CreateOrgOidcProviderData, type CreateOrgOidcProviderError, type CreateOrgOidcProviderErrors, type CreateOrgOidcProviderRequest, type CreateOrgOidcProviderResponse, type CreateOrgOidcProviderResponses, type CreatePageTypeBody, type CreatePageTypeVersionBody, type CreatePersonalMcpServerInstanceData, type CreatePersonalMcpServerInstanceError, type CreatePersonalMcpServerInstanceErrors, type CreatePersonalMcpServerInstanceResponse, type CreatePersonalMcpServerInstanceResponses, type CreatePersonalMemoryBankData, type CreatePersonalMemoryBankResponse, type CreatePersonalMemoryBankResponses, type CreatePersonalSkillData, type CreatePersonalSkillRegistryData, type CreatePersonalSkillRegistryResponse, type CreatePersonalSkillRegistryResponses, type CreatePersonalSkillResponse, type CreatePersonalSkillResponses, type CreatePersonalToolGroupInstanceBody, type CreatePersonalToolGroupInstanceData, type CreatePersonalToolGroupInstanceError, type CreatePersonalToolGroupInstanceErrors, type CreatePersonalToolGroupInstanceResponse, type CreatePersonalToolGroupInstanceResponses, type CreatePersonalUserCredentialData, type CreatePersonalUserCredentialResponse, type CreatePersonalUserCredentialResponses, type CreatePersonalWikiData, type CreatePersonalWikiPageData, type CreatePersonalWikiPageResponse, type CreatePersonalWikiPageResponses, type CreatePersonalWikiResponse, type CreatePersonalWikiResponses, type CreateRelationshipTypeBody, type CreateRelationshipTypeVersionBody, type CreateResourcePlaneGrantRequest, type CreateResourceServerCredentialData, type CreateResourceServerCredentialParamsInner, type CreateResourceServerCredentialResponse, type CreateResourceServerCredentialResponses, type CreateReverseProxyProfileInner, type CreateRoutineRequestInner, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionInner, type CreateSessionResponse, type CreateSessionResponses, type CreateSignalMessageRequest, type CreateSignalProviderInstanceRequestInner, type CreateSignalRuleRequestInner, type CreateSkillData, type CreateSkillError, type CreateSkillErrors, type CreateSkillInner, type CreateSkillRegistryBody, type CreateSkillRegistryData, type CreateSkillRegistryError, type CreateSkillRegistryErrors, type CreateSkillRegistryResponse, type CreateSkillRegistryResponses, type CreateSkillResponse, type CreateSkillResponses, type CreateSlackChannelInstallationRequestInner, type CreateSlackChannelInstallationResponse, type CreateTeamData, type CreateTeamError, type CreateTeamErrors, type CreateTeamGroupBody, type CreateTeamGroupData, type CreateTeamGroupError, type CreateTeamGroupErrors, type CreateTeamGroupResponse, type CreateTeamGroupResponses, type CreateTeamRequest, type CreateTeamResponse, type CreateTeamResponses, type CreateTemporaryAccountData, type CreateTemporaryAccountError, type CreateTemporaryAccountErrors, type CreateTemporaryAccountRequest, type CreateTemporaryAccountResponse, type CreateTemporaryAccountResponse2, type CreateTemporaryAccountResponses, type CreateTextMessageRequest, type CreateToolGroupInstanceData, type CreateToolGroupInstanceError, type CreateToolGroupInstanceErrors, type CreateToolGroupInstanceParamsInner, type CreateToolGroupInstanceResponse, type CreateToolGroupInstanceResponses, type CreateTrustedRuntimeData, type CreateTrustedRuntimeError, type CreateTrustedRuntimeErrors, type CreateTrustedRuntimeInner, type CreateTrustedRuntimeResponse, type CreateTrustedRuntimeResponses, type CreateTrustedSkillProviderData, type CreateTrustedSkillProviderError, type CreateTrustedSkillProviderErrors, type CreateTrustedSkillProviderRequest, type CreateTrustedSkillProviderResponse, type CreateTrustedSkillProviderResponses, type CreateUiMessageRequest, type CreateUserCredentialData, type CreateUserCredentialParamsInner, type CreateUserCredentialResponse, type CreateUserCredentialResponses, type CreateWikiAssetBody, type CreateWikiAssetUploadData, type CreateWikiAssetUploadResponse, type CreateWikiAssetUploadResponses, type CreateWikiData, type CreateWikiInner, type CreateWikiPageData, type CreateWikiPageResponse, type CreateWikiPageResponses, type CreateWikiPageTypeData, type CreateWikiPageTypeResponse, type CreateWikiPageTypeResponses, type CreateWikiPageTypeVersionData, type CreateWikiPageTypeVersionErrors, type CreateWikiPageTypeVersionResponse, type CreateWikiPageTypeVersionResponses, type CreateWikiRelationshipTypeData, type CreateWikiRelationshipTypeResponse, type CreateWikiRelationshipTypeResponses, type CreateWikiRelationshipTypeVersionData, type CreateWikiRelationshipTypeVersionErrors, type CreateWikiRelationshipTypeVersionResponse, type CreateWikiRelationshipTypeVersionResponses, type CreateWikiResponse, type CreateWikiResponses, type CredentialGenericOauthCallbackData, type CredentialGenericOauthCallbackResponses, CredentialSetupCredentialKind, type CredentialSetupFormField, type CredentialSetupItem, type CredentialSetupItemPaginatedResponse, CredentialSetupItemStatus, type CredentialSetupNextAction, type CredentialSourceSerialized, CurrentSeatStatus, type CustomSkillSpec, type CustomToolProviderDetails, type CustomToolProviderListItem, type CustomToolProviderListItemPaginatedResponse, type CustomToolProviderSerialized, type DataUiPart, type DebugAuthProfilesResponse, type DeleteAttachmentData, type DeleteAttachmentError, type DeleteAttachmentErrors, type DeleteAttachmentResponse, type DeleteAttachmentResponses, type DeleteAutomationResponse, type DeleteChatKitAgentTurnQueueItemResponse, type DeleteCustomToolProviderData, type DeleteCustomToolProviderResponses, type DeleteInboxResponse, type DeleteManagedUserCredentialData, type DeleteManagedUserCredentialResponses, type DeleteMcpServerInstanceData, type DeleteMcpServerInstanceError, type DeleteMcpServerInstanceErrors, type DeleteMcpServerInstanceResponses, type DeleteMemoryBankData, type DeleteMemoryBankResponses, type DeleteMemoryDocumentBody, type DeleteMemoryDocumentData, type DeleteMemoryDocumentResponses, type DeleteMessageData, type DeleteMessageError, type DeleteMessageErrors, type DeleteMessageResponse, type DeleteMessageResponse2, type DeleteMessageResponses, type DeleteOrganizationData, type DeleteOrganizationError, type DeleteOrganizationErrors, type DeleteOrganizationResponses, type DeleteOrgOidcProviderData, type DeleteOrgOidcProviderError, type DeleteOrgOidcProviderErrors, type DeleteOrgOidcProviderResponses, type DeletePersonalMcpServerInstanceData, type DeletePersonalMcpServerInstanceResponses, type DeletePersonalMemoryBankData, type DeletePersonalMemoryBankResponses, type DeletePersonalMemoryDocumentData, type DeletePersonalMemoryDocumentResponses, type DeletePersonalSkillData, type DeletePersonalSkillRegistryData, type DeletePersonalSkillRegistryResponses, type DeletePersonalSkillResponses, type DeletePersonalToolGroupInstanceData, type DeletePersonalToolGroupInstanceResponses, type DeletePersonalWikiData, type DeletePersonalWikiPageData, type DeletePersonalWikiPageResponses, type DeletePersonalWikiResponses, type DeleteProxiedMcpServerData, type DeleteProxiedMcpServerError, type DeleteProxiedMcpServerErrors, type DeleteProxiedMcpServerResponses, type DeleteResourceServerCredentialData, type DeleteResourceServerCredentialResponses, type DeleteRoutineResponse, type DeleteSelfAvatarData, type DeleteSelfAvatarError, type DeleteSelfAvatarErrors, type DeleteSelfAvatarResponses, type DeleteSignalResponse, type DeleteSkillData, type DeleteSkillError, type DeleteSkillErrors, type DeleteSkillRegistryData, type DeleteSkillRegistryError, type DeleteSkillRegistryErrors, type DeleteSkillRegistryResponses, type DeleteSkillResponses, type DeleteTeamData, type DeleteTeamError, type DeleteTeamErrors, type DeleteTeamGroupData, type DeleteTeamGroupError, type DeleteTeamGroupErrors, type DeleteTeamGroupResponses, type DeleteTeamResponses, type DeleteToolGroupInstanceData, type DeleteToolGroupInstanceError, type DeleteToolGroupInstanceErrors, type DeleteToolGroupInstanceResponses, type DeleteTrustedRuntimeData, type DeleteTrustedRuntimeError, type DeleteTrustedRuntimeErrors, type DeleteTrustedRuntimeResponses, type DeleteUserCredentialData, type DeleteUserCredentialResponses, type DeleteWikiAssetData, type DeleteWikiAssetErrors, type DeleteWikiAssetResponses, type DeleteWikiData, type DeleteWikiPageData, type DeleteWikiPageErrors, type DeleteWikiPageRelationshipData, type DeleteWikiPageRelationshipResponses, type DeleteWikiPageResponses, type DeleteWikiPageTypeData, type DeleteWikiPageTypeErrors, type DeleteWikiPageTypeResponse, type DeleteWikiPageTypeResponses, type DeleteWikiPageTypeVersionData, type DeleteWikiPageTypeVersionErrors, type DeleteWikiPageTypeVersionResponse, type DeleteWikiPageTypeVersionResponses, type DeleteWikiRelationshipTypeData, type DeleteWikiRelationshipTypeErrors, type DeleteWikiRelationshipTypeResponses, type DeleteWikiResponses, type DeploymentEnvironmentFile, type DisableCustomToolProviderData, type DisableCustomToolProviderResponse, type DisableCustomToolProviderResponses, type DisableProxiedMcpServerData, type DisableProxiedMcpServerError, type DisableProxiedMcpServerErrors, type DisableProxiedMcpServerResponse, type DisableProxiedMcpServerResponses, type DisableToolData, type DisableToolError, type DisableToolErrors, type DisableToolResponse, type DisableToolResponses, type DownloadAttachmentContentData, type DownloadAttachmentContentError, type DownloadAttachmentContentErrors, type DownloadAttachmentContentResponse, type DownloadAttachmentContentResponses, type DownloadSkillPackageFileData, type DownloadSkillPackageFileError, type DownloadSkillPackageFileErrors, type DownloadSkillPackageFileRequest, type DownloadSkillPackageFileResponse, type DownloadSkillPackageFileResponses, type DownloadWikiAssetContentData, type DownloadWikiAssetContentErrors, type DownloadWikiAssetContentResponse, type DownloadWikiAssetContentResponses, type DownloadWikiAssetData, type DownloadWikiAssetResponse, type DownloadWikiAssetResponses, type EnableAndBindMcpServerResult, type EnableAndBindProviderToolsData, type EnableAndBindProviderToolsError, type EnableAndBindProviderToolsErrors, type EnableAndBindProviderToolsResponse, type EnableAndBindProviderToolsResponses, type EnableAndBindToolFailure, type EnableAndBindToolsBody, type EnableAndBindToolsResponse, type EnableCustomToolProviderData, type EnableCustomToolProviderResponse, type EnableCustomToolProviderResponses, type EnabledSkillsSpec, type EnableProxiedMcpServerData, type EnableProxiedMcpServerError, type EnableProxiedMcpServerErrors, type EnableProxiedMcpServerResponse, type EnableProxiedMcpServerResponses, type EnableToolData, type EnableToolError, type EnableToolErrors, type EnableToolInstanceParamsInner, type EnableToolResponse, type EnableToolResponses, type EncryptCredentialConfigurationParamsInner, type EncryptedTrustedRuntimePayload, type EncryptPersonalUserCredentialConfigurationData, type EncryptPersonalUserCredentialConfigurationResponses, type EncryptResourceServerConfigurationData, type EncryptResourceServerConfigurationResponses, type EncryptUserCredentialConfigurationData, type EncryptUserCredentialConfigurationResponses, EndpointType, type Error, type ExchangeOAuthCodeBody, type ExchangeOauthCodeData, type ExchangeOauthCodeErrors, type ExchangeOauthCodeResponse, type ExchangeOauthCodeResponses, type ExchangeOAuthCodeResult, type ExpectedRevisionBody, type ExpireTemporaryAccountsData, type ExpireTemporaryAccountsError, type ExpireTemporaryAccountsErrors, type ExpireTemporaryAccountsResponse, type ExpireTemporaryAccountsResponse2, type ExpireTemporaryAccountsResponses, type ExportMemoryBankTemplateData, type ExportMemoryBankTemplateResponse, type ExportMemoryBankTemplateResponses, type ExportPersonalMemoryBankTemplateData, type ExportPersonalMemoryBankTemplateResponse, type ExportPersonalMemoryBankTemplateResponses, type FileUiPart, type FinalizeHostedOpenbotReleaseData, type FinalizeHostedOpenbotReleaseError, type FinalizeHostedOpenbotReleaseErrors, type FinalizeHostedOpenbotReleaseResponse, type FinalizeHostedOpenbotReleaseResponses, type GenerateLocalRuntimeTunnelApiKeyData, type GenerateLocalRuntimeTunnelApiKeyError, type GenerateLocalRuntimeTunnelApiKeyErrors, type GenerateLocalRuntimeTunnelApiKeyResponse, type GenerateLocalRuntimeTunnelApiKeyResponse2, type GenerateLocalRuntimeTunnelApiKeyResponses, type GenerateTemporaryAccountClaimUrlData, type GenerateTemporaryAccountClaimUrlError, type GenerateTemporaryAccountClaimUrlErrors, type GenerateTemporaryAccountClaimUrlResponse, type GenerateTemporaryAccountClaimUrlResponse2, type GenerateTemporaryAccountClaimUrlResponses, type GetAttachmentDownloadUrlData, type GetAttachmentDownloadUrlError, type GetAttachmentDownloadUrlErrors, type GetAttachmentDownloadUrlResponse, type GetAttachmentDownloadUrlResponse2, type GetAttachmentDownloadUrlResponses, type GetCommonProviderInstallationData, type GetCommonProviderInstallationResponse, type GetCommonProviderInstallationResponses, type GetCredentialSetupItemData, type GetCredentialSetupItemResponse, type GetCredentialSetupItemResponses, type GetCustomToolProviderData, type GetCustomToolProviderResponse, type GetCustomToolProviderResponses, type GetHostedOpenbotInstanceData, type GetHostedOpenbotInstanceError, type GetHostedOpenbotInstanceErrors, type GetHostedOpenbotInstanceResponse, type GetHostedOpenbotInstanceResponses, type GetHostedOpenbotReleaseData, type GetHostedOpenbotReleaseError, type GetHostedOpenbotReleaseErrors, type GetHostedOpenbotReleaseResponse, type GetHostedOpenbotReleaseResponses, type GetHumanApprovalActionData, type GetHumanApprovalActionError, type GetHumanApprovalActionErrors, type GetHumanApprovalActionResponse, type GetHumanApprovalActionResponses, type GetLocalRuntimeTunnelApiKeyData, type GetLocalRuntimeTunnelApiKeyError, type GetLocalRuntimeTunnelApiKeyErrors, type GetLocalRuntimeTunnelApiKeyResponse, type GetLocalRuntimeTunnelApiKeyResponses, type GetLocalRuntimeTunnelConnectorData, type GetLocalRuntimeTunnelConnectorError, type GetLocalRuntimeTunnelConnectorErrors, type GetLocalRuntimeTunnelConnectorResponse, type GetLocalRuntimeTunnelConnectorResponses, type GetManagedUserCredentialSecretData, type GetManagedUserCredentialSecretResponse, type GetManagedUserCredentialSecretResponses, type GetMcpServerInstanceData, type GetMcpServerInstanceError, type GetMcpServerInstanceErrors, type GetMcpServerInstanceResponse, type GetMcpServerInstanceResponses, type GetMemoryBankConfigData, type GetMemoryBankConfigResponse, type GetMemoryBankConfigResponses, type GetMemoryBankData, type GetMemoryBankDocumentData, type GetMemoryBankDocumentResponses, type GetMemoryBankResponse, type GetMemoryBankResponses, type GetMessageData, type GetMessageError, type GetMessageErrors, type GetMessageResponse, type GetMessageResponses, type GetOpenbotPluginsCatalogData, type GetOpenbotPluginsCatalogResponse, type GetOpenbotPluginsCatalogResponses, type GetOrganizationData, type GetOrganizationError, type GetOrganizationErrors, type GetOrganizationResponse, type GetOrganizationResponses, type GetOrgOidcProviderData, type GetOrgOidcProviderError, type GetOrgOidcProviderErrors, type GetOrgOidcProviderResponse, type GetOrgOidcProviderResponses, type GetPersonalMcpServerInstanceData, type GetPersonalMcpServerInstanceResponse, type GetPersonalMcpServerInstanceResponses, type GetPersonalMemoryBankConfigData, type GetPersonalMemoryBankConfigResponse, type GetPersonalMemoryBankConfigResponses, type GetPersonalMemoryBankData, type GetPersonalMemoryBankDocumentData, type GetPersonalMemoryBankDocumentResponses, type GetPersonalMemoryBankResponse, type GetPersonalMemoryBankResponses, type GetPersonalSkillData, type GetPersonalSkillRegistryData, type GetPersonalSkillRegistryResponse, type GetPersonalSkillRegistryResponses, type GetPersonalSkillResponse, type GetPersonalSkillResponses, type GetPersonalToolGroupInstanceData, type GetPersonalToolGroupInstanceResponse, type GetPersonalToolGroupInstanceResponses, type GetPersonalWikiData, type GetPersonalWikiPageData, type GetPersonalWikiPageResponse, type GetPersonalWikiPageResponses, type GetPersonalWikiResponse, type GetPersonalWikiResponses, type GetProviderProvisioningHumanActionData, type GetProviderProvisioningHumanActionResponse, type GetProviderProvisioningHumanActionResponses, type GetProxiedMcpServerData, type GetProxiedMcpServerError, type GetProxiedMcpServerErrors, type GetProxiedMcpServerResponse, type GetProxiedMcpServerResponses, type GetProxiedSkillProviderData, type GetProxiedSkillProviderError, type GetProxiedSkillProviderErrors, type GetProxiedSkillProviderResponse, type GetProxiedSkillProviderResponses, type GetResourceServerCredentialData, type GetResourceServerCredentialResponse, type GetResourceServerCredentialResponses, type GetRuntimeConfigData, type GetRuntimeConfigResponse, type GetRuntimeConfigResponses, type GetSelfAvatarData, type GetSelfAvatarError, type GetSelfAvatarErrors, type GetSelfAvatarResponse, type GetSelfAvatarResponses, type GetSelfProfileData, type GetSelfProfileError, type GetSelfProfileErrors, type GetSelfProfileResponse, type GetSelfProfileResponses, type GetSessionEventHistoryData, type GetSessionEventHistoryError, type GetSessionEventHistoryErrors, type GetSessionEventHistoryResponse, type GetSessionEventHistoryResponses, type GetSkillData, type GetSkillError, type GetSkillErrors, type GetSkillPackageData, type GetSkillPackageError, type GetSkillPackageErrors, type GetSkillPackageResponse, type GetSkillPackageResponses, type GetSkillRegistryData, type GetSkillRegistryError, type GetSkillRegistryErrors, type GetSkillRegistryResponse, type GetSkillRegistryResponses, type GetSkillRegistrySkillByTitleData, type GetSkillRegistrySkillByTitleError, type GetSkillRegistrySkillByTitleErrors, type GetSkillRegistrySkillByTitleResponse, type GetSkillRegistrySkillByTitleResponses, type GetSkillRegistrySkillData, type GetSkillRegistrySkillDescriptionData, type GetSkillRegistrySkillDescriptionError, type GetSkillRegistrySkillDescriptionErrors, type GetSkillRegistrySkillDescriptionResponse, type GetSkillRegistrySkillDescriptionResponses, type GetSkillRegistrySkillError, type GetSkillRegistrySkillErrors, type GetSkillRegistrySkillResponse, type GetSkillRegistrySkillResponses, type GetSkillResponse, type GetSkillResponses, type GetTeamData, type GetTeamError, type GetTeamErrors, type GetTeamGroupData, type GetTeamGroupError, type GetTeamGroupErrors, type GetTeamGroupResponse, type GetTeamGroupResponses, type GetTeamResponse, type GetTeamResponses, type GetToolGroupInstanceData, type GetToolGroupInstanceError, type GetToolGroupInstanceErrors, type GetToolGroupInstanceResponse, type GetToolGroupInstanceResponses, type GetToolsOpenapiSpecData, type GetToolsOpenapiSpecError, type GetToolsOpenapiSpecErrors, type GetToolsOpenapiSpecResponse, type GetToolsOpenapiSpecResponses, type GetTrustedRuntimeData, type GetTrustedRuntimeError, type GetTrustedRuntimeErrors, type GetTrustedRuntimeResponse, type GetTrustedRuntimeResponses, type GetUserCredentialData, type GetUserCredentialResponse, type GetUserCredentialResponses, type GetWikiData, type GetWikiPageBacklinksData, type GetWikiPageBacklinksResponse, type GetWikiPageBacklinksResponses, type GetWikiPageData, type GetWikiPageNeighborhoodData, type GetWikiPageNeighborhoodResponse, type GetWikiPageNeighborhoodResponses, type GetWikiPageRelationshipData, type GetWikiPageRelationshipResponse, type GetWikiPageRelationshipResponses, type GetWikiPageResponse, type GetWikiPageResponses, type GetWikiPageTypeData, type GetWikiPageTypeResponse, type GetWikiPageTypeResponses, type GetWikiPageTypeVersionData, type GetWikiPageTypeVersionResponse, type GetWikiPageTypeVersionResponses, type GetWikiRelationshipTypeData, type GetWikiRelationshipTypeResponse, type GetWikiRelationshipTypeResponses, type GetWikiRelationshipTypeVersionData, type GetWikiRelationshipTypeVersionResponse, type GetWikiRelationshipTypeVersionResponses, type GetWikiResponse, type GetWikiResponses, type Group, type GroupMembership, type GroupMemberWithUser, type GroupMemberWithUserPaginatedResponse, type HashedApiKey, type HealthCheckData, type HealthCheckError, type HealthCheckErrors, type HealthCheckResponse, type HealthCheckResponse2, type HealthCheckResponses, type HostedOpenBotDeployment, type HostedOpenBotInstance, HostedOpenBotInstanceStatus, type HostedOpenBotRelease, type HostedOpenBotReleaseFile, HostedOpenBotReleaseService, HostedOpenBotReleaseStatus, type Human, type HumanApprovalAction, type HumanApprovalActionResponse, type HydrateConvertedMessagesRequest, type HydrateConvertedMessagesResponse, type Identity, type ImportMemoryBankTemplateBody, type ImportMemoryBankTemplateData, type ImportMemoryBankTemplateResponse, type ImportMemoryBankTemplateResponse2, type ImportMemoryBankTemplateResponses, type ImportPersonalMemoryBankTemplateData, type ImportPersonalMemoryBankTemplateResponse, type ImportPersonalMemoryBankTemplateResponses, type ImportRunSummary, type ImportStateRequest, type ImportStateResponse, type Inbox, type InboxInstance, InboxInstanceTypingStatus, type InboxPaginatedResponse, InboxStatus, InboxType, type InboxWithLinkedInboxes, type InboxWithLinkedInboxesPaginatedResponse, type IngestSignalResponse, type InspectWikiAssetReferencesData, type InspectWikiAssetReferencesResponse, type InspectWikiAssetReferencesResponses, type InterruptChatKitSessionResponse, type InviteTeamUsersData, type InviteTeamUsersError, type InviteTeamUsersErrors, type InviteTeamUsersResponse, type InviteTeamUsersResponses, type InviteUserFailure, type InviteUserInput, type InviteUsersBody, type InviteUsersResponse, type InvokeCustomToolData, type InvokeCustomToolRequestInner, type InvokeCustomToolResponse, type InvokeCustomToolResponses, type InvokeError, type InvokeResult, type InvokeSessionProviderToolBody, type InvokeSessionProviderToolResponse, type InvokeToolData, type InvokeToolError, type InvokeToolErrors, type InvokeToolInstanceParamsInner, type InvokeToolResponse, type InvokeToolResponses, type IssueChatKitRealtimeSocketTicketRequest, type IssueOpenbotChatkitRealtimeTicketData, type IssueOpenbotChatkitRealtimeTicketError, type IssueOpenbotChatkitRealtimeTicketErrors, type IssueOpenbotChatkitRealtimeTicketResponse, type IssueOpenbotChatkitRealtimeTicketResponses, type JsonEqualsPredicate, type JsonSchema, type Jwk, type JwksResponse, type ListApiKeysResponse, type ListAvailableToolGroupsData, type ListAvailableToolGroupsError, type ListAvailableToolGroupsErrors, type ListAvailableToolGroupsResponse, type ListAvailableToolGroupsResponses, type ListChatkitRoutineGrantsData, type ListChatkitRoutineGrantsResponse, type ListChatkitRoutineGrantsResponses, type ListCommonProviderInstallationOwnershipGrantsData, type ListCommonProviderInstallationOwnershipGrantsResponse, type ListCommonProviderInstallationOwnershipGrantsResponses, type ListCommonProviderInstallationsData, type ListCommonProviderInstallationsResponse, type ListCommonProviderInstallationsResponses, type ListCommonProviderInstallationVisibilityGrantsData, type ListCommonProviderInstallationVisibilityGrantsResponse, type ListCommonProviderInstallationVisibilityGrantsResponses, type ListCredentialSetupItemsData, type ListCredentialSetupItemsResponse, type ListCredentialSetupItemsResponses, type ListCustomToolProvidersData, type ListCustomToolProvidersResponse, type ListCustomToolProvidersResponses, type ListInboxAgentsData, type ListInboxAgentsError, type ListInboxAgentsErrors, type ListInboxAgentsResponse, type ListInboxAgentsResponses, type ListInboxesData, type ListInboxesError, type ListInboxesErrors, type ListInboxesResponse, type ListInboxesResponses, type ListManagedUserCredentialsData, type ListManagedUserCredentialsResponse, type ListManagedUserCredentialsResponses, type ListMcpProviderCatalogData, type ListMcpProviderCatalogError, type ListMcpProviderCatalogErrors, type ListMcpProviderCatalogResponse, type ListMcpProviderCatalogResponse2, type ListMcpProviderCatalogResponses, type ListMcpResourceOwnershipGrantsData, type ListMcpResourceOwnershipGrantsResponse, type ListMcpResourceOwnershipGrantsResponses, type ListMcpResourceVisibilityGrantsData, type ListMcpResourceVisibilityGrantsResponse, type ListMcpResourceVisibilityGrantsResponses, type ListMcpServerInstancesData, type ListMcpServerInstancesError, type ListMcpServerInstancesErrors, type ListMcpServerInstancesResponse, type ListMcpServerInstancesResponses, type ListMemoryBankDocumentsData, type ListMemoryBankDocumentsResponse, type ListMemoryBankDocumentsResponses, type ListMemoryBankOwnershipGrantsData, type ListMemoryBankOwnershipGrantsResponse, type ListMemoryBankOwnershipGrantsResponses, type ListMemoryBanksData, type ListMemoryBankSourceBindingsData, type ListMemoryBankSourceBindingsResponse, type ListMemoryBankSourceBindingsResponses, type ListMemoryBanksResponse, type ListMemoryBanksResponses, type ListMemoryBankVisibilityGrantsData, type ListMemoryBankVisibilityGrantsResponse, type ListMemoryBankVisibilityGrantsResponses, type ListMemorySourceBindingsData, type ListMemorySourceBindingsResponse, type ListMemorySourceBindingsResponses, type ListMessagesData, type ListMessagesError, type ListMessagesErrors, type ListMessagesResponse, type ListMessagesResponses, type ListOpenbotDeploymentsData, type ListOpenbotDeploymentsError, type ListOpenbotDeploymentsErrors, type ListOpenbotDeploymentsResponse, type ListOpenBotDeploymentsResponse, type ListOpenbotDeploymentsResponses, type ListOrganizationMembersData, type ListOrganizationMembersError, type ListOrganizationMembersErrors, type ListOrganizationMembersResponse, type ListOrganizationMembersResponses, type ListOrganizationsData, type ListOrganizationsError, type ListOrganizationsErrors, type ListOrganizationsResponses, type ListOrganizationTeamGroupsData, type ListOrganizationTeamGroupsResponse, type ListOrganizationTeamGroupsResponses, type ListOrgOidcProvidersData, type ListOrgOidcProvidersError, type ListOrgOidcProvidersErrors, type ListOrgOidcProvidersResponse, type ListOrgOidcProvidersResponses, type ListPersonalMcpServerInstancesData, type ListPersonalMcpServerInstancesError, type ListPersonalMcpServerInstancesErrors, type ListPersonalMcpServerInstancesResponse, type ListPersonalMcpServerInstancesResponses, type ListPersonalMemoryBankDocumentsData, type ListPersonalMemoryBankDocumentsResponse, type ListPersonalMemoryBankDocumentsResponses, type ListPersonalMemoryBankOwnershipGrantsData, type ListPersonalMemoryBankOwnershipGrantsResponse, type ListPersonalMemoryBankOwnershipGrantsResponses, type ListPersonalMemoryBanksData, type ListPersonalMemoryBankSourceBindingsData, type ListPersonalMemoryBankSourceBindingsResponse, type ListPersonalMemoryBankSourceBindingsResponses, type ListPersonalMemoryBanksResponse, type ListPersonalMemoryBanksResponses, type ListPersonalMemoryBankVisibilityGrantsData, type ListPersonalMemoryBankVisibilityGrantsResponse, type ListPersonalMemoryBankVisibilityGrantsResponses, type ListPersonalRegistryOwnershipGrantsData, type ListPersonalRegistryOwnershipGrantsResponse, type ListPersonalRegistryOwnershipGrantsResponses, type ListPersonalRegistryVisibilityGrantsData, type ListPersonalRegistryVisibilityGrantsResponse, type ListPersonalRegistryVisibilityGrantsResponses, type ListPersonalRscOwnershipGrantsData, type ListPersonalRscOwnershipGrantsResponse, type ListPersonalRscOwnershipGrantsResponses, type ListPersonalRscVisibilityGrantsData, type ListPersonalRscVisibilityGrantsResponse, type ListPersonalRscVisibilityGrantsResponses, type ListPersonalSkillOwnershipGrantsData, type ListPersonalSkillOwnershipGrantsResponse, type ListPersonalSkillOwnershipGrantsResponses, type ListPersonalSkillRegistriesData, type ListPersonalSkillRegistriesResponse, type ListPersonalSkillRegistriesResponses, type ListPersonalSkillsData, type ListPersonalSkillsResponse, type ListPersonalSkillsResponses, type ListPersonalSkillVisibilityGrantsData, type ListPersonalSkillVisibilityGrantsResponse, type ListPersonalSkillVisibilityGrantsResponses, type ListPersonalToolGroupInstancesData, type ListPersonalToolGroupInstancesError, type ListPersonalToolGroupInstancesErrors, type ListPersonalToolGroupInstancesResponse, type ListPersonalToolGroupInstancesResponses, type ListPersonalUcOwnershipGrantsData, type ListPersonalUcOwnershipGrantsResponse, type ListPersonalUcOwnershipGrantsResponses, type ListPersonalUcVisibilityGrantsData, type ListPersonalUcVisibilityGrantsResponse, type ListPersonalUcVisibilityGrantsResponses, type ListPersonalWikiOwnershipGrantsData, type ListPersonalWikiOwnershipGrantsResponse, type ListPersonalWikiOwnershipGrantsResponses, type ListPersonalWikiPagesData, type ListPersonalWikiPagesResponse, type ListPersonalWikiPagesResponses, type ListPersonalWikisData, type ListPersonalWikisResponse, type ListPersonalWikisResponses, type ListPersonalWikiVisibilityGrantsData, type ListPersonalWikiVisibilityGrantsResponse, type ListPersonalWikiVisibilityGrantsResponses, type ListProviderProvisionerCatalogData, type ListProviderProvisionerCatalogResponse, type ListProviderProvisionerCatalogResponses, type ListProviderSetupCatalogResponse, type ListProxiedMcpServersData, type ListProxiedMcpServersError, type ListProxiedMcpServersErrors, type ListProxiedMcpServersResponse, type ListProxiedMcpServersResponses, type ListProxiedSkillProvidersData, type ListProxiedSkillProvidersResponse, type ListProxiedSkillProvidersResponse2, type ListProxiedSkillProvidersResponses, type ListPublicAvailableToolGroupsData, type ListPublicAvailableToolGroupsError, type ListPublicAvailableToolGroupsErrors, type ListPublicAvailableToolGroupsResponse, type ListPublicAvailableToolGroupsResponses, type ListResourceServerCredentialsData, type ListResourceServerCredentialsResponse, type ListResourceServerCredentialsResponses, type ListReverseProxyProvidersResponse, type ListRscOwnershipGrantsData, type ListRscOwnershipGrantsResponse, type ListRscOwnershipGrantsResponses, type ListRscVisibilityGrantsData, type ListRscVisibilityGrantsResponse, type ListRscVisibilityGrantsResponses, type ListSessionInboxInstancesData, type ListSessionInboxInstancesError, type ListSessionInboxInstancesErrors, type ListSessionInboxInstancesResponse, type ListSessionInboxInstancesResponses, type ListSessionResourceGrantsData, type ListSessionResourceGrantsError, type ListSessionResourceGrantsErrors, type ListSessionResourceGrantsResponse, type ListSessionResourceGrantsResponses, type ListSessionsData, type ListSessionsError, type ListSessionsErrors, type ListSessionsResponse, type ListSessionsResponses, type ListSessionUserMembersData, type ListSessionUserMembersError, type ListSessionUserMembersErrors, type ListSessionUserMembersResponse, type ListSessionUserMembersResponses, type ListSignalProviderGrantsData, type ListSignalProviderGrantsResponse, type ListSignalProviderGrantsResponses, type ListSignalRuleGrantsData, type ListSignalRuleGrantsResponse, type ListSignalRuleGrantsResponses, type ListSkillOwnershipGrantsData, type ListSkillOwnershipGrantsResponse, type ListSkillOwnershipGrantsResponses, type ListSkillRegistriesData, type ListSkillRegistriesError, type ListSkillRegistriesErrors, type ListSkillRegistriesResponse, type ListSkillRegistriesResponses, type ListSkillRegistryOwnershipGrantsData, type ListSkillRegistryOwnershipGrantsResponse, type ListSkillRegistryOwnershipGrantsResponses, type ListSkillRegistrySkillSummariesData, type ListSkillRegistrySkillSummariesError, type ListSkillRegistrySkillSummariesErrors, type ListSkillRegistrySkillSummariesResponse, type ListSkillRegistrySkillSummariesResponses, type ListSkillRegistryVisibilityGrantsData, type ListSkillRegistryVisibilityGrantsResponse, type ListSkillRegistryVisibilityGrantsResponses, type ListSkillsData, type ListSkillsError, type ListSkillsErrors, type ListSkillsResponse, type ListSkillsResponses, type ListSkillVisibilityGrantsData, type ListSkillVisibilityGrantsResponse, type ListSkillVisibilityGrantsResponses, type ListTeamGroupMembersData, type ListTeamGroupMembersResponse, type ListTeamGroupMembersResponses, type ListTeamGroupsData, type ListTeamGroupsResponse, type ListTeamGroupsResponses, type ListTeamInvitationsData, type ListTeamInvitationsResponse, type ListTeamInvitationsResponses, type ListTeamMembersData, type ListTeamMembersError, type ListTeamMembersErrors, type ListTeamMembersResponse, type ListTeamMembersResponses, type ListTeamsData, type ListTeamsError, type ListTeamsErrors, type ListTeamsResponse, type ListTeamsResponses, type ListToolDeploymentsByAliasData, type ListToolDeploymentsByAliasError, type ListToolDeploymentsByAliasErrors, type ListToolDeploymentsByAliasResponse, type ListToolDeploymentsByAliasResponses, type ListToolGroupInstancesData, type ListToolGroupInstancesError, type ListToolGroupInstancesErrors, type ListToolGroupInstancesGroupedByToolData, type ListToolGroupInstancesGroupedByToolError, type ListToolGroupInstancesGroupedByToolErrors, type ListToolGroupInstancesGroupedByToolResponse, type ListToolGroupInstancesGroupedByToolResponses, type ListToolGroupInstancesResponse, type ListToolGroupInstancesResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTrustedRuntimesData, type ListTrustedRuntimesError, type ListTrustedRuntimesErrors, type ListTrustedRuntimesResponse, type ListTrustedRuntimesResponses, type ListUcOwnershipGrantsData, type ListUcOwnershipGrantsResponse, type ListUcOwnershipGrantsResponses, type ListUcVisibilityGrantsData, type ListUcVisibilityGrantsResponse, type ListUcVisibilityGrantsResponses, type ListUserCredentialsData, type ListUserCredentialsResponse, type ListUserCredentialsResponses, type ListWikiAssetsData, type ListWikiAssetsResponse, type ListWikiAssetsResponses, type ListWikiOntologyInstallationsData, type ListWikiOntologyInstallationsResponse, type ListWikiOntologyInstallationsResponses, type ListWikiOntologyTemplatesData, type ListWikiOntologyTemplatesResponse, type ListWikiOntologyTemplatesResponses, type ListWikiOwnershipGrantsData, type ListWikiOwnershipGrantsResponse, type ListWikiOwnershipGrantsResponses, type ListWikiPageAssetsData, type ListWikiPageAssetsResponse, type ListWikiPageAssetsResponses, type ListWikiPageRelationshipsData, type ListWikiPageRelationshipsResponse, type ListWikiPageRelationshipsResponses, type ListWikiPageRevisionsData, type ListWikiPageRevisionsResponse, type ListWikiPageRevisionsResponses, type ListWikiPagesData, type ListWikiPagesResponse, type ListWikiPagesResponses, type ListWikiPageTypesData, type ListWikiPageTypesResponse, type ListWikiPageTypesResponses, type ListWikiPageTypeVersionsData, type ListWikiPageTypeVersionsResponse, type ListWikiPageTypeVersionsResponses, type ListWikiRelationshipTypesData, type ListWikiRelationshipTypesResponse, type ListWikiRelationshipTypesResponses, type ListWikiRelationshipTypeVersionsData, type ListWikiRelationshipTypeVersionsResponse, type ListWikiRelationshipTypeVersionsResponses, type ListWikisData, type ListWikisResponse, type ListWikisResponses, type ListWikiVisibilityGrantsData, type ListWikiVisibilityGrantsResponse, type ListWikiVisibilityGrantsResponses, type LocalRuntimeTunnelApiKey, type LocalRuntimeTunnelConnector, type LoginProviderResolution, type Machine, type ManagedSkillSelection, type ManagedUserCredentialSecretResponse, type ManagedUserCredentialSummary, type ManagedUserCredentialSummaryPaginatedResponse, type ManagedUserCredentialSummaryValue, type McpPlaygroundAiSdkChatMessage, type McpPlaygroundAiSdkChatMessagePart, type McpPlaygroundAiSdkChatRequest, type McpProtocolDeleteData, type McpProtocolDeleteError, type McpProtocolDeleteErrors, type McpProtocolDeleteResponses, type McpProtocolGetData, type McpProtocolGetError, type McpProtocolGetErrors, type McpProtocolGetResponses, type McpProtocolPostData, type McpProtocolPostError, type McpProtocolPostErrors, type McpProtocolPostResponses, McpProviderCatalogConnectionMethod, type McpProviderCatalogEntry, type McpProviderCatalogTool, type McpServerInstanceSerializedWithFunctions, type McpServerInstanceSerializedWithFunctionsPaginatedResponse, type McpServerInstanceToolSerialized, type McpServerPlaygroundChatData, type McpServerPlaygroundChatError, type McpServerPlaygroundChatErrors, type McpServerPlaygroundChatResponses, type McpServerSpec, type MemoryActorContext, type MemoryBank, type MemoryBankBillingContext, type MemoryBankConfig, type MemoryBankCreationReservation, type MemoryBankDocumentList, type MemoryBankHealth, type MemoryBankPaginatedResponse, type MemoryBankSpec, MemoryBankStatus, type MemoryBankTemplate, type MemoryDocument, type MemoryOperationResponse, MemoryProvider, type MemorySourceBinding, MemorySourceKind, type MemorySpec, type Message, MessageFormat, type MessageFormatConfig, type MessagePaginatedResponse, MessageRole, type Metadata, type MigrateWikiPageBody, type MigrateWikiPageTypeData, type MigrateWikiPageTypeErrors, type MigrateWikiPageTypeResponse, type MigrateWikiPageTypeResponses, type MoveWikiPageBody, type MoveWikiPageData, type MoveWikiPageErrors, type MoveWikiPageResponse, type MoveWikiPageResponses, type ObserveSessionData, type ObserveSessionError, type ObserveSessionErrors, type ObserveSessionResponses, type OntologyPageTypeDefinition, type OntologyRelationshipTypeDefinition, type OpenBotAgentSkillInput, type OpenBotDeployment, type OpenBotPluginsCatalogResponse, type Organization, type OrganizationMemberWithUser, type OrganizationMemberWithUserPaginatedResponse, type OrgOidcProvider, type OrgOidcProviderPaginatedResponse, OrgOidcProviderStatus, type PageRelationshipView, type PageTypeMigrationIssue, type PageTypeMigrationPreview, type PageTypeValidationResult, PartState, type PersonalMcpProtocolDeleteData, type PersonalMcpProtocolDeleteResponses, type PersonalMcpProtocolGetData, type PersonalMcpProtocolGetResponses, type PersonalMcpProtocolPostData, type PersonalMcpProtocolPostResponses, type PersonalMcpServerInstanceSerialized, type PersonalSkill, type PersonalSkillRegistry, type PersonalToolGroupInstanceSerialized, type PlanStateRequest, type PreviewWikiPageTypeMigrationData, type PreviewWikiPageTypeMigrationErrors, type PreviewWikiPageTypeMigrationResponse, type PreviewWikiPageTypeMigrationResponses, type ProductBillingContext, ProductSubscriptionStatus, type ProviderAppProvisioningResponse, type ProviderAuthAccountNameDisplay, type ProviderAuthAdapterApiKey, type ProviderAuthAdapterConfig, type ProviderAuthAdapterCustom, type ProviderAuthAdapterCustomJsonSchema, type ProviderAuthAdapterNoAuth, type ProviderAuthAdapterOauthApp, type ProviderAuthAdapterOauthJwtBearer, type ProviderAuthAdapterServerTokenExchange, type ProviderAuthAdapterTildeManagedOauth, type ProviderAuthFieldDisplay, type ProviderProvisionerConfigField, type ProviderProvisionerCredentialRequirement, type ProviderProvisionerForm, type ProviderProvisionerInstructions, ProviderProvisionerSetupKind, type ProviderProvisioningCallbackData, type ProviderProvisioningCallbackResponse, type ProviderProvisioningCallbackResponses, type ProviderProvisioningHumanAction, type ProviderProvisioningInput, type ProviderProvisioningNextAction, type ProviderSetupAuthMethod, type ProviderSetupCatalogData, type ProviderSetupCatalogResponse, type ProviderSetupCatalogResponses, type ProviderSetupDescriptor, type ProviderSetupField, type ProviderSetupNextAction, type ProviderSetupOption, type ProviderSetupResponse, type ProviderSetupResumeData, type ProviderSetupResumeResponse, type ProviderSetupResumeResponses, type ProviderSetupStartData, type ProviderSetupStartResponse, type ProviderSetupStartResponses, type ProvisionAgentRequest, type ProvisionedProviderApp, type ProvisionedResource, ProvisionerCredentialKind, ProxiedMcpApiKeyLocation, ProxiedMcpAuthMode, type ProxiedMcpServerDetails, type ProxiedMcpServerListItem, type ProxiedMcpServerListItemPaginatedResponse, type ProxiedMcpServerSerialized, type ProxiedSkill, type ProxiedSkillProvider, type ProxyCredentialTemplate, type PutAutomationBody, type ReasoningUiPart, type RecallMemoryBody, type RecallMemoryData, type RecallMemoryResponse, type RecallMemoryResponses, type RecallPersonalMemoryData, type RecallPersonalMemoryResponse, type RecallPersonalMemoryResponses, type ReconcileOpenBotAgentBundleBody, type ReconcileOpenbotAgentBundleData, type ReconcileOpenbotAgentBundleResponse, type ReconcileOpenBotAgentBundleResponse, type ReconcileOpenbotAgentBundleResponses, type RedirectTemporaryAccountClaimPageData, type ReflectMemoryBody, type ReflectMemoryData, type ReflectMemoryResponse, type ReflectMemoryResponses, type ReflectPersonalMemoryData, type ReflectPersonalMemoryResponse, type ReflectPersonalMemoryResponses, type RefreshCustomToolProviderData, type RefreshCustomToolProviderResponse, type RefreshCustomToolProviderResponse2, type RefreshCustomToolProviderResponses, type RefreshProxiedMcpServerData, type RefreshProxiedMcpServerError, type RefreshProxiedMcpServerErrors, type RefreshProxiedMcpServerResponse, type RefreshProxiedMcpServerResponses, type RefreshTokenRequest, type RegisterAgentTool, type RegisterAgentToolsRequestInner, type RegisterChatKitChatProviderRequestInner, type RegisterChatKitChatProviderResponse, type RegisterHttpVercelAiSdkAgentRequestInner, type RegisterHttpVercelAiSdkAgentResponse, type RegisterInboxInstanceRequest, type RegisterOauthClientData, type RegisterOauthClientError, type RegisterOauthClientErrors, type RegisterOAuthClientRequest, type RegisterOauthClientResponse, type RegisterOAuthClientResponse, type RegisterOauthClientResponses, type RegisterOpenbotDeploymentData, type RegisterOpenbotDeploymentError, type RegisterOpenbotDeploymentErrors, type RegisterOpenBotDeploymentRequest, type RegisterOpenbotDeploymentResponse, type RegisterOpenbotDeploymentResponses, type RegisterTeamOauthClientData, type RegisterTeamOauthClientError, type RegisterTeamOauthClientErrors, type RegisterTeamOauthClientResponse, type RegisterTeamOauthClientResponses, type RegisterVercelUiChatProviderRequestInner, RelationshipDirectionality, type RemoveChatKitParticipantResponse, type RemoveChatkitRoutineGrantData, type RemoveChatkitRoutineGrantResponses, type RemoveCommonProviderInstallationOwnershipGrantData, type RemoveCommonProviderInstallationOwnershipGrantResponses, type RemoveCommonProviderInstallationVisibilityGrantData, type RemoveCommonProviderInstallationVisibilityGrantResponses, type RemoveMcpResourceOwnershipGrantData, type RemoveMcpResourceOwnershipGrantResponses, type RemoveMcpResourceVisibilityGrantData, type RemoveMcpResourceVisibilityGrantResponses, type RemoveMcpServerInstanceFunctionData, type RemoveMcpServerInstanceFunctionError, type RemoveMcpServerInstanceFunctionErrors, type RemoveMcpServerInstanceFunctionResponse, type RemoveMcpServerInstanceFunctionResponses, type RemoveMemoryBankOwnershipGrantData, type RemoveMemoryBankOwnershipGrantResponses, type RemoveMemoryBankVisibilityGrantData, type RemoveMemoryBankVisibilityGrantResponses, type RemoveOrganizationMemberData, type RemoveOrganizationMemberError, type RemoveOrganizationMemberErrors, type RemoveOrganizationMemberResponses, type RemovePersonalMemoryBankOwnershipGrantData, type RemovePersonalMemoryBankOwnershipGrantResponses, type RemovePersonalMemoryBankVisibilityGrantData, type RemovePersonalMemoryBankVisibilityGrantResponses, type RemovePersonalRegistryOwnershipGrantData, type RemovePersonalRegistryOwnershipGrantResponses, type RemovePersonalRegistryVisibilityGrantData, type RemovePersonalRegistryVisibilityGrantResponses, type RemovePersonalRscOwnershipGrantData, type RemovePersonalRscOwnershipGrantResponses, type RemovePersonalRscVisibilityGrantData, type RemovePersonalRscVisibilityGrantResponses, type RemovePersonalSkillOwnershipGrantData, type RemovePersonalSkillOwnershipGrantResponses, type RemovePersonalSkillVisibilityGrantData, type RemovePersonalSkillVisibilityGrantResponses, type RemovePersonalUcOwnershipGrantData, type RemovePersonalUcOwnershipGrantResponses, type RemovePersonalUcVisibilityGrantData, type RemovePersonalUcVisibilityGrantResponses, type RemovePersonalWikiOwnershipGrantData, type RemovePersonalWikiOwnershipGrantResponses, type RemovePersonalWikiVisibilityGrantData, type RemovePersonalWikiVisibilityGrantResponses, type RemoveRscOwnershipGrantData, type RemoveRscOwnershipGrantResponses, type RemoveRscVisibilityGrantData, type RemoveRscVisibilityGrantResponses, type RemoveSessionResourceGrantData, type RemoveSessionResourceGrantError, type RemoveSessionResourceGrantErrors, type RemoveSessionResourceGrantResponse, type RemoveSessionResourceGrantResponses, type RemoveSessionUserMemberData, type RemoveSessionUserMemberError, type RemoveSessionUserMemberErrors, type RemoveSessionUserMemberResponse, type RemoveSessionUserMemberResponse2, type RemoveSessionUserMemberResponses, type RemoveSignalProviderGrantData, type RemoveSignalProviderGrantResponses, type RemoveSignalRuleGrantData, type RemoveSignalRuleGrantResponses, type RemoveSkillOwnershipGrantData, type RemoveSkillOwnershipGrantResponses, type RemoveSkillRegistryOwnershipGrantData, type RemoveSkillRegistryOwnershipGrantResponses, type RemoveSkillRegistryVisibilityGrantData, type RemoveSkillRegistryVisibilityGrantResponses, type RemoveSkillVisibilityGrantData, type RemoveSkillVisibilityGrantResponses, type RemoveTeamGroupMemberData, type RemoveTeamGroupMemberResponses, type RemoveTeamMemberData, type RemoveTeamMemberError, type RemoveTeamMemberErrors, type RemoveTeamMemberResponses, type RemoveUcOwnershipGrantData, type RemoveUcOwnershipGrantResponses, type RemoveUcVisibilityGrantData, type RemoveUcVisibilityGrantResponses, type RemoveWikiOwnershipGrantData, type RemoveWikiOwnershipGrantResponses, type RemoveWikiVisibilityGrantData, type RemoveWikiVisibilityGrantResponses, type RenameChatKitWorkspaceThreadRequestInner, type ReorderChatKitAgentTurnQueueItemRequestInner, type ReplaceMemoryBankBindingsBody, type ReplaceMemorySourceBindingsData, type ReplaceMemorySourceBindingsResponse, type ReplaceMemorySourceBindingsResponses, type ReportToolExecutionRequestInner, type ResetMemoryBankConfigData, type ResetMemoryBankConfigResponse, type ResetMemoryBankConfigResponses, type ResetPersonalMemoryBankConfigData, type ResetPersonalMemoryBankConfigResponse, type ResetPersonalMemoryBankConfigResponses, type ResolveLoginProviderResponse, type ResolveStateSourceRequest, type ResolveStateSourceResponse, ResourceAccessMode, ResourceAction, type ResourceApplyOutput, type ResourceAuthorization, type ResourceAuthorizationModes, type ResourceGrant, ResourceGrantPlane, type ResourceGrantRequest, type ResourceOwnership, type ResourcePlanItem, ResourcePrincipalType, type ResourceServerCredentialSerialized, type ResourceServerCredentialSerializedPaginatedResponse, type ResumeCredentialSetupItemBody, type ResumeCredentialSetupItemData, type ResumeCredentialSetupItemResponse, type ResumeCredentialSetupItemResponses, type ResumeProviderAppProvisioningBody, type ResumeProviderAppProvisioningData, type ResumeProviderAppProvisioningResponse, type ResumeProviderAppProvisioningResponses, type ResumeProviderSetupBody, type ResumeUserCredentialBrokeringData, type ResumeUserCredentialBrokeringParams, type ResumeUserCredentialBrokeringResponse, type ResumeUserCredentialBrokeringResponses, type RetainMemoryBody, type RetainMemoryDocumentData, type RetainMemoryDocumentResponse, type RetainMemoryDocumentResponses, type RetainPersonalMemoryDocumentData, type RetainPersonalMemoryDocumentResponse, type RetainPersonalMemoryDocumentResponses, type RetryMemorySourceBody, type RetryMemorySourceSyncData, type RetryMemorySourceSyncResponse, type RetryMemorySourceSyncResponses, type RetryWikiData, type RetryWikiResponse, type RetryWikiResponses, type ReturnAddress, type ReturnAddressUrl, type ReverseProxyAddProfileOwnershipGrantData, type ReverseProxyAddProfileOwnershipGrantResponse, type ReverseProxyAddProfileOwnershipGrantResponses, type ReverseProxyAddProfileVisibilityGrantData, type ReverseProxyAddProfileVisibilityGrantResponse, type ReverseProxyAddProfileVisibilityGrantResponses, type ReverseProxyCreateProfileData, type ReverseProxyCreateProfileError, type ReverseProxyCreateProfileErrors, type ReverseProxyCreateProfileResponse, type ReverseProxyCreateProfileResponses, type ReverseProxyDeleteProfileData, type ReverseProxyDeleteProfileError, type ReverseProxyDeleteProfileErrors, type ReverseProxyDeleteProfileResponses, type ReverseProxyGetProfileData, type ReverseProxyGetProfileError, type ReverseProxyGetProfileErrors, type ReverseProxyGetProfileResponse, type ReverseProxyGetProfileResponses, type ReverseProxyListProfileOwnershipGrantsData, type ReverseProxyListProfileOwnershipGrantsResponse, type ReverseProxyListProfileOwnershipGrantsResponses, type ReverseProxyListProfilesData, type ReverseProxyListProfilesError, type ReverseProxyListProfilesErrors, type ReverseProxyListProfilesResponse, type ReverseProxyListProfilesResponses, type ReverseProxyListProfileVisibilityGrantsData, type ReverseProxyListProfileVisibilityGrantsResponse, type ReverseProxyListProfileVisibilityGrantsResponses, type ReverseProxyListProvidersData, type ReverseProxyListProvidersResponse, type ReverseProxyListProvidersResponses, type ReverseProxyProfile, type ReverseProxyProfilePaginatedResponse, type ReverseProxyProviderInfo, type ReverseProxyProxyGetData, type ReverseProxyProxyGetResponses, type ReverseProxyProxyPostData, type ReverseProxyProxyPostResponses, type ReverseProxyRemoveProfileOwnershipGrantData, type ReverseProxyRemoveProfileOwnershipGrantResponses, type ReverseProxyRemoveProfileVisibilityGrantData, type ReverseProxyRemoveProfileVisibilityGrantResponses, type ReverseProxySetProfileOwnershipData, type ReverseProxySetProfileOwnershipResponse, type ReverseProxySetProfileOwnershipResponses, type ReverseProxySetProfileVisibilityData, type ReverseProxySetProfileVisibilityResponse, type ReverseProxySetProfileVisibilityResponses, type ReverseProxyUpdateProfileData, type ReverseProxyUpdateProfileError, type ReverseProxyUpdateProfileErrors, type ReverseProxyUpdateProfileResponse, type ReverseProxyUpdateProfileResponses, type RevokeLocalRuntimeTunnelApiKeyData, type RevokeLocalRuntimeTunnelApiKeyError, type RevokeLocalRuntimeTunnelApiKeyErrors, type RevokeLocalRuntimeTunnelApiKeyResponse, type RevokeLocalRuntimeTunnelApiKeyResponses, type RevokeTeamInvitationData, type RevokeTeamInvitationResponses, type RotateCustomToolProviderSigningKeyData, type RotateCustomToolProviderSigningKeyResponse, type RotateCustomToolProviderSigningKeyResponse2, type RotateCustomToolProviderSigningKeyResponses, type RouteAuthCallbackData, type RouteAuthCallbackError, type RouteAuthCallbackErrors, type RouteCreateApiKeyData, type RouteCreateApiKeyError, type RouteCreateApiKeyErrors, type RouteCreateApiKeyResponse, type RouteCreateApiKeyResponses, type RouteDeleteApiKeyData, type RouteDeleteApiKeyError, type RouteDeleteApiKeyErrors, type RouteDeleteApiKeyResponse, type RouteDeleteApiKeyResponses, type RouteGetJwksData, type RouteGetJwksError, type RouteGetJwksErrors, type RouteGetJwksResponse, type RouteGetJwksResponses, type RouteListApiKeysData, type RouteListApiKeysError, type RouteListApiKeysErrors, type RouteListApiKeysResponse, type RouteListApiKeysResponses, type RouteListDebugAuthProfilesData, type RouteListDebugAuthProfilesError, type RouteListDebugAuthProfilesErrors, type RouteListDebugAuthProfilesResponse, type RouteListDebugAuthProfilesResponses, type RouteLogoutData, type RouteRefreshTokenData, type RouteRefreshTokenError, type RouteRefreshTokenErrors, type RouteRefreshTokenResponse, type RouteRefreshTokenResponses, type RouteResolveLoginProviderData, type RouteResolveLoginProviderError, type RouteResolveLoginProviderErrors, type RouteResolveLoginProviderResponse, type RouteResolveLoginProviderResponses, type RouteSelectDebugAuthProfileData, type RouteSelectDebugAuthProfileError, type RouteSelectDebugAuthProfileErrors, type RouteSelectDebugAuthProfileResponse, type RouteSelectDebugAuthProfileResponses, type RouteStartAuthorizationData, type RouteStartAuthorizationError, type RouteStartAuthorizationErrors, type Routine, type RoutinePaginatedResponse, type RunAutomationBody, type RunAutomationResponse, type RuntimeConfig, type SearchSkillRegistryData, type SearchSkillRegistryError, type SearchSkillRegistryErrors, type SearchSkillRegistryResponse, type SearchSkillRegistryResponses, type SelectDebugAuthProfileRequest, type SelfProfileAvatarResponse, type SelfProfileResponse, type SelfProfileUser, type SendChatKitWorkspaceMessageRequestInner, type SendSessionMessageBody, type SendSessionMessageInput, type SendSessionMessageResponse, type Session, type SessionPaginatedResponse, type SessionUserMembership, SessionUserRole, type SetChatKitResourceStatusRequest, type SetChatkitRoutineOwnershipData, type SetChatkitRoutineOwnershipResponse, type SetChatkitRoutineOwnershipResponses, type SetChatkitRoutineVisibilityData, type SetChatkitRoutineVisibilityResponse, type SetChatkitRoutineVisibilityResponses, type SetCommonProviderInstallationOwnershipData, type SetCommonProviderInstallationOwnershipResponse, type SetCommonProviderInstallationOwnershipResponses, type SetCommonProviderInstallationVisibilityData, type SetCommonProviderInstallationVisibilityResponse, type SetCommonProviderInstallationVisibilityResponses, type SetMcpResourceOwnershipData, type SetMcpResourceOwnershipResponse, type SetMcpResourceOwnershipResponses, type SetMcpResourceVisibilityData, type SetMcpResourceVisibilityResponse, type SetMcpResourceVisibilityResponses, type SetMemoryBankOwnershipModeData, type SetMemoryBankOwnershipModeResponse, type SetMemoryBankOwnershipModeResponses, type SetMemoryBankVisibilityData, type SetMemoryBankVisibilityResponse, type SetMemoryBankVisibilityResponses, type SetOpenBotAvatarRequest, type SetPersonalMemoryBankOwnershipModeData, type SetPersonalMemoryBankOwnershipModeResponse, type SetPersonalMemoryBankOwnershipModeResponses, type SetPersonalMemoryBankVisibilityData, type SetPersonalMemoryBankVisibilityResponse, type SetPersonalMemoryBankVisibilityResponses, type SetPersonalRegistryOwnershipModeData, type SetPersonalRegistryOwnershipModeResponse, type SetPersonalRegistryOwnershipModeResponses, type SetPersonalRegistryVisibilityData, type SetPersonalRegistryVisibilityResponse, type SetPersonalRegistryVisibilityResponses, type SetPersonalRscOwnershipData, type SetPersonalRscOwnershipResponse, type SetPersonalRscOwnershipResponses, type SetPersonalRscVisibilityData, type SetPersonalRscVisibilityResponse, type SetPersonalRscVisibilityResponses, type SetPersonalSkillOwnershipModeData, type SetPersonalSkillOwnershipModeResponse, type SetPersonalSkillOwnershipModeResponses, type SetPersonalSkillVisibilityData, type SetPersonalSkillVisibilityResponse, type SetPersonalSkillVisibilityResponses, type SetPersonalUcOwnershipData, type SetPersonalUcOwnershipResponse, type SetPersonalUcOwnershipResponses, type SetPersonalUcVisibilityData, type SetPersonalUcVisibilityResponse, type SetPersonalUcVisibilityResponses, type SetPersonalWikiOwnershipModeData, type SetPersonalWikiOwnershipModeResponse, type SetPersonalWikiOwnershipModeResponses, type SetPersonalWikiVisibilityData, type SetPersonalWikiVisibilityResponse, type SetPersonalWikiVisibilityResponses, type SetResourceAccessModeRequest, type SetRscOwnershipData, type SetRscOwnershipResponse, type SetRscOwnershipResponses, type SetRscVisibilityData, type SetRscVisibilityResponse, type SetRscVisibilityResponses, type SetSelfOpenbotAvatarData, type SetSelfOpenbotAvatarError, type SetSelfOpenbotAvatarErrors, type SetSelfOpenbotAvatarResponse, type SetSelfOpenbotAvatarResponses, type SetSignalProviderOwnershipData, type SetSignalProviderOwnershipResponse, type SetSignalProviderOwnershipResponses, type SetSignalProviderVisibilityData, type SetSignalProviderVisibilityResponse, type SetSignalProviderVisibilityResponses, type SetSignalRuleOwnershipData, type SetSignalRuleOwnershipResponse, type SetSignalRuleOwnershipResponses, type SetSignalRuleVisibilityData, type SetSignalRuleVisibilityResponse, type SetSignalRuleVisibilityResponses, type SetSkillOwnershipModeData, type SetSkillOwnershipModeResponse, type SetSkillOwnershipModeResponses, type SetSkillRegistryOwnershipModeData, type SetSkillRegistryOwnershipModeResponse, type SetSkillRegistryOwnershipModeResponses, type SetSkillRegistryVisibilityData, type SetSkillRegistryVisibilityResponse, type SetSkillRegistryVisibilityResponses, type SetSkillVisibilityData, type SetSkillVisibilityResponse, type SetSkillVisibilityResponses, type SetUcOwnershipData, type SetUcOwnershipResponse, type SetUcOwnershipResponses, type SetUcVisibilityData, type SetUcVisibilityResponse, type SetUcVisibilityResponses, type SetWikiOwnershipModeData, type SetWikiOwnershipModeResponse, type SetWikiOwnershipModeResponses, type SetWikiVisibilityData, type SetWikiVisibilityResponse, type SetWikiVisibilityResponses, type SignalAction, type SignalDelivery, SignalDeliveryStatus, SignalIngressMode, type SignalInterpolationVariable, type SignalMessage, type SignalPollingDescriptor, SignalProviderAuthMethod, type SignalProviderInstance, SignalProviderInstanceStatus, type SignalProviderRouteDescriptor, type SignalProviderSourceSerialized, type SignalRule, type SignalRuleFilter, SignalRuleStatus, type SignalsAddPersonalProviderGrantData, type SignalsAddPersonalProviderGrantResponse, type SignalsAddPersonalProviderGrantResponses, type SignalsAddPersonalRuleGrantData, type SignalsAddPersonalRuleGrantResponse, type SignalsAddPersonalRuleGrantResponses, type SignalsCreatePersonalProviderInstanceData, type SignalsCreatePersonalProviderInstanceResponse, type SignalsCreatePersonalProviderInstanceResponses, type SignalsCreatePersonalRuleData, type SignalsCreatePersonalRuleResponse, type SignalsCreatePersonalRuleResponses, type SignalsCreateProviderInstanceData, type SignalsCreateProviderInstanceResponse, type SignalsCreateProviderInstanceResponses, type SignalsCreateRuleData, type SignalsCreateRuleResponse, type SignalsCreateRuleResponses, type SignalsDeletePersonalProviderInstanceData, type SignalsDeletePersonalProviderInstanceResponse, type SignalsDeletePersonalProviderInstanceResponses, type SignalsDeletePersonalRuleData, type SignalsDeletePersonalRuleResponse, type SignalsDeletePersonalRuleResponses, type SignalsDeleteProviderInstanceData, type SignalsDeleteProviderInstanceResponse, type SignalsDeleteProviderInstanceResponses, type SignalsDeleteRuleData, type SignalsDeleteRuleResponse, type SignalsDeleteRuleResponses, type SignalSessionPolicy, type SignalsGetDeliveryData, type SignalsGetDeliveryResponse, type SignalsGetDeliveryResponses, type SignalsGetPersonalDeliveryData, type SignalsGetPersonalDeliveryResponse, type SignalsGetPersonalDeliveryResponses, type SignalsGetPersonalProviderInstanceData, type SignalsGetPersonalProviderInstanceResponse, type SignalsGetPersonalProviderInstanceResponses, type SignalsGetPersonalRuleData, type SignalsGetPersonalRuleResponse, type SignalsGetPersonalRuleResponses, type SignalsGetProviderInstanceData, type SignalsGetProviderInstanceResponse, type SignalsGetProviderInstanceResponses, type SignalsGetRuleData, type SignalsGetRuleResponse, type SignalsGetRuleResponses, type SignalsListAvailableProvidersData, type SignalsListAvailableProvidersResponse, type SignalsListAvailableProvidersResponses, type SignalsListDeliveriesData, type SignalsListDeliveriesResponse, type SignalsListDeliveriesResponses, type SignalsListPersonalAvailableProvidersData, type SignalsListPersonalAvailableProvidersResponse, type SignalsListPersonalAvailableProvidersResponses, type SignalsListPersonalDeliveriesData, type SignalsListPersonalDeliveriesResponse, type SignalsListPersonalDeliveriesResponses, type SignalsListPersonalProviderGrantsData, type SignalsListPersonalProviderGrantsResponse, type SignalsListPersonalProviderGrantsResponses, type SignalsListPersonalProviderInstancesData, type SignalsListPersonalProviderInstancesResponse, type SignalsListPersonalProviderInstancesResponses, type SignalsListPersonalRuleGrantsData, type SignalsListPersonalRuleGrantsResponse, type SignalsListPersonalRuleGrantsResponses, type SignalsListPersonalRulesData, type SignalsListPersonalRulesResponse, type SignalsListPersonalRulesResponses, type SignalsListProviderInstancesData, type SignalsListProviderInstancesResponse, type SignalsListProviderInstancesResponses, type SignalsListRulesData, type SignalsListRulesResponse, type SignalsListRulesResponses, type SignalsRemovePersonalProviderGrantData, type SignalsRemovePersonalProviderGrantResponses, type SignalsRemovePersonalRuleGrantData, type SignalsRemovePersonalRuleGrantResponses, type SignalsRetryDeliveryData, type SignalsRetryDeliveryResponse, type SignalsRetryDeliveryResponses, type SignalsRetryPersonalDeliveryData, type SignalsRetryPersonalDeliveryResponse, type SignalsRetryPersonalDeliveryResponses, type SignalsSetPersonalProviderOwnershipData, type SignalsSetPersonalProviderOwnershipResponse, type SignalsSetPersonalProviderOwnershipResponses, type SignalsSetPersonalProviderVisibilityData, type SignalsSetPersonalProviderVisibilityResponse, type SignalsSetPersonalProviderVisibilityResponses, type SignalsSetPersonalRuleOwnershipData, type SignalsSetPersonalRuleOwnershipResponse, type SignalsSetPersonalRuleOwnershipResponses, type SignalsSetPersonalRuleVisibilityData, type SignalsSetPersonalRuleVisibilityResponse, type SignalsSetPersonalRuleVisibilityResponses, type SignalsTriggerFakeData, type SignalsTriggerFakeResponse, type SignalsTriggerFakeResponses, type SignalsUpdatePersonalProviderInstanceData, type SignalsUpdatePersonalProviderInstanceResponse, type SignalsUpdatePersonalProviderInstanceResponses, type SignalsUpdatePersonalRuleData, type SignalsUpdatePersonalRuleResponse, type SignalsUpdatePersonalRuleResponses, type SignalsUpdateProviderInstanceData, type SignalsUpdateProviderInstanceResponse, type SignalsUpdateProviderInstanceResponses, type SignalsUpdateRuleData, type SignalsUpdateRuleResponse, type SignalsUpdateRuleResponses, type SignalTypeSourceSerialized, type SignalWebhookVerificationDescriptor, type Skill, type SkillDescriptionResponse, type SkillDiscoverySearchRequest, type SkillDiscoverySearchResponse, type SkillPackageFile, type SkillPackageFileDownload, type SkillPackageManifest, type SkillPaginatedResponse, type SkillRegistry, type SkillRegistryPaginatedResponse, type SkillRegistrySpec, type SkillSummary, type SkillSummaryPaginatedResponse, type SlackInstallationNextAction, type SourceDocumentUiPart, type SourceUrlUiPart, type StartBrokeringBodyExternal, type StartCredentialSetupItemBody, type StartCredentialSetupItemData, type StartCredentialSetupItemResponse, type StartCredentialSetupItemResponse2, type StartCredentialSetupItemResponses, type StartOAuthDeviceCodeBody, type StartOauthDeviceCodeData, type StartOauthDeviceCodeError, type StartOauthDeviceCodeErrors, type StartOauthDeviceCodeResponse, type StartOauthDeviceCodeResponses, type StartOAuthDeviceCodeResult, type StartProviderAppProvisioningBody, type StartProviderAppProvisioningData, type StartProviderAppProvisioningResponse, type StartProviderAppProvisioningResponses, type StartProviderSetupBody, type StartProxiedMcpServerOauthData, type StartProxiedMcpServerOauthError, type StartProxiedMcpServerOauthErrors, type StartProxiedMcpServerOauthRequestInner, type StartProxiedMcpServerOauthResponse, type StartProxiedMcpServerOauthResponse2, type StartProxiedMcpServerOauthResponses, type StartSlackOauthRequestInner, type StartUserCredentialBrokeringData, type StartUserCredentialBrokeringResponse, type StartUserCredentialBrokeringResponses, StateDocumentFormat, type StateExportData, type StateExportError, type StateExportErrors, type StateExportResponses, type StateGetImportData, type StateGetImportResponse, type StateGetImportResponses, type StateImportData, type StateImportEventsData, type StateImportEventsResponses, type StateImportOutputs, type StateImportResponse, type StateImportResponses, StateImportStatus, type StateMetadata, type StatePlan, type StatePlanData, type StatePlanResponse, type StatePlanResponses, type StateResolveSourceData, type StateResolveSourceError, type StateResolveSourceErrors, type StateResolveSourceResponse, type StateResolveSourceResponses, type StateSchema, type StateSchemaData, type StateSchemaJsonData, type StateSchemaJsonResponses, type StateSchemaResponse, type StateSchemaResponses, type StateSourceMetadata, type StateValidateData, type StateValidateResponse, type StateValidateResponses, type StateVariableDefinition, StateVariableType, type SteerChatKitAgentTurnQueueItemResponse, type StepStartUiPart, type StoredEvent, type StoredEventPaginatedResponse, type SubmitChatKitWorkspaceTurnRequestInner, type SubmitChatKitWorkspaceTurnResponse, type SupportedCredentialInfo, type Team, type TeamGroupSummary, type TeamGroupSummaryPaginatedResponse, type TeamMemberWithUser, type TeamMemberWithUserPaginatedResponse, type TeamPaginatedResponse, type TextMessage, type TextUiPart, type TokenResponse, type ToolConfig, type ToolConfigPaginatedResponse, type ToolDeploymentWithGroupSerialized, type ToolDeploymentWithGroupSerializedPaginatedResponse, type ToolExecution, ToolExecutionAuthority, ToolExecutionState, type ToolGroupInstanceListItem, type ToolGroupInstanceListItemPaginatedResponse, type ToolGroupInstanceSerialized, type ToolGroupInstanceSerializedWithCredentials, type ToolGroupInstanceSerializedWithEverything, type ToolGroupSourceSerialized, type ToolGroupSourceSerializedPaginatedResponse, type ToolInstanceListItem, type ToolInstanceSerialized, type ToolInstanceSerializedPaginatedResponse, ToolInvocationState, type ToolSourceSerialized, type ToolUiPart, type TraverseWikiGraphData, type TraverseWikiGraphResponse, type TraverseWikiGraphResponses, type TriggerFakeSignalRequest, type TrustedRuntime, TrustedRuntimeEncryptionAlgorithm, type TrustedRuntimePaginatedResponse, TrustedRuntimeSigningAlgorithm, TrustedRuntimeStatus, TrustedRuntimeType, type TupleUnit, type UiMessage, type UiMessagePart, type UnbindToolGroupFromMcpServerData, type UnbindToolGroupFromMcpServerError, type UnbindToolGroupFromMcpServerErrors, type UnbindToolGroupFromMcpServerResponse, type UnbindToolGroupFromMcpServerResponses, type UpdateAgentObservabilityPolicyRequestInner, type UpdateAgentToolVisibilityRequestInner, type UpdateChatKitChatProviderRequestInner, type UpdateChatKitSessionUserStateRequestInner, type UpdateCredentialBody, type UpdateCustomToolProviderData, type UpdateCustomToolProviderRequestInner, type UpdateCustomToolProviderResponse, type UpdateCustomToolProviderResponses, type UpdateHostedOpenbotComputerImageData, type UpdateHostedOpenbotComputerImageError, type UpdateHostedOpenbotComputerImageErrors, type UpdateHostedOpenBotComputerImageRequest, type UpdateHostedOpenbotComputerImageResponse, type UpdateHostedOpenbotComputerImageResponses, type UpdateHttpVercelAiSdkAgentRequestInner, type UpdateManagedUserCredentialBody, type UpdateManagedUserCredentialData, type UpdateManagedUserCredentialResponse, type UpdateManagedUserCredentialResponses, type UpdateMcpServerInstanceBody, type UpdateMcpServerInstanceData, type UpdateMcpServerInstanceError, type UpdateMcpServerInstanceErrors, type UpdateMcpServerInstanceFunctionData, type UpdateMcpServerInstanceFunctionError, type UpdateMcpServerInstanceFunctionErrors, type UpdateMcpServerInstanceFunctionResponse, type UpdateMcpServerInstanceFunctionResponses, type UpdateMcpServerInstanceRequestInner, type UpdateMcpServerInstanceResponse, type UpdateMcpServerInstanceResponses, type UpdateMcpServerInstanceToolBody, type UpdateMemberRoleBody, type UpdateMemoryBankBody, type UpdateMemoryBankConfigBody, type UpdateMemoryBankConfigData, type UpdateMemoryBankConfigResponse, type UpdateMemoryBankConfigResponses, type UpdateMemoryBankData, type UpdateMemoryBankResponse, type UpdateMemoryBankResponses, type UpdateOrganizationData, type UpdateOrganizationError, type UpdateOrganizationErrors, type UpdateOrganizationMemberRoleBody, type UpdateOrganizationMemberRoleData, type UpdateOrganizationMemberRoleError, type UpdateOrganizationMemberRoleErrors, type UpdateOrganizationMemberRoleResponse, type UpdateOrganizationMemberRoleResponses, type UpdateOrganizationRequest, type UpdateOrganizationResponses, type UpdateOrgOidcProviderData, type UpdateOrgOidcProviderError, type UpdateOrgOidcProviderErrors, type UpdateOrgOidcProviderRequest, type UpdateOrgOidcProviderResponse, type UpdateOrgOidcProviderResponses, type UpdatePageTypeBody, type UpdatePersonalMcpServerInstanceData, type UpdatePersonalMcpServerInstanceResponse, type UpdatePersonalMcpServerInstanceResponses, type UpdatePersonalMemoryBankConfigData, type UpdatePersonalMemoryBankConfigResponse, type UpdatePersonalMemoryBankConfigResponses, type UpdatePersonalMemoryBankData, type UpdatePersonalMemoryBankResponse, type UpdatePersonalMemoryBankResponses, type UpdatePersonalSkillData, type UpdatePersonalSkillRegistryData, type UpdatePersonalSkillRegistryResponse, type UpdatePersonalSkillRegistryResponses, type UpdatePersonalSkillResponse, type UpdatePersonalSkillResponses, type UpdatePersonalToolGroupInstanceData, type UpdatePersonalToolGroupInstanceResponse, type UpdatePersonalToolGroupInstanceResponses, type UpdatePersonalWikiData, type UpdatePersonalWikiPageData, type UpdatePersonalWikiPageResponse, type UpdatePersonalWikiPageResponses, type UpdatePersonalWikiResponse, type UpdatePersonalWikiResponses, type UpdateRelationshipTypeBody, type UpdateResourceServerCredentialData, type UpdateResourceServerCredentialResponse, type UpdateResourceServerCredentialResponses, type UpdateReverseProxyProfileInner, type UpdateRoutineRequestInner, type UpdateSelfProfileData, type UpdateSelfProfileError, type UpdateSelfProfileErrors, type UpdateSelfProfileRequest, type UpdateSelfProfileResponse, type UpdateSelfProfileResponses, type UpdateSessionOwnershipData, type UpdateSessionOwnershipError, type UpdateSessionOwnershipErrors, type UpdateSessionOwnershipResponse, type UpdateSessionOwnershipResponses, type UpdateSessionVisibilityData, type UpdateSessionVisibilityError, type UpdateSessionVisibilityErrors, type UpdateSessionVisibilityResponse, type UpdateSessionVisibilityResponses, type UpdateSignalProviderInstanceRequestInner, type UpdateSignalRuleRequestInner, type UpdateSkillBody, type UpdateSkillData, type UpdateSkillError, type UpdateSkillErrors, type UpdateSkillRegistryBody, type UpdateSkillRegistryData, type UpdateSkillRegistryError, type UpdateSkillRegistryErrors, type UpdateSkillRegistryResponse, type UpdateSkillRegistryResponses, type UpdateSkillResponse, type UpdateSkillResponses, type UpdateTeamData, type UpdateTeamError, type UpdateTeamErrors, type UpdateTeamGroupBody, type UpdateTeamGroupData, type UpdateTeamGroupError, type UpdateTeamGroupErrors, type UpdateTeamGroupResponse, type UpdateTeamGroupResponses, type UpdateTeamMemberRoleData, type UpdateTeamMemberRoleError, type UpdateTeamMemberRoleErrors, type UpdateTeamMemberRoleResponse, type UpdateTeamMemberRoleResponses, type UpdateTeamRequest, type UpdateTeamResponses, type UpdateToolBoundParamsData, type UpdateToolBoundParamsError, type UpdateToolBoundParamsErrors, type UpdateToolBoundParamsResponse, type UpdateToolBoundParamsResponses, type UpdateToolGroupInstanceData, type UpdateToolGroupInstanceError, type UpdateToolGroupInstanceErrors, type UpdateToolGroupInstanceParamsInner, type UpdateToolGroupInstanceResponse, type UpdateToolGroupInstanceResponses, type UpdateToolInstanceBoundParamsInner, type UpdateTrustedRuntimeBody, type UpdateTrustedRuntimeData, type UpdateTrustedRuntimeError, type UpdateTrustedRuntimeErrors, type UpdateTrustedRuntimeResponse, type UpdateTrustedRuntimeResponses, type UpdateUserCredentialData, type UpdateUserCredentialResponse, type UpdateUserCredentialResponses, type UpdateWikiAssetBody, type UpdateWikiAssetData, type UpdateWikiAssetResponse, type UpdateWikiAssetResponses, type UpdateWikiBody, type UpdateWikiData, type UpdateWikiPageData, type UpdateWikiPageErrors, type UpdateWikiPageRelationshipData, type UpdateWikiPageRelationshipResponse, type UpdateWikiPageRelationshipResponses, type UpdateWikiPageResponse, type UpdateWikiPageResponses, type UpdateWikiPageTypeData, type UpdateWikiPageTypeErrors, type UpdateWikiPageTypeResponse, type UpdateWikiPageTypeResponses, type UpdateWikiRelationshipTypeData, type UpdateWikiRelationshipTypeErrors, type UpdateWikiRelationshipTypeResponse, type UpdateWikiRelationshipTypeResponses, type UpdateWikiResponse, type UpdateWikiResponses, type UploadAttachmentContentData, type UploadAttachmentContentError, type UploadAttachmentContentErrors, type UploadAttachmentContentResponse, type UploadAttachmentContentResponses, type UploadHostedOpenbotReleaseFileData, type UploadHostedOpenbotReleaseFileError, type UploadHostedOpenbotReleaseFileErrors, type UploadHostedOpenbotReleaseFileResponse, type UploadHostedOpenbotReleaseFileResponses, type UploadSelfAvatarData, type UploadSelfAvatarError, type UploadSelfAvatarErrors, type UploadSelfAvatarResponse, type UploadSelfAvatarResponses, type UploadWikiAssetContentData, type UploadWikiAssetContentErrors, type UploadWikiAssetContentResponses, type UpsertPageRelationshipBody, type UpsertWikiPageBody, type UpsertWikiPageRelationshipData, type UpsertWikiPageRelationshipErrors, type UpsertWikiPageRelationshipResponse, type UpsertWikiPageRelationshipResponses, type User, type UserAvatar, type UserCredentialBrokeringResponse, type UserCredentialSerialized, type UserCredentialSerializedPaginatedResponse, type UserInvitation, type UserInvitationPaginatedResponse, type UserOrganization, type UserTeam, UserToolFederationMode, type UserToolFederationSelection, UserType, type ValidatePageTypeDataBody, type ValidateStateRequest, type ValidateStateResponse, type ValidateWikiPageTypeDataData, type ValidateWikiPageTypeDataResponse, type ValidateWikiPageTypeDataResponses, type Vec, type VerifyOrgOidcProviderDomainData, type VerifyOrgOidcProviderDomainError, type VerifyOrgOidcProviderDomainErrors, type VerifyOrgOidcProviderDomainResponse, type VerifyOrgOidcProviderDomainResponses, type WebhookSigningKeyMetadata, type WhoamiData, type WhoamiError, type WhoamiErrors, type WhoamiResponse, type WhoamiResponses, type Wiki, type WikiAsset, type WikiAssetDownloadResponse, type WikiAssetPaginatedResponse, type WikiAssetReferences, WikiAssetStatus, type WikiAssetUploadResponse, type WikiGraph, type WikiOntologyInstallation, type WikiOntologyTemplate, type WikiPage, type WikiPagePaginatedResponse, type WikiPageRelationship, type WikiPageRevision, type WikiPageRevisionPaginatedResponse, type WikiPageType, type WikiPageTypeVersion, type WikiPaginatedResponse, type WikiRelationshipEvidence, type WikiRelationshipType, type WikiRelationshipTypeVersion, type WikiSpec, WikiStatus, type WrappedChronoDateTime, type WrappedJsonValue, type WrappedUuidV4 } from './types.gen'; +export { acceptInvitation, addCommonProviderInstallationOwnershipGrant, addCommonProviderInstallationVisibilityGrant, addMcpResourceOwnershipGrant, addMcpResourceVisibilityGrant, addMcpServerInstanceFunction, addMemoryBankOwnershipGrant, addMemoryBankVisibilityGrant, addOrganizationMember, addPersonalMemoryBankOwnershipGrant, addPersonalMemoryBankVisibilityGrant, addPersonalRegistryOwnershipGrant, addPersonalRegistryVisibilityGrant, addPersonalRscOwnershipGrant, addPersonalRscVisibilityGrant, addPersonalSkillOwnershipGrant, addPersonalSkillVisibilityGrant, addPersonalUcOwnershipGrant, addPersonalUcVisibilityGrant, addPersonalWikiOwnershipGrant, addPersonalWikiVisibilityGrant, addProviderSkillsToSkillRegistry, addRscOwnershipGrant, addRscVisibilityGrant, addSessionResourceGrant, addSessionUserMember, addSignalProviderGrant, addSkillOwnershipGrant, addSkillRegistryOwnershipGrant, addSkillRegistryVisibilityGrant, addSkillVisibilityGrant, addTeamGroupMember, addTeamMember, addUcOwnershipGrant, addUcVisibilityGrant, addWikiOwnershipGrant, addWikiVisibilityGrant, applyWikiOntologyTemplate, authorizeOauthDeviceCode, automationsAddGrant, automationsDelete, automationsGet, automationsList, automationsListExecutions, automationsListGrants, automationsPut, automationsRemoveGrant, automationsRun, automationsSetOwnership, automationsSetVisibility, autoProvisionToolGroupInstance, autumnWebhookHandler, billingAutumnBridgePost, billingContextGet, billingMemoryBankReservationCommit, billingMemoryBankReservationCreate, billingMemoryBankReservationRelease, billingProductEnrollCurrentHuman, billingRedirect, billingWebhookStripeDeprecated, bindToolGroupToMcpServer, bulkAddMcpServerInstanceFunctions, bulkRemoveMcpServerInstanceFunctions, cancelHumanApprovalAction, changePersonalWikiOwnership, changeWikiOwnership, chatkitAddAgentResourceGrant, chatkitAddSessionParticipant, chatkitAutoProvisionSlackChannelInstallation, chatkitCacheConvertedMessages, chatkitClaimAgentResourceBundleOutputs, chatkitCompleteSlackProviderProvisionedSetup, chatkitCompleteSlackSelfManagedSetup, chatkitCreateSession, chatkitCreateSlackChannelInstallation, chatkitDeleteAgent, chatkitDeleteAgentTurnQueueItem, chatkitDeleteChatProvider, chatkitGetAgent, chatkitGetAgentAvatar, chatkitGetAgentObservability, chatkitGetAgentResourceBundleProvisioning, chatkitHydrateConvertedMessages, chatkitInvokeSessionProviderTool, chatkitJoinSession, chatkitListAgentResourceGrants, chatkitListAgents, chatkitListAgentTurnQueue, chatkitListAvailableChatChannels, chatkitListAvailableChatProviders, chatkitListChatProviders, chatkitListMessageHistory, chatkitListSessionParticipants, chatkitListSessions, chatkitProvisionAgentResourceBundle, chatkitRegisterAgentTools, chatkitRegisterChatProvider, chatkitRegisterHttpVercelAiSdkAgent, chatkitRegisterVercelUiChatProvider, chatkitRemoveAgentResourceGrant, chatkitRemoveSessionParticipant, chatkitReorderAgentTurnQueueItem, chatkitReportToolExecution, chatkitSearch, chatkitSendSessionMessage, chatkitSetAgentPermissions, chatkitSetAgentStatus, chatkitSetChatProviderStatus, chatkitStartSlackOauth, chatkitSteerAgentTurnQueueItem, chatkitUpdateAgent, chatkitUpdateAgentAvatar, chatkitUpdateAgentObservability, chatkitUpdateAgentOwnership, chatkitUpdateAgentToolVisibility, chatkitUpdateAgentVisibility, chatkitUpdateChatProvider, chatkitWorkspaceAgentSessions, chatkitWorkspaceBootstrap, chatkitWorkspaceConversationSnapshot, chatkitWorkspaceCreateSession, chatkitWorkspaceInterruptSession, chatkitWorkspaceMessages, chatkitWorkspaceRenameThread, chatkitWorkspaceSendMessage, chatkitWorkspaceSidebar, chatkitWorkspaceSubmitTurn, chatkitWorkspaceUpdateSessionReadState, checkMemoryBankHealth, checkPersonalMemoryBankHealth, claimTemporaryAccount, completeAttachmentUpload, completeCredentialSetupItem, completeHumanApprovalAction, completeWikiAssetUpload, configureHostedOpenbotInstance, connectMcpProviderCatalogEntry, connectProxiedMcpServer, createAttachmentUpload, createAttachmentUploads, createCustomToolProvider, createHostedOpenbotDeployment, createHostedOpenbotRelease, createHumanApprovalAction, createManagedUserCredential, createMcpServerInstance, createMemoryBank, createMessage, createOrganization, createOrgOidcProvider, createPersonalMcpServerInstance, createPersonalMemoryBank, createPersonalSkill, createPersonalSkillRegistry, createPersonalToolGroupInstance, createPersonalUserCredential, createPersonalWiki, createPersonalWikiPage, createResourceServerCredential, createSession, createSkill, createSkillRegistry, createTeam, createTeamGroup, createTemporaryAccount, createToolGroupInstance, createTrustedRuntime, createTrustedSkillProvider, createUserCredential, createWiki, createWikiAssetUpload, createWikiPage, createWikiPageType, createWikiPageTypeVersion, createWikiRelationshipType, createWikiRelationshipTypeVersion, credentialGenericOauthCallback, deleteAttachment, deleteCustomToolProvider, deleteManagedUserCredential, deleteMcpServerInstance, deleteMemoryBank, deleteMemoryDocument, deleteMessage, deleteOrganization, deleteOrgOidcProvider, deletePersonalMcpServerInstance, deletePersonalMemoryBank, deletePersonalMemoryDocument, deletePersonalSkill, deletePersonalSkillRegistry, deletePersonalToolGroupInstance, deletePersonalWiki, deletePersonalWikiPage, deleteProxiedMcpServer, deleteResourceServerCredential, deleteSelfAvatar, deleteSkill, deleteSkillRegistry, deleteTeam, deleteTeamGroup, deleteToolGroupInstance, deleteTrustedRuntime, deleteUserCredential, deleteWiki, deleteWikiAsset, deleteWikiPage, deleteWikiPageRelationship, deleteWikiPageType, deleteWikiPageTypeVersion, deleteWikiRelationshipType, disableCustomToolProvider, disableProxiedMcpServer, disableTool, downloadAttachmentContent, downloadSkillPackageFile, downloadWikiAsset, downloadWikiAssetContent, enableAndBindProviderTools, enableCustomToolProvider, enableProxiedMcpServer, enableTool, encryptPersonalUserCredentialConfiguration, encryptResourceServerConfiguration, encryptUserCredentialConfiguration, exchangeOauthCode, expireTemporaryAccounts, exportMemoryBankTemplate, exportPersonalMemoryBankTemplate, finalizeHostedOpenbotRelease, generateLocalRuntimeTunnelApiKey, generateTemporaryAccountClaimUrl, getAttachmentDownloadUrl, getCommonProviderInstallation, getCredentialSetupItem, getCustomToolProvider, getHostedOpenbotInstance, getHostedOpenbotRelease, getHumanApprovalAction, getLocalRuntimeTunnelApiKey, getLocalRuntimeTunnelConnector, getManagedUserCredentialSecret, getMcpServerInstance, getMemoryBank, getMemoryBankConfig, getMemoryBankDocument, getMessage, getOpenbotPluginsCatalog, getOrganization, getOrgOidcProvider, getPersonalMcpServerInstance, getPersonalMemoryBank, getPersonalMemoryBankConfig, getPersonalMemoryBankDocument, getPersonalSkill, getPersonalSkillRegistry, getPersonalToolGroupInstance, getPersonalWiki, getPersonalWikiPage, getProviderProvisioningHumanAction, getProxiedMcpServer, getProxiedSkillProvider, getResourceServerCredential, getRuntimeConfig, getSelfAvatar, getSelfProfile, getSessionEventHistory, getSkill, getSkillPackage, getSkillRegistry, getSkillRegistrySkill, getSkillRegistrySkillByTitle, getSkillRegistrySkillDescription, getTeam, getTeamGroup, getToolGroupInstance, getToolsOpenapiSpec, getTrustedRuntime, getUserCredential, getWiki, getWikiPage, getWikiPageBacklinks, getWikiPageNeighborhood, getWikiPageRelationship, getWikiPageType, getWikiPageTypeVersion, getWikiRelationshipType, getWikiRelationshipTypeVersion, healthCheck, importMemoryBankTemplate, importPersonalMemoryBankTemplate, inspectWikiAssetReferences, inviteTeamUsers, invokeCustomTool, invokeTool, issueOpenbotChatkitRealtimeTicket, listAvailableToolGroups, listCommonProviderInstallationOwnershipGrants, listCommonProviderInstallations, listCommonProviderInstallationVisibilityGrants, listCredentialSetupItems, listCustomToolProviders, listInboxAgents, listInboxes, listManagedUserCredentials, listMcpProviderCatalog, listMcpResourceOwnershipGrants, listMcpResourceVisibilityGrants, listMcpServerInstances, listMemoryBankDocuments, listMemoryBankOwnershipGrants, listMemoryBanks, listMemoryBankSourceBindings, listMemoryBankVisibilityGrants, listMemorySourceBindings, listMessages, listOpenbotDeployments, listOrganizationMembers, listOrganizations, listOrganizationTeamGroups, listOrgOidcProviders, listPersonalMcpServerInstances, listPersonalMemoryBankDocuments, listPersonalMemoryBankOwnershipGrants, listPersonalMemoryBanks, listPersonalMemoryBankSourceBindings, listPersonalMemoryBankVisibilityGrants, listPersonalRegistryOwnershipGrants, listPersonalRegistryVisibilityGrants, listPersonalRscOwnershipGrants, listPersonalRscVisibilityGrants, listPersonalSkillOwnershipGrants, listPersonalSkillRegistries, listPersonalSkills, listPersonalSkillVisibilityGrants, listPersonalToolGroupInstances, listPersonalUcOwnershipGrants, listPersonalUcVisibilityGrants, listPersonalWikiOwnershipGrants, listPersonalWikiPages, listPersonalWikis, listPersonalWikiVisibilityGrants, listProviderProvisionerCatalog, listProxiedMcpServers, listProxiedSkillProviders, listPublicAvailableToolGroups, listResourceServerCredentials, listRscOwnershipGrants, listRscVisibilityGrants, listSessionInboxInstances, listSessionResourceGrants, listSessions, listSessionUserMembers, listSignalProviderGrants, listSkillOwnershipGrants, listSkillRegistries, listSkillRegistryOwnershipGrants, listSkillRegistrySkillSummaries, listSkillRegistryVisibilityGrants, listSkills, listSkillVisibilityGrants, listTeamGroupMembers, listTeamGroups, listTeamInvitations, listTeamMembers, listTeams, listToolDeploymentsByAlias, listToolGroupInstances, listToolGroupInstancesGroupedByTool, listTools, listTrustedRuntimes, listUcOwnershipGrants, listUcVisibilityGrants, listUserCredentials, listWikiAssets, listWikiOntologyInstallations, listWikiOntologyTemplates, listWikiOwnershipGrants, listWikiPageAssets, listWikiPageRelationships, listWikiPageRevisions, listWikiPages, listWikiPageTypes, listWikiPageTypeVersions, listWikiRelationshipTypes, listWikiRelationshipTypeVersions, listWikis, listWikiVisibilityGrants, mcpProtocolDelete, mcpProtocolGet, mcpProtocolPost, mcpServerPlaygroundChat, migrateWikiPageType, moveWikiPage, observeSession, type Options, personalMcpProtocolDelete, personalMcpProtocolGet, personalMcpProtocolPost, previewWikiPageTypeMigration, providerProvisioningCallback, providerSetupCatalog, providerSetupResume, providerSetupStart, recallMemory, recallPersonalMemory, reconcileOpenbotAgentBundle, redirectTemporaryAccountClaimPage, reflectMemory, reflectPersonalMemory, refreshCustomToolProvider, refreshProxiedMcpServer, registerOauthClient, registerOpenbotDeployment, registerTeamOauthClient, removeCommonProviderInstallationOwnershipGrant, removeCommonProviderInstallationVisibilityGrant, removeMcpResourceOwnershipGrant, removeMcpResourceVisibilityGrant, removeMcpServerInstanceFunction, removeMemoryBankOwnershipGrant, removeMemoryBankVisibilityGrant, removeOrganizationMember, removePersonalMemoryBankOwnershipGrant, removePersonalMemoryBankVisibilityGrant, removePersonalRegistryOwnershipGrant, removePersonalRegistryVisibilityGrant, removePersonalRscOwnershipGrant, removePersonalRscVisibilityGrant, removePersonalSkillOwnershipGrant, removePersonalSkillVisibilityGrant, removePersonalUcOwnershipGrant, removePersonalUcVisibilityGrant, removePersonalWikiOwnershipGrant, removePersonalWikiVisibilityGrant, removeRscOwnershipGrant, removeRscVisibilityGrant, removeSessionResourceGrant, removeSessionUserMember, removeSignalProviderGrant, removeSkillOwnershipGrant, removeSkillRegistryOwnershipGrant, removeSkillRegistryVisibilityGrant, removeSkillVisibilityGrant, removeTeamGroupMember, removeTeamMember, removeUcOwnershipGrant, removeUcVisibilityGrant, removeWikiOwnershipGrant, removeWikiVisibilityGrant, replaceMemorySourceBindings, resetMemoryBankConfig, resetPersonalMemoryBankConfig, resumeCredentialSetupItem, resumeProviderAppProvisioning, resumeUserCredentialBrokering, retainMemoryDocument, retainPersonalMemoryDocument, retryMemorySourceSync, retryWiki, reverseProxyAddProfileOwnershipGrant, reverseProxyAddProfileVisibilityGrant, reverseProxyCreateProfile, reverseProxyDeleteProfile, reverseProxyGetProfile, reverseProxyListProfileOwnershipGrants, reverseProxyListProfiles, reverseProxyListProfileVisibilityGrants, reverseProxyListProviders, reverseProxyProxyGet, reverseProxyProxyPost, reverseProxyRemoveProfileOwnershipGrant, reverseProxyRemoveProfileVisibilityGrant, reverseProxySetProfileOwnership, reverseProxySetProfileVisibility, reverseProxyUpdateProfile, revokeLocalRuntimeTunnelApiKey, revokeTeamInvitation, rotateCustomToolProviderSigningKey, routeAuthCallback, routeCreateApiKey, routeDeleteApiKey, routeGetJwks, routeListApiKeys, routeListDebugAuthProfiles, routeLogout, routeRefreshToken, routeResolveLoginProvider, routeSelectDebugAuthProfile, routeStartAuthorization, searchSkillRegistry, setCommonProviderInstallationOwnership, setCommonProviderInstallationVisibility, setMcpResourceOwnership, setMcpResourceVisibility, setMemoryBankOwnershipMode, setMemoryBankVisibility, setPersonalMemoryBankOwnershipMode, setPersonalMemoryBankVisibility, setPersonalRegistryOwnershipMode, setPersonalRegistryVisibility, setPersonalRscOwnership, setPersonalRscVisibility, setPersonalSkillOwnershipMode, setPersonalSkillVisibility, setPersonalUcOwnership, setPersonalUcVisibility, setPersonalWikiOwnershipMode, setPersonalWikiVisibility, setRscOwnership, setRscVisibility, setSelfOpenbotAvatar, setSignalProviderOwnership, setSignalProviderVisibility, setSkillOwnershipMode, setSkillRegistryOwnershipMode, setSkillRegistryVisibility, setSkillVisibility, setUcOwnership, setUcVisibility, setWikiOwnershipMode, setWikiVisibility, signalsAddPersonalProviderGrant, signalsCreatePersonalProviderInstance, signalsCreateProviderInstance, signalsDeletePersonalProviderInstance, signalsDeleteProviderInstance, signalsGetDelivery, signalsGetPersonalDelivery, signalsGetPersonalProviderInstance, signalsGetProviderInstance, signalsListAvailableProviders, signalsListDeliveries, signalsListPersonalAvailableProviders, signalsListPersonalDeliveries, signalsListPersonalProviderGrants, signalsListPersonalProviderInstances, signalsListProviderInstances, signalsRemovePersonalProviderGrant, signalsRetryDelivery, signalsRetryPersonalDelivery, signalsSetPersonalProviderOwnership, signalsSetPersonalProviderVisibility, signalsTriggerFake, signalsUpdatePersonalProviderInstance, signalsUpdateProviderInstance, startCredentialSetupItem, startOauthDeviceCode, startProviderAppProvisioning, startProxiedMcpServerOauth, startUserCredentialBrokering, stateExport, stateGetImport, stateImport, stateImportEvents, statePlan, stateResolveSource, stateSchema, stateSchemaJson, stateValidate, traverseWikiGraph, unbindToolGroupFromMcpServer, updateCustomToolProvider, updateHostedOpenbotComputerImage, updateManagedUserCredential, updateMcpServerInstance, updateMcpServerInstanceFunction, updateMemoryBank, updateMemoryBankConfig, updateOrganization, updateOrganizationMemberRole, updateOrgOidcProvider, updatePersonalMcpServerInstance, updatePersonalMemoryBank, updatePersonalMemoryBankConfig, updatePersonalSkill, updatePersonalSkillRegistry, updatePersonalToolGroupInstance, updatePersonalWiki, updatePersonalWikiPage, updateResourceServerCredential, updateSelfProfile, updateSessionOwnership, updateSessionVisibility, updateSkill, updateSkillRegistry, updateTeam, updateTeamGroup, updateTeamMemberRole, updateToolBoundParams, updateToolGroupInstance, updateTrustedRuntime, updateUserCredential, updateWiki, updateWikiAsset, updateWikiPage, updateWikiPageRelationship, updateWikiPageType, updateWikiRelationshipType, uploadAttachmentContent, uploadHostedOpenbotReleaseFile, uploadSelfAvatar, uploadWikiAssetContent, upsertWikiPageRelationship, validateWikiPageTypeData, verifyOrgOidcProviderDomain, whoami } from './sdk.gen'; +export { type AcceptInvitationData, type AcceptInvitationError, type AcceptInvitationErrors, type AcceptInvitationRequest, type AcceptInvitationResponse, type AcceptInvitationResponses, type AddChatKitParticipantRequestInner, type AddCommonProviderInstallationOwnershipGrantData, type AddCommonProviderInstallationOwnershipGrantResponse, type AddCommonProviderInstallationOwnershipGrantResponses, type AddCommonProviderInstallationVisibilityGrantData, type AddCommonProviderInstallationVisibilityGrantResponse, type AddCommonProviderInstallationVisibilityGrantResponses, type AddMcpResourceOwnershipGrantData, type AddMcpResourceOwnershipGrantResponse, type AddMcpResourceOwnershipGrantResponses, type AddMcpResourceVisibilityGrantData, type AddMcpResourceVisibilityGrantResponse, type AddMcpResourceVisibilityGrantResponses, type AddMcpServerInstanceFunctionBody, type AddMcpServerInstanceFunctionData, type AddMcpServerInstanceFunctionError, type AddMcpServerInstanceFunctionErrors, type AddMcpServerInstanceFunctionResponse, type AddMcpServerInstanceFunctionResponses, type AddMemoryBankOwnershipGrantData, type AddMemoryBankOwnershipGrantResponse, type AddMemoryBankOwnershipGrantResponses, type AddMemoryBankVisibilityGrantData, type AddMemoryBankVisibilityGrantResponse, type AddMemoryBankVisibilityGrantResponses, type AddOrganizationMemberData, type AddOrganizationMemberError, type AddOrganizationMemberErrors, type AddOrganizationMemberRequest, type AddOrganizationMemberResponse, type AddOrganizationMemberResponses, type AddPersonalMemoryBankOwnershipGrantData, type AddPersonalMemoryBankOwnershipGrantResponse, type AddPersonalMemoryBankOwnershipGrantResponses, type AddPersonalMemoryBankVisibilityGrantData, type AddPersonalMemoryBankVisibilityGrantResponse, type AddPersonalMemoryBankVisibilityGrantResponses, type AddPersonalRegistryOwnershipGrantData, type AddPersonalRegistryOwnershipGrantResponse, type AddPersonalRegistryOwnershipGrantResponses, type AddPersonalRegistryVisibilityGrantData, type AddPersonalRegistryVisibilityGrantResponse, type AddPersonalRegistryVisibilityGrantResponses, type AddPersonalRscOwnershipGrantData, type AddPersonalRscOwnershipGrantResponse, type AddPersonalRscOwnershipGrantResponses, type AddPersonalRscVisibilityGrantData, type AddPersonalRscVisibilityGrantResponse, type AddPersonalRscVisibilityGrantResponses, type AddPersonalSkillOwnershipGrantData, type AddPersonalSkillOwnershipGrantResponse, type AddPersonalSkillOwnershipGrantResponses, type AddPersonalSkillVisibilityGrantData, type AddPersonalSkillVisibilityGrantResponse, type AddPersonalSkillVisibilityGrantResponses, type AddPersonalUcOwnershipGrantData, type AddPersonalUcOwnershipGrantResponse, type AddPersonalUcOwnershipGrantResponses, type AddPersonalUcVisibilityGrantData, type AddPersonalUcVisibilityGrantResponse, type AddPersonalUcVisibilityGrantResponses, type AddPersonalWikiOwnershipGrantData, type AddPersonalWikiOwnershipGrantResponse, type AddPersonalWikiOwnershipGrantResponses, type AddPersonalWikiVisibilityGrantData, type AddPersonalWikiVisibilityGrantResponse, type AddPersonalWikiVisibilityGrantResponses, type AddProviderSkillsToRegistryRequest, type AddProviderSkillsToSkillRegistryData, type AddProviderSkillsToSkillRegistryError, type AddProviderSkillsToSkillRegistryErrors, type AddProviderSkillsToSkillRegistryResponse, type AddProviderSkillsToSkillRegistryResponses, type AddRscOwnershipGrantData, type AddRscOwnershipGrantResponse, type AddRscOwnershipGrantResponses, type AddRscVisibilityGrantData, type AddRscVisibilityGrantResponse, type AddRscVisibilityGrantResponses, type AddSessionResourceGrantData, type AddSessionResourceGrantError, type AddSessionResourceGrantErrors, type AddSessionResourceGrantResponse, type AddSessionResourceGrantResponses, type AddSessionUserMemberData, type AddSessionUserMemberError, type AddSessionUserMemberErrors, type AddSessionUserMemberRequest, type AddSessionUserMemberResponse, type AddSessionUserMemberResponses, type AddSignalProviderGrantData, type AddSignalProviderGrantResponse, type AddSignalProviderGrantResponses, type AddSkillOwnershipGrantData, type AddSkillOwnershipGrantResponse, type AddSkillOwnershipGrantResponses, type AddSkillRegistryOwnershipGrantData, type AddSkillRegistryOwnershipGrantResponse, type AddSkillRegistryOwnershipGrantResponses, type AddSkillRegistryVisibilityGrantData, type AddSkillRegistryVisibilityGrantResponse, type AddSkillRegistryVisibilityGrantResponses, type AddSkillVisibilityGrantData, type AddSkillVisibilityGrantResponse, type AddSkillVisibilityGrantResponses, type AddTeamGroupMemberData, type AddTeamGroupMemberError, type AddTeamGroupMemberErrors, type AddTeamGroupMemberResponses, type AddTeamMemberBody, type AddTeamMemberData, type AddTeamMemberError, type AddTeamMemberErrors, type AddTeamMemberResponse, type AddTeamMemberResponses, type AddUcOwnershipGrantData, type AddUcOwnershipGrantResponse, type AddUcOwnershipGrantResponses, type AddUcVisibilityGrantData, type AddUcVisibilityGrantResponse, type AddUcVisibilityGrantResponses, type AddWikiOwnershipGrantData, type AddWikiOwnershipGrantResponse, type AddWikiOwnershipGrantResponses, type AddWikiVisibilityGrantData, type AddWikiVisibilityGrantResponse, type AddWikiVisibilityGrantResponses, type Agent, AgentCredentialStrategy, type AgentEndpointSpec, AgentEventVisibility, type AgentMultiplayerPermissions, type AgentObservabilityConfiguration, type AgentObservabilityPolicy, type AgentPermissions, type AgentProvisioningOperation, type AgentProvisioningOutputs, AgentProvisioningStatus, type AgentReachScope, type AgentSpec, type AgentToolCatalogEntry, AgentToolSource, AgentToolStatus, type ApplyOntologyTemplateResult, type ApplyWikiOntologyTemplateData, type ApplyWikiOntologyTemplateResponse, type ApplyWikiOntologyTemplateResponses, type Approval, ApprovalDecision, type Attachment, AttachmentUploadStatus, type AuthorizeOauthDeviceCodeData, type AuthorizeOauthDeviceCodeError, type AuthorizeOauthDeviceCodeErrors, type AuthorizeOauthDeviceCodeResponses, type AutomationsAddGrantData, type AutomationsAddGrantResponse, type AutomationsAddGrantResponses, type AutomationsDeleteData, type AutomationsDeleteResponse, type AutomationsDeleteResponses, type AutomationsGetData, type AutomationsGetError, type AutomationsGetErrors, type AutomationsGetResponse, type AutomationsGetResponses, type AutomationsListData, type AutomationsListExecutionsData, type AutomationsListExecutionsResponse, type AutomationsListExecutionsResponses, type AutomationsListGrantsData, type AutomationsListGrantsResponse, type AutomationsListGrantsResponses, type AutomationsListResponse, type AutomationsListResponses, type AutomationsPutData, type AutomationsPutError, type AutomationsPutErrors, type AutomationsPutResponse, type AutomationsPutResponses, type AutomationsRemoveGrantData, type AutomationsRemoveGrantResponses, type AutomationsRunData, type AutomationsRunResponse, type AutomationsRunResponses, type AutomationsSetOwnershipData, type AutomationsSetOwnershipResponse, type AutomationsSetOwnershipResponses, type AutomationsSetVisibilityData, type AutomationsSetVisibilityResponse, type AutomationsSetVisibilityResponses, type AutoProvisionSlackChannelInstallationRequestInner, type AutoProvisionSlackChannelInstallationResponse, type AutoProvisionToolGroupInstanceData, type AutoProvisionToolGroupInstanceError, type AutoProvisionToolGroupInstanceErrors, type AutoProvisionToolGroupInstanceParamsInner, type AutoProvisionToolGroupInstanceResponse, type AutoProvisionToolGroupInstanceResponse2, type AutoProvisionToolGroupInstanceResponses, type AutumnWebhookHandlerData, type AutumnWebhookHandlerErrors, type AutumnWebhookHandlerResponses, type BillingAutumnBridgePostData, type BillingAutumnBridgePostError, type BillingAutumnBridgePostErrors, type BillingAutumnBridgePostResponses, type BillingContext, type BillingContextGetData, type BillingContextGetError, type BillingContextGetErrors, type BillingContextGetResponse, type BillingContextGetResponses, type BillingMemoryBankReservationCommitData, type BillingMemoryBankReservationCommitError, type BillingMemoryBankReservationCommitErrors, type BillingMemoryBankReservationCommitResponse, type BillingMemoryBankReservationCommitResponses, type BillingMemoryBankReservationCreateData, type BillingMemoryBankReservationCreateError, type BillingMemoryBankReservationCreateErrors, type BillingMemoryBankReservationCreateResponse, type BillingMemoryBankReservationCreateResponses, type BillingMemoryBankReservationReleaseData, type BillingMemoryBankReservationReleaseError, type BillingMemoryBankReservationReleaseErrors, type BillingMemoryBankReservationReleaseResponse, type BillingMemoryBankReservationReleaseResponses, type BillingProductEnrollCurrentHumanData, type BillingProductEnrollCurrentHumanError, type BillingProductEnrollCurrentHumanErrors, type BillingProductEnrollCurrentHumanResponse, type BillingProductEnrollCurrentHumanResponses, BillingProductId, type BillingRedirectData, type BillingRedirectErrors, type BillingWebhookStripeDeprecatedData, type BillingWebhookStripeDeprecatedResponse, type BillingWebhookStripeDeprecatedResponses, type BindToolGroupToMcpServerData, type BindToolGroupToMcpServerError, type BindToolGroupToMcpServerErrors, type BindToolGroupToMcpServerResponse, type BindToolGroupToMcpServerResponses, type BrokerAction, type BrokerActionRedirect, type BrokerInput, type BrokerState, type BulkAddMcpServerInstanceFunctionItem, type BulkAddMcpServerInstanceFunctionsBody, type BulkAddMcpServerInstanceFunctionsData, type BulkAddMcpServerInstanceFunctionsError, type BulkAddMcpServerInstanceFunctionsErrors, type BulkAddMcpServerInstanceFunctionsResponse, type BulkAddMcpServerInstanceFunctionsResponses, type BulkRemoveMcpServerInstanceFunctionsBody, type BulkRemoveMcpServerInstanceFunctionsData, type BulkRemoveMcpServerInstanceFunctionsError, type BulkRemoveMcpServerInstanceFunctionsErrors, type BulkRemoveMcpServerInstanceFunctionsResponse, type BulkRemoveMcpServerInstanceFunctionsResponses, type CacheConvertedMessagesRequest, type CacheConvertedMessagesResponse, type CachedAgentRepresentation, type CancelHumanApprovalActionData, type CancelHumanApprovalActionError, type CancelHumanApprovalActionErrors, type CancelHumanApprovalActionRequest, type CancelHumanApprovalActionResponse, type CancelHumanApprovalActionResponses, type ChangePersonalWikiOwnershipData, type ChangePersonalWikiOwnershipResponse, type ChangePersonalWikiOwnershipResponses, type ChangeResourceOwnershipRequest, type ChangeWikiOwnershipData, type ChangeWikiOwnershipResponse, type ChangeWikiOwnershipResponses, type ChatApproval, ChatApprovalDecision, type ChatChannelInstallationInstructions, type ChatChannelProvider, type ChatChannelProviderAuthMethod, type ChatChannelSubscriptionOption, type ChatkitAddAgentResourceGrantData, type ChatkitAddAgentResourceGrantError, type ChatkitAddAgentResourceGrantErrors, type ChatkitAddAgentResourceGrantResponse, type ChatkitAddAgentResourceGrantResponses, type ChatkitAddSessionParticipantData, type ChatkitAddSessionParticipantError, type ChatkitAddSessionParticipantErrors, type ChatkitAddSessionParticipantResponse, type ChatkitAddSessionParticipantResponses, type ChatKitAgent, type ChatKitAgentAvatar, ChatKitAgentConcurrencyPolicy, type ChatKitAgentInvocationActor, type ChatKitAgentPaginatedResponse, type ChatKitAgentTurnQueueItem, type ChatKitAgentTurnQueueItemPaginatedResponse, ChatKitAgentTurnQueueStatus, type ChatkitAutoProvisionSlackChannelInstallationData, type ChatkitAutoProvisionSlackChannelInstallationError, type ChatkitAutoProvisionSlackChannelInstallationErrors, type ChatkitAutoProvisionSlackChannelInstallationResponse, type ChatkitAutoProvisionSlackChannelInstallationResponses, type ChatkitCacheConvertedMessagesData, type ChatkitCacheConvertedMessagesError, type ChatkitCacheConvertedMessagesErrors, type ChatkitCacheConvertedMessagesResponse, type ChatkitCacheConvertedMessagesResponses, type ChatKitChatProviderConfigField, type ChatkitClaimAgentResourceBundleOutputsData, type ChatkitClaimAgentResourceBundleOutputsResponse, type ChatkitClaimAgentResourceBundleOutputsResponses, type ChatkitCompleteSlackProviderProvisionedSetupData, type ChatkitCompleteSlackProviderProvisionedSetupError, type ChatkitCompleteSlackProviderProvisionedSetupErrors, type ChatkitCompleteSlackProviderProvisionedSetupResponse, type ChatkitCompleteSlackProviderProvisionedSetupResponses, type ChatkitCompleteSlackSelfManagedSetupData, type ChatkitCompleteSlackSelfManagedSetupError, type ChatkitCompleteSlackSelfManagedSetupErrors, type ChatkitCompleteSlackSelfManagedSetupResponse, type ChatkitCompleteSlackSelfManagedSetupResponses, type ChatkitCreateSessionData, type ChatkitCreateSessionError, type ChatkitCreateSessionErrors, type ChatkitCreateSessionResponse, type ChatkitCreateSessionResponses, type ChatkitCreateSlackChannelInstallationData, type ChatkitCreateSlackChannelInstallationError, type ChatkitCreateSlackChannelInstallationErrors, type ChatkitCreateSlackChannelInstallationResponse, type ChatkitCreateSlackChannelInstallationResponses, type ChatkitDeleteAgentData, type ChatkitDeleteAgentError, type ChatkitDeleteAgentErrors, type ChatkitDeleteAgentResponse, type ChatkitDeleteAgentResponses, type ChatkitDeleteAgentTurnQueueItemData, type ChatkitDeleteAgentTurnQueueItemError, type ChatkitDeleteAgentTurnQueueItemErrors, type ChatkitDeleteAgentTurnQueueItemResponse, type ChatkitDeleteAgentTurnQueueItemResponses, type ChatkitDeleteChatProviderData, type ChatkitDeleteChatProviderError, type ChatkitDeleteChatProviderErrors, type ChatkitDeleteChatProviderResponse, type ChatkitDeleteChatProviderResponses, type ChatkitGetAgentAvatarData, type ChatkitGetAgentAvatarError, type ChatkitGetAgentAvatarErrors, type ChatkitGetAgentAvatarResponse, type ChatkitGetAgentAvatarResponses, type ChatkitGetAgentData, type ChatkitGetAgentError, type ChatkitGetAgentErrors, type ChatkitGetAgentObservabilityData, type ChatkitGetAgentObservabilityError, type ChatkitGetAgentObservabilityErrors, type ChatkitGetAgentObservabilityResponse, type ChatkitGetAgentObservabilityResponses, type ChatkitGetAgentResourceBundleProvisioningData, type ChatkitGetAgentResourceBundleProvisioningResponse, type ChatkitGetAgentResourceBundleProvisioningResponses, type ChatkitGetAgentResponse, type ChatkitGetAgentResponses, type ChatkitHydrateConvertedMessagesData, type ChatkitHydrateConvertedMessagesError, type ChatkitHydrateConvertedMessagesErrors, type ChatkitHydrateConvertedMessagesResponse, type ChatkitHydrateConvertedMessagesResponses, ChatKitIdentityKind, type ChatkitInvokeSessionProviderToolData, type ChatkitInvokeSessionProviderToolError, type ChatkitInvokeSessionProviderToolErrors, type ChatkitInvokeSessionProviderToolResponse, type ChatkitInvokeSessionProviderToolResponses, type ChatkitJoinSessionData, type ChatkitJoinSessionError, type ChatkitJoinSessionErrors, type ChatkitJoinSessionResponse, type ChatkitJoinSessionResponses, type ChatkitListAgentResourceGrantsData, type ChatkitListAgentResourceGrantsError, type ChatkitListAgentResourceGrantsErrors, type ChatkitListAgentResourceGrantsResponse, type ChatkitListAgentResourceGrantsResponses, type ChatkitListAgentsData, type ChatkitListAgentsError, type ChatkitListAgentsErrors, type ChatkitListAgentsResponse, type ChatkitListAgentsResponses, type ChatkitListAgentTurnQueueData, type ChatkitListAgentTurnQueueError, type ChatkitListAgentTurnQueueErrors, type ChatkitListAgentTurnQueueResponse, type ChatkitListAgentTurnQueueResponses, type ChatkitListAvailableChatChannelsData, type ChatkitListAvailableChatChannelsError, type ChatkitListAvailableChatChannelsErrors, type ChatkitListAvailableChatChannelsResponse, type ChatkitListAvailableChatChannelsResponses, type ChatkitListAvailableChatProvidersData, type ChatkitListAvailableChatProvidersError, type ChatkitListAvailableChatProvidersErrors, type ChatkitListAvailableChatProvidersResponse, type ChatkitListAvailableChatProvidersResponses, type ChatkitListChatProvidersData, type ChatkitListChatProvidersError, type ChatkitListChatProvidersErrors, type ChatkitListChatProvidersResponse, type ChatkitListChatProvidersResponses, type ChatkitListMessageHistoryData, type ChatkitListMessageHistoryError, type ChatkitListMessageHistoryErrors, type ChatkitListMessageHistoryResponse, type ChatkitListMessageHistoryResponses, type ChatkitListSessionParticipantsData, type ChatkitListSessionParticipantsError, type ChatkitListSessionParticipantsErrors, type ChatkitListSessionParticipantsResponse, type ChatkitListSessionParticipantsResponses, type ChatkitListSessionsData, type ChatkitListSessionsError, type ChatkitListSessionsErrors, type ChatkitListSessionsResponse, type ChatkitListSessionsResponses, type ChatKitMessageIdentity, type ChatKitParticipant, type ChatKitParticipantInput, ChatKitParticipantMembershipSource, ChatKitParticipantType, type ChatkitProvisionAgentResourceBundleData, type ChatkitProvisionAgentResourceBundleResponse, type ChatkitProvisionAgentResourceBundleResponses, type ChatKitRealtimeSocketTicket, ChatKitRealtimeTicketTransport, type ChatkitRegisterAgentToolsData, type ChatkitRegisterAgentToolsError, type ChatkitRegisterAgentToolsErrors, type ChatkitRegisterAgentToolsResponse, type ChatkitRegisterAgentToolsResponses, type ChatkitRegisterChatProviderData, type ChatkitRegisterChatProviderError, type ChatkitRegisterChatProviderErrors, type ChatkitRegisterChatProviderResponse, type ChatkitRegisterChatProviderResponses, type ChatkitRegisterHttpVercelAiSdkAgentData, type ChatkitRegisterHttpVercelAiSdkAgentError, type ChatkitRegisterHttpVercelAiSdkAgentErrors, type ChatkitRegisterHttpVercelAiSdkAgentResponse, type ChatkitRegisterHttpVercelAiSdkAgentResponses, type ChatkitRegisterVercelUiChatProviderData, type ChatkitRegisterVercelUiChatProviderError, type ChatkitRegisterVercelUiChatProviderErrors, type ChatkitRegisterVercelUiChatProviderResponse, type ChatkitRegisterVercelUiChatProviderResponses, type ChatkitRemoveAgentResourceGrantData, type ChatkitRemoveAgentResourceGrantError, type ChatkitRemoveAgentResourceGrantErrors, type ChatkitRemoveAgentResourceGrantResponse, type ChatkitRemoveAgentResourceGrantResponses, type ChatkitRemoveSessionParticipantData, type ChatkitRemoveSessionParticipantError, type ChatkitRemoveSessionParticipantErrors, type ChatkitRemoveSessionParticipantResponse, type ChatkitRemoveSessionParticipantResponses, type ChatkitReorderAgentTurnQueueItemData, type ChatkitReorderAgentTurnQueueItemError, type ChatkitReorderAgentTurnQueueItemErrors, type ChatkitReorderAgentTurnQueueItemResponse, type ChatkitReorderAgentTurnQueueItemResponses, type ChatkitReportToolExecutionData, type ChatkitReportToolExecutionError, type ChatkitReportToolExecutionErrors, type ChatkitReportToolExecutionResponse, type ChatkitReportToolExecutionResponses, type ChatKitRequestAgent, type ChatKitRequestAgentAvatar, type ChatKitSearchAgent, type ChatkitSearchData, type ChatkitSearchError, type ChatkitSearchErrors, type ChatKitSearchHit, ChatKitSearchHitKind, type ChatKitSearchHitPaginatedResponse, type ChatkitSearchResponse, type ChatkitSearchResponses, type ChatKitSearchSession, type ChatkitSendSessionMessageData, type ChatkitSendSessionMessageError, type ChatkitSendSessionMessageErrors, type ChatkitSendSessionMessageResponse, type ChatkitSendSessionMessageResponses, type ChatKitSessionUserState, type ChatKitSessionWithParticipants, type ChatkitSetAgentPermissionsData, type ChatkitSetAgentPermissionsError, type ChatkitSetAgentPermissionsErrors, type ChatkitSetAgentPermissionsResponse, type ChatkitSetAgentPermissionsResponses, type ChatkitSetAgentStatusData, type ChatkitSetAgentStatusError, type ChatkitSetAgentStatusErrors, type ChatkitSetAgentStatusResponse, type ChatkitSetAgentStatusResponses, type ChatkitSetChatProviderStatusData, type ChatkitSetChatProviderStatusError, type ChatkitSetChatProviderStatusErrors, type ChatkitSetChatProviderStatusResponse, type ChatkitSetChatProviderStatusResponses, type ChatkitStartSlackOauthData, type ChatkitStartSlackOauthError, type ChatkitStartSlackOauthErrors, type ChatkitStartSlackOauthResponse, type ChatkitStartSlackOauthResponses, type ChatkitSteerAgentTurnQueueItemData, type ChatkitSteerAgentTurnQueueItemError, type ChatkitSteerAgentTurnQueueItemErrors, type ChatkitSteerAgentTurnQueueItemResponse, type ChatkitSteerAgentTurnQueueItemResponses, type ChatkitUpdateAgentAvatarData, type ChatkitUpdateAgentAvatarError, type ChatkitUpdateAgentAvatarErrors, type ChatkitUpdateAgentAvatarResponse, type ChatkitUpdateAgentAvatarResponses, type ChatkitUpdateAgentData, type ChatkitUpdateAgentError, type ChatkitUpdateAgentErrors, type ChatkitUpdateAgentObservabilityData, type ChatkitUpdateAgentObservabilityError, type ChatkitUpdateAgentObservabilityErrors, type ChatkitUpdateAgentObservabilityResponse, type ChatkitUpdateAgentObservabilityResponses, type ChatkitUpdateAgentOwnershipData, type ChatkitUpdateAgentOwnershipError, type ChatkitUpdateAgentOwnershipErrors, type ChatkitUpdateAgentOwnershipResponse, type ChatkitUpdateAgentOwnershipResponses, type ChatkitUpdateAgentResponse, type ChatkitUpdateAgentResponses, type ChatkitUpdateAgentToolVisibilityData, type ChatkitUpdateAgentToolVisibilityError, type ChatkitUpdateAgentToolVisibilityErrors, type ChatkitUpdateAgentToolVisibilityResponse, type ChatkitUpdateAgentToolVisibilityResponses, type ChatkitUpdateAgentVisibilityData, type ChatkitUpdateAgentVisibilityError, type ChatkitUpdateAgentVisibilityErrors, type ChatkitUpdateAgentVisibilityResponse, type ChatkitUpdateAgentVisibilityResponses, type ChatkitUpdateChatProviderData, type ChatkitUpdateChatProviderError, type ChatkitUpdateChatProviderErrors, type ChatkitUpdateChatProviderResponse, type ChatkitUpdateChatProviderResponses, type ChatkitWorkspaceAgentSessionsData, type ChatkitWorkspaceAgentSessionsResponse, type ChatKitWorkspaceAgentSessionsResponse, type ChatkitWorkspaceAgentSessionsResponses, type ChatKitWorkspaceAgentSummary, type ChatKitWorkspaceAttachmentCompletion, type ChatkitWorkspaceBootstrapData, type ChatkitWorkspaceBootstrapResponse, type ChatKitWorkspaceBootstrapResponse, type ChatkitWorkspaceBootstrapResponses, type ChatKitWorkspaceConversationSnapshot, type ChatkitWorkspaceConversationSnapshotData, type ChatkitWorkspaceConversationSnapshotResponse, type ChatkitWorkspaceConversationSnapshotResponses, type ChatkitWorkspaceCreateSessionData, type ChatkitWorkspaceCreateSessionResponse, type ChatkitWorkspaceCreateSessionResponses, type ChatkitWorkspaceInterruptSessionData, type ChatkitWorkspaceInterruptSessionResponse, type ChatkitWorkspaceInterruptSessionResponses, type ChatkitWorkspaceMessagesData, type ChatkitWorkspaceMessagesResponse, type ChatkitWorkspaceMessagesResponses, type ChatKitWorkspaceQueuedTurns, type ChatkitWorkspaceRenameThreadData, type ChatkitWorkspaceRenameThreadResponse, type ChatkitWorkspaceRenameThreadResponses, type ChatkitWorkspaceSendMessageData, type ChatkitWorkspaceSendMessageResponse, type ChatkitWorkspaceSendMessageResponses, type ChatKitWorkspaceSessionSummary, type ChatkitWorkspaceSidebarData, type ChatkitWorkspaceSidebarResponse, type ChatKitWorkspaceSidebarResponse, type ChatkitWorkspaceSidebarResponses, type ChatkitWorkspaceSubmitTurnData, type ChatkitWorkspaceSubmitTurnResponse, type ChatkitWorkspaceSubmitTurnResponses, type ChatkitWorkspaceUpdateSessionReadStateData, type ChatkitWorkspaceUpdateSessionReadStateResponse, type ChatkitWorkspaceUpdateSessionReadStateResponses, type ChatMessage, type ChatMessagePart, type ChatRequest, type ChatSessionContext, ChatToolInvocationState, type CheckMemoryBankHealthData, type CheckMemoryBankHealthResponse, type CheckMemoryBankHealthResponses, type CheckPersonalMemoryBankHealthData, type CheckPersonalMemoryBankHealthResponse, type CheckPersonalMemoryBankHealthResponses, type ClaimTemporaryAccountData, type ClaimTemporaryAccountError, type ClaimTemporaryAccountErrors, type ClaimTemporaryAccountRequest, type ClaimTemporaryAccountResponse, type ClaimTemporaryAccountResponse2, type ClaimTemporaryAccountResponses, type ClientOptions, type CloudWhoamiResponse, type CommitMemoryBankReservationBody, type CommonProviderInstallationPage, type CommonProviderInstallationSerialized, type CompleteAttachmentUploadData, type CompleteAttachmentUploadError, type CompleteAttachmentUploadErrors, type CompleteAttachmentUploadInner, type CompleteAttachmentUploadResponse, type CompleteAttachmentUploadResponses, type CompleteCredentialSetupItemBody, type CompleteCredentialSetupItemData, type CompleteCredentialSetupItemResponse, type CompleteCredentialSetupItemResponses, type CompleteHumanApprovalActionData, type CompleteHumanApprovalActionError, type CompleteHumanApprovalActionErrors, type CompleteHumanApprovalActionRequest, type CompleteHumanApprovalActionResponse, type CompleteHumanApprovalActionResponses, type CompleteSlackProviderProvisionedSetupRequestInner, type CompleteSlackSelfManagedSetupRequestInner, type CompleteWikiAssetUploadData, type CompleteWikiAssetUploadResponse, type CompleteWikiAssetUploadResponses, type ConfigurationSchema, type ConfigureHostedOpenbotInstanceData, type ConfigureHostedOpenbotInstanceError, type ConfigureHostedOpenbotInstanceErrors, type ConfigureHostedOpenBotInstanceRequest, type ConfigureHostedOpenbotInstanceResponse, type ConfigureHostedOpenbotInstanceResponses, type ConnectMcpProviderCatalogEntryData, type ConnectMcpProviderCatalogEntryError, type ConnectMcpProviderCatalogEntryErrors, type ConnectMcpProviderCatalogEntryRequestInner, type ConnectMcpProviderCatalogEntryResponse, type ConnectMcpProviderCatalogEntryResponse2, type ConnectMcpProviderCatalogEntryResponses, type ConnectProxiedMcpServerData, type ConnectProxiedMcpServerError, type ConnectProxiedMcpServerErrors, type ConnectProxiedMcpServerRequestInner, type ConnectProxiedMcpServerResponse, type ConnectProxiedMcpServerResponse2, type ConnectProxiedMcpServerResponses, type CreateApiKeyInner, type CreateApiKeyResponse, type CreateAttachmentUploadData, type CreateAttachmentUploadError, type CreateAttachmentUploadErrors, type CreateAttachmentUploadInner, type CreateAttachmentUploadResponse, type CreateAttachmentUploadResponse2, type CreateAttachmentUploadResponses, type CreateAttachmentUploadsData, type CreateAttachmentUploadsError, type CreateAttachmentUploadsErrors, type CreateAttachmentUploadsInner, type CreateAttachmentUploadsResponse, type CreateAttachmentUploadsResponse2, type CreateAttachmentUploadsResponses, type CreateChatKitSessionRequestInner, type CreateChatKitWorkspaceSessionRequestInner, type CreateCustomToolProviderData, type CreateCustomToolProviderRequestInner, type CreateCustomToolProviderResponse, type CreateCustomToolProviderResponse2, type CreateCustomToolProviderResponses, type CreateHostedOpenbotDeploymentData, type CreateHostedOpenbotDeploymentError, type CreateHostedOpenbotDeploymentErrors, type CreateHostedOpenBotDeploymentRequest, type CreateHostedOpenbotDeploymentResponse, type CreateHostedOpenbotDeploymentResponses, type CreateHostedOpenbotReleaseData, type CreateHostedOpenbotReleaseError, type CreateHostedOpenbotReleaseErrors, type CreateHostedOpenBotReleaseFile, type CreateHostedOpenBotReleaseRequest, type CreateHostedOpenbotReleaseResponse, type CreateHostedOpenbotReleaseResponses, type CreateHumanApprovalActionData, type CreateHumanApprovalActionError, type CreateHumanApprovalActionErrors, type CreateHumanApprovalActionRequestInner, type CreateHumanApprovalActionResponse, type CreateHumanApprovalActionResponse2, type CreateHumanApprovalActionResponses, type CreateManagedUserCredentialBody, type CreateManagedUserCredentialData, type CreateManagedUserCredentialResponse, type CreateManagedUserCredentialResponses, type CreateMcpServerInstanceData, type CreateMcpServerInstanceError, type CreateMcpServerInstanceErrors, type CreateMcpServerInstanceRequestInner, type CreateMcpServerInstanceResponse, type CreateMcpServerInstanceResponses, type CreateMemoryBankBody, type CreateMemoryBankData, type CreateMemoryBankResponse, type CreateMemoryBankResponses, type CreateMessageData, type CreateMessageError, type CreateMessageErrors, type CreateMessageRequest, type CreateMessageResponse, type CreateMessageResponses, type CreateOrganizationData, type CreateOrganizationError, type CreateOrganizationErrors, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateOrganizationResponses, type CreateOrgOidcProviderData, type CreateOrgOidcProviderError, type CreateOrgOidcProviderErrors, type CreateOrgOidcProviderRequest, type CreateOrgOidcProviderResponse, type CreateOrgOidcProviderResponses, type CreatePageTypeBody, type CreatePageTypeVersionBody, type CreatePersonalMcpServerInstanceData, type CreatePersonalMcpServerInstanceError, type CreatePersonalMcpServerInstanceErrors, type CreatePersonalMcpServerInstanceResponse, type CreatePersonalMcpServerInstanceResponses, type CreatePersonalMemoryBankData, type CreatePersonalMemoryBankResponse, type CreatePersonalMemoryBankResponses, type CreatePersonalSkillData, type CreatePersonalSkillRegistryData, type CreatePersonalSkillRegistryResponse, type CreatePersonalSkillRegistryResponses, type CreatePersonalSkillResponse, type CreatePersonalSkillResponses, type CreatePersonalToolGroupInstanceBody, type CreatePersonalToolGroupInstanceData, type CreatePersonalToolGroupInstanceError, type CreatePersonalToolGroupInstanceErrors, type CreatePersonalToolGroupInstanceResponse, type CreatePersonalToolGroupInstanceResponses, type CreatePersonalUserCredentialData, type CreatePersonalUserCredentialResponse, type CreatePersonalUserCredentialResponses, type CreatePersonalWikiData, type CreatePersonalWikiPageData, type CreatePersonalWikiPageResponse, type CreatePersonalWikiPageResponses, type CreatePersonalWikiResponse, type CreatePersonalWikiResponses, type CreateRelationshipTypeBody, type CreateRelationshipTypeVersionBody, type CreateResourcePlaneGrantRequest, type CreateResourceServerCredentialData, type CreateResourceServerCredentialParamsInner, type CreateResourceServerCredentialResponse, type CreateResourceServerCredentialResponses, type CreateReverseProxyProfileInner, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionInner, type CreateSessionResponse, type CreateSessionResponses, type CreateSignalMessageRequest, type CreateSignalProviderInstanceRequestInner, type CreateSkillData, type CreateSkillError, type CreateSkillErrors, type CreateSkillInner, type CreateSkillRegistryBody, type CreateSkillRegistryData, type CreateSkillRegistryError, type CreateSkillRegistryErrors, type CreateSkillRegistryResponse, type CreateSkillRegistryResponses, type CreateSkillResponse, type CreateSkillResponses, type CreateSlackChannelInstallationRequestInner, type CreateSlackChannelInstallationResponse, type CreateTeamData, type CreateTeamError, type CreateTeamErrors, type CreateTeamGroupBody, type CreateTeamGroupData, type CreateTeamGroupError, type CreateTeamGroupErrors, type CreateTeamGroupResponse, type CreateTeamGroupResponses, type CreateTeamRequest, type CreateTeamResponse, type CreateTeamResponses, type CreateTemporaryAccountData, type CreateTemporaryAccountError, type CreateTemporaryAccountErrors, type CreateTemporaryAccountRequest, type CreateTemporaryAccountResponse, type CreateTemporaryAccountResponse2, type CreateTemporaryAccountResponses, type CreateTextMessageRequest, type CreateToolGroupInstanceData, type CreateToolGroupInstanceError, type CreateToolGroupInstanceErrors, type CreateToolGroupInstanceParamsInner, type CreateToolGroupInstanceResponse, type CreateToolGroupInstanceResponses, type CreateTrustedRuntimeData, type CreateTrustedRuntimeError, type CreateTrustedRuntimeErrors, type CreateTrustedRuntimeInner, type CreateTrustedRuntimeResponse, type CreateTrustedRuntimeResponses, type CreateTrustedSkillProviderData, type CreateTrustedSkillProviderError, type CreateTrustedSkillProviderErrors, type CreateTrustedSkillProviderRequest, type CreateTrustedSkillProviderResponse, type CreateTrustedSkillProviderResponses, type CreateUiMessageRequest, type CreateUserCredentialData, type CreateUserCredentialParamsInner, type CreateUserCredentialResponse, type CreateUserCredentialResponses, type CreateWikiAssetBody, type CreateWikiAssetUploadData, type CreateWikiAssetUploadResponse, type CreateWikiAssetUploadResponses, type CreateWikiData, type CreateWikiInner, type CreateWikiPageData, type CreateWikiPageResponse, type CreateWikiPageResponses, type CreateWikiPageTypeData, type CreateWikiPageTypeResponse, type CreateWikiPageTypeResponses, type CreateWikiPageTypeVersionData, type CreateWikiPageTypeVersionErrors, type CreateWikiPageTypeVersionResponse, type CreateWikiPageTypeVersionResponses, type CreateWikiRelationshipTypeData, type CreateWikiRelationshipTypeResponse, type CreateWikiRelationshipTypeResponses, type CreateWikiRelationshipTypeVersionData, type CreateWikiRelationshipTypeVersionErrors, type CreateWikiRelationshipTypeVersionResponse, type CreateWikiRelationshipTypeVersionResponses, type CreateWikiResponse, type CreateWikiResponses, type CredentialGenericOauthCallbackData, type CredentialGenericOauthCallbackResponses, CredentialSetupCredentialKind, type CredentialSetupFormField, type CredentialSetupItem, type CredentialSetupItemPaginatedResponse, CredentialSetupItemStatus, type CredentialSetupNextAction, type CredentialSourceSerialized, CurrentSeatStatus, type CustomSkillSpec, type CustomToolProviderDetails, type CustomToolProviderListItem, type CustomToolProviderListItemPaginatedResponse, type CustomToolProviderSerialized, type DataUiPart, type DebugAuthProfilesResponse, type DeleteAttachmentData, type DeleteAttachmentError, type DeleteAttachmentErrors, type DeleteAttachmentResponse, type DeleteAttachmentResponses, type DeleteChatKitAgentTurnQueueItemResponse, type DeleteCustomToolProviderData, type DeleteCustomToolProviderResponses, type DeleteInboxResponse, type DeleteManagedUserCredentialData, type DeleteManagedUserCredentialResponses, type DeleteMcpServerInstanceData, type DeleteMcpServerInstanceError, type DeleteMcpServerInstanceErrors, type DeleteMcpServerInstanceResponses, type DeleteMemoryBankData, type DeleteMemoryBankResponses, type DeleteMemoryDocumentBody, type DeleteMemoryDocumentData, type DeleteMemoryDocumentResponses, type DeleteMessageData, type DeleteMessageError, type DeleteMessageErrors, type DeleteMessageResponse, type DeleteMessageResponse2, type DeleteMessageResponses, type DeleteOrganizationData, type DeleteOrganizationError, type DeleteOrganizationErrors, type DeleteOrganizationResponses, type DeleteOrgOidcProviderData, type DeleteOrgOidcProviderError, type DeleteOrgOidcProviderErrors, type DeleteOrgOidcProviderResponses, type DeletePersonalMcpServerInstanceData, type DeletePersonalMcpServerInstanceResponses, type DeletePersonalMemoryBankData, type DeletePersonalMemoryBankResponses, type DeletePersonalMemoryDocumentData, type DeletePersonalMemoryDocumentResponses, type DeletePersonalSkillData, type DeletePersonalSkillRegistryData, type DeletePersonalSkillRegistryResponses, type DeletePersonalSkillResponses, type DeletePersonalToolGroupInstanceData, type DeletePersonalToolGroupInstanceResponses, type DeletePersonalWikiData, type DeletePersonalWikiPageData, type DeletePersonalWikiPageResponses, type DeletePersonalWikiResponses, type DeleteProxiedMcpServerData, type DeleteProxiedMcpServerError, type DeleteProxiedMcpServerErrors, type DeleteProxiedMcpServerResponses, type DeleteResourceServerCredentialData, type DeleteResourceServerCredentialResponses, type DeleteRoutineResponse, type DeleteSelfAvatarData, type DeleteSelfAvatarError, type DeleteSelfAvatarErrors, type DeleteSelfAvatarResponses, type DeleteSignalResponse, type DeleteSkillData, type DeleteSkillError, type DeleteSkillErrors, type DeleteSkillRegistryData, type DeleteSkillRegistryError, type DeleteSkillRegistryErrors, type DeleteSkillRegistryResponses, type DeleteSkillResponses, type DeleteTeamData, type DeleteTeamError, type DeleteTeamErrors, type DeleteTeamGroupData, type DeleteTeamGroupError, type DeleteTeamGroupErrors, type DeleteTeamGroupResponses, type DeleteTeamResponses, type DeleteToolGroupInstanceData, type DeleteToolGroupInstanceError, type DeleteToolGroupInstanceErrors, type DeleteToolGroupInstanceResponses, type DeleteTrustedRuntimeData, type DeleteTrustedRuntimeError, type DeleteTrustedRuntimeErrors, type DeleteTrustedRuntimeResponses, type DeleteUserCredentialData, type DeleteUserCredentialResponses, type DeleteWikiAssetData, type DeleteWikiAssetErrors, type DeleteWikiAssetResponses, type DeleteWikiData, type DeleteWikiPageData, type DeleteWikiPageErrors, type DeleteWikiPageRelationshipData, type DeleteWikiPageRelationshipResponses, type DeleteWikiPageResponses, type DeleteWikiPageTypeData, type DeleteWikiPageTypeErrors, type DeleteWikiPageTypeResponse, type DeleteWikiPageTypeResponses, type DeleteWikiPageTypeVersionData, type DeleteWikiPageTypeVersionErrors, type DeleteWikiPageTypeVersionResponse, type DeleteWikiPageTypeVersionResponses, type DeleteWikiRelationshipTypeData, type DeleteWikiRelationshipTypeErrors, type DeleteWikiRelationshipTypeResponses, type DeleteWikiResponses, type DeploymentEnvironmentFile, type DisableCustomToolProviderData, type DisableCustomToolProviderResponse, type DisableCustomToolProviderResponses, type DisableProxiedMcpServerData, type DisableProxiedMcpServerError, type DisableProxiedMcpServerErrors, type DisableProxiedMcpServerResponse, type DisableProxiedMcpServerResponses, type DisableToolData, type DisableToolError, type DisableToolErrors, type DisableToolResponse, type DisableToolResponses, type DownloadAttachmentContentData, type DownloadAttachmentContentError, type DownloadAttachmentContentErrors, type DownloadAttachmentContentResponse, type DownloadAttachmentContentResponses, type DownloadSkillPackageFileData, type DownloadSkillPackageFileError, type DownloadSkillPackageFileErrors, type DownloadSkillPackageFileRequest, type DownloadSkillPackageFileResponse, type DownloadSkillPackageFileResponses, type DownloadWikiAssetContentData, type DownloadWikiAssetContentErrors, type DownloadWikiAssetContentResponse, type DownloadWikiAssetContentResponses, type DownloadWikiAssetData, type DownloadWikiAssetResponse, type DownloadWikiAssetResponses, type EnableAndBindMcpServerResult, type EnableAndBindProviderToolsData, type EnableAndBindProviderToolsError, type EnableAndBindProviderToolsErrors, type EnableAndBindProviderToolsResponse, type EnableAndBindProviderToolsResponses, type EnableAndBindToolFailure, type EnableAndBindToolsBody, type EnableAndBindToolsResponse, type EnableCustomToolProviderData, type EnableCustomToolProviderResponse, type EnableCustomToolProviderResponses, type EnabledSkillsSpec, type EnableProxiedMcpServerData, type EnableProxiedMcpServerError, type EnableProxiedMcpServerErrors, type EnableProxiedMcpServerResponse, type EnableProxiedMcpServerResponses, type EnableToolData, type EnableToolError, type EnableToolErrors, type EnableToolInstanceParamsInner, type EnableToolResponse, type EnableToolResponses, type EncryptCredentialConfigurationParamsInner, type EncryptedTrustedRuntimePayload, type EncryptPersonalUserCredentialConfigurationData, type EncryptPersonalUserCredentialConfigurationResponses, type EncryptResourceServerConfigurationData, type EncryptResourceServerConfigurationResponses, type EncryptUserCredentialConfigurationData, type EncryptUserCredentialConfigurationResponses, EndpointType, type Error, type ExchangeOAuthCodeBody, type ExchangeOauthCodeData, type ExchangeOauthCodeErrors, type ExchangeOauthCodeResponse, type ExchangeOauthCodeResponses, type ExchangeOAuthCodeResult, type ExpectedRevisionBody, type ExpireTemporaryAccountsData, type ExpireTemporaryAccountsError, type ExpireTemporaryAccountsErrors, type ExpireTemporaryAccountsResponse, type ExpireTemporaryAccountsResponse2, type ExpireTemporaryAccountsResponses, type ExportMemoryBankTemplateData, type ExportMemoryBankTemplateResponse, type ExportMemoryBankTemplateResponses, type ExportPersonalMemoryBankTemplateData, type ExportPersonalMemoryBankTemplateResponse, type ExportPersonalMemoryBankTemplateResponses, type FileUiPart, type FinalizeHostedOpenbotReleaseData, type FinalizeHostedOpenbotReleaseError, type FinalizeHostedOpenbotReleaseErrors, type FinalizeHostedOpenbotReleaseResponse, type FinalizeHostedOpenbotReleaseResponses, type GenerateLocalRuntimeTunnelApiKeyData, type GenerateLocalRuntimeTunnelApiKeyError, type GenerateLocalRuntimeTunnelApiKeyErrors, type GenerateLocalRuntimeTunnelApiKeyResponse, type GenerateLocalRuntimeTunnelApiKeyResponse2, type GenerateLocalRuntimeTunnelApiKeyResponses, type GenerateTemporaryAccountClaimUrlData, type GenerateTemporaryAccountClaimUrlError, type GenerateTemporaryAccountClaimUrlErrors, type GenerateTemporaryAccountClaimUrlResponse, type GenerateTemporaryAccountClaimUrlResponse2, type GenerateTemporaryAccountClaimUrlResponses, type GetAttachmentDownloadUrlData, type GetAttachmentDownloadUrlError, type GetAttachmentDownloadUrlErrors, type GetAttachmentDownloadUrlResponse, type GetAttachmentDownloadUrlResponse2, type GetAttachmentDownloadUrlResponses, type GetCommonProviderInstallationData, type GetCommonProviderInstallationResponse, type GetCommonProviderInstallationResponses, type GetCredentialSetupItemData, type GetCredentialSetupItemResponse, type GetCredentialSetupItemResponses, type GetCustomToolProviderData, type GetCustomToolProviderResponse, type GetCustomToolProviderResponses, type GetHostedOpenbotInstanceData, type GetHostedOpenbotInstanceError, type GetHostedOpenbotInstanceErrors, type GetHostedOpenbotInstanceResponse, type GetHostedOpenbotInstanceResponses, type GetHostedOpenbotReleaseData, type GetHostedOpenbotReleaseError, type GetHostedOpenbotReleaseErrors, type GetHostedOpenbotReleaseResponse, type GetHostedOpenbotReleaseResponses, type GetHumanApprovalActionData, type GetHumanApprovalActionError, type GetHumanApprovalActionErrors, type GetHumanApprovalActionResponse, type GetHumanApprovalActionResponses, type GetLocalRuntimeTunnelApiKeyData, type GetLocalRuntimeTunnelApiKeyError, type GetLocalRuntimeTunnelApiKeyErrors, type GetLocalRuntimeTunnelApiKeyResponse, type GetLocalRuntimeTunnelApiKeyResponses, type GetLocalRuntimeTunnelConnectorData, type GetLocalRuntimeTunnelConnectorError, type GetLocalRuntimeTunnelConnectorErrors, type GetLocalRuntimeTunnelConnectorResponse, type GetLocalRuntimeTunnelConnectorResponses, type GetManagedUserCredentialSecretData, type GetManagedUserCredentialSecretResponse, type GetManagedUserCredentialSecretResponses, type GetMcpServerInstanceData, type GetMcpServerInstanceError, type GetMcpServerInstanceErrors, type GetMcpServerInstanceResponse, type GetMcpServerInstanceResponses, type GetMemoryBankConfigData, type GetMemoryBankConfigResponse, type GetMemoryBankConfigResponses, type GetMemoryBankData, type GetMemoryBankDocumentData, type GetMemoryBankDocumentResponses, type GetMemoryBankResponse, type GetMemoryBankResponses, type GetMessageData, type GetMessageError, type GetMessageErrors, type GetMessageResponse, type GetMessageResponses, type GetOpenbotPluginsCatalogData, type GetOpenbotPluginsCatalogResponse, type GetOpenbotPluginsCatalogResponses, type GetOrganizationData, type GetOrganizationError, type GetOrganizationErrors, type GetOrganizationResponse, type GetOrganizationResponses, type GetOrgOidcProviderData, type GetOrgOidcProviderError, type GetOrgOidcProviderErrors, type GetOrgOidcProviderResponse, type GetOrgOidcProviderResponses, type GetPersonalMcpServerInstanceData, type GetPersonalMcpServerInstanceResponse, type GetPersonalMcpServerInstanceResponses, type GetPersonalMemoryBankConfigData, type GetPersonalMemoryBankConfigResponse, type GetPersonalMemoryBankConfigResponses, type GetPersonalMemoryBankData, type GetPersonalMemoryBankDocumentData, type GetPersonalMemoryBankDocumentResponses, type GetPersonalMemoryBankResponse, type GetPersonalMemoryBankResponses, type GetPersonalSkillData, type GetPersonalSkillRegistryData, type GetPersonalSkillRegistryResponse, type GetPersonalSkillRegistryResponses, type GetPersonalSkillResponse, type GetPersonalSkillResponses, type GetPersonalToolGroupInstanceData, type GetPersonalToolGroupInstanceResponse, type GetPersonalToolGroupInstanceResponses, type GetPersonalWikiData, type GetPersonalWikiPageData, type GetPersonalWikiPageResponse, type GetPersonalWikiPageResponses, type GetPersonalWikiResponse, type GetPersonalWikiResponses, type GetProviderProvisioningHumanActionData, type GetProviderProvisioningHumanActionResponse, type GetProviderProvisioningHumanActionResponses, type GetProxiedMcpServerData, type GetProxiedMcpServerError, type GetProxiedMcpServerErrors, type GetProxiedMcpServerResponse, type GetProxiedMcpServerResponses, type GetProxiedSkillProviderData, type GetProxiedSkillProviderError, type GetProxiedSkillProviderErrors, type GetProxiedSkillProviderResponse, type GetProxiedSkillProviderResponses, type GetResourceServerCredentialData, type GetResourceServerCredentialResponse, type GetResourceServerCredentialResponses, type GetRuntimeConfigData, type GetRuntimeConfigResponse, type GetRuntimeConfigResponses, type GetSelfAvatarData, type GetSelfAvatarError, type GetSelfAvatarErrors, type GetSelfAvatarResponse, type GetSelfAvatarResponses, type GetSelfProfileData, type GetSelfProfileError, type GetSelfProfileErrors, type GetSelfProfileResponse, type GetSelfProfileResponses, type GetSessionEventHistoryData, type GetSessionEventHistoryError, type GetSessionEventHistoryErrors, type GetSessionEventHistoryResponse, type GetSessionEventHistoryResponses, type GetSkillData, type GetSkillError, type GetSkillErrors, type GetSkillPackageData, type GetSkillPackageError, type GetSkillPackageErrors, type GetSkillPackageResponse, type GetSkillPackageResponses, type GetSkillRegistryData, type GetSkillRegistryError, type GetSkillRegistryErrors, type GetSkillRegistryResponse, type GetSkillRegistryResponses, type GetSkillRegistrySkillByTitleData, type GetSkillRegistrySkillByTitleError, type GetSkillRegistrySkillByTitleErrors, type GetSkillRegistrySkillByTitleResponse, type GetSkillRegistrySkillByTitleResponses, type GetSkillRegistrySkillData, type GetSkillRegistrySkillDescriptionData, type GetSkillRegistrySkillDescriptionError, type GetSkillRegistrySkillDescriptionErrors, type GetSkillRegistrySkillDescriptionResponse, type GetSkillRegistrySkillDescriptionResponses, type GetSkillRegistrySkillError, type GetSkillRegistrySkillErrors, type GetSkillRegistrySkillResponse, type GetSkillRegistrySkillResponses, type GetSkillResponse, type GetSkillResponses, type GetTeamData, type GetTeamError, type GetTeamErrors, type GetTeamGroupData, type GetTeamGroupError, type GetTeamGroupErrors, type GetTeamGroupResponse, type GetTeamGroupResponses, type GetTeamResponse, type GetTeamResponses, type GetToolGroupInstanceData, type GetToolGroupInstanceError, type GetToolGroupInstanceErrors, type GetToolGroupInstanceResponse, type GetToolGroupInstanceResponses, type GetToolsOpenapiSpecData, type GetToolsOpenapiSpecError, type GetToolsOpenapiSpecErrors, type GetToolsOpenapiSpecResponse, type GetToolsOpenapiSpecResponses, type GetTrustedRuntimeData, type GetTrustedRuntimeError, type GetTrustedRuntimeErrors, type GetTrustedRuntimeResponse, type GetTrustedRuntimeResponses, type GetUserCredentialData, type GetUserCredentialResponse, type GetUserCredentialResponses, type GetWikiData, type GetWikiPageBacklinksData, type GetWikiPageBacklinksResponse, type GetWikiPageBacklinksResponses, type GetWikiPageData, type GetWikiPageNeighborhoodData, type GetWikiPageNeighborhoodResponse, type GetWikiPageNeighborhoodResponses, type GetWikiPageRelationshipData, type GetWikiPageRelationshipResponse, type GetWikiPageRelationshipResponses, type GetWikiPageResponse, type GetWikiPageResponses, type GetWikiPageTypeData, type GetWikiPageTypeResponse, type GetWikiPageTypeResponses, type GetWikiPageTypeVersionData, type GetWikiPageTypeVersionResponse, type GetWikiPageTypeVersionResponses, type GetWikiRelationshipTypeData, type GetWikiRelationshipTypeResponse, type GetWikiRelationshipTypeResponses, type GetWikiRelationshipTypeVersionData, type GetWikiRelationshipTypeVersionResponse, type GetWikiRelationshipTypeVersionResponses, type GetWikiResponse, type GetWikiResponses, type Group, type GroupMembership, type GroupMemberWithUser, type GroupMemberWithUserPaginatedResponse, type HashedApiKey, type HealthCheckData, type HealthCheckError, type HealthCheckErrors, type HealthCheckResponse, type HealthCheckResponse2, type HealthCheckResponses, type HostedOpenBotDeployment, type HostedOpenBotInstance, HostedOpenBotInstanceStatus, type HostedOpenBotRelease, type HostedOpenBotReleaseFile, HostedOpenBotReleaseService, HostedOpenBotReleaseStatus, type Human, type HumanApprovalAction, type HumanApprovalActionResponse, type HydrateConvertedMessagesRequest, type HydrateConvertedMessagesResponse, type Identity, type ImportMemoryBankTemplateBody, type ImportMemoryBankTemplateData, type ImportMemoryBankTemplateResponse, type ImportMemoryBankTemplateResponse2, type ImportMemoryBankTemplateResponses, type ImportPersonalMemoryBankTemplateData, type ImportPersonalMemoryBankTemplateResponse, type ImportPersonalMemoryBankTemplateResponses, type ImportRunSummary, type ImportStateRequest, type ImportStateResponse, type Inbox, type InboxInstance, InboxInstanceTypingStatus, type InboxPaginatedResponse, InboxStatus, InboxType, type InboxWithLinkedInboxes, type InboxWithLinkedInboxesPaginatedResponse, type IngestSignalResponse, type InspectWikiAssetReferencesData, type InspectWikiAssetReferencesResponse, type InspectWikiAssetReferencesResponses, type InterruptChatKitSessionResponse, type InviteTeamUsersData, type InviteTeamUsersError, type InviteTeamUsersErrors, type InviteTeamUsersResponse, type InviteTeamUsersResponses, type InviteUserFailure, type InviteUserInput, type InviteUsersBody, type InviteUsersResponse, type InvokeCustomToolData, type InvokeCustomToolRequestInner, type InvokeCustomToolResponse, type InvokeCustomToolResponses, type InvokeError, type InvokeResult, type InvokeSessionProviderToolBody, type InvokeSessionProviderToolResponse, type InvokeToolData, type InvokeToolError, type InvokeToolErrors, type InvokeToolInstanceParamsInner, type InvokeToolResponse, type InvokeToolResponses, type IssueChatKitRealtimeSocketTicketRequest, type IssueOpenbotChatkitRealtimeTicketData, type IssueOpenbotChatkitRealtimeTicketError, type IssueOpenbotChatkitRealtimeTicketErrors, type IssueOpenbotChatkitRealtimeTicketResponse, type IssueOpenbotChatkitRealtimeTicketResponses, type JsonEqualsPredicate, type JsonSchema, type Jwk, type JwksResponse, type ListApiKeysResponse, type ListAvailableToolGroupsData, type ListAvailableToolGroupsError, type ListAvailableToolGroupsErrors, type ListAvailableToolGroupsResponse, type ListAvailableToolGroupsResponses, type ListCommonProviderInstallationOwnershipGrantsData, type ListCommonProviderInstallationOwnershipGrantsResponse, type ListCommonProviderInstallationOwnershipGrantsResponses, type ListCommonProviderInstallationsData, type ListCommonProviderInstallationsResponse, type ListCommonProviderInstallationsResponses, type ListCommonProviderInstallationVisibilityGrantsData, type ListCommonProviderInstallationVisibilityGrantsResponse, type ListCommonProviderInstallationVisibilityGrantsResponses, type ListCredentialSetupItemsData, type ListCredentialSetupItemsResponse, type ListCredentialSetupItemsResponses, type ListCustomToolProvidersData, type ListCustomToolProvidersResponse, type ListCustomToolProvidersResponses, type ListInboxAgentsData, type ListInboxAgentsError, type ListInboxAgentsErrors, type ListInboxAgentsResponse, type ListInboxAgentsResponses, type ListInboxesData, type ListInboxesError, type ListInboxesErrors, type ListInboxesResponse, type ListInboxesResponses, type ListManagedUserCredentialsData, type ListManagedUserCredentialsResponse, type ListManagedUserCredentialsResponses, type ListMcpProviderCatalogData, type ListMcpProviderCatalogError, type ListMcpProviderCatalogErrors, type ListMcpProviderCatalogResponse, type ListMcpProviderCatalogResponse2, type ListMcpProviderCatalogResponses, type ListMcpResourceOwnershipGrantsData, type ListMcpResourceOwnershipGrantsResponse, type ListMcpResourceOwnershipGrantsResponses, type ListMcpResourceVisibilityGrantsData, type ListMcpResourceVisibilityGrantsResponse, type ListMcpResourceVisibilityGrantsResponses, type ListMcpServerInstancesData, type ListMcpServerInstancesError, type ListMcpServerInstancesErrors, type ListMcpServerInstancesResponse, type ListMcpServerInstancesResponses, type ListMemoryBankDocumentsData, type ListMemoryBankDocumentsResponse, type ListMemoryBankDocumentsResponses, type ListMemoryBankOwnershipGrantsData, type ListMemoryBankOwnershipGrantsResponse, type ListMemoryBankOwnershipGrantsResponses, type ListMemoryBanksData, type ListMemoryBankSourceBindingsData, type ListMemoryBankSourceBindingsResponse, type ListMemoryBankSourceBindingsResponses, type ListMemoryBanksResponse, type ListMemoryBanksResponses, type ListMemoryBankVisibilityGrantsData, type ListMemoryBankVisibilityGrantsResponse, type ListMemoryBankVisibilityGrantsResponses, type ListMemorySourceBindingsData, type ListMemorySourceBindingsResponse, type ListMemorySourceBindingsResponses, type ListMessagesData, type ListMessagesError, type ListMessagesErrors, type ListMessagesResponse, type ListMessagesResponses, type ListOpenbotDeploymentsData, type ListOpenbotDeploymentsError, type ListOpenbotDeploymentsErrors, type ListOpenbotDeploymentsResponse, type ListOpenBotDeploymentsResponse, type ListOpenbotDeploymentsResponses, type ListOrganizationMembersData, type ListOrganizationMembersError, type ListOrganizationMembersErrors, type ListOrganizationMembersResponse, type ListOrganizationMembersResponses, type ListOrganizationsData, type ListOrganizationsError, type ListOrganizationsErrors, type ListOrganizationsResponses, type ListOrganizationTeamGroupsData, type ListOrganizationTeamGroupsResponse, type ListOrganizationTeamGroupsResponses, type ListOrgOidcProvidersData, type ListOrgOidcProvidersError, type ListOrgOidcProvidersErrors, type ListOrgOidcProvidersResponse, type ListOrgOidcProvidersResponses, type ListPersonalMcpServerInstancesData, type ListPersonalMcpServerInstancesError, type ListPersonalMcpServerInstancesErrors, type ListPersonalMcpServerInstancesResponse, type ListPersonalMcpServerInstancesResponses, type ListPersonalMemoryBankDocumentsData, type ListPersonalMemoryBankDocumentsResponse, type ListPersonalMemoryBankDocumentsResponses, type ListPersonalMemoryBankOwnershipGrantsData, type ListPersonalMemoryBankOwnershipGrantsResponse, type ListPersonalMemoryBankOwnershipGrantsResponses, type ListPersonalMemoryBanksData, type ListPersonalMemoryBankSourceBindingsData, type ListPersonalMemoryBankSourceBindingsResponse, type ListPersonalMemoryBankSourceBindingsResponses, type ListPersonalMemoryBanksResponse, type ListPersonalMemoryBanksResponses, type ListPersonalMemoryBankVisibilityGrantsData, type ListPersonalMemoryBankVisibilityGrantsResponse, type ListPersonalMemoryBankVisibilityGrantsResponses, type ListPersonalRegistryOwnershipGrantsData, type ListPersonalRegistryOwnershipGrantsResponse, type ListPersonalRegistryOwnershipGrantsResponses, type ListPersonalRegistryVisibilityGrantsData, type ListPersonalRegistryVisibilityGrantsResponse, type ListPersonalRegistryVisibilityGrantsResponses, type ListPersonalRscOwnershipGrantsData, type ListPersonalRscOwnershipGrantsResponse, type ListPersonalRscOwnershipGrantsResponses, type ListPersonalRscVisibilityGrantsData, type ListPersonalRscVisibilityGrantsResponse, type ListPersonalRscVisibilityGrantsResponses, type ListPersonalSkillOwnershipGrantsData, type ListPersonalSkillOwnershipGrantsResponse, type ListPersonalSkillOwnershipGrantsResponses, type ListPersonalSkillRegistriesData, type ListPersonalSkillRegistriesResponse, type ListPersonalSkillRegistriesResponses, type ListPersonalSkillsData, type ListPersonalSkillsResponse, type ListPersonalSkillsResponses, type ListPersonalSkillVisibilityGrantsData, type ListPersonalSkillVisibilityGrantsResponse, type ListPersonalSkillVisibilityGrantsResponses, type ListPersonalToolGroupInstancesData, type ListPersonalToolGroupInstancesError, type ListPersonalToolGroupInstancesErrors, type ListPersonalToolGroupInstancesResponse, type ListPersonalToolGroupInstancesResponses, type ListPersonalUcOwnershipGrantsData, type ListPersonalUcOwnershipGrantsResponse, type ListPersonalUcOwnershipGrantsResponses, type ListPersonalUcVisibilityGrantsData, type ListPersonalUcVisibilityGrantsResponse, type ListPersonalUcVisibilityGrantsResponses, type ListPersonalWikiOwnershipGrantsData, type ListPersonalWikiOwnershipGrantsResponse, type ListPersonalWikiOwnershipGrantsResponses, type ListPersonalWikiPagesData, type ListPersonalWikiPagesResponse, type ListPersonalWikiPagesResponses, type ListPersonalWikisData, type ListPersonalWikisResponse, type ListPersonalWikisResponses, type ListPersonalWikiVisibilityGrantsData, type ListPersonalWikiVisibilityGrantsResponse, type ListPersonalWikiVisibilityGrantsResponses, type ListProviderProvisionerCatalogData, type ListProviderProvisionerCatalogResponse, type ListProviderProvisionerCatalogResponses, type ListProviderSetupCatalogResponse, type ListProxiedMcpServersData, type ListProxiedMcpServersError, type ListProxiedMcpServersErrors, type ListProxiedMcpServersResponse, type ListProxiedMcpServersResponses, type ListProxiedSkillProvidersData, type ListProxiedSkillProvidersResponse, type ListProxiedSkillProvidersResponse2, type ListProxiedSkillProvidersResponses, type ListPublicAvailableToolGroupsData, type ListPublicAvailableToolGroupsError, type ListPublicAvailableToolGroupsErrors, type ListPublicAvailableToolGroupsResponse, type ListPublicAvailableToolGroupsResponses, type ListResourceServerCredentialsData, type ListResourceServerCredentialsResponse, type ListResourceServerCredentialsResponses, type ListReverseProxyProvidersResponse, type ListRscOwnershipGrantsData, type ListRscOwnershipGrantsResponse, type ListRscOwnershipGrantsResponses, type ListRscVisibilityGrantsData, type ListRscVisibilityGrantsResponse, type ListRscVisibilityGrantsResponses, type ListSessionInboxInstancesData, type ListSessionInboxInstancesError, type ListSessionInboxInstancesErrors, type ListSessionInboxInstancesResponse, type ListSessionInboxInstancesResponses, type ListSessionResourceGrantsData, type ListSessionResourceGrantsError, type ListSessionResourceGrantsErrors, type ListSessionResourceGrantsResponse, type ListSessionResourceGrantsResponses, type ListSessionsData, type ListSessionsError, type ListSessionsErrors, type ListSessionsResponse, type ListSessionsResponses, type ListSessionUserMembersData, type ListSessionUserMembersError, type ListSessionUserMembersErrors, type ListSessionUserMembersResponse, type ListSessionUserMembersResponses, type ListSignalProviderGrantsData, type ListSignalProviderGrantsResponse, type ListSignalProviderGrantsResponses, type ListSkillOwnershipGrantsData, type ListSkillOwnershipGrantsResponse, type ListSkillOwnershipGrantsResponses, type ListSkillRegistriesData, type ListSkillRegistriesError, type ListSkillRegistriesErrors, type ListSkillRegistriesResponse, type ListSkillRegistriesResponses, type ListSkillRegistryOwnershipGrantsData, type ListSkillRegistryOwnershipGrantsResponse, type ListSkillRegistryOwnershipGrantsResponses, type ListSkillRegistrySkillSummariesData, type ListSkillRegistrySkillSummariesError, type ListSkillRegistrySkillSummariesErrors, type ListSkillRegistrySkillSummariesResponse, type ListSkillRegistrySkillSummariesResponses, type ListSkillRegistryVisibilityGrantsData, type ListSkillRegistryVisibilityGrantsResponse, type ListSkillRegistryVisibilityGrantsResponses, type ListSkillsData, type ListSkillsError, type ListSkillsErrors, type ListSkillsResponse, type ListSkillsResponses, type ListSkillVisibilityGrantsData, type ListSkillVisibilityGrantsResponse, type ListSkillVisibilityGrantsResponses, type ListTeamGroupMembersData, type ListTeamGroupMembersResponse, type ListTeamGroupMembersResponses, type ListTeamGroupsData, type ListTeamGroupsResponse, type ListTeamGroupsResponses, type ListTeamInvitationsData, type ListTeamInvitationsResponse, type ListTeamInvitationsResponses, type ListTeamMembersData, type ListTeamMembersError, type ListTeamMembersErrors, type ListTeamMembersResponse, type ListTeamMembersResponses, type ListTeamsData, type ListTeamsError, type ListTeamsErrors, type ListTeamsResponse, type ListTeamsResponses, type ListToolDeploymentsByAliasData, type ListToolDeploymentsByAliasError, type ListToolDeploymentsByAliasErrors, type ListToolDeploymentsByAliasResponse, type ListToolDeploymentsByAliasResponses, type ListToolGroupInstancesData, type ListToolGroupInstancesError, type ListToolGroupInstancesErrors, type ListToolGroupInstancesGroupedByToolData, type ListToolGroupInstancesGroupedByToolError, type ListToolGroupInstancesGroupedByToolErrors, type ListToolGroupInstancesGroupedByToolResponse, type ListToolGroupInstancesGroupedByToolResponses, type ListToolGroupInstancesResponse, type ListToolGroupInstancesResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTrustedRuntimesData, type ListTrustedRuntimesError, type ListTrustedRuntimesErrors, type ListTrustedRuntimesResponse, type ListTrustedRuntimesResponses, type ListUcOwnershipGrantsData, type ListUcOwnershipGrantsResponse, type ListUcOwnershipGrantsResponses, type ListUcVisibilityGrantsData, type ListUcVisibilityGrantsResponse, type ListUcVisibilityGrantsResponses, type ListUserCredentialsData, type ListUserCredentialsResponse, type ListUserCredentialsResponses, type ListWikiAssetsData, type ListWikiAssetsResponse, type ListWikiAssetsResponses, type ListWikiOntologyInstallationsData, type ListWikiOntologyInstallationsResponse, type ListWikiOntologyInstallationsResponses, type ListWikiOntologyTemplatesData, type ListWikiOntologyTemplatesResponse, type ListWikiOntologyTemplatesResponses, type ListWikiOwnershipGrantsData, type ListWikiOwnershipGrantsResponse, type ListWikiOwnershipGrantsResponses, type ListWikiPageAssetsData, type ListWikiPageAssetsResponse, type ListWikiPageAssetsResponses, type ListWikiPageRelationshipsData, type ListWikiPageRelationshipsResponse, type ListWikiPageRelationshipsResponses, type ListWikiPageRevisionsData, type ListWikiPageRevisionsResponse, type ListWikiPageRevisionsResponses, type ListWikiPagesData, type ListWikiPagesResponse, type ListWikiPagesResponses, type ListWikiPageTypesData, type ListWikiPageTypesResponse, type ListWikiPageTypesResponses, type ListWikiPageTypeVersionsData, type ListWikiPageTypeVersionsResponse, type ListWikiPageTypeVersionsResponses, type ListWikiRelationshipTypesData, type ListWikiRelationshipTypesResponse, type ListWikiRelationshipTypesResponses, type ListWikiRelationshipTypeVersionsData, type ListWikiRelationshipTypeVersionsResponse, type ListWikiRelationshipTypeVersionsResponses, type ListWikisData, type ListWikisResponse, type ListWikisResponses, type ListWikiVisibilityGrantsData, type ListWikiVisibilityGrantsResponse, type ListWikiVisibilityGrantsResponses, type LocalRuntimeTunnelApiKey, type LocalRuntimeTunnelConnector, type LoginProviderResolution, type ManagedSkillSelection, type ManagedUserCredentialSecretResponse, type ManagedUserCredentialSummary, type ManagedUserCredentialSummaryPaginatedResponse, type ManagedUserCredentialSummaryValue, type McpPlaygroundAiSdkChatMessage, type McpPlaygroundAiSdkChatMessagePart, type McpPlaygroundAiSdkChatRequest, type McpProtocolDeleteData, type McpProtocolDeleteError, type McpProtocolDeleteErrors, type McpProtocolDeleteResponses, type McpProtocolGetData, type McpProtocolGetError, type McpProtocolGetErrors, type McpProtocolGetResponses, type McpProtocolPostData, type McpProtocolPostError, type McpProtocolPostErrors, type McpProtocolPostResponses, McpProviderCatalogConnectionMethod, type McpProviderCatalogEntry, type McpProviderCatalogTool, type McpServerInstanceSerializedWithFunctions, type McpServerInstanceSerializedWithFunctionsPaginatedResponse, type McpServerInstanceToolSerialized, type McpServerPlaygroundChatData, type McpServerPlaygroundChatError, type McpServerPlaygroundChatErrors, type McpServerPlaygroundChatResponses, type McpServerSpec, type MemoryActorContext, type MemoryBank, type MemoryBankBillingContext, type MemoryBankConfig, type MemoryBankCreationReservation, type MemoryBankDocumentList, type MemoryBankHealth, type MemoryBankPaginatedResponse, type MemoryBankSpec, MemoryBankStatus, type MemoryBankTemplate, type MemoryDocument, type MemoryOperationResponse, MemoryProvider, type MemorySourceBinding, MemorySourceKind, type MemorySpec, type Message, MessageFormat, type MessageFormatConfig, type MessagePaginatedResponse, MessageRole, type Metadata, type MigrateWikiPageBody, type MigrateWikiPageTypeData, type MigrateWikiPageTypeErrors, type MigrateWikiPageTypeResponse, type MigrateWikiPageTypeResponses, type MoveWikiPageBody, type MoveWikiPageData, type MoveWikiPageErrors, type MoveWikiPageResponse, type MoveWikiPageResponses, type ObserveSessionData, type ObserveSessionError, type ObserveSessionErrors, type ObserveSessionResponses, type OntologyPageTypeDefinition, type OntologyRelationshipTypeDefinition, type OpenBotAgentSkillInput, type OpenBotDeployment, type OpenBotPluginsCatalogResponse, type Organization, type OrganizationMemberWithUser, type OrganizationMemberWithUserPaginatedResponse, type OrgOidcProvider, type OrgOidcProviderPaginatedResponse, OrgOidcProviderStatus, type PageRelationshipView, type PageTypeMigrationIssue, type PageTypeMigrationPreview, type PageTypeValidationResult, PartState, type PersonalMcpProtocolDeleteData, type PersonalMcpProtocolDeleteResponses, type PersonalMcpProtocolGetData, type PersonalMcpProtocolGetResponses, type PersonalMcpProtocolPostData, type PersonalMcpProtocolPostResponses, type PersonalMcpServerInstanceSerialized, type PersonalSkill, type PersonalSkillRegistry, type PersonalToolGroupInstanceSerialized, type PlanStateRequest, type PreviewWikiPageTypeMigrationData, type PreviewWikiPageTypeMigrationErrors, type PreviewWikiPageTypeMigrationResponse, type PreviewWikiPageTypeMigrationResponses, type ProductBillingContext, ProductSubscriptionStatus, type ProviderAppProvisioningResponse, type ProviderAuthAccountNameDisplay, type ProviderAuthAdapterApiKey, type ProviderAuthAdapterConfig, type ProviderAuthAdapterCustom, type ProviderAuthAdapterCustomJsonSchema, type ProviderAuthAdapterNoAuth, type ProviderAuthAdapterOauthApp, type ProviderAuthAdapterOauthJwtBearer, type ProviderAuthAdapterServerTokenExchange, type ProviderAuthAdapterTildeManagedOauth, type ProviderAuthFieldDisplay, type ProviderProvisionerConfigField, type ProviderProvisionerCredentialRequirement, type ProviderProvisionerForm, type ProviderProvisionerInstructions, ProviderProvisionerSetupKind, type ProviderProvisioningCallbackData, type ProviderProvisioningCallbackResponse, type ProviderProvisioningCallbackResponses, type ProviderProvisioningHumanAction, type ProviderProvisioningInput, type ProviderProvisioningNextAction, type ProviderSetupAuthMethod, type ProviderSetupCatalogData, type ProviderSetupCatalogResponse, type ProviderSetupCatalogResponses, type ProviderSetupDescriptor, type ProviderSetupField, type ProviderSetupNextAction, type ProviderSetupOption, type ProviderSetupResponse, type ProviderSetupResumeData, type ProviderSetupResumeResponse, type ProviderSetupResumeResponses, type ProviderSetupStartData, type ProviderSetupStartResponse, type ProviderSetupStartResponses, type ProvisionAgentRequest, type ProvisionedProviderApp, type ProvisionedResource, ProvisionerCredentialKind, ProxiedMcpApiKeyLocation, ProxiedMcpAuthMode, type ProxiedMcpServerDetails, type ProxiedMcpServerListItem, type ProxiedMcpServerListItemPaginatedResponse, type ProxiedMcpServerSerialized, type ProxiedSkill, type ProxiedSkillProvider, type ProxyCredentialTemplate, type PutRoutineBody, type ReasoningUiPart, type RecallMemoryBody, type RecallMemoryData, type RecallMemoryResponse, type RecallMemoryResponses, type RecallPersonalMemoryData, type RecallPersonalMemoryResponse, type RecallPersonalMemoryResponses, type ReconcileOpenBotAgentBundleBody, type ReconcileOpenbotAgentBundleData, type ReconcileOpenbotAgentBundleResponse, type ReconcileOpenBotAgentBundleResponse, type ReconcileOpenbotAgentBundleResponses, type RedirectTemporaryAccountClaimPageData, type ReflectMemoryBody, type ReflectMemoryData, type ReflectMemoryResponse, type ReflectMemoryResponses, type ReflectPersonalMemoryData, type ReflectPersonalMemoryResponse, type ReflectPersonalMemoryResponses, type RefreshCustomToolProviderData, type RefreshCustomToolProviderResponse, type RefreshCustomToolProviderResponse2, type RefreshCustomToolProviderResponses, type RefreshProxiedMcpServerData, type RefreshProxiedMcpServerError, type RefreshProxiedMcpServerErrors, type RefreshProxiedMcpServerResponse, type RefreshProxiedMcpServerResponses, type RefreshTokenRequest, type RegisterAgentTool, type RegisterAgentToolsRequestInner, type RegisterChatKitChatProviderRequestInner, type RegisterChatKitChatProviderResponse, type RegisterHttpVercelAiSdkAgentRequestInner, type RegisterHttpVercelAiSdkAgentResponse, type RegisterInboxInstanceRequest, type RegisterOauthClientData, type RegisterOauthClientError, type RegisterOauthClientErrors, type RegisterOAuthClientRequest, type RegisterOauthClientResponse, type RegisterOAuthClientResponse, type RegisterOauthClientResponses, type RegisterOpenbotDeploymentData, type RegisterOpenbotDeploymentError, type RegisterOpenbotDeploymentErrors, type RegisterOpenBotDeploymentRequest, type RegisterOpenbotDeploymentResponse, type RegisterOpenbotDeploymentResponses, type RegisterTeamOauthClientData, type RegisterTeamOauthClientError, type RegisterTeamOauthClientErrors, type RegisterTeamOauthClientResponse, type RegisterTeamOauthClientResponses, type RegisterVercelUiChatProviderRequestInner, RelationshipDirectionality, type RemoveChatKitParticipantResponse, type RemoveCommonProviderInstallationOwnershipGrantData, type RemoveCommonProviderInstallationOwnershipGrantResponses, type RemoveCommonProviderInstallationVisibilityGrantData, type RemoveCommonProviderInstallationVisibilityGrantResponses, type RemoveMcpResourceOwnershipGrantData, type RemoveMcpResourceOwnershipGrantResponses, type RemoveMcpResourceVisibilityGrantData, type RemoveMcpResourceVisibilityGrantResponses, type RemoveMcpServerInstanceFunctionData, type RemoveMcpServerInstanceFunctionError, type RemoveMcpServerInstanceFunctionErrors, type RemoveMcpServerInstanceFunctionResponse, type RemoveMcpServerInstanceFunctionResponses, type RemoveMemoryBankOwnershipGrantData, type RemoveMemoryBankOwnershipGrantResponses, type RemoveMemoryBankVisibilityGrantData, type RemoveMemoryBankVisibilityGrantResponses, type RemoveOrganizationMemberData, type RemoveOrganizationMemberError, type RemoveOrganizationMemberErrors, type RemoveOrganizationMemberResponses, type RemovePersonalMemoryBankOwnershipGrantData, type RemovePersonalMemoryBankOwnershipGrantResponses, type RemovePersonalMemoryBankVisibilityGrantData, type RemovePersonalMemoryBankVisibilityGrantResponses, type RemovePersonalRegistryOwnershipGrantData, type RemovePersonalRegistryOwnershipGrantResponses, type RemovePersonalRegistryVisibilityGrantData, type RemovePersonalRegistryVisibilityGrantResponses, type RemovePersonalRscOwnershipGrantData, type RemovePersonalRscOwnershipGrantResponses, type RemovePersonalRscVisibilityGrantData, type RemovePersonalRscVisibilityGrantResponses, type RemovePersonalSkillOwnershipGrantData, type RemovePersonalSkillOwnershipGrantResponses, type RemovePersonalSkillVisibilityGrantData, type RemovePersonalSkillVisibilityGrantResponses, type RemovePersonalUcOwnershipGrantData, type RemovePersonalUcOwnershipGrantResponses, type RemovePersonalUcVisibilityGrantData, type RemovePersonalUcVisibilityGrantResponses, type RemovePersonalWikiOwnershipGrantData, type RemovePersonalWikiOwnershipGrantResponses, type RemovePersonalWikiVisibilityGrantData, type RemovePersonalWikiVisibilityGrantResponses, type RemoveRscOwnershipGrantData, type RemoveRscOwnershipGrantResponses, type RemoveRscVisibilityGrantData, type RemoveRscVisibilityGrantResponses, type RemoveSessionResourceGrantData, type RemoveSessionResourceGrantError, type RemoveSessionResourceGrantErrors, type RemoveSessionResourceGrantResponse, type RemoveSessionResourceGrantResponses, type RemoveSessionUserMemberData, type RemoveSessionUserMemberError, type RemoveSessionUserMemberErrors, type RemoveSessionUserMemberResponse, type RemoveSessionUserMemberResponse2, type RemoveSessionUserMemberResponses, type RemoveSignalProviderGrantData, type RemoveSignalProviderGrantResponses, type RemoveSkillOwnershipGrantData, type RemoveSkillOwnershipGrantResponses, type RemoveSkillRegistryOwnershipGrantData, type RemoveSkillRegistryOwnershipGrantResponses, type RemoveSkillRegistryVisibilityGrantData, type RemoveSkillRegistryVisibilityGrantResponses, type RemoveSkillVisibilityGrantData, type RemoveSkillVisibilityGrantResponses, type RemoveTeamGroupMemberData, type RemoveTeamGroupMemberResponses, type RemoveTeamMemberData, type RemoveTeamMemberError, type RemoveTeamMemberErrors, type RemoveTeamMemberResponses, type RemoveUcOwnershipGrantData, type RemoveUcOwnershipGrantResponses, type RemoveUcVisibilityGrantData, type RemoveUcVisibilityGrantResponses, type RemoveWikiOwnershipGrantData, type RemoveWikiOwnershipGrantResponses, type RemoveWikiVisibilityGrantData, type RemoveWikiVisibilityGrantResponses, type RenameChatKitWorkspaceThreadRequestInner, type ReorderChatKitAgentTurnQueueItemRequestInner, type ReplaceMemoryBankBindingsBody, type ReplaceMemorySourceBindingsData, type ReplaceMemorySourceBindingsResponse, type ReplaceMemorySourceBindingsResponses, type ReportToolExecutionRequestInner, type ResetMemoryBankConfigData, type ResetMemoryBankConfigResponse, type ResetMemoryBankConfigResponses, type ResetPersonalMemoryBankConfigData, type ResetPersonalMemoryBankConfigResponse, type ResetPersonalMemoryBankConfigResponses, type ResolveLoginProviderResponse, type ResolveStateSourceRequest, type ResolveStateSourceResponse, ResourceAccessMode, ResourceAction, type ResourceApplyOutput, type ResourceAuthorization, type ResourceAuthorizationModes, type ResourceGrant, ResourceGrantPlane, type ResourceGrantRequest, type ResourceOwnership, type ResourcePlanItem, ResourcePrincipalType, type ResourceServerCredentialSerialized, type ResourceServerCredentialSerializedPaginatedResponse, type ResumeCredentialSetupItemBody, type ResumeCredentialSetupItemData, type ResumeCredentialSetupItemResponse, type ResumeCredentialSetupItemResponses, type ResumeProviderAppProvisioningBody, type ResumeProviderAppProvisioningData, type ResumeProviderAppProvisioningResponse, type ResumeProviderAppProvisioningResponses, type ResumeProviderSetupBody, type ResumeUserCredentialBrokeringData, type ResumeUserCredentialBrokeringParams, type ResumeUserCredentialBrokeringResponse, type ResumeUserCredentialBrokeringResponses, type RetainMemoryBody, type RetainMemoryDocumentData, type RetainMemoryDocumentResponse, type RetainMemoryDocumentResponses, type RetainPersonalMemoryDocumentData, type RetainPersonalMemoryDocumentResponse, type RetainPersonalMemoryDocumentResponses, type RetryMemorySourceBody, type RetryMemorySourceSyncData, type RetryMemorySourceSyncResponse, type RetryMemorySourceSyncResponses, type RetryWikiData, type RetryWikiResponse, type RetryWikiResponses, type ReturnAddress, type ReturnAddressUrl, type ReverseProxyAddProfileOwnershipGrantData, type ReverseProxyAddProfileOwnershipGrantResponse, type ReverseProxyAddProfileOwnershipGrantResponses, type ReverseProxyAddProfileVisibilityGrantData, type ReverseProxyAddProfileVisibilityGrantResponse, type ReverseProxyAddProfileVisibilityGrantResponses, type ReverseProxyCreateProfileData, type ReverseProxyCreateProfileError, type ReverseProxyCreateProfileErrors, type ReverseProxyCreateProfileResponse, type ReverseProxyCreateProfileResponses, type ReverseProxyDeleteProfileData, type ReverseProxyDeleteProfileError, type ReverseProxyDeleteProfileErrors, type ReverseProxyDeleteProfileResponses, type ReverseProxyGetProfileData, type ReverseProxyGetProfileError, type ReverseProxyGetProfileErrors, type ReverseProxyGetProfileResponse, type ReverseProxyGetProfileResponses, type ReverseProxyListProfileOwnershipGrantsData, type ReverseProxyListProfileOwnershipGrantsResponse, type ReverseProxyListProfileOwnershipGrantsResponses, type ReverseProxyListProfilesData, type ReverseProxyListProfilesError, type ReverseProxyListProfilesErrors, type ReverseProxyListProfilesResponse, type ReverseProxyListProfilesResponses, type ReverseProxyListProfileVisibilityGrantsData, type ReverseProxyListProfileVisibilityGrantsResponse, type ReverseProxyListProfileVisibilityGrantsResponses, type ReverseProxyListProvidersData, type ReverseProxyListProvidersResponse, type ReverseProxyListProvidersResponses, type ReverseProxyProfile, type ReverseProxyProfilePaginatedResponse, type ReverseProxyProviderInfo, type ReverseProxyProxyGetData, type ReverseProxyProxyGetResponses, type ReverseProxyProxyPostData, type ReverseProxyProxyPostResponses, type ReverseProxyRemoveProfileOwnershipGrantData, type ReverseProxyRemoveProfileOwnershipGrantResponses, type ReverseProxyRemoveProfileVisibilityGrantData, type ReverseProxyRemoveProfileVisibilityGrantResponses, type ReverseProxySetProfileOwnershipData, type ReverseProxySetProfileOwnershipResponse, type ReverseProxySetProfileOwnershipResponses, type ReverseProxySetProfileVisibilityData, type ReverseProxySetProfileVisibilityResponse, type ReverseProxySetProfileVisibilityResponses, type ReverseProxyUpdateProfileData, type ReverseProxyUpdateProfileError, type ReverseProxyUpdateProfileErrors, type ReverseProxyUpdateProfileResponse, type ReverseProxyUpdateProfileResponses, type RevokeLocalRuntimeTunnelApiKeyData, type RevokeLocalRuntimeTunnelApiKeyError, type RevokeLocalRuntimeTunnelApiKeyErrors, type RevokeLocalRuntimeTunnelApiKeyResponse, type RevokeLocalRuntimeTunnelApiKeyResponses, type RevokeTeamInvitationData, type RevokeTeamInvitationResponses, type RotateCustomToolProviderSigningKeyData, type RotateCustomToolProviderSigningKeyResponse, type RotateCustomToolProviderSigningKeyResponse2, type RotateCustomToolProviderSigningKeyResponses, type RouteAuthCallbackData, type RouteAuthCallbackError, type RouteAuthCallbackErrors, type RouteCreateApiKeyData, type RouteCreateApiKeyError, type RouteCreateApiKeyErrors, type RouteCreateApiKeyResponse, type RouteCreateApiKeyResponses, type RouteDeleteApiKeyData, type RouteDeleteApiKeyError, type RouteDeleteApiKeyErrors, type RouteDeleteApiKeyResponse, type RouteDeleteApiKeyResponses, type RouteGetJwksData, type RouteGetJwksError, type RouteGetJwksErrors, type RouteGetJwksResponse, type RouteGetJwksResponses, type RouteListApiKeysData, type RouteListApiKeysError, type RouteListApiKeysErrors, type RouteListApiKeysResponse, type RouteListApiKeysResponses, type RouteListDebugAuthProfilesData, type RouteListDebugAuthProfilesError, type RouteListDebugAuthProfilesErrors, type RouteListDebugAuthProfilesResponse, type RouteListDebugAuthProfilesResponses, type RouteLogoutData, type RouteRefreshTokenData, type RouteRefreshTokenError, type RouteRefreshTokenErrors, type RouteRefreshTokenResponse, type RouteRefreshTokenResponses, type RouteResolveLoginProviderData, type RouteResolveLoginProviderError, type RouteResolveLoginProviderErrors, type RouteResolveLoginProviderResponse, type RouteResolveLoginProviderResponses, type RouteSelectDebugAuthProfileData, type RouteSelectDebugAuthProfileError, type RouteSelectDebugAuthProfileErrors, type RouteSelectDebugAuthProfileResponse, type RouteSelectDebugAuthProfileResponses, type RouteStartAuthorizationData, type RouteStartAuthorizationError, type RouteStartAuthorizationErrors, type Routine, RoutineEventInstructionPolicy, type RoutineExecution, type RoutineExecutionPaginatedResponse, type RoutinePaginatedResponse, type RoutineTrigger, type RoutineTriggerInput, type RoutineTriggerSpec, type RunRoutineBody, type RunRoutineResponse, type RuntimeConfig, type SearchSkillRegistryData, type SearchSkillRegistryError, type SearchSkillRegistryErrors, type SearchSkillRegistryResponse, type SearchSkillRegistryResponses, type SelectDebugAuthProfileRequest, type SelfProfileAvatarResponse, type SelfProfileResponse, type SelfProfileUser, type SendChatKitWorkspaceMessageRequestInner, type SendSessionMessageBody, type SendSessionMessageInput, type SendSessionMessageResponse, type Session, type SessionPaginatedResponse, type SessionUserMembership, SessionUserRole, type SetChatKitResourceStatusRequest, type SetCommonProviderInstallationOwnershipData, type SetCommonProviderInstallationOwnershipResponse, type SetCommonProviderInstallationOwnershipResponses, type SetCommonProviderInstallationVisibilityData, type SetCommonProviderInstallationVisibilityResponse, type SetCommonProviderInstallationVisibilityResponses, type SetMcpResourceOwnershipData, type SetMcpResourceOwnershipResponse, type SetMcpResourceOwnershipResponses, type SetMcpResourceVisibilityData, type SetMcpResourceVisibilityResponse, type SetMcpResourceVisibilityResponses, type SetMemoryBankOwnershipModeData, type SetMemoryBankOwnershipModeResponse, type SetMemoryBankOwnershipModeResponses, type SetMemoryBankVisibilityData, type SetMemoryBankVisibilityResponse, type SetMemoryBankVisibilityResponses, type SetOpenBotAvatarRequest, type SetPersonalMemoryBankOwnershipModeData, type SetPersonalMemoryBankOwnershipModeResponse, type SetPersonalMemoryBankOwnershipModeResponses, type SetPersonalMemoryBankVisibilityData, type SetPersonalMemoryBankVisibilityResponse, type SetPersonalMemoryBankVisibilityResponses, type SetPersonalRegistryOwnershipModeData, type SetPersonalRegistryOwnershipModeResponse, type SetPersonalRegistryOwnershipModeResponses, type SetPersonalRegistryVisibilityData, type SetPersonalRegistryVisibilityResponse, type SetPersonalRegistryVisibilityResponses, type SetPersonalRscOwnershipData, type SetPersonalRscOwnershipResponse, type SetPersonalRscOwnershipResponses, type SetPersonalRscVisibilityData, type SetPersonalRscVisibilityResponse, type SetPersonalRscVisibilityResponses, type SetPersonalSkillOwnershipModeData, type SetPersonalSkillOwnershipModeResponse, type SetPersonalSkillOwnershipModeResponses, type SetPersonalSkillVisibilityData, type SetPersonalSkillVisibilityResponse, type SetPersonalSkillVisibilityResponses, type SetPersonalUcOwnershipData, type SetPersonalUcOwnershipResponse, type SetPersonalUcOwnershipResponses, type SetPersonalUcVisibilityData, type SetPersonalUcVisibilityResponse, type SetPersonalUcVisibilityResponses, type SetPersonalWikiOwnershipModeData, type SetPersonalWikiOwnershipModeResponse, type SetPersonalWikiOwnershipModeResponses, type SetPersonalWikiVisibilityData, type SetPersonalWikiVisibilityResponse, type SetPersonalWikiVisibilityResponses, type SetResourceAccessModeRequest, type SetRscOwnershipData, type SetRscOwnershipResponse, type SetRscOwnershipResponses, type SetRscVisibilityData, type SetRscVisibilityResponse, type SetRscVisibilityResponses, type SetSelfOpenbotAvatarData, type SetSelfOpenbotAvatarError, type SetSelfOpenbotAvatarErrors, type SetSelfOpenbotAvatarResponse, type SetSelfOpenbotAvatarResponses, type SetSignalProviderOwnershipData, type SetSignalProviderOwnershipResponse, type SetSignalProviderOwnershipResponses, type SetSignalProviderVisibilityData, type SetSignalProviderVisibilityResponse, type SetSignalProviderVisibilityResponses, type SetSkillOwnershipModeData, type SetSkillOwnershipModeResponse, type SetSkillOwnershipModeResponses, type SetSkillRegistryOwnershipModeData, type SetSkillRegistryOwnershipModeResponse, type SetSkillRegistryOwnershipModeResponses, type SetSkillRegistryVisibilityData, type SetSkillRegistryVisibilityResponse, type SetSkillRegistryVisibilityResponses, type SetSkillVisibilityData, type SetSkillVisibilityResponse, type SetSkillVisibilityResponses, type SetUcOwnershipData, type SetUcOwnershipResponse, type SetUcOwnershipResponses, type SetUcVisibilityData, type SetUcVisibilityResponse, type SetUcVisibilityResponses, type SetWikiOwnershipModeData, type SetWikiOwnershipModeResponse, type SetWikiOwnershipModeResponses, type SetWikiVisibilityData, type SetWikiVisibilityResponse, type SetWikiVisibilityResponses, type SignalAction, type SignalDelivery, type SignalDeliveryPaginatedResponse, SignalDeliveryStatus, SignalIngressMode, type SignalInterpolationVariable, type SignalMessage, type SignalPollingDescriptor, SignalProviderAuthMethod, type SignalProviderInstance, type SignalProviderInstancePaginatedResponse, SignalProviderInstanceStatus, type SignalProviderRouteDescriptor, type SignalProviderSourceSerialized, type SignalProviderSourceSerializedPaginatedResponse, type SignalRuleFilter, type SignalsAddPersonalProviderGrantData, type SignalsAddPersonalProviderGrantResponse, type SignalsAddPersonalProviderGrantResponses, type SignalsCreatePersonalProviderInstanceData, type SignalsCreatePersonalProviderInstanceResponse, type SignalsCreatePersonalProviderInstanceResponses, type SignalsCreateProviderInstanceData, type SignalsCreateProviderInstanceResponse, type SignalsCreateProviderInstanceResponses, type SignalsDeletePersonalProviderInstanceData, type SignalsDeletePersonalProviderInstanceResponse, type SignalsDeletePersonalProviderInstanceResponses, type SignalsDeleteProviderInstanceData, type SignalsDeleteProviderInstanceResponse, type SignalsDeleteProviderInstanceResponses, type SignalSessionPolicy, type SignalsGetDeliveryData, type SignalsGetDeliveryResponse, type SignalsGetDeliveryResponses, type SignalsGetPersonalDeliveryData, type SignalsGetPersonalDeliveryResponse, type SignalsGetPersonalDeliveryResponses, type SignalsGetPersonalProviderInstanceData, type SignalsGetPersonalProviderInstanceResponse, type SignalsGetPersonalProviderInstanceResponses, type SignalsGetProviderInstanceData, type SignalsGetProviderInstanceResponse, type SignalsGetProviderInstanceResponses, type SignalsListAvailableProvidersData, type SignalsListAvailableProvidersResponse, type SignalsListAvailableProvidersResponses, type SignalsListDeliveriesData, type SignalsListDeliveriesResponse, type SignalsListDeliveriesResponses, type SignalsListPersonalAvailableProvidersData, type SignalsListPersonalAvailableProvidersResponse, type SignalsListPersonalAvailableProvidersResponses, type SignalsListPersonalDeliveriesData, type SignalsListPersonalDeliveriesResponse, type SignalsListPersonalDeliveriesResponses, type SignalsListPersonalProviderGrantsData, type SignalsListPersonalProviderGrantsResponse, type SignalsListPersonalProviderGrantsResponses, type SignalsListPersonalProviderInstancesData, type SignalsListPersonalProviderInstancesResponse, type SignalsListPersonalProviderInstancesResponses, type SignalsListProviderInstancesData, type SignalsListProviderInstancesResponse, type SignalsListProviderInstancesResponses, type SignalsRemovePersonalProviderGrantData, type SignalsRemovePersonalProviderGrantResponses, type SignalsRetryDeliveryData, type SignalsRetryDeliveryResponse, type SignalsRetryDeliveryResponses, type SignalsRetryPersonalDeliveryData, type SignalsRetryPersonalDeliveryResponse, type SignalsRetryPersonalDeliveryResponses, type SignalsSetPersonalProviderOwnershipData, type SignalsSetPersonalProviderOwnershipResponse, type SignalsSetPersonalProviderOwnershipResponses, type SignalsSetPersonalProviderVisibilityData, type SignalsSetPersonalProviderVisibilityResponse, type SignalsSetPersonalProviderVisibilityResponses, type SignalsTriggerFakeData, type SignalsTriggerFakeResponse, type SignalsTriggerFakeResponses, type SignalsUpdatePersonalProviderInstanceData, type SignalsUpdatePersonalProviderInstanceResponse, type SignalsUpdatePersonalProviderInstanceResponses, type SignalsUpdateProviderInstanceData, type SignalsUpdateProviderInstanceResponse, type SignalsUpdateProviderInstanceResponses, type SignalTypeSourceSerialized, type SignalWebhookVerificationDescriptor, type Skill, type SkillDescriptionResponse, type SkillDiscoverySearchRequest, type SkillDiscoverySearchResponse, type SkillPackageFile, type SkillPackageFileDownload, type SkillPackageManifest, type SkillPaginatedResponse, type SkillRegistry, type SkillRegistryPaginatedResponse, type SkillRegistrySpec, type SkillSummary, type SkillSummaryPaginatedResponse, type SlackInstallationNextAction, type SourceDocumentUiPart, type SourceUrlUiPart, type StartBrokeringBodyExternal, type StartCredentialSetupItemBody, type StartCredentialSetupItemData, type StartCredentialSetupItemResponse, type StartCredentialSetupItemResponse2, type StartCredentialSetupItemResponses, type StartOAuthDeviceCodeBody, type StartOauthDeviceCodeData, type StartOauthDeviceCodeError, type StartOauthDeviceCodeErrors, type StartOauthDeviceCodeResponse, type StartOauthDeviceCodeResponses, type StartOAuthDeviceCodeResult, type StartProviderAppProvisioningBody, type StartProviderAppProvisioningData, type StartProviderAppProvisioningResponse, type StartProviderAppProvisioningResponses, type StartProviderSetupBody, type StartProxiedMcpServerOauthData, type StartProxiedMcpServerOauthError, type StartProxiedMcpServerOauthErrors, type StartProxiedMcpServerOauthRequestInner, type StartProxiedMcpServerOauthResponse, type StartProxiedMcpServerOauthResponse2, type StartProxiedMcpServerOauthResponses, type StartSlackOauthRequestInner, type StartUserCredentialBrokeringData, type StartUserCredentialBrokeringResponse, type StartUserCredentialBrokeringResponses, StateDocumentFormat, type StateExportData, type StateExportError, type StateExportErrors, type StateExportResponses, type StateGetImportData, type StateGetImportResponse, type StateGetImportResponses, type StateImportData, type StateImportEventsData, type StateImportEventsResponses, type StateImportOutputs, type StateImportResponse, type StateImportResponses, StateImportStatus, type StateMetadata, type StatePlan, type StatePlanData, type StatePlanResponse, type StatePlanResponses, type StateResolveSourceData, type StateResolveSourceError, type StateResolveSourceErrors, type StateResolveSourceResponse, type StateResolveSourceResponses, type StateSchema, type StateSchemaData, type StateSchemaJsonData, type StateSchemaJsonResponses, type StateSchemaResponse, type StateSchemaResponses, type StateSourceMetadata, type StateValidateData, type StateValidateResponse, type StateValidateResponses, type StateVariableDefinition, StateVariableType, type SteerChatKitAgentTurnQueueItemResponse, type StepStartUiPart, type StoredEvent, type StoredEventPaginatedResponse, type SubmitChatKitWorkspaceTurnRequestInner, type SubmitChatKitWorkspaceTurnResponse, type SupportedCredentialInfo, type Team, type TeamGroupSummary, type TeamGroupSummaryPaginatedResponse, type TeamMemberWithUser, type TeamMemberWithUserPaginatedResponse, type TeamPaginatedResponse, type TextMessage, type TextUiPart, type TokenResponse, type ToolConfig, type ToolConfigPaginatedResponse, type ToolDeploymentWithGroupSerialized, type ToolDeploymentWithGroupSerializedPaginatedResponse, type ToolExecution, ToolExecutionAuthority, ToolExecutionState, type ToolGroupInstanceListItem, type ToolGroupInstanceListItemPaginatedResponse, type ToolGroupInstanceSerialized, type ToolGroupInstanceSerializedWithCredentials, type ToolGroupInstanceSerializedWithEverything, type ToolGroupSourceSerialized, type ToolGroupSourceSerializedPaginatedResponse, type ToolInstanceListItem, type ToolInstanceSerialized, type ToolInstanceSerializedPaginatedResponse, ToolInvocationState, type ToolSourceSerialized, type ToolUiPart, type TraverseWikiGraphData, type TraverseWikiGraphResponse, type TraverseWikiGraphResponses, type TriggerFakeSignalRequest, type TrustedRuntime, TrustedRuntimeEncryptionAlgorithm, type TrustedRuntimePaginatedResponse, TrustedRuntimeSigningAlgorithm, TrustedRuntimeStatus, TrustedRuntimeType, type TupleUnit, type UiMessage, type UiMessagePart, type UnbindToolGroupFromMcpServerData, type UnbindToolGroupFromMcpServerError, type UnbindToolGroupFromMcpServerErrors, type UnbindToolGroupFromMcpServerResponse, type UnbindToolGroupFromMcpServerResponses, type UpdateAgentObservabilityPolicyRequestInner, type UpdateAgentToolVisibilityRequestInner, type UpdateChatKitChatProviderRequestInner, type UpdateChatKitSessionUserStateRequestInner, type UpdateCredentialBody, type UpdateCustomToolProviderData, type UpdateCustomToolProviderRequestInner, type UpdateCustomToolProviderResponse, type UpdateCustomToolProviderResponses, type UpdateHostedOpenbotComputerImageData, type UpdateHostedOpenbotComputerImageError, type UpdateHostedOpenbotComputerImageErrors, type UpdateHostedOpenBotComputerImageRequest, type UpdateHostedOpenbotComputerImageResponse, type UpdateHostedOpenbotComputerImageResponses, type UpdateHttpVercelAiSdkAgentRequestInner, type UpdateManagedUserCredentialBody, type UpdateManagedUserCredentialData, type UpdateManagedUserCredentialResponse, type UpdateManagedUserCredentialResponses, type UpdateMcpServerInstanceBody, type UpdateMcpServerInstanceData, type UpdateMcpServerInstanceError, type UpdateMcpServerInstanceErrors, type UpdateMcpServerInstanceFunctionData, type UpdateMcpServerInstanceFunctionError, type UpdateMcpServerInstanceFunctionErrors, type UpdateMcpServerInstanceFunctionResponse, type UpdateMcpServerInstanceFunctionResponses, type UpdateMcpServerInstanceRequestInner, type UpdateMcpServerInstanceResponse, type UpdateMcpServerInstanceResponses, type UpdateMcpServerInstanceToolBody, type UpdateMemberRoleBody, type UpdateMemoryBankBody, type UpdateMemoryBankConfigBody, type UpdateMemoryBankConfigData, type UpdateMemoryBankConfigResponse, type UpdateMemoryBankConfigResponses, type UpdateMemoryBankData, type UpdateMemoryBankResponse, type UpdateMemoryBankResponses, type UpdateOrganizationData, type UpdateOrganizationError, type UpdateOrganizationErrors, type UpdateOrganizationMemberRoleBody, type UpdateOrganizationMemberRoleData, type UpdateOrganizationMemberRoleError, type UpdateOrganizationMemberRoleErrors, type UpdateOrganizationMemberRoleResponse, type UpdateOrganizationMemberRoleResponses, type UpdateOrganizationRequest, type UpdateOrganizationResponses, type UpdateOrgOidcProviderData, type UpdateOrgOidcProviderError, type UpdateOrgOidcProviderErrors, type UpdateOrgOidcProviderRequest, type UpdateOrgOidcProviderResponse, type UpdateOrgOidcProviderResponses, type UpdatePageTypeBody, type UpdatePersonalMcpServerInstanceData, type UpdatePersonalMcpServerInstanceResponse, type UpdatePersonalMcpServerInstanceResponses, type UpdatePersonalMemoryBankConfigData, type UpdatePersonalMemoryBankConfigResponse, type UpdatePersonalMemoryBankConfigResponses, type UpdatePersonalMemoryBankData, type UpdatePersonalMemoryBankResponse, type UpdatePersonalMemoryBankResponses, type UpdatePersonalSkillData, type UpdatePersonalSkillRegistryData, type UpdatePersonalSkillRegistryResponse, type UpdatePersonalSkillRegistryResponses, type UpdatePersonalSkillResponse, type UpdatePersonalSkillResponses, type UpdatePersonalToolGroupInstanceData, type UpdatePersonalToolGroupInstanceResponse, type UpdatePersonalToolGroupInstanceResponses, type UpdatePersonalWikiData, type UpdatePersonalWikiPageData, type UpdatePersonalWikiPageResponse, type UpdatePersonalWikiPageResponses, type UpdatePersonalWikiResponse, type UpdatePersonalWikiResponses, type UpdateRelationshipTypeBody, type UpdateResourceServerCredentialData, type UpdateResourceServerCredentialResponse, type UpdateResourceServerCredentialResponses, type UpdateReverseProxyProfileInner, type UpdateSelfProfileData, type UpdateSelfProfileError, type UpdateSelfProfileErrors, type UpdateSelfProfileRequest, type UpdateSelfProfileResponse, type UpdateSelfProfileResponses, type UpdateSessionOwnershipData, type UpdateSessionOwnershipError, type UpdateSessionOwnershipErrors, type UpdateSessionOwnershipResponse, type UpdateSessionOwnershipResponses, type UpdateSessionVisibilityData, type UpdateSessionVisibilityError, type UpdateSessionVisibilityErrors, type UpdateSessionVisibilityResponse, type UpdateSessionVisibilityResponses, type UpdateSignalProviderInstanceRequestInner, type UpdateSkillBody, type UpdateSkillData, type UpdateSkillError, type UpdateSkillErrors, type UpdateSkillRegistryBody, type UpdateSkillRegistryData, type UpdateSkillRegistryError, type UpdateSkillRegistryErrors, type UpdateSkillRegistryResponse, type UpdateSkillRegistryResponses, type UpdateSkillResponse, type UpdateSkillResponses, type UpdateTeamData, type UpdateTeamError, type UpdateTeamErrors, type UpdateTeamGroupBody, type UpdateTeamGroupData, type UpdateTeamGroupError, type UpdateTeamGroupErrors, type UpdateTeamGroupResponse, type UpdateTeamGroupResponses, type UpdateTeamMemberRoleData, type UpdateTeamMemberRoleError, type UpdateTeamMemberRoleErrors, type UpdateTeamMemberRoleResponse, type UpdateTeamMemberRoleResponses, type UpdateTeamRequest, type UpdateTeamResponses, type UpdateToolBoundParamsData, type UpdateToolBoundParamsError, type UpdateToolBoundParamsErrors, type UpdateToolBoundParamsResponse, type UpdateToolBoundParamsResponses, type UpdateToolGroupInstanceData, type UpdateToolGroupInstanceError, type UpdateToolGroupInstanceErrors, type UpdateToolGroupInstanceParamsInner, type UpdateToolGroupInstanceResponse, type UpdateToolGroupInstanceResponses, type UpdateToolInstanceBoundParamsInner, type UpdateTrustedRuntimeBody, type UpdateTrustedRuntimeData, type UpdateTrustedRuntimeError, type UpdateTrustedRuntimeErrors, type UpdateTrustedRuntimeResponse, type UpdateTrustedRuntimeResponses, type UpdateUserCredentialData, type UpdateUserCredentialResponse, type UpdateUserCredentialResponses, type UpdateWikiAssetBody, type UpdateWikiAssetData, type UpdateWikiAssetResponse, type UpdateWikiAssetResponses, type UpdateWikiBody, type UpdateWikiData, type UpdateWikiPageData, type UpdateWikiPageErrors, type UpdateWikiPageRelationshipData, type UpdateWikiPageRelationshipResponse, type UpdateWikiPageRelationshipResponses, type UpdateWikiPageResponse, type UpdateWikiPageResponses, type UpdateWikiPageTypeData, type UpdateWikiPageTypeErrors, type UpdateWikiPageTypeResponse, type UpdateWikiPageTypeResponses, type UpdateWikiRelationshipTypeData, type UpdateWikiRelationshipTypeErrors, type UpdateWikiRelationshipTypeResponse, type UpdateWikiRelationshipTypeResponses, type UpdateWikiResponse, type UpdateWikiResponses, type UploadAttachmentContentData, type UploadAttachmentContentError, type UploadAttachmentContentErrors, type UploadAttachmentContentResponse, type UploadAttachmentContentResponses, type UploadHostedOpenbotReleaseFileData, type UploadHostedOpenbotReleaseFileError, type UploadHostedOpenbotReleaseFileErrors, type UploadHostedOpenbotReleaseFileResponse, type UploadHostedOpenbotReleaseFileResponses, type UploadSelfAvatarData, type UploadSelfAvatarError, type UploadSelfAvatarErrors, type UploadSelfAvatarResponse, type UploadSelfAvatarResponses, type UploadWikiAssetContentData, type UploadWikiAssetContentErrors, type UploadWikiAssetContentResponses, type UpsertPageRelationshipBody, type UpsertWikiPageBody, type UpsertWikiPageRelationshipData, type UpsertWikiPageRelationshipErrors, type UpsertWikiPageRelationshipResponse, type UpsertWikiPageRelationshipResponses, type User, type UserAvatar, type UserCredentialBrokeringResponse, type UserCredentialSerialized, type UserCredentialSerializedPaginatedResponse, type UserInvitation, type UserInvitationPaginatedResponse, type UserOrganization, type UserTeam, UserToolFederationMode, type UserToolFederationSelection, UserType, type ValidatePageTypeDataBody, type ValidateStateRequest, type ValidateStateResponse, type ValidateWikiPageTypeDataData, type ValidateWikiPageTypeDataResponse, type ValidateWikiPageTypeDataResponses, type Vec, type VerifyOrgOidcProviderDomainData, type VerifyOrgOidcProviderDomainError, type VerifyOrgOidcProviderDomainErrors, type VerifyOrgOidcProviderDomainResponse, type VerifyOrgOidcProviderDomainResponses, type WebhookSigningKeyMetadata, type WhoamiData, type WhoamiError, type WhoamiErrors, type WhoamiResponse, type WhoamiResponses, type Wiki, type WikiAsset, type WikiAssetDownloadResponse, type WikiAssetPaginatedResponse, type WikiAssetReferences, WikiAssetStatus, type WikiAssetUploadResponse, type WikiGraph, type WikiOntologyInstallation, type WikiOntologyTemplate, type WikiPage, type WikiPagePaginatedResponse, type WikiPageRelationship, type WikiPageRevision, type WikiPageRevisionPaginatedResponse, type WikiPageType, type WikiPageTypeVersion, type WikiPaginatedResponse, type WikiRelationshipEvidence, type WikiRelationshipType, type WikiRelationshipTypeVersion, type WikiSpec, WikiStatus, type WrappedChronoDateTime, type WrappedJsonValue, type WrappedUuidV4 } from './types.gen'; diff --git a/packages/api-client/src/generated/sdk.gen.ts b/packages/api-client/src/generated/sdk.gen.ts index ef44fb59..2ddf9bbb 100644 --- a/packages/api-client/src/generated/sdk.gen.ts +++ b/packages/api-client/src/generated/sdk.gen.ts @@ -2,7 +2,7 @@ import { type Client, type ClientMeta, type Options as Options2, type RequestResult, type TDataShape, urlSearchParamsBodySerializer } from './client'; import { client } from './client.gen'; -import type { AcceptInvitationData, AcceptInvitationErrors, AcceptInvitationResponses, AddChatkitRoutineGrantData, AddChatkitRoutineGrantResponses, AddCommonProviderInstallationOwnershipGrantData, AddCommonProviderInstallationOwnershipGrantResponses, AddCommonProviderInstallationVisibilityGrantData, AddCommonProviderInstallationVisibilityGrantResponses, AddMcpResourceOwnershipGrantData, AddMcpResourceOwnershipGrantResponses, AddMcpResourceVisibilityGrantData, AddMcpResourceVisibilityGrantResponses, AddMcpServerInstanceFunctionData, AddMcpServerInstanceFunctionErrors, AddMcpServerInstanceFunctionResponses, AddMemoryBankOwnershipGrantData, AddMemoryBankOwnershipGrantResponses, AddMemoryBankVisibilityGrantData, AddMemoryBankVisibilityGrantResponses, AddOrganizationMemberData, AddOrganizationMemberErrors, AddOrganizationMemberResponses, AddPersonalMemoryBankOwnershipGrantData, AddPersonalMemoryBankOwnershipGrantResponses, AddPersonalMemoryBankVisibilityGrantData, AddPersonalMemoryBankVisibilityGrantResponses, AddPersonalRegistryOwnershipGrantData, AddPersonalRegistryOwnershipGrantResponses, AddPersonalRegistryVisibilityGrantData, AddPersonalRegistryVisibilityGrantResponses, AddPersonalRscOwnershipGrantData, AddPersonalRscOwnershipGrantResponses, AddPersonalRscVisibilityGrantData, AddPersonalRscVisibilityGrantResponses, AddPersonalSkillOwnershipGrantData, AddPersonalSkillOwnershipGrantResponses, AddPersonalSkillVisibilityGrantData, AddPersonalSkillVisibilityGrantResponses, AddPersonalUcOwnershipGrantData, AddPersonalUcOwnershipGrantResponses, AddPersonalUcVisibilityGrantData, AddPersonalUcVisibilityGrantResponses, AddPersonalWikiOwnershipGrantData, AddPersonalWikiOwnershipGrantResponses, AddPersonalWikiVisibilityGrantData, AddPersonalWikiVisibilityGrantResponses, AddProviderSkillsToSkillRegistryData, AddProviderSkillsToSkillRegistryErrors, AddProviderSkillsToSkillRegistryResponses, AddRscOwnershipGrantData, AddRscOwnershipGrantResponses, AddRscVisibilityGrantData, AddRscVisibilityGrantResponses, AddSessionResourceGrantData, AddSessionResourceGrantErrors, AddSessionResourceGrantResponses, AddSessionUserMemberData, AddSessionUserMemberErrors, AddSessionUserMemberResponses, AddSignalProviderGrantData, AddSignalProviderGrantResponses, AddSignalRuleGrantData, AddSignalRuleGrantResponses, AddSkillOwnershipGrantData, AddSkillOwnershipGrantResponses, AddSkillRegistryOwnershipGrantData, AddSkillRegistryOwnershipGrantResponses, AddSkillRegistryVisibilityGrantData, AddSkillRegistryVisibilityGrantResponses, AddSkillVisibilityGrantData, AddSkillVisibilityGrantResponses, AddTeamGroupMemberData, AddTeamGroupMemberErrors, AddTeamGroupMemberResponses, AddTeamMemberData, AddTeamMemberErrors, AddTeamMemberResponses, AddUcOwnershipGrantData, AddUcOwnershipGrantResponses, AddUcVisibilityGrantData, AddUcVisibilityGrantResponses, AddWikiOwnershipGrantData, AddWikiOwnershipGrantResponses, AddWikiVisibilityGrantData, AddWikiVisibilityGrantResponses, ApplyWikiOntologyTemplateData, ApplyWikiOntologyTemplateResponses, AuthorizeOauthDeviceCodeData, AuthorizeOauthDeviceCodeErrors, AuthorizeOauthDeviceCodeResponses, AutomationsAddGrantData, AutomationsAddGrantResponses, AutomationsDeleteData, AutomationsDeleteResponses, AutomationsGetData, AutomationsGetErrors, AutomationsGetResponses, AutomationsListData, AutomationsListGrantsData, AutomationsListGrantsResponses, AutomationsListResponses, AutomationsPutData, AutomationsPutErrors, AutomationsPutResponses, AutomationsRemoveGrantData, AutomationsRemoveGrantResponses, AutomationsRunData, AutomationsRunResponses, AutomationsSetOwnershipData, AutomationsSetOwnershipResponses, AutomationsSetVisibilityData, AutomationsSetVisibilityResponses, AutoProvisionToolGroupInstanceData, AutoProvisionToolGroupInstanceErrors, AutoProvisionToolGroupInstanceResponses, AutumnWebhookHandlerData, AutumnWebhookHandlerErrors, AutumnWebhookHandlerResponses, BillingAutumnBridgePostData, BillingAutumnBridgePostErrors, BillingAutumnBridgePostResponses, BillingContextGetData, BillingContextGetErrors, BillingContextGetResponses, BillingMemoryBankReservationCommitData, BillingMemoryBankReservationCommitErrors, BillingMemoryBankReservationCommitResponses, BillingMemoryBankReservationCreateData, BillingMemoryBankReservationCreateErrors, BillingMemoryBankReservationCreateResponses, BillingMemoryBankReservationReleaseData, BillingMemoryBankReservationReleaseErrors, BillingMemoryBankReservationReleaseResponses, BillingProductEnrollCurrentHumanData, BillingProductEnrollCurrentHumanErrors, BillingProductEnrollCurrentHumanResponses, BillingRedirectData, BillingRedirectErrors, BillingWebhookStripeDeprecatedData, BillingWebhookStripeDeprecatedResponses, BindToolGroupToMcpServerData, BindToolGroupToMcpServerErrors, BindToolGroupToMcpServerResponses, BulkAddMcpServerInstanceFunctionsData, BulkAddMcpServerInstanceFunctionsErrors, BulkAddMcpServerInstanceFunctionsResponses, BulkRemoveMcpServerInstanceFunctionsData, BulkRemoveMcpServerInstanceFunctionsErrors, BulkRemoveMcpServerInstanceFunctionsResponses, CancelHumanApprovalActionData, CancelHumanApprovalActionErrors, CancelHumanApprovalActionResponses, ChangePersonalWikiOwnershipData, ChangePersonalWikiOwnershipResponses, ChangeWikiOwnershipData, ChangeWikiOwnershipResponses, ChatkitAddAgentResourceGrantData, ChatkitAddAgentResourceGrantErrors, ChatkitAddAgentResourceGrantResponses, ChatkitAddSessionParticipantData, ChatkitAddSessionParticipantErrors, ChatkitAddSessionParticipantResponses, ChatkitAutoProvisionSlackChannelInstallationData, ChatkitAutoProvisionSlackChannelInstallationErrors, ChatkitAutoProvisionSlackChannelInstallationResponses, ChatkitCacheConvertedMessagesData, ChatkitCacheConvertedMessagesErrors, ChatkitCacheConvertedMessagesResponses, ChatkitClaimAgentResourceBundleOutputsData, ChatkitClaimAgentResourceBundleOutputsResponses, ChatkitCompleteSlackProviderProvisionedSetupData, ChatkitCompleteSlackProviderProvisionedSetupErrors, ChatkitCompleteSlackProviderProvisionedSetupResponses, ChatkitCompleteSlackSelfManagedSetupData, ChatkitCompleteSlackSelfManagedSetupErrors, ChatkitCompleteSlackSelfManagedSetupResponses, ChatkitCreateRoutineData, ChatkitCreateRoutineErrors, ChatkitCreateRoutineResponses, ChatkitCreateSessionData, ChatkitCreateSessionErrors, ChatkitCreateSessionResponses, ChatkitCreateSlackChannelInstallationData, ChatkitCreateSlackChannelInstallationErrors, ChatkitCreateSlackChannelInstallationResponses, ChatkitDeleteAgentData, ChatkitDeleteAgentErrors, ChatkitDeleteAgentResponses, ChatkitDeleteAgentTurnQueueItemData, ChatkitDeleteAgentTurnQueueItemErrors, ChatkitDeleteAgentTurnQueueItemResponses, ChatkitDeleteChatProviderData, ChatkitDeleteChatProviderErrors, ChatkitDeleteChatProviderResponses, ChatkitDeleteRoutineData, ChatkitDeleteRoutineResponses, ChatkitGetAgentAvatarData, ChatkitGetAgentAvatarErrors, ChatkitGetAgentAvatarResponses, ChatkitGetAgentData, ChatkitGetAgentErrors, ChatkitGetAgentObservabilityData, ChatkitGetAgentObservabilityErrors, ChatkitGetAgentObservabilityResponses, ChatkitGetAgentResourceBundleProvisioningData, ChatkitGetAgentResourceBundleProvisioningResponses, ChatkitGetAgentResponses, ChatkitGetRoutineData, ChatkitGetRoutineResponses, ChatkitHydrateConvertedMessagesData, ChatkitHydrateConvertedMessagesErrors, ChatkitHydrateConvertedMessagesResponses, ChatkitInvokeSessionProviderToolData, ChatkitInvokeSessionProviderToolErrors, ChatkitInvokeSessionProviderToolResponses, ChatkitJoinSessionData, ChatkitJoinSessionErrors, ChatkitJoinSessionResponses, ChatkitListAgentResourceGrantsData, ChatkitListAgentResourceGrantsErrors, ChatkitListAgentResourceGrantsResponses, ChatkitListAgentsData, ChatkitListAgentsErrors, ChatkitListAgentsResponses, ChatkitListAgentTurnQueueData, ChatkitListAgentTurnQueueErrors, ChatkitListAgentTurnQueueResponses, ChatkitListAvailableChatChannelsData, ChatkitListAvailableChatChannelsErrors, ChatkitListAvailableChatChannelsResponses, ChatkitListAvailableChatProvidersData, ChatkitListAvailableChatProvidersErrors, ChatkitListAvailableChatProvidersResponses, ChatkitListChatProvidersData, ChatkitListChatProvidersErrors, ChatkitListChatProvidersResponses, ChatkitListMessageHistoryData, ChatkitListMessageHistoryErrors, ChatkitListMessageHistoryResponses, ChatkitListRoutinesData, ChatkitListRoutinesResponses, ChatkitListSessionParticipantsData, ChatkitListSessionParticipantsErrors, ChatkitListSessionParticipantsResponses, ChatkitListSessionsData, ChatkitListSessionsErrors, ChatkitListSessionsResponses, ChatkitProvisionAgentResourceBundleData, ChatkitProvisionAgentResourceBundleResponses, ChatkitRegisterAgentToolsData, ChatkitRegisterAgentToolsErrors, ChatkitRegisterAgentToolsResponses, ChatkitRegisterChatProviderData, ChatkitRegisterChatProviderErrors, ChatkitRegisterChatProviderResponses, ChatkitRegisterHttpVercelAiSdkAgentData, ChatkitRegisterHttpVercelAiSdkAgentErrors, ChatkitRegisterHttpVercelAiSdkAgentResponses, ChatkitRegisterVercelUiChatProviderData, ChatkitRegisterVercelUiChatProviderErrors, ChatkitRegisterVercelUiChatProviderResponses, ChatkitRemoveAgentResourceGrantData, ChatkitRemoveAgentResourceGrantErrors, ChatkitRemoveAgentResourceGrantResponses, ChatkitRemoveSessionParticipantData, ChatkitRemoveSessionParticipantErrors, ChatkitRemoveSessionParticipantResponses, ChatkitReorderAgentTurnQueueItemData, ChatkitReorderAgentTurnQueueItemErrors, ChatkitReorderAgentTurnQueueItemResponses, ChatkitReportToolExecutionData, ChatkitReportToolExecutionErrors, ChatkitReportToolExecutionResponses, ChatkitSearchData, ChatkitSearchErrors, ChatkitSearchResponses, ChatkitSendSessionMessageData, ChatkitSendSessionMessageErrors, ChatkitSendSessionMessageResponses, ChatkitSetAgentStatusData, ChatkitSetAgentStatusErrors, ChatkitSetAgentStatusResponses, ChatkitSetChatProviderStatusData, ChatkitSetChatProviderStatusErrors, ChatkitSetChatProviderStatusResponses, ChatkitStartSlackOauthData, ChatkitStartSlackOauthErrors, ChatkitStartSlackOauthResponses, ChatkitSteerAgentTurnQueueItemData, ChatkitSteerAgentTurnQueueItemErrors, ChatkitSteerAgentTurnQueueItemResponses, ChatkitUpdateAgentAvatarData, ChatkitUpdateAgentAvatarErrors, ChatkitUpdateAgentAvatarResponses, ChatkitUpdateAgentData, ChatkitUpdateAgentErrors, ChatkitUpdateAgentObservabilityData, ChatkitUpdateAgentObservabilityErrors, ChatkitUpdateAgentObservabilityResponses, ChatkitUpdateAgentOwnershipData, ChatkitUpdateAgentOwnershipErrors, ChatkitUpdateAgentOwnershipResponses, ChatkitUpdateAgentResponses, ChatkitUpdateAgentToolVisibilityData, ChatkitUpdateAgentToolVisibilityErrors, ChatkitUpdateAgentToolVisibilityResponses, ChatkitUpdateAgentVisibilityData, ChatkitUpdateAgentVisibilityErrors, ChatkitUpdateAgentVisibilityResponses, ChatkitUpdateChatProviderData, ChatkitUpdateChatProviderErrors, ChatkitUpdateChatProviderResponses, ChatkitUpdateRoutineData, ChatkitUpdateRoutineResponses, ChatkitWorkspaceAgentSessionsData, ChatkitWorkspaceAgentSessionsResponses, ChatkitWorkspaceBootstrapData, ChatkitWorkspaceBootstrapResponses, ChatkitWorkspaceConversationSnapshotData, ChatkitWorkspaceConversationSnapshotResponses, ChatkitWorkspaceCreateSessionData, ChatkitWorkspaceCreateSessionResponses, ChatkitWorkspaceInterruptSessionData, ChatkitWorkspaceInterruptSessionResponses, ChatkitWorkspaceMessagesData, ChatkitWorkspaceMessagesResponses, ChatkitWorkspaceRenameThreadData, ChatkitWorkspaceRenameThreadResponses, ChatkitWorkspaceSendMessageData, ChatkitWorkspaceSendMessageResponses, ChatkitWorkspaceSidebarData, ChatkitWorkspaceSidebarResponses, ChatkitWorkspaceSubmitTurnData, ChatkitWorkspaceSubmitTurnResponses, ChatkitWorkspaceUpdateSessionReadStateData, ChatkitWorkspaceUpdateSessionReadStateResponses, CheckMemoryBankHealthData, CheckMemoryBankHealthResponses, CheckPersonalMemoryBankHealthData, CheckPersonalMemoryBankHealthResponses, ClaimTemporaryAccountData, ClaimTemporaryAccountErrors, ClaimTemporaryAccountResponses, CompleteAttachmentUploadData, CompleteAttachmentUploadErrors, CompleteAttachmentUploadResponses, CompleteCredentialSetupItemData, CompleteCredentialSetupItemResponses, CompleteHumanApprovalActionData, CompleteHumanApprovalActionErrors, CompleteHumanApprovalActionResponses, CompleteWikiAssetUploadData, CompleteWikiAssetUploadResponses, ConfigureHostedOpenbotInstanceData, ConfigureHostedOpenbotInstanceErrors, ConfigureHostedOpenbotInstanceResponses, ConnectMcpProviderCatalogEntryData, ConnectMcpProviderCatalogEntryErrors, ConnectMcpProviderCatalogEntryResponses, ConnectProxiedMcpServerData, ConnectProxiedMcpServerErrors, ConnectProxiedMcpServerResponses, CreateAttachmentUploadData, CreateAttachmentUploadErrors, CreateAttachmentUploadResponses, CreateAttachmentUploadsData, CreateAttachmentUploadsErrors, CreateAttachmentUploadsResponses, CreateCustomToolProviderData, CreateCustomToolProviderResponses, CreateHostedOpenbotDeploymentData, CreateHostedOpenbotDeploymentErrors, CreateHostedOpenbotDeploymentResponses, CreateHostedOpenbotReleaseData, CreateHostedOpenbotReleaseErrors, CreateHostedOpenbotReleaseResponses, CreateHumanApprovalActionData, CreateHumanApprovalActionErrors, CreateHumanApprovalActionResponses, CreateManagedUserCredentialData, CreateManagedUserCredentialResponses, CreateMcpServerInstanceData, CreateMcpServerInstanceErrors, CreateMcpServerInstanceResponses, CreateMemoryBankData, CreateMemoryBankResponses, CreateMessageData, CreateMessageErrors, CreateMessageResponses, CreateOrganizationData, CreateOrganizationErrors, CreateOrganizationResponses, CreateOrgOidcProviderData, CreateOrgOidcProviderErrors, CreateOrgOidcProviderResponses, CreatePersonalMcpServerInstanceData, CreatePersonalMcpServerInstanceErrors, CreatePersonalMcpServerInstanceResponses, CreatePersonalMemoryBankData, CreatePersonalMemoryBankResponses, CreatePersonalSkillData, CreatePersonalSkillRegistryData, CreatePersonalSkillRegistryResponses, CreatePersonalSkillResponses, CreatePersonalToolGroupInstanceData, CreatePersonalToolGroupInstanceErrors, CreatePersonalToolGroupInstanceResponses, CreatePersonalUserCredentialData, CreatePersonalUserCredentialResponses, CreatePersonalWikiData, CreatePersonalWikiPageData, CreatePersonalWikiPageResponses, CreatePersonalWikiResponses, CreateResourceServerCredentialData, CreateResourceServerCredentialResponses, CreateSessionData, CreateSessionErrors, CreateSessionResponses, CreateSkillData, CreateSkillErrors, CreateSkillRegistryData, CreateSkillRegistryErrors, CreateSkillRegistryResponses, CreateSkillResponses, CreateTeamData, CreateTeamErrors, CreateTeamGroupData, CreateTeamGroupErrors, CreateTeamGroupResponses, CreateTeamResponses, CreateTemporaryAccountData, CreateTemporaryAccountErrors, CreateTemporaryAccountResponses, CreateToolGroupInstanceData, CreateToolGroupInstanceErrors, CreateToolGroupInstanceResponses, CreateTrustedRuntimeData, CreateTrustedRuntimeErrors, CreateTrustedRuntimeResponses, CreateTrustedSkillProviderData, CreateTrustedSkillProviderErrors, CreateTrustedSkillProviderResponses, CreateUserCredentialData, CreateUserCredentialResponses, CreateWikiAssetUploadData, CreateWikiAssetUploadResponses, CreateWikiData, CreateWikiPageData, CreateWikiPageResponses, CreateWikiPageTypeData, CreateWikiPageTypeResponses, CreateWikiPageTypeVersionData, CreateWikiPageTypeVersionErrors, CreateWikiPageTypeVersionResponses, CreateWikiRelationshipTypeData, CreateWikiRelationshipTypeResponses, CreateWikiRelationshipTypeVersionData, CreateWikiRelationshipTypeVersionErrors, CreateWikiRelationshipTypeVersionResponses, CreateWikiResponses, CredentialGenericOauthCallbackData, CredentialGenericOauthCallbackResponses, DeleteAttachmentData, DeleteAttachmentErrors, DeleteAttachmentResponses, DeleteCustomToolProviderData, DeleteCustomToolProviderResponses, DeleteManagedUserCredentialData, DeleteManagedUserCredentialResponses, DeleteMcpServerInstanceData, DeleteMcpServerInstanceErrors, DeleteMcpServerInstanceResponses, DeleteMemoryBankData, DeleteMemoryBankResponses, DeleteMemoryDocumentData, DeleteMemoryDocumentResponses, DeleteMessageData, DeleteMessageErrors, DeleteMessageResponses, DeleteOrganizationData, DeleteOrganizationErrors, DeleteOrganizationResponses, DeleteOrgOidcProviderData, DeleteOrgOidcProviderErrors, DeleteOrgOidcProviderResponses, DeletePersonalMcpServerInstanceData, DeletePersonalMcpServerInstanceResponses, DeletePersonalMemoryBankData, DeletePersonalMemoryBankResponses, DeletePersonalMemoryDocumentData, DeletePersonalMemoryDocumentResponses, DeletePersonalSkillData, DeletePersonalSkillRegistryData, DeletePersonalSkillRegistryResponses, DeletePersonalSkillResponses, DeletePersonalToolGroupInstanceData, DeletePersonalToolGroupInstanceResponses, DeletePersonalWikiData, DeletePersonalWikiPageData, DeletePersonalWikiPageResponses, DeletePersonalWikiResponses, DeleteProxiedMcpServerData, DeleteProxiedMcpServerErrors, DeleteProxiedMcpServerResponses, DeleteResourceServerCredentialData, DeleteResourceServerCredentialResponses, DeleteSelfAvatarData, DeleteSelfAvatarErrors, DeleteSelfAvatarResponses, DeleteSkillData, DeleteSkillErrors, DeleteSkillRegistryData, DeleteSkillRegistryErrors, DeleteSkillRegistryResponses, DeleteSkillResponses, DeleteTeamData, DeleteTeamErrors, DeleteTeamGroupData, DeleteTeamGroupErrors, DeleteTeamGroupResponses, DeleteTeamResponses, DeleteToolGroupInstanceData, DeleteToolGroupInstanceErrors, DeleteToolGroupInstanceResponses, DeleteTrustedRuntimeData, DeleteTrustedRuntimeErrors, DeleteTrustedRuntimeResponses, DeleteUserCredentialData, DeleteUserCredentialResponses, DeleteWikiAssetData, DeleteWikiAssetErrors, DeleteWikiAssetResponses, DeleteWikiData, DeleteWikiPageData, DeleteWikiPageErrors, DeleteWikiPageRelationshipData, DeleteWikiPageRelationshipResponses, DeleteWikiPageResponses, DeleteWikiPageTypeData, DeleteWikiPageTypeErrors, DeleteWikiPageTypeResponses, DeleteWikiPageTypeVersionData, DeleteWikiPageTypeVersionErrors, DeleteWikiPageTypeVersionResponses, DeleteWikiRelationshipTypeData, DeleteWikiRelationshipTypeErrors, DeleteWikiRelationshipTypeResponses, DeleteWikiResponses, DisableCustomToolProviderData, DisableCustomToolProviderResponses, DisableProxiedMcpServerData, DisableProxiedMcpServerErrors, DisableProxiedMcpServerResponses, DisableToolData, DisableToolErrors, DisableToolResponses, DownloadAttachmentContentData, DownloadAttachmentContentErrors, DownloadAttachmentContentResponses, DownloadSkillPackageFileData, DownloadSkillPackageFileErrors, DownloadSkillPackageFileResponses, DownloadWikiAssetContentData, DownloadWikiAssetContentErrors, DownloadWikiAssetContentResponses, DownloadWikiAssetData, DownloadWikiAssetResponses, EnableAndBindProviderToolsData, EnableAndBindProviderToolsErrors, EnableAndBindProviderToolsResponses, EnableCustomToolProviderData, EnableCustomToolProviderResponses, EnableProxiedMcpServerData, EnableProxiedMcpServerErrors, EnableProxiedMcpServerResponses, EnableToolData, EnableToolErrors, EnableToolResponses, EncryptPersonalUserCredentialConfigurationData, EncryptPersonalUserCredentialConfigurationResponses, EncryptResourceServerConfigurationData, EncryptResourceServerConfigurationResponses, EncryptUserCredentialConfigurationData, EncryptUserCredentialConfigurationResponses, ExchangeOauthCodeData, ExchangeOauthCodeErrors, ExchangeOauthCodeResponses, ExpireTemporaryAccountsData, ExpireTemporaryAccountsErrors, ExpireTemporaryAccountsResponses, ExportMemoryBankTemplateData, ExportMemoryBankTemplateResponses, ExportPersonalMemoryBankTemplateData, ExportPersonalMemoryBankTemplateResponses, FinalizeHostedOpenbotReleaseData, FinalizeHostedOpenbotReleaseErrors, FinalizeHostedOpenbotReleaseResponses, GenerateLocalRuntimeTunnelApiKeyData, GenerateLocalRuntimeTunnelApiKeyErrors, GenerateLocalRuntimeTunnelApiKeyResponses, GenerateTemporaryAccountClaimUrlData, GenerateTemporaryAccountClaimUrlErrors, GenerateTemporaryAccountClaimUrlResponses, GetAttachmentDownloadUrlData, GetAttachmentDownloadUrlErrors, GetAttachmentDownloadUrlResponses, GetCommonProviderInstallationData, GetCommonProviderInstallationResponses, GetCredentialSetupItemData, GetCredentialSetupItemResponses, GetCustomToolProviderData, GetCustomToolProviderResponses, GetHostedOpenbotInstanceData, GetHostedOpenbotInstanceErrors, GetHostedOpenbotInstanceResponses, GetHostedOpenbotReleaseData, GetHostedOpenbotReleaseErrors, GetHostedOpenbotReleaseResponses, GetHumanApprovalActionData, GetHumanApprovalActionErrors, GetHumanApprovalActionResponses, GetLocalRuntimeTunnelApiKeyData, GetLocalRuntimeTunnelApiKeyErrors, GetLocalRuntimeTunnelApiKeyResponses, GetLocalRuntimeTunnelConnectorData, GetLocalRuntimeTunnelConnectorErrors, GetLocalRuntimeTunnelConnectorResponses, GetManagedUserCredentialSecretData, GetManagedUserCredentialSecretResponses, GetMcpServerInstanceData, GetMcpServerInstanceErrors, GetMcpServerInstanceResponses, GetMemoryBankConfigData, GetMemoryBankConfigResponses, GetMemoryBankData, GetMemoryBankDocumentData, GetMemoryBankDocumentResponses, GetMemoryBankResponses, GetMessageData, GetMessageErrors, GetMessageResponses, GetOpenbotPluginsCatalogData, GetOpenbotPluginsCatalogResponses, GetOrganizationData, GetOrganizationErrors, GetOrganizationResponses, GetOrgOidcProviderData, GetOrgOidcProviderErrors, GetOrgOidcProviderResponses, GetPersonalMcpServerInstanceData, GetPersonalMcpServerInstanceResponses, GetPersonalMemoryBankConfigData, GetPersonalMemoryBankConfigResponses, GetPersonalMemoryBankData, GetPersonalMemoryBankDocumentData, GetPersonalMemoryBankDocumentResponses, GetPersonalMemoryBankResponses, GetPersonalSkillData, GetPersonalSkillRegistryData, GetPersonalSkillRegistryResponses, GetPersonalSkillResponses, GetPersonalToolGroupInstanceData, GetPersonalToolGroupInstanceResponses, GetPersonalWikiData, GetPersonalWikiPageData, GetPersonalWikiPageResponses, GetPersonalWikiResponses, GetProviderProvisioningHumanActionData, GetProviderProvisioningHumanActionResponses, GetProxiedMcpServerData, GetProxiedMcpServerErrors, GetProxiedMcpServerResponses, GetProxiedSkillProviderData, GetProxiedSkillProviderErrors, GetProxiedSkillProviderResponses, GetResourceServerCredentialData, GetResourceServerCredentialResponses, GetRuntimeConfigData, GetRuntimeConfigResponses, GetSelfAvatarData, GetSelfAvatarErrors, GetSelfAvatarResponses, GetSelfProfileData, GetSelfProfileErrors, GetSelfProfileResponses, GetSessionEventHistoryData, GetSessionEventHistoryErrors, GetSessionEventHistoryResponses, GetSkillData, GetSkillErrors, GetSkillPackageData, GetSkillPackageErrors, GetSkillPackageResponses, GetSkillRegistryData, GetSkillRegistryErrors, GetSkillRegistryResponses, GetSkillRegistrySkillByTitleData, GetSkillRegistrySkillByTitleErrors, GetSkillRegistrySkillByTitleResponses, GetSkillRegistrySkillData, GetSkillRegistrySkillDescriptionData, GetSkillRegistrySkillDescriptionErrors, GetSkillRegistrySkillDescriptionResponses, GetSkillRegistrySkillErrors, GetSkillRegistrySkillResponses, GetSkillResponses, GetTeamData, GetTeamErrors, GetTeamGroupData, GetTeamGroupErrors, GetTeamGroupResponses, GetTeamResponses, GetToolGroupInstanceData, GetToolGroupInstanceErrors, GetToolGroupInstanceResponses, GetToolsOpenapiSpecData, GetToolsOpenapiSpecErrors, GetToolsOpenapiSpecResponses, GetTrustedRuntimeData, GetTrustedRuntimeErrors, GetTrustedRuntimeResponses, GetUserCredentialData, GetUserCredentialResponses, GetWikiData, GetWikiPageBacklinksData, GetWikiPageBacklinksResponses, GetWikiPageData, GetWikiPageNeighborhoodData, GetWikiPageNeighborhoodResponses, GetWikiPageRelationshipData, GetWikiPageRelationshipResponses, GetWikiPageResponses, GetWikiPageTypeData, GetWikiPageTypeResponses, GetWikiPageTypeVersionData, GetWikiPageTypeVersionResponses, GetWikiRelationshipTypeData, GetWikiRelationshipTypeResponses, GetWikiRelationshipTypeVersionData, GetWikiRelationshipTypeVersionResponses, GetWikiResponses, HealthCheckData, HealthCheckErrors, HealthCheckResponses, ImportMemoryBankTemplateData, ImportMemoryBankTemplateResponses, ImportPersonalMemoryBankTemplateData, ImportPersonalMemoryBankTemplateResponses, InspectWikiAssetReferencesData, InspectWikiAssetReferencesResponses, InviteTeamUsersData, InviteTeamUsersErrors, InviteTeamUsersResponses, InvokeCustomToolData, InvokeCustomToolResponses, InvokeToolData, InvokeToolErrors, InvokeToolResponses, IssueOpenbotChatkitRealtimeTicketData, IssueOpenbotChatkitRealtimeTicketErrors, IssueOpenbotChatkitRealtimeTicketResponses, ListAvailableToolGroupsData, ListAvailableToolGroupsErrors, ListAvailableToolGroupsResponses, ListChatkitRoutineGrantsData, ListChatkitRoutineGrantsResponses, ListCommonProviderInstallationOwnershipGrantsData, ListCommonProviderInstallationOwnershipGrantsResponses, ListCommonProviderInstallationsData, ListCommonProviderInstallationsResponses, ListCommonProviderInstallationVisibilityGrantsData, ListCommonProviderInstallationVisibilityGrantsResponses, ListCredentialSetupItemsData, ListCredentialSetupItemsResponses, ListCustomToolProvidersData, ListCustomToolProvidersResponses, ListInboxAgentsData, ListInboxAgentsErrors, ListInboxAgentsResponses, ListInboxesData, ListInboxesErrors, ListInboxesResponses, ListManagedUserCredentialsData, ListManagedUserCredentialsResponses, ListMcpProviderCatalogData, ListMcpProviderCatalogErrors, ListMcpProviderCatalogResponses, ListMcpResourceOwnershipGrantsData, ListMcpResourceOwnershipGrantsResponses, ListMcpResourceVisibilityGrantsData, ListMcpResourceVisibilityGrantsResponses, ListMcpServerInstancesData, ListMcpServerInstancesErrors, ListMcpServerInstancesResponses, ListMemoryBankDocumentsData, ListMemoryBankDocumentsResponses, ListMemoryBankOwnershipGrantsData, ListMemoryBankOwnershipGrantsResponses, ListMemoryBanksData, ListMemoryBankSourceBindingsData, ListMemoryBankSourceBindingsResponses, ListMemoryBanksResponses, ListMemoryBankVisibilityGrantsData, ListMemoryBankVisibilityGrantsResponses, ListMemorySourceBindingsData, ListMemorySourceBindingsResponses, ListMessagesData, ListMessagesErrors, ListMessagesResponses, ListOpenbotDeploymentsData, ListOpenbotDeploymentsErrors, ListOpenbotDeploymentsResponses, ListOrganizationMembersData, ListOrganizationMembersErrors, ListOrganizationMembersResponses, ListOrganizationsData, ListOrganizationsErrors, ListOrganizationsResponses, ListOrganizationTeamGroupsData, ListOrganizationTeamGroupsResponses, ListOrgOidcProvidersData, ListOrgOidcProvidersErrors, ListOrgOidcProvidersResponses, ListPersonalMcpServerInstancesData, ListPersonalMcpServerInstancesErrors, ListPersonalMcpServerInstancesResponses, ListPersonalMemoryBankDocumentsData, ListPersonalMemoryBankDocumentsResponses, ListPersonalMemoryBankOwnershipGrantsData, ListPersonalMemoryBankOwnershipGrantsResponses, ListPersonalMemoryBanksData, ListPersonalMemoryBankSourceBindingsData, ListPersonalMemoryBankSourceBindingsResponses, ListPersonalMemoryBanksResponses, ListPersonalMemoryBankVisibilityGrantsData, ListPersonalMemoryBankVisibilityGrantsResponses, ListPersonalRegistryOwnershipGrantsData, ListPersonalRegistryOwnershipGrantsResponses, ListPersonalRegistryVisibilityGrantsData, ListPersonalRegistryVisibilityGrantsResponses, ListPersonalRscOwnershipGrantsData, ListPersonalRscOwnershipGrantsResponses, ListPersonalRscVisibilityGrantsData, ListPersonalRscVisibilityGrantsResponses, ListPersonalSkillOwnershipGrantsData, ListPersonalSkillOwnershipGrantsResponses, ListPersonalSkillRegistriesData, ListPersonalSkillRegistriesResponses, ListPersonalSkillsData, ListPersonalSkillsResponses, ListPersonalSkillVisibilityGrantsData, ListPersonalSkillVisibilityGrantsResponses, ListPersonalToolGroupInstancesData, ListPersonalToolGroupInstancesErrors, ListPersonalToolGroupInstancesResponses, ListPersonalUcOwnershipGrantsData, ListPersonalUcOwnershipGrantsResponses, ListPersonalUcVisibilityGrantsData, ListPersonalUcVisibilityGrantsResponses, ListPersonalWikiOwnershipGrantsData, ListPersonalWikiOwnershipGrantsResponses, ListPersonalWikiPagesData, ListPersonalWikiPagesResponses, ListPersonalWikisData, ListPersonalWikisResponses, ListPersonalWikiVisibilityGrantsData, ListPersonalWikiVisibilityGrantsResponses, ListProviderProvisionerCatalogData, ListProviderProvisionerCatalogResponses, ListProxiedMcpServersData, ListProxiedMcpServersErrors, ListProxiedMcpServersResponses, ListProxiedSkillProvidersData, ListProxiedSkillProvidersResponses, ListPublicAvailableToolGroupsData, ListPublicAvailableToolGroupsErrors, ListPublicAvailableToolGroupsResponses, ListResourceServerCredentialsData, ListResourceServerCredentialsResponses, ListRscOwnershipGrantsData, ListRscOwnershipGrantsResponses, ListRscVisibilityGrantsData, ListRscVisibilityGrantsResponses, ListSessionInboxInstancesData, ListSessionInboxInstancesErrors, ListSessionInboxInstancesResponses, ListSessionResourceGrantsData, ListSessionResourceGrantsErrors, ListSessionResourceGrantsResponses, ListSessionsData, ListSessionsErrors, ListSessionsResponses, ListSessionUserMembersData, ListSessionUserMembersErrors, ListSessionUserMembersResponses, ListSignalProviderGrantsData, ListSignalProviderGrantsResponses, ListSignalRuleGrantsData, ListSignalRuleGrantsResponses, ListSkillOwnershipGrantsData, ListSkillOwnershipGrantsResponses, ListSkillRegistriesData, ListSkillRegistriesErrors, ListSkillRegistriesResponses, ListSkillRegistryOwnershipGrantsData, ListSkillRegistryOwnershipGrantsResponses, ListSkillRegistrySkillSummariesData, ListSkillRegistrySkillSummariesErrors, ListSkillRegistrySkillSummariesResponses, ListSkillRegistryVisibilityGrantsData, ListSkillRegistryVisibilityGrantsResponses, ListSkillsData, ListSkillsErrors, ListSkillsResponses, ListSkillVisibilityGrantsData, ListSkillVisibilityGrantsResponses, ListTeamGroupMembersData, ListTeamGroupMembersResponses, ListTeamGroupsData, ListTeamGroupsResponses, ListTeamInvitationsData, ListTeamInvitationsResponses, ListTeamMembersData, ListTeamMembersErrors, ListTeamMembersResponses, ListTeamsData, ListTeamsErrors, ListTeamsResponses, ListToolDeploymentsByAliasData, ListToolDeploymentsByAliasErrors, ListToolDeploymentsByAliasResponses, ListToolGroupInstancesData, ListToolGroupInstancesErrors, ListToolGroupInstancesGroupedByToolData, ListToolGroupInstancesGroupedByToolErrors, ListToolGroupInstancesGroupedByToolResponses, ListToolGroupInstancesResponses, ListToolsData, ListToolsErrors, ListToolsResponses, ListTrustedRuntimesData, ListTrustedRuntimesErrors, ListTrustedRuntimesResponses, ListUcOwnershipGrantsData, ListUcOwnershipGrantsResponses, ListUcVisibilityGrantsData, ListUcVisibilityGrantsResponses, ListUserCredentialsData, ListUserCredentialsResponses, ListWikiAssetsData, ListWikiAssetsResponses, ListWikiOntologyInstallationsData, ListWikiOntologyInstallationsResponses, ListWikiOntologyTemplatesData, ListWikiOntologyTemplatesResponses, ListWikiOwnershipGrantsData, ListWikiOwnershipGrantsResponses, ListWikiPageAssetsData, ListWikiPageAssetsResponses, ListWikiPageRelationshipsData, ListWikiPageRelationshipsResponses, ListWikiPageRevisionsData, ListWikiPageRevisionsResponses, ListWikiPagesData, ListWikiPagesResponses, ListWikiPageTypesData, ListWikiPageTypesResponses, ListWikiPageTypeVersionsData, ListWikiPageTypeVersionsResponses, ListWikiRelationshipTypesData, ListWikiRelationshipTypesResponses, ListWikiRelationshipTypeVersionsData, ListWikiRelationshipTypeVersionsResponses, ListWikisData, ListWikisResponses, ListWikiVisibilityGrantsData, ListWikiVisibilityGrantsResponses, McpProtocolDeleteData, McpProtocolDeleteErrors, McpProtocolDeleteResponses, McpProtocolGetData, McpProtocolGetErrors, McpProtocolGetResponses, McpProtocolPostData, McpProtocolPostErrors, McpProtocolPostResponses, McpServerPlaygroundChatData, McpServerPlaygroundChatErrors, McpServerPlaygroundChatResponses, MigrateWikiPageTypeData, MigrateWikiPageTypeErrors, MigrateWikiPageTypeResponses, MoveWikiPageData, MoveWikiPageErrors, MoveWikiPageResponses, ObserveSessionData, ObserveSessionErrors, ObserveSessionResponses, PersonalMcpProtocolDeleteData, PersonalMcpProtocolDeleteResponses, PersonalMcpProtocolGetData, PersonalMcpProtocolGetResponses, PersonalMcpProtocolPostData, PersonalMcpProtocolPostResponses, PreviewWikiPageTypeMigrationData, PreviewWikiPageTypeMigrationErrors, PreviewWikiPageTypeMigrationResponses, ProviderProvisioningCallbackData, ProviderProvisioningCallbackResponses, ProviderSetupCatalogData, ProviderSetupCatalogResponses, ProviderSetupResumeData, ProviderSetupResumeResponses, ProviderSetupStartData, ProviderSetupStartResponses, RecallMemoryData, RecallMemoryResponses, RecallPersonalMemoryData, RecallPersonalMemoryResponses, ReconcileOpenbotAgentBundleData, ReconcileOpenbotAgentBundleResponses, RedirectTemporaryAccountClaimPageData, ReflectMemoryData, ReflectMemoryResponses, ReflectPersonalMemoryData, ReflectPersonalMemoryResponses, RefreshCustomToolProviderData, RefreshCustomToolProviderResponses, RefreshProxiedMcpServerData, RefreshProxiedMcpServerErrors, RefreshProxiedMcpServerResponses, RegisterOauthClientData, RegisterOauthClientErrors, RegisterOauthClientResponses, RegisterOpenbotDeploymentData, RegisterOpenbotDeploymentErrors, RegisterOpenbotDeploymentResponses, RegisterTeamOauthClientData, RegisterTeamOauthClientErrors, RegisterTeamOauthClientResponses, RemoveChatkitRoutineGrantData, RemoveChatkitRoutineGrantResponses, RemoveCommonProviderInstallationOwnershipGrantData, RemoveCommonProviderInstallationOwnershipGrantResponses, RemoveCommonProviderInstallationVisibilityGrantData, RemoveCommonProviderInstallationVisibilityGrantResponses, RemoveMcpResourceOwnershipGrantData, RemoveMcpResourceOwnershipGrantResponses, RemoveMcpResourceVisibilityGrantData, RemoveMcpResourceVisibilityGrantResponses, RemoveMcpServerInstanceFunctionData, RemoveMcpServerInstanceFunctionErrors, RemoveMcpServerInstanceFunctionResponses, RemoveMemoryBankOwnershipGrantData, RemoveMemoryBankOwnershipGrantResponses, RemoveMemoryBankVisibilityGrantData, RemoveMemoryBankVisibilityGrantResponses, RemoveOrganizationMemberData, RemoveOrganizationMemberErrors, RemoveOrganizationMemberResponses, RemovePersonalMemoryBankOwnershipGrantData, RemovePersonalMemoryBankOwnershipGrantResponses, RemovePersonalMemoryBankVisibilityGrantData, RemovePersonalMemoryBankVisibilityGrantResponses, RemovePersonalRegistryOwnershipGrantData, RemovePersonalRegistryOwnershipGrantResponses, RemovePersonalRegistryVisibilityGrantData, RemovePersonalRegistryVisibilityGrantResponses, RemovePersonalRscOwnershipGrantData, RemovePersonalRscOwnershipGrantResponses, RemovePersonalRscVisibilityGrantData, RemovePersonalRscVisibilityGrantResponses, RemovePersonalSkillOwnershipGrantData, RemovePersonalSkillOwnershipGrantResponses, RemovePersonalSkillVisibilityGrantData, RemovePersonalSkillVisibilityGrantResponses, RemovePersonalUcOwnershipGrantData, RemovePersonalUcOwnershipGrantResponses, RemovePersonalUcVisibilityGrantData, RemovePersonalUcVisibilityGrantResponses, RemovePersonalWikiOwnershipGrantData, RemovePersonalWikiOwnershipGrantResponses, RemovePersonalWikiVisibilityGrantData, RemovePersonalWikiVisibilityGrantResponses, RemoveRscOwnershipGrantData, RemoveRscOwnershipGrantResponses, RemoveRscVisibilityGrantData, RemoveRscVisibilityGrantResponses, RemoveSessionResourceGrantData, RemoveSessionResourceGrantErrors, RemoveSessionResourceGrantResponses, RemoveSessionUserMemberData, RemoveSessionUserMemberErrors, RemoveSessionUserMemberResponses, RemoveSignalProviderGrantData, RemoveSignalProviderGrantResponses, RemoveSignalRuleGrantData, RemoveSignalRuleGrantResponses, RemoveSkillOwnershipGrantData, RemoveSkillOwnershipGrantResponses, RemoveSkillRegistryOwnershipGrantData, RemoveSkillRegistryOwnershipGrantResponses, RemoveSkillRegistryVisibilityGrantData, RemoveSkillRegistryVisibilityGrantResponses, RemoveSkillVisibilityGrantData, RemoveSkillVisibilityGrantResponses, RemoveTeamGroupMemberData, RemoveTeamGroupMemberResponses, RemoveTeamMemberData, RemoveTeamMemberErrors, RemoveTeamMemberResponses, RemoveUcOwnershipGrantData, RemoveUcOwnershipGrantResponses, RemoveUcVisibilityGrantData, RemoveUcVisibilityGrantResponses, RemoveWikiOwnershipGrantData, RemoveWikiOwnershipGrantResponses, RemoveWikiVisibilityGrantData, RemoveWikiVisibilityGrantResponses, ReplaceMemorySourceBindingsData, ReplaceMemorySourceBindingsResponses, ResetMemoryBankConfigData, ResetMemoryBankConfigResponses, ResetPersonalMemoryBankConfigData, ResetPersonalMemoryBankConfigResponses, ResumeCredentialSetupItemData, ResumeCredentialSetupItemResponses, ResumeProviderAppProvisioningData, ResumeProviderAppProvisioningResponses, ResumeUserCredentialBrokeringData, ResumeUserCredentialBrokeringResponses, RetainMemoryDocumentData, RetainMemoryDocumentResponses, RetainPersonalMemoryDocumentData, RetainPersonalMemoryDocumentResponses, RetryMemorySourceSyncData, RetryMemorySourceSyncResponses, RetryWikiData, RetryWikiResponses, ReverseProxyAddProfileOwnershipGrantData, ReverseProxyAddProfileOwnershipGrantResponses, ReverseProxyAddProfileVisibilityGrantData, ReverseProxyAddProfileVisibilityGrantResponses, ReverseProxyCreateProfileData, ReverseProxyCreateProfileErrors, ReverseProxyCreateProfileResponses, ReverseProxyDeleteProfileData, ReverseProxyDeleteProfileErrors, ReverseProxyDeleteProfileResponses, ReverseProxyGetProfileData, ReverseProxyGetProfileErrors, ReverseProxyGetProfileResponses, ReverseProxyListProfileOwnershipGrantsData, ReverseProxyListProfileOwnershipGrantsResponses, ReverseProxyListProfilesData, ReverseProxyListProfilesErrors, ReverseProxyListProfilesResponses, ReverseProxyListProfileVisibilityGrantsData, ReverseProxyListProfileVisibilityGrantsResponses, ReverseProxyListProvidersData, ReverseProxyListProvidersResponses, ReverseProxyProxyGetData, ReverseProxyProxyGetResponses, ReverseProxyProxyPostData, ReverseProxyProxyPostResponses, ReverseProxyRemoveProfileOwnershipGrantData, ReverseProxyRemoveProfileOwnershipGrantResponses, ReverseProxyRemoveProfileVisibilityGrantData, ReverseProxyRemoveProfileVisibilityGrantResponses, ReverseProxySetProfileOwnershipData, ReverseProxySetProfileOwnershipResponses, ReverseProxySetProfileVisibilityData, ReverseProxySetProfileVisibilityResponses, ReverseProxyUpdateProfileData, ReverseProxyUpdateProfileErrors, ReverseProxyUpdateProfileResponses, RevokeLocalRuntimeTunnelApiKeyData, RevokeLocalRuntimeTunnelApiKeyErrors, RevokeLocalRuntimeTunnelApiKeyResponses, RevokeTeamInvitationData, RevokeTeamInvitationResponses, RotateCustomToolProviderSigningKeyData, RotateCustomToolProviderSigningKeyResponses, RouteAuthCallbackData, RouteAuthCallbackErrors, RouteCreateApiKeyData, RouteCreateApiKeyErrors, RouteCreateApiKeyResponses, RouteDeleteApiKeyData, RouteDeleteApiKeyErrors, RouteDeleteApiKeyResponses, RouteGetJwksData, RouteGetJwksErrors, RouteGetJwksResponses, RouteListApiKeysData, RouteListApiKeysErrors, RouteListApiKeysResponses, RouteListDebugAuthProfilesData, RouteListDebugAuthProfilesErrors, RouteListDebugAuthProfilesResponses, RouteLogoutData, RouteRefreshTokenData, RouteRefreshTokenErrors, RouteRefreshTokenResponses, RouteResolveLoginProviderData, RouteResolveLoginProviderErrors, RouteResolveLoginProviderResponses, RouteSelectDebugAuthProfileData, RouteSelectDebugAuthProfileErrors, RouteSelectDebugAuthProfileResponses, RouteStartAuthorizationData, RouteStartAuthorizationErrors, SearchSkillRegistryData, SearchSkillRegistryErrors, SearchSkillRegistryResponses, SetChatkitRoutineOwnershipData, SetChatkitRoutineOwnershipResponses, SetChatkitRoutineVisibilityData, SetChatkitRoutineVisibilityResponses, SetCommonProviderInstallationOwnershipData, SetCommonProviderInstallationOwnershipResponses, SetCommonProviderInstallationVisibilityData, SetCommonProviderInstallationVisibilityResponses, SetMcpResourceOwnershipData, SetMcpResourceOwnershipResponses, SetMcpResourceVisibilityData, SetMcpResourceVisibilityResponses, SetMemoryBankOwnershipModeData, SetMemoryBankOwnershipModeResponses, SetMemoryBankVisibilityData, SetMemoryBankVisibilityResponses, SetPersonalMemoryBankOwnershipModeData, SetPersonalMemoryBankOwnershipModeResponses, SetPersonalMemoryBankVisibilityData, SetPersonalMemoryBankVisibilityResponses, SetPersonalRegistryOwnershipModeData, SetPersonalRegistryOwnershipModeResponses, SetPersonalRegistryVisibilityData, SetPersonalRegistryVisibilityResponses, SetPersonalRscOwnershipData, SetPersonalRscOwnershipResponses, SetPersonalRscVisibilityData, SetPersonalRscVisibilityResponses, SetPersonalSkillOwnershipModeData, SetPersonalSkillOwnershipModeResponses, SetPersonalSkillVisibilityData, SetPersonalSkillVisibilityResponses, SetPersonalUcOwnershipData, SetPersonalUcOwnershipResponses, SetPersonalUcVisibilityData, SetPersonalUcVisibilityResponses, SetPersonalWikiOwnershipModeData, SetPersonalWikiOwnershipModeResponses, SetPersonalWikiVisibilityData, SetPersonalWikiVisibilityResponses, SetRscOwnershipData, SetRscOwnershipResponses, SetRscVisibilityData, SetRscVisibilityResponses, SetSelfOpenbotAvatarData, SetSelfOpenbotAvatarErrors, SetSelfOpenbotAvatarResponses, SetSignalProviderOwnershipData, SetSignalProviderOwnershipResponses, SetSignalProviderVisibilityData, SetSignalProviderVisibilityResponses, SetSignalRuleOwnershipData, SetSignalRuleOwnershipResponses, SetSignalRuleVisibilityData, SetSignalRuleVisibilityResponses, SetSkillOwnershipModeData, SetSkillOwnershipModeResponses, SetSkillRegistryOwnershipModeData, SetSkillRegistryOwnershipModeResponses, SetSkillRegistryVisibilityData, SetSkillRegistryVisibilityResponses, SetSkillVisibilityData, SetSkillVisibilityResponses, SetUcOwnershipData, SetUcOwnershipResponses, SetUcVisibilityData, SetUcVisibilityResponses, SetWikiOwnershipModeData, SetWikiOwnershipModeResponses, SetWikiVisibilityData, SetWikiVisibilityResponses, SignalsAddPersonalProviderGrantData, SignalsAddPersonalProviderGrantResponses, SignalsAddPersonalRuleGrantData, SignalsAddPersonalRuleGrantResponses, SignalsCreatePersonalProviderInstanceData, SignalsCreatePersonalProviderInstanceResponses, SignalsCreatePersonalRuleData, SignalsCreatePersonalRuleResponses, SignalsCreateProviderInstanceData, SignalsCreateProviderInstanceResponses, SignalsCreateRuleData, SignalsCreateRuleResponses, SignalsDeletePersonalProviderInstanceData, SignalsDeletePersonalProviderInstanceResponses, SignalsDeletePersonalRuleData, SignalsDeletePersonalRuleResponses, SignalsDeleteProviderInstanceData, SignalsDeleteProviderInstanceResponses, SignalsDeleteRuleData, SignalsDeleteRuleResponses, SignalsGetDeliveryData, SignalsGetDeliveryResponses, SignalsGetPersonalDeliveryData, SignalsGetPersonalDeliveryResponses, SignalsGetPersonalProviderInstanceData, SignalsGetPersonalProviderInstanceResponses, SignalsGetPersonalRuleData, SignalsGetPersonalRuleResponses, SignalsGetProviderInstanceData, SignalsGetProviderInstanceResponses, SignalsGetRuleData, SignalsGetRuleResponses, SignalsListAvailableProvidersData, SignalsListAvailableProvidersResponses, SignalsListDeliveriesData, SignalsListDeliveriesResponses, SignalsListPersonalAvailableProvidersData, SignalsListPersonalAvailableProvidersResponses, SignalsListPersonalDeliveriesData, SignalsListPersonalDeliveriesResponses, SignalsListPersonalProviderGrantsData, SignalsListPersonalProviderGrantsResponses, SignalsListPersonalProviderInstancesData, SignalsListPersonalProviderInstancesResponses, SignalsListPersonalRuleGrantsData, SignalsListPersonalRuleGrantsResponses, SignalsListPersonalRulesData, SignalsListPersonalRulesResponses, SignalsListProviderInstancesData, SignalsListProviderInstancesResponses, SignalsListRulesData, SignalsListRulesResponses, SignalsRemovePersonalProviderGrantData, SignalsRemovePersonalProviderGrantResponses, SignalsRemovePersonalRuleGrantData, SignalsRemovePersonalRuleGrantResponses, SignalsRetryDeliveryData, SignalsRetryDeliveryResponses, SignalsRetryPersonalDeliveryData, SignalsRetryPersonalDeliveryResponses, SignalsSetPersonalProviderOwnershipData, SignalsSetPersonalProviderOwnershipResponses, SignalsSetPersonalProviderVisibilityData, SignalsSetPersonalProviderVisibilityResponses, SignalsSetPersonalRuleOwnershipData, SignalsSetPersonalRuleOwnershipResponses, SignalsSetPersonalRuleVisibilityData, SignalsSetPersonalRuleVisibilityResponses, SignalsTriggerFakeData, SignalsTriggerFakeResponses, SignalsUpdatePersonalProviderInstanceData, SignalsUpdatePersonalProviderInstanceResponses, SignalsUpdatePersonalRuleData, SignalsUpdatePersonalRuleResponses, SignalsUpdateProviderInstanceData, SignalsUpdateProviderInstanceResponses, SignalsUpdateRuleData, SignalsUpdateRuleResponses, StartCredentialSetupItemData, StartCredentialSetupItemResponses, StartOauthDeviceCodeData, StartOauthDeviceCodeErrors, StartOauthDeviceCodeResponses, StartProviderAppProvisioningData, StartProviderAppProvisioningResponses, StartProxiedMcpServerOauthData, StartProxiedMcpServerOauthErrors, StartProxiedMcpServerOauthResponses, StartUserCredentialBrokeringData, StartUserCredentialBrokeringResponses, StateExportData, StateExportErrors, StateExportResponses, StateGetImportData, StateGetImportResponses, StateImportData, StateImportEventsData, StateImportEventsResponses, StateImportResponses, StatePlanData, StatePlanResponses, StateResolveSourceData, StateResolveSourceErrors, StateResolveSourceResponses, StateSchemaData, StateSchemaJsonData, StateSchemaJsonResponses, StateSchemaResponses, StateValidateData, StateValidateResponses, TraverseWikiGraphData, TraverseWikiGraphResponses, UnbindToolGroupFromMcpServerData, UnbindToolGroupFromMcpServerErrors, UnbindToolGroupFromMcpServerResponses, UpdateCustomToolProviderData, UpdateCustomToolProviderResponses, UpdateHostedOpenbotComputerImageData, UpdateHostedOpenbotComputerImageErrors, UpdateHostedOpenbotComputerImageResponses, UpdateManagedUserCredentialData, UpdateManagedUserCredentialResponses, UpdateMcpServerInstanceData, UpdateMcpServerInstanceErrors, UpdateMcpServerInstanceFunctionData, UpdateMcpServerInstanceFunctionErrors, UpdateMcpServerInstanceFunctionResponses, UpdateMcpServerInstanceResponses, UpdateMemoryBankConfigData, UpdateMemoryBankConfigResponses, UpdateMemoryBankData, UpdateMemoryBankResponses, UpdateOrganizationData, UpdateOrganizationErrors, UpdateOrganizationMemberRoleData, UpdateOrganizationMemberRoleErrors, UpdateOrganizationMemberRoleResponses, UpdateOrganizationResponses, UpdateOrgOidcProviderData, UpdateOrgOidcProviderErrors, UpdateOrgOidcProviderResponses, UpdatePersonalMcpServerInstanceData, UpdatePersonalMcpServerInstanceResponses, UpdatePersonalMemoryBankConfigData, UpdatePersonalMemoryBankConfigResponses, UpdatePersonalMemoryBankData, UpdatePersonalMemoryBankResponses, UpdatePersonalSkillData, UpdatePersonalSkillRegistryData, UpdatePersonalSkillRegistryResponses, UpdatePersonalSkillResponses, UpdatePersonalToolGroupInstanceData, UpdatePersonalToolGroupInstanceResponses, UpdatePersonalWikiData, UpdatePersonalWikiPageData, UpdatePersonalWikiPageResponses, UpdatePersonalWikiResponses, UpdateResourceServerCredentialData, UpdateResourceServerCredentialResponses, UpdateSelfProfileData, UpdateSelfProfileErrors, UpdateSelfProfileResponses, UpdateSessionOwnershipData, UpdateSessionOwnershipErrors, UpdateSessionOwnershipResponses, UpdateSessionVisibilityData, UpdateSessionVisibilityErrors, UpdateSessionVisibilityResponses, UpdateSkillData, UpdateSkillErrors, UpdateSkillRegistryData, UpdateSkillRegistryErrors, UpdateSkillRegistryResponses, UpdateSkillResponses, UpdateTeamData, UpdateTeamErrors, UpdateTeamGroupData, UpdateTeamGroupErrors, UpdateTeamGroupResponses, UpdateTeamMemberRoleData, UpdateTeamMemberRoleErrors, UpdateTeamMemberRoleResponses, UpdateTeamResponses, UpdateToolBoundParamsData, UpdateToolBoundParamsErrors, UpdateToolBoundParamsResponses, UpdateToolGroupInstanceData, UpdateToolGroupInstanceErrors, UpdateToolGroupInstanceResponses, UpdateTrustedRuntimeData, UpdateTrustedRuntimeErrors, UpdateTrustedRuntimeResponses, UpdateUserCredentialData, UpdateUserCredentialResponses, UpdateWikiAssetData, UpdateWikiAssetResponses, UpdateWikiData, UpdateWikiPageData, UpdateWikiPageErrors, UpdateWikiPageRelationshipData, UpdateWikiPageRelationshipResponses, UpdateWikiPageResponses, UpdateWikiPageTypeData, UpdateWikiPageTypeErrors, UpdateWikiPageTypeResponses, UpdateWikiRelationshipTypeData, UpdateWikiRelationshipTypeErrors, UpdateWikiRelationshipTypeResponses, UpdateWikiResponses, UploadAttachmentContentData, UploadAttachmentContentErrors, UploadAttachmentContentResponses, UploadHostedOpenbotReleaseFileData, UploadHostedOpenbotReleaseFileErrors, UploadHostedOpenbotReleaseFileResponses, UploadSelfAvatarData, UploadSelfAvatarErrors, UploadSelfAvatarResponses, UploadWikiAssetContentData, UploadWikiAssetContentErrors, UploadWikiAssetContentResponses, UpsertWikiPageRelationshipData, UpsertWikiPageRelationshipErrors, UpsertWikiPageRelationshipResponses, ValidateWikiPageTypeDataData, ValidateWikiPageTypeDataResponses, VerifyOrgOidcProviderDomainData, VerifyOrgOidcProviderDomainErrors, VerifyOrgOidcProviderDomainResponses, WhoamiData, WhoamiErrors, WhoamiResponses } from './types.gen'; +import type { AcceptInvitationData, AcceptInvitationErrors, AcceptInvitationResponses, AddCommonProviderInstallationOwnershipGrantData, AddCommonProviderInstallationOwnershipGrantResponses, AddCommonProviderInstallationVisibilityGrantData, AddCommonProviderInstallationVisibilityGrantResponses, AddMcpResourceOwnershipGrantData, AddMcpResourceOwnershipGrantResponses, AddMcpResourceVisibilityGrantData, AddMcpResourceVisibilityGrantResponses, AddMcpServerInstanceFunctionData, AddMcpServerInstanceFunctionErrors, AddMcpServerInstanceFunctionResponses, AddMemoryBankOwnershipGrantData, AddMemoryBankOwnershipGrantResponses, AddMemoryBankVisibilityGrantData, AddMemoryBankVisibilityGrantResponses, AddOrganizationMemberData, AddOrganizationMemberErrors, AddOrganizationMemberResponses, AddPersonalMemoryBankOwnershipGrantData, AddPersonalMemoryBankOwnershipGrantResponses, AddPersonalMemoryBankVisibilityGrantData, AddPersonalMemoryBankVisibilityGrantResponses, AddPersonalRegistryOwnershipGrantData, AddPersonalRegistryOwnershipGrantResponses, AddPersonalRegistryVisibilityGrantData, AddPersonalRegistryVisibilityGrantResponses, AddPersonalRscOwnershipGrantData, AddPersonalRscOwnershipGrantResponses, AddPersonalRscVisibilityGrantData, AddPersonalRscVisibilityGrantResponses, AddPersonalSkillOwnershipGrantData, AddPersonalSkillOwnershipGrantResponses, AddPersonalSkillVisibilityGrantData, AddPersonalSkillVisibilityGrantResponses, AddPersonalUcOwnershipGrantData, AddPersonalUcOwnershipGrantResponses, AddPersonalUcVisibilityGrantData, AddPersonalUcVisibilityGrantResponses, AddPersonalWikiOwnershipGrantData, AddPersonalWikiOwnershipGrantResponses, AddPersonalWikiVisibilityGrantData, AddPersonalWikiVisibilityGrantResponses, AddProviderSkillsToSkillRegistryData, AddProviderSkillsToSkillRegistryErrors, AddProviderSkillsToSkillRegistryResponses, AddRscOwnershipGrantData, AddRscOwnershipGrantResponses, AddRscVisibilityGrantData, AddRscVisibilityGrantResponses, AddSessionResourceGrantData, AddSessionResourceGrantErrors, AddSessionResourceGrantResponses, AddSessionUserMemberData, AddSessionUserMemberErrors, AddSessionUserMemberResponses, AddSignalProviderGrantData, AddSignalProviderGrantResponses, AddSkillOwnershipGrantData, AddSkillOwnershipGrantResponses, AddSkillRegistryOwnershipGrantData, AddSkillRegistryOwnershipGrantResponses, AddSkillRegistryVisibilityGrantData, AddSkillRegistryVisibilityGrantResponses, AddSkillVisibilityGrantData, AddSkillVisibilityGrantResponses, AddTeamGroupMemberData, AddTeamGroupMemberErrors, AddTeamGroupMemberResponses, AddTeamMemberData, AddTeamMemberErrors, AddTeamMemberResponses, AddUcOwnershipGrantData, AddUcOwnershipGrantResponses, AddUcVisibilityGrantData, AddUcVisibilityGrantResponses, AddWikiOwnershipGrantData, AddWikiOwnershipGrantResponses, AddWikiVisibilityGrantData, AddWikiVisibilityGrantResponses, ApplyWikiOntologyTemplateData, ApplyWikiOntologyTemplateResponses, AuthorizeOauthDeviceCodeData, AuthorizeOauthDeviceCodeErrors, AuthorizeOauthDeviceCodeResponses, AutomationsAddGrantData, AutomationsAddGrantResponses, AutomationsDeleteData, AutomationsDeleteResponses, AutomationsGetData, AutomationsGetErrors, AutomationsGetResponses, AutomationsListData, AutomationsListExecutionsData, AutomationsListExecutionsResponses, AutomationsListGrantsData, AutomationsListGrantsResponses, AutomationsListResponses, AutomationsPutData, AutomationsPutErrors, AutomationsPutResponses, AutomationsRemoveGrantData, AutomationsRemoveGrantResponses, AutomationsRunData, AutomationsRunResponses, AutomationsSetOwnershipData, AutomationsSetOwnershipResponses, AutomationsSetVisibilityData, AutomationsSetVisibilityResponses, AutoProvisionToolGroupInstanceData, AutoProvisionToolGroupInstanceErrors, AutoProvisionToolGroupInstanceResponses, AutumnWebhookHandlerData, AutumnWebhookHandlerErrors, AutumnWebhookHandlerResponses, BillingAutumnBridgePostData, BillingAutumnBridgePostErrors, BillingAutumnBridgePostResponses, BillingContextGetData, BillingContextGetErrors, BillingContextGetResponses, BillingMemoryBankReservationCommitData, BillingMemoryBankReservationCommitErrors, BillingMemoryBankReservationCommitResponses, BillingMemoryBankReservationCreateData, BillingMemoryBankReservationCreateErrors, BillingMemoryBankReservationCreateResponses, BillingMemoryBankReservationReleaseData, BillingMemoryBankReservationReleaseErrors, BillingMemoryBankReservationReleaseResponses, BillingProductEnrollCurrentHumanData, BillingProductEnrollCurrentHumanErrors, BillingProductEnrollCurrentHumanResponses, BillingRedirectData, BillingRedirectErrors, BillingWebhookStripeDeprecatedData, BillingWebhookStripeDeprecatedResponses, BindToolGroupToMcpServerData, BindToolGroupToMcpServerErrors, BindToolGroupToMcpServerResponses, BulkAddMcpServerInstanceFunctionsData, BulkAddMcpServerInstanceFunctionsErrors, BulkAddMcpServerInstanceFunctionsResponses, BulkRemoveMcpServerInstanceFunctionsData, BulkRemoveMcpServerInstanceFunctionsErrors, BulkRemoveMcpServerInstanceFunctionsResponses, CancelHumanApprovalActionData, CancelHumanApprovalActionErrors, CancelHumanApprovalActionResponses, ChangePersonalWikiOwnershipData, ChangePersonalWikiOwnershipResponses, ChangeWikiOwnershipData, ChangeWikiOwnershipResponses, ChatkitAddAgentResourceGrantData, ChatkitAddAgentResourceGrantErrors, ChatkitAddAgentResourceGrantResponses, ChatkitAddSessionParticipantData, ChatkitAddSessionParticipantErrors, ChatkitAddSessionParticipantResponses, ChatkitAutoProvisionSlackChannelInstallationData, ChatkitAutoProvisionSlackChannelInstallationErrors, ChatkitAutoProvisionSlackChannelInstallationResponses, ChatkitCacheConvertedMessagesData, ChatkitCacheConvertedMessagesErrors, ChatkitCacheConvertedMessagesResponses, ChatkitClaimAgentResourceBundleOutputsData, ChatkitClaimAgentResourceBundleOutputsResponses, ChatkitCompleteSlackProviderProvisionedSetupData, ChatkitCompleteSlackProviderProvisionedSetupErrors, ChatkitCompleteSlackProviderProvisionedSetupResponses, ChatkitCompleteSlackSelfManagedSetupData, ChatkitCompleteSlackSelfManagedSetupErrors, ChatkitCompleteSlackSelfManagedSetupResponses, ChatkitCreateSessionData, ChatkitCreateSessionErrors, ChatkitCreateSessionResponses, ChatkitCreateSlackChannelInstallationData, ChatkitCreateSlackChannelInstallationErrors, ChatkitCreateSlackChannelInstallationResponses, ChatkitDeleteAgentData, ChatkitDeleteAgentErrors, ChatkitDeleteAgentResponses, ChatkitDeleteAgentTurnQueueItemData, ChatkitDeleteAgentTurnQueueItemErrors, ChatkitDeleteAgentTurnQueueItemResponses, ChatkitDeleteChatProviderData, ChatkitDeleteChatProviderErrors, ChatkitDeleteChatProviderResponses, ChatkitGetAgentAvatarData, ChatkitGetAgentAvatarErrors, ChatkitGetAgentAvatarResponses, ChatkitGetAgentData, ChatkitGetAgentErrors, ChatkitGetAgentObservabilityData, ChatkitGetAgentObservabilityErrors, ChatkitGetAgentObservabilityResponses, ChatkitGetAgentResourceBundleProvisioningData, ChatkitGetAgentResourceBundleProvisioningResponses, ChatkitGetAgentResponses, ChatkitHydrateConvertedMessagesData, ChatkitHydrateConvertedMessagesErrors, ChatkitHydrateConvertedMessagesResponses, ChatkitInvokeSessionProviderToolData, ChatkitInvokeSessionProviderToolErrors, ChatkitInvokeSessionProviderToolResponses, ChatkitJoinSessionData, ChatkitJoinSessionErrors, ChatkitJoinSessionResponses, ChatkitListAgentResourceGrantsData, ChatkitListAgentResourceGrantsErrors, ChatkitListAgentResourceGrantsResponses, ChatkitListAgentsData, ChatkitListAgentsErrors, ChatkitListAgentsResponses, ChatkitListAgentTurnQueueData, ChatkitListAgentTurnQueueErrors, ChatkitListAgentTurnQueueResponses, ChatkitListAvailableChatChannelsData, ChatkitListAvailableChatChannelsErrors, ChatkitListAvailableChatChannelsResponses, ChatkitListAvailableChatProvidersData, ChatkitListAvailableChatProvidersErrors, ChatkitListAvailableChatProvidersResponses, ChatkitListChatProvidersData, ChatkitListChatProvidersErrors, ChatkitListChatProvidersResponses, ChatkitListMessageHistoryData, ChatkitListMessageHistoryErrors, ChatkitListMessageHistoryResponses, ChatkitListSessionParticipantsData, ChatkitListSessionParticipantsErrors, ChatkitListSessionParticipantsResponses, ChatkitListSessionsData, ChatkitListSessionsErrors, ChatkitListSessionsResponses, ChatkitProvisionAgentResourceBundleData, ChatkitProvisionAgentResourceBundleResponses, ChatkitRegisterAgentToolsData, ChatkitRegisterAgentToolsErrors, ChatkitRegisterAgentToolsResponses, ChatkitRegisterChatProviderData, ChatkitRegisterChatProviderErrors, ChatkitRegisterChatProviderResponses, ChatkitRegisterHttpVercelAiSdkAgentData, ChatkitRegisterHttpVercelAiSdkAgentErrors, ChatkitRegisterHttpVercelAiSdkAgentResponses, ChatkitRegisterVercelUiChatProviderData, ChatkitRegisterVercelUiChatProviderErrors, ChatkitRegisterVercelUiChatProviderResponses, ChatkitRemoveAgentResourceGrantData, ChatkitRemoveAgentResourceGrantErrors, ChatkitRemoveAgentResourceGrantResponses, ChatkitRemoveSessionParticipantData, ChatkitRemoveSessionParticipantErrors, ChatkitRemoveSessionParticipantResponses, ChatkitReorderAgentTurnQueueItemData, ChatkitReorderAgentTurnQueueItemErrors, ChatkitReorderAgentTurnQueueItemResponses, ChatkitReportToolExecutionData, ChatkitReportToolExecutionErrors, ChatkitReportToolExecutionResponses, ChatkitSearchData, ChatkitSearchErrors, ChatkitSearchResponses, ChatkitSendSessionMessageData, ChatkitSendSessionMessageErrors, ChatkitSendSessionMessageResponses, ChatkitSetAgentPermissionsData, ChatkitSetAgentPermissionsErrors, ChatkitSetAgentPermissionsResponses, ChatkitSetAgentStatusData, ChatkitSetAgentStatusErrors, ChatkitSetAgentStatusResponses, ChatkitSetChatProviderStatusData, ChatkitSetChatProviderStatusErrors, ChatkitSetChatProviderStatusResponses, ChatkitStartSlackOauthData, ChatkitStartSlackOauthErrors, ChatkitStartSlackOauthResponses, ChatkitSteerAgentTurnQueueItemData, ChatkitSteerAgentTurnQueueItemErrors, ChatkitSteerAgentTurnQueueItemResponses, ChatkitUpdateAgentAvatarData, ChatkitUpdateAgentAvatarErrors, ChatkitUpdateAgentAvatarResponses, ChatkitUpdateAgentData, ChatkitUpdateAgentErrors, ChatkitUpdateAgentObservabilityData, ChatkitUpdateAgentObservabilityErrors, ChatkitUpdateAgentObservabilityResponses, ChatkitUpdateAgentOwnershipData, ChatkitUpdateAgentOwnershipErrors, ChatkitUpdateAgentOwnershipResponses, ChatkitUpdateAgentResponses, ChatkitUpdateAgentToolVisibilityData, ChatkitUpdateAgentToolVisibilityErrors, ChatkitUpdateAgentToolVisibilityResponses, ChatkitUpdateAgentVisibilityData, ChatkitUpdateAgentVisibilityErrors, ChatkitUpdateAgentVisibilityResponses, ChatkitUpdateChatProviderData, ChatkitUpdateChatProviderErrors, ChatkitUpdateChatProviderResponses, ChatkitWorkspaceAgentSessionsData, ChatkitWorkspaceAgentSessionsResponses, ChatkitWorkspaceBootstrapData, ChatkitWorkspaceBootstrapResponses, ChatkitWorkspaceConversationSnapshotData, ChatkitWorkspaceConversationSnapshotResponses, ChatkitWorkspaceCreateSessionData, ChatkitWorkspaceCreateSessionResponses, ChatkitWorkspaceInterruptSessionData, ChatkitWorkspaceInterruptSessionResponses, ChatkitWorkspaceMessagesData, ChatkitWorkspaceMessagesResponses, ChatkitWorkspaceRenameThreadData, ChatkitWorkspaceRenameThreadResponses, ChatkitWorkspaceSendMessageData, ChatkitWorkspaceSendMessageResponses, ChatkitWorkspaceSidebarData, ChatkitWorkspaceSidebarResponses, ChatkitWorkspaceSubmitTurnData, ChatkitWorkspaceSubmitTurnResponses, ChatkitWorkspaceUpdateSessionReadStateData, ChatkitWorkspaceUpdateSessionReadStateResponses, CheckMemoryBankHealthData, CheckMemoryBankHealthResponses, CheckPersonalMemoryBankHealthData, CheckPersonalMemoryBankHealthResponses, ClaimTemporaryAccountData, ClaimTemporaryAccountErrors, ClaimTemporaryAccountResponses, CompleteAttachmentUploadData, CompleteAttachmentUploadErrors, CompleteAttachmentUploadResponses, CompleteCredentialSetupItemData, CompleteCredentialSetupItemResponses, CompleteHumanApprovalActionData, CompleteHumanApprovalActionErrors, CompleteHumanApprovalActionResponses, CompleteWikiAssetUploadData, CompleteWikiAssetUploadResponses, ConfigureHostedOpenbotInstanceData, ConfigureHostedOpenbotInstanceErrors, ConfigureHostedOpenbotInstanceResponses, ConnectMcpProviderCatalogEntryData, ConnectMcpProviderCatalogEntryErrors, ConnectMcpProviderCatalogEntryResponses, ConnectProxiedMcpServerData, ConnectProxiedMcpServerErrors, ConnectProxiedMcpServerResponses, CreateAttachmentUploadData, CreateAttachmentUploadErrors, CreateAttachmentUploadResponses, CreateAttachmentUploadsData, CreateAttachmentUploadsErrors, CreateAttachmentUploadsResponses, CreateCustomToolProviderData, CreateCustomToolProviderResponses, CreateHostedOpenbotDeploymentData, CreateHostedOpenbotDeploymentErrors, CreateHostedOpenbotDeploymentResponses, CreateHostedOpenbotReleaseData, CreateHostedOpenbotReleaseErrors, CreateHostedOpenbotReleaseResponses, CreateHumanApprovalActionData, CreateHumanApprovalActionErrors, CreateHumanApprovalActionResponses, CreateManagedUserCredentialData, CreateManagedUserCredentialResponses, CreateMcpServerInstanceData, CreateMcpServerInstanceErrors, CreateMcpServerInstanceResponses, CreateMemoryBankData, CreateMemoryBankResponses, CreateMessageData, CreateMessageErrors, CreateMessageResponses, CreateOrganizationData, CreateOrganizationErrors, CreateOrganizationResponses, CreateOrgOidcProviderData, CreateOrgOidcProviderErrors, CreateOrgOidcProviderResponses, CreatePersonalMcpServerInstanceData, CreatePersonalMcpServerInstanceErrors, CreatePersonalMcpServerInstanceResponses, CreatePersonalMemoryBankData, CreatePersonalMemoryBankResponses, CreatePersonalSkillData, CreatePersonalSkillRegistryData, CreatePersonalSkillRegistryResponses, CreatePersonalSkillResponses, CreatePersonalToolGroupInstanceData, CreatePersonalToolGroupInstanceErrors, CreatePersonalToolGroupInstanceResponses, CreatePersonalUserCredentialData, CreatePersonalUserCredentialResponses, CreatePersonalWikiData, CreatePersonalWikiPageData, CreatePersonalWikiPageResponses, CreatePersonalWikiResponses, CreateResourceServerCredentialData, CreateResourceServerCredentialResponses, CreateSessionData, CreateSessionErrors, CreateSessionResponses, CreateSkillData, CreateSkillErrors, CreateSkillRegistryData, CreateSkillRegistryErrors, CreateSkillRegistryResponses, CreateSkillResponses, CreateTeamData, CreateTeamErrors, CreateTeamGroupData, CreateTeamGroupErrors, CreateTeamGroupResponses, CreateTeamResponses, CreateTemporaryAccountData, CreateTemporaryAccountErrors, CreateTemporaryAccountResponses, CreateToolGroupInstanceData, CreateToolGroupInstanceErrors, CreateToolGroupInstanceResponses, CreateTrustedRuntimeData, CreateTrustedRuntimeErrors, CreateTrustedRuntimeResponses, CreateTrustedSkillProviderData, CreateTrustedSkillProviderErrors, CreateTrustedSkillProviderResponses, CreateUserCredentialData, CreateUserCredentialResponses, CreateWikiAssetUploadData, CreateWikiAssetUploadResponses, CreateWikiData, CreateWikiPageData, CreateWikiPageResponses, CreateWikiPageTypeData, CreateWikiPageTypeResponses, CreateWikiPageTypeVersionData, CreateWikiPageTypeVersionErrors, CreateWikiPageTypeVersionResponses, CreateWikiRelationshipTypeData, CreateWikiRelationshipTypeResponses, CreateWikiRelationshipTypeVersionData, CreateWikiRelationshipTypeVersionErrors, CreateWikiRelationshipTypeVersionResponses, CreateWikiResponses, CredentialGenericOauthCallbackData, CredentialGenericOauthCallbackResponses, DeleteAttachmentData, DeleteAttachmentErrors, DeleteAttachmentResponses, DeleteCustomToolProviderData, DeleteCustomToolProviderResponses, DeleteManagedUserCredentialData, DeleteManagedUserCredentialResponses, DeleteMcpServerInstanceData, DeleteMcpServerInstanceErrors, DeleteMcpServerInstanceResponses, DeleteMemoryBankData, DeleteMemoryBankResponses, DeleteMemoryDocumentData, DeleteMemoryDocumentResponses, DeleteMessageData, DeleteMessageErrors, DeleteMessageResponses, DeleteOrganizationData, DeleteOrganizationErrors, DeleteOrganizationResponses, DeleteOrgOidcProviderData, DeleteOrgOidcProviderErrors, DeleteOrgOidcProviderResponses, DeletePersonalMcpServerInstanceData, DeletePersonalMcpServerInstanceResponses, DeletePersonalMemoryBankData, DeletePersonalMemoryBankResponses, DeletePersonalMemoryDocumentData, DeletePersonalMemoryDocumentResponses, DeletePersonalSkillData, DeletePersonalSkillRegistryData, DeletePersonalSkillRegistryResponses, DeletePersonalSkillResponses, DeletePersonalToolGroupInstanceData, DeletePersonalToolGroupInstanceResponses, DeletePersonalWikiData, DeletePersonalWikiPageData, DeletePersonalWikiPageResponses, DeletePersonalWikiResponses, DeleteProxiedMcpServerData, DeleteProxiedMcpServerErrors, DeleteProxiedMcpServerResponses, DeleteResourceServerCredentialData, DeleteResourceServerCredentialResponses, DeleteSelfAvatarData, DeleteSelfAvatarErrors, DeleteSelfAvatarResponses, DeleteSkillData, DeleteSkillErrors, DeleteSkillRegistryData, DeleteSkillRegistryErrors, DeleteSkillRegistryResponses, DeleteSkillResponses, DeleteTeamData, DeleteTeamErrors, DeleteTeamGroupData, DeleteTeamGroupErrors, DeleteTeamGroupResponses, DeleteTeamResponses, DeleteToolGroupInstanceData, DeleteToolGroupInstanceErrors, DeleteToolGroupInstanceResponses, DeleteTrustedRuntimeData, DeleteTrustedRuntimeErrors, DeleteTrustedRuntimeResponses, DeleteUserCredentialData, DeleteUserCredentialResponses, DeleteWikiAssetData, DeleteWikiAssetErrors, DeleteWikiAssetResponses, DeleteWikiData, DeleteWikiPageData, DeleteWikiPageErrors, DeleteWikiPageRelationshipData, DeleteWikiPageRelationshipResponses, DeleteWikiPageResponses, DeleteWikiPageTypeData, DeleteWikiPageTypeErrors, DeleteWikiPageTypeResponses, DeleteWikiPageTypeVersionData, DeleteWikiPageTypeVersionErrors, DeleteWikiPageTypeVersionResponses, DeleteWikiRelationshipTypeData, DeleteWikiRelationshipTypeErrors, DeleteWikiRelationshipTypeResponses, DeleteWikiResponses, DisableCustomToolProviderData, DisableCustomToolProviderResponses, DisableProxiedMcpServerData, DisableProxiedMcpServerErrors, DisableProxiedMcpServerResponses, DisableToolData, DisableToolErrors, DisableToolResponses, DownloadAttachmentContentData, DownloadAttachmentContentErrors, DownloadAttachmentContentResponses, DownloadSkillPackageFileData, DownloadSkillPackageFileErrors, DownloadSkillPackageFileResponses, DownloadWikiAssetContentData, DownloadWikiAssetContentErrors, DownloadWikiAssetContentResponses, DownloadWikiAssetData, DownloadWikiAssetResponses, EnableAndBindProviderToolsData, EnableAndBindProviderToolsErrors, EnableAndBindProviderToolsResponses, EnableCustomToolProviderData, EnableCustomToolProviderResponses, EnableProxiedMcpServerData, EnableProxiedMcpServerErrors, EnableProxiedMcpServerResponses, EnableToolData, EnableToolErrors, EnableToolResponses, EncryptPersonalUserCredentialConfigurationData, EncryptPersonalUserCredentialConfigurationResponses, EncryptResourceServerConfigurationData, EncryptResourceServerConfigurationResponses, EncryptUserCredentialConfigurationData, EncryptUserCredentialConfigurationResponses, ExchangeOauthCodeData, ExchangeOauthCodeErrors, ExchangeOauthCodeResponses, ExpireTemporaryAccountsData, ExpireTemporaryAccountsErrors, ExpireTemporaryAccountsResponses, ExportMemoryBankTemplateData, ExportMemoryBankTemplateResponses, ExportPersonalMemoryBankTemplateData, ExportPersonalMemoryBankTemplateResponses, FinalizeHostedOpenbotReleaseData, FinalizeHostedOpenbotReleaseErrors, FinalizeHostedOpenbotReleaseResponses, GenerateLocalRuntimeTunnelApiKeyData, GenerateLocalRuntimeTunnelApiKeyErrors, GenerateLocalRuntimeTunnelApiKeyResponses, GenerateTemporaryAccountClaimUrlData, GenerateTemporaryAccountClaimUrlErrors, GenerateTemporaryAccountClaimUrlResponses, GetAttachmentDownloadUrlData, GetAttachmentDownloadUrlErrors, GetAttachmentDownloadUrlResponses, GetCommonProviderInstallationData, GetCommonProviderInstallationResponses, GetCredentialSetupItemData, GetCredentialSetupItemResponses, GetCustomToolProviderData, GetCustomToolProviderResponses, GetHostedOpenbotInstanceData, GetHostedOpenbotInstanceErrors, GetHostedOpenbotInstanceResponses, GetHostedOpenbotReleaseData, GetHostedOpenbotReleaseErrors, GetHostedOpenbotReleaseResponses, GetHumanApprovalActionData, GetHumanApprovalActionErrors, GetHumanApprovalActionResponses, GetLocalRuntimeTunnelApiKeyData, GetLocalRuntimeTunnelApiKeyErrors, GetLocalRuntimeTunnelApiKeyResponses, GetLocalRuntimeTunnelConnectorData, GetLocalRuntimeTunnelConnectorErrors, GetLocalRuntimeTunnelConnectorResponses, GetManagedUserCredentialSecretData, GetManagedUserCredentialSecretResponses, GetMcpServerInstanceData, GetMcpServerInstanceErrors, GetMcpServerInstanceResponses, GetMemoryBankConfigData, GetMemoryBankConfigResponses, GetMemoryBankData, GetMemoryBankDocumentData, GetMemoryBankDocumentResponses, GetMemoryBankResponses, GetMessageData, GetMessageErrors, GetMessageResponses, GetOpenbotPluginsCatalogData, GetOpenbotPluginsCatalogResponses, GetOrganizationData, GetOrganizationErrors, GetOrganizationResponses, GetOrgOidcProviderData, GetOrgOidcProviderErrors, GetOrgOidcProviderResponses, GetPersonalMcpServerInstanceData, GetPersonalMcpServerInstanceResponses, GetPersonalMemoryBankConfigData, GetPersonalMemoryBankConfigResponses, GetPersonalMemoryBankData, GetPersonalMemoryBankDocumentData, GetPersonalMemoryBankDocumentResponses, GetPersonalMemoryBankResponses, GetPersonalSkillData, GetPersonalSkillRegistryData, GetPersonalSkillRegistryResponses, GetPersonalSkillResponses, GetPersonalToolGroupInstanceData, GetPersonalToolGroupInstanceResponses, GetPersonalWikiData, GetPersonalWikiPageData, GetPersonalWikiPageResponses, GetPersonalWikiResponses, GetProviderProvisioningHumanActionData, GetProviderProvisioningHumanActionResponses, GetProxiedMcpServerData, GetProxiedMcpServerErrors, GetProxiedMcpServerResponses, GetProxiedSkillProviderData, GetProxiedSkillProviderErrors, GetProxiedSkillProviderResponses, GetResourceServerCredentialData, GetResourceServerCredentialResponses, GetRuntimeConfigData, GetRuntimeConfigResponses, GetSelfAvatarData, GetSelfAvatarErrors, GetSelfAvatarResponses, GetSelfProfileData, GetSelfProfileErrors, GetSelfProfileResponses, GetSessionEventHistoryData, GetSessionEventHistoryErrors, GetSessionEventHistoryResponses, GetSkillData, GetSkillErrors, GetSkillPackageData, GetSkillPackageErrors, GetSkillPackageResponses, GetSkillRegistryData, GetSkillRegistryErrors, GetSkillRegistryResponses, GetSkillRegistrySkillByTitleData, GetSkillRegistrySkillByTitleErrors, GetSkillRegistrySkillByTitleResponses, GetSkillRegistrySkillData, GetSkillRegistrySkillDescriptionData, GetSkillRegistrySkillDescriptionErrors, GetSkillRegistrySkillDescriptionResponses, GetSkillRegistrySkillErrors, GetSkillRegistrySkillResponses, GetSkillResponses, GetTeamData, GetTeamErrors, GetTeamGroupData, GetTeamGroupErrors, GetTeamGroupResponses, GetTeamResponses, GetToolGroupInstanceData, GetToolGroupInstanceErrors, GetToolGroupInstanceResponses, GetToolsOpenapiSpecData, GetToolsOpenapiSpecErrors, GetToolsOpenapiSpecResponses, GetTrustedRuntimeData, GetTrustedRuntimeErrors, GetTrustedRuntimeResponses, GetUserCredentialData, GetUserCredentialResponses, GetWikiData, GetWikiPageBacklinksData, GetWikiPageBacklinksResponses, GetWikiPageData, GetWikiPageNeighborhoodData, GetWikiPageNeighborhoodResponses, GetWikiPageRelationshipData, GetWikiPageRelationshipResponses, GetWikiPageResponses, GetWikiPageTypeData, GetWikiPageTypeResponses, GetWikiPageTypeVersionData, GetWikiPageTypeVersionResponses, GetWikiRelationshipTypeData, GetWikiRelationshipTypeResponses, GetWikiRelationshipTypeVersionData, GetWikiRelationshipTypeVersionResponses, GetWikiResponses, HealthCheckData, HealthCheckErrors, HealthCheckResponses, ImportMemoryBankTemplateData, ImportMemoryBankTemplateResponses, ImportPersonalMemoryBankTemplateData, ImportPersonalMemoryBankTemplateResponses, InspectWikiAssetReferencesData, InspectWikiAssetReferencesResponses, InviteTeamUsersData, InviteTeamUsersErrors, InviteTeamUsersResponses, InvokeCustomToolData, InvokeCustomToolResponses, InvokeToolData, InvokeToolErrors, InvokeToolResponses, IssueOpenbotChatkitRealtimeTicketData, IssueOpenbotChatkitRealtimeTicketErrors, IssueOpenbotChatkitRealtimeTicketResponses, ListAvailableToolGroupsData, ListAvailableToolGroupsErrors, ListAvailableToolGroupsResponses, ListCommonProviderInstallationOwnershipGrantsData, ListCommonProviderInstallationOwnershipGrantsResponses, ListCommonProviderInstallationsData, ListCommonProviderInstallationsResponses, ListCommonProviderInstallationVisibilityGrantsData, ListCommonProviderInstallationVisibilityGrantsResponses, ListCredentialSetupItemsData, ListCredentialSetupItemsResponses, ListCustomToolProvidersData, ListCustomToolProvidersResponses, ListInboxAgentsData, ListInboxAgentsErrors, ListInboxAgentsResponses, ListInboxesData, ListInboxesErrors, ListInboxesResponses, ListManagedUserCredentialsData, ListManagedUserCredentialsResponses, ListMcpProviderCatalogData, ListMcpProviderCatalogErrors, ListMcpProviderCatalogResponses, ListMcpResourceOwnershipGrantsData, ListMcpResourceOwnershipGrantsResponses, ListMcpResourceVisibilityGrantsData, ListMcpResourceVisibilityGrantsResponses, ListMcpServerInstancesData, ListMcpServerInstancesErrors, ListMcpServerInstancesResponses, ListMemoryBankDocumentsData, ListMemoryBankDocumentsResponses, ListMemoryBankOwnershipGrantsData, ListMemoryBankOwnershipGrantsResponses, ListMemoryBanksData, ListMemoryBankSourceBindingsData, ListMemoryBankSourceBindingsResponses, ListMemoryBanksResponses, ListMemoryBankVisibilityGrantsData, ListMemoryBankVisibilityGrantsResponses, ListMemorySourceBindingsData, ListMemorySourceBindingsResponses, ListMessagesData, ListMessagesErrors, ListMessagesResponses, ListOpenbotDeploymentsData, ListOpenbotDeploymentsErrors, ListOpenbotDeploymentsResponses, ListOrganizationMembersData, ListOrganizationMembersErrors, ListOrganizationMembersResponses, ListOrganizationsData, ListOrganizationsErrors, ListOrganizationsResponses, ListOrganizationTeamGroupsData, ListOrganizationTeamGroupsResponses, ListOrgOidcProvidersData, ListOrgOidcProvidersErrors, ListOrgOidcProvidersResponses, ListPersonalMcpServerInstancesData, ListPersonalMcpServerInstancesErrors, ListPersonalMcpServerInstancesResponses, ListPersonalMemoryBankDocumentsData, ListPersonalMemoryBankDocumentsResponses, ListPersonalMemoryBankOwnershipGrantsData, ListPersonalMemoryBankOwnershipGrantsResponses, ListPersonalMemoryBanksData, ListPersonalMemoryBankSourceBindingsData, ListPersonalMemoryBankSourceBindingsResponses, ListPersonalMemoryBanksResponses, ListPersonalMemoryBankVisibilityGrantsData, ListPersonalMemoryBankVisibilityGrantsResponses, ListPersonalRegistryOwnershipGrantsData, ListPersonalRegistryOwnershipGrantsResponses, ListPersonalRegistryVisibilityGrantsData, ListPersonalRegistryVisibilityGrantsResponses, ListPersonalRscOwnershipGrantsData, ListPersonalRscOwnershipGrantsResponses, ListPersonalRscVisibilityGrantsData, ListPersonalRscVisibilityGrantsResponses, ListPersonalSkillOwnershipGrantsData, ListPersonalSkillOwnershipGrantsResponses, ListPersonalSkillRegistriesData, ListPersonalSkillRegistriesResponses, ListPersonalSkillsData, ListPersonalSkillsResponses, ListPersonalSkillVisibilityGrantsData, ListPersonalSkillVisibilityGrantsResponses, ListPersonalToolGroupInstancesData, ListPersonalToolGroupInstancesErrors, ListPersonalToolGroupInstancesResponses, ListPersonalUcOwnershipGrantsData, ListPersonalUcOwnershipGrantsResponses, ListPersonalUcVisibilityGrantsData, ListPersonalUcVisibilityGrantsResponses, ListPersonalWikiOwnershipGrantsData, ListPersonalWikiOwnershipGrantsResponses, ListPersonalWikiPagesData, ListPersonalWikiPagesResponses, ListPersonalWikisData, ListPersonalWikisResponses, ListPersonalWikiVisibilityGrantsData, ListPersonalWikiVisibilityGrantsResponses, ListProviderProvisionerCatalogData, ListProviderProvisionerCatalogResponses, ListProxiedMcpServersData, ListProxiedMcpServersErrors, ListProxiedMcpServersResponses, ListProxiedSkillProvidersData, ListProxiedSkillProvidersResponses, ListPublicAvailableToolGroupsData, ListPublicAvailableToolGroupsErrors, ListPublicAvailableToolGroupsResponses, ListResourceServerCredentialsData, ListResourceServerCredentialsResponses, ListRscOwnershipGrantsData, ListRscOwnershipGrantsResponses, ListRscVisibilityGrantsData, ListRscVisibilityGrantsResponses, ListSessionInboxInstancesData, ListSessionInboxInstancesErrors, ListSessionInboxInstancesResponses, ListSessionResourceGrantsData, ListSessionResourceGrantsErrors, ListSessionResourceGrantsResponses, ListSessionsData, ListSessionsErrors, ListSessionsResponses, ListSessionUserMembersData, ListSessionUserMembersErrors, ListSessionUserMembersResponses, ListSignalProviderGrantsData, ListSignalProviderGrantsResponses, ListSkillOwnershipGrantsData, ListSkillOwnershipGrantsResponses, ListSkillRegistriesData, ListSkillRegistriesErrors, ListSkillRegistriesResponses, ListSkillRegistryOwnershipGrantsData, ListSkillRegistryOwnershipGrantsResponses, ListSkillRegistrySkillSummariesData, ListSkillRegistrySkillSummariesErrors, ListSkillRegistrySkillSummariesResponses, ListSkillRegistryVisibilityGrantsData, ListSkillRegistryVisibilityGrantsResponses, ListSkillsData, ListSkillsErrors, ListSkillsResponses, ListSkillVisibilityGrantsData, ListSkillVisibilityGrantsResponses, ListTeamGroupMembersData, ListTeamGroupMembersResponses, ListTeamGroupsData, ListTeamGroupsResponses, ListTeamInvitationsData, ListTeamInvitationsResponses, ListTeamMembersData, ListTeamMembersErrors, ListTeamMembersResponses, ListTeamsData, ListTeamsErrors, ListTeamsResponses, ListToolDeploymentsByAliasData, ListToolDeploymentsByAliasErrors, ListToolDeploymentsByAliasResponses, ListToolGroupInstancesData, ListToolGroupInstancesErrors, ListToolGroupInstancesGroupedByToolData, ListToolGroupInstancesGroupedByToolErrors, ListToolGroupInstancesGroupedByToolResponses, ListToolGroupInstancesResponses, ListToolsData, ListToolsErrors, ListToolsResponses, ListTrustedRuntimesData, ListTrustedRuntimesErrors, ListTrustedRuntimesResponses, ListUcOwnershipGrantsData, ListUcOwnershipGrantsResponses, ListUcVisibilityGrantsData, ListUcVisibilityGrantsResponses, ListUserCredentialsData, ListUserCredentialsResponses, ListWikiAssetsData, ListWikiAssetsResponses, ListWikiOntologyInstallationsData, ListWikiOntologyInstallationsResponses, ListWikiOntologyTemplatesData, ListWikiOntologyTemplatesResponses, ListWikiOwnershipGrantsData, ListWikiOwnershipGrantsResponses, ListWikiPageAssetsData, ListWikiPageAssetsResponses, ListWikiPageRelationshipsData, ListWikiPageRelationshipsResponses, ListWikiPageRevisionsData, ListWikiPageRevisionsResponses, ListWikiPagesData, ListWikiPagesResponses, ListWikiPageTypesData, ListWikiPageTypesResponses, ListWikiPageTypeVersionsData, ListWikiPageTypeVersionsResponses, ListWikiRelationshipTypesData, ListWikiRelationshipTypesResponses, ListWikiRelationshipTypeVersionsData, ListWikiRelationshipTypeVersionsResponses, ListWikisData, ListWikisResponses, ListWikiVisibilityGrantsData, ListWikiVisibilityGrantsResponses, McpProtocolDeleteData, McpProtocolDeleteErrors, McpProtocolDeleteResponses, McpProtocolGetData, McpProtocolGetErrors, McpProtocolGetResponses, McpProtocolPostData, McpProtocolPostErrors, McpProtocolPostResponses, McpServerPlaygroundChatData, McpServerPlaygroundChatErrors, McpServerPlaygroundChatResponses, MigrateWikiPageTypeData, MigrateWikiPageTypeErrors, MigrateWikiPageTypeResponses, MoveWikiPageData, MoveWikiPageErrors, MoveWikiPageResponses, ObserveSessionData, ObserveSessionErrors, ObserveSessionResponses, PersonalMcpProtocolDeleteData, PersonalMcpProtocolDeleteResponses, PersonalMcpProtocolGetData, PersonalMcpProtocolGetResponses, PersonalMcpProtocolPostData, PersonalMcpProtocolPostResponses, PreviewWikiPageTypeMigrationData, PreviewWikiPageTypeMigrationErrors, PreviewWikiPageTypeMigrationResponses, ProviderProvisioningCallbackData, ProviderProvisioningCallbackResponses, ProviderSetupCatalogData, ProviderSetupCatalogResponses, ProviderSetupResumeData, ProviderSetupResumeResponses, ProviderSetupStartData, ProviderSetupStartResponses, RecallMemoryData, RecallMemoryResponses, RecallPersonalMemoryData, RecallPersonalMemoryResponses, ReconcileOpenbotAgentBundleData, ReconcileOpenbotAgentBundleResponses, RedirectTemporaryAccountClaimPageData, ReflectMemoryData, ReflectMemoryResponses, ReflectPersonalMemoryData, ReflectPersonalMemoryResponses, RefreshCustomToolProviderData, RefreshCustomToolProviderResponses, RefreshProxiedMcpServerData, RefreshProxiedMcpServerErrors, RefreshProxiedMcpServerResponses, RegisterOauthClientData, RegisterOauthClientErrors, RegisterOauthClientResponses, RegisterOpenbotDeploymentData, RegisterOpenbotDeploymentErrors, RegisterOpenbotDeploymentResponses, RegisterTeamOauthClientData, RegisterTeamOauthClientErrors, RegisterTeamOauthClientResponses, RemoveCommonProviderInstallationOwnershipGrantData, RemoveCommonProviderInstallationOwnershipGrantResponses, RemoveCommonProviderInstallationVisibilityGrantData, RemoveCommonProviderInstallationVisibilityGrantResponses, RemoveMcpResourceOwnershipGrantData, RemoveMcpResourceOwnershipGrantResponses, RemoveMcpResourceVisibilityGrantData, RemoveMcpResourceVisibilityGrantResponses, RemoveMcpServerInstanceFunctionData, RemoveMcpServerInstanceFunctionErrors, RemoveMcpServerInstanceFunctionResponses, RemoveMemoryBankOwnershipGrantData, RemoveMemoryBankOwnershipGrantResponses, RemoveMemoryBankVisibilityGrantData, RemoveMemoryBankVisibilityGrantResponses, RemoveOrganizationMemberData, RemoveOrganizationMemberErrors, RemoveOrganizationMemberResponses, RemovePersonalMemoryBankOwnershipGrantData, RemovePersonalMemoryBankOwnershipGrantResponses, RemovePersonalMemoryBankVisibilityGrantData, RemovePersonalMemoryBankVisibilityGrantResponses, RemovePersonalRegistryOwnershipGrantData, RemovePersonalRegistryOwnershipGrantResponses, RemovePersonalRegistryVisibilityGrantData, RemovePersonalRegistryVisibilityGrantResponses, RemovePersonalRscOwnershipGrantData, RemovePersonalRscOwnershipGrantResponses, RemovePersonalRscVisibilityGrantData, RemovePersonalRscVisibilityGrantResponses, RemovePersonalSkillOwnershipGrantData, RemovePersonalSkillOwnershipGrantResponses, RemovePersonalSkillVisibilityGrantData, RemovePersonalSkillVisibilityGrantResponses, RemovePersonalUcOwnershipGrantData, RemovePersonalUcOwnershipGrantResponses, RemovePersonalUcVisibilityGrantData, RemovePersonalUcVisibilityGrantResponses, RemovePersonalWikiOwnershipGrantData, RemovePersonalWikiOwnershipGrantResponses, RemovePersonalWikiVisibilityGrantData, RemovePersonalWikiVisibilityGrantResponses, RemoveRscOwnershipGrantData, RemoveRscOwnershipGrantResponses, RemoveRscVisibilityGrantData, RemoveRscVisibilityGrantResponses, RemoveSessionResourceGrantData, RemoveSessionResourceGrantErrors, RemoveSessionResourceGrantResponses, RemoveSessionUserMemberData, RemoveSessionUserMemberErrors, RemoveSessionUserMemberResponses, RemoveSignalProviderGrantData, RemoveSignalProviderGrantResponses, RemoveSkillOwnershipGrantData, RemoveSkillOwnershipGrantResponses, RemoveSkillRegistryOwnershipGrantData, RemoveSkillRegistryOwnershipGrantResponses, RemoveSkillRegistryVisibilityGrantData, RemoveSkillRegistryVisibilityGrantResponses, RemoveSkillVisibilityGrantData, RemoveSkillVisibilityGrantResponses, RemoveTeamGroupMemberData, RemoveTeamGroupMemberResponses, RemoveTeamMemberData, RemoveTeamMemberErrors, RemoveTeamMemberResponses, RemoveUcOwnershipGrantData, RemoveUcOwnershipGrantResponses, RemoveUcVisibilityGrantData, RemoveUcVisibilityGrantResponses, RemoveWikiOwnershipGrantData, RemoveWikiOwnershipGrantResponses, RemoveWikiVisibilityGrantData, RemoveWikiVisibilityGrantResponses, ReplaceMemorySourceBindingsData, ReplaceMemorySourceBindingsResponses, ResetMemoryBankConfigData, ResetMemoryBankConfigResponses, ResetPersonalMemoryBankConfigData, ResetPersonalMemoryBankConfigResponses, ResumeCredentialSetupItemData, ResumeCredentialSetupItemResponses, ResumeProviderAppProvisioningData, ResumeProviderAppProvisioningResponses, ResumeUserCredentialBrokeringData, ResumeUserCredentialBrokeringResponses, RetainMemoryDocumentData, RetainMemoryDocumentResponses, RetainPersonalMemoryDocumentData, RetainPersonalMemoryDocumentResponses, RetryMemorySourceSyncData, RetryMemorySourceSyncResponses, RetryWikiData, RetryWikiResponses, ReverseProxyAddProfileOwnershipGrantData, ReverseProxyAddProfileOwnershipGrantResponses, ReverseProxyAddProfileVisibilityGrantData, ReverseProxyAddProfileVisibilityGrantResponses, ReverseProxyCreateProfileData, ReverseProxyCreateProfileErrors, ReverseProxyCreateProfileResponses, ReverseProxyDeleteProfileData, ReverseProxyDeleteProfileErrors, ReverseProxyDeleteProfileResponses, ReverseProxyGetProfileData, ReverseProxyGetProfileErrors, ReverseProxyGetProfileResponses, ReverseProxyListProfileOwnershipGrantsData, ReverseProxyListProfileOwnershipGrantsResponses, ReverseProxyListProfilesData, ReverseProxyListProfilesErrors, ReverseProxyListProfilesResponses, ReverseProxyListProfileVisibilityGrantsData, ReverseProxyListProfileVisibilityGrantsResponses, ReverseProxyListProvidersData, ReverseProxyListProvidersResponses, ReverseProxyProxyGetData, ReverseProxyProxyGetResponses, ReverseProxyProxyPostData, ReverseProxyProxyPostResponses, ReverseProxyRemoveProfileOwnershipGrantData, ReverseProxyRemoveProfileOwnershipGrantResponses, ReverseProxyRemoveProfileVisibilityGrantData, ReverseProxyRemoveProfileVisibilityGrantResponses, ReverseProxySetProfileOwnershipData, ReverseProxySetProfileOwnershipResponses, ReverseProxySetProfileVisibilityData, ReverseProxySetProfileVisibilityResponses, ReverseProxyUpdateProfileData, ReverseProxyUpdateProfileErrors, ReverseProxyUpdateProfileResponses, RevokeLocalRuntimeTunnelApiKeyData, RevokeLocalRuntimeTunnelApiKeyErrors, RevokeLocalRuntimeTunnelApiKeyResponses, RevokeTeamInvitationData, RevokeTeamInvitationResponses, RotateCustomToolProviderSigningKeyData, RotateCustomToolProviderSigningKeyResponses, RouteAuthCallbackData, RouteAuthCallbackErrors, RouteCreateApiKeyData, RouteCreateApiKeyErrors, RouteCreateApiKeyResponses, RouteDeleteApiKeyData, RouteDeleteApiKeyErrors, RouteDeleteApiKeyResponses, RouteGetJwksData, RouteGetJwksErrors, RouteGetJwksResponses, RouteListApiKeysData, RouteListApiKeysErrors, RouteListApiKeysResponses, RouteListDebugAuthProfilesData, RouteListDebugAuthProfilesErrors, RouteListDebugAuthProfilesResponses, RouteLogoutData, RouteRefreshTokenData, RouteRefreshTokenErrors, RouteRefreshTokenResponses, RouteResolveLoginProviderData, RouteResolveLoginProviderErrors, RouteResolveLoginProviderResponses, RouteSelectDebugAuthProfileData, RouteSelectDebugAuthProfileErrors, RouteSelectDebugAuthProfileResponses, RouteStartAuthorizationData, RouteStartAuthorizationErrors, SearchSkillRegistryData, SearchSkillRegistryErrors, SearchSkillRegistryResponses, SetCommonProviderInstallationOwnershipData, SetCommonProviderInstallationOwnershipResponses, SetCommonProviderInstallationVisibilityData, SetCommonProviderInstallationVisibilityResponses, SetMcpResourceOwnershipData, SetMcpResourceOwnershipResponses, SetMcpResourceVisibilityData, SetMcpResourceVisibilityResponses, SetMemoryBankOwnershipModeData, SetMemoryBankOwnershipModeResponses, SetMemoryBankVisibilityData, SetMemoryBankVisibilityResponses, SetPersonalMemoryBankOwnershipModeData, SetPersonalMemoryBankOwnershipModeResponses, SetPersonalMemoryBankVisibilityData, SetPersonalMemoryBankVisibilityResponses, SetPersonalRegistryOwnershipModeData, SetPersonalRegistryOwnershipModeResponses, SetPersonalRegistryVisibilityData, SetPersonalRegistryVisibilityResponses, SetPersonalRscOwnershipData, SetPersonalRscOwnershipResponses, SetPersonalRscVisibilityData, SetPersonalRscVisibilityResponses, SetPersonalSkillOwnershipModeData, SetPersonalSkillOwnershipModeResponses, SetPersonalSkillVisibilityData, SetPersonalSkillVisibilityResponses, SetPersonalUcOwnershipData, SetPersonalUcOwnershipResponses, SetPersonalUcVisibilityData, SetPersonalUcVisibilityResponses, SetPersonalWikiOwnershipModeData, SetPersonalWikiOwnershipModeResponses, SetPersonalWikiVisibilityData, SetPersonalWikiVisibilityResponses, SetRscOwnershipData, SetRscOwnershipResponses, SetRscVisibilityData, SetRscVisibilityResponses, SetSelfOpenbotAvatarData, SetSelfOpenbotAvatarErrors, SetSelfOpenbotAvatarResponses, SetSignalProviderOwnershipData, SetSignalProviderOwnershipResponses, SetSignalProviderVisibilityData, SetSignalProviderVisibilityResponses, SetSkillOwnershipModeData, SetSkillOwnershipModeResponses, SetSkillRegistryOwnershipModeData, SetSkillRegistryOwnershipModeResponses, SetSkillRegistryVisibilityData, SetSkillRegistryVisibilityResponses, SetSkillVisibilityData, SetSkillVisibilityResponses, SetUcOwnershipData, SetUcOwnershipResponses, SetUcVisibilityData, SetUcVisibilityResponses, SetWikiOwnershipModeData, SetWikiOwnershipModeResponses, SetWikiVisibilityData, SetWikiVisibilityResponses, SignalsAddPersonalProviderGrantData, SignalsAddPersonalProviderGrantResponses, SignalsCreatePersonalProviderInstanceData, SignalsCreatePersonalProviderInstanceResponses, SignalsCreateProviderInstanceData, SignalsCreateProviderInstanceResponses, SignalsDeletePersonalProviderInstanceData, SignalsDeletePersonalProviderInstanceResponses, SignalsDeleteProviderInstanceData, SignalsDeleteProviderInstanceResponses, SignalsGetDeliveryData, SignalsGetDeliveryResponses, SignalsGetPersonalDeliveryData, SignalsGetPersonalDeliveryResponses, SignalsGetPersonalProviderInstanceData, SignalsGetPersonalProviderInstanceResponses, SignalsGetProviderInstanceData, SignalsGetProviderInstanceResponses, SignalsListAvailableProvidersData, SignalsListAvailableProvidersResponses, SignalsListDeliveriesData, SignalsListDeliveriesResponses, SignalsListPersonalAvailableProvidersData, SignalsListPersonalAvailableProvidersResponses, SignalsListPersonalDeliveriesData, SignalsListPersonalDeliveriesResponses, SignalsListPersonalProviderGrantsData, SignalsListPersonalProviderGrantsResponses, SignalsListPersonalProviderInstancesData, SignalsListPersonalProviderInstancesResponses, SignalsListProviderInstancesData, SignalsListProviderInstancesResponses, SignalsRemovePersonalProviderGrantData, SignalsRemovePersonalProviderGrantResponses, SignalsRetryDeliveryData, SignalsRetryDeliveryResponses, SignalsRetryPersonalDeliveryData, SignalsRetryPersonalDeliveryResponses, SignalsSetPersonalProviderOwnershipData, SignalsSetPersonalProviderOwnershipResponses, SignalsSetPersonalProviderVisibilityData, SignalsSetPersonalProviderVisibilityResponses, SignalsTriggerFakeData, SignalsTriggerFakeResponses, SignalsUpdatePersonalProviderInstanceData, SignalsUpdatePersonalProviderInstanceResponses, SignalsUpdateProviderInstanceData, SignalsUpdateProviderInstanceResponses, StartCredentialSetupItemData, StartCredentialSetupItemResponses, StartOauthDeviceCodeData, StartOauthDeviceCodeErrors, StartOauthDeviceCodeResponses, StartProviderAppProvisioningData, StartProviderAppProvisioningResponses, StartProxiedMcpServerOauthData, StartProxiedMcpServerOauthErrors, StartProxiedMcpServerOauthResponses, StartUserCredentialBrokeringData, StartUserCredentialBrokeringResponses, StateExportData, StateExportErrors, StateExportResponses, StateGetImportData, StateGetImportResponses, StateImportData, StateImportEventsData, StateImportEventsResponses, StateImportResponses, StatePlanData, StatePlanResponses, StateResolveSourceData, StateResolveSourceErrors, StateResolveSourceResponses, StateSchemaData, StateSchemaJsonData, StateSchemaJsonResponses, StateSchemaResponses, StateValidateData, StateValidateResponses, TraverseWikiGraphData, TraverseWikiGraphResponses, UnbindToolGroupFromMcpServerData, UnbindToolGroupFromMcpServerErrors, UnbindToolGroupFromMcpServerResponses, UpdateCustomToolProviderData, UpdateCustomToolProviderResponses, UpdateHostedOpenbotComputerImageData, UpdateHostedOpenbotComputerImageErrors, UpdateHostedOpenbotComputerImageResponses, UpdateManagedUserCredentialData, UpdateManagedUserCredentialResponses, UpdateMcpServerInstanceData, UpdateMcpServerInstanceErrors, UpdateMcpServerInstanceFunctionData, UpdateMcpServerInstanceFunctionErrors, UpdateMcpServerInstanceFunctionResponses, UpdateMcpServerInstanceResponses, UpdateMemoryBankConfigData, UpdateMemoryBankConfigResponses, UpdateMemoryBankData, UpdateMemoryBankResponses, UpdateOrganizationData, UpdateOrganizationErrors, UpdateOrganizationMemberRoleData, UpdateOrganizationMemberRoleErrors, UpdateOrganizationMemberRoleResponses, UpdateOrganizationResponses, UpdateOrgOidcProviderData, UpdateOrgOidcProviderErrors, UpdateOrgOidcProviderResponses, UpdatePersonalMcpServerInstanceData, UpdatePersonalMcpServerInstanceResponses, UpdatePersonalMemoryBankConfigData, UpdatePersonalMemoryBankConfigResponses, UpdatePersonalMemoryBankData, UpdatePersonalMemoryBankResponses, UpdatePersonalSkillData, UpdatePersonalSkillRegistryData, UpdatePersonalSkillRegistryResponses, UpdatePersonalSkillResponses, UpdatePersonalToolGroupInstanceData, UpdatePersonalToolGroupInstanceResponses, UpdatePersonalWikiData, UpdatePersonalWikiPageData, UpdatePersonalWikiPageResponses, UpdatePersonalWikiResponses, UpdateResourceServerCredentialData, UpdateResourceServerCredentialResponses, UpdateSelfProfileData, UpdateSelfProfileErrors, UpdateSelfProfileResponses, UpdateSessionOwnershipData, UpdateSessionOwnershipErrors, UpdateSessionOwnershipResponses, UpdateSessionVisibilityData, UpdateSessionVisibilityErrors, UpdateSessionVisibilityResponses, UpdateSkillData, UpdateSkillErrors, UpdateSkillRegistryData, UpdateSkillRegistryErrors, UpdateSkillRegistryResponses, UpdateSkillResponses, UpdateTeamData, UpdateTeamErrors, UpdateTeamGroupData, UpdateTeamGroupErrors, UpdateTeamGroupResponses, UpdateTeamMemberRoleData, UpdateTeamMemberRoleErrors, UpdateTeamMemberRoleResponses, UpdateTeamResponses, UpdateToolBoundParamsData, UpdateToolBoundParamsErrors, UpdateToolBoundParamsResponses, UpdateToolGroupInstanceData, UpdateToolGroupInstanceErrors, UpdateToolGroupInstanceResponses, UpdateTrustedRuntimeData, UpdateTrustedRuntimeErrors, UpdateTrustedRuntimeResponses, UpdateUserCredentialData, UpdateUserCredentialResponses, UpdateWikiAssetData, UpdateWikiAssetResponses, UpdateWikiData, UpdateWikiPageData, UpdateWikiPageErrors, UpdateWikiPageRelationshipData, UpdateWikiPageRelationshipResponses, UpdateWikiPageResponses, UpdateWikiPageTypeData, UpdateWikiPageTypeErrors, UpdateWikiPageTypeResponses, UpdateWikiRelationshipTypeData, UpdateWikiRelationshipTypeErrors, UpdateWikiRelationshipTypeResponses, UpdateWikiResponses, UploadAttachmentContentData, UploadAttachmentContentErrors, UploadAttachmentContentResponses, UploadHostedOpenbotReleaseFileData, UploadHostedOpenbotReleaseFileErrors, UploadHostedOpenbotReleaseFileResponses, UploadSelfAvatarData, UploadSelfAvatarErrors, UploadSelfAvatarResponses, UploadWikiAssetContentData, UploadWikiAssetContentErrors, UploadWikiAssetContentResponses, UpsertWikiPageRelationshipData, UpsertWikiPageRelationshipErrors, UpsertWikiPageRelationshipResponses, ValidateWikiPageTypeDataData, ValidateWikiPageTypeDataResponses, VerifyOrgOidcProviderDomainData, VerifyOrgOidcProviderDomainErrors, VerifyOrgOidcProviderDomainResponses, WhoamiData, WhoamiErrors, WhoamiResponses } from './types.gen'; export type Options = Options2 & { /** @@ -85,7 +85,7 @@ export const billingMemoryBankReservationRelease = (options: Options): RequestResult => (options.client ?? client).post({ url: '/api/v1/billing/products/{product_id}/enroll', ...options }); @@ -904,9 +904,9 @@ export const expireTemporaryAccounts = (op export const listPublicAvailableToolGroups = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/mcp/available-tool-groups', ...options }); /** - * List unified automations + * List unified routines * - * Lists authoritative automation roots, filterable by agent and reconciliation status. + * Lists native Routine roots and their schedule or event triggers, filterable by agent. */ export const automationsList = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], @@ -915,35 +915,35 @@ export const automationsList = (options: O }); /** - * Delete a unified automation + * Delete a unified routine * - * Deletes all materialized members before deleting the authoritative root. + * Deletes the Routine root and cascading triggers when no schedule execution holds a live lease. */ export const automationsDelete = (options: Options): RequestResult => (options.client ?? client).delete({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}', + url: '/api/v1/team/{team_id}/automations/{routine_id}', ...options }); /** - * Get a unified automation + * Get a unified routine * - * Gets the persisted root, trigger membership, generation, and reconciliation status. + * Gets the native root, trigger configuration, schedule telemetry, and version. */ export const automationsGet = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}', + url: '/api/v1/team/{team_id}/automations/{routine_id}', ...options }); /** - * Create or replace a unified automation + * Create or replace a unified routine * - * Persists and serially reconciles desired schedule and event triggers. Reconciliation failure remains observable on the root. + * Atomically persists the Routine root and its complete native schedule/event trigger set. */ export const automationsPut = (options: Options): RequestResult => (options.client ?? client).put({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}', + url: '/api/v1/team/{team_id}/automations/{routine_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -952,13 +952,24 @@ export const automationsPut = (options: Op }); /** - * Set automation ownership + * List routine executions + * + * Lists durable manual, schedule, and event executions for one visible Routine. + */ +export const automationsListExecutions = (options: Options): RequestResult => (options.client ?? client).get({ + security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], + url: '/api/v1/team/{team_id}/automations/{routine_id}/executions', + ...options +}); + +/** + * Set routine ownership * * Sets the persisted ownership mode and preserves an effective-user grant when made private. */ export const automationsSetOwnership = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}/ownership', + url: '/api/v1/team/{team_id}/automations/{routine_id}/ownership', ...options, headers: { 'Content-Type': 'application/json', @@ -967,13 +978,13 @@ export const automationsSetOwnership = (op }); /** - * Run a unified automation + * Run a unified routine * * Runs once for the supplied durable run ID and returns the existing result on retry. */ export const automationsRun = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}/run', + url: '/api/v1/team/{team_id}/automations/{routine_id}/run', ...options, headers: { 'Content-Type': 'application/json', @@ -982,13 +993,13 @@ export const automationsRun = (options: Op }); /** - * Set automation visibility + * Set routine visibility * * Sets the persisted visibility mode and preserves an effective-user grant when made private. */ export const automationsSetVisibility = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}/visibility', + url: '/api/v1/team/{team_id}/automations/{routine_id}/visibility', ...options, headers: { 'Content-Type': 'application/json', @@ -997,24 +1008,24 @@ export const automationsSetVisibility = (o }); /** - * List automation grants + * List routine grants * - * Lists grants on the selected automation authorization plane. + * Lists grants on the selected routine authorization plane. */ export const automationsListGrants = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants', + url: '/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants', ...options }); /** - * Add an automation grant + * Add a routine grant * * Validates and adds a principal grant on the selected authorization plane. */ export const automationsAddGrant = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants', + url: '/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants', ...options, headers: { 'Content-Type': 'application/json', @@ -1023,13 +1034,13 @@ export const automationsAddGrant = (option }); /** - * Remove an automation grant + * Remove a routine grant * * Idempotently removes a principal grant while retaining at least one private ownership grant. */ export const automationsRemoveGrant = (options: Options): RequestResult => (options.client ?? client).delete({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants/{principal_type}/{principal_id}', + url: '/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants/{principal_type}/{principal_id}', ...options }); @@ -1158,7 +1169,7 @@ export const chatkitUpdateAgent = (options /** * Download a ChatKit agent avatar * - * Returns the canonical avatar bytes from the agent's stable machine-user profile. + * Returns the canonical avatar bytes from the stable agent-user profile. */ export const chatkitGetAgentAvatar = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], @@ -1169,7 +1180,7 @@ export const chatkitGetAgentAvatar = (opti /** * Upload a ChatKit agent avatar * - * Stores a PNG, JPEG, or WebP avatar on the agent's stable machine-user profile. + * Stores a PNG, JPEG, or WebP avatar on the stable agent-user profile. */ export const chatkitUpdateAgentAvatar = (options: Options): RequestResult => (options.client ?? client).put({ bodySerializer: null, @@ -1223,6 +1234,21 @@ export const chatkitUpdateAgentOwnership = (options: Options): RequestResult => (options.client ?? client).put({ + security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], + url: '/api/v1/team/{team_id}/chatkit/agents/{agent_id}/permissions', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + /** * Get Agent Resource Bundle provisioning * @@ -1568,100 +1594,6 @@ export const chatkitHydrateConvertedMessages = (options: Options): RequestResult => (options.client ?? client).get({ - security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/chatkit/routines', - ...options -}); - -/** - * Create a ChatKit routine - * - * Creates a minute-granularity UTC cron schedule that prompts one ChatKit agent. - */ -export const chatkitCreateRoutine = (options: Options): RequestResult => (options.client ?? client).post({ - security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/chatkit/routines', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete a ChatKit routine - * - * Deletes one scheduled prompt. - */ -export const chatkitDeleteRoutine = (options: Options): RequestResult => (options.client ?? client).delete({ - security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}', - ...options -}); - -/** - * Get a ChatKit routine - * - * Gets one scheduled prompt. - */ -export const chatkitGetRoutine = (options: Options): RequestResult => (options.client ?? client).get({ - security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}', - ...options -}); - -/** - * Update a ChatKit routine - * - * Updates a routine and recomputes its next UTC occurrence. - */ -export const chatkitUpdateRoutine = (options: Options): RequestResult => (options.client ?? client).patch({ - security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }], - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const setChatkitRoutineOwnership = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/ownership', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const setChatkitRoutineVisibility = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/visibility', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const listChatkitRoutineGrants = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants', ...options }); - -export const addChatkitRoutineGrant = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const removeChatkitRoutineGrant = (options: Options): RequestResult => (options.client ?? client).delete({ url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants/{principal_type}/{principal_id}', ...options }); - /** * List sessions * @@ -4142,86 +4074,6 @@ export const signalsTriggerFake = (options */ export const signalsListAvailableProviders = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/team/{team_id}/signals/providers', ...options }); -/** - * List SignalRules - * - * List SignalRules. - */ -export const signalsListRules = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/team/{team_id}/signals/rules', ...options }); - -/** - * Create SignalRule - * - * Create a SignalRule mapping incoming signals to ChatKit actions. - */ -export const signalsCreateRule = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/team/{team_id}/signals/rules', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const setSignalRuleOwnership = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/team/{team_id}/signals/rules/{id}/ownership', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const setSignalRuleVisibility = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/team/{team_id}/signals/rules/{id}/visibility', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const listSignalRuleGrants = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants', ...options }); - -export const addSignalRuleGrant = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const removeSignalRuleGrant = (options: Options): RequestResult => (options.client ?? client).delete({ url: '/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants/{principal_type}/{principal_id}', ...options }); - -/** - * Delete SignalRule - * - * Delete a SignalRule. - */ -export const signalsDeleteRule = (options: Options): RequestResult => (options.client ?? client).delete({ url: '/api/v1/team/{team_id}/signals/rules/{rule_id}', ...options }); - -/** - * Get SignalRule - * - * Get a SignalRule. - */ -export const signalsGetRule = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/team/{team_id}/signals/rules/{rule_id}', ...options }); - -/** - * Update SignalRule - * - * Update a SignalRule. - */ -export const signalsUpdateRule = (options: Options): RequestResult => (options.client ?? client).patch({ - url: '/api/v1/team/{team_id}/signals/rules/{rule_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - /** * List skills * @@ -5769,86 +5621,6 @@ export const signalsRemovePersonalProviderGrant = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/user/{user_id}/signals/providers', ...options }); -export const signalsListPersonalRules = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/user/{user_id}/signals/rules', ...options }); - -export const signalsCreatePersonalRule = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/user/{user_id}/signals/rules', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -export const signalsDeletePersonalRule = (options: Options): RequestResult => (options.client ?? client).delete({ url: '/api/v1/user/{user_id}/signals/rules/{rule_id}', ...options }); - -export const signalsGetPersonalRule = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/user/{user_id}/signals/rules/{rule_id}', ...options }); - -export const signalsUpdatePersonalRule = (options: Options): RequestResult => (options.client ?? client).patch({ - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set personal signal rule ownership - * - * Set the persisted ownership mode for a personal signal rule. Personal rules cannot be widened to team ownership. - */ -export const signalsSetPersonalRuleOwnership = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/ownership', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Set personal signal rule visibility - * - * Set the persisted visibility mode for a personal signal rule. Personal rules cannot be widened to team visibility. - */ -export const signalsSetPersonalRuleVisibility = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/visibility', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * List personal signal rule grants - * - * List persisted grants for one authorization plane on a personal signal rule. - */ -export const signalsListPersonalRuleGrants = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants', ...options }); - -/** - * Add personal signal rule grant - * - * Add a principal grant to the URL-selected authorization plane on a personal signal rule. - */ -export const signalsAddPersonalRuleGrant = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Remove personal signal rule grant - * - * Remove a principal grant from the URL-selected authorization plane on a personal signal rule. - */ -export const signalsRemovePersonalRuleGrant = (options: Options): RequestResult => (options.client ?? client).delete({ url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants/{principal_type}/{principal_id}', ...options }); - export const listPersonalSkills = (options: Options): RequestResult => (options.client ?? client).get({ url: '/api/v1/user/{user_id}/skill', ...options }); export const createPersonalSkill = (options: Options): RequestResult => (options.client ?? client).post({ diff --git a/packages/api-client/src/generated/types.gen.ts b/packages/api-client/src/generated/types.gen.ts index a0403874..54685197 100644 --- a/packages/api-client/src/generated/types.gen.ts +++ b/packages/api-client/src/generated/types.gen.ts @@ -50,6 +50,22 @@ export type AddTeamMemberBody = { user_id: string; }; +/** + * Authenticated agent identity. + * + * Represents an agent user that authenticated via an API key. + */ +export type Agent = { + /** + * Groups the agent belongs to. + */ + groups?: Array; + /** + * Subject identifier (user ID) of the agent account. + */ + sub: string; +}; + export enum AgentCredentialStrategy { PRESERVE = 'preserve', ROTATE = 'rotate' @@ -69,6 +85,20 @@ export enum AgentEventVisibility { DETAILS = 'details' } +/** + * Who an agent may pull into a session it creates. + */ +export type AgentMultiplayerPermissions = { + /** + * Agents the agent may add. + */ + with_agents?: AgentReachScope; + /** + * Tilde users the agent may add. + */ + with_users?: AgentReachScope; +}; + export type AgentObservabilityConfiguration = { policy: AgentObservabilityPolicy; tools: Array; @@ -85,6 +115,22 @@ export type AgentObservabilityPolicy = { updated_at: WrappedChronoDateTime; }; +/** + * The reach recorded on an agent record. + */ +export type AgentPermissions = { + /** + * Whether the agent may create a session with more than two parties, and + * who it may add. + */ + create_multiplayer_sessions?: AgentMultiplayerPermissions; + /** + * Whether the agent may open a private child conversation with another + * agent, and with which agents. + */ + delegate_to_other_agents?: AgentReachScope; +}; + export type AgentProvisioningOperation = { agent_id: string; attempts: number; @@ -115,6 +161,21 @@ export enum AgentProvisioningStatus { DEPROVISIONING = 'deprovisioning' } +/** + * Who an agent may reach for one kind of action. + */ +export type AgentReachScope = { + mode: 'none'; +} | { + mode: 'any'; +} | { + /** + * Agent inbox ids or Tilde user ids, depending on the field. + */ + ids: Array; + mode: 'only'; +}; + export type AgentSpec = { credential_strategy?: AgentCredentialStrategy; display_name: string; @@ -248,76 +309,6 @@ export type AutoProvisionToolGroupInstanceResponse = { tool_group_instance?: null | ToolGroupInstanceSerialized; }; -export type Automation = { - agent_id: string; - applied_generation: number; - authorization: ResourceAuthorizationModes; - created_at: WrappedChronoDateTime; - created_by_user_id: string; - enabled: boolean; - error_message?: string | null; - generation: number; - id: WrappedUuidV4; - instruction: string; - /** - * Execution error paired with the latest materialized schedule execution. - */ - last_error?: string | null; - last_run_at?: null | WrappedChronoDateTime; - last_session_id?: null | WrappedUuidV4; - name: string; - org_id: string; - status: AutomationStatus; - team_id: string; - triggers: Array; - updated_at: WrappedChronoDateTime; -}; - -export type AutomationPaginatedResponse = { - items: Array; - next_page_token?: string; -}; - -export enum AutomationStatus { - RECONCILING = 'reconciling', - ACTIVE = 'active', - ERROR = 'error', - DELETING = 'deleting' -} - -export type AutomationTrigger = AutomationTriggerSpec & { - created_at: WrappedChronoDateTime; - id: WrappedUuidV4; - /** - * Schedule-only live projection from the materialized ChatKit routine. - */ - last_error?: string | null; - last_run_at?: null | WrappedChronoDateTime; - last_session_id?: null | WrappedUuidV4; - materialized_resource_id?: null | WrappedUuidV4; - next_run_at?: null | WrappedChronoDateTime; - /** - * Schedule-only live projection from the materialized ChatKit routine. - */ - schedule_description?: string | null; - updated_at: WrappedChronoDateTime; -}; - -export type AutomationTriggerInput = AutomationTriggerSpec & { - id: WrappedUuidV4; -}; - -export type AutomationTriggerSpec = { - kind: 'schedule'; - schedule: string; -} | { - filter?: SignalRuleFilter; - kind: 'event'; - session_policy?: null | SignalSessionPolicy; - signal_provider_instance_id: string; - signal_type: string; -}; - /** * Typed billing bootstrap response for the selected organization. */ @@ -694,6 +685,30 @@ export enum ChatKitRealtimeTicketTransport { NATIVE = 'native' } +/** + * Public agent snapshot included in every signed HTTP-agent request. + */ +export type ChatKitRequestAgent = { + avatar?: null | ChatKitRequestAgentAvatar; + createdAt: WrappedChronoDateTime; + displayName: string; + id: string; + principalUserId?: string | null; + providerId: string; + status: InboxStatus; + updatedAt: WrappedChronoDateTime; +}; + +/** + * Agent avatar resource included in the signed HTTP-agent request context. + */ +export type ChatKitRequestAgentAvatar = { + /** + * Authenticated Tilde API path that serves the current avatar bytes. + */ + url: string; +}; + /** * Agent context included when an agent identity or display name matched. */ @@ -893,6 +908,7 @@ export type ChatMessagePart = { * Request body for chat completion in Vercel AI SDK format. */ export type ChatRequest = { + agent?: null | ChatKitRequestAgent; chatId?: string | null; messages: Array; session?: null | ChatSessionContext; @@ -1392,20 +1408,6 @@ export type CreateReverseProxyProfileInner = { user_credential_id?: null | WrappedUuidV4; }; -/** - * User-authored fields for a new routine. - */ -export type CreateRoutineRequestInner = { - agent_inbox_id: string; - authorization?: ResourceAuthorizationModes; - enabled?: boolean; - initial_grants?: Array; - metadata?: null | WrappedJsonValue; - prompt: string; - schedule: string; - title: string; -}; - /** * Inner create fields for a ChatKit session. */ @@ -1475,20 +1477,6 @@ export type CreateSignalProviderInstanceRequestInner = { webhook_endpoint_id?: string | null; }; -export type CreateSignalRuleRequestInner = { - action: SignalAction; - authorization?: ResourceAuthorizationModes; - display_name: string; - filter?: SignalRuleFilter; - id?: null | WrappedUuidV4; - initial_grants?: Array; - metadata?: null | WrappedJsonValue; - session_policy: SignalSessionPolicy; - signal_provider_instance_id: string; - signal_type: string; - target_team_id?: string | null; -}; - /** * Inner create-skill payload with tenant fields supplied by the wrapper. */ @@ -1757,7 +1745,7 @@ export type CredentialSourceSerialized = { }; /** - * Current caller's seat state. Machine identities never consume seats. + * Current caller's seat state. Agent identities never consume seats. */ export enum CurrentSeatStatus { ACTIVE = 'active', @@ -1824,10 +1812,6 @@ export type DebugAuthProfilesResponse = { profiles: Array; }; -export type DeleteAutomationResponse = { - deleted: boolean; -}; - export type DeleteChatKitAgentTurnQueueItemResponse = { deleted: boolean; }; @@ -1850,9 +1834,6 @@ export type DeleteMessageResponse = { success: boolean; }; -/** - * Routine deletion response. - */ export type DeleteRoutineResponse = { deleted: boolean; }; @@ -2292,15 +2273,11 @@ export type HydrateConvertedMessagesResponse = { * This is the result of authentication and is used throughout the system * for authorization decisions. */ -export type Identity = (Machine & { - type: 'machine'; +export type Identity = (Agent & { + type: 'agent'; }) | (Human & { type: 'human'; }) | { - human: Human; - machine: Machine; - type: 'machine_on_behalf_of_human'; -} | { type: 'unauthenticated'; }; @@ -2345,19 +2322,33 @@ export type ImportStateResponse = { * Cross-crate public inbox view. */ export type Inbox = { + agent_permissions?: null | AgentPermissions; + api_key_id?: string | null; authorization: ResourceAuthorizationModes; common_provider_installation_id?: string | null; + concurrency_policy?: string | null; configuration: WrappedJsonValue; created_at: WrappedChronoDateTime; created_by_user_id?: string | null; + /** + * Human-readable name. Unique per team and inbox type. + */ + display_name?: string | null; + /** + * Agent HTTP endpoint. `None` for anything that is not an agent. + */ + endpoint_url?: string | null; id: string; inbox_type?: InboxType; + local_running_endpoint?: boolean | null; lookup_key?: string | null; message_format?: null | MessageFormatConfig; org_id: string; provider_id: string; status: InboxStatus; + streaming?: boolean | null; team_id: string; + timeout_ms?: number | null; updated_at: WrappedChronoDateTime; }; @@ -2595,22 +2586,6 @@ export type LoginProviderResolution = { type: 'custom_oidc'; }; -/** - * Authenticated machine identity. - * - * Represents an API client or automated service that authenticated via API key. - */ -export type Machine = { - /** - * System groups the machine belongs to (e.g. `["tilde_system:admin"]`) - */ - groups?: Array; - /** - * Subject identifier (user ID) of the machine account - */ - sub: string; -}; - export type ManagedSkillSelection = { provider_id: string; skill_ids: Array; @@ -3692,14 +3667,16 @@ export type ProxyCredentialTemplate = { kind: 'query_param'; }; -export type PutAutomationBody = { +export type PutRoutineBody = { agent_id: string; authorization?: ResourceAuthorizationModes; enabled?: boolean; + expected_version?: number | null; initial_grants?: Array; instruction: string; + metadata?: null | WrappedJsonValue; name: string; - triggers: Array; + triggers: Array; }; /** @@ -4215,34 +4192,48 @@ export type RotateCustomToolProviderSigningKeyResponse = { signing_key_metadata: WebhookSigningKeyMetadata; }; -/** - * A recurring prompt scheduled against one ChatKit agent. - */ export type Routine = { - agent_inbox_id: string; + agent_id: string; authorization: ResourceAuthorizationModes; created_at: WrappedChronoDateTime; - created_by_user_id?: string | null; + created_by_user_id: string; enabled: boolean; id: WrappedUuidV4; + instruction: string; last_error?: string | null; last_run_at?: null | WrappedChronoDateTime; last_session_id?: null | WrappedUuidV4; metadata?: null | WrappedJsonValue; - next_run_at: WrappedChronoDateTime; + name: string; org_id: string; - prompt: string; - /** - * Minute-granularity cron expression evaluated in UTC. - */ - schedule: string; - /** - * Human-readable rendering of `schedule`. - */ - schedule_description: string; team_id: string; - title: string; + triggers: Array; updated_at: WrappedChronoDateTime; + version: number; +}; + +export enum RoutineEventInstructionPolicy { + SIGNAL_ONLY = 'signal_only', + SIGNAL_AND_INSTRUCTION = 'signal_and_instruction' +} + +export type RoutineExecution = { + completed_at?: null | WrappedChronoDateTime; + error?: string | null; + id: WrappedUuidV4; + org_id: string; + routine_id: WrappedUuidV4; + session_id?: null | WrappedUuidV4; + signal_delivery_id?: null | WrappedUuidV4; + started_at: WrappedChronoDateTime; + status: string; + team_id: string; + trigger_id?: null | WrappedUuidV4; +}; + +export type RoutineExecutionPaginatedResponse = { + items: Array; + next_page_token?: string; }; export type RoutinePaginatedResponse = { @@ -4250,14 +4241,43 @@ export type RoutinePaginatedResponse = { next_page_token?: string; }; -export type RunAutomationBody = { - /** - * Stable client run identity used for deduplication. - */ +export type RoutineTrigger = RoutineTriggerSpec & { + created_at: WrappedChronoDateTime; + enabled: boolean; + id: WrappedUuidV4; + last_error?: string | null; + last_run_at?: null | WrappedChronoDateTime; + last_session_id?: null | WrappedUuidV4; + metadata?: null | WrappedJsonValue; + next_run_at?: null | WrappedChronoDateTime; + schedule_description?: string | null; + updated_at: WrappedChronoDateTime; +}; + +export type RoutineTriggerInput = RoutineTriggerSpec & { + enabled?: boolean; + id: WrappedUuidV4; + metadata?: null | WrappedJsonValue; +}; + +export type RoutineTriggerSpec = { + kind: 'schedule'; + schedule: string; +} | { + action?: null | SignalAction; + filter?: SignalRuleFilter; + instruction_policy?: RoutineEventInstructionPolicy; + kind: 'event'; + session_policy?: null | SignalSessionPolicy; + signal_provider_instance_id: string; + signal_type: string; +}; + +export type RunRoutineBody = { run_id: WrappedUuidV4; }; -export type RunAutomationResponse = { +export type RunRoutineResponse = { duplicate: boolean; run_id: WrappedUuidV4; session_id: WrappedUuidV4; @@ -4428,7 +4448,7 @@ export type SignalDelivery = { [key: string]: unknown; }; id: WrappedUuidV4; - matched_rule_ids: Array; + matched_trigger_ids: Array; org_id: string; provider_delivery_id: string; provider_endpoint: string; @@ -4444,6 +4464,11 @@ export type SignalDelivery = { updated_at: WrappedChronoDateTime; }; +export type SignalDeliveryPaginatedResponse = { + items: Array; + next_page_token?: string; +}; + export enum SignalDeliveryStatus { PENDING = 'pending', PROCESSING = 'processing', @@ -4535,6 +4560,11 @@ export type SignalProviderInstance = { webhook_endpoint_id?: string | null; }; +export type SignalProviderInstancePaginatedResponse = { + items: Array; + next_page_token?: string; +}; + export enum SignalProviderInstanceStatus { ENABLED = 'enabled', DISABLED = 'disabled' @@ -4562,38 +4592,15 @@ export type SignalProviderSourceSerialized = { webhook_verification?: null | SignalWebhookVerificationDescriptor; }; -export type SignalRule = { - action: SignalAction; - authorization?: ResourceAuthorizationModes; - created_at: WrappedChronoDateTime; - created_by_user_id?: string | null; - display_name: string; - filter: SignalRuleFilter; - id: WrappedUuidV4; - metadata?: null | WrappedJsonValue; - org_id: string; - session_policy: SignalSessionPolicy; - signal_provider_instance_id: string; - signal_type: string; - status: SignalRuleStatus; - /** - * Team in which ChatKit sessions and agent actions execute. Personal - * rules require this explicit target and create user_team sessions. - */ - target_team_id: string; - team_id?: string | null; - updated_at: WrappedChronoDateTime; +export type SignalProviderSourceSerializedPaginatedResponse = { + items: Array; + next_page_token?: string; }; export type SignalRuleFilter = { json_equals?: Array; }; -export enum SignalRuleStatus { - ENABLED = 'enabled', - DISABLED = 'disabled' -} - export type SignalSessionPolicy = { session_id: WrappedUuidV4; type: 'fixed_session'; @@ -5120,12 +5127,12 @@ export type ToolConfigPaginatedResponse = { }; export type ToolDeploymentWithGroupSerialized = { - categories: WrappedJsonValue; + categories: Array; created_at: WrappedChronoDateTime; documentation: string; metadata: Metadata; name: string; - tool_group_categories: WrappedJsonValue; + tool_group_categories: Array; tool_group_deployment_deployment_id: string; tool_group_deployment_type_id: string; tool_group_documentation: string; @@ -5582,18 +5589,6 @@ export type UpdateReverseProxyProfileInner = { user_credential_id?: null | WrappedUuidV4; }; -/** - * User-authored fields for editing a routine. - */ -export type UpdateRoutineRequestInner = { - agent_inbox_id?: string | null; - enabled?: boolean | null; - metadata?: null | WrappedJsonValue; - prompt?: string | null; - schedule?: string | null; - title?: string | null; -}; - export type UpdateSelfProfileRequest = { display_name?: string | null; }; @@ -5614,15 +5609,6 @@ export type UpdateSignalProviderInstanceRequestInner = { status: SignalProviderInstanceStatus; }; -export type UpdateSignalRuleRequestInner = { - action: SignalAction; - display_name: string; - filter?: SignalRuleFilter; - metadata?: null | WrappedJsonValue; - session_policy: SignalSessionPolicy; - status: SignalRuleStatus; -}; - export type UpdateSkillBody = { content?: string | null; description?: string | null; @@ -5708,7 +5694,7 @@ export type UpsertWikiPageBody = { /** * A user entity in the system. * - * Represents both human users and machine accounts with their associated metadata. + * Represents both human and agent users with their associated metadata. */ export type User = { avatar?: null | UserAvatar; @@ -5725,7 +5711,7 @@ export type User = { */ display_name?: string | null; /** - * Email address (required for human users, optional for machines) + * Email address (required for human users, optional for agents). */ email?: string | null; /** @@ -5737,13 +5723,13 @@ export type User = { */ updated_at: WrappedChronoDateTime; /** - * Whether this is a machine or human user + * Whether this is an agent or human user. */ user_type: UserType; }; /** - * Uploaded profile image metadata for a human or machine user. + * Uploaded profile image metadata for a human or agent user. */ export type UserAvatar = { bucket: string; @@ -5835,10 +5821,10 @@ export type UserToolFederationSelection = { /** * Type of user identity in the system. * - * Distinguishes between automated services and real users. + * Distinguishes first-class agent users from human users. */ export enum UserType { - MACHINE = 'machine', + AGENT = 'agent', HUMAN = 'human' } @@ -6382,7 +6368,7 @@ export type BillingProductEnrollCurrentHumanData = { export type BillingProductEnrollCurrentHumanErrors = { /** - * Unknown product or machine caller + * Unknown product or agent caller */ 400: Error; /** @@ -7342,7 +7328,7 @@ export type ListOrganizationMembersData = { page_size?: number; next_page_token?: string; /** - * Filter to `human` users or `machine` agents. + * Filter to `human` or `agent` users. */ user_type?: string; }; @@ -7927,7 +7913,7 @@ export type ListOrganizationTeamGroupsData = { page_size?: number; next_page_token?: string; /** - * Filter to `human` users or `machine` agents. + * Filter to `human` or `agent` users. */ user_type?: string; }; @@ -8290,7 +8276,7 @@ export type ListTeamGroupsData = { page_size?: number; next_page_token?: string; /** - * Filter to `human` users or `machine` agents. + * Filter to `human` or `agent` users. */ user_type?: string; }; @@ -8456,7 +8442,7 @@ export type ListTeamGroupMembersData = { page_size?: number; next_page_token?: string; /** - * Filter to `human` users or `machine` agents. + * Filter to `human` or `agent` users. */ user_type?: string; }; @@ -8613,7 +8599,7 @@ export type ListTeamMembersData = { page_size?: number; next_page_token?: string; /** - * Filter to `human` users or `machine` agents. + * Filter to `human` or `agent` users. */ user_type?: string; }; @@ -8965,7 +8951,6 @@ export type AutomationsListData = { }; query?: { agent_id?: string | null; - status?: null | AutomationStatus; page_size?: number; next_page_token?: string | null; }; @@ -8973,7 +8958,7 @@ export type AutomationsListData = { }; export type AutomationsListResponses = { - 200: AutomationPaginatedResponse; + 200: RoutinePaginatedResponse; }; export type AutomationsListResponse = AutomationsListResponses[keyof AutomationsListResponses]; @@ -8985,14 +8970,14 @@ export type AutomationsDeleteData = { * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}'; + url: '/api/v1/team/{team_id}/automations/{routine_id}'; }; export type AutomationsDeleteResponses = { - 200: DeleteAutomationResponse; + 200: DeleteRoutineResponse; }; export type AutomationsDeleteResponse = AutomationsDeleteResponses[keyof AutomationsDeleteResponses]; @@ -9004,10 +8989,10 @@ export type AutomationsGetData = { * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}'; + url: '/api/v1/team/{team_id}/automations/{routine_id}'; }; export type AutomationsGetErrors = { @@ -9017,22 +9002,22 @@ export type AutomationsGetErrors = { export type AutomationsGetError = AutomationsGetErrors[keyof AutomationsGetErrors]; export type AutomationsGetResponses = { - 200: Automation; + 200: Routine; }; export type AutomationsGetResponse = AutomationsGetResponses[keyof AutomationsGetResponses]; export type AutomationsPutData = { - body: PutAutomationBody; + body: PutRoutineBody; path: { /** * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}'; + url: '/api/v1/team/{team_id}/automations/{routine_id}'; }; export type AutomationsPutErrors = { @@ -9042,11 +9027,34 @@ export type AutomationsPutErrors = { export type AutomationsPutError = AutomationsPutErrors[keyof AutomationsPutErrors]; export type AutomationsPutResponses = { - 200: Automation; + 200: Routine; }; export type AutomationsPutResponse = AutomationsPutResponses[keyof AutomationsPutResponses]; +export type AutomationsListExecutionsData = { + body?: never; + path: { + /** + * Team ID + */ + team_id: string; + routine_id: WrappedUuidV4; + }; + query?: { + agent_id?: string | null; + page_size?: number; + next_page_token?: string | null; + }; + url: '/api/v1/team/{team_id}/automations/{routine_id}/executions'; +}; + +export type AutomationsListExecutionsResponses = { + 200: RoutineExecutionPaginatedResponse; +}; + +export type AutomationsListExecutionsResponse = AutomationsListExecutionsResponses[keyof AutomationsListExecutionsResponses]; + export type AutomationsSetOwnershipData = { body: SetResourceAccessModeRequest; path: { @@ -9054,10 +9062,10 @@ export type AutomationsSetOwnershipData = { * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}/ownership'; + url: '/api/v1/team/{team_id}/automations/{routine_id}/ownership'; }; export type AutomationsSetOwnershipResponses = { @@ -9067,20 +9075,20 @@ export type AutomationsSetOwnershipResponses = { export type AutomationsSetOwnershipResponse = AutomationsSetOwnershipResponses[keyof AutomationsSetOwnershipResponses]; export type AutomationsRunData = { - body: RunAutomationBody; + body: RunRoutineBody; path: { /** * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}/run'; + url: '/api/v1/team/{team_id}/automations/{routine_id}/run'; }; export type AutomationsRunResponses = { - 200: RunAutomationResponse; + 200: RunRoutineResponse; }; export type AutomationsRunResponse = AutomationsRunResponses[keyof AutomationsRunResponses]; @@ -9092,10 +9100,10 @@ export type AutomationsSetVisibilityData = { * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}/visibility'; + url: '/api/v1/team/{team_id}/automations/{routine_id}/visibility'; }; export type AutomationsSetVisibilityResponses = { @@ -9111,11 +9119,11 @@ export type AutomationsListGrantsData = { * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; plane: ResourceGrantPlane; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants'; + url: '/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants'; }; export type AutomationsListGrantsResponses = { @@ -9131,11 +9139,11 @@ export type AutomationsAddGrantData = { * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; plane: ResourceGrantPlane; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants'; + url: '/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants'; }; export type AutomationsAddGrantResponses = { @@ -9151,13 +9159,13 @@ export type AutomationsRemoveGrantData = { * Team ID */ team_id: string; - automation_id: WrappedUuidV4; + routine_id: WrappedUuidV4; plane: ResourceGrantPlane; principal_type: ResourcePrincipalType; principal_id: string; }; query?: never; - url: '/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants/{principal_type}/{principal_id}'; + url: '/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants/{principal_type}/{principal_id}'; }; export type AutomationsRemoveGrantResponses = { @@ -9641,6 +9649,40 @@ export type ChatkitUpdateAgentOwnershipResponses = { export type ChatkitUpdateAgentOwnershipResponse = ChatkitUpdateAgentOwnershipResponses[keyof ChatkitUpdateAgentOwnershipResponses]; +export type ChatkitSetAgentPermissionsData = { + body: AgentPermissions; + path: { + /** + * Team ID + */ + team_id: string; + /** + * ChatKit agent inbox ID + */ + agent_id: string; + }; + query?: never; + url: '/api/v1/team/{team_id}/chatkit/agents/{agent_id}/permissions'; +}; + +export type ChatkitSetAgentPermissionsErrors = { + 400: Error; + 403: Error; + 404: Error; + 500: Error; +}; + +export type ChatkitSetAgentPermissionsError = ChatkitSetAgentPermissionsErrors[keyof ChatkitSetAgentPermissionsErrors]; + +export type ChatkitSetAgentPermissionsResponses = { + /** + * Update what a ChatKit agent may reach + */ + 200: ChatKitAgent; +}; + +export type ChatkitSetAgentPermissionsResponse = ChatkitSetAgentPermissionsResponses[keyof ChatkitSetAgentPermissionsResponses]; + export type ChatkitGetAgentResourceBundleProvisioningData = { body?: never; path: { @@ -10432,237 +10474,6 @@ export type ChatkitHydrateConvertedMessagesResponses = { export type ChatkitHydrateConvertedMessagesResponse = ChatkitHydrateConvertedMessagesResponses[keyof ChatkitHydrateConvertedMessagesResponses]; -export type ChatkitListRoutinesData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - }; - query?: { - page_size?: number; - next_page_token?: string | null; - }; - url: '/api/v1/team/{team_id}/chatkit/routines'; -}; - -export type ChatkitListRoutinesResponses = { - /** - * Routine list - */ - 200: RoutinePaginatedResponse; -}; - -export type ChatkitListRoutinesResponse = ChatkitListRoutinesResponses[keyof ChatkitListRoutinesResponses]; - -export type ChatkitCreateRoutineData = { - body: CreateRoutineRequestInner; - path: { - /** - * Team ID - */ - team_id: string; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines'; -}; - -export type ChatkitCreateRoutineErrors = { - /** - * Invalid schedule or routine - */ - 400: Error; - /** - * Internal Server Error - */ - 500: Error; -}; - -export type ChatkitCreateRoutineError = ChatkitCreateRoutineErrors[keyof ChatkitCreateRoutineErrors]; - -export type ChatkitCreateRoutineResponses = { - /** - * Created routine - */ - 200: Routine; -}; - -export type ChatkitCreateRoutineResponse = ChatkitCreateRoutineResponses[keyof ChatkitCreateRoutineResponses]; - -export type ChatkitDeleteRoutineData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - /** - * Routine ID - */ - routine_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}'; -}; - -export type ChatkitDeleteRoutineResponses = { - /** - * Deletion result - */ - 200: DeleteRoutineResponse; -}; - -export type ChatkitDeleteRoutineResponse = ChatkitDeleteRoutineResponses[keyof ChatkitDeleteRoutineResponses]; - -export type ChatkitGetRoutineData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - /** - * Routine ID - */ - routine_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}'; -}; - -export type ChatkitGetRoutineResponses = { - /** - * Routine - */ - 200: Routine; -}; - -export type ChatkitGetRoutineResponse = ChatkitGetRoutineResponses[keyof ChatkitGetRoutineResponses]; - -export type ChatkitUpdateRoutineData = { - body: UpdateRoutineRequestInner; - path: { - /** - * Team ID - */ - team_id: string; - /** - * Routine ID - */ - routine_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}'; -}; - -export type ChatkitUpdateRoutineResponses = { - /** - * Updated routine - */ - 200: Routine; -}; - -export type ChatkitUpdateRoutineResponse = ChatkitUpdateRoutineResponses[keyof ChatkitUpdateRoutineResponses]; - -export type SetChatkitRoutineOwnershipData = { - body: SetResourceAccessModeRequest; - path: { - /** - * Team ID - */ - team_id: string; - routine_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/ownership'; -}; - -export type SetChatkitRoutineOwnershipResponses = { - 200: ResourceAuthorization; -}; - -export type SetChatkitRoutineOwnershipResponse = SetChatkitRoutineOwnershipResponses[keyof SetChatkitRoutineOwnershipResponses]; - -export type SetChatkitRoutineVisibilityData = { - body: SetResourceAccessModeRequest; - path: { - /** - * Team ID - */ - team_id: string; - routine_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/visibility'; -}; - -export type SetChatkitRoutineVisibilityResponses = { - 200: ResourceAuthorization; -}; - -export type SetChatkitRoutineVisibilityResponse = SetChatkitRoutineVisibilityResponses[keyof SetChatkitRoutineVisibilityResponses]; - -export type ListChatkitRoutineGrantsData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - routine_id: WrappedUuidV4; - plane: ResourceGrantPlane; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants'; -}; - -export type ListChatkitRoutineGrantsResponses = { - 200: Array; -}; - -export type ListChatkitRoutineGrantsResponse = ListChatkitRoutineGrantsResponses[keyof ListChatkitRoutineGrantsResponses]; - -export type AddChatkitRoutineGrantData = { - body: CreateResourcePlaneGrantRequest; - path: { - /** - * Team ID - */ - team_id: string; - routine_id: WrappedUuidV4; - plane: ResourceGrantPlane; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants'; -}; - -export type AddChatkitRoutineGrantResponses = { - 200: ResourceGrant; -}; - -export type AddChatkitRoutineGrantResponse = AddChatkitRoutineGrantResponses[keyof AddChatkitRoutineGrantResponses]; - -export type RemoveChatkitRoutineGrantData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - routine_id: WrappedUuidV4; - plane: ResourceGrantPlane; - principal_type: ResourcePrincipalType; - principal_id: string; - }; - query?: never; - url: '/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants/{principal_type}/{principal_id}'; -}; - -export type RemoveChatkitRoutineGrantResponses = { - 200: unknown; -}; - export type ListSessionsData = { body?: never; path: { @@ -17029,7 +16840,7 @@ export type SignalsListDeliveriesData = { }; export type SignalsListDeliveriesResponses = { - 200: Array; + 200: SignalDeliveryPaginatedResponse; }; export type SignalsListDeliveriesResponse = SignalsListDeliveriesResponses[keyof SignalsListDeliveriesResponses]; @@ -17090,7 +16901,7 @@ export type SignalsListProviderInstancesData = { }; export type SignalsListProviderInstancesResponses = { - 200: Array; + 200: SignalProviderInstancePaginatedResponse; }; export type SignalsListProviderInstancesResponse = SignalsListProviderInstancesResponses[keyof SignalsListProviderInstancesResponses]; @@ -17303,207 +17114,11 @@ export type SignalsListAvailableProvidersData = { }; export type SignalsListAvailableProvidersResponses = { - 200: Array; + 200: SignalProviderSourceSerializedPaginatedResponse; }; export type SignalsListAvailableProvidersResponse = SignalsListAvailableProvidersResponses[keyof SignalsListAvailableProvidersResponses]; -export type SignalsListRulesData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - }; - query?: { - page_size?: number; - next_page_token?: string; - instance_id?: string; - status?: string; - }; - url: '/api/v1/team/{team_id}/signals/rules'; -}; - -export type SignalsListRulesResponses = { - 200: Array; -}; - -export type SignalsListRulesResponse = SignalsListRulesResponses[keyof SignalsListRulesResponses]; - -export type SignalsCreateRuleData = { - body: CreateSignalRuleRequestInner; - path: { - /** - * Team ID - */ - team_id: string; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules'; -}; - -export type SignalsCreateRuleResponses = { - 200: SignalRule; -}; - -export type SignalsCreateRuleResponse = SignalsCreateRuleResponses[keyof SignalsCreateRuleResponses]; - -export type SetSignalRuleOwnershipData = { - body: SetResourceAccessModeRequest; - path: { - /** - * Team ID - */ - team_id: string; - id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{id}/ownership'; -}; - -export type SetSignalRuleOwnershipResponses = { - 200: ResourceAuthorization; -}; - -export type SetSignalRuleOwnershipResponse = SetSignalRuleOwnershipResponses[keyof SetSignalRuleOwnershipResponses]; - -export type SetSignalRuleVisibilityData = { - body: SetResourceAccessModeRequest; - path: { - /** - * Team ID - */ - team_id: string; - id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{id}/visibility'; -}; - -export type SetSignalRuleVisibilityResponses = { - 200: ResourceAuthorization; -}; - -export type SetSignalRuleVisibilityResponse = SetSignalRuleVisibilityResponses[keyof SetSignalRuleVisibilityResponses]; - -export type ListSignalRuleGrantsData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - id: WrappedUuidV4; - plane: ResourceGrantPlane; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants'; -}; - -export type ListSignalRuleGrantsResponses = { - 200: Array; -}; - -export type ListSignalRuleGrantsResponse = ListSignalRuleGrantsResponses[keyof ListSignalRuleGrantsResponses]; - -export type AddSignalRuleGrantData = { - body: CreateResourcePlaneGrantRequest; - path: { - /** - * Team ID - */ - team_id: string; - id: WrappedUuidV4; - plane: ResourceGrantPlane; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants'; -}; - -export type AddSignalRuleGrantResponses = { - 200: ResourceGrant; -}; - -export type AddSignalRuleGrantResponse = AddSignalRuleGrantResponses[keyof AddSignalRuleGrantResponses]; - -export type RemoveSignalRuleGrantData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - id: WrappedUuidV4; - plane: ResourceGrantPlane; - principal_type: ResourcePrincipalType; - principal_id: string; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants/{principal_type}/{principal_id}'; -}; - -export type RemoveSignalRuleGrantResponses = { - 200: unknown; -}; - -export type SignalsDeleteRuleData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{rule_id}'; -}; - -export type SignalsDeleteRuleResponses = { - 200: DeleteSignalResponse; -}; - -export type SignalsDeleteRuleResponse = SignalsDeleteRuleResponses[keyof SignalsDeleteRuleResponses]; - -export type SignalsGetRuleData = { - body?: never; - path: { - /** - * Team ID - */ - team_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{rule_id}'; -}; - -export type SignalsGetRuleResponses = { - 200: SignalRule; -}; - -export type SignalsGetRuleResponse = SignalsGetRuleResponses[keyof SignalsGetRuleResponses]; - -export type SignalsUpdateRuleData = { - body: UpdateSignalRuleRequestInner; - path: { - /** - * Team ID - */ - team_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/team/{team_id}/signals/rules/{rule_id}'; -}; - -export type SignalsUpdateRuleResponses = { - 200: SignalRule; -}; - -export type SignalsUpdateRuleResponse = SignalsUpdateRuleResponses[keyof SignalsUpdateRuleResponses]; - export type ListSkillsData = { body?: never; path: { @@ -21271,7 +20886,7 @@ export type SignalsListPersonalDeliveriesData = { }; export type SignalsListPersonalDeliveriesResponses = { - 200: Array; + 200: SignalDeliveryPaginatedResponse; }; export type SignalsListPersonalDeliveriesResponse = SignalsListPersonalDeliveriesResponses[keyof SignalsListPersonalDeliveriesResponses]; @@ -21323,7 +20938,7 @@ export type SignalsListPersonalProviderInstancesData = { }; export type SignalsListPersonalProviderInstancesResponses = { - 200: Array; + 200: SignalProviderInstancePaginatedResponse; }; export type SignalsListPersonalProviderInstancesResponse = SignalsListPersonalProviderInstancesResponses[keyof SignalsListPersonalProviderInstancesResponses]; @@ -21487,177 +21102,11 @@ export type SignalsListPersonalAvailableProvidersData = { }; export type SignalsListPersonalAvailableProvidersResponses = { - 200: Array; + 200: SignalProviderSourceSerializedPaginatedResponse; }; export type SignalsListPersonalAvailableProvidersResponse = SignalsListPersonalAvailableProvidersResponses[keyof SignalsListPersonalAvailableProvidersResponses]; -export type SignalsListPersonalRulesData = { - body?: never; - path: { - user_id: string; - }; - query?: { - page_size?: number; - next_page_token?: string; - instance_id?: string; - status?: string; - }; - url: '/api/v1/user/{user_id}/signals/rules'; -}; - -export type SignalsListPersonalRulesResponses = { - 200: Array; -}; - -export type SignalsListPersonalRulesResponse = SignalsListPersonalRulesResponses[keyof SignalsListPersonalRulesResponses]; - -export type SignalsCreatePersonalRuleData = { - body: CreateSignalRuleRequestInner; - path: { - user_id: string; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules'; -}; - -export type SignalsCreatePersonalRuleResponses = { - 200: SignalRule; -}; - -export type SignalsCreatePersonalRuleResponse = SignalsCreatePersonalRuleResponses[keyof SignalsCreatePersonalRuleResponses]; - -export type SignalsDeletePersonalRuleData = { - body?: never; - path: { - user_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}'; -}; - -export type SignalsDeletePersonalRuleResponses = { - 200: DeleteSignalResponse; -}; - -export type SignalsDeletePersonalRuleResponse = SignalsDeletePersonalRuleResponses[keyof SignalsDeletePersonalRuleResponses]; - -export type SignalsGetPersonalRuleData = { - body?: never; - path: { - user_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}'; -}; - -export type SignalsGetPersonalRuleResponses = { - 200: SignalRule; -}; - -export type SignalsGetPersonalRuleResponse = SignalsGetPersonalRuleResponses[keyof SignalsGetPersonalRuleResponses]; - -export type SignalsUpdatePersonalRuleData = { - body: UpdateSignalRuleRequestInner; - path: { - user_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}'; -}; - -export type SignalsUpdatePersonalRuleResponses = { - 200: SignalRule; -}; - -export type SignalsUpdatePersonalRuleResponse = SignalsUpdatePersonalRuleResponses[keyof SignalsUpdatePersonalRuleResponses]; - -export type SignalsSetPersonalRuleOwnershipData = { - body: SetResourceAccessModeRequest; - path: { - user_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/ownership'; -}; - -export type SignalsSetPersonalRuleOwnershipResponses = { - 200: ResourceAuthorization; -}; - -export type SignalsSetPersonalRuleOwnershipResponse = SignalsSetPersonalRuleOwnershipResponses[keyof SignalsSetPersonalRuleOwnershipResponses]; - -export type SignalsSetPersonalRuleVisibilityData = { - body: SetResourceAccessModeRequest; - path: { - user_id: string; - rule_id: WrappedUuidV4; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/visibility'; -}; - -export type SignalsSetPersonalRuleVisibilityResponses = { - 200: ResourceAuthorization; -}; - -export type SignalsSetPersonalRuleVisibilityResponse = SignalsSetPersonalRuleVisibilityResponses[keyof SignalsSetPersonalRuleVisibilityResponses]; - -export type SignalsListPersonalRuleGrantsData = { - body?: never; - path: { - user_id: string; - rule_id: WrappedUuidV4; - plane: ResourceGrantPlane; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants'; -}; - -export type SignalsListPersonalRuleGrantsResponses = { - 200: Array; -}; - -export type SignalsListPersonalRuleGrantsResponse = SignalsListPersonalRuleGrantsResponses[keyof SignalsListPersonalRuleGrantsResponses]; - -export type SignalsAddPersonalRuleGrantData = { - body: CreateResourcePlaneGrantRequest; - path: { - user_id: string; - rule_id: WrappedUuidV4; - plane: ResourceGrantPlane; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants'; -}; - -export type SignalsAddPersonalRuleGrantResponses = { - 200: ResourceGrant; -}; - -export type SignalsAddPersonalRuleGrantResponse = SignalsAddPersonalRuleGrantResponses[keyof SignalsAddPersonalRuleGrantResponses]; - -export type SignalsRemovePersonalRuleGrantData = { - body?: never; - path: { - user_id: string; - rule_id: WrappedUuidV4; - plane: ResourceGrantPlane; - principal_type: ResourcePrincipalType; - principal_id: string; - }; - query?: never; - url: '/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants/{principal_type}/{principal_id}'; -}; - -export type SignalsRemovePersonalRuleGrantResponses = { - 200: unknown; -}; - export type ListPersonalSkillsData = { body?: never; path: { diff --git a/packages/client-runtime/README.md b/packages/client-runtime/README.md index e16fb2a3..148fdc74 100644 --- a/packages/client-runtime/README.md +++ b/packages/client-runtime/README.md @@ -19,6 +19,11 @@ Framework-neutral client behavior shared by OpenBot web and Electron clients. - `contracts/attachments` owns attachment metadata and upload handshakes. - `contracts/queue` owns queued agent turns. - `contracts/connectors` owns connector (Tilde tool-provider) configuration: the `configure_connector` tool's `connector_selection` payload, provider and account schemas, `connectorSetupFields` schema-to-form flattening, `connectorAuthorizedReturnUrl`, `waitForConnectorAccountActive` polling, and the structured hand-back message builders. +- `contracts/plugins`, `contracts/routines`, and `contracts/signals` own the client projections of + native Tilde settings resources. Their transport uses the installation's operation-allowlisted + `/api/tilde/*` credential bridge; the control service defines no parallel domain APIs. Plugin + inventory is assembled from Tilde's generated MCP and Skills resource contracts, with every + native continuation token exhausted rather than relying on an OpenBot-specific aggregate. - `contracts/workspaces` and the workspace registry helpers own persisted public control-service origins, display metadata, and active-workspace selection without moving credentials between installations. diff --git a/packages/client-runtime/package.json b/packages/client-runtime/package.json index d611a554..b029b39c 100644 --- a/packages/client-runtime/package.json +++ b/packages/client-runtime/package.json @@ -105,6 +105,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { + "@trytilde/api-client": "workspace:*", "zod": "4.4.3", "zustand": "5.0.15" }, diff --git a/packages/client-runtime/src/chat/client.test.ts b/packages/client-runtime/src/chat/client.test.ts index 7fb1f666..fdb51b70 100644 --- a/packages/client-runtime/src/chat/client.test.ts +++ b/packages/client-runtime/src/chat/client.test.ts @@ -35,6 +35,48 @@ class TestWebSocket implements WebSocketLike { } describe("OpenBot client", () => { + it("uses the authenticated installation Tilde origin for signal webhook URLs", async () => { + const fetch = vi.fn(async (input: RequestInfo | URL) => { + const url = requestUrl(input); + if (url === "/auth/session") + return Response.json({ + authenticated: true, + user: { subject: "human-one", name: "Daniel" }, + tilde: { team_id: "team-one", api_base_url: "https://tilde.test/" }, + }); + if (url.startsWith("/api/tilde/signals/providers")) + return Response.json({ + items: [ + { + type_id: "github", + route_descriptors: [{ path: "events" }], + signal_types: [], + credential_sources: [], + }, + ], + }); + if (url.startsWith("/api/tilde/signals/instances")) + return Response.json({ + items: [ + { + id: "spi-one", + signal_provider_source_type_id: "github", + ingress_mode: "webhook", + }, + ], + }); + return Response.json({ error: `Unhandled ${url}` }, { status: 404 }); + }); + const client = createOpenBotClient({ fetch }); + + await client.getSession(); + await expect(client.listSignalInstances()).resolves.toEqual([ + expect.objectContaining({ + webhook_url: "https://tilde.test/api/v1/webhooks/github-signals-spi-one/events", + }), + ]); + }); + it("starts and polls a validated agent setup job", async () => { const jobId = "44444444-4444-4444-8444-444444444444"; const fetch = vi @@ -364,49 +406,68 @@ describe("OpenBot client", () => { expect(socket.closeCalls).toBe(1); }); - it("loads and mutates plugin configuration through the control service", async () => { + it("loads and mutates plugins through native Tilde resources", async () => { const calls: { method: string; url: string }[] = []; + const catalog = { + tool_providers: [{ type_id: "github", name: "GitHub", credential_sources: [] }], + tool_accounts: [ + { + id: "github-work", + display_name: "Work", + status: "active", + tool_group_source_type_id: "github", + }, + ], + mcp_servers: [ + { + id: "server-one", + agent_id: "agent-one", + tools: [{ tool_group_instance_id: "github-work" }], + }, + { id: "server-two", agent_id: "agent-two", tools: [] }, + ], + proxied_mcp_servers: [], + skills: [{ id: "skill-one", name: "Research", source_kind: "OpenBot" }], + skill_providers: [], + skill_registries: [ + { id: "registry-one", agent_id: "agent-one", skills: [{ id: "skill-one" }] }, + ], + }; const client = createOpenBotClient({ fetch: async (input, init) => { const url = requestUrl(input); calls.push({ method: init?.method ?? "GET", url }); - if (url.startsWith("/api/plugins?")) - return Response.json({ - tools: [ - { - provider: { - type_id: "github", - name: "GitHub", - credential_sources: [], - }, - accounts: [ - { - id: "github-work", - display_name: "Work", - status: "active", - assigned_agent_ids: ["agent-one"], - }, - ], - }, - ], - skills: [], - }); + const nativePage = nativePluginCatalogPage(url, catalog); + if (nativePage) return Response.json(nativePage); + if (url === "/api/tilde/mcp/provider-catalog") return Response.json({ items: [] }); + if (url.includes("enable-and-bind")) return Response.json({ complete: true }); return Response.json({ ok: true }); }, }); - await expect(client.getPluginsCatalog(["agent-one", "agent-two"])).resolves.toMatchObject({ + await expect(client.getPluginsCatalog()).resolves.toMatchObject({ tools: [{ accounts: [{ assigned_agent_ids: ["agent-one"] }] }], }); await client.deleteConnectorAccounts(["github/work", "github-personal"]); await client.setToolAccountForAgent("github-work", "agent-two", true); await client.setSkillForAgent("skill-one", "agent-one", false); - expect(calls).toEqual([ - { method: "GET", url: "/api/plugins?agent_id=agent-one&agent_id=agent-two" }, - { method: "DELETE", url: "/api/connectors/accounts" }, - { method: "POST", url: "/api/plugins/tools/github-work/agents/agent-two" }, - { method: "DELETE", url: "/api/plugins/skills/skill-one/agents/agent-one" }, - ]); + expect(calls).toEqual( + expect.arrayContaining([ + { + method: "GET", + url: "/api/tilde/mcp/available-tool-groups?deployment_alias=latest&include_global=true&page_size=100", + }, + { method: "GET", url: "/api/tilde/mcp/provider-catalog" }, + { method: "DELETE", url: "/api/tilde/mcp/tool-group/github%2Fwork" }, + { method: "DELETE", url: "/api/tilde/mcp/tool-group/github-personal" }, + { + method: "POST", + url: "/api/tilde/mcp/tool-group/github-work/tools/enable-and-bind", + }, + { method: "PATCH", url: "/api/tilde/skill-registry/registry-one" }, + ]), + ); + expect(calls.some(({ url }) => url.includes("/openbot/plugins/catalog"))).toBe(false); }); it("rewrites Tilde attachment URLs through the configured bridge", () => { @@ -436,3 +497,35 @@ function socketTicket(): ChatKitRealtimeSocketTicket { function requestUrl(input: RequestInfo | URL): string { return typeof input === "string" ? input : input instanceof URL ? input.href : input.url; } + +function nativePluginCatalogPage( + url: string, + catalog: { + tool_providers: unknown[]; + tool_accounts: unknown[]; + mcp_servers: unknown[]; + proxied_mcp_servers: unknown[]; + skills: unknown[]; + skill_providers: unknown[]; + skill_registries: unknown[]; + }, +): { items: unknown[] } | undefined { + const path = url.split("?", 1)[0]; + const items = + path === "/api/tilde/mcp/available-tool-groups" + ? catalog.tool_providers + : path === "/api/tilde/mcp/tool-group" + ? catalog.tool_accounts + : path === "/api/tilde/mcp/mcp-server" + ? catalog.mcp_servers + : path === "/api/tilde/mcp/proxied-mcp-servers" + ? catalog.proxied_mcp_servers + : path === "/api/tilde/skill" + ? catalog.skills + : path === "/api/tilde/skill-providers" + ? catalog.skill_providers + : path === "/api/tilde/skill-registry" + ? catalog.skill_registries + : undefined; + return items ? { items } : undefined; +} diff --git a/packages/client-runtime/src/chat/client.ts b/packages/client-runtime/src/chat/client.ts index b7f630d7..1a260a74 100644 --- a/packages/client-runtime/src/chat/client.ts +++ b/packages/client-runtime/src/chat/client.ts @@ -9,9 +9,6 @@ import { } from "../contracts/attachments.js"; import { AuthenticatedSessionSchema, type AuthenticatedSession } from "../contracts/auth.js"; import { - ConnectorAccountPageSchema, - ConnectorProviderPageSchema, - CreateConnectorAccountResultSchema, type ConnectorAccount, type ConnectorProvider, type CreateConnectorAccountInput, @@ -19,11 +16,7 @@ import { } from "../contracts/connectors.js"; import type { ChatEvent, SessionEvent, SessionUserState } from "../contracts/events.js"; import { SessionUserStateSchema } from "../contracts/events.js"; -import { - PluginMutationResultSchema, - PluginsCatalogSchema, - type PluginsCatalog, -} from "../contracts/plugins.js"; +import type { PluginsCatalog } from "../contracts/plugins.js"; import { AgentSetupStartedSchema, AgentSetupStatusSchema, @@ -43,20 +36,11 @@ import { type SubmitTurnResponse, } from "../contracts/workspace.js"; import { - RoutineListSchema, - RunRoutineResponseSchema, type CreateRoutineInput, type Routine, - type RoutineTriggerSpec, type UpdateRoutineInput, } from "../contracts/routines.js"; import { - DeleteSignalInstanceResultSchema, - SignalDeliveryListSchema, - SignalInstanceListSchema, - SignalInstanceSchema, - SignalProviderListSchema, - TestSignalInstanceResultSchema, type CreateSignalInstanceInput, type SignalDelivery, type SignalInstance, @@ -65,6 +49,8 @@ import { type TestSignalInstanceResult, type UpdateSignalInstanceInput, } from "../contracts/signals.js"; +import { createTildeRoutineClient, createTildeSignalClient } from "../tilde-settings.js"; +import { createTildePluginsClient } from "../tilde-plugins.js"; import { QueuedTurnPageSchema, type QueuedTurnPage } from "../contracts/queue.js"; import { ChatSessionPageSchema, @@ -94,6 +80,8 @@ export interface OpenBotClientOptions { createWebSocket?: WebSocketFactory; /** Browser by default. Native adapters must opt into Origin-free socket tickets. */ realtimeTransport?: "browser" | "native"; + /** Public Tilde origin used only to render signal webhook URLs. */ + tildeApiBaseUrl?: string; } export interface OpenBotClient { @@ -169,7 +157,7 @@ export interface OpenBotClient { createConnectorAccount(input: CreateConnectorAccountInput): Promise; bindConnector(agentId: string, accountId: string): Promise; deleteConnectorAccounts(accountIds: readonly string[]): Promise; - getPluginsCatalog(agentIds: readonly string[]): Promise; + getPluginsCatalog(): Promise; setToolAccountForAgent(accountId: string, agentId: string, enabled: boolean): Promise; setSkillForAgent(skillId: string, agentId: string, enabled: boolean): Promise; createAttachment(sessionId: string, input: CreateAttachmentInput): Promise; @@ -198,6 +186,7 @@ const ErrorBodySchema = z.object({ export function createOpenBotClient(options: OpenBotClientOptions = {}): OpenBotClient { const fetchImplementation = options.fetch ?? globalThis.fetch.bind(globalThis); const baseUrl = options.baseUrl?.replace(/\/$/, "") ?? ""; + let tildeApiBaseUrl = options.tildeApiBaseUrl; const resolve = (path: string): string => `${baseUrl}${path}`; @@ -230,6 +219,14 @@ export function createOpenBotClient(options: OpenBotClientOptions = {}): OpenBot return `/api/chat/${path}`; } + const tildeSettingsTransport = { + requestJson: (path: string, init?: RequestInit) => json(path, z.unknown(), init), + apiBaseUrl: () => tildeApiBaseUrl, + }; + const routines = createTildeRoutineClient(tildeSettingsTransport); + const signals = createTildeSignalClient(tildeSettingsTransport); + const plugins = createTildePluginsClient(tildeSettingsTransport.requestJson); + function rewriteTildeUrl(value: string): string { try { const url = new URL(value, baseUrl || "http://openbot.local"); @@ -273,7 +270,9 @@ export function createOpenBotClient(options: OpenBotClientOptions = {}): OpenBot const response = await request("/auth/session", { headers: { accept: "application/json" } }); if (response.status === 401) return null; if (!response.ok) throw await responseError(response); - return AuthenticatedSessionSchema.parse(await response.json()); + const session = AuthenticatedSessionSchema.parse(await response.json()); + tildeApiBaseUrl = session.tilde?.api_base_url ?? tildeApiBaseUrl; + return session; }, logout: () => empty("/auth/logout", { method: "POST" }), async startAgentSetup(name) { @@ -471,189 +470,13 @@ export function createOpenBotClient(options: OpenBotClientOptions = {}): OpenBot body: JSON.stringify({ queue_position: queuePosition }), headers: { "content-type": "application/json" }, }), - async listRoutines(agentId) { - const parameters = new URLSearchParams({ agent_id: agentId }); - const response = await json(`/api/routines?${parameters}`, RoutineListSchema); - return response.items; - }, - async createRoutine(input) { - const response = await json("/api/routines", RoutineListSchema, { - method: "POST", - body: JSON.stringify({ - agent_id: input.agentId, - name: input.name, - instruction: input.instruction, - ...(input.enabled === undefined ? {} : { enabled: input.enabled }), - triggers: input.triggers.map(routineTriggerBody), - }), - }); - return response.items; - }, - async updateRoutine(groupId, agentId, input) { - const parameters = new URLSearchParams({ agent_id: agentId }); - const response = await json( - `/api/routines/${encodeURIComponent(groupId)}?${parameters}`, - RoutineListSchema, - { - method: "PATCH", - body: JSON.stringify({ - ...(input.name === undefined ? {} : { name: input.name }), - ...(input.instruction === undefined ? {} : { instruction: input.instruction }), - ...(input.enabled === undefined ? {} : { enabled: input.enabled }), - ...(input.triggers === undefined - ? {} - : { triggers: input.triggers.map(routineTriggerBody) }), - }), - }, - ); - return response.items; - }, - async deleteRoutine(groupId, agentId) { - const parameters = new URLSearchParams({ agent_id: agentId }); - const response = await json( - `/api/routines/${encodeURIComponent(groupId)}?${parameters}`, - RoutineListSchema, - { method: "DELETE" }, - ); - return response.items; - }, - async runRoutine(groupId, agentId) { - const parameters = new URLSearchParams({ agent_id: agentId }); - const response = await json( - `/api/routines/${encodeURIComponent(groupId)}/run?${parameters}`, - RunRoutineResponseSchema, - { method: "POST" }, - ); - return response.session_id; - }, - async listSignalProviders() { - const response = await json("/api/signals/providers", SignalProviderListSchema); - return response.items; - }, - async listSignalInstances() { - const response = await json("/api/signals/instances", SignalInstanceListSchema); - return response.items; - }, - createSignalInstance: (input) => - json("/api/signals/instances", SignalInstanceSchema, { - method: "POST", - body: JSON.stringify({ - provider_type: input.providerType, - display_name: input.displayName, - ...(input.signingSecret === undefined ? {} : { signing_secret: input.signingSecret }), - ...(input.credentialSourceTypeId === undefined - ? {} - : { credential_source_type_id: input.credentialSourceTypeId }), - ...(input.configuration === undefined ? {} : { configuration: input.configuration }), - ...(input.ingressMode === undefined ? {} : { ingress_mode: input.ingressMode }), - }), - }), - updateSignalInstance: (id, input) => - json(`/api/signals/instances/${encodeURIComponent(id)}`, SignalInstanceSchema, { - method: "PATCH", - body: JSON.stringify({ - ...(input.displayName === undefined ? {} : { display_name: input.displayName }), - ...(input.status === undefined ? {} : { status: input.status }), - ...(input.signingSecret === undefined ? {} : { signing_secret: input.signingSecret }), - ...(input.configuration === undefined ? {} : { configuration: input.configuration }), - }), - }), - async deleteSignalInstance(id) { - await json( - `/api/signals/instances/${encodeURIComponent(id)}`, - DeleteSignalInstanceResultSchema, - { - method: "DELETE", - }, - ); - }, - testSignalInstance: (id, input = {}) => - json( - `/api/signals/instances/${encodeURIComponent(id)}/test`, - TestSignalInstanceResultSchema, - { - method: "POST", - body: JSON.stringify({ - ...(input.signalType === undefined ? {} : { signal_type: input.signalType }), - ...(input.summary === undefined ? {} : { summary: input.summary }), - ...(input.data === undefined ? {} : { data: input.data }), - }), - }, - ), - async listSignalDeliveries(instanceId) { - const parameters = new URLSearchParams({ instance_id: instanceId }); - const response = await json( - `/api/signals/deliveries?${parameters}`, - SignalDeliveryListSchema, - ); - return response.items; - }, - async listConnectorProviders() { - const response = await json("/api/connectors/providers", ConnectorProviderPageSchema); - return response.items; - }, - async listConnectorAccounts(providerTypeId) { - const parameters = new URLSearchParams(); - if (providerTypeId) parameters.set("provider", providerTypeId); - const query = parameters.size > 0 ? `?${parameters}` : ""; - const response = await json(`/api/connectors/accounts${query}`, ConnectorAccountPageSchema); - return response.items; - }, - waitForConnectorAccount: (accountId) => - json( - `/api/connectors/accounts/${encodeURIComponent(accountId)}/wait`, - z.object({ - id: z.string(), - display_name: z.string(), - status: z.string(), - provider_type_id: z.string().optional(), - credential_source_type_id: z.string().optional(), - }), - ), - createConnectorAccount: (input) => - json("/api/connectors/accounts", CreateConnectorAccountResultSchema, { - method: "POST", - body: JSON.stringify({ - provider_type_id: input.providerTypeId, - credential_source_type_id: input.credentialSourceTypeId, - display_name: input.displayName, - resource_server_values: input.resourceServerValues ?? null, - user_credential_values: input.userCredentialValues ?? null, - return_url: input.returnUrl ?? null, - }), - }), - bindConnector: (agentId, accountId) => - empty("/api/connectors/bind", { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ agent_id: agentId, account_id: accountId }), - }), - async deleteConnectorAccounts(accountIds) { - await json("/api/connectors/accounts", PluginMutationResultSchema, { - method: "DELETE", - body: JSON.stringify({ account_ids: accountIds }), - }); - }, - getPluginsCatalog(agentIds) { - const parameters = new URLSearchParams(); - for (const agentId of agentIds) parameters.append("agent_id", agentId); - const query = parameters.size > 0 ? `?${parameters}` : ""; - return json(`/api/plugins${query}`, PluginsCatalogSchema); - }, - async setToolAccountForAgent(accountId, agentId, enabled) { - await json( - `/api/plugins/tools/${encodeURIComponent(accountId)}/agents/${encodeURIComponent(agentId)}`, - PluginMutationResultSchema, - { method: enabled ? "POST" : "DELETE" }, - ); - }, - async setSkillForAgent(skillId, agentId, enabled) { - await json( - `/api/plugins/skills/${encodeURIComponent(skillId)}/agents/${encodeURIComponent(agentId)}`, - PluginMutationResultSchema, - { method: enabled ? "POST" : "DELETE" }, - ); + ...routines, + ...signals, + async createConnectorAccount(input) { + return await plugins.createNativeConnectorAccount(input); }, + bindConnector: (agentId, accountId) => plugins.setToolAccountForAgent(accountId, agentId, true), + ...plugins, createAttachment: (sessionId, input) => json( chatPath(`session/${encodeURIComponent(sessionId)}/attachment/upload`), @@ -732,19 +555,6 @@ async function waitForReconnect(signal: AbortSignal, attempt: number): Promise { - const identity = spec.id === undefined ? {} : { id: spec.id }; - return spec.kind === "schedule" - ? { ...identity, kind: "schedule", schedule: spec.schedule } - : { - ...identity, - kind: "event", - instance_id: spec.instanceId, - signal_type: spec.signalType, - ...(spec.filters === undefined ? {} : { filters: spec.filters }), - }; -} - async function responseError(response: Response): Promise { const parsed = ErrorBodySchema.safeParse(await response.json().catch(() => undefined)); const body = parsed.success ? parsed.data : undefined; diff --git a/packages/client-runtime/src/contracts/auth.ts b/packages/client-runtime/src/contracts/auth.ts index 2b53e73e..4aebf82f 100644 --- a/packages/client-runtime/src/contracts/auth.ts +++ b/packages/client-runtime/src/contracts/auth.ts @@ -19,6 +19,12 @@ export type AuthenticatedUser = z.infer; export const AuthenticatedSessionSchema = z.object({ authenticated: z.literal(true), user: AuthenticatedUserSchema, + tilde: z + .object({ + team_id: z.string().min(1), + api_base_url: z.string().url(), + }) + .optional(), }); export type AuthenticatedSession = z.infer; diff --git a/packages/client-runtime/src/contracts/connectors.ts b/packages/client-runtime/src/contracts/connectors.ts index a263762f..f99a617f 100644 --- a/packages/client-runtime/src/contracts/connectors.ts +++ b/packages/client-runtime/src/contracts/connectors.ts @@ -4,9 +4,9 @@ import { z } from "zod"; * Connector (Tilde tool-provider) configuration contracts shared by every * client surface. The agent's `configure_connector` tool emits a * `connector_selection` payload inside its tool output; clients render it as - * an account picker and drive new-account setup through the control-service - * `/api/connectors` routes so credentials never travel through the chat - * transcript. + * an account picker and drive new-account setup through native Tilde resources + * behind the installation's allowlisted credential bridge, so credentials + * never travel through the chat transcript. */ export const CONNECTOR_SELECTION_TOOL_NAME = "configure_connector"; diff --git a/packages/client-runtime/src/contracts/routines.test.ts b/packages/client-runtime/src/contracts/routines.test.ts index 24212171..9bcb44b8 100644 --- a/packages/client-runtime/src/contracts/routines.test.ts +++ b/packages/client-runtime/src/contracts/routines.test.ts @@ -24,7 +24,6 @@ const scheduleTrigger = { schedule: "0 7 * * *", description: "Daily at 07:00 UTC", next_run_at: "2026-08-25T07:00:00Z", - routine_id: "rt-1", } satisfies RoutineScheduleTrigger; const eventTrigger = { @@ -34,7 +33,6 @@ const eventTrigger = { provider_type: "github", signal_type: "github.pull_request.opened", filters: [{ path: "repository.full_name", value: "acme/web" }], - rule_id: "rule-1", } satisfies RoutineEventTrigger; const routine = { diff --git a/packages/client-runtime/src/contracts/routines.ts b/packages/client-runtime/src/contracts/routines.ts index 6517844c..2308ce25 100644 --- a/packages/client-runtime/src/contracts/routines.ts +++ b/packages/client-runtime/src/contracts/routines.ts @@ -3,9 +3,9 @@ import type { SignalProvider } from "./signals.js"; /** * Unified routine contracts shared by every client surface. A routine groups - * 1..MAX_ROUTINE_TRIGGERS OR'd triggers — schedule triggers backed by Tilde - * ChatKit routines and event triggers backed by Tilde signal rules — behind - * the control-service `/api/routines` routes. + * 1..MAX_ROUTINE_TRIGGERS OR'd native schedule or event triggers. The client + * runtime projects Tilde's authoritative Routine API directly through the + * installation's allowlisted credential bridge. */ export const MAX_ROUTINE_TRIGGERS = 8; @@ -26,7 +26,6 @@ export const RoutineScheduleTriggerSchema = z /** Server-rendered Tilde schedule_description, passthrough. */ description: z.string().optional(), next_run_at: z.string().nullable().optional(), - routine_id: z.string(), }) .passthrough(); export type RoutineScheduleTrigger = z.infer; @@ -39,7 +38,6 @@ export const RoutineEventTriggerSchema = z provider_type: z.string(), signal_type: z.string(), filters: z.array(RoutineTriggerFilterSchema).optional(), - rule_id: z.string(), }) .passthrough(); export type RoutineEventTrigger = z.infer; diff --git a/packages/client-runtime/src/contracts/signals.test.ts b/packages/client-runtime/src/contracts/signals.test.ts index f9e83b49..cb68dbae 100644 --- a/packages/client-runtime/src/contracts/signals.test.ts +++ b/packages/client-runtime/src/contracts/signals.test.ts @@ -64,7 +64,7 @@ const delivery = { status: "completed", session_id: "session-one", error_message: null, - matched_rule_ids: ["rule-1"], + matched_trigger_ids: ["trigger-1"], created_at: "2026-08-24T00:00:00Z", }; @@ -80,9 +80,9 @@ describe("signal contracts", () => { expect(SignalInstanceSchema.parse(instance).webhook_url).toContain("spi_1"); expect(SignalInstanceListSchema.parse({ items: [instance] }).items[0]?.status).toBe("enabled"); expect(SignalDeliverySchema.parse(delivery).summary).toBe("PR #1 opened"); - expect(SignalDeliverySchema.parse(delivery).matched_rule_ids).toEqual(["rule-1"]); - const { matched_rule_ids: _matched, ...withoutRules } = delivery; - expect(SignalDeliverySchema.parse(withoutRules).matched_rule_ids).toBeUndefined(); + expect(SignalDeliverySchema.parse(delivery).matched_trigger_ids).toEqual(["trigger-1"]); + const { matched_trigger_ids: _matched, ...withoutTriggers } = delivery; + expect(SignalDeliverySchema.parse(withoutTriggers).matched_trigger_ids).toBeUndefined(); expect(SignalDeliveryListSchema.parse({ items: [delivery] }).items).toHaveLength(1); expect(TestSignalInstanceResultSchema.parse({ accepted: 1, delivery_ids: ["del-1"] })).toEqual({ accepted: 1, diff --git a/packages/client-runtime/src/contracts/signals.ts b/packages/client-runtime/src/contracts/signals.ts index 59102971..034f5166 100644 --- a/packages/client-runtime/src/contracts/signals.ts +++ b/packages/client-runtime/src/contracts/signals.ts @@ -2,9 +2,9 @@ import { z } from "zod"; /** * Signal provider management contracts shared by every client surface. The - * control-service `/api/signals` routes project the Tilde signals catalog, - * provider instances, and delivery history; signing secrets are write-only and - * never echoed back. + * The client runtime projects Tilde's signals catalog, provider instances, and + * delivery history through the installation's allowlisted credential bridge; + * signing secrets are write-only and never echoed back. */ export const SignalTypeSchema = z @@ -81,8 +81,8 @@ export const SignalDeliverySchema = z status: z.string(), session_id: z.string().nullable().optional(), error_message: z.string().nullable().optional(), - /** Rules this delivery fired; run history filters on it. */ - matched_rule_ids: z.array(z.string()).optional(), + /** Native Routine triggers this delivery fired; run history filters on it. */ + matched_trigger_ids: z.array(z.string()).optional(), created_at: z.string(), }) .passthrough(); diff --git a/packages/client-runtime/src/tilde-plugins.test.ts b/packages/client-runtime/src/tilde-plugins.test.ts new file mode 100644 index 00000000..5c5ee44d --- /dev/null +++ b/packages/client-runtime/src/tilde-plugins.test.ts @@ -0,0 +1,152 @@ +import { describe, expect, it, vi } from "vite-plus/test"; +import { createTildePluginsClient } from "./tilde-plugins.js"; + +describe("Tilde plugin client", () => { + it("loads and exhausts native Tilde resource pages", async () => { + const requestJson = vi.fn(async (path: string) => { + if (path.startsWith("/api/tilde/mcp/available-tool-groups?")) + return path.includes("next_page_token=providers-2") + ? { items: [{ type_id: "google_mail", name: "Google Mail" }] } + : { + items: [{ type_id: "github", name: "GitHub" }], + next_page_token: "providers-2", + }; + if (path === "/api/tilde/skill-providers") return { items: [] }; + if (path === "/api/tilde/mcp/provider-catalog") return { items: [] }; + return { items: [] }; + }); + const client = createTildePluginsClient(requestJson); + + await expect(client.getPluginsCatalog()).resolves.toMatchObject({ + tools: [{ provider: { type_id: "github" } }, { provider: { type_id: "google_mail" } }], + }); + expect(requestJson).toHaveBeenCalledWith( + "/api/tilde/mcp/available-tool-groups?deployment_alias=latest&include_global=true&page_size=100", + ); + expect(requestJson).toHaveBeenCalledWith( + "/api/tilde/mcp/available-tool-groups?deployment_alias=latest&include_global=true&page_size=100&next_page_token=providers-2", + ); + expect(requestJson).not.toHaveBeenCalledWith("/api/tilde/openbot/plugins/catalog"); + }); + + it("uses provider setup directly for ordinary connectors", async () => { + const requestJson = vi.fn().mockResolvedValue({ + resource: { + id: "github-work", + display_name: "Work", + status: "active", + tool_group_source_type_id: "github", + }, + next_action: { type: "complete" }, + }); + const client = createTildePluginsClient(requestJson); + + await expect( + client.createNativeConnectorAccount({ + providerTypeId: "github", + credentialSourceTypeId: "github_api_key", + displayName: "Work", + resourceServerValues: { api_key: "secret" }, + }), + ).resolves.toMatchObject({ status: "created", account: { id: "github-work" } }); + expect(requestJson).toHaveBeenCalledWith( + "/api/tilde/provider-setup/start", + expect.objectContaining({ + method: "POST", + body: expect.stringContaining('"provider_id":"github"'), + }), + ); + }); + + it("uses Tilde's managed connection API for dynamic OAuth providers", async () => { + const requestJson = vi + .fn() + .mockResolvedValueOnce({ + items: [ + { + id: "notion", + name: "Notion", + connection_method: "oauth_dynamic_client_registration", + }, + ], + }) + .mockResolvedValueOnce({ + status: "authorization_required", + oauth: { + tool_group_instance: { id: "notion-work", display_name: "Work", status: "pending" }, + broker_response: { type: "redirect", url: "https://notion.test/authorize" }, + }, + }); + const client = createTildePluginsClient(requestJson); + + await expect( + client.createNativeConnectorAccount({ + providerTypeId: "managed_mcp:notion", + credentialSourceTypeId: "managed_mcp_oauth", + displayName: "Work", + returnUrl: "https://openbot.test/connectors/authorized", + }), + ).resolves.toEqual({ + status: "authorize", + account: { + id: "notion-work", + display_name: "Work", + status: "pending", + provider_type_id: "managed_mcp:notion", + }, + authorization_url: "https://notion.test/authorize", + }); + expect(requestJson).toHaveBeenLastCalledWith( + "/api/tilde/mcp/provider-catalog/notion/connect", + expect.objectContaining({ method: "POST" }), + ); + }); + + it("encrypts manual managed API keys with the authenticated Tilde team", async () => { + const calls: Array<{ path: string; body?: string }> = []; + const requestJson = vi.fn(async (path: string, init?: RequestInit) => { + calls.push({ path, ...(typeof init?.body === "string" ? { body: init.body } : {}) }); + if (path === "/api/tilde/mcp/provider-catalog") + return { + items: [ + { + id: "sentry", + name: "Sentry", + connection_method: "manual", + suggested_auth_mode: "bearer_token", + endpoint_url: "https://mcp.sentry.dev", + }, + ], + }; + if (path === "/auth/session") + return { + authenticated: true, + tilde: { team_id: "team-one", api_base_url: "https://tilde.test" }, + user: { subject: "human-one", name: "Daniel" }, + }; + if (path.endsWith("/encrypt")) return { ciphertext: "encrypted" }; + if (path.endsWith("/resource-server")) return { id: "credential-one" }; + if (path === "/api/tilde/mcp/proxied-mcp-servers") + return { + tool_group_instance: { id: "sentry-work", display_name: "Work", status: "active" }, + }; + throw new Error(`Unexpected request: ${path}`); + }); + const client = createTildePluginsClient(requestJson); + + await expect( + client.createNativeConnectorAccount({ + providerTypeId: "managed_mcp:sentry", + credentialSourceTypeId: "api_key", + displayName: "Work", + resourceServerValues: { api_key: "secret" }, + }), + ).resolves.toMatchObject({ status: "created", account: { id: "sentry-work" } }); + expect(calls.find((call) => call.path.endsWith("/encrypt"))?.body).toContain( + '"dek_alias":"team:team-one:default"', + ); + expect( + calls.find((call) => call.path === "/api/tilde/mcp/proxied-mcp-servers")?.body, + ).toContain('"resource_server_credential_id":"credential-one"'); + }); +}); diff --git a/packages/client-runtime/src/tilde-plugins.ts b/packages/client-runtime/src/tilde-plugins.ts new file mode 100644 index 00000000..f08f6695 --- /dev/null +++ b/packages/client-runtime/src/tilde-plugins.ts @@ -0,0 +1,868 @@ +import { z } from "zod"; +import type { + McpProviderCatalogEntry, + McpServerInstanceSerializedWithFunctions, + ProxiedMcpServerListItem, + ProxiedSkillProvider, + Skill, + SkillRegistry, + ToolGroupInstanceListItem, + ToolGroupSourceSerialized, +} from "@trytilde/api-client/generated"; +import { PluginsCatalogSchema, type PluginsCatalog } from "./contracts/plugins.js"; +import { + ConnectorAccountSchema, + CreateConnectorAccountResultSchema, + type CreateConnectorAccountInput, +} from "./contracts/connectors.js"; + +type RequestJson = (path: string, init?: RequestInit) => Promise; + +const RecordSchema = z.record(z.string(), z.unknown()); +const NativeResourcePageSchema = z.object({ + items: z.array(RecordSchema), + next_page_token: z.string().nullish(), +}); +const ManagedProviderPageSchema = z.object({ items: z.array(RecordSchema) }); + +type NativeResource = T & Record; + +interface TildePluginResources { + tool_providers: NativeResource[]; + tool_accounts: NativeResource[]; + mcp_servers: NativeResource[]; + proxied_mcp_servers: NativeResource[]; + skills: NativeResource[]; + skill_providers: NativeResource[]; + skill_registries: NativeResource[]; +} + +export function createTildePluginsClient(requestJson: RequestJson) { + const listToolProviders = () => + listNativeResources( + requestJson, + "/api/tilde/mcp/available-tool-groups", + { + deployment_alias: "latest", + include_global: "true", + }, + ); + const listToolAccounts = () => + listNativeResources(requestJson, "/api/tilde/mcp/tool-group", { + include_global: "false", + }); + const listMcpServers = () => + listNativeResources( + requestJson, + "/api/tilde/mcp/mcp-server", + { include_global: "false" }, + ); + const listProxiedMcpServers = () => + listNativeResources( + requestJson, + "/api/tilde/mcp/proxied-mcp-servers", + { include_catalog_managed: "false" }, + ); + const listSkills = () => listNativeResources(requestJson, "/api/tilde/skill"); + const listSkillProviders = () => + listNativeResources(requestJson, "/api/tilde/skill-providers", {}, false); + const listSkillRegistries = () => + listNativeResources(requestJson, "/api/tilde/skill-registry"); + + async function catalog() { + const [ + toolProviders, + toolAccounts, + mcpServers, + proxiedMcpServers, + skills, + skillProviders, + skillRegistries, + ] = await Promise.all([ + listToolProviders(), + listToolAccounts(), + listMcpServers(), + listProxiedMcpServers(), + listSkills(), + listSkillProviders(), + listSkillRegistries(), + ]); + return { + tool_providers: toolProviders, + tool_accounts: toolAccounts, + mcp_servers: mcpServers, + proxied_mcp_servers: proxiedMcpServers, + skills, + skill_providers: skillProviders, + skill_registries: skillRegistries, + } satisfies TildePluginResources; + } + + async function getPluginsCatalog(): Promise { + const [resources, managed] = await Promise.all([ + catalog(), + requestJson("/api/tilde/mcp/provider-catalog"), + ]); + return PluginsCatalogSchema.parse( + projectPlugins( + resources, + ManagedProviderPageSchema.parse(managed).items as NativeResource[], + ), + ); + } + + return { + getPluginsCatalog, + + async listConnectorProviders() { + return (await getPluginsCatalog()).tools + .map((group) => group.provider) + .filter((provider) => provider.can_add_account !== false); + }, + + async listConnectorAccounts(providerTypeId?: string) { + return (await getPluginsCatalog()).tools + .filter((group) => !providerTypeId || group.provider.type_id === providerTypeId) + .flatMap((group) => group.accounts); + }, + + async waitForConnectorAccount(accountId: string) { + const response = RecordSchema.parse( + await requestJson( + `/api/tilde/mcp/tool-group/${encodeURIComponent(accountId)}?wait_for_status=active&timeout_ms=30000`, + ), + ); + return ConnectorAccountSchema.parse(record(response.tool_group_instance)); + }, + + async createNativeConnectorAccount(input: CreateConnectorAccountInput) { + if (input.providerTypeId.startsWith("managed_mcp:")) { + return await createManagedConnectorAccount(requestJson, input); + } + const setup = RecordSchema.parse( + await requestJson("/api/tilde/provider-setup/start", { + method: "POST", + body: JSON.stringify({ + domain: "mcp", + provider_id: input.providerTypeId, + auth_method_id: input.credentialSourceTypeId, + form_values: { + displayName: input.displayName, + ...input.resourceServerValues, + ...input.userCredentialValues, + }, + return_url: input.returnUrl ?? null, + }), + }), + ); + const account = serializeAccount(record(setup.resource) ?? {}); + const nextAction = record(setup.next_action); + const authorizationUrl = nextAction?.type === "redirect" ? text(nextAction.url) : ""; + return CreateConnectorAccountResultSchema.parse( + authorizationUrl + ? { status: "authorize", account, authorization_url: authorizationUrl } + : { status: "created", account }, + ); + }, + + async deleteConnectorAccounts(accountIds: readonly string[]): Promise { + const proxied = await listProxiedMcpServers(); + const proxiedIds = new Set(proxied.map((item) => text(record(item.tool_group_instance)?.id))); + await Promise.all( + accountIds.map((accountId) => + requestJson( + proxiedIds.has(accountId) + ? `/api/tilde/mcp/proxied-mcp-servers/${encodeURIComponent(accountId)}` + : `/api/tilde/mcp/tool-group/${encodeURIComponent(accountId)}`, + { method: "DELETE" }, + ), + ), + ); + }, + + async setToolAccountForAgent( + accountId: string, + agentId: string, + enabled: boolean, + ): Promise { + const server = (await listMcpServers()).find( + (candidate) => text(candidate.agent_id) === agentId, + ); + const serverId = text(server?.id); + if (!serverId) throw new Error("This bot has no Tilde MCP server"); + if (enabled) { + const result = RecordSchema.parse( + await requestJson( + `/api/tilde/mcp/tool-group/${encodeURIComponent(accountId)}/tools/enable-and-bind`, + { + method: "POST", + body: JSON.stringify({ + all_tools: true, + tool_source_type_ids: [], + mcp_server_instance_ids: [serverId], + }), + }, + ), + ); + if (result.complete !== true) throw new Error("Tilde could not enable and bind every tool"); + return; + } + await requestJson( + `/api/tilde/mcp/mcp-server/${encodeURIComponent(serverId)}/tool-group/${encodeURIComponent(accountId)}`, + { method: "DELETE" }, + ); + }, + + async setSkillForAgent(skillId: string, agentId: string, enabled: boolean): Promise { + const [availableSkills, providers, registries] = await Promise.all([ + listSkills(), + listSkillProviders(), + listSkillRegistries(), + ]); + const registry = registries.find((candidate) => text(candidate.agent_id) === agentId); + const registryId = text(registry?.id); + if (!registryId) throw new Error("This bot has no Tilde skill registry"); + const currentIds = records(registry?.skills) + .map((skill) => text(skill.id)) + .filter(Boolean); + const trusted = parseTrustedCatalogSkillId(skillId); + if (trusted) { + const provider = providers.find((candidate) => text(candidate.id) === trusted.providerId); + const providerSkill = records(provider?.skills).find( + (candidate) => text(candidate.id) === trusted.skillId, + ); + if (!provider || !providerSkill) throw new Error("Unknown skill"); + const materialized = availableSkills.find( + (candidate) => + text(candidate.source_provider_id) === trusted.providerId && + text(candidate.source_path) === text(providerSkill.source_path), + ); + const materializedId = text(materialized?.id); + if (enabled) { + if (materializedId && currentIds.includes(materializedId)) return; + await requestJson( + `/api/tilde/skill-registry/${encodeURIComponent(registryId)}/provider-skills`, + { + method: "POST", + body: JSON.stringify({ + provider_id: trusted.providerId, + skill_ids: [trusted.skillId], + }), + }, + ); + return; + } + if (!materializedId || !currentIds.includes(materializedId)) return; + await replaceRegistrySkills( + requestJson, + registryId, + currentIds.filter((id) => id !== materializedId), + ); + return; + } + if (!availableSkills.some((candidate) => text(candidate.id) === skillId)) + throw new Error("Unknown skill"); + await replaceRegistrySkills( + requestJson, + registryId, + enabled + ? [...new Set([...currentIds, skillId])] + : currentIds.filter((id) => id !== skillId), + ); + }, + }; +} + +async function listNativeResources( + requestJson: RequestJson, + path: string, + filters: Readonly> = {}, + paginated = true, +): Promise[]> { + const items: Record[] = []; + let nextPageToken: string | undefined; + for (let page = 0; page < 100; page += 1) { + const query = new URLSearchParams(filters); + if (paginated) query.set("page_size", "100"); + if (nextPageToken) query.set("next_page_token", nextPageToken); + const response = NativeResourcePageSchema.parse( + await requestJson(query.size > 0 ? `${path}?${query.toString()}` : path), + ); + items.push(...response.items); + if (!paginated || !response.next_page_token) return items as NativeResource[]; + nextPageToken = response.next_page_token; + } + throw new Error(`Tilde pagination exceeded 100 pages for ${path}`); +} + +async function createManagedConnectorAccount( + requestJson: RequestJson, + input: CreateConnectorAccountInput, +) { + const catalogId = input.providerTypeId.slice("managed_mcp:".length); + const providers = ManagedProviderPageSchema.parse( + await requestJson("/api/tilde/mcp/provider-catalog"), + ).items; + const provider = providers.find( + (candidate) => + text(candidate.id) === catalogId && + (text(candidate.tool_provider_type_id) || `managed_mcp:${text(candidate.id)}`) === + input.providerTypeId, + ); + if (!provider) throw new Error("Unknown managed MCP provider"); + const connectionMethod = text(provider.connection_method); + if (connectionMethod !== "manual") { + return managedConnectorResult( + await requestJson( + `/api/tilde/mcp/provider-catalog/${encodeURIComponent(catalogId)}/connect`, + { + method: "POST", + body: JSON.stringify({ + display_name: input.displayName, + return_url: input.returnUrl ?? null, + }), + }, + ), + input.providerTypeId, + ); + } + + if (text(provider.suggested_auth_mode) === "oauth_authorization_code") { + const clientId = text(input.resourceServerValues?.client_id); + const clientSecret = text(input.resourceServerValues?.client_secret); + if (!clientId || !clientSecret) throw new Error("Client ID and client secret are required"); + return managedConnectorResult( + { + status: "authorization_required", + oauth: await requestJson("/api/tilde/mcp/proxied-mcp-servers/oauth/start", { + method: "POST", + body: JSON.stringify({ + catalog_provider_id: catalogId, + name: input.displayName, + url: text(provider.endpoint_url), + auth_uri: text(provider.oauth_authorization_endpoint), + token_uri: text(provider.oauth_token_endpoint), + client_id: clientId, + client_secret: clientSecret, + scopes: strings(provider.oauth_scopes), + return_url: input.returnUrl ?? null, + }), + }), + }, + input.providerTypeId, + ); + } + + const secret = text(input.resourceServerValues?.api_key); + if (!secret) throw new Error("API key or bearer token is required"); + const session = z + .object({ tilde: z.object({ team_id: z.string().min(1) }) }) + .parse(await requestJson("/auth/session")); + const dekAlias = `team:${session.tilde.team_id}:default`; + const encrypted = await requestJson( + "/api/tilde/credential/source/api_key/resource-server/encrypt", + { + method: "POST", + body: JSON.stringify({ dek_alias: dekAlias, value: { api_key: secret } }), + }, + ); + const credential = RecordSchema.parse( + await requestJson("/api/tilde/credential/source/api_key/resource-server", { + method: "POST", + body: JSON.stringify({ + dek_alias: dekAlias, + resource_server_configuration: encrypted, + metadata: null, + }), + }), + ); + const credentialId = text(credential.id); + if (!credentialId) throw new Error("Tilde returned no credential id"); + const connection = await requestJson("/api/tilde/mcp/proxied-mcp-servers", { + method: "POST", + body: JSON.stringify({ + catalog_provider_id: catalogId, + name: input.displayName, + url: text(provider.endpoint_url), + auth_mode: text(provider.suggested_auth_mode), + api_key_location: text(provider.api_key_location) || "header", + api_key_header_name: text(provider.api_key_header_name) || "Authorization", + api_key_header_prefix: text(provider.api_key_header_prefix) || null, + api_key_query_param_name: text(provider.api_key_query_param_name) || "api_key", + local_running_endpoint: false, + oauth_scopes: [], + resource_server_credential_id: credentialId, + user_credential_id: null, + }), + }); + return managedConnectorResult({ status: "connected", connection }, input.providerTypeId); +} + +function managedConnectorResult(value: unknown, providerTypeId: string) { + const result = record(value); + const source = + result?.status === "authorization_required" ? record(result.oauth) : record(result?.connection); + const account = record(source?.tool_group_instance); + if (!account?.id) throw new Error("Tilde returned no connector account"); + const serialized = { ...serializeAccount(account), provider_type_id: providerTypeId }; + if (result?.status !== "authorization_required") + return CreateConnectorAccountResultSchema.parse({ status: "created", account: serialized }); + const authorizationUrl = brokerRedirectUrl(source?.broker_response); + if (!authorizationUrl) throw new Error("Tilde returned no authorization URL"); + return CreateConnectorAccountResultSchema.parse({ + status: "authorize", + account: serialized, + authorization_url: authorizationUrl, + }); +} + +function brokerRedirectUrl(value: unknown): string | undefined { + const response = record(value); + if (response?.type === "redirect") return text(response.url) || undefined; + const redirect = record(record(response?.action)?.Redirect); + return text(redirect?.url) || undefined; +} + +async function replaceRegistrySkills( + requestJson: RequestJson, + registryId: string, + skillIds: readonly string[], +): Promise { + await requestJson(`/api/tilde/skill-registry/${encodeURIComponent(registryId)}`, { + method: "PATCH", + body: JSON.stringify({ skill_ids: skillIds }), + }); +} + +function projectPlugins( + catalog: TildePluginResources, + managedProviders: NativeResource[], +): PluginsCatalog { + const agentServers = new Map( + catalog.mcp_servers.flatMap((server) => { + const agentId = text(server.agent_id); + return agentId ? [[agentId, server] as const] : []; + }), + ); + const agentRegistries = new Map( + catalog.skill_registries.flatMap((registry) => { + const agentId = text(registry.agent_id); + return agentId ? [[agentId, registry] as const] : []; + }), + ); + const agentIds = [...new Set([...agentServers.keys(), ...agentRegistries.keys()])]; + const proxiedSourceIds = new Set( + catalog.proxied_mcp_servers.map((item) => text(record(item.server)?.tool_group_source_type_id)), + ); + const tools: PluginsCatalog["tools"] = catalog.tool_providers + .filter((provider) => !proxiedSourceIds.has(text(provider.type_id))) + .map((provider) => ({ + provider: serializeProvider(provider), + accounts: catalog.tool_accounts + .filter((account) => text(account.tool_group_source_type_id) === text(provider.type_id)) + .map((account) => ({ + ...serializeAccount(account), + assigned_agent_ids: assignedAgentIds(text(account.id), agentServers), + })), + })); + + for (const provider of managedProviders) { + const providerId = text(provider.tool_provider_type_id) || `managed_mcp:${text(provider.id)}`; + const connections = catalog.proxied_mcp_servers.filter( + (item) => + text(record(record(item.server)?.endpoint_configuration)?.catalog_provider_id) === + text(provider.id), + ); + tools.push({ + provider: { + type_id: providerId, + name: text(provider.name) || text(provider.id), + documentation: text(provider.description), + icon_slug: text(provider.id), + categories: strings(provider.categories), + credential_sources: [managedCredentialSource(provider)], + }, + accounts: connections.map((item) => { + const account = record(item.tool_group_instance) ?? {}; + return { + ...serializeAccount(account), + display_name: text(record(item.server)?.display_name) || text(account.id), + provider_type_id: providerId, + assigned_agent_ids: assignedAgentIds(text(account.id), agentServers), + }; + }), + }); + } + + const unmanagedProxied = new Map[]>(); + for (const item of catalog.proxied_mcp_servers) { + const endpoint = record(record(item.server)?.endpoint_configuration); + if (text(endpoint?.catalog_provider_id)) continue; + const url = normalizedUrl(text(endpoint?.url)); + if (!url) continue; + const group = unmanagedProxied.get(url) ?? []; + group.push(item); + unmanagedProxied.set(url, group); + } + for (const [url, items] of unmanagedProxied) { + const name = proxiedProviderName(url, items, agentIds); + const providerId = `proxied-mcp:${url}`; + tools.push({ + provider: { + type_id: providerId, + name, + documentation: url, + icon_slug: new URL(url).hostname.includes("vercel") ? "vercel" : name, + categories: ["other"], + credential_sources: [], + can_add_account: false, + }, + accounts: items.map((item) => { + const account = record(item.tool_group_instance) ?? {}; + return { + ...serializeAccount(account), + display_name: text(record(item.server)?.display_name) || text(account.id), + provider_type_id: providerId, + assigned_agent_ids: assignedAgentIds(text(account.id), agentServers), + }; + }), + }); + } + + return { + tools, + skills: serializeSkills(catalog, agentIds, agentRegistries), + }; +} + +function serializeSkills( + catalog: TildePluginResources, + agentIds: string[], + agentRegistries: ReadonlyMap>, +) { + const materializedTrustedIds = new Set(); + const trusted = catalog.skill_providers.map((provider) => ({ + id: text(provider.id), + name: text(provider.name), + description: text(provider.description), + categories: strings(provider.categories).length ? strings(provider.categories) : ["other"], + icon_key: trustedProviderIconKey(provider), + skills: records(provider.skills).map((trustedSkill) => { + const materialized = catalog.skills.find( + (skill) => + text(skill.source_provider_id) === text(provider.id) && + text(skill.source_path) === text(trustedSkill.source_path), + ); + const materializedId = text(materialized?.id); + if (materializedId) materializedTrustedIds.add(materializedId); + return { + id: trustedCatalogSkillId(text(provider.id), text(trustedSkill.id)), + name: text(trustedSkill.name), + description: text(trustedSkill.description), + assigned_agent_ids: materializedId + ? assignedSkillAgentIds(materializedId, agentRegistries) + : [], + }; + }), + })); + + const grouped = new Map>(); + for (const skill of catalog.skills.filter( + (candidate) => !materializedTrustedIds.has(text(candidate.id)), + )) { + const category = skillCategory(skill); + const sourceProvider = catalog.tool_providers.find( + (provider) => text(provider.type_id) === text(skill.source_provider_id), + ); + const group = grouped.get(category) ?? teamSkillProvider(category, skill, sourceProvider); + group.skills.push({ + id: text(skill.id), + name: displaySkillName(text(skill.name), agentIds), + description: text(skill.description), + assigned_agent_ids: assignedSkillAgentIds(text(skill.id), agentRegistries), + }); + grouped.set(category, group); + } + return [...trusted, ...grouped.values()]; +} + +function teamSkillProvider( + category: string, + skill: Record, + sourceProvider: Record | undefined, +) { + const iconUrl = imageUrl( + skill.icon_url, + record(skill.metadata)?.icon_url, + sourceProvider?.icon_url, + ); + const iconKey = firstText( + skill.provider_icon_key, + record(skill.metadata)?.provider_icon_key, + sourceProvider?.icon_slug, + skill.source_provider_id, + ); + return { + id: `team:${category}`, + name: category, + description: `Skills available from ${category}.`, + categories: [category], + ...(iconUrl ? { icon_url: iconUrl } : {}), + ...(iconKey ? { icon_key: iconKey } : {}), + skills: [] as Array<{ + id: string; + name: string; + description: string; + assigned_agent_ids: string[]; + }>, + }; +} + +function serializeProvider(provider: Record) { + const metadata = record(provider.metadata); + const iconUrl = imageUrl( + provider.icon_url, + metadata?.icon_url, + metadata?.logo_url, + metadata?.icon, + ); + const iconSlug = firstText(provider.icon_slug, metadata?.icon_slug, metadata?.icon); + const typeId = text(provider.type_id); + const categories = strings(provider.categories); + return { + type_id: typeId, + name: text(provider.name) || typeId, + ...(text(provider.documentation) ? { documentation: text(provider.documentation) } : {}), + ...(iconUrl ? { icon_url: iconUrl } : {}), + ...(iconSlug ? { icon_slug: iconSlug } : {}), + categories: + systemProvider(typeId, text(provider.name)) || categories.length === 0 + ? [systemProvider(typeId, text(provider.name)) ? "system" : "other"] + : categories, + credential_sources: records(provider.credential_sources).map((source) => ({ + type_id: text(source.type_id), + name: text(source.display_name) || text(source.name) || text(source.type_id), + ...(text(source.documentation) ? { documentation: text(source.documentation) } : {}), + requires_brokering: source.requires_brokering === true, + supports_auto_display_name: source.supports_auto_display_name === true, + ...(text(source.display_name_description) + ? { display_name_description: text(source.display_name_description) } + : {}), + resource_server_schema: record(source.configuration_schema)?.resource_server ?? null, + user_credential_schema: record(source.configuration_schema)?.user_credential ?? null, + })), + }; +} + +function managedCredentialSource(provider: Record) { + const emptySchema = { type: "object", properties: {}, additionalProperties: false }; + const name = text(provider.name); + const connectionMethod = text(provider.connection_method); + if (connectionMethod !== "manual") { + const oauth = connectionMethod === "oauth_dynamic_client_registration"; + return { + type_id: oauth ? "managed_mcp_oauth" : "managed_mcp_no_auth", + name: oauth ? "Sign in with your browser" : "No authentication", + documentation: oauth + ? "Sign in with your provider account." + : "This provider does not require credentials.", + requires_brokering: oauth, + supports_auto_display_name: false, + display_name_description: `A label for this ${name} connection.`, + resource_server_schema: emptySchema, + user_credential_schema: emptySchema, + }; + } + const oauth = text(provider.suggested_auth_mode) === "oauth_authorization_code"; + const bearer = text(provider.suggested_auth_mode) === "bearer_token"; + const label = bearer ? "Bearer token" : "API key"; + return { + type_id: oauth ? "oauth_auth_flow" : "api_key", + name: oauth ? "OAuth application" : label, + documentation: oauth + ? "Enter the OAuth application registered with this provider." + : `Enter the ${label.toLowerCase()} for this provider.`, + requires_brokering: oauth, + supports_auto_display_name: false, + display_name_description: `A label for this ${name} connection.`, + resource_server_schema: oauth + ? { + type: "object", + properties: { + client_id: { type: "string", title: "Client ID" }, + client_secret: { type: "string", title: "Client secret", format: "password" }, + }, + required: ["client_id", "client_secret"], + additionalProperties: false, + } + : { + type: "object", + properties: { api_key: { type: "string", title: label, format: "password" } }, + required: ["api_key"], + additionalProperties: false, + }, + user_credential_schema: emptySchema, + }; +} + +function serializeAccount(account: Record) { + return { + id: text(account.id), + display_name: text(account.display_name) || text(account.id), + status: text(account.status) || "unknown", + ...(text(account.tool_group_source_type_id) + ? { provider_type_id: text(account.tool_group_source_type_id) } + : {}), + ...(text(account.credential_source_type_id) + ? { credential_source_type_id: text(account.credential_source_type_id) } + : {}), + }; +} + +function assignedAgentIds( + accountId: string, + agentServers: ReadonlyMap>, +): string[] { + return [...agentServers].flatMap(([agentId, server]) => + records(server.tools).some((tool) => text(tool.tool_group_instance_id) === accountId) + ? [agentId] + : [], + ); +} + +function assignedSkillAgentIds( + skillId: string, + registries: ReadonlyMap>, +): string[] { + return [...registries].flatMap(([agentId, registry]) => + records(registry.skills).some((skill) => text(skill.id) === skillId) ? [agentId] : [], + ); +} + +function trustedCatalogSkillId(providerId: string, skillId: string): string { + return `trusted:${JSON.stringify([providerId, skillId])}`; +} + +function parseTrustedCatalogSkillId( + value: string, +): { providerId: string; skillId: string } | undefined { + if (!value.startsWith("trusted:")) return undefined; + try { + const parsed: unknown = JSON.parse(value.slice("trusted:".length)); + if (!Array.isArray(parsed) || parsed.length !== 2 || parsed.some((item) => !text(item))) + return undefined; + return { providerId: parsed[0] as string, skillId: parsed[1] as string }; + } catch { + return undefined; + } +} + +function trustedProviderIconKey(provider: Record): string { + const identity = `${text(provider.name)} ${text(provider.repository_url)}`.toLowerCase(); + if (/\baws\b|amazon/.test(identity)) return "aws"; + if (identity.includes("cloudflare")) return "cloudflare"; + return text(provider.name); +} + +function skillCategory(skill: Record): string { + const value = + text(skill.category) || + text(record(skill.metadata)?.category) || + text(skill.source_provider_id) || + text(skill.source_kind); + return value ? displayCategory(value) : "Other"; +} + +function displaySkillName(name: string, agentIds: readonly string[]): string { + const owner = agentIds.find((agentId) => name.startsWith(`${agentId}-`)); + return owner ? name.slice(owner.length + 1) : name; +} + +function proxiedProviderName( + url: string, + items: readonly Record[], + agentIds: readonly string[], +): string { + const inferred = items + .map((item) => { + const displayName = text(record(item.server)?.display_name); + const owner = agentIds.find((agentId) => displayName.startsWith(`OpenBot ${agentId} `)); + return owner ? displayName.slice(`OpenBot ${owner} `.length).trim() : ""; + }) + .filter(Boolean); + if (inferred[0] && inferred.every((value) => value === inferred[0])) return inferred[0]; + const hostname = new URL(url).hostname; + return displayCategory( + hostname.split(".").find((part) => !["api", "mcp", "www"].includes(part)) || hostname, + ); +} + +function normalizedUrl(value: string): string | undefined { + if (!value) return undefined; + try { + const url = new URL(value); + url.hash = ""; + url.search = ""; + url.hostname = url.hostname.toLowerCase(); + url.pathname = url.pathname === "/" ? "" : url.pathname.replace(/\/$/, ""); + return url.toString().replace(/\/$/, ""); + } catch { + return undefined; + } +} + +const hiddenSystemProviders = new Set([ + "chatkit_internal_agent", + "message_agent", + "tilde_browser", + "tilde_control_plane", + "tilde_human_approval", + "tilde_memory", + "tilde_memory_bank", + "tilde_skill_registry", + "tilde_wallet", + "tilde_wiki", +]); + +function systemProvider(id: string, name: string): boolean { + return hiddenSystemProviders.has(id.toLowerCase()) || name.toLowerCase().startsWith("tilde "); +} + +function displayCategory(value: string): string { + const display = value + .trim() + .replaceAll(/[_-]+/g, " ") + .replace(/\b\w/g, (character) => character.toUpperCase()); + return display.toLowerCase() === "openbot" ? "OpenBot" : display; +} + +function record(value: unknown): Record | undefined { + return typeof value === "object" && value !== null && !Array.isArray(value) + ? (value as Record) + : undefined; +} + +function records(value: unknown): Record[] { + return Array.isArray(value) ? value.flatMap((item) => (record(item) ? [record(item)!] : [])) : []; +} + +function strings(value: unknown): string[] { + return Array.isArray(value) + ? value.filter((item): item is string => typeof item === "string") + : []; +} + +function text(value: unknown): string { + return typeof value === "string" ? value.trim() : ""; +} + +function imageUrl(...values: unknown[]): string | undefined { + return values.find( + (value): value is string => + typeof value === "string" && /^(?:https?:\/\/|data:image\/)/.test(value), + ); +} + +function firstText(...values: unknown[]): string | undefined { + return values.find((value): value is string => typeof value === "string" && !!value.trim()); +} diff --git a/packages/client-runtime/src/tilde-settings.test.ts b/packages/client-runtime/src/tilde-settings.test.ts new file mode 100644 index 00000000..90e7e0cc --- /dev/null +++ b/packages/client-runtime/src/tilde-settings.test.ts @@ -0,0 +1,222 @@ +import { describe, expect, it, vi } from "vite-plus/test"; +import { createTildeRoutineClient, createTildeSignalClient } from "./tilde-settings.js"; + +const automation = { + id: "29fcfbfb-6de3-4b6b-bc35-a1bbf15e923b", + agent_id: "inbox-1", + name: "Deploy watchdog", + instruction: "Check deploy health", + enabled: true, + version: 4, + metadata: { source: "openbot" }, + status: "active", + generation: 3, + applied_generation: 3, + error_message: null, + last_run_at: "2026-08-26T07:00:00Z", + last_session_id: "session-1", + last_error: "last execution failed", + authorization: { visibility: "private" }, + triggers: [ + { + id: "schedule-1", + kind: "schedule", + enabled: true, + schedule: "0 7 * * *", + metadata: { color: "blue" }, + schedule_description: "Daily at 07:00 UTC", + next_run_at: "2026-08-27T07:00:00Z", + materialized_resource_id: "routine-1", + }, + { + id: "event-1", + kind: "event", + enabled: true, + signal_provider_instance_id: "spi_abc", + signal_type: "github.pull_request.opened", + filter: { json_equals: [{ path: "pull_request.draft", value: false }] }, + session_policy: { type: "session_key_template", template: "repo#{{name}}" }, + action: { type: "invoke_chatkit_agent", agent_inbox_id: "inbox-1" }, + instruction_policy: "signal_only", + materialized_resource_id: "rule-1", + }, + ], + created_at: "2026-08-01T00:00:00Z", + updated_at: "2026-08-21T00:00:00Z", +}; + +describe("Tilde settings clients", () => { + it("pages and projects native Tilde automations without an OpenBot routine API", async () => { + const requestJson = vi + .fn() + .mockResolvedValueOnce({ items: [automation], next_page_token: "page-2" }) + .mockResolvedValueOnce({ items: [], next_page_token: null }); + const client = createTildeRoutineClient({ requestJson }); + + const routines = await client.listRoutines("inbox-1"); + + expect(requestJson).toHaveBeenNthCalledWith( + 1, + "/api/tilde/automations?agent_id=inbox-1&page_size=100", + ); + expect(requestJson).toHaveBeenNthCalledWith( + 2, + "/api/tilde/automations?agent_id=inbox-1&page_size=100&next_page_token=page-2", + ); + expect(routines[0]).toMatchObject({ + id: automation.id, + agent_id: "inbox-1", + status: "active", + triggers: [ + { id: "schedule-1", kind: "schedule" }, + { id: "event-1", kind: "event", instance_id: "spi_abc" }, + ], + }); + }); + + it("preserves native trigger configuration and optimistic version while replacing a Routine", async () => { + const requestJson = vi + .fn() + .mockResolvedValueOnce(automation) + .mockResolvedValueOnce(automation) + .mockResolvedValueOnce({ items: [automation], next_page_token: null }); + const client = createTildeRoutineClient({ requestJson }); + + await client.updateRoutine(automation.id, "inbox-1", { name: "Renamed" }); + + const [, request] = requestJson.mock.calls[1] ?? []; + expect(requestJson).toHaveBeenNthCalledWith( + 2, + `/api/tilde/automations/${automation.id}`, + expect.objectContaining({ method: "PUT" }), + ); + expect(JSON.parse(String(request?.body))).toMatchObject({ + expected_version: 4, + metadata: { source: "openbot" }, + triggers: [ + { id: "schedule-1", enabled: true, metadata: { color: "blue" } }, + { + id: "event-1", + action: { type: "invoke_chatkit_agent", agent_inbox_id: "inbox-1" }, + instruction_policy: "signal_only", + session_policy: { type: "session_key_template", template: "repo#{{name}}" }, + }, + ], + }); + }); + + it("projects native signal resources and never returns configuration secrets", async () => { + const provider = { + type_id: "github", + name: "GitHub", + route_descriptors: [{ path: "events" }], + signal_types: [], + credential_sources: [ + { type_id: "github_webhook", name: "Webhook", requires_brokering: false }, + ], + }; + const instance = { + id: "spi_existing", + display_name: "Main GitHub", + signal_provider_source_type_id: "github", + status: "enabled", + ingress_mode: "webhook", + configuration: { signing_secret: "********" }, + created_at: "2026-08-01T00:00:00Z", + updated_at: "2026-08-20T00:00:00Z", + }; + const secondInstance = { ...instance, id: "spi_second", display_name: "Backup GitHub" }; + const requestJson = vi.fn(async (path: string) => { + if (path === "/api/tilde/signals/providers?page_size=100") + return { items: [provider], next_page_token: null }; + if (path === "/api/tilde/signals/instances?page_size=100") + return { items: [instance], next_page_token: "instances-2" }; + if (path === "/api/tilde/signals/instances?page_size=100&next_page_token=instances-2") + return { items: [secondInstance], next_page_token: null }; + throw new Error(`Unexpected request ${path}`); + }); + const client = createTildeSignalClient({ requestJson, apiBaseUrl: "https://tilde.test" }); + + const instances = await client.listSignalInstances(); + + expect(instances).toEqual([ + expect.objectContaining({ + id: "spi_existing", + webhook_url: "https://tilde.test/api/v1/webhooks/github-signals-spi_existing/events", + }), + expect.objectContaining({ id: "spi_second" }), + ]); + expect(instances[0]).not.toHaveProperty("configuration"); + }); + + it("drops redacted signal values before rotating a signing secret", async () => { + const provider = { + type_id: "github", + route_descriptors: [{ path: "events" }], + signal_types: [], + credential_sources: [], + }; + const existing = { + id: "spi_existing", + display_name: "GitHub", + signal_provider_source_type_id: "github", + status: "enabled", + ingress_mode: "webhook", + configuration: { repository: "org/repo", old_secret: "********" }, + polling_state: {}, + }; + const requestJson = vi + .fn() + .mockResolvedValueOnce(existing) + .mockResolvedValueOnce({ ...existing, display_name: "Renamed" }) + .mockResolvedValueOnce({ items: [provider] }); + const client = createTildeSignalClient({ requestJson }); + + await client.updateSignalInstance("spi_existing", { + displayName: "Renamed", + signingSecret: "whsec_next", + }); + + expect(requestJson).toHaveBeenNthCalledWith( + 2, + "/api/tilde/signals/instances/spi_existing", + expect.objectContaining({ + method: "PATCH", + body: JSON.stringify({ + display_name: "Renamed", + status: "enabled", + configuration: { + repository: "org/repo", + provider_webhook_signing_key: "whsec_next", + }, + polling_state: {}, + }), + }), + ); + }); + + it("projects native Routine trigger progress and accepts pre-migration rule ids", async () => { + const requestJson = vi.fn().mockResolvedValue({ + items: [ + { + id: "delivery-native", + matched_trigger_ids: ["trigger-1"], + created_at: "2026-08-29T00:00:00Z", + }, + { + id: "delivery-legacy", + matched_rule_ids: ["legacy-rule-1"], + created_at: "2026-08-28T00:00:00Z", + }, + ], + }); + const client = createTildeSignalClient({ requestJson }); + + const deliveries = await client.listSignalDeliveries("spi_existing"); + + expect(deliveries.map((delivery) => delivery.matched_trigger_ids)).toEqual([ + ["trigger-1"], + ["legacy-rule-1"], + ]); + }); +}); diff --git a/packages/client-runtime/src/tilde-settings.ts b/packages/client-runtime/src/tilde-settings.ts new file mode 100644 index 00000000..072e03ba --- /dev/null +++ b/packages/client-runtime/src/tilde-settings.ts @@ -0,0 +1,618 @@ +import { z } from "zod"; +import type { + CreateRoutineInput, + Routine, + RoutineTriggerSpec, + UpdateRoutineInput, +} from "./contracts/routines.js"; +import type { + CreateSignalInstanceInput, + SignalDelivery, + SignalInstance, + SignalProvider, + TestSignalInstanceInput, + TestSignalInstanceResult, + UpdateSignalInstanceInput, +} from "./contracts/signals.js"; + +type RequestJson = (path: string, init?: RequestInit) => Promise; +type RoutineTriggerWrite = RoutineTriggerSpec & { + enabled?: boolean; + metadata?: unknown; + sessionPolicy?: unknown; + action?: unknown; + instructionPolicy?: string; +}; +type RoutineWrite = Omit & { + triggers: RoutineTriggerWrite[]; + authorization?: unknown; + metadata?: unknown; + expectedVersion?: number; +}; + +export interface TildeSettingsTransport { + requestJson: RequestJson; + apiBaseUrl?: string | (() => string | undefined); +} + +const JsonEqualsPredicateSchema = z.object({ path: z.string(), value: z.unknown() }).passthrough(); +const UpstreamTriggerSchema = z + .object({ + id: z.string(), + kind: z.enum(["schedule", "event"]), + enabled: z.boolean().optional(), + schedule: z.string().optional(), + signal_provider_instance_id: z.string().optional(), + signal_type: z.string().optional(), + filter: z + .object({ json_equals: z.array(JsonEqualsPredicateSchema).optional() }) + .nullable() + .optional(), + materialized_resource_id: z.string().nullable().optional(), + schedule_description: z.string().nullable().optional(), + next_run_at: z.string().nullable().optional(), + session_policy: z.unknown().optional(), + action: z.unknown().optional(), + instruction_policy: z.string().optional(), + metadata: z.unknown().optional(), + }) + .passthrough(); +const UpstreamAutomationSchema = z + .object({ + id: z.string(), + agent_id: z.string(), + name: z.string(), + instruction: z.string(), + enabled: z.boolean(), + version: z.number().optional(), + metadata: z.unknown().optional(), + status: z.enum(["reconciling", "active", "error", "deleting"]).optional(), + generation: z.number().optional(), + applied_generation: z.number().optional(), + error_message: z.string().nullable().optional(), + last_run_at: z.string().nullable().optional(), + last_session_id: z.string().nullable().optional(), + last_error: z.string().nullable().optional(), + authorization: z.unknown().optional(), + triggers: z.array(UpstreamTriggerSchema), + created_at: z.string(), + updated_at: z.string(), + }) + .passthrough(); +const AutomationPageSchema = z.object({ + items: z.array(UpstreamAutomationSchema), + next_page_token: z.string().nullable().optional(), +}); +const AutomationRunSchema = z.object({ session_id: z.string().min(1) }); + +const UpstreamSignalProviderSchema = z + .object({ + type_id: z.string(), + name: z.string().optional(), + documentation: z.string().optional(), + instructions: z.string().optional(), + auth_methods: z.array(z.string()).optional(), + route_descriptors: z.array(z.object({ path: z.string().optional() }).passthrough()).optional(), + signal_types: z + .array( + z + .object({ + type_id: z.string(), + name: z.string().optional(), + documentation: z.string().optional(), + categories: z.array(z.string()).optional(), + default_session_key_template: z.string().nullable().optional(), + default_session_title_template: z.string().nullable().optional(), + }) + .passthrough(), + ) + .optional(), + credential_sources: z + .array( + z + .object({ + type_id: z.string(), + name: z.string().optional(), + requires_brokering: z.boolean().optional(), + display_name_description: z.string().nullable().optional(), + }) + .passthrough(), + ) + .optional(), + interpolation_variables: z + .array( + z + .object({ + key: z.string().optional(), + description: z.string().optional(), + example: z.string().optional(), + }) + .passthrough(), + ) + .optional(), + metadata: z.record(z.string(), z.unknown()).optional(), + webhook_verification: z + .object({ + requires_signing_key: z.boolean().optional(), + signing_key_description: z.string().nullable().optional(), + }) + .nullable() + .optional(), + }) + .passthrough(); +const UpstreamSignalInstanceSchema = z + .object({ + id: z.string(), + display_name: z.string().optional(), + signal_provider_source_type_id: z.string().optional(), + credential_source_type_id: z.string().optional(), + status: z.string().optional(), + ingress_mode: z.string().optional(), + configuration: z.record(z.string(), z.unknown()).optional(), + polling_state: z.record(z.string(), z.unknown()).optional(), + poll_interval_seconds: z.number().nullable().optional(), + last_error: z.string().nullable().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), + }) + .passthrough(); +const UpstreamSignalDeliverySchema = z + .object({ + id: z.string(), + signal_provider_instance_id: z.string().optional(), + signal_type: z.string().optional(), + summary: z.string().nullable().optional(), + status: z.string().optional(), + chatkit_session_id: z.string().nullable().optional(), + error_message: z.string().nullable().optional(), + matched_rule_ids: z.array(z.string()).optional(), + matched_trigger_ids: z.array(z.string()).optional(), + created_at: z.string().optional(), + }) + .passthrough(); +const SignalProviderPageSchema = z.object({ + items: z.array(UpstreamSignalProviderSchema), + next_page_token: z.string().nullable().optional(), +}); +const SignalInstancePageSchema = z.object({ + items: z.array(UpstreamSignalInstanceSchema), + next_page_token: z.string().nullable().optional(), +}); +const SignalDeliveryPageSchema = z.object({ items: z.array(UpstreamSignalDeliverySchema) }); +const SignalTestResultSchema = z.object({ + accepted: z.number().optional(), + delivery_ids: z.array(z.string()).optional(), +}); + +export function createTildeRoutineClient(transport: TildeSettingsTransport) { + const request = transport.requestJson; + + async function listRoutines(agentId: string): Promise { + const items: z.infer[] = []; + let token: string | undefined; + for (let page = 0; page < 100; page += 1) { + const query = new URLSearchParams({ agent_id: agentId, page_size: "100" }); + if (token) query.set("next_page_token", token); + const response = AutomationPageSchema.parse( + await request(`/api/tilde/automations?${query.toString()}`), + ); + items.push(...response.items); + if (!response.next_page_token) return items.map(serializeRoutine); + token = response.next_page_token; + } + throw new Error("Tilde automation pagination exceeded 100 pages"); + } + + async function putAutomation(id: string, body: RoutineWrite): Promise { + await request(`/api/tilde/automations/${encodeURIComponent(id)}`, { + method: "PUT", + body: JSON.stringify({ + agent_id: body.agentId, + name: body.name, + instruction: body.instruction, + enabled: body.enabled ?? true, + ...(body.authorization === undefined ? {} : { authorization: body.authorization }), + ...(body.metadata === undefined ? {} : { metadata: body.metadata }), + ...(body.expectedVersion === undefined ? {} : { expected_version: body.expectedVersion }), + triggers: body.triggers.map(upstreamTriggerBody), + }), + }); + } + + return { + listRoutines, + async createRoutine(input: CreateRoutineInput): Promise { + await putAutomation(crypto.randomUUID(), input); + return await listRoutines(input.agentId); + }, + async updateRoutine( + id: string, + agentId: string, + input: UpdateRoutineInput, + ): Promise { + const current = UpstreamAutomationSchema.parse( + await request(`/api/tilde/automations/${encodeURIComponent(id)}`), + ); + if (current.agent_id !== agentId) throw new Error("Routine not found"); + await putAutomation(id, { + agentId, + name: input.name ?? current.name, + instruction: input.instruction ?? current.instruction, + enabled: input.enabled ?? current.enabled, + triggers: + input.triggers === undefined + ? current.triggers.map(upstreamTriggerSpec) + : preserveTriggerConfiguration(input.triggers, current.triggers), + authorization: current.authorization, + metadata: current.metadata, + expectedVersion: current.version, + }); + return await listRoutines(agentId); + }, + async deleteRoutine(id: string, agentId: string): Promise { + const current = UpstreamAutomationSchema.parse( + await request(`/api/tilde/automations/${encodeURIComponent(id)}`), + ); + if (current.agent_id !== agentId) throw new Error("Routine not found"); + await request(`/api/tilde/automations/${encodeURIComponent(id)}`, { method: "DELETE" }); + return await listRoutines(agentId); + }, + async runRoutine(id: string, agentId: string): Promise { + const current = UpstreamAutomationSchema.parse( + await request(`/api/tilde/automations/${encodeURIComponent(id)}`), + ); + if (current.agent_id !== agentId) throw new Error("Routine not found"); + return AutomationRunSchema.parse( + await request(`/api/tilde/automations/${encodeURIComponent(id)}/run`, { + method: "POST", + body: JSON.stringify({ run_id: crypto.randomUUID() }), + }), + ).session_id; + }, + }; +} + +export function createTildeSignalClient(transport: TildeSettingsTransport) { + const request = transport.requestJson; + const apiBaseUrl = () => { + const configured = + typeof transport.apiBaseUrl === "function" ? transport.apiBaseUrl() : transport.apiBaseUrl; + return (configured ?? "https://api.trytilde.ai").replace(/\/+$/, ""); + }; + + async function upstreamProviders() { + const items: z.infer[] = []; + let token: string | undefined; + for (let page = 0; page < 100; page += 1) { + const query = new URLSearchParams({ page_size: "100" }); + if (token) query.set("next_page_token", token); + const response = SignalProviderPageSchema.parse( + await request(`/api/tilde/signals/providers?${query.toString()}`), + ); + items.push(...response.items); + if (!response.next_page_token) return items; + token = response.next_page_token; + } + throw new Error("Tilde signal provider pagination exceeded 100 pages"); + } + + async function upstreamInstances() { + const items: z.infer[] = []; + let token: string | undefined; + for (let page = 0; page < 100; page += 1) { + const query = new URLSearchParams({ page_size: "100" }); + if (token) query.set("next_page_token", token); + const response = SignalInstancePageSchema.parse( + await request(`/api/tilde/signals/instances?${query.toString()}`), + ); + items.push(...response.items); + if (!response.next_page_token) return items; + token = response.next_page_token; + } + throw new Error("Tilde signal instance pagination exceeded 100 pages"); + } + + return { + async listSignalProviders(): Promise { + return (await upstreamProviders()).map(serializeSignalProvider); + }, + async listSignalInstances(): Promise { + const [items, providers] = await Promise.all([upstreamInstances(), upstreamProviders()]); + const routes = routePathsByProvider(providers); + return items.map((instance) => serializeSignalInstance(apiBaseUrl(), instance, routes)); + }, + async createSignalInstance(input: CreateSignalInstanceInput): Promise { + const providers = await upstreamProviders(); + const provider = providers.find((candidate) => candidate.type_id === input.providerType); + if (!provider) throw new Error("Unknown signal provider"); + const credentialSourceTypeId = + input.credentialSourceTypeId ?? + provider.credential_sources?.find((source) => source.requires_brokering !== true)?.type_id; + if (!credentialSourceTypeId) throw new Error("credential_source_type_id is required"); + const instance = UpstreamSignalInstanceSchema.parse( + await request("/api/tilde/signals/instances", { + method: "POST", + body: JSON.stringify({ + id: `spi_${crypto.randomUUID()}`, + display_name: input.displayName, + signal_provider_source_type_id: input.providerType, + credential_source_type_id: credentialSourceTypeId, + ingress_mode: input.ingressMode ?? "webhook", + configuration: { + ...input.configuration, + ...(input.signingSecret ? { provider_webhook_signing_key: input.signingSecret } : {}), + }, + }), + }), + ); + return serializeSignalInstance(apiBaseUrl(), instance, routePathsByProvider(providers)); + }, + async updateSignalInstance( + id: string, + input: UpdateSignalInstanceInput, + ): Promise { + const existing = UpstreamSignalInstanceSchema.parse( + await request(`/api/tilde/signals/instances/${encodeURIComponent(id)}`), + ); + const updated = UpstreamSignalInstanceSchema.parse( + await request(`/api/tilde/signals/instances/${encodeURIComponent(id)}`, { + method: "PATCH", + body: JSON.stringify({ + display_name: input.displayName ?? existing.display_name ?? id, + status: input.status ?? existing.status ?? "enabled", + configuration: { + ...withoutRedactedValues(input.configuration ?? existing.configuration ?? {}), + ...(input.signingSecret ? { provider_webhook_signing_key: input.signingSecret } : {}), + }, + polling_state: existing.polling_state ?? {}, + ...(existing.poll_interval_seconds == null + ? {} + : { poll_interval_seconds: existing.poll_interval_seconds }), + }), + }), + ); + const providers = await upstreamProviders(); + return serializeSignalInstance(apiBaseUrl(), updated, routePathsByProvider(providers)); + }, + async deleteSignalInstance(id: string): Promise { + await request(`/api/tilde/signals/instances/${encodeURIComponent(id)}`, { + method: "DELETE", + }); + }, + async testSignalInstance( + id: string, + input: TestSignalInstanceInput = {}, + ): Promise { + const result = SignalTestResultSchema.parse( + await request(`/api/tilde/signals/instances/${encodeURIComponent(id)}/test`, { + method: "POST", + body: JSON.stringify({ + ...(input.signalType ? { signal_type: input.signalType } : {}), + ...(input.summary ? { summary: input.summary } : {}), + data: input.data ?? {}, + }), + }), + ); + return { accepted: result.accepted ?? 0, delivery_ids: result.delivery_ids ?? [] }; + }, + async listSignalDeliveries(instanceId: string): Promise { + const query = new URLSearchParams({ page_size: "20", instance_id: instanceId }); + return SignalDeliveryPageSchema.parse( + await request(`/api/tilde/signals/deliveries?${query.toString()}`), + ).items.map(serializeSignalDelivery); + }, + }; +} + +function serializeRoutine(automation: z.infer): Routine { + return { + id: automation.id, + agent_id: automation.agent_id, + name: automation.name, + instruction: automation.instruction, + enabled: automation.enabled, + triggers: automation.triggers.map((trigger) => { + if (trigger.kind === "schedule") + return { + id: trigger.id, + kind: "schedule" as const, + schedule: trigger.schedule ?? "", + ...(trigger.schedule_description ? { description: trigger.schedule_description } : {}), + next_run_at: trigger.next_run_at ?? null, + }; + const signalType = trigger.signal_type ?? ""; + return { + id: trigger.id, + kind: "event" as const, + instance_id: trigger.signal_provider_instance_id ?? "", + provider_type: signalType.split(".")[0] ?? "", + signal_type: signalType, + filters: trigger.filter?.json_equals ?? [], + }; + }), + last_run_at: automation.last_run_at ?? null, + last_session_id: automation.last_session_id ?? null, + last_error: automation.last_error ?? null, + created_at: automation.created_at, + updated_at: automation.updated_at, + ...(automation.error_message === undefined ? {} : { error_message: automation.error_message }), + ...(automation.status === undefined ? {} : { status: automation.status }), + ...(automation.generation === undefined ? {} : { generation: automation.generation }), + ...(automation.applied_generation === undefined + ? {} + : { applied_generation: automation.applied_generation }), + }; +} + +function upstreamTriggerBody(trigger: RoutineTriggerWrite) { + return { + id: trigger.id ?? crypto.randomUUID(), + ...(trigger.enabled === undefined ? {} : { enabled: trigger.enabled }), + ...(trigger.metadata === undefined ? {} : { metadata: trigger.metadata }), + ...(trigger.kind === "schedule" + ? { kind: "schedule", schedule: trigger.schedule } + : { + kind: "event", + signal_provider_instance_id: trigger.instanceId, + signal_type: trigger.signalType, + filter: { json_equals: trigger.filters ?? [] }, + ...(trigger.sessionPolicy === undefined ? {} : { session_policy: trigger.sessionPolicy }), + ...(trigger.action === undefined ? {} : { action: trigger.action }), + ...(trigger.instructionPolicy === undefined + ? {} + : { instruction_policy: trigger.instructionPolicy }), + }), + }; +} + +function upstreamTriggerSpec(trigger: z.infer): RoutineTriggerWrite { + if (trigger.kind === "schedule") + return { + id: trigger.id, + kind: "schedule", + schedule: trigger.schedule ?? "", + ...(trigger.enabled === undefined ? {} : { enabled: trigger.enabled }), + ...(trigger.metadata === undefined ? {} : { metadata: trigger.metadata }), + }; + return { + id: trigger.id, + kind: "event", + instanceId: trigger.signal_provider_instance_id ?? "", + signalType: trigger.signal_type ?? "", + filters: trigger.filter?.json_equals ?? [], + ...(trigger.enabled === undefined ? {} : { enabled: trigger.enabled }), + ...(trigger.metadata === undefined ? {} : { metadata: trigger.metadata }), + ...(trigger.session_policy === undefined ? {} : { sessionPolicy: trigger.session_policy }), + ...(trigger.action === undefined ? {} : { action: trigger.action }), + ...(trigger.instruction_policy === undefined + ? {} + : { instructionPolicy: trigger.instruction_policy }), + }; +} + +function preserveTriggerConfiguration( + desired: RoutineTriggerSpec[], + current: z.infer[], +): RoutineTriggerWrite[] { + const currentById = new Map(current.map((trigger) => [trigger.id, trigger])); + return desired.map((trigger) => { + if (!trigger.id) return trigger; + const existing = currentById.get(trigger.id); + if (existing?.kind !== trigger.kind) return trigger; + const common = { + ...(existing.enabled === undefined ? {} : { enabled: existing.enabled }), + ...(existing.metadata === undefined ? {} : { metadata: existing.metadata }), + }; + if (trigger.kind === "schedule") return { ...trigger, ...common }; + if ( + existing.signal_provider_instance_id !== trigger.instanceId || + existing.signal_type !== trigger.signalType + ) + return { ...trigger, ...common }; + return { + ...trigger, + ...common, + ...(existing.session_policy === undefined ? {} : { sessionPolicy: existing.session_policy }), + ...(existing.action === undefined ? {} : { action: existing.action }), + ...(existing.instruction_policy === undefined + ? {} + : { instructionPolicy: existing.instruction_policy }), + }; + }); +} + +function serializeSignalProvider( + provider: z.infer, +): SignalProvider { + const signingKeyDescription = + provider.webhook_verification?.signing_key_description ?? + provider.metadata?.signing_key_description; + return { + type_id: provider.type_id, + name: provider.name ?? provider.type_id, + documentation: provider.documentation ?? "", + instructions: provider.instructions ?? "", + auth_methods: provider.auth_methods ?? [], + requires_signing_key: provider.webhook_verification?.requires_signing_key ?? false, + signing_key_description: + typeof signingKeyDescription === "string" ? signingKeyDescription : null, + route_path: provider.route_descriptors?.[0]?.path ?? "", + signal_types: (provider.signal_types ?? []).map((signalType) => ({ + type_id: signalType.type_id, + name: signalType.name ?? signalType.type_id, + documentation: signalType.documentation ?? "", + categories: signalType.categories ?? [], + default_session_key_template: signalType.default_session_key_template ?? "", + default_session_title_template: signalType.default_session_title_template ?? null, + })), + credential_sources: (provider.credential_sources ?? []).map((source) => ({ + type_id: source.type_id, + name: source.name ?? source.type_id, + requires_brokering: source.requires_brokering ?? false, + display_name_description: source.display_name_description ?? "", + })), + interpolation_variables: (provider.interpolation_variables ?? []).map((variable) => ({ + key: variable.key ?? "", + description: variable.description ?? "", + example: variable.example ?? "", + })), + }; +} + +function routePathsByProvider( + providers: z.infer[], +): Map { + return new Map( + providers.flatMap((provider) => { + const path = provider.route_descriptors?.[0]?.path; + return path ? [[provider.type_id, path] as const] : []; + }), + ); +} + +function serializeSignalInstance( + apiBaseUrl: string, + instance: z.infer, + routes: ReadonlyMap, +): SignalInstance { + const providerType = instance.signal_provider_source_type_id ?? ""; + const ingressMode = instance.ingress_mode ?? "webhook"; + const routePath = routes.get(providerType); + return { + id: instance.id, + display_name: instance.display_name ?? instance.id, + provider_type: providerType, + status: instance.status ?? "enabled", + ingress_mode: ingressMode, + webhook_url: + ingressMode === "webhook" && providerType && routePath + ? `${apiBaseUrl}/api/v1/webhooks/${providerType}-signals-${instance.id}/${routePath}` + : null, + poll_interval_seconds: instance.poll_interval_seconds ?? null, + last_error: instance.last_error ?? null, + created_at: instance.created_at ?? "", + updated_at: instance.updated_at ?? "", + }; +} + +function withoutRedactedValues(configuration: Record): Record { + return Object.fromEntries( + Object.entries(configuration).filter(([, value]) => value !== "********"), + ); +} + +function serializeSignalDelivery( + delivery: z.infer, +): SignalDelivery { + return { + id: delivery.id, + instance_id: delivery.signal_provider_instance_id ?? "", + signal_type: delivery.signal_type ?? "", + summary: delivery.summary ?? null, + status: delivery.status ?? "pending", + session_id: delivery.chatkit_session_id ?? null, + error_message: delivery.error_message ?? null, + matched_trigger_ids: delivery.matched_trigger_ids ?? delivery.matched_rule_ids ?? [], + created_at: delivery.created_at ?? "", + }; +} diff --git a/packages/platform-integrations/README.md b/packages/platform-integrations/README.md index a67b94ce..095cf145 100644 --- a/packages/platform-integrations/README.md +++ b/packages/platform-integrations/README.md @@ -4,7 +4,7 @@ Canonical installation-level integrations for platforms shared by multiple OpenB ## Public API -- `TildePlatform` implements `Platform` for the Tilde credential, organization, team, and API origin shared by Tilde agent, skills, and tools providers. It may combine the persistent machine API key with a short-lived human OAuth token for deployment-time machine-on-behalf-of-human authorization. Initialization persists `https://api.trytilde.ai` as the default origin so an unrelated host override cannot retarget a configured repository. `tildePlatform` is the default shared instance. +- `TildePlatform` implements `Platform` for the installation API key, organization, team, and API origin shared by Tilde agent, skills, and tools providers. The API key authenticates as its owning human or agent user; OpenBot never combines it with a bearer token. Initialization persists `https://api.trytilde.ai` as the default origin so an unrelated host override cannot retarget a configured repository. `tildePlatform` is the default shared instance. - `VercelPlatform` implements `Platform` for the Vercel credential and optional team scope shared by Vercel control-service, agent-service, and computer providers. `vercelPlatform` is the default shared instance. - `ExeDevPlatform` owns the shared VM name, 2-vCPU/8-GB sizing defaults, remote checkout path, SSH hostname, and public HTTPS origin consumed by the exe.dev runtime and Computer providers. diff --git a/packages/platform-integrations/src/index.test.ts b/packages/platform-integrations/src/index.test.ts index bb0f8a8c..0ebadfa9 100644 --- a/packages/platform-integrations/src/index.test.ts +++ b/packages/platform-integrations/src/index.test.ts @@ -32,17 +32,16 @@ describe("platform initialization", () => { expect(platform.client()).toBe(platform.client()); }); - it("combines the machine key with an optional human deployment token", () => { + it("uses exactly one installation API-key credential", () => { const platform = new TildePlatform({ apiKey: "test-key", - delegatedBearerToken: "human-token", orgId: "test-org", teamId: "test-team", }); const headers = new Headers(platform.client().config.headers); expect(headers.get("x-api-key")).toBe("test-key"); - expect(headers.get("authorization")).toBe("Bearer human-token"); + expect(headers.get("authorization")).toBeNull(); }); it("owns shared Vercel credentials and account scope", () => { diff --git a/packages/platform-integrations/src/tilde/index.ts b/packages/platform-integrations/src/tilde/index.ts index c4a21988..31f42199 100644 --- a/packages/platform-integrations/src/tilde/index.ts +++ b/packages/platform-integrations/src/tilde/index.ts @@ -4,8 +4,6 @@ import { tildeFetch } from "./fetch.js"; export interface TildePlatformConfig { apiKey: string; - /** Optional human OAuth token used with the API key for deployment-time delegation. */ - delegatedBearerToken?: string; orgId: string; teamId: string; baseUrl?: string; @@ -88,12 +86,9 @@ export class TildePlatform implements Platform { } } -/** Headers for ordinary machine requests or deployment-time human delegation. */ +/** Headers for the installation's single API-key credential. */ export function tildeAuthenticationHeaders(config: TildePlatformConfig): Headers { - const headers = new Headers({ "x-api-key": config.apiKey }); - if (config.delegatedBearerToken) - headers.set("Authorization", `Bearer ${config.delegatedBearerToken}`); - return headers; + return new Headers({ "x-api-key": config.apiKey }); } function tildeClientConfig( diff --git a/packages/sdk-vercel-ai-node/src/chatkit-message.ts b/packages/sdk-vercel-ai-node/src/chatkit-message.ts index 14ebd163..2ecc574c 100644 --- a/packages/sdk-vercel-ai-node/src/chatkit-message.ts +++ b/packages/sdk-vercel-ai-node/src/chatkit-message.ts @@ -74,6 +74,8 @@ export type SignalMetadata = JsonObject & { signal_type: string; signal_delivery_id?: string; signal_provider_instance_id?: string; + routine_trigger_id?: string; + /** Present only on signal messages persisted before native Routine triggers. */ signal_rule_id?: string; }; diff --git a/packages/sdk-vercel-ai-node/test/webhook.test.ts b/packages/sdk-vercel-ai-node/test/webhook.test.ts index 2203f632..e800689b 100644 --- a/packages/sdk-vercel-ai-node/test/webhook.test.ts +++ b/packages/sdk-vercel-ai-node/test/webhook.test.ts @@ -1878,7 +1878,7 @@ describe("ChatKit AI SDK converters", () => { signal.metadata.signal_type, signal.metadata.signal_delivery_id, signal.metadata.signal_provider_instance_id, - signal.metadata.signal_rule_id, + signal.metadata.routine_trigger_id, signal.from_inbox_type_id, signal.user_display_name, ].join("|"), @@ -1903,7 +1903,7 @@ describe("ChatKit AI SDK converters", () => { signal_type: "sentry.issue.created", signal_delivery_id: "del_1", signal_provider_instance_id: "spi_1", - signal_rule_id: "rule_1", + routine_trigger_id: "trigger_1", }, }, ], @@ -1918,7 +1918,7 @@ describe("ChatKit AI SDK converters", () => { parts: [ { type: "text", - text: "sentry.issue.created|del_1|spi_1|rule_1|sentry|Sentry", + text: "sentry.issue.created|del_1|spi_1|trigger_1|sentry|Sentry", }, ], }, diff --git a/packages/sdk/src/generated/schema.d.ts b/packages/sdk/src/generated/schema.d.ts index 0d9ef3c6..ae387fd7 100644 --- a/packages/sdk/src/generated/schema.d.ts +++ b/packages/sdk/src/generated/schema.d.ts @@ -135,7 +135,7 @@ export interface paths { put?: never; /** * Enroll current human in a product - * @description Creates one deduplicated human Core or Pay seat, synchronizes the exact organization quantity with Autumn, and never bills machine or API-key identities. + * @description Creates one deduplicated human Core or Pay seat, synchronizes the exact organization quantity with Autumn, and never bills agent identities. */ post: operations["billing-product-enroll-current-human"]; delete?: never; @@ -1332,8 +1332,8 @@ export interface paths { cookie?: never; }; /** - * List unified automations - * @description Lists authoritative automation roots, filterable by agent and reconciliation status. + * List unified routines + * @description Lists native Routine roots and their schedule or event triggers, filterable by agent. */ get: operations["automations-list"]; put?: never; @@ -1344,7 +1344,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/automations/{automation_id}": { + "/api/v1/team/{team_id}/automations/{routine_id}": { parameters: { query?: never; header?: never; @@ -1352,19 +1352,19 @@ export interface paths { cookie?: never; }; /** - * Get a unified automation - * @description Gets the persisted root, trigger membership, generation, and reconciliation status. + * Get a unified routine + * @description Gets the native root, trigger configuration, schedule telemetry, and version. */ get: operations["automations-get"]; /** - * Create or replace a unified automation - * @description Persists and serially reconciles desired schedule and event triggers. Reconciliation failure remains observable on the root. + * Create or replace a unified routine + * @description Atomically persists the Routine root and its complete native schedule/event trigger set. */ put: operations["automations-put"]; post?: never; /** - * Delete a unified automation - * @description Deletes all materialized members before deleting the authoritative root. + * Delete a unified routine + * @description Deletes the Routine root and cascading triggers when no schedule execution holds a live lease. */ delete: operations["automations-delete"]; options?: never; @@ -1372,7 +1372,27 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/automations/{automation_id}/ownership": { + "/api/v1/team/{team_id}/automations/{routine_id}/executions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List routine executions + * @description Lists durable manual, schedule, and event executions for one visible Routine. + */ + get: operations["automations-list-executions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/team/{team_id}/automations/{routine_id}/ownership": { parameters: { query?: never; header?: never; @@ -1382,7 +1402,7 @@ export interface paths { get?: never; put?: never; /** - * Set automation ownership + * Set routine ownership * @description Sets the persisted ownership mode and preserves an effective-user grant when made private. */ post: operations["automations-set-ownership"]; @@ -1392,7 +1412,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/automations/{automation_id}/run": { + "/api/v1/team/{team_id}/automations/{routine_id}/run": { parameters: { query?: never; header?: never; @@ -1402,7 +1422,7 @@ export interface paths { get?: never; put?: never; /** - * Run a unified automation + * Run a unified routine * @description Runs once for the supplied durable run ID and returns the existing result on retry. */ post: operations["automations-run"]; @@ -1412,7 +1432,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/automations/{automation_id}/visibility": { + "/api/v1/team/{team_id}/automations/{routine_id}/visibility": { parameters: { query?: never; header?: never; @@ -1422,7 +1442,7 @@ export interface paths { get?: never; put?: never; /** - * Set automation visibility + * Set routine visibility * @description Sets the persisted visibility mode and preserves an effective-user grant when made private. */ post: operations["automations-set-visibility"]; @@ -1432,7 +1452,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants": { + "/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants": { parameters: { query?: never; header?: never; @@ -1440,13 +1460,13 @@ export interface paths { cookie?: never; }; /** - * List automation grants - * @description Lists grants on the selected automation authorization plane. + * List routine grants + * @description Lists grants on the selected routine authorization plane. */ get: operations["automations-list-grants"]; put?: never; /** - * Add an automation grant + * Add a routine grant * @description Validates and adds a principal grant on the selected authorization plane. */ post: operations["automations-add-grant"]; @@ -1456,7 +1476,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/automations/{automation_id}/{plane}/grants/{principal_type}/{principal_id}": { + "/api/v1/team/{team_id}/automations/{routine_id}/{plane}/grants/{principal_type}/{principal_id}": { parameters: { query?: never; header?: never; @@ -1467,7 +1487,7 @@ export interface paths { put?: never; post?: never; /** - * Remove an automation grant + * Remove a routine grant * @description Idempotently removes a principal grant while retaining at least one private ownership grant. */ delete: operations["automations-remove-grant"]; @@ -1653,12 +1673,12 @@ export interface paths { }; /** * Download a ChatKit agent avatar - * @description Returns the canonical avatar bytes from the agent's stable machine-user profile. + * @description Returns the canonical avatar bytes from the stable agent-user profile. */ get: operations["chatkit-get-agent-avatar"]; /** * Upload a ChatKit agent avatar - * @description Stores a PNG, JPEG, or WebP avatar on the agent's stable machine-user profile. + * @description Stores a PNG, JPEG, or WebP avatar on the stable agent-user profile. */ put: operations["chatkit-update-agent-avatar"]; post?: never; @@ -1712,6 +1732,26 @@ export interface paths { patch?: never; trace?: never; }; + "/api/v1/team/{team_id}/chatkit/agents/{agent_id}/permissions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update ChatKit agent permissions + * @description Sets whether an agent may delegate to other agents and create multi-party sessions, and which agents or users it may reach. Permissions narrow reach: they intersect with the visibility plane and never grant access to an agent the caller cannot already see. An agent with no permissions is offered no delegation tools at all. + */ + put: operations["chatkit-set-agent-permissions"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/v1/team/{team_id}/chatkit/agents/{agent_id}/provision": { parameters: { query?: never; @@ -2168,122 +2208,6 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/chatkit/routines": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * List ChatKit routines - * @description Lists scheduled prompts for one team. - */ - get: operations["chatkit-list-routines"]; - put?: never; - /** - * Create a ChatKit routine - * @description Creates a minute-granularity UTC cron schedule that prompts one ChatKit agent. - */ - post: operations["chatkit-create-routine"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get a ChatKit routine - * @description Gets one scheduled prompt. - */ - get: operations["chatkit-get-routine"]; - put?: never; - post?: never; - /** - * Delete a ChatKit routine - * @description Deletes one scheduled prompt. - */ - delete: operations["chatkit-delete-routine"]; - options?: never; - head?: never; - /** - * Update a ChatKit routine - * @description Updates a routine and recomputes its next UTC occurrence. - */ - patch: operations["chatkit-update-routine"]; - trace?: never; - }; - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/ownership": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: operations["set-chatkit-routine-ownership"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/visibility": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: operations["set-chatkit-routine-visibility"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["list-chatkit-routine-grants"]; - put?: never; - post: operations["add-chatkit-routine-grant"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/chatkit/routines/{routine_id}/{plane}/grants/{principal_type}/{principal_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - delete: operations["remove-chatkit-routine-grant"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/api/v1/team/{team_id}/chatkit/session": { parameters: { query?: never; @@ -5810,122 +5734,6 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/team/{team_id}/signals/rules": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * List SignalRules - * @description List SignalRules. - */ - get: operations["signals-list-rules"]; - put?: never; - /** - * Create SignalRule - * @description Create a SignalRule mapping incoming signals to ChatKit actions. - */ - post: operations["signals-create-rule"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/signals/rules/{id}/ownership": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: operations["set-signal-rule-ownership"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/signals/rules/{id}/visibility": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post: operations["set-signal-rule-visibility"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["list-signal-rule-grants"]; - put?: never; - post: operations["add-signal-rule-grant"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/signals/rules/{id}/{plane}/grants/{principal_type}/{principal_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - delete: operations["remove-signal-rule-grant"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/team/{team_id}/signals/rules/{rule_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get SignalRule - * @description Get a SignalRule. - */ - get: operations["signals-get-rule"]; - put?: never; - post?: never; - /** - * Delete SignalRule - * @description Delete a SignalRule. - */ - delete: operations["signals-delete-rule"]; - options?: never; - head?: never; - /** - * Update SignalRule - * @description Update a SignalRule. - */ - patch: operations["signals-update-rule"]; - trace?: never; - }; "/api/v1/team/{team_id}/skill": { parameters: { query?: never; @@ -8390,122 +8198,6 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/user/{user_id}/signals/rules": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["signals-list-personal-rules"]; - put?: never; - post: operations["signals-create-personal-rule"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/user/{user_id}/signals/rules/{rule_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get: operations["signals-get-personal-rule"]; - put?: never; - post?: never; - delete: operations["signals-delete-personal-rule"]; - options?: never; - head?: never; - patch: operations["signals-update-personal-rule"]; - trace?: never; - }; - "/api/v1/user/{user_id}/signals/rules/{rule_id}/ownership": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Set personal signal rule ownership - * @description Set the persisted ownership mode for a personal signal rule. Personal rules cannot be widened to team ownership. - */ - post: operations["signals-set-personal-rule-ownership"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/user/{user_id}/signals/rules/{rule_id}/visibility": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Set personal signal rule visibility - * @description Set the persisted visibility mode for a personal signal rule. Personal rules cannot be widened to team visibility. - */ - post: operations["signals-set-personal-rule-visibility"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * List personal signal rule grants - * @description List persisted grants for one authorization plane on a personal signal rule. - */ - get: operations["signals-list-personal-rule-grants"]; - put?: never; - /** - * Add personal signal rule grant - * @description Add a principal grant to the URL-selected authorization plane on a personal signal rule. - */ - post: operations["signals-add-personal-rule-grant"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/api/v1/user/{user_id}/signals/rules/{rule_id}/{plane}/grants/{principal_type}/{principal_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** - * Remove personal signal rule grant - * @description Remove a principal grant from the URL-selected authorization plane on a personal signal rule. - */ - delete: operations["signals-remove-personal-rule-grant"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; "/api/v1/user/{user_id}/skill": { parameters: { query?: never; @@ -9073,6 +8765,17 @@ export interface components { role: string; user_id: string; }; + /** + * @description Authenticated agent identity. + * + * Represents an agent user that authenticated via an API key. + */ + Agent: { + /** @description Groups the agent belongs to. */ + groups?: string[]; + /** @description Subject identifier (user ID) of the agent account. */ + sub: string; + }; /** @enum {string} */ AgentCredentialStrategy: "preserve" | "rotate"; AgentEndpointSpec: { @@ -9085,6 +8788,13 @@ export interface components { }; /** @enum {string} */ AgentEventVisibility: "hidden" | "summary" | "details"; + /** @description Who an agent may pull into a session it creates. */ + AgentMultiplayerPermissions: { + /** @description Agents the agent may add. */ + with_agents?: components["schemas"]["AgentReachScope"]; + /** @description Tilde users the agent may add. */ + with_users?: components["schemas"]["AgentReachScope"]; + }; AgentObservabilityConfiguration: { policy: components["schemas"]["AgentObservabilityPolicy"]; tools: components["schemas"]["AgentToolCatalogEntry"][]; @@ -9099,6 +8809,19 @@ export interface components { tool_visibility: components["schemas"]["AgentEventVisibility"]; updated_at: components["schemas"]["WrappedChronoDateTime"]; }; + /** @description The reach recorded on an agent record. */ + AgentPermissions: { + /** + * @description Whether the agent may create a session with more than two parties, and + * who it may add. + */ + create_multiplayer_sessions?: components["schemas"]["AgentMultiplayerPermissions"]; + /** + * @description Whether the agent may open a private child conversation with another + * agent, and with which agents. + */ + delegate_to_other_agents?: components["schemas"]["AgentReachScope"]; + }; AgentProvisioningOperation: { agent_id: string; /** Format: int64 */ @@ -9123,6 +8846,19 @@ export interface components { }; /** @enum {string} */ AgentProvisioningStatus: "queued" | "running" | "active" | "error" | "deprovisioning"; + /** @description Who an agent may reach for one kind of action. */ + AgentReachScope: { + /** @enum {string} */ + mode: "none"; + } | { + /** @enum {string} */ + mode: "any"; + } | { + /** @description Agent inbox ids or Tilde user ids, depending on the field. */ + ids: string[]; + /** @enum {string} */ + mode: "only"; + }; AgentSpec: { credential_strategy?: components["schemas"]["AgentCredentialStrategy"]; display_name: string; @@ -9221,64 +8957,6 @@ export interface components { provider_provisioning_response: components["schemas"]["ProviderAppProvisioningResponse"]; tool_group_instance?: null | components["schemas"]["ToolGroupInstanceSerialized"]; }; - Automation: { - agent_id: string; - /** Format: int64 */ - applied_generation: number; - authorization: components["schemas"]["ResourceAuthorizationModes"]; - created_at: components["schemas"]["WrappedChronoDateTime"]; - created_by_user_id: string; - enabled: boolean; - error_message?: string | null; - /** Format: int64 */ - generation: number; - id: components["schemas"]["WrappedUuidV4"]; - instruction: string; - /** @description Execution error paired with the latest materialized schedule execution. */ - last_error?: string | null; - last_run_at?: null | components["schemas"]["WrappedChronoDateTime"]; - last_session_id?: null | components["schemas"]["WrappedUuidV4"]; - name: string; - org_id: string; - status: components["schemas"]["AutomationStatus"]; - team_id: string; - triggers: components["schemas"]["AutomationTrigger"][]; - updated_at: components["schemas"]["WrappedChronoDateTime"]; - }; - AutomationPaginatedResponse: { - items: components["schemas"]["Automation"][]; - next_page_token?: string; - }; - /** @enum {string} */ - AutomationStatus: "reconciling" | "active" | "error" | "deleting"; - AutomationTrigger: components["schemas"]["AutomationTriggerSpec"] & { - created_at: components["schemas"]["WrappedChronoDateTime"]; - id: components["schemas"]["WrappedUuidV4"]; - /** @description Schedule-only live projection from the materialized ChatKit routine. */ - last_error?: string | null; - last_run_at?: null | components["schemas"]["WrappedChronoDateTime"]; - last_session_id?: null | components["schemas"]["WrappedUuidV4"]; - materialized_resource_id?: null | components["schemas"]["WrappedUuidV4"]; - next_run_at?: null | components["schemas"]["WrappedChronoDateTime"]; - /** @description Schedule-only live projection from the materialized ChatKit routine. */ - schedule_description?: string | null; - updated_at: components["schemas"]["WrappedChronoDateTime"]; - }; - AutomationTriggerInput: components["schemas"]["AutomationTriggerSpec"] & { - id: components["schemas"]["WrappedUuidV4"]; - }; - AutomationTriggerSpec: { - /** @enum {string} */ - kind: "schedule"; - schedule: string; - } | { - filter?: components["schemas"]["SignalRuleFilter"]; - /** @enum {string} */ - kind: "event"; - session_policy?: null | components["schemas"]["SignalSessionPolicy"]; - signal_provider_instance_id: string; - signal_type: string; - }; /** @description Typed billing bootstrap response for the selected organization. */ BillingContext: { can_manage_billing: boolean; @@ -9551,6 +9229,22 @@ export interface components { }; /** @enum {string} */ ChatKitRealtimeTicketTransport: "browser" | "native"; + /** @description Public agent snapshot included in every signed HTTP-agent request. */ + ChatKitRequestAgent: { + avatar?: null | components["schemas"]["ChatKitRequestAgentAvatar"]; + createdAt: components["schemas"]["WrappedChronoDateTime"]; + displayName: string; + id: string; + principalUserId?: string | null; + providerId: string; + status: components["schemas"]["InboxStatus"]; + updatedAt: components["schemas"]["WrappedChronoDateTime"]; + }; + /** @description Agent avatar resource included in the signed HTTP-agent request context. */ + ChatKitRequestAgentAvatar: { + /** @description Authenticated Tilde API path that serves the current avatar bytes. */ + url: string; + }; /** @description Agent context included when an agent identity or display name matched. */ ChatKitSearchAgent: { display_name: string; @@ -9708,6 +9402,7 @@ export interface components { }; /** @description Request body for chat completion in Vercel AI SDK format. */ ChatRequest: { + agent?: null | components["schemas"]["ChatKitRequestAgent"]; chatId?: string | null; messages: components["schemas"]["ChatMessage"][]; session?: null | components["schemas"]["ChatSessionContext"]; @@ -10112,17 +9807,6 @@ export interface components { resource_server_credential_id?: null | components["schemas"]["WrappedUuidV4"]; user_credential_id?: null | components["schemas"]["WrappedUuidV4"]; }; - /** @description User-authored fields for a new routine. */ - CreateRoutineRequestInner: { - agent_inbox_id: string; - authorization?: components["schemas"]["ResourceAuthorizationModes"]; - enabled?: boolean; - initial_grants?: components["schemas"]["ResourceGrantRequest"][]; - metadata?: null | components["schemas"]["WrappedJsonValue"]; - prompt: string; - schedule: string; - title: string; - }; /** @description Inner create fields for a ChatKit session. */ CreateSessionInner: { authorization?: components["schemas"]["ResourceAuthorizationModes"]; @@ -10180,19 +9864,6 @@ export interface components { user_credential_id?: null | components["schemas"]["WrappedUuidV4"]; webhook_endpoint_id?: string | null; }; - CreateSignalRuleRequestInner: { - action: components["schemas"]["SignalAction"]; - authorization?: components["schemas"]["ResourceAuthorizationModes"]; - display_name: string; - filter?: components["schemas"]["SignalRuleFilter"]; - id?: null | components["schemas"]["WrappedUuidV4"]; - initial_grants?: components["schemas"]["ResourceGrantRequest"][]; - metadata?: null | components["schemas"]["WrappedJsonValue"]; - session_policy: components["schemas"]["SignalSessionPolicy"]; - signal_provider_instance_id: string; - signal_type: string; - target_team_id?: string | null; - }; /** @description Inner create-skill payload with tenant fields supplied by the wrapper. */ CreateSkillInner: { authorization?: components["schemas"]["ResourceAuthorizationModes"]; @@ -10421,7 +10092,7 @@ export interface components { type_id: string; }; /** - * @description Current caller's seat state. Machine identities never consume seats. + * @description Current caller's seat state. Agent identities never consume seats. * @enum {string} */ CurrentSeatStatus: "active" | "not_assigned" | "not_billable"; @@ -10475,9 +10146,6 @@ export interface components { DebugAuthProfilesResponse: { profiles: string[]; }; - DeleteAutomationResponse: { - deleted: boolean; - }; DeleteChatKitAgentTurnQueueItemResponse: { deleted: boolean; }; @@ -10492,7 +10160,6 @@ export interface components { DeleteMessageResponse: { success: boolean; }; - /** @description Routine deletion response. */ DeleteRoutineResponse: { deleted: boolean; }; @@ -10833,18 +10500,13 @@ export interface components { * This is the result of authentication and is used throughout the system * for authorization decisions. */ - Identity: (components["schemas"]["Machine"] & { + Identity: (components["schemas"]["Agent"] & { /** @enum {string} */ - type: "machine"; + type: "agent"; }) | (components["schemas"]["Human"] & { /** @enum {string} */ type: "human"; }) | { - human: components["schemas"]["Human"]; - machine: components["schemas"]["Machine"]; - /** @enum {string} */ - type: "machine_on_behalf_of_human"; - } | { /** @enum {string} */ type: "unauthenticated"; }; @@ -10882,19 +10544,30 @@ export interface components { }; /** @description Cross-crate public inbox view. */ Inbox: { + agent_permissions?: null | components["schemas"]["AgentPermissions"]; + api_key_id?: string | null; authorization: components["schemas"]["ResourceAuthorizationModes"]; common_provider_installation_id?: string | null; + concurrency_policy?: string | null; configuration: components["schemas"]["WrappedJsonValue"]; created_at: components["schemas"]["WrappedChronoDateTime"]; created_by_user_id?: string | null; + /** @description Human-readable name. Unique per team and inbox type. */ + display_name?: string | null; + /** @description Agent HTTP endpoint. `None` for anything that is not an agent. */ + endpoint_url?: string | null; id: string; inbox_type?: components["schemas"]["InboxType"]; + local_running_endpoint?: boolean | null; lookup_key?: string | null; message_format?: null | components["schemas"]["MessageFormatConfig"]; org_id: string; provider_id: string; status: components["schemas"]["InboxStatus"]; + streaming?: boolean | null; team_id: string; + /** Format: int64 */ + timeout_ms?: number | null; updated_at: components["schemas"]["WrappedChronoDateTime"]; }; /** @description Stored inbox instance representation. */ @@ -11079,17 +10752,6 @@ export interface components { /** @enum {string} */ type: "custom_oidc"; }; - /** - * @description Authenticated machine identity. - * - * Represents an API client or automated service that authenticated via API key. - */ - Machine: { - /** @description System groups the machine belongs to (e.g. `["tilde_system:admin"]`) */ - groups?: string[]; - /** @description Subject identifier (user ID) of the machine account */ - sub: string; - }; ManagedSkillSelection: { provider_id: string; skill_ids: string[]; @@ -12000,14 +11662,17 @@ export interface components { /** @enum {string} */ kind: "query_param"; }; - PutAutomationBody: { + PutRoutineBody: { agent_id: string; authorization?: components["schemas"]["ResourceAuthorizationModes"]; enabled?: boolean; + /** Format: int64 */ + expected_version?: number | null; initial_grants?: components["schemas"]["ResourceGrantRequest"][]; instruction: string; + metadata?: null | components["schemas"]["WrappedJsonValue"]; name: string; - triggers: components["schemas"]["AutomationTriggerInput"][]; + triggers: components["schemas"]["RoutineTriggerInput"][]; }; /** @description Reasoning UI part - represents model reasoning/thinking */ ReasoningUIPart: { @@ -12417,38 +12082,84 @@ export interface components { signing_key: string; signing_key_metadata: components["schemas"]["WebhookSigningKeyMetadata"]; }; - /** @description A recurring prompt scheduled against one ChatKit agent. */ Routine: { - agent_inbox_id: string; + agent_id: string; authorization: components["schemas"]["ResourceAuthorizationModes"]; created_at: components["schemas"]["WrappedChronoDateTime"]; - created_by_user_id?: string | null; + created_by_user_id: string; enabled: boolean; id: components["schemas"]["WrappedUuidV4"]; + instruction: string; last_error?: string | null; last_run_at?: null | components["schemas"]["WrappedChronoDateTime"]; last_session_id?: null | components["schemas"]["WrappedUuidV4"]; metadata?: null | components["schemas"]["WrappedJsonValue"]; - next_run_at: components["schemas"]["WrappedChronoDateTime"]; + name: string; org_id: string; - prompt: string; - /** @description Minute-granularity cron expression evaluated in UTC. */ - schedule: string; - /** @description Human-readable rendering of `schedule`. */ - schedule_description: string; team_id: string; - title: string; + triggers: components["schemas"]["RoutineTrigger"][]; updated_at: components["schemas"]["WrappedChronoDateTime"]; + /** Format: int64 */ + version: number; + }; + /** @enum {string} */ + RoutineEventInstructionPolicy: "signal_only" | "signal_and_instruction"; + RoutineExecution: { + completed_at?: null | components["schemas"]["WrappedChronoDateTime"]; + error?: string | null; + id: components["schemas"]["WrappedUuidV4"]; + org_id: string; + routine_id: components["schemas"]["WrappedUuidV4"]; + session_id?: null | components["schemas"]["WrappedUuidV4"]; + signal_delivery_id?: null | components["schemas"]["WrappedUuidV4"]; + started_at: components["schemas"]["WrappedChronoDateTime"]; + status: string; + team_id: string; + trigger_id?: null | components["schemas"]["WrappedUuidV4"]; + }; + RoutineExecutionPaginatedResponse: { + items: components["schemas"]["RoutineExecution"][]; + next_page_token?: string; }; RoutinePaginatedResponse: { items: components["schemas"]["Routine"][]; next_page_token?: string; }; - RunAutomationBody: { - /** @description Stable client run identity used for deduplication. */ + RoutineTrigger: components["schemas"]["RoutineTriggerSpec"] & { + created_at: components["schemas"]["WrappedChronoDateTime"]; + enabled: boolean; + id: components["schemas"]["WrappedUuidV4"]; + last_error?: string | null; + last_run_at?: null | components["schemas"]["WrappedChronoDateTime"]; + last_session_id?: null | components["schemas"]["WrappedUuidV4"]; + metadata?: null | components["schemas"]["WrappedJsonValue"]; + next_run_at?: null | components["schemas"]["WrappedChronoDateTime"]; + schedule_description?: string | null; + updated_at: components["schemas"]["WrappedChronoDateTime"]; + }; + RoutineTriggerInput: components["schemas"]["RoutineTriggerSpec"] & { + enabled?: boolean; + id: components["schemas"]["WrappedUuidV4"]; + metadata?: null | components["schemas"]["WrappedJsonValue"]; + }; + RoutineTriggerSpec: { + /** @enum {string} */ + kind: "schedule"; + schedule: string; + } | { + action?: null | components["schemas"]["SignalAction"]; + filter?: components["schemas"]["SignalRuleFilter"]; + instruction_policy?: components["schemas"]["RoutineEventInstructionPolicy"]; + /** @enum {string} */ + kind: "event"; + session_policy?: null | components["schemas"]["SignalSessionPolicy"]; + signal_provider_instance_id: string; + signal_type: string; + }; + RunRoutineBody: { run_id: components["schemas"]["WrappedUuidV4"]; }; - RunAutomationResponse: { + RunRoutineResponse: { duplicate: boolean; run_id: components["schemas"]["WrappedUuidV4"]; session_id: components["schemas"]["WrappedUuidV4"]; @@ -12583,7 +12294,7 @@ export interface components { error_message?: string | null; headers: Record; id: components["schemas"]["WrappedUuidV4"]; - matched_rule_ids: string[]; + matched_trigger_ids: string[]; org_id: string; provider_delivery_id: string; provider_endpoint: string; @@ -12596,6 +12307,10 @@ export interface components { team_id?: string | null; updated_at: components["schemas"]["WrappedChronoDateTime"]; }; + SignalDeliveryPaginatedResponse: { + items: components["schemas"]["SignalDelivery"][]; + next_page_token?: string; + }; /** @enum {string} */ SignalDeliveryStatus: "pending" | "processing" | "completed" | "failed_retryable" | "failed_terminal"; /** @enum {string} */ @@ -12663,6 +12378,10 @@ export interface components { user_credential_id?: null | components["schemas"]["WrappedUuidV4"]; webhook_endpoint_id?: string | null; }; + SignalProviderInstancePaginatedResponse: { + items: components["schemas"]["SignalProviderInstance"][]; + next_page_token?: string; + }; /** @enum {string} */ SignalProviderInstanceStatus: "enabled" | "disabled"; SignalProviderRouteDescriptor: { @@ -12685,33 +12404,13 @@ export interface components { type_id: string; webhook_verification?: null | components["schemas"]["SignalWebhookVerificationDescriptor"]; }; - SignalRule: { - action: components["schemas"]["SignalAction"]; - authorization?: components["schemas"]["ResourceAuthorizationModes"]; - created_at: components["schemas"]["WrappedChronoDateTime"]; - created_by_user_id?: string | null; - display_name: string; - filter: components["schemas"]["SignalRuleFilter"]; - id: components["schemas"]["WrappedUuidV4"]; - metadata?: null | components["schemas"]["WrappedJsonValue"]; - org_id: string; - session_policy: components["schemas"]["SignalSessionPolicy"]; - signal_provider_instance_id: string; - signal_type: string; - status: components["schemas"]["SignalRuleStatus"]; - /** - * @description Team in which ChatKit sessions and agent actions execute. Personal - * rules require this explicit target and create user_team sessions. - */ - target_team_id: string; - team_id?: string | null; - updated_at: components["schemas"]["WrappedChronoDateTime"]; + SignalProviderSourceSerializedPaginatedResponse: { + items: components["schemas"]["SignalProviderSourceSerialized"][]; + next_page_token?: string; }; SignalRuleFilter: { json_equals?: components["schemas"]["JsonEqualsPredicate"][]; }; - /** @enum {string} */ - SignalRuleStatus: "enabled" | "disabled"; SignalSessionPolicy: { session_id: components["schemas"]["WrappedUuidV4"]; /** @enum {string} */ @@ -13139,12 +12838,12 @@ export interface components { next_page_token?: string; }; ToolDeploymentWithGroupSerialized: { - categories: components["schemas"]["WrappedJsonValue"]; + categories: string[]; created_at: components["schemas"]["WrappedChronoDateTime"]; documentation: string; metadata: components["schemas"]["Metadata"]; name: string; - tool_group_categories: components["schemas"]["WrappedJsonValue"]; + tool_group_categories: string[]; tool_group_deployment_deployment_id: string; tool_group_deployment_type_id: string; tool_group_documentation: string; @@ -13506,15 +13205,6 @@ export interface components { resource_server_credential_id?: null | components["schemas"]["WrappedUuidV4"]; user_credential_id?: null | components["schemas"]["WrappedUuidV4"]; }; - /** @description User-authored fields for editing a routine. */ - UpdateRoutineRequestInner: { - agent_inbox_id?: string | null; - enabled?: boolean | null; - metadata?: null | components["schemas"]["WrappedJsonValue"]; - prompt?: string | null; - schedule?: string | null; - title?: string | null; - }; UpdateSelfProfileRequest: { display_name?: string | null; }; @@ -13528,14 +13218,6 @@ export interface components { polling_state: Record; status: components["schemas"]["SignalProviderInstanceStatus"]; }; - UpdateSignalRuleRequestInner: { - action: components["schemas"]["SignalAction"]; - display_name: string; - filter?: components["schemas"]["SignalRuleFilter"]; - metadata?: null | components["schemas"]["WrappedJsonValue"]; - session_policy: components["schemas"]["SignalSessionPolicy"]; - status: components["schemas"]["SignalRuleStatus"]; - }; UpdateSkillBody: { content?: string | null; description?: string | null; @@ -13607,7 +13289,7 @@ export interface components { /** * @description A user entity in the system. * - * Represents both human users and machine accounts with their associated metadata. + * Represents both human and agent users with their associated metadata. */ User: { avatar?: null | components["schemas"]["UserAvatar"]; @@ -13617,16 +13299,16 @@ export interface components { description?: string | null; /** @description Human-readable profile name shared across product surfaces. */ display_name?: string | null; - /** @description Email address (required for human users, optional for machines) */ + /** @description Email address (required for human users, optional for agents). */ email?: string | null; /** @description Unique identifier (UUID format) */ id: string; /** @description Timestamp when the user was last modified (UTC) */ updated_at: components["schemas"]["WrappedChronoDateTime"]; - /** @description Whether this is a machine or human user */ + /** @description Whether this is an agent or human user. */ user_type: components["schemas"]["UserType"]; }; - /** @description Uploaded profile image metadata for a human or machine user. */ + /** @description Uploaded profile image metadata for a human or agent user. */ UserAvatar: { bucket: string; media_type: string; @@ -13706,10 +13388,10 @@ export interface components { /** * @description Type of user identity in the system. * - * Distinguishes between automated services and real users. + * Distinguishes first-class agent users from human users. * @enum {string} */ - UserType: "machine" | "human"; + UserType: "agent" | "human"; ValidatePageTypeDataBody: { data: unknown; page_type_version_id: components["schemas"]["WrappedUuidV4"]; @@ -14332,7 +14014,7 @@ export interface operations { "application/json": components["schemas"]["BillingContext"]; }; }; - /** @description Unknown product or machine caller */ + /** @description Unknown product or agent caller */ 400: { headers: { [name: string]: unknown; @@ -15654,7 +15336,7 @@ export interface operations { query?: { page_size?: number; next_page_token?: string; - /** @description Filter to `human` users or `machine` agents. */ + /** @description Filter to `human` or `agent` users. */ user_type?: string; }; header?: never; @@ -16446,7 +16128,7 @@ export interface operations { query?: { page_size?: number; next_page_token?: string; - /** @description Filter to `human` users or `machine` agents. */ + /** @description Filter to `human` or `agent` users. */ user_type?: string; }; header?: never; @@ -16905,7 +16587,7 @@ export interface operations { query?: { page_size?: number; next_page_token?: string; - /** @description Filter to `human` users or `machine` agents. */ + /** @description Filter to `human` or `agent` users. */ user_type?: string; }; header?: never; @@ -17082,7 +16764,7 @@ export interface operations { query?: { page_size?: number; next_page_token?: string; - /** @description Filter to `human` users or `machine` agents. */ + /** @description Filter to `human` or `agent` users. */ user_type?: string; }; header?: never; @@ -17260,7 +16942,7 @@ export interface operations { query?: { page_size?: number; next_page_token?: string; - /** @description Filter to `human` users or `machine` agents. */ + /** @description Filter to `human` or `agent` users. */ user_type?: string; }; header?: never; @@ -17748,7 +17430,6 @@ export interface operations { parameters: { query?: { agent_id?: string | null; - status?: null | components["schemas"]["AutomationStatus"]; page_size?: number; next_page_token?: string | null; }; @@ -17766,7 +17447,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["AutomationPaginatedResponse"]; + "application/json": components["schemas"]["RoutinePaginatedResponse"]; }; }; }; @@ -17778,7 +17459,7 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; }; cookie?: never; }; @@ -17789,7 +17470,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["Automation"]; + "application/json": components["schemas"]["Routine"]; }; }; 404: { @@ -17809,13 +17490,13 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; }; cookie?: never; }; requestBody: { content: { - "application/json": components["schemas"]["PutAutomationBody"]; + "application/json": components["schemas"]["PutRoutineBody"]; }; }; responses: { @@ -17824,7 +17505,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["Automation"]; + "application/json": components["schemas"]["Routine"]; }; }; 400: { @@ -17844,7 +17525,7 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; }; cookie?: never; }; @@ -17855,7 +17536,34 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["DeleteAutomationResponse"]; + "application/json": components["schemas"]["DeleteRoutineResponse"]; + }; + }; + }; + }; + "automations-list-executions": { + parameters: { + query?: { + agent_id?: string | null; + page_size?: number; + next_page_token?: string | null; + }; + header?: never; + path: { + /** @description Team ID */ + team_id: string; + routine_id: components["schemas"]["WrappedUuidV4"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RoutineExecutionPaginatedResponse"]; }; }; }; @@ -17867,7 +17575,7 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; }; cookie?: never; }; @@ -17894,13 +17602,13 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; }; cookie?: never; }; requestBody: { content: { - "application/json": components["schemas"]["RunAutomationBody"]; + "application/json": components["schemas"]["RunRoutineBody"]; }; }; responses: { @@ -17909,7 +17617,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["RunAutomationResponse"]; + "application/json": components["schemas"]["RunRoutineResponse"]; }; }; }; @@ -17921,7 +17629,7 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; }; cookie?: never; }; @@ -17948,7 +17656,7 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; plane: components["schemas"]["ResourceGrantPlane"]; }; cookie?: never; @@ -17972,7 +17680,7 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; plane: components["schemas"]["ResourceGrantPlane"]; }; cookie?: never; @@ -18000,7 +17708,7 @@ export interface operations { path: { /** @description Team ID */ team_id: string; - automation_id: components["schemas"]["WrappedUuidV4"]; + routine_id: components["schemas"]["WrappedUuidV4"]; plane: components["schemas"]["ResourceGrantPlane"]; principal_type: components["schemas"]["ResourcePrincipalType"]; principal_id: string; @@ -18691,6 +18399,67 @@ export interface operations { }; }; }; + "chatkit-set-agent-permissions": { + parameters: { + query?: never; + header?: never; + path: { + /** @description Team ID */ + team_id: string; + /** @description ChatKit agent inbox ID */ + agent_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AgentPermissions"]; + }; + }; + responses: { + /** @description Update what a ChatKit agent may reach */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ChatKitAgent"]; + }; + }; + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Error"]; + }; + }; + }; + }; "chatkit-get-agent-resource-bundle-provisioning": { parameters: { query?: never; @@ -19796,286 +19565,6 @@ export interface operations { }; }; }; - "chatkit-list-routines": { - parameters: { - query?: { - page_size?: number; - next_page_token?: string | null; - }; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Routine list */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RoutinePaginatedResponse"]; - }; - }; - }; - }; - "chatkit-create-routine": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateRoutineRequestInner"]; - }; - }; - responses: { - /** @description Created routine */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Routine"]; - }; - }; - /** @description Invalid schedule or routine */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - /** @description Internal Server Error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Error"]; - }; - }; - }; - }; - "chatkit-get-routine": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - /** @description Routine ID */ - routine_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Routine */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Routine"]; - }; - }; - }; - }; - "chatkit-delete-routine": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - /** @description Routine ID */ - routine_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Deletion result */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DeleteRoutineResponse"]; - }; - }; - }; - }; - "chatkit-update-routine": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - /** @description Routine ID */ - routine_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["UpdateRoutineRequestInner"]; - }; - }; - responses: { - /** @description Updated routine */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Routine"]; - }; - }; - }; - }; - "set-chatkit-routine-ownership": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - routine_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SetResourceAccessModeRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceAuthorization"]; - }; - }; - }; - }; - "set-chatkit-routine-visibility": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - routine_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SetResourceAccessModeRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceAuthorization"]; - }; - }; - }; - }; - "list-chatkit-routine-grants": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - routine_id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceGrant"][]; - }; - }; - }; - }; - "add-chatkit-routine-grant": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - routine_id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateResourcePlaneGrantRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceGrant"]; - }; - }; - }; - }; - "remove-chatkit-routine-grant": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - routine_id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - principal_type: components["schemas"]["ResourcePrincipalType"]; - principal_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; "list-sessions": { parameters: { query?: { @@ -28166,7 +27655,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["SignalDelivery"][]; + "application/json": components["schemas"]["SignalDeliveryPaginatedResponse"]; }; }; }; @@ -28239,7 +27728,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["SignalProviderInstance"][]; + "application/json": components["schemas"]["SignalProviderInstancePaginatedResponse"]; }; }; }; @@ -28520,263 +28009,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["SignalProviderSourceSerialized"][]; - }; - }; - }; - }; - "signals-list-rules": { - parameters: { - query?: { - page_size?: number; - next_page_token?: string; - instance_id?: string; - status?: string; - }; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"][]; - }; - }; - }; - }; - "signals-create-rule": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSignalRuleRequestInner"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"]; - }; - }; - }; - }; - "set-signal-rule-ownership": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SetResourceAccessModeRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceAuthorization"]; - }; - }; - }; - }; - "set-signal-rule-visibility": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SetResourceAccessModeRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceAuthorization"]; - }; - }; - }; - }; - "list-signal-rule-grants": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceGrant"][]; - }; - }; - }; - }; - "add-signal-rule-grant": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateResourcePlaneGrantRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceGrant"]; - }; - }; - }; - }; - "remove-signal-rule-grant": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - principal_type: components["schemas"]["ResourcePrincipalType"]; - principal_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - "signals-get-rule": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"]; - }; - }; - }; - }; - "signals-delete-rule": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DeleteSignalResponse"]; - }; - }; - }; - }; - "signals-update-rule": { - parameters: { - query?: never; - header?: never; - path: { - /** @description Team ID */ - team_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["UpdateSignalRuleRequestInner"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"]; + "application/json": components["schemas"]["SignalProviderSourceSerializedPaginatedResponse"]; }; }; }; @@ -33672,7 +32905,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["SignalDelivery"][]; + "application/json": components["schemas"]["SignalDeliveryPaginatedResponse"]; }; }; }; @@ -33742,7 +32975,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["SignalProviderInstance"][]; + "application/json": components["schemas"]["SignalProviderInstancePaginatedResponse"]; }; }; }; @@ -33986,257 +33219,11 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["SignalProviderSourceSerialized"][]; - }; - }; - }; - }; - "signals-list-personal-rules": { - parameters: { - query?: { - page_size?: number; - next_page_token?: string; - instance_id?: string; - status?: string; - }; - header?: never; - path: { - user_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"][]; + "application/json": components["schemas"]["SignalProviderSourceSerializedPaginatedResponse"]; }; }; }; }; - "signals-create-personal-rule": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateSignalRuleRequestInner"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"]; - }; - }; - }; - }; - "signals-get-personal-rule": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"]; - }; - }; - }; - }; - "signals-delete-personal-rule": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["DeleteSignalResponse"]; - }; - }; - }; - }; - "signals-update-personal-rule": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["UpdateSignalRuleRequestInner"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SignalRule"]; - }; - }; - }; - }; - "signals-set-personal-rule-ownership": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SetResourceAccessModeRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceAuthorization"]; - }; - }; - }; - }; - "signals-set-personal-rule-visibility": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SetResourceAccessModeRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceAuthorization"]; - }; - }; - }; - }; - "signals-list-personal-rule-grants": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceGrant"][]; - }; - }; - }; - }; - "signals-add-personal-rule-grant": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["CreateResourcePlaneGrantRequest"]; - }; - }; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["ResourceGrant"]; - }; - }; - }; - }; - "signals-remove-personal-rule-grant": { - parameters: { - query?: never; - header?: never; - path: { - user_id: string; - rule_id: components["schemas"]["WrappedUuidV4"]; - plane: components["schemas"]["ResourceGrantPlane"]; - principal_type: components["schemas"]["ResourcePrincipalType"]; - principal_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; "list-personal-skills": { parameters: { query?: { diff --git a/packages/ui/src/routine-editor.test.ts b/packages/ui/src/routine-editor.test.ts index 4276e24c..7a41538e 100644 --- a/packages/ui/src/routine-editor.test.ts +++ b/packages/ui/src/routine-editor.test.ts @@ -14,7 +14,6 @@ const routine: Routine = { id: "t-1", kind: "schedule", schedule: "0 7 * * *", - routine_id: "routine-1", }, { id: "t-2", @@ -22,7 +21,6 @@ const routine: Routine = { instance_id: "spi_1", provider_type: "github", signal_type: "github.pull_request.opened", - rule_id: "rule-1", }, ], last_run_at: "2026-08-20T07:00:00Z", @@ -32,12 +30,12 @@ const routine: Routine = { updated_at: "2026-08-20T07:00:00Z", }; -// The control service always sends matched_rule_ids, empty until rules matched. +// Tilde sends matched_trigger_ids empty until event triggers finish matching. const delivery = (overrides: Partial & { id: string }): SignalDelivery => ({ instance_id: "spi_1", signal_type: "github.pull_request.opened", status: "completed", - matched_rule_ids: [], + matched_trigger_ids: [], created_at: "2026-08-22T10:00:00Z", ...overrides, }); @@ -46,13 +44,13 @@ describe("routineRunHistory", () => { it("merges matched deliveries with the schedule snapshot, newest first", () => { const history = routineRunHistory(routine, { spi_1: [ - delivery({ id: "d-1", session_id: "session-1", matched_rule_ids: ["rule-1"] }), - delivery({ id: "d-2", status: "failed_terminal", matched_rule_ids: ["other-rule"] }), + delivery({ id: "d-1", session_id: "session-1", matched_trigger_ids: ["t-2"] }), + delivery({ id: "d-2", status: "failed_terminal", matched_trigger_ids: ["other-trigger"] }), delivery({ id: "d-3", status: "pending", created_at: "2026-08-23T10:00:00Z", - matched_rule_ids: ["rule-1"], + matched_trigger_ids: ["t-2"], }), ], }); diff --git a/packages/ui/src/routine-editor.tsx b/packages/ui/src/routine-editor.tsx index 016200ce..bcc3cc9b 100644 --- a/packages/ui/src/routine-editor.tsx +++ b/packages/ui/src/routine-editor.tsx @@ -45,38 +45,38 @@ function deliveryEntry(delivery: SignalDelivery): RunHistoryEntry { }; } -function matchedRuleIds(delivery: SignalDelivery): string[] { - const value = (delivery as Record)["matched_rule_ids"]; +function matchedTriggerIds(delivery: SignalDelivery): string[] { + const value = (delivery as Record)["matched_trigger_ids"]; return Array.isArray(value) ? value.filter((id): id is string => typeof id === "string") : []; } /** - * Deliveries are created with no matched rules and filled in after matching, so + * Deliveries are created with no matched triggers and filled in after matching, so * an unmatched delivery only proves it belongs to another routine once it has * settled; until then it is the run the history renders as "Running". */ -function belongsToRoutine(delivery: SignalDelivery, ruleIds: ReadonlySet): boolean { - const matched = matchedRuleIds(delivery); - if (matched.length > 0) return matched.some((id) => ruleIds.has(id)); +function belongsToRoutine(delivery: SignalDelivery, triggerIds: ReadonlySet): boolean { + const matched = matchedTriggerIds(delivery); + if (matched.length > 0) return matched.some((id) => triggerIds.has(id)); return delivery.status === "pending" || delivery.status === "processing"; } /** - * Newest-first run history: signal deliveries matched to the routine's rules + * Newest-first run history: signal deliveries matched to the Routine's triggers * plus the schedule snapshot row (Tilde keeps no cron run log). */ export function routineRunHistory( routine: Routine, deliveriesByInstanceId: Record, ): RunHistoryEntry[] { - const ruleIds = new Set( - routine.triggers.flatMap((trigger) => (trigger.kind === "event" ? [trigger.rule_id] : [])), + const triggerIds = new Set( + routine.triggers.flatMap((trigger) => (trigger.kind === "event" ? [trigger.id] : [])), ); const entries: RunHistoryEntry[] = []; for (const trigger of routine.triggers) { if (trigger.kind !== "event") continue; for (const delivery of deliveriesByInstanceId[trigger.instance_id] ?? []) { - if (!belongsToRoutine(delivery, ruleIds)) continue; + if (!belongsToRoutine(delivery, triggerIds)) continue; entries.push(deliveryEntry(delivery)); } } diff --git a/packages/ui/src/routines-render.test.tsx b/packages/ui/src/routines-render.test.tsx index f1ef1488..99485afc 100644 --- a/packages/ui/src/routines-render.test.tsx +++ b/packages/ui/src/routines-render.test.tsx @@ -60,7 +60,6 @@ const scheduled: Routine = { schedule: "0 7 * * *", description: "Daily at 07:00 UTC", next_run_at: null, - routine_id: "routine-1", }, ], created_at: "2026-08-24T07:00:00Z", @@ -80,7 +79,6 @@ const paused: Routine = { provider_type: "github", signal_type: "github.pull_request.opened", filters: [{ path: "repository.full_name", value: "acme/web" }], - rule_id: "rule-1", }, ], }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a8ede023..20c5cfaf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -528,6 +528,9 @@ importers: packages/client-runtime: dependencies: + '@trytilde/api-client': + specifier: workspace:* + version: link:../api-client zod: specifier: 4.4.3 version: 4.4.3 diff --git a/tests/e2e/plugins.spec.ts b/tests/e2e/plugins.spec.ts index 83f95d30..f4346a71 100644 --- a/tests/e2e/plugins.spec.ts +++ b/tests/e2e/plugins.spec.ts @@ -5,6 +5,17 @@ function chatKitRealtimeBootstrap(sidebar: { items: unknown[]; next_page_token?: return { sidebar }; } +function nativePluginResourceKey(path: string) { + if (path.endsWith("/api/tilde/mcp/available-tool-groups")) return "tool_providers"; + if (path.endsWith("/api/tilde/mcp/tool-group")) return "tool_accounts"; + if (path.endsWith("/api/tilde/mcp/mcp-server")) return "mcp_servers"; + if (path.endsWith("/api/tilde/mcp/proxied-mcp-servers")) return "proxied_mcp_servers"; + if (path.endsWith("/api/tilde/skill")) return "skills"; + if (path.endsWith("/api/tilde/skill-providers")) return "skill_providers"; + if (path.endsWith("/api/tilde/skill-registry")) return "skill_registries"; + return undefined; +} + test.beforeEach(async ({ page }) => { await seedCompletedOnboarding(page); await page.route("https://thesvg.org/icons/**", async (route) => { @@ -47,6 +58,7 @@ test.beforeEach(async ({ page }) => { "research-brief-secondary": ["researcher"], }; const deletedToolAccountIds = new Set(); + let googleAccountCreated = false; await page.route("**/api/connectors/**", async (route) => { const request = route.request(); const path = new URL(request.url()).pathname; @@ -402,6 +414,307 @@ test.beforeEach(async ({ page }) => { }, }); }); + await page.route("**/api/tilde/**", async (route) => { + const request = route.request(); + const url = new URL(request.url()); + const path = url.pathname; + const method = request.method(); + const agentIds = ["hello-world", "researcher"]; + const provider = ( + typeId: string, + name: string, + categories: string[], + extra: Record = {}, + ) => ({ + type_id: typeId, + name, + categories, + credential_sources: [], + ...extra, + }); + const account = ( + id: string, + displayName: string, + providerTypeId: string, + credentialSourceTypeId?: string, + ) => ({ + id, + display_name: displayName, + status: "active", + tool_group_source_type_id: providerTypeId, + ...(credentialSourceTypeId ? { credential_source_type_id: credentialSourceTypeId } : {}), + }); + const registrySkills = (agentId: string) => + Object.entries(skillAssignments) + .filter(([, assigned]) => assigned.includes(agentId)) + .map(([id]) => ({ id })); + + const resourceKey = nativePluginResourceKey(path); + if (resourceKey && method === "GET") { + const githubIcon = + "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Crect width='64' height='32' rx='8' fill='%23181717'/%3E%3C/svg%3E"; + const googleIcon = + "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%23fff'/%3E%3Cpath d='M5 9l11 8 11-8v14H5z' fill='%234285f4'/%3E%3C/svg%3E"; + const researchSkills = [ + { + id: "research-brief-primary", + name: "hello-world-Research brief", + description: "Gather and synthesize source material.", + category: "productivity", + }, + { + id: "research-brief-secondary", + name: "researcher-Research brief", + description: "Gather and synthesize source material.", + category: "productivity", + }, + ...Array.from({ length: 48 }, (_, index) => ({ + id: `research-helper-${index + 1}`, + name: `Research helper ${index + 1}`, + description: "A focused research workflow.", + category: "productivity", + })), + ]; + const catalog = { + tool_providers: [ + provider("github", "GitHub", ["Development"], { + documentation: "Issues, pull requests, repositories, and code search.", + icon_url: githubIcon, + }), + provider("google_mail", "Google Mail", ["Productivity"], { + documentation: "Search and manage mail.", + icon_url: googleIcon, + credential_sources: [ + { + type_id: "google_mail_managed_oauth", + display_name: "Sign in with your browser", + documentation: "Platform-managed OAuth 2.0 — sign in with your provider account.", + requires_brokering: true, + supports_auto_display_name: true, + configuration_schema: { resource_server: null, user_credential: null }, + }, + ], + }), + provider("managed_mcp:apollo", "Apollo.io", ["sales", "productivity"], { + documentation: "Search and enrich sales intelligence.", + icon_slug: "apollo", + credential_sources: [ + { + type_id: "managed_mcp_oauth", + display_name: "Sign in with your browser", + documentation: "Sign in with your provider account.", + requires_brokering: true, + display_name_description: + "Used to identify this account when choosing it for a bot.", + configuration_schema: { + resource_server: { + type: "object", + properties: { + api_base_url: { + type: "string", + title: "Api base url", + description: "Base URL for your workspace.", + }, + }, + required: ["api_base_url"], + }, + user_credential: null, + }, + }, + ], + }), + provider("sentry", "Sentry", ["Observability"], { + documentation: "Inspect production errors, traces, and releases.", + icon_slug: "sentry", + }), + provider("modal-sandbox", "Modal", ["Development"], { + documentation: "Run workloads in Modal sandboxes.", + icon_slug: "modal sandbox", + }), + provider("e2b", "E2B", ["Development"], { + documentation: "Run workloads in E2B sandboxes.", + icon_slug: "e2b", + }), + provider("tilde_control_plane", "Tilde Control Plane", ["system"]), + provider("tilde_skill_registry", "Tilde Skill Registry", ["system"]), + provider("tilde_wallet", "Tilde Pay", ["system"]), + provider("tilde_browser", "Tilde Browser", ["system"]), + provider("chatkit_internal_agent", "Message internal agent", ["system"]), + ], + tool_accounts: [ + account("github-work", "Work", "github"), + account("github-personal", "Personal", "github"), + ...(googleAccountCreated + ? [ + account( + "google-mail-work", + "Work Gmail", + "google_mail", + "google_mail_managed_oauth", + ), + ] + : []), + ].filter((item) => !deletedToolAccountIds.has(item.id)), + mcp_servers: agentIds.map((agentId) => ({ + id: `openbot-${agentId}`, + agent_id: agentId, + tools: Object.entries(toolAssignments).flatMap(([id, assigned]) => + assigned.includes(agentId) && !deletedToolAccountIds.has(id) + ? [{ tool_group_instance_id: id }] + : [], + ), + })), + proxied_mcp_servers: agentIds.map((agentId) => ({ + server: { + id: `vercel-${agentId}`, + display_name: `OpenBot ${agentId} Vercel`, + endpoint_configuration: { url: "https://mcp.vercel.com" }, + status: "active", + tool_group_instance_id: `vercel-${agentId}`, + tool_group_source_type_id: "proxied-vercel", + }, + tool_group_instance: account( + `vercel-${agentId}`, + `OpenBot ${agentId} Vercel`, + "proxied-vercel", + ), + tool_count: 1, + })), + skills: [ + { + id: "code-review", + name: "Code review", + description: "Review changes for correctness, clarity, and risk.", + category: "developer_tools", + provider_icon_key: "github", + }, + ...researchSkills, + ], + skill_providers: [ + { + id: "provider-cloudflare", + name: "Cloudflare", + description: "Cloudflare hosted skills.", + categories: ["infrastructure", "developer_tools"], + repository_url: "https://github.com/cloudflare/skills", + skills: [ + { + id: "cloudflare-workers", + name: "Workers", + description: "Build and deploy Cloudflare Workers.", + source_path: "workers/SKILL.md", + }, + ], + }, + { + id: "provider-aws", + name: "AWS", + description: "Official AWS agent skills.", + categories: ["cloud_infrastructure", "developer_tools"], + repository_url: "https://github.com/aws/skills", + skills: [ + { + id: "aws-cdk", + name: "AWS CDK", + description: "Build cloud infrastructure with CDK.", + source_path: "cdk/SKILL.md", + }, + ], + }, + ], + skill_registries: agentIds.map((agentId) => ({ + id: `registry-${agentId}`, + agent_id: agentId, + name: `OpenBot ${agentId}`, + skills: registrySkills(agentId), + })), + }; + await route.fulfill({ json: { items: catalog[resourceKey] } }); + return; + } + if (path.endsWith("/api/tilde/mcp/provider-catalog") && method === "GET") { + await route.fulfill({ json: { items: [] } }); + return; + } + if (path.endsWith("/api/tilde/provider-setup/start") && method === "POST") { + googleAccountCreated = true; + await route.fulfill({ + json: { + resource: account( + "google-mail-work", + "Work Gmail", + "google_mail", + "google_mail_managed_oauth", + ), + next_action: { type: "redirect", url: "about:blank" }, + }, + }); + return; + } + if (path.endsWith("/api/tilde/mcp/tool-group/google-mail-work") && method === "GET") { + await new Promise((resolve) => setTimeout(resolve, 600)); + await route.fulfill({ + json: { + tool_group_instance: account( + "google-mail-work", + "Work Gmail", + "google_mail", + "google_mail_managed_oauth", + ), + }, + }); + return; + } + const enable = /\/api\/tilde\/mcp\/tool-group\/([^/]+)\/tools\/enable-and-bind$/.exec(path); + if (enable && method === "POST") { + await new Promise((resolve) => setTimeout(resolve, 400)); + const accountId = decodeURIComponent(enable[1] ?? ""); + const body = request.postDataJSON() as { mcp_server_instance_ids: string[] }; + for (const serverId of body.mcp_server_instance_ids) { + const agentId = serverId.replace(/^openbot-/, ""); + toolAssignments[accountId] = [...new Set([...(toolAssignments[accountId] ?? []), agentId])]; + } + await route.fulfill({ json: { complete: true } }); + return; + } + const unbind = /\/api\/tilde\/mcp\/mcp-server\/openbot-([^/]+)\/tool-group\/([^/]+)$/.exec( + path, + ); + if (unbind && method === "DELETE") { + const [, agentId = "", encodedAccountId = ""] = unbind; + const accountId = decodeURIComponent(encodedAccountId); + toolAssignments[accountId] = (toolAssignments[accountId] ?? []).filter( + (candidate) => candidate !== agentId, + ); + await route.fulfill({ json: { ok: true } }); + return; + } + const registry = /\/api\/tilde\/skill-registry\/registry-([^/]+)$/.exec(path); + if (registry && method === "PATCH") { + await new Promise((resolve) => setTimeout(resolve, 400)); + const agentId = registry[1] ?? ""; + const body = request.postDataJSON() as { skill_ids: string[] }; + for (const skillId of Object.keys(skillAssignments)) { + skillAssignments[skillId] = body.skill_ids.includes(skillId) + ? [...new Set([...(skillAssignments[skillId] ?? []), agentId])] + : (skillAssignments[skillId] ?? []).filter((candidate) => candidate !== agentId); + } + await route.fulfill({ json: { ok: true } }); + return; + } + const deleted = /\/api\/tilde\/mcp\/(?:tool-group|proxied-mcp-servers)\/([^/]+)$/.exec(path); + if (deleted && method === "DELETE") { + await new Promise((resolve) => setTimeout(resolve, 400)); + deletedToolAccountIds.add(decodeURIComponent(deleted[1] ?? "")); + await route.fulfill({ json: { ok: true } }); + return; + } + if (path.includes("/api/tilde/signals/")) { + await route.fulfill({ json: { items: [] } }); + return; + } + await route.fulfill({ status: 404, json: { error: `Unhandled ${method} ${path}` } }); + }); await page.route("**/api/chat/**", async (route) => { const path = new URL(route.request().url()).pathname; if (path.endsWith("/workspace/bootstrap")) { @@ -610,10 +923,13 @@ test("manages tools and skills by bot", async ({ page }) => { const createRequest = page.waitForRequest( (request) => request.method() === "POST" && - new URL(request.url()).pathname.endsWith("/api/connectors/accounts"), + new URL(request.url()).pathname.endsWith("/api/tilde/provider-setup/start"), ); await continueButton.click(); - expect((await createRequest).postDataJSON()).toMatchObject({ display_name: "Work Gmail" }); + expect((await createRequest).postDataJSON()).toMatchObject({ + provider_id: "google_mail", + form_values: { displayName: "Work Gmail" }, + }); await expect(setupDialog.getByText(/Waiting for Google Mail authorization/)).toBeVisible(); await expect(page.getByRole("dialog", { name: "Add account to bot" })).toHaveCount(0); const createdAccountBotDialog = page.getByRole("dialog", { name: "Add account to bot" }); @@ -636,14 +952,16 @@ test("manages tools and skills by bot", async ({ page }) => { await settingsSidebar.getByRole("button", { name: "Skills" }).click(); await expect(page).toHaveURL(/\/settings\/plugins\/skills$/); await expect(page.getByPlaceholder("Search skills")).toBeVisible(); - await expect(page.getByRole("heading", { name: "Developer tools" })).toBeVisible(); - await expect(page.getByRole("heading", { name: "Productivity", exact: true })).toBeVisible(); + await expect(page.getByRole("heading", { name: "Developer tools" }).first()).toBeVisible(); + await expect( + page.getByRole("heading", { name: "Productivity", exact: true }).first(), + ).toBeVisible(); await expect(page.getByRole("heading", { name: "Infrastructure", exact: true })).toBeVisible(); await expect( page.getByRole("heading", { name: "Cloud infrastructure", exact: true }), ).toBeVisible(); - await expect(page.getByText("Development", { exact: true })).toBeVisible(); - await expect(page.getByText("Research", { exact: true })).toBeVisible(); + await expect(page.getByText("Developer Tools", { exact: true }).last()).toBeVisible(); + await expect(page.getByText("Productivity", { exact: true }).last()).toBeVisible(); await expect(page.getByText("Cloudflare", { exact: true })).toBeVisible(); await expect(page.getByText("AWS", { exact: true })).toBeVisible(); await expect(page.getByText("Code review", { exact: true })).toHaveCount(0); @@ -654,11 +972,11 @@ test("manages tools and skills by bot", async ({ page }) => { ).toBeVisible(); await page.getByRole("button", { name: "Category", exact: true }).click(); await page.getByRole("menuitemcheckbox", { name: "Productivity" }).click(); - await expect(page.getByText("Research", { exact: true })).toHaveCount(1); - await expect(page.getByText("Development", { exact: true })).toHaveCount(0); - await catalog.getByRole("button", { name: /^Research/ }).click(); + await expect(catalog.getByRole("button", { name: /^Productivity/ })).toBeVisible(); + await expect(catalog.getByRole("button", { name: /^Developer Tools/ })).toHaveCount(0); + await catalog.getByRole("button", { name: /^Productivity/ }).click(); detailDialog = page.getByRole("dialog"); - await expect(detailDialog.getByRole("heading", { level: 2, name: "Research" })).toBeVisible(); + await expect(detailDialog.getByRole("heading", { level: 2, name: "Productivity" })).toBeVisible(); const viewport = page.viewportSize(); await expect .poll(async () => (await detailDialog.boundingBox())?.width ?? 0) @@ -715,7 +1033,9 @@ test("manages tools and skills by bot", async ({ page }) => { expect(skillHelloBox?.x).not.toBe(skillResearchBox?.x); await skillResearchBot.click(); detailDialog = page.getByRole("dialog"); - await expect(detailDialog.getByRole("heading", { name: "Research", exact: true })).toBeVisible(); + await expect( + detailDialog.getByRole("heading", { name: "Productivity", exact: true }), + ).toBeVisible(); await expect(detailDialog.getByRole("button", { name: "Adding to Researcher" })).toBeVisible(); await expect(detailDialog.getByRole("status", { name: "Loading" })).toBeVisible(); await expect(detailDialog.getByRole("button", { name: "Remove from Researcher" })).toBeVisible(); @@ -794,13 +1114,11 @@ test("manages tools and skills by bot", async ({ page }) => { const accountDelete = page.waitForRequest( (request) => request.method() === "DELETE" && - new URL(request.url()).pathname.endsWith("/api/connectors/accounts"), + new URL(request.url()).pathname.endsWith("/api/tilde/mcp/tool-group/github-work"), ); await deleteDialog.getByRole("button", { name: "Remove account", exact: true }).click(); await expect(deleteDialog.getByRole("button", { name: "Removing…" })).toBeVisible(); - expect((await accountDelete).postDataJSON()).toEqual({ - account_ids: ["github-work"], - }); + await accountDelete; await expect(deleteDialog).toHaveCount(0); await expect(page.getByRole("dialog", { name: "GitHub" })).toBeVisible(); await expect(detailDialog.getByText("Work", { exact: true })).toHaveCount(0); diff --git a/tests/e2e/workspace.spec.ts b/tests/e2e/workspace.spec.ts index fb1ec123..bfd0b0ab 100644 --- a/tests/e2e/workspace.spec.ts +++ b/tests/e2e/workspace.spec.ts @@ -5,6 +5,17 @@ function chatKitRealtimeBootstrap(items: unknown[]) { return { sidebar: { items } }; } +function nativePluginResourceKey(path: string) { + if (path.endsWith("/api/tilde/mcp/available-tool-groups")) return "tool_providers"; + if (path.endsWith("/api/tilde/mcp/tool-group")) return "tool_accounts"; + if (path.endsWith("/api/tilde/mcp/mcp-server")) return "mcp_servers"; + if (path.endsWith("/api/tilde/mcp/proxied-mcp-servers")) return "proxied_mcp_servers"; + if (path.endsWith("/api/tilde/skill")) return "skills"; + if (path.endsWith("/api/tilde/skill-providers")) return "skill_providers"; + if (path.endsWith("/api/tilde/skill-registry")) return "skill_registries"; + return undefined; +} + // Every test but the first-run one wants the workspace, so skip onboarding by seeding // the persisted state the client runtime reads. test.beforeEach(async ({ page }) => { @@ -246,6 +257,45 @@ test("opens a routine and persists its active state", async ({ page }) => { await page.route("**/api/signals/**", async (route) => { await route.fulfill({ json: { items: [] } }); }); + await page.route("**/api/tilde/**", async (route) => { + const request = route.request(); + const path = new URL(request.url()).pathname; + const upstreamRoutine = () => ({ + id: "routine-group-one", + agent_id: "hello-world", + name: "Daily briefing", + instruction: "Summarize the latest project activity.", + enabled, + triggers: [ + { + id: "schedule-trigger-one", + kind: "schedule", + schedule: "0 9 * * *", + schedule_description: "Every day at 09:00 UTC", + materialized_resource_id: "tilde-routine-one", + }, + ], + created_at: now, + updated_at: now, + }); + if (path.endsWith("/api/tilde/automations") && request.method() === "GET") { + await route.fulfill({ json: { items: [upstreamRoutine()], next_page_token: null } }); + return; + } + if (path.endsWith("/api/tilde/automations/routine-group-one")) { + if (request.method() === "PUT") { + updateBody = request.postDataJSON(); + enabled = (updateBody as { enabled?: boolean }).enabled ?? enabled; + } + await route.fulfill({ json: upstreamRoutine() }); + return; + } + if (path.includes("/api/tilde/signals/")) { + await route.fulfill({ json: { items: [] } }); + return; + } + await route.fulfill({ status: 404, json: { error: `Unhandled ${request.method()} ${path}` } }); + }); await page.goto("/"); await page.getByRole("button", { name: "Toggle routines" }).click(); @@ -262,7 +312,7 @@ test("opens a routine and persists its active state", async ({ page }) => { const active = page.getByRole("switch", { name: "Active" }); await expect(active).toBeChecked(); await active.click(); - await expect.poll(() => updateBody).toEqual({ enabled: false }); + await expect.poll(() => updateBody).toMatchObject({ enabled: false }); await expect(active).not.toBeChecked(); await page.getByRole("button", { name: "Back to Routines" }).click(); await expect(page.getByText("Paused", { exact: true })).toBeVisible(); @@ -1281,6 +1331,7 @@ test("configures a connector through the in-chat account picker", async ({ page }, ]; const connectorAccountRequests: Array> = []; + let connectorCreated = false; await page.route("**/api/connectors/**", async (route) => { const request = route.request(); @@ -1337,6 +1388,91 @@ test("configures a connector through the in-chat account picker", async ({ page } await route.fulfill({ json: { items: [] } }); }); + await page.route("**/api/tilde/**", async (route) => { + const request = route.request(); + const path = new URL(request.url()).pathname; + const method = request.method(); + const tavilyAccount = (id: string, displayName: string) => ({ + id, + display_name: displayName, + status: "active", + tool_group_source_type_id: "tavily", + credential_source_type_id: "tavily_api_key", + }); + const resourceKey = nativePluginResourceKey(path); + if (resourceKey && method === "GET") { + const catalog = { + tool_providers: [ + { + type_id: "tavily", + name: "Tavily", + categories: [], + credential_sources: [ + { + type_id: "tavily_api_key", + display_name: "Use an API key", + requires_brokering: false, + configuration_schema: { + resource_server: null, + user_credential: { + type: "object", + required: ["api_key"], + properties: { api_key: { type: "string", format: "password" } }, + }, + }, + }, + ], + }, + ], + tool_accounts: [ + tavilyAccount("tgi-work", "Work account"), + tavilyAccount("tgi-personal", "Personal"), + ...(connectorCreated ? [tavilyAccount("tgi-new", "Research key")] : []), + ], + mcp_servers: [ + { + id: "openbot-hello-world", + agent_id: "hello-world", + tools: connectorBindRequests.map(({ account_id }) => ({ + tool_group_instance_id: account_id, + })), + }, + ], + proxied_mcp_servers: [], + skills: [], + skill_providers: [], + skill_registries: [], + }; + await route.fulfill({ + json: { items: catalog[resourceKey] }, + }); + return; + } + if (path.endsWith("/api/tilde/mcp/provider-catalog") && method === "GET") { + await route.fulfill({ json: { items: [] } }); + return; + } + if (path.endsWith("/api/tilde/provider-setup/start") && method === "POST") { + const body = request.postDataJSON() as Record; + connectorAccountRequests.push(body); + connectorCreated = true; + await route.fulfill({ + json: { + resource: tavilyAccount("tgi-new", "Research key"), + next_action: { type: "complete" }, + }, + }); + return; + } + const enabled = /\/api\/tilde\/mcp\/tool-group\/([^/]+)\/tools\/enable-and-bind$/.exec(path); + if (enabled && method === "POST") { + const accountId = decodeURIComponent(enabled[1] ?? ""); + connectorBindRequests.push({ agent_id: "hello-world", account_id: accountId }); + await route.fulfill({ json: { complete: true } }); + return; + } + await route.fulfill({ status: 404, json: { error: `Unhandled ${method} ${path}` } }); + }); await page.route("**/api/chat/**", async (route) => { const request = route.request(); @@ -1420,10 +1556,9 @@ test("configures a connector through the in-chat account picker", async ({ page // Credentials go to the control service; only the new account id is bound to the agent. await expect.poll(() => connectorAccountRequests.length).toBe(1); expect(connectorAccountRequests[0]).toMatchObject({ - provider_type_id: "tavily", - credential_source_type_id: "tavily_api_key", - display_name: "Research key", - user_credential_values: { api_key: "tvly-secret" }, + provider_id: "tavily", + auth_method_id: "tavily_api_key", + form_values: { displayName: "Research key", api_key: "tvly-secret" }, }); await expect.poll(() => connectorBindRequests.length).toBe(2); expect(connectorBindRequests[1]).toEqual({ agent_id: "hello-world", account_id: "tgi-new" });