@walkeros/mcp 4.7.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -12
- package/dist/index.d.ts +33 -5
- package/dist/index.js +328 -19873
- package/dist/index.js.map +1 -1
- package/dist/stdio.js +325 -19870
- package/dist/stdio.js.map +1 -1
- package/package.json +7 -5
- package/src/surface.json +370 -0
package/dist/stdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stdio.ts","../src/server.ts","../src/tools/validate.ts","../src/schemas/output.ts","../src/runtime/types.ts","../src/cloud-flow.ts","../src/tools/bundle.ts","../src/tools/parse-input.ts","../src/tools/resolve-config-path.ts","../src/tools/simulate.ts","../src/tools/simulate-description.ts","../src/tools/egress.ts","../src/tools/push.ts","../src/tools/examples.ts","../src/catalog.ts","../src/tools/narrow.ts","../src/tools/package.ts","../src/tools/flow-load.ts","../src/types.ts","../src/user-data.ts","../src/tools/project-context.ts","../src/tools/feedback.ts","../src/tools/diagnostics.ts","../../../cli/openapi/spec.json","../src/base-url.ts","../src/tools/auth.ts","../src/tools/project-manage.ts","../src/action-requirements.ts","../src/tools/flow-manage.ts","../src/ui-parts.ts","../src/links.ts","../src/tools/deploy-manage.ts","../src/tools/_resolvers.ts","../src/tools/secret-manage.ts","../src/tools/observe-journeys.ts","../src/tools/observe-session.ts","../src/tools/hub-manage.ts","../src/tools/feature-gate.ts","../src/tools/frame-manage.ts","../src/resources/package-schemas.ts","../src/resources/references.ts","../src/prompts/add-step.ts","../src/prompts/setup-mapping.ts","../src/prompts/manage-contract.ts","../src/instructions.ts","../src/telemetry.ts","../src/runtime/hosted.ts","../src/http-tool-client.ts","../src/runtime/local.ts","../src/runtime/bundle-cache.ts"],"sourcesContent":["import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { setClientContext } from '@walkeros/cli';\n\nimport { createWalkerOSMcpServer, getMcpEmitterSingleton } from './server.js';\nimport { HttpToolClient } from './http-tool-client.js';\nimport { createMcpEmitter } from './telemetry.js';\nimport { createLocalRuntime } from './runtime/local.js';\n\ndeclare const __VERSION__: string;\n\nsetClientContext({ type: 'mcp', version: __VERSION__ });\n\n// Hook process-level error channels so we can emit `error throw` before the\n// process tears down. Both handlers look up the emitter lazily: if the MCP\n// handshake never completed, no emitter exists and we silently skip.\n// We don't call process.exit — stdio transport already propagates failures\n// up to the parent client via the JSON-RPC channel.\nprocess.on('uncaughtException', (err) => {\n const emitter = getMcpEmitterSingleton();\n if (emitter) {\n emitter.emitError('uncaught').catch(() => {});\n }\n console.error('Uncaught exception in Flow MCP server:', err);\n});\n\nprocess.on('unhandledRejection', (reason) => {\n const emitter = getMcpEmitterSingleton();\n if (emitter) {\n emitter.emitError('unhandledRejection').catch(() => {});\n }\n console.error('Unhandled rejection in Flow MCP server:', reason);\n});\n\nasync function main() {\n // stdio runs on the user's own machine: the local runtime keeps file, URL and\n // in-process bundle, simulate and push behaviour exactly as before.\n const server = createWalkerOSMcpServer({\n client: new HttpToolClient(),\n version: __VERSION__,\n runtime: createLocalRuntime(),\n });\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error('walkerOS Flow MCP server running on stdio');\n}\n\nmain().catch(async (error) => {\n // Startup failure — no client handshake happened, so there's no emitter in\n // the module singleton. Build a one-shot emitter with an unknown client so\n // the error is still visible to telemetry.\n try {\n const emitter = await createMcpEmitter({\n clientInfo: undefined,\n packageVersion: __VERSION__,\n });\n await emitter.emitError('startup');\n } catch {\n // swallow — telemetry must never mask the original startup error\n }\n console.error('Failed to start Flow MCP server:', error);\n process.exit(1);\n});\n","import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport type { ToolClient } from './tool-client.js';\nimport { registerFlowValidateTool } from './tools/validate.js';\nimport { registerFlowBundleTool } from './tools/bundle.js';\nimport { registerFlowSimulateTool } from './tools/simulate.js';\nimport { registerFlowPushTool } from './tools/push.js';\nimport { registerFlowExamplesTool } from './tools/examples.js';\nimport {\n registerPackageSearchTool,\n registerGetPackageSchemaTool,\n} from './tools/package.js';\nimport { registerFlowLoadTool } from './tools/flow-load.js';\nimport { registerFeedbackTool } from './tools/feedback.js';\nimport { registerDiagnosticsTool } from './tools/diagnostics.js';\nimport { registerAuthTool } from './tools/auth.js';\nimport { registerProjectManageTool } from './tools/project-manage.js';\nimport { registerFlowManageTool } from './tools/flow-manage.js';\nimport { registerDeployTool } from './tools/deploy-manage.js';\nimport { registerSecretManageTool } from './tools/secret-manage.js';\nimport { registerObserveJourneysTool } from './tools/observe-journeys.js';\nimport { registerObserveSessionTool } from './tools/observe-session.js';\nimport { registerHubManageTool } from './tools/hub-manage.js';\nimport { registerFrameManageTool } from './tools/frame-manage.js';\nimport { registerPackageSchemaResources } from './resources/package-schemas.js';\nimport { registerReferenceResources } from './resources/references.js';\nimport { registerAddStepPrompt } from './prompts/add-step.js';\nimport { registerSetupMappingPrompt } from './prompts/setup-mapping.js';\nimport { registerManageContractPrompt } from './prompts/manage-contract.js';\nimport { SERVER_INSTRUCTIONS } from './instructions.js';\nimport { createMcpEmitter, type McpEmitter } from './telemetry.js';\nimport type { FlowRuntime } from './runtime/types.js';\nimport { createHostedRuntime } from './runtime/hosted.js';\n\nexport interface Logger {\n debug?(message: string, meta?: Record<string, unknown>): void;\n info?(message: string, meta?: Record<string, unknown>): void;\n warn?(message: string, meta?: Record<string, unknown>): void;\n error?(message: string, meta?: Record<string, unknown>): void;\n}\n\nexport interface CreateServerOptions {\n client: ToolClient;\n logger?: Logger;\n version?: string;\n catalogBaseUrl?: string;\n /**\n * The capability runtime the flow tools read, build and run flows through.\n * Omitted, the HOSTED runtime is used, the safe default for any shared or\n * network-reached process: inline JSON and saved flow ids only, no local\n * files, no URLs, no in-process bundle, simulate or push. Pass\n * `createLocalRuntime()` only on the user's own machine (stdio, the CLI) to\n * keep local file, URL and execution behaviour. See `FlowRuntime`.\n */\n runtime?: FlowRuntime;\n}\n\n/**\n * Module-scoped singleton emitter, populated once the MCP `initialize`\n * handshake completes and clientInfo is known. The stdio entrypoint reads\n * this to emit process-level `error throw` events from uncaughtException /\n * unhandledRejection hooks, where the Server instance isn't in scope.\n */\nlet currentEmitter: McpEmitter | undefined;\n\nexport function getMcpEmitterSingleton(): McpEmitter | undefined {\n return currentEmitter;\n}\n\n/**\n * Internal: reset for tests that want a clean slate between cases.\n * Not exported from the package.\n */\nexport function __resetMcpEmitterSingletonForTesting(): void {\n currentEmitter = undefined;\n}\n\n/**\n * Minimal shape of a `_registeredTools` entry we rely on for handler\n * wrapping. Typed locally to avoid leaking SDK internals while keeping\n * strict typing on the handler signature.\n */\ntype WrappableRegisteredTool = {\n handler: (...args: unknown[]) => unknown;\n};\n\ntype RegisteredToolsRecord = Record<string, WrappableRegisteredTool>;\n\n/**\n * Wrap every already-registered tool handler with telemetry. The wrapper\n * emits `cmd invoke` with outcome + timing, swallowing any telemetry error\n * so it never surfaces to the tool caller. We look up the emitter lazily at\n * call time so wrapping can happen before the emitter is created.\n */\nfunction wrapRegisteredToolsWithTelemetry(server: McpServer): void {\n const internal = server as unknown as {\n _registeredTools: RegisteredToolsRecord;\n };\n const tools = internal._registeredTools;\n if (!tools) return;\n for (const [toolName, tool] of Object.entries(tools)) {\n const original = tool.handler;\n tool.handler = async (...args: unknown[]): Promise<unknown> => {\n const start = Date.now();\n try {\n const result = await original(...args);\n const emitter = currentEmitter;\n if (emitter) {\n emitter\n .emitInvoke(toolName, 'success', Date.now() - start)\n .catch(() => {});\n }\n return result;\n } catch (err) {\n const emitter = currentEmitter;\n if (emitter) {\n emitter\n .emitInvoke(toolName, 'error', Date.now() - start)\n .catch(() => {});\n }\n throw err;\n }\n };\n }\n}\n\nexport function createWalkerOSMcpServer(opts: CreateServerOptions): McpServer {\n const packageVersion = opts.version ?? '0.0.0';\n const runtime = opts.runtime ?? createHostedRuntime(opts.client);\n const server = new McpServer(\n {\n name: 'walkeros-flow',\n version: packageVersion,\n },\n { instructions: SERVER_INSTRUCTIONS },\n );\n\n registerAuthTool(server, opts.client);\n registerProjectManageTool(server, opts.client);\n registerFlowManageTool(server, opts.client);\n registerDeployTool(server, opts.client);\n registerSecretManageTool(server, opts.client);\n registerObserveSessionTool(server, opts.client);\n registerObserveJourneysTool(server, opts.client);\n registerHubManageTool(server, opts.client);\n registerFrameManageTool(server, opts.client);\n registerFeedbackTool(server, opts.client);\n registerDiagnosticsTool(server, opts.client, packageVersion);\n\n registerFlowValidateTool(server, runtime);\n registerFlowBundleTool(server, opts.client, runtime);\n registerFlowSimulateTool(server, opts.client, runtime);\n registerFlowPushTool(server, runtime);\n registerFlowExamplesTool(server, runtime);\n registerFlowLoadTool(server, opts.client, runtime);\n\n registerPackageSearchTool(server);\n registerGetPackageSchemaTool(server);\n\n registerPackageSchemaResources(server);\n registerReferenceResources(server);\n registerAddStepPrompt(server);\n registerSetupMappingPrompt(server);\n registerManageContractPrompt(server);\n\n wrapRegisteredToolsWithTelemetry(server);\n\n // MCP SDK fires `oninitialized` after the `initialized` notification, which\n // follows a successful `initialize` request. At that point `getClientVersion`\n // returns the negotiated client identity. We create the emitter here and\n // emit `mcp start`, so consent, debug, and endpoint resolution happen lazily\n // at the moment a real client connects.\n const priorOnInitialized = server.server.oninitialized;\n server.server.oninitialized = () => {\n try {\n priorOnInitialized?.();\n } catch {\n // existing handler must not prevent telemetry setup\n }\n const clientInfo = server.server.getClientVersion();\n void createMcpEmitter({\n clientInfo,\n packageVersion,\n })\n .then(async (emitter) => {\n currentEmitter = emitter;\n await emitter.emitStart();\n })\n .catch(() => {\n // telemetry must never break the server; swallow setup/emit errors.\n });\n };\n\n return server;\n}\n","import { validate } from '@walkeros/cli';\nimport type { ValidateResult } from '@walkeros/cli';\nimport { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { ValidateOutputShape } from '../schemas/output.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport {\n HINT_OUT_OF_PROCESS,\n refusalHint,\n RuntimeRefusal,\n type FlowRuntime,\n} from '../runtime/types.js';\nimport { isCloudId } from '../cloud-flow.js';\n\ntype ValidateType = 'contract' | 'event' | 'flow' | 'mapping';\n\n/**\n * Resolve the validate input through the runtime. For `type: 'event'`, a bare\n * string the runtime cannot resolve is the event-name shorthand and becomes\n * `{ name }`; the shorthand reads nothing, so it holds under every runtime.\n * Every other failure surfaces: a `RuntimeRefusal` (a policy decision), a\n * failed saved-id lookup, and any load error for a flow, mapping or contract.\n */\nasync function loadValidateInput(\n runtime: FlowRuntime,\n input: string,\n type: ValidateType,\n): Promise<unknown> {\n if (!input || input.trim() === '') throw new Error(`${type} is required`);\n const trimmed = input.trim();\n const looksLikeJson = trimmed.startsWith('{') || trimmed.startsWith('[');\n try {\n return await runtime.load(input);\n } catch (error) {\n if (error instanceof RuntimeRefusal || isCloudId(trimmed)) throw error;\n if (looksLikeJson) {\n const message = error instanceof Error ? error.message : String(error);\n throw new Error(`Failed to parse ${type}. ${message}`);\n }\n if (type === 'event') return { name: trimmed };\n throw error;\n }\n}\n\nconst TITLE = 'Validate Flow';\nconst DESCRIPTION =\n 'Validate walkerOS events, flow configurations, mapping rules, or data contracts. ' +\n 'Accepts JSON strings, file paths, or URLs as input; on the hosted server only inline JSON or a saved flow id (flow_ or cfg_), no file paths or URLs. ' +\n \"With only type and input, a flow runs every check on every flow and step, including each package's settings schema (fetched from the package CDN; offline: true skips that and says so). \" +\n 'flow and path narrow the run; strict turns warnings and skips into failures: valid is false. ' +\n 'Returns valid, errors and warnings with stable codes, and details.scope (what was checked), details.skipped (checks that could not run) and details.deferred (values known only at runtime).';\n\nconst inputSchema = schemas.ValidateInputShape;\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createFlowValidateToolSpec(runtime: FlowRuntime): ToolSpec {\n return {\n name: 'flow_validate',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowValidateHandlerBody(runtime, input),\n };\n}\n\nasync function flowValidateHandlerBody(runtime: FlowRuntime, input: unknown) {\n const parsed = schemas.ValidateInputSchema.safeParse(input ?? {});\n if (!parsed.success) {\n return mcpError(parsed.error, 'Check the flow_validate input fields');\n }\n const {\n type,\n input: validateInput,\n flow,\n path,\n strict,\n offline,\n } = parsed.data;\n try {\n // Resolve the input through the runtime and validate the parsed document.\n // Handed a string, the cli `validate` would read files and URLs itself;\n // handing it the parsed object keeps every read behind the runtime.\n const resolved = await loadValidateInput(runtime, validateInput, type);\n const configDir = runtime.baseDir?.(validateInput);\n const result: ValidateResult = await validate(type, resolved, {\n flow,\n path,\n strict,\n offline,\n ...(configDir ? { configDir } : {}),\n });\n\n const skipped = result.details.skipped ?? [];\n const next = runtime.simulate\n ? ['Use flow_simulate to test event flow', 'Use flow_bundle to build']\n : [HINT_OUT_OF_PROCESS];\n const hints =\n !result.valid && result.errors.length === 0\n ? {\n next: [\n `strict: ${result.warnings.length} warning(s) and ${skipped.length} skipped check(s) count as failures; resolve them, or run without strict`,\n ],\n }\n : !result.valid\n ? {\n next: [\n 'Fix errors above, then run flow_validate again',\n 'Read walkeros://reference/flow-schema for correct structure',\n ],\n }\n : skipped.length > 0\n ? {\n next: [\n `Valid in checked scope; ${skipped.length} check(s) skipped, see details.skipped`,\n ...next,\n ],\n }\n : { next };\n // Validation `message` and `path` are tool-generated, not echoed user\n // input — both stay literal, never wrapped in <user_data>.\n return mcpResult(result, hints);\n } catch (error) {\n return mcpError(\n error,\n refusalHint(\n error,\n 'Check the input parameter — expected a JSON string, file path, or URL',\n ),\n );\n }\n}\n\nexport function registerFlowValidateTool(\n server: McpServer,\n runtime: FlowRuntime,\n) {\n const spec = createFlowValidateToolSpec(runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: ValidateOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowValidateHandlerBody(runtime, args),\n );\n}\n","import { z } from 'zod';\n\n// CLI tool output shapes\nconst ValidateIssueFields = {\n path: z.string(),\n message: z.string(),\n value: z.unknown().optional(),\n code: z\n .string()\n .optional()\n .describe('Stable code (the documented validate code list)'),\n keyword: z\n .string()\n .optional()\n .describe('JSON Schema keyword of an ENTRY_SCHEMA finding'),\n};\n\nexport const ValidateOutputShape = {\n valid: z.boolean().describe('Whether validation passed'),\n type: z\n .union([\n z.enum(['contract', 'entry', 'event', 'flow', 'mapping']),\n z.string().regex(/^(destinations|sources|transformers)\\.\\w+$/),\n ])\n .describe('What was validated'),\n errors: z.array(z.object(ValidateIssueFields)).describe('Validation errors'),\n warnings: z\n .array(\n z.object({\n ...ValidateIssueFields,\n suggestion: z.string().optional(),\n }),\n )\n .describe('Validation warnings'),\n details: z\n .object({\n scope: z\n .object({\n flows: z.array(z.string()),\n entry: z\n .object({\n section: z.string().optional(),\n key: z.string(),\n flows: z.array(z.string()),\n searchedFlows: z.array(z.string()),\n })\n .optional(),\n checks: z.array(z.string()),\n offline: z.literal(true).optional(),\n })\n .optional()\n .describe('What the run covered'),\n skipped: z\n .array(\n z.object({\n path: z.string(),\n check: z.string(),\n reason: z.string(),\n code: z.string(),\n }),\n )\n .optional()\n .describe('Checks in scope that did not run, with the reason'),\n deferred: z\n .array(z.object({ path: z.string(), reference: z.string() }))\n .optional()\n .describe('Values known only at runtime, not schema-checked'),\n })\n .catchall(z.unknown())\n .describe('Additional validation details'),\n _hints: z\n .object({\n next: z.array(z.string()).optional(),\n warnings: z.array(z.string()).optional(),\n })\n .optional()\n .describe('Suggested next steps'),\n};\n\nexport const BundleOutputShape = {\n success: z.boolean().describe('Whether bundling succeeded'),\n totalSize: z.number().optional().describe('Total bundle size in bytes'),\n buildTime: z.number().optional().describe('Build time in milliseconds'),\n packages: z\n .array(\n z.object({\n name: z.string(),\n }),\n )\n .optional()\n .describe('Names of packages included in the bundle'),\n treeshakingEffective: z\n .boolean()\n .optional()\n .describe('Whether tree-shaking was effective'),\n message: z.string().optional().describe('Status message'),\n};\n\nexport const SimulateOutputShape = {\n success: z.boolean().describe('Whether simulation succeeded'),\n error: z.string().optional().describe('Error message if failed'),\n summary: z.string().describe('One-line result summary'),\n destinations: z\n .record(\n z.string(),\n z.object({\n received: z\n .boolean()\n .describe('Whether destination received the event'),\n calls: z.number().describe('Number of API calls made'),\n payload: z\n .unknown()\n .optional()\n .describe('All intercepted API calls (only when verbose: true)'),\n }),\n )\n .optional()\n .describe('Per-destination results'),\n capturedEvents: z\n .array(z.record(z.string(), z.unknown()))\n .optional()\n .describe('Events captured by source simulation'),\n calls: z\n .array(z.unknown())\n .optional()\n .describe(\n 'Calls a simulated source made on its mock env (only when verbose: true)',\n ),\n skipped: z\n .object({\n reason: z.enum(['consent', 'pending']),\n required: z.record(z.string(), z.boolean()).optional(),\n granted: z.record(z.string(), z.boolean()).optional(),\n require: z.array(z.string()).optional(),\n })\n .optional()\n .describe(\n 'Why the destination sent nothing: a consent skip, or waiting for its require',\n ),\n duration: z.number().optional().describe('Simulation duration in ms'),\n};\n\nexport const PushOutputShape = {\n success: z.boolean().describe('Whether push succeeded'),\n elbResult: z.unknown().optional().describe('Push result from the collector'),\n duration: z.number().describe('Push duration in milliseconds'),\n error: z.string().optional().describe('Error message if push failed'),\n};\n\n// Examples List output shape\nexport const ExamplesListOutputShape = {\n flow: z.string().describe('Flow name'),\n count: z.number().describe('Number of examples found'),\n examples: z\n .array(\n z.object({\n step: z.string().describe('Step location (e.g., \"destination.gtag\")'),\n stepType: z\n .enum(['source', 'transformer', 'destination'])\n .describe('Step type'),\n stepName: z.string().describe('Step name'),\n exampleName: z.string().describe('Example name'),\n source: z\n .enum(['inline', 'package'])\n .describe(\n 'Where the example came from: \"inline\" (defined in the flow step) or \"package\" (shipped by the referenced package)',\n ),\n title: z.string().optional().describe('Human-readable title if set'),\n description: z\n .string()\n .optional()\n .describe('Short human-readable description'),\n public: z\n .boolean()\n .optional()\n .describe(\n 'Whether the example is public (defaults to true if omitted)',\n ),\n hasIn: z.boolean().describe('Whether the example has an input value'),\n hasOut: z.boolean().describe('Whether the example has an output value'),\n hasMapping: z\n .boolean()\n .describe('Whether the example has a mapping configuration'),\n hasTrigger: z\n .boolean()\n .describe('Whether the example has trigger metadata'),\n in: z.unknown().optional().describe('Input event data'),\n out: z.unknown().optional().describe('Expected output data'),\n mapping: z\n .unknown()\n .optional()\n .describe('Mapping configuration for destinations'),\n trigger: z\n .object({\n type: z.string().optional(),\n options: z.unknown().optional(),\n })\n .optional()\n .describe('Trigger metadata for source simulation'),\n }),\n )\n .describe('Step examples'),\n};\n","import type { Flow, Ingest, Simulation, WalkerOS } from '@walkeros/core';\nimport type { BundleStats, PushResult } from '@walkeros/cli';\n\n/**\n * The capability seam between the flow tools and the machine they run on.\n *\n * Every file read, URL fetch, bundle, simulation and push a tool performs goes\n * through a `FlowRuntime` and nothing else, so the runtime alone decides what\n * the process it lives in may do:\n *\n * - `createLocalRuntime()` keeps every capability. It is for the user's own\n * machine (stdio, the developer CLI), where the user is responsible for what\n * runs there.\n * - `createHostedRuntime(client)` is least privilege for a shared, network\n * reached process: it loads inline JSON and saved flow ids only, refuses\n * local paths and URLs, and has no `bundle`, `simulate` or `push` at all.\n *\n * A tool whose operation the runtime does not provide refuses with a hint that\n * names only out-of-process routes.\n */\nexport interface FlowRuntime {\n /**\n * Resolve a config input to parsed JSON. Local: a file path, an http(s) URL\n * or inline JSON. Hosted: inline JSON or a saved `flow_`/`cfg_` id; a local\n * path or URL is refused with a `RuntimeRefusal`.\n */\n load(input: string): Promise<unknown>;\n /**\n * The directory local `path` packages of a loaded input resolve against:\n * the input file's directory. Absent on a runtime without a filesystem,\n * where such packages stay a reported skip.\n */\n baseDir?(input: string): string | undefined;\n /** Compile a flow. Absent on a runtime that must not build in its process. */\n bundle?(input: string, opts: BundleOptions): Promise<BundleStats | void>;\n /** Build and run one step of a flow. Absent where that must not happen. */\n simulate?(input: string, opts: SimulateOptions): Promise<Simulation.Result>;\n /**\n * The values of the secrets a flow config references (`$secret.NAME`),\n * masked wherever a simulation or push result egresses. Read by the tools\n * only on a runtime without `loadRun`; a read that fails stops the run.\n */\n knownSecrets?(input: string): Promise<string[]>;\n /**\n * Read a push or simulate input once: the config and the values of the\n * secrets it references. A prebuilt bundle yields no config. A read that\n * fails rejects. Absent with `simulate` and `push`.\n */\n loadRun?(input: string): Promise<LoadedRun>;\n /** Build and run a flow against real destinations. Absent where forbidden. */\n push?(\n input: string,\n event: Record<string, unknown>,\n opts: PushOptions,\n ): Promise<PushResult>;\n}\n\nexport interface BundleOptions {\n flowName?: string;\n stats?: boolean;\n output?: string;\n}\n\nexport type SimulateStepType =\n | 'source'\n | 'transformer'\n | 'collector'\n | 'destination';\n\nexport interface SimulateOptions {\n stepType: SimulateStepType;\n stepId: string;\n event: unknown;\n flow?: string;\n /** The config from `loadRun`: the runtime does not read the input again. */\n config?: Flow.Json;\n /**\n * Transformer, collector and destination steps: pipeline context the step\n * reads via `ctx.ingest`. Source steps ignore it.\n */\n ingest?: Omit<Ingest, '_meta'>;\n /**\n * Collector state the step starts from. `consent` applies to every step\n * (the collector's starting consent); `user`, `globals` and `timing` to\n * collector steps only.\n */\n state?: {\n consent?: WalkerOS.Consent;\n user?: WalkerOS.User;\n globals?: WalkerOS.Properties;\n timing?: number;\n };\n /**\n * Destination steps only: run this collector command with `event` as its\n * data instead of pushing it (a step example with `command`).\n */\n command?: Flow.StepCommand;\n}\n\n/** A push or simulate input as read once by `loadRun`. */\nexport interface LoadedRun {\n config?: Flow.Json;\n knownSecrets: string[];\n}\n\nexport interface PushOptions {\n flow?: string;\n platform?: 'web' | 'server';\n /** The config from `loadRun`: the runtime does not read the input again. */\n config?: Flow.Json;\n}\n\n/**\n * Thrown by a runtime when it refuses an input on principle rather than on a\n * fault. Carries the hint a tool should surface next to the message.\n */\nexport class RuntimeRefusal extends Error {\n readonly hint: string;\n\n constructor(message: string, hint: string) {\n super(message);\n this.name = 'RuntimeRefusal';\n this.hint = hint;\n }\n}\n\n/** The hint for a refused runtime error, or a tool's own fallback otherwise. */\nexport function refusalHint(error: unknown, fallback: string): string {\n return error instanceof RuntimeRefusal ? error.hint : fallback;\n}\n\n/**\n * Every route named here runs outside the tool's process: the app's own deploy\n * pipeline, or the caller's own machine. A refused\n * caller is never pointed at another in-process route, such as saving the\n * flow and simulating it by id, which would be the same execution one step\n * later.\n */\nexport const HINT_OUT_OF_PROCESS =\n 'Build and deploy through the app with deploy_manage. To simulate, validate or bundle, use the walkerOS CLI on your own machine.';\n\n/** The refusal a tool raises when its runtime does not provide an operation. */\nexport function unavailableOperation(\n operation: 'bundle' | 'simulate' | 'push',\n): RuntimeRefusal {\n const verb =\n operation === 'bundle'\n ? 'Bundling'\n : operation === 'simulate'\n ? 'Simulating'\n : 'Running';\n return new RuntimeRefusal(\n `${verb} a flow is not available on the hosted walkerOS MCP server.`,\n HINT_OUT_OF_PROCESS,\n );\n}\n","import { isObject, type WalkerOS } from '@walkeros/core';\n\n/**\n * Saved flow references, shared by every place that recognises or reads one.\n *\n * `flow_` and `cfg_` are the reserved cloud flow/config id namespaces. The\n * pattern is anchored and limited to id characters, so a path that merely\n * starts with a prefix (`flow_../x`) is never mistaken for an id.\n */\nexport const CLOUD_ID_PATTERN = /^(flow|cfg)_[A-Za-z0-9_-]+$/;\n\nexport function isCloudId(input: string): boolean {\n return CLOUD_ID_PATTERN.test(input);\n}\n\n/**\n * The config of a flow record returned by the tool client, or `{}` when the\n * record carries none. The client seam returns an opaque shape, so this is the\n * one narrowing every reader shares.\n */\nexport function flowConfigOf(flow: unknown): WalkerOS.AnyObject {\n return isObject(flow) && isObject(flow.config) ? flow.config : {};\n}\n","import { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { BundleOutputShape } from '../schemas/output.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { resolveConfigPath } from './resolve-config-path.js';\nimport {\n refusalHint,\n unavailableOperation,\n type FlowRuntime,\n} from '../runtime/types.js';\n\nconst TITLE = 'Bundle Flow';\nconst DESCRIPTION =\n 'Bundle a walkerOS flow configuration into deployable JavaScript. ' +\n 'Resolves all destinations, sources, and transformers, then outputs ' +\n 'a tree-shaken production bundle. Returns bundle statistics.';\n\nconst inputSchema = {\n ...schemas.BundleInputShape,\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFlowBundleToolSpec(\n client: ToolClient,\n runtime: FlowRuntime,\n): ToolSpec {\n return {\n name: 'flow_bundle',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowBundleHandlerBody(client, runtime, input),\n };\n}\n\nasync function flowBundleHandlerBody(\n client: ToolClient,\n runtime: FlowRuntime,\n input: unknown,\n) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { configPath, flow, stats, output } = parsed.data;\n // Bundling compiles the config and resolves every package it names. A\n // runtime that must not do that in its process provides no `bundle`.\n if (!runtime.bundle) {\n const refusal = unavailableOperation('bundle');\n return mcpError(refusal, refusal.hint);\n }\n try {\n // Accept a cloud flow/config id as configPath, resolving it to inline JSON.\n const resolvedConfigPath = await resolveConfigPath(client, configPath);\n const result = await runtime.bundle(resolvedConfigPath, {\n flowName: flow,\n stats: stats ?? true,\n output,\n });\n\n if (!result) {\n return mcpResult(\n { success: false, message: 'Bundle produced no output' },\n {\n warnings: [\n 'The build returned no result. The flow may be empty or misconfigured.',\n ],\n next: ['Run flow_validate to check your configuration'],\n },\n );\n }\n\n return mcpResult(\n { success: true, ...result },\n {\n next: [\n 'Use flow_simulate to test',\n 'Use deploy_manage with action \"deploy\" to publish',\n ],\n },\n );\n } catch (error) {\n return mcpError(\n error,\n refusalHint(error, 'Run flow_validate for detailed error messages'),\n );\n }\n}\n\nexport function registerFlowBundleTool(\n server: McpServer,\n client: ToolClient,\n runtime: FlowRuntime,\n) {\n const spec = createFlowBundleToolSpec(client, runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: BundleOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowBundleHandlerBody(client, runtime, args),\n );\n}\n","import { z, type ZodRawShape } from 'zod';\nimport { mcpError } from '@walkeros/core';\n\n/** A tool's input as its input shape parses it, defaults applied. */\nexport type ToolInput<S extends ZodRawShape> = z.output<z.ZodObject<S>>;\n\n/**\n * Every issue as one readable line, `path: message; ...`. A raw ZodError\n * stringifies its whole issue list into `message`, so it is never passed on\n * as is.\n */\nexport function inputIssuesMessage(error: z.ZodError): string {\n return error.issues\n .map((issue) => `${issue.path.join('.') || 'input'}: ${issue.message}`)\n .join('; ');\n}\n\n/**\n * Parse, never assert: a tool spec is drivable without a transport, so its\n * handler applies the same input shape the transport validates against.\n * Input that fails it comes back as an error result.\n */\nexport function parseToolInput<S extends ZodRawShape>(\n shape: S,\n raw: unknown,\n):\n | { ok: true; data: ToolInput<S> }\n | { ok: false; error: ReturnType<typeof mcpError> } {\n const parsed = z.object(shape).safeParse(raw ?? {});\n if (!parsed.success) {\n return {\n ok: false,\n error: mcpError(new Error(inputIssuesMessage(parsed.error))),\n };\n }\n return { ok: true, data: parsed.data };\n}\n","import type { ToolClient } from '../tool-client.js';\nimport { flowConfigOf, isCloudId } from '../cloud-flow.js';\n\n/**\n * Resolve a `configPath` for tools that consume it (simulate, bundle). When it\n * is a cloud flow/config id, fetch the flow via the same client seam `flow_load`\n * uses and return its config serialized as JSON (the underlying CLI functions\n * accept inline JSON as `configPath`). Otherwise return the value unchanged so\n * file paths, URLs, and inline JSON pass through as before.\n */\nexport async function resolveConfigPath(\n client: Pick<ToolClient, 'getFlow'>,\n configPath: string,\n): Promise<string> {\n if (!isCloudId(configPath)) return configPath;\n\n const flow = await client.getFlow({ flowId: configPath });\n return JSON.stringify(flowConfigOf(flow));\n}\n","import { z } from 'zod';\nimport { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { filterValues, mcpResult, mcpError } from '@walkeros/core';\nimport type { Flow, Ingest, Simulation, WalkerOS } from '@walkeros/core';\nimport { SimulateOutputShape } from '../schemas/output.js';\nimport { FLOW_SIMULATE_DESCRIPTION } from './simulate-description.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { resolveConfigPath } from './resolve-config-path.js';\nimport { readRun, scrubbed, scrubbedError } from './egress.js';\nimport {\n refusalHint,\n unavailableOperation,\n type FlowRuntime,\n type SimulateStepType,\n} from '../runtime/types.js';\n\ninterface DestinationSummary {\n received: boolean;\n calls: number;\n payload?: unknown;\n}\n\nconst STEP_TYPES: readonly SimulateStepType[] = [\n 'source',\n 'transformer',\n 'collector',\n 'destination',\n];\n\nfunction isStepType(value: string): value is SimulateStepType {\n return STEP_TYPES.some((t) => t === value);\n}\n\nconst TITLE = 'Simulate Flow';\nconst COMMANDS: readonly [Flow.StepCommand, ...Flow.StepCommand[]] = [\n 'config',\n 'consent',\n 'user',\n 'run',\n];\n\nconst inputSchema = {\n configPath: schemas.SimulateInputShape.configPath,\n event: z\n .union([z.record(z.string(), z.unknown()), z.string()])\n .optional()\n .describe(\n \"For destinations: { name, data, consent? }; the event's consent counts \" +\n \"toward the destination's consent requirement, on top of state.consent. \" +\n \"With command: the command's data, e.g. { marketing: true } for consent. \" +\n 'For sources: { content, trigger? } where content is the walkerOS event ' +\n \"{ name, data }. A web source's page URL goes in trigger.options.url \" +\n '(default http://localhost). ' +\n 'Can also be a JSON string or file path.',\n ),\n flow: schemas.SimulateInputShape.flow,\n platform: schemas.SimulateInputShape.platform,\n // Override the (optional) CLI `step` shape: the simulate handler hard-requires\n // a target step (no all-steps mode), so the registered schema must be honest.\n step: z\n .string()\n .describe(\n 'Required. Target step as \"type.name\", e.g. \"source.demo\", \"collector.default\", \"destination.gtag\", \"transformer.router\". ' +\n 'A collector step runs enrichment and then collector.next, returning every event the destinations would receive (none after a stop).',\n ),\n verbose: z\n .boolean()\n .optional()\n .describe('Include full payload per destination (default: false)'),\n ingest: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\n 'Pipeline context a step reads via ctx.ingest, e.g. { url } for a ' +\n 'request decoder or { ip, userAgent } for a conversion API. Used for ' +\n 'transformer, collector and destination steps (their before chains ' +\n 'included); _meta is always set by the runtime.',\n ),\n state: z\n .object({\n consent: z.record(z.string(), z.boolean()).optional(),\n user: z.record(z.string(), z.unknown()).optional(),\n globals: z.record(z.string(), z.unknown()).optional(),\n timing: z.number().optional(),\n })\n .optional()\n .describe(\n 'Collector state the step starts from. consent: every step (starts a ' +\n 'destination that requires consent and feeds its consent check; for a ' +\n 'source, the consent a consent-gated source waits for). ' +\n 'user/globals/timing: collector steps, seeded before enrichment runs.',\n ),\n command: z\n .enum(COMMANDS)\n .optional()\n .describe(\n 'Destination steps only: run this collector command with event as its ' +\n 'data instead of pushing it, as a step example with command does.',\n ),\n};\n\nconst annotations = {\n // Simulation downloads the packages a config names and runs caller-controlled\n // flow code in process. Destinations are mocked, but that code is not, so the\n // hints stay conservative: side effects possible, repeat calls not assumed\n // safe, external systems reachable.\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFlowSimulateToolSpec(\n client: ToolClient,\n runtime: FlowRuntime,\n): ToolSpec {\n return {\n name: 'flow_simulate',\n title: TITLE,\n description: FLOW_SIMULATE_DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowSimulateHandlerBody(client, runtime, input),\n };\n}\n\n/** Plain values kept as walkerOS properties; values no property can hold dropped. */\nfunction toProperties(\n value: Record<string, unknown> | undefined,\n): WalkerOS.Properties | undefined {\n if (!value) return undefined;\n const properties: WalkerOS.Properties = {};\n for (const [key, entry] of Object.entries(value)) {\n const property = filterValues(entry);\n if (property !== undefined) properties[key] = property;\n }\n return properties;\n}\n\nasync function flowSimulateHandlerBody(\n client: ToolClient,\n runtime: FlowRuntime,\n input: unknown,\n) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n configPath,\n event,\n flow,\n platform,\n step,\n verbose,\n ingest,\n state,\n command,\n } = parsed.data;\n // Simulation compiles the config and imports the bundle, running caller\n // controlled flow code. A runtime that must not do that in its process\n // provides no `simulate`, whatever the input looks like.\n if (!runtime.simulate) {\n const refusal = unavailableOperation('simulate');\n return mcpError(refusal, refusal.hint);\n }\n let known: string[] = [];\n try {\n if (!event) {\n throw new Error(\n 'event is required. For sources provide { content, trigger? }, for destinations provide { name, data }.',\n );\n }\n\n if (!step) {\n throw new Error(\n 'step is required. Specify a target like \"source.browser\", \"destination.gtag\", or \"transformer.demo\".',\n );\n }\n\n // Resolve string event input (JSON string)\n let resolvedEvent: unknown = event;\n if (typeof event === 'string') {\n try {\n resolvedEvent = JSON.parse(event);\n } catch {\n throw new Error(\n 'Event string must be valid JSON. Got: ' + event.substring(0, 50),\n );\n }\n }\n\n // Parse step into type and id\n const dotIndex = step.indexOf('.');\n if (dotIndex === -1) {\n throw new Error(\n `Invalid step format \"${step}\". Use \"type.name\" (e.g. \"source.browser\", \"destination.gtag\").`,\n );\n }\n const stepType = step.substring(0, dotIndex);\n const stepId = step.substring(dotIndex + 1);\n\n if (!isStepType(stepType)) {\n throw new Error(\n `Unknown step type \"${stepType}\". Use \"source\", \"collector\", \"transformer\", or \"destination\".`,\n );\n }\n\n if (command !== undefined && stepType !== 'destination') {\n throw new Error('command applies to destination steps only.');\n }\n\n // Accept a cloud flow/config id as configPath, resolving it to inline JSON.\n const resolvedConfigPath = await resolveConfigPath(client, configPath);\n // Read once: the simulation runs on exactly the config whose secrets\n // mask the result.\n const run = await readRun(runtime, resolvedConfigPath);\n known = run.knownSecrets;\n\n const result: Simulation.Result = await runtime.simulate(\n resolvedConfigPath,\n {\n stepType,\n stepId,\n event: resolvedEvent,\n flow,\n ingest,\n state: state && {\n consent: state.consent,\n user: toProperties(state.user),\n globals: toProperties(state.globals),\n timing: state.timing,\n },\n command,\n config: run.config,\n },\n );\n\n const success = !result.error;\n const errorMessage = result.error?.message;\n\n // Source simulation: captured events are result.events, the source's\n // own walker commands its `elb` calls. Mock-env calls stay verbose-only.\n if (result.step === 'source') {\n const eventCount = result.events.length;\n const commandCount = result.calls.filter(\n (call) => call.fn === 'elb',\n ).length;\n const summary =\n `Source captured ${eventCount} event${eventCount !== 1 ? 's' : ''}` +\n ` and ${commandCount} command${commandCount !== 1 ? 's' : ''}`;\n const shownCalls = verbose\n ? result.calls\n : result.calls.filter((call) => call.fn === 'elb');\n\n return mcpResult(\n scrubbed(\n {\n success,\n error: errorMessage,\n summary,\n capturedEvents: result.events,\n ...(shownCalls.length > 0 ? { calls: shownCalls } : {}),\n duration: result.duration,\n },\n known,\n ),\n {\n next:\n eventCount + commandCount > 0\n ? [\n 'Use flow_simulate with a destination step to test downstream processing',\n ]\n : [\n 'Check source package examples with package_get, verify trigger type matches',\n ],\n },\n );\n }\n\n // Transformer simulation: surface the transformed events\n if (result.step === 'transformer') {\n return mcpResult(\n scrubbed(\n {\n success,\n error: errorMessage,\n summary: `Transformer processed event`,\n capturedEvents: result.events,\n duration: result.duration,\n },\n known,\n ),\n {\n next: ['Use flow_bundle to build for production'],\n },\n );\n }\n\n // Collector simulation: surface the enriched event\n if (result.step === 'collector') {\n return mcpResult(\n scrubbed(\n {\n success,\n error: errorMessage,\n summary: `Collector enriched event`,\n capturedEvents: result.events,\n duration: result.duration,\n },\n known,\n ),\n {\n next: ['Use flow_simulate with a destination step to test delivery'],\n },\n );\n }\n\n // Destination simulation: count intercepted env calls, key by step name\n const destinations: Record<string, DestinationSummary> = {};\n const callCount = result.calls.length;\n const destSummary: DestinationSummary = {\n received: callCount > 0,\n calls: callCount,\n };\n if (verbose && callCount > 0) {\n destSummary.payload = result.calls;\n }\n destinations[result.name] = destSummary;\n\n const destCount = Object.keys(destinations).length;\n const receivedCount = Object.values(destinations).filter(\n (d) => d.received,\n ).length;\n\n const warnings: string[] = [];\n if (receivedCount === 0 && success) warnings.push(notReceived(result));\n\n const resultObj = {\n success,\n error: errorMessage,\n summary: `${receivedCount}/${destCount} destinations received the event`,\n destinations,\n ...(result.skipped ? { skipped: result.skipped } : {}),\n duration: result.duration,\n };\n\n return mcpResult(scrubbed(resultObj, known), {\n next: ['Use flow_bundle to build for production'],\n ...(warnings.length > 0 ? { warnings } : {}),\n });\n } catch (error) {\n const hint = 'Run flow_validate for detailed error messages';\n return scrubbedError(mcpError(error, refusalHint(error, hint)), known);\n }\n}\n\nfunction keysOf(consent: WalkerOS.Consent | undefined): string {\n const keys = Object.entries(consent ?? {})\n .filter(([, granted]) => granted)\n .map(([key]) => key);\n return keys.length > 0 ? keys.join(', ') : 'none';\n}\n\n/** Why a destination received nothing, from the result's own `skipped`. */\nfunction notReceived(result: Simulation.Result): string {\n const { skipped } = result;\n if (skipped?.reason === 'pending') {\n const require = skipped.require ?? [];\n const waits = require.length ? require.join(', ') : 'its require';\n const advice = require.includes('consent')\n ? 'pass state.consent (e.g. { functional: true }) to start it.'\n : `it starts once the flow provides ${waits}; a simulation cannot seed that.`;\n return `Destination waits for ${waits} (require) and never started: ${advice}`;\n }\n if (skipped?.reason === 'consent') {\n return (\n `Consent skip: requires ${keysOf(skipped.required)}; granted ${keysOf(skipped.granted)}. ` +\n \"Grant it in state.consent or in the event's consent.\"\n );\n }\n return (\n 'Destination made no calls. Common causes: ' +\n '(1) mapping rules do not match the event name or ignore it, ' +\n '(2) policy redacted required fields, ' +\n '(3) a before chain stopped the event.'\n );\n}\n\nexport function registerFlowSimulateTool(\n server: McpServer,\n client: ToolClient,\n runtime: FlowRuntime,\n) {\n const spec = createFlowSimulateToolSpec(client, runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: SimulateOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowSimulateHandlerBody(client, runtime, args),\n );\n}\n","/**\n * The flow_simulate tool description, shared by the registered tool and the\n * declarative `TOOL_DEFINITIONS` registry (which must not import the tool's\n * node-only code).\n */\nexport const FLOW_SIMULATE_DESCRIPTION =\n 'Simulate events through a walkerOS flow without making real API calls. ' +\n 'For destinations: event is a walkerOS event { name: \"entity action\", data: {...} }. ' +\n 'For sources: event is { content, trigger?: { type?, options? } }, where content is the ' +\n 'walkerOS event { name: \"entity action\", data: {...} }. Only the simulated source starts. ' +\n 'step (required) targets the step to simulate, e.g. \"destination.gtag\". ' +\n 'Use flow_examples to discover available test data. ' +\n 'A destination simulation starts only its target destination. ' +\n \"A source's own walker commands (e.g. a CMP's walker consent) are returned as elb calls. \" +\n 'Consent: state.consent is the collector consent the step starts from ' +\n '(any step; a consent-gated source such as the session source waits for it). A destination with ' +\n 'require: [\"consent\"] waits until consent is present, so pass state.consent to start it; ' +\n 'a destination with consent: { marketing: true } receives an event only when that ' +\n \"consent is granted in state.consent or in the event's own consent. \" +\n 'When a destination sends nothing, the result says why (waiting for its require, or a consent skip). ' +\n 'command runs a step example with command (e.g. \"consent\") on a destination: ' +\n \"event is the command's data, state.consent still applies first. \" +\n 'Mapping transforms event names and data at the destination level. ' +\n 'Policy redacts or injects fields before mapping runs.';\n","import type { PushResult } from '@walkeros/cli';\nimport { isObject, mcpError, mcpResult } from '@walkeros/core';\nimport { scrubJson, scrubSecrets } from '@walkeros/core/node';\nimport type { FlowRuntime, LoadedRun } from '../runtime/types.js';\n\n/**\n * Simulate and push results carry recorded vendor calls, network requests and\n * vendor responses whose values can hold credentials. They egress like a log\n * line: `scrubJson` (masking the values of the secrets the flow references,\n * `known`, and credential patterns), then parse back into the structured\n * result.\n */\nexport function scrubbed(\n result: Record<string, unknown>,\n known: readonly string[],\n): Record<string, unknown> {\n const parsed = parseObject(scrubJson(result, { known }));\n if (!parsed) throw new Error('Result could not be redacted as JSON.');\n return parsed;\n}\n\n/** An error response as built by `mcpError`; a stub may lack the structured copy. */\ntype ErrorResponse = Omit<ReturnType<typeof mcpError>, 'structuredContent'> & {\n structuredContent?: Record<string, unknown>;\n};\n\n/**\n * The error response egresses the same way: its structured copy is scrubbed,\n * and the text is that copy serialized (as `mcpError` builds it), so it stays\n * valid JSON. Without a structured copy that scrubs, each text part is\n * scrubbed as a line instead, so the error message is never lost.\n */\nexport function scrubbedError(\n response: ErrorResponse,\n known: readonly string[],\n): ReturnType<typeof mcpError> {\n let structuredContent: Record<string, unknown> | undefined;\n try {\n if (response.structuredContent)\n structuredContent = scrubbed(response.structuredContent, known);\n } catch {\n structuredContent = undefined;\n }\n if (structuredContent) {\n return {\n ...response,\n content: [{ type: 'text', text: JSON.stringify(structuredContent) }],\n structuredContent,\n };\n }\n return {\n ...response,\n content: response.content.map((part) => ({\n ...part,\n text: scrubSecrets(part.text, { known }),\n })),\n structuredContent: { error: 'The error could not be redacted.' },\n };\n}\n\n/**\n * A push result as it egresses: scrubbed and parsed back. `success` and\n * `duration` come from the CLI, never from a vendor, and stay as they are so\n * the output schema always holds. A push already happened, so this never\n * throws: if the scrubbed text does not parse, the text alone carries the\n * result and the structured copy keeps the scalars.\n */\nexport function scrubbedPushResult(\n result: PushResult,\n known: readonly string[],\n): ReturnType<typeof mcpResult> {\n const text = scrubJson(result, { known, space: 2 });\n const parsed = parseObject(text);\n if (parsed)\n return mcpResult({\n ...parsed,\n success: result.success,\n duration: result.duration,\n });\n return {\n content: [{ type: 'text', text }],\n structuredContent: { success: result.success, duration: result.duration },\n };\n}\n\nfunction parseObject(text: string): Record<string, unknown> | undefined {\n try {\n const parsed: unknown = JSON.parse(text);\n return isObject(parsed) ? parsed : undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * The run input read once: `loadRun`, else, on a runtime without it, the\n * values its `knownSecrets` returns. A failed read rejects, so the caller\n * stops instead of egressing with pattern masking only.\n */\nexport async function readRun(\n runtime: FlowRuntime,\n input: string,\n): Promise<LoadedRun> {\n if (runtime.loadRun) return runtime.loadRun(input);\n return {\n knownSecrets: runtime.knownSecrets ? await runtime.knownSecrets(input) : [],\n };\n}\n","import { z } from 'zod';\nimport type { PushResult } from '@walkeros/cli';\nimport { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport { mcpError } from '@walkeros/core';\nimport { PushOutputShape } from '../schemas/output.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { readRun, scrubbedError, scrubbedPushResult } from './egress.js';\nimport {\n refusalHint,\n unavailableOperation,\n type FlowRuntime,\n} from '../runtime/types.js';\n\nconst TITLE = 'Push Events';\nconst DESCRIPTION =\n 'Push a real event through a walkerOS flow to actual destinations. ' +\n 'Makes real API calls to real endpoints. ' +\n 'Best suited for server-side flows — web flows should use flow_simulate for testing.';\n\nconst inputSchema = {\n configPath: schemas.PushInputShape.configPath,\n event: z\n .record(z.string(), z.unknown())\n .describe(\n 'Event object, e.g. { name: \"page view\", data: { title: \"Home\" } }',\n ),\n flow: schemas.PushInputShape.flow,\n platform: schemas.PushInputShape.platform,\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFlowPushToolSpec(runtime: FlowRuntime): ToolSpec {\n return {\n name: 'flow_push',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowPushHandlerBody(runtime, input),\n };\n}\n\nasync function flowPushHandlerBody(\n runtime: FlowRuntime,\n input: unknown,\n): Promise<CallToolResult> {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { configPath, event, flow, platform } = parsed.data;\n // Push compiles the config, imports it, and makes real outbound calls. A\n // runtime that must not do that in its process provides no `push`.\n if (!runtime.push) {\n const refusal = unavailableOperation('push');\n return mcpError(refusal, refusal.hint);\n }\n // Push results can carry vendor requests and responses: they egress with\n // the flow's secret values and credential patterns masked. The config is\n // read once, so the push runs on exactly the config whose secrets mask the\n // result; a config that cannot be read stops the push.\n let known: string[] = [];\n try {\n const run = await readRun(runtime, configPath);\n known = run.knownSecrets;\n const result: PushResult = await runtime.push(configPath, event, {\n flow,\n platform,\n config: run.config,\n });\n\n if (!result.success) {\n return scrubbedError(\n mcpError(\n new Error(result.error || 'Push failed'),\n 'Check destination configuration and connectivity.',\n ),\n known,\n );\n }\n\n return scrubbedPushResult(result, known);\n } catch (error) {\n return scrubbedError(\n mcpError(\n error,\n refusalHint(\n error,\n 'Check configPath and event format. For web flows, use flow_simulate.',\n ),\n ),\n known,\n );\n }\n}\n\nexport function registerFlowPushTool(server: McpServer, runtime: FlowRuntime) {\n const spec = createFlowPushToolSpec(runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: PushOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowPushHandlerBody(runtime, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { fetchPackage, mcpResult, mcpError } from '@walkeros/core';\nimport type { Flow, WalkerOSPackage } from '@walkeros/core';\nimport { resolveExportName, selectDevExamples } from '@walkeros/cli';\nimport { ExamplesListOutputShape } from '../schemas/output.js';\nimport { getPackageBaseUrl, CLIENT_HEADER } from '../catalog.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { isFlowJson, stepExamplesOf, type StepExampleView } from './narrow.js';\nimport {\n HINT_OUT_OF_PROCESS,\n refusalHint,\n type FlowRuntime,\n} from '../runtime/types.js';\n\n/** Upper bound on distinct package example lookups per call. */\nexport const MAX_PACKAGE_LOOKUPS = 25;\n\nconst TITLE = 'Flow Examples';\nconst DESCRIPTION =\n 'List all step examples in a walkerOS flow configuration. ' +\n 'Shows example names, step locations, and in/out shapes. ' +\n 'Inline examples on a step take precedence; steps without inline examples ' +\n 'fall back to the examples shipped by their referenced package. ' +\n 'Each result is tagged with its source (\"inline\" or \"package\"). ' +\n 'On the hosted server configPath accepts only inline JSON or a saved flow id (flow_ or cfg_), no file paths or URLs. ' +\n 'Use this to discover available test fixtures and simulation data.';\n\nconst inputSchema = {\n configPath: z\n .string()\n .min(1)\n .describe(\n 'Inline JSON string, file path, or URL of a flow configuration (hosted server: inline JSON or a saved flow id only)',\n ),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n step: z\n .string()\n .optional()\n .describe('Filter to a specific step (e.g., \"destination.gtag\")'),\n full: z\n .boolean()\n .optional()\n .describe(\n 'Return full in/out/mapping data for each example (default: false, returns metadata only)',\n ),\n includeHidden: z\n .boolean()\n .optional()\n .describe(\n 'Include examples marked public: false (default: false). Set true for test/debug discovery.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\nexport function createFlowExamplesToolSpec(runtime: FlowRuntime): ToolSpec {\n return {\n name: 'flow_examples',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowExamplesHandlerBody(runtime, input),\n };\n}\n\nasync function flowExamplesHandlerBody(runtime: FlowRuntime, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { configPath, flow, step, full, includeHidden } = parsed.data;\n try {\n const rawConfig = await runtime.load(configPath);\n if (!isFlowJson(rawConfig)) {\n throw new Error('Config is not a flow config: it has no flows object.');\n }\n\n // Resolve flow name\n const flowNames = Object.keys(rawConfig.flows || {});\n const flowName =\n flow || (flowNames.length === 1 ? flowNames[0] : undefined);\n\n if (!flowName) {\n throw new Error(\n `Multiple flows found. Specify flow parameter. Available: ${flowNames.join(', ')}`,\n );\n }\n\n const flowSettings = rawConfig.flows[flowName];\n if (!flowSettings) {\n throw new Error(`Flow \"${flowName}\" not found`);\n }\n\n // Collect all examples\n type ExampleItem = {\n step: string;\n stepType: string;\n stepName: string;\n exampleName: string;\n source: 'inline' | 'package';\n title?: string;\n description?: string;\n public?: boolean;\n hasIn: boolean;\n hasOut: boolean;\n hasMapping: boolean;\n hasTrigger: boolean;\n in?: unknown;\n out?: unknown;\n mapping?: unknown;\n trigger?: unknown;\n };\n const examples: ExampleItem[] = [];\n\n const toItems = (\n stepExamples: Record<string, StepExampleView>,\n type: string,\n name: string,\n source: 'inline' | 'package',\n ): ExampleItem[] => {\n const items: ExampleItem[] = [];\n for (const [exName, ex] of Object.entries(stepExamples)) {\n if (!includeHidden && ex.public === false) continue;\n items.push({\n step: `${type}.${name}`,\n stepType: type,\n stepName: name,\n exampleName: exName,\n source,\n title: ex.title,\n description: ex.description,\n public: ex.public,\n hasIn: ex.in !== undefined,\n hasOut: ex.out !== undefined,\n hasMapping: ex.mapping !== undefined,\n hasTrigger: ex.trigger !== undefined,\n ...(full\n ? {\n in: ex.in,\n out: ex.out,\n mapping: ex.mapping,\n trigger: ex.trigger,\n }\n : {}),\n });\n }\n return items;\n };\n\n // Pull a referenced package's shipped examples via the same path\n // package_get uses. A failed fetch must not break the whole tool: the\n // step is skipped and inline examples from other steps still return.\n const baseUrl = getPackageBaseUrl();\n const loadPackage = async (\n packageName: string,\n ): Promise<WalkerOSPackage | undefined> => {\n try {\n return await fetchPackage(packageName, {\n baseUrl,\n client: CLIENT_HEADER,\n });\n } catch {\n // Swallow: graceful fallback skip for this package.\n }\n return undefined;\n };\n\n // One lookup per distinct package, capped per call, so a config naming\n // many packages cannot fan out into an unbounded number of fetches.\n const packageLookups = new Map<\n string,\n Promise<WalkerOSPackage | undefined>\n >();\n let skippedPackages = false;\n const skippedExamples: string[] = [];\n const packageFor = (\n packageName: string,\n ): Promise<WalkerOSPackage | undefined> => {\n const existing = packageLookups.get(packageName);\n if (existing) return existing;\n if (packageLookups.size >= MAX_PACKAGE_LOOKUPS) {\n skippedPackages = true;\n return Promise.resolve(undefined);\n }\n const lookup = loadPackage(packageName);\n packageLookups.set(packageName, lookup);\n return lookup;\n };\n\n // The step examples of the step's own export: a multi-export package\n // ships `exportExamples` keyed by export name, the same rule simulate\n // uses (an export missing from the map has no examples).\n const stepExamplesFor = (\n info: WalkerOSPackage,\n exportName: string | undefined,\n ): ReturnType<typeof stepExamplesOf> => {\n const selected = selectDevExamples(\n { examples: info.examples, exportExamples: info.exportExamples },\n exportName,\n );\n return stepExamplesOf(selected?.step);\n };\n\n const stepTypes = [\n { key: 'sources' as const, type: 'source' as const },\n { key: 'transformers' as const, type: 'transformer' as const },\n { key: 'destinations' as const, type: 'destination' as const },\n ];\n\n for (const { key, type } of stepTypes) {\n const refs = flowSettings[key] || {};\n for (const [name, ref] of Object.entries(refs)) {\n // Apply step filter\n if (step && `${type}.${name}` !== step) continue;\n\n // Inline examples take precedence over package-shipped ones.\n if (ref.examples) {\n examples.push(...toItems(ref.examples, type, name, 'inline'));\n continue;\n }\n\n // No inline examples: fall back to the referenced package's shipped\n // examples (only for refs that actually name a package).\n if (!ref.package) continue;\n const info = await packageFor(ref.package);\n if (!info) continue;\n const { exportName } = resolveExportName(flowSettings, type, name);\n const packageExamples = stepExamplesFor(info, exportName);\n if (!packageExamples) continue;\n examples.push(\n ...toItems(packageExamples.examples, type, name, 'package'),\n );\n for (const exampleName of packageExamples.skipped)\n skippedExamples.push(`${type}.${name}.${exampleName}`);\n }\n }\n\n const result = {\n flow: flowName,\n count: examples.length,\n examples,\n };\n\n const warnings: string[] = [];\n if (examples.length === 0) {\n warnings.push(\n 'No examples found. Add examples to step entries, or reference a package that ships examples (see package_get).',\n );\n }\n if (skippedExamples.length > 0) {\n warnings.push(\n `Skipped ${skippedExamples.length} package example(s) that do not match the step example schema: ${skippedExamples.join(', ')}.`,\n );\n }\n if (skippedPackages) {\n warnings.push(\n `Package examples were looked up for the first ${MAX_PACKAGE_LOOKUPS} packages only. Use step to narrow the result.`,\n );\n }\n const hints: { next: string[]; warnings?: string[] } = {\n next: [\n runtime.simulate\n ? 'Use flow_simulate with step and event to simulate'\n : HINT_OUT_OF_PROCESS,\n ],\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n return mcpResult(result, hints);\n } catch (error) {\n return mcpError(\n error,\n refusalHint(error, 'Check configPath — expected a flow.json file'),\n );\n }\n}\n\nexport function registerFlowExamplesTool(\n server: McpServer,\n runtime: FlowRuntime,\n) {\n const spec = createFlowExamplesToolSpec(runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: ExamplesListOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowExamplesHandlerBody(runtime, args),\n );\n}\n","// __VERSION__ is replaced at build time by tsup's `define` (see tsup.config.ts).\n// In tests, it's set on globalThis (see src/__tests__/support/version.ts).\ndeclare const __VERSION__: string;\n\nconst NPM_SEARCH_URL = 'https://registry.npmjs.org/-/v1/search';\nconst JSDELIVR_BASE = 'https://cdn.jsdelivr.net/npm';\nconst WALKEROS_JSON_PATH = 'dist/walkerOS.json';\nconst CACHE_TTL = 5 * 60 * 1000;\n\nexport const CLIENT_HEADER = 'walkeros-mcp/' + __VERSION__;\n\n/**\n * Resolve the walkerOS app base URL for MCP outbound calls.\n *\n * Env-only by design: the MCP runs in an editor with explicit `.mcp.json`\n * env. No config-file precedence (which is what `@walkeros/cli`'s\n * `resolveAppUrl()` does for the `walkeros` CLI binary). Hard-cut:\n * `APP_URL` is no longer recognized.\n *\n * Lives here (not in tools/package.ts) because both the package tools and the\n * catalog resources need to resolve the same app-primary base URL. This is an\n * in-package helper, not a cross-package registry.\n */\nexport function getPackageBaseUrl(): string | undefined {\n return process.env.WALKEROS_APP_URL || undefined;\n}\n\nexport interface CatalogEntry {\n name: string;\n version: string;\n description?: string;\n type: string;\n platform: string[];\n}\n\nexport interface CatalogResult {\n entries: CatalogEntry[];\n warnings: string[];\n}\n\n/**\n * Provenance of the most recent `fetchCatalog` call. Module-scoped and\n * last-call-wins: the stdio MCP is a single process, so the diagnostics tool\n * reads which source (`app` vs `npm` fallback) served the last catalog fetch,\n * how many entries it produced, and whether any were dropped (partial).\n * `undefined` until the first fetch.\n */\nexport interface LastCatalogFetchInfo {\n source: 'app' | 'npm';\n count: number;\n partial: boolean;\n timestamp: number;\n}\n\nlet lastFetchInfo: LastCatalogFetchInfo | undefined;\n\nexport function getLastCatalogSource(): LastCatalogFetchInfo | undefined {\n return lastFetchInfo;\n}\n\n// Cache keyed by effective source (app baseUrl or 'npm'). The tool reads\n// app-primary and the resources read npm-primary; a shared cache let one\n// source's result leak into the other. Only complete, non-empty results are\n// cached, so a transient empty/partial fetch never freezes for the TTL.\nconst cache = new Map<string, { entries: CatalogEntry[]; timestamp: number }>();\n\nexport function clearCatalogCache() {\n cache.clear();\n}\n\nexport function normalizePlatform(platform?: unknown): string[] {\n if (platform == null) return [];\n if (typeof platform === 'string') {\n return platform === 'universal' ? ['web', 'server'] : [platform];\n }\n if (Array.isArray(platform)) {\n return platform.filter((v): v is string => typeof v === 'string');\n }\n return [];\n}\n\ninterface SourceResult {\n entries: CatalogEntry[];\n complete: boolean;\n // Number of packages the source listed before enrichment, so the caller can\n // compute how many were dropped (listed minus enriched).\n requested: number;\n}\n\nexport async function fetchCatalog(filters?: {\n type?: string;\n platform?: string;\n baseUrl?: string;\n}): Promise<CatalogResult> {\n const sourceKey = filters?.baseUrl ?? 'npm';\n const warnings: string[] = [];\n\n const cached = cache.get(sourceKey);\n if (cached && Date.now() - cached.timestamp < CACHE_TTL) {\n lastFetchInfo = {\n source: filters?.baseUrl ? 'app' : 'npm',\n count: cached.entries.length,\n partial: false,\n timestamp: Date.now(),\n };\n return { entries: applyFilters(cached.entries, filters), warnings };\n }\n\n let result: SourceResult;\n // Which source actually served. Starts as the requested source, flips to\n // 'npm' when an app fetch fails over to the npm fallback.\n let servedBy: 'app' | 'npm' = filters?.baseUrl ? 'app' : 'npm';\n if (filters?.baseUrl) {\n try {\n result = await fetchCatalogFrom(filters.baseUrl, filters);\n } catch {\n warnings.push(\n 'app catalog endpoint unavailable, fell back to npm; results may be incomplete',\n );\n servedBy = 'npm';\n try {\n result = await fetchFromNpm();\n } catch {\n lastFetchInfo = {\n source: 'npm',\n count: 0,\n partial: true,\n timestamp: Date.now(),\n };\n return { entries: [], warnings };\n }\n }\n } else {\n try {\n result = await fetchFromNpm();\n } catch {\n lastFetchInfo = {\n source: 'npm',\n count: 0,\n partial: true,\n timestamp: Date.now(),\n };\n return { entries: [], warnings };\n }\n }\n\n const dropped = result.requested - result.entries.length;\n if (dropped > 0) {\n warnings.push(\n `${dropped} package(s) could not be enriched and were omitted`,\n );\n }\n\n lastFetchInfo = {\n source: servedBy,\n count: result.entries.length,\n partial: !result.complete,\n timestamp: Date.now(),\n };\n\n // Only freeze a complete, non-empty result. Empty or partial fetches must\n // retry on the next call rather than serve a stale shortfall for the TTL.\n if (result.entries.length > 0 && result.complete) {\n cache.set(sourceKey, { entries: result.entries, timestamp: Date.now() });\n }\n\n return { entries: applyFilters(result.entries, filters), warnings };\n}\n\nasync function fetchCatalogFrom(\n baseUrl: string,\n filters?: { type?: string; platform?: string },\n): Promise<SourceResult> {\n const params = new URLSearchParams();\n if (filters?.type) params.set('type', filters.type);\n if (filters?.platform) params.set('platform', filters.platform);\n\n const url = `${baseUrl}/api/packages${params.toString() ? `?${params}` : ''}`;\n const res = await fetch(url, {\n signal: AbortSignal.timeout(15000),\n headers: { 'X-Walkeros-Client': CLIENT_HEADER },\n });\n if (!res.ok) throw new Error(`Catalog fetch failed: ${res.status}`);\n\n const data = (await res.json()) as { catalog: CatalogEntry[] };\n const entries = data.catalog;\n return { entries, complete: entries.length > 0, requested: entries.length };\n}\n\nasync function fetchFromNpm(): Promise<SourceResult> {\n const res = await fetch(`${NPM_SEARCH_URL}?text=@walkeros/&size=250`, {\n signal: AbortSignal.timeout(10000),\n headers: { 'X-Walkeros-Client': CLIENT_HEADER },\n });\n if (!res.ok) throw new Error(`npm search failed: ${res.status}`);\n\n const data = (await res.json()) as {\n objects: Array<{\n package: { name: string; version: string; description?: string };\n }>;\n };\n\n const requested = data.objects.length;\n\n const metaResults = await Promise.allSettled(\n data.objects.map((obj) => enrichWithMeta(obj.package)),\n );\n\n const entries = metaResults\n .filter(\n (r): r is PromiseFulfilledResult<CatalogEntry | undefined> =>\n r.status === 'fulfilled',\n )\n .map((r) => r.value)\n .filter((entry): entry is CatalogEntry => entry !== undefined);\n\n // A non-empty npm list with fewer enriched entries means jsdelivr silently\n // dropped some packages; treat that as incomplete so it is not cached.\n const complete = requested === 0 || entries.length === requested;\n return { entries, complete, requested };\n}\n\nasync function enrichWithMeta(pkg: {\n name: string;\n version: string;\n description?: string;\n}): Promise<CatalogEntry | undefined> {\n try {\n const res = await fetch(\n `${JSDELIVR_BASE}/${pkg.name}@${pkg.version}/${WALKEROS_JSON_PATH}`,\n {\n signal: AbortSignal.timeout(5000),\n headers: { 'X-Walkeros-Client': CLIENT_HEADER },\n },\n );\n if (!res.ok) return undefined;\n\n const json = (await res.json()) as { $meta?: Record<string, unknown> };\n const meta = json.$meta;\n if (!meta || typeof meta.type !== 'string') return undefined;\n\n return {\n name: pkg.name,\n version: pkg.version,\n description: pkg.description,\n type: meta.type,\n platform: normalizePlatform(meta.platform),\n };\n } catch {\n return undefined;\n }\n}\n\nfunction applyFilters(\n entries: CatalogEntry[],\n filters?: { type?: string; platform?: string },\n): CatalogEntry[] {\n let results = entries;\n if (filters?.type) {\n results = results.filter((e) => e.type === filters.type);\n }\n if (filters?.platform) {\n // Empty platform means platform-agnostic → matches any filter\n results = results.filter(\n (e) => e.platform.length === 0 || e.platform.includes(filters.platform!),\n );\n }\n return results;\n}\n","/**\n * Structural reads of values the tools receive untyped: app responses\n * (`ToolClient` returns `unknown`) and loaded configs. Each reader checks the\n * shape it returns, so a field that is not what a tool expects reads as\n * absent instead of being asserted into place.\n */\nimport type { Flow } from '@walkeros/core';\nimport { schemas, type z } from '@walkeros/core/dev';\n\n/** A plain JSON object. */\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** A string field of an object, absent when it is not a string. */\nexport function stringField(value: unknown, key: string): string | undefined {\n if (!isRecord(value)) return undefined;\n const field = value[key];\n return typeof field === 'string' ? field : undefined;\n}\n\n/** An object field of an object, absent when it is not an object. */\nexport function recordField(\n value: unknown,\n key: string,\n): Record<string, unknown> | undefined {\n if (!isRecord(value)) return undefined;\n const field = value[key];\n return isRecord(field) ? field : undefined;\n}\n\n/** The fields of an object response to spread into a result; none otherwise. */\nexport function fieldsOf(value: unknown): Record<string, unknown> {\n return isRecord(value) ? value : {};\n}\n\n/**\n * A flow config (`Flow.Json`): an object with a `flows` object, the same\n * shallow check the CLI's push makes. Every consumer passes it on to the CLI,\n * which validates the config in depth.\n */\nexport function isFlowJson(value: unknown): value is Flow.Json {\n return isRecord(value) && isRecord(value.flows);\n}\n\n/** A step example as core's `StepExampleSchema` reads it. */\nexport type StepExampleView = z.infer<\n typeof schemas.FlowSchemas.StepExampleSchema\n>;\n\n/**\n * The step examples of an object, each checked with core's\n * `StepExampleSchema`. Names that fail it are returned as `skipped`, so a\n * caller reports them instead of dropping them unseen.\n */\nexport function stepExamplesOf(\n value: unknown,\n):\n | { examples: Record<string, StepExampleView>; skipped: string[] }\n | undefined {\n if (!isRecord(value)) return undefined;\n const examples: Record<string, StepExampleView> = {};\n const skipped: string[] = [];\n for (const [name, example] of Object.entries(value)) {\n const parsed = schemas.FlowSchemas.StepExampleSchema.safeParse(example);\n if (parsed.success) examples[name] = parsed.data;\n else skipped.push(name);\n }\n return { examples, skipped };\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { fetchPackage, mcpResult, mcpError } from '@walkeros/core';\nimport { mergeConfigSchema } from '@walkeros/core/dev';\nimport {\n fetchCatalog,\n normalizePlatform,\n getPackageBaseUrl,\n CLIENT_HEADER,\n} from '../catalog.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport { recordField, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\n\n// `getPackageBaseUrl` lives in ../catalog.js because both these tools and the\n// catalog resources resolve the same app-primary base URL. Re-exported here so\n// existing importers of `tools/package.js` keep working.\nexport { getPackageBaseUrl };\n\n// ---------- package_search ----------\n\nconst SEARCH_TITLE = 'Search Package';\nconst SEARCH_DESCRIPTION =\n 'Start here for package discovery. Never guess package names: use this tool first to find exact names. ' +\n 'Without package name: returns catalog filtered by type/platform. ' +\n 'With package name: returns metadata, hint keys, and example summaries.';\n\nconst searchInputSchema = {\n package: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Exact npm package name for detailed lookup (e.g., @walkeros/web-destination-snowplow)',\n ),\n type: z\n .enum(['source', 'destination', 'transformer', 'store'])\n .optional()\n .describe('Filter by package type (browse mode)'),\n platform: z\n .enum(['web', 'server'])\n .optional()\n .describe('Filter by platform (browse mode, includes universal packages)'),\n version: z\n .string()\n .optional()\n .describe('Package version for detailed lookup (default: latest)'),\n};\n\nconst searchAnnotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\nexport function createPackageSearchToolSpec(): ToolSpec {\n return {\n name: 'package_search',\n title: SEARCH_TITLE,\n description: SEARCH_DESCRIPTION,\n inputSchema: searchInputSchema,\n annotations: searchAnnotations,\n handler: (input) => packageSearchHandlerBody(input),\n };\n}\n\nasync function packageSearchHandlerBody(input: unknown) {\n const parsed = parseToolInput(searchInputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { package: packageName, type, platform, version } = parsed.data;\n const baseUrl = getPackageBaseUrl();\n\n // Browse mode: no package specified → return catalog\n if (!packageName) {\n const { entries, warnings } = await fetchCatalog({\n type,\n platform,\n baseUrl,\n });\n const result = { catalog: entries, count: entries.length };\n return mcpResult(result, {\n next: ['Use package_get for schemas and examples'],\n ...(warnings.length > 0 ? { warnings } : {}),\n });\n }\n\n // Lookup mode: fetch specific package details\n try {\n const info = await fetchPackage(packageName, {\n version,\n baseUrl,\n client: CLIENT_HEADER,\n });\n\n const result = {\n package: info.packageName,\n version: info.version,\n description: info.description,\n type: info.type,\n platform: normalizePlatform(info.platform),\n hintKeys: info.hintKeys,\n exampleSummaries: info.exampleSummaries,\n };\n\n return mcpResult(result, {\n next: ['Use package_get for schemas and examples'],\n });\n } catch (error) {\n return mcpError(\n error,\n 'Package not found. Use package_search without parameters to browse available packages.',\n );\n }\n}\n\nexport function registerPackageSearchTool(server: McpServer) {\n const spec = createPackageSearchToolSpec();\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // No outputSchema: browse mode returns {catalog, count}, lookup returns metadata — incompatible shapes\n annotations: spec.annotations,\n },\n (args) => packageSearchHandlerBody(args),\n );\n}\n\n// ---------- package_get ----------\n\nconst GET_TITLE = 'Get Package';\nconst GET_DESCRIPTION =\n 'Requires exact package name: do not guess names, use package_search first to find them. ' +\n 'Returns schemas + hint texts + example summaries by default (lightweight). ' +\n 'Use section parameter for full content: \"hints\" (with code blocks), \"examples\" (full in/out data), or \"all\".';\n\nconst getInputSchema = {\n package: z\n .string()\n .min(1)\n .describe(\n 'Exact npm package name (e.g., @walkeros/web-destination-snowplow)',\n ),\n version: z.string().optional().describe('Package version (default: latest)'),\n section: z\n .enum(['hints', 'examples', 'all'])\n .optional()\n .describe(\n 'Section to expand with full content. Default: summary view with schemas + hint texts + example descriptions',\n ),\n};\n\nconst getAnnotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createPackageGetToolSpec(): ToolSpec {\n return {\n name: 'package_get',\n title: GET_TITLE,\n description: GET_DESCRIPTION,\n inputSchema: getInputSchema,\n annotations: getAnnotations,\n handler: (input) => packageGetHandlerBody(input),\n };\n}\n\nconst STEP_PACKAGE_TYPES = [\n 'source',\n 'destination',\n 'transformer',\n 'store',\n] as const;\n\nfunction isStepPackageType(\n type: string | undefined,\n): type is (typeof STEP_PACKAGE_TYPES)[number] {\n return STEP_PACKAGE_TYPES.some((stepType) => stepType === type);\n}\n\n/**\n * Base config merged with the package settings as `config`; every other\n * schema (mapping, setup, ga4, ...) kept as a sibling.\n */\nfunction shapeSchemas(\n type: string | undefined,\n schemas: Record<string, unknown>,\n): Record<string, unknown> {\n const shaped: Record<string, unknown> = {};\n\n if (isStepPackageType(type)) {\n const settings = recordField(schemas, 'settings');\n const credentials = recordField(schemas, 'credentials');\n shaped.config = mergeConfigSchema(type, {\n ...schemas,\n settings,\n credentials,\n });\n }\n\n for (const [key, value] of Object.entries(schemas)) {\n if (key !== 'settings') shaped[key] = value;\n }\n return shaped;\n}\n\nasync function packageGetHandlerBody(input: unknown) {\n const parsed = parseToolInput(getInputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { package: packageName, version, section } = parsed.data;\n const baseUrl = getPackageBaseUrl();\n\n try {\n const info = await fetchPackage(packageName, {\n version,\n baseUrl,\n client: CLIENT_HEADER,\n });\n\n const result: Record<string, unknown> = {\n package: info.packageName,\n version: info.version,\n type: info.type,\n platform: normalizePlatform(info.platform),\n schemas: shapeSchemas(info.type, info.schemas),\n };\n\n // Multi-export packages: schemas per export, each with its own config\n if (info.exportSchemas) {\n result.exportSchemas = Object.fromEntries(\n Object.entries(info.exportSchemas).map(([name, schemas]) => [\n name,\n shapeSchemas(info.type, schemas),\n ]),\n );\n }\n\n // Hints\n if (info.hints) {\n if (section === 'hints' || section === 'all') {\n result.hints = info.hints;\n } else {\n const hintSummary: Record<string, { text: string }> = {};\n for (const [key, hint] of Object.entries(info.hints)) {\n const text = stringField(hint, 'text');\n if (text !== undefined) hintSummary[key] = { text };\n }\n result.hints = hintSummary;\n }\n }\n\n // Examples\n if (section === 'examples' || section === 'all') {\n result.examples = info.examples;\n // Multi-export packages: examples per export, keyed by export name\n if (info.exportExamples) result.exportExamples = info.exportExamples;\n } else {\n result.exampleSummaries = info.exampleSummaries;\n }\n\n return mcpResult(result);\n } catch (error) {\n return mcpError(\n error,\n 'Use package_search to browse available package names.',\n );\n }\n}\n\nexport function registerGetPackageSchemaTool(server: McpServer) {\n const spec = createPackageGetToolSpec();\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // No outputSchema: removed to avoid SDK -32602 crashes on unexpected field values\n annotations: spec.annotations,\n },\n (args) => packageGetHandlerBody(args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { redactNestedStrings, keepStructural } from '../user-data.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\nimport { RuntimeRefusal, type FlowRuntime } from '../runtime/types.js';\n\nimport { flowConfigOf, isCloudId } from '../cloud-flow.js';\n\nconst WEB_SKELETON = {\n version: 4,\n flows: {\n default: {\n config: { platform: 'web', bundle: { packages: {} } },\n sources: {},\n destinations: {},\n },\n },\n};\n\nconst SERVER_SKELETON = {\n version: 4,\n flows: {\n default: {\n config: { platform: 'server', bundle: { packages: {} } },\n sources: {},\n destinations: {},\n },\n },\n};\n\nconst TITLE = 'Load or Create Flow';\nconst DESCRIPTION =\n 'Load an existing flow configuration from a local file path, URL, or walkerOS API (by flow ID). ' +\n 'On the hosted server only inline JSON or a saved flow id is accepted, no file paths or URLs. ' +\n 'Or create a new empty flow by specifying a platform (web or server). ' +\n 'Use the add-step prompt to add sources, destinations, transformers, or stores to the flow.';\n\nconst inputSchema = {\n source: z\n .string()\n .optional()\n .describe(\n 'Flow source: local file path (./flow.json), URL (https://...), ' +\n 'inline JSON string, or API flow ID (cfg_...). Omit to create a new flow.',\n ),\n platform: z\n .enum(['web', 'server'])\n .optional()\n .describe(\n 'Platform for new flows. Required when source is omitted. ' +\n 'web = browser tracking, server = Node.js HTTP.',\n ),\n};\n\nconst outputSchema = {\n version: z.number().describe('Flow config version'),\n flows: z.record(z.string(), z.unknown()).describe('Flow entries'),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createFlowLoadToolSpec(\n client: ToolClient,\n runtime: FlowRuntime,\n): ToolSpec {\n return {\n name: 'flow_load',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowLoadHandlerBody(client, runtime, input),\n };\n}\n\nasync function flowLoadHandlerBody(\n client: ToolClient,\n runtime: FlowRuntime,\n input: unknown,\n) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { source, platform } = parsed.data;\n\n // Load by cloud flow/config id (flow_… / cfg_…) via the same client seam\n // flow_manage `get` uses. Its NOT_FOUND surfaces directly, never remapped\n // to the local \"file not found\" hint below.\n if (source && isCloudId(source)) {\n const resolvedProjectId = resolveDefaultProject(client, undefined);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n try {\n const flow = await client.getFlow({\n flowId: source,\n projectId: resolvedProjectId,\n });\n return mcpResult(\n redactNestedStrings(flowConfigOf(flow), { skip: keepStructural }),\n {\n next: ['Use flow_validate to check', 'Use add-step prompt to modify'],\n },\n );\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n }\n\n try {\n if (source) {\n // Every file or URL read goes through the runtime, which decides what\n // this process may load.\n const config = await runtime.load(source);\n return mcpResult(redactNestedStrings(config, { skip: keepStructural }), {\n next: ['Use flow_validate to check', 'Use add-step prompt to modify'],\n });\n }\n\n if (!platform) {\n return mcpError(\n new Error(\n 'Provide source (file path, URL, or flow ID) to load existing flow, ' +\n 'or platform (web/server) to create a new one.',\n ),\n );\n }\n\n const skeleton = platform === 'web' ? WEB_SKELETON : SERVER_SKELETON;\n return mcpResult(skeleton, {\n next: [\n 'Read walkeros://reference/flow-schema for config structure',\n 'Use add-step prompt to add sources and destinations',\n ],\n });\n } catch (error) {\n if (error instanceof RuntimeRefusal) return mcpError(error, error.hint);\n const msg = error instanceof Error ? error.message : '';\n if (msg.includes('not found') || msg.includes('ENOENT'))\n return mcpError(error, 'Check configPath — expected a flow.json file');\n return mcpError(error);\n }\n}\n\nexport function registerFlowLoadTool(\n server: McpServer,\n client: ToolClient,\n runtime: FlowRuntime,\n) {\n const spec = createFlowLoadToolSpec(client, runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema,\n annotations: spec.annotations,\n },\n (args) => flowLoadHandlerBody(client, runtime, args),\n );\n}\n","// Shared types for MCP management tools.\n// Keep this file dependency-light: only type-level imports from SDK/core.\n\n/**\n * Discriminated input shape for action-based MCP tools.\n * Example: ActionToolInput<'list', { projectId?: string }>\n */\nexport type ActionToolInput<A extends string, T = Record<string, never>> = {\n action: A;\n} & T;\n\n/**\n * Uniform handler return shape used by all mgmt tools.\n * Matches mcpResult / mcpError from @walkeros/core.\n */\nexport type ToolHandlerResult = {\n content: Array<{ type: 'text'; text: string }>;\n structuredContent: Record<string, unknown>;\n isError?: true;\n};\n\n/**\n * True when the error looks like an authentication/authorization failure\n * from the walkerOS cloud API. Used to decide whether to append the\n * \"Are you logged in?\" hint on caught errors.\n */\nexport function isAuthError(error: unknown): boolean {\n if (!(error instanceof Error)) return false;\n const msg = error.message.toLowerCase();\n if (\n msg.includes('unauthorized') ||\n msg.includes('forbidden') ||\n msg.includes('invalid token') ||\n msg.includes('token expired') ||\n msg.includes('not authenticated')\n ) {\n return true;\n }\n const code = (error as Error & { code?: string }).code;\n if (!code) return false;\n const upperCode = code.toUpperCase();\n return (\n upperCode === 'UNAUTHORIZED' ||\n upperCode === 'FORBIDDEN' ||\n upperCode === '401' ||\n upperCode === '403' ||\n upperCode.startsWith('AUTH_')\n );\n}\n\nexport const AUTH_HINT =\n 'Are you logged in? Use auth(action: \"status\") to check.';\n","/**\n * Wraps a user-writable string in `<user_data>…</user_data>` so the chat\n * assistant treats it as data, never as instructions. Inner `</user_data>`\n * sequences are mangled (`</user_data_>`) so a malicious string can't close\n * the envelope early.\n *\n * Idempotent: a string that is already a well-formed envelope with no inner\n * `</user_data>` is returned unchanged.\n */\nexport function wrapUserData(s: string): string {\n const alreadyWrapped =\n s.startsWith('<user_data>') &&\n s.endsWith('</user_data>') &&\n s.slice(11, -12).indexOf('</user_data>') === -1;\n if (alreadyWrapped) return s;\n const neutralised = s.replace(/<\\/user_data>/g, '</user_data_>');\n return `<user_data>${neutralised}</user_data>`;\n}\n\n/**\n * The single redaction rule for every tool that echoes flow/deployment data\n * back to the chat assistant:\n *\n * wrap only the human-facing display `name`/`flowName` field and deep config\n * VALUES; leave all structural ids/keys literal everywhere.\n *\n * Redaction exists to neutralise user-CONTROLLED string VALUES so an injected\n * `</user_data>` can't escape the envelope. It must NOT touch:\n * - structural keys (ids, slugs, dates, immutable identifiers): the LLM needs\n * to reference them verbatim, and wrapping them breaks get→edit→update\n * round-trips (e.g. wrapping `package`/`platform` corrupts a config the\n * user pushes straight back).\n * - tool-generated text (validation messages, error strings): that text is\n * authored by us, not echoed user input, so it stays literal like `path`.\n *\n * `STRUCTURAL_KEYS` is the union of every key whose value is an id/slug/date/\n * immutable identifier rather than user free-text. Confirmed: none of these key\n * names ever hold a genuine user-authored free-text value — `package`/`platform`\n * are enum/package-name fields, `kind` is a discriminator, the rest are\n * server-generated ids/timestamps.\n */\nexport const STRUCTURAL_KEYS = new Set([\n 'id',\n 'flowId',\n 'projectId',\n 'previewId',\n 'version',\n 'slug',\n 'kind',\n 'createdAt',\n 'updatedAt',\n 'deletedAt',\n 'package',\n 'platform',\n]);\n\n/** Return `true` for keys that must stay literal (ids, slugs, dates, package,\n * platform). Use as the `skip` predicate for {@link redactNestedStrings}. */\nexport const keepStructural = (key: string): boolean =>\n STRUCTURAL_KEYS.has(key);\n\nexport interface RedactOptions {\n /** Return `true` to skip wrapping for a given object key. Only invoked for\n * string values on object entries — not for array elements or scalar\n * roots. Use to keep ids / slugs / dates literal. */\n skip?: (key: string) => boolean;\n}\n\n/**\n * Recursively walks `value` and returns a deep-copied structure where every\n * string leaf has been passed through `wrapUserData`. Pass `skip` to exclude\n * specific keys (e.g. `id`) from wrapping.\n */\nexport function redactNestedStrings<T>(value: T, opts?: RedactOptions): T {\n return walk(value, opts) as T;\n}\n\n/** Human-facing display fields wrapped on echoed flow/deployment summaries even\n * when the rest of the object is left literal. */\nconst DISPLAY_NAME_KEYS = new Set(['name', 'flowName']);\n\n/**\n * Recursively wraps ONLY the human-facing display `name`/`flowName` fields,\n * leaving every other value (ids, slugs, status, type, dates) literal. Use on\n * tool responses that echo deployment/flow summaries where the only\n * user-authored free-text is the display name.\n */\nexport function redactDisplayNames<T>(value: T): T {\n return walkDisplay(value) as T;\n}\n\nfunction walkDisplay(value: unknown): unknown {\n if (Array.isArray(value)) return value.map(walkDisplay);\n if (value && typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value)) {\n if (DISPLAY_NAME_KEYS.has(k) && typeof v === 'string') {\n out[k] = wrapUserData(v);\n } else {\n out[k] = walkDisplay(v);\n }\n }\n return out;\n }\n return value;\n}\n\nfunction walk(value: unknown, opts?: RedactOptions): unknown {\n if (typeof value === 'string') return wrapUserData(value);\n if (Array.isArray(value)) return value.map((v) => walk(v, opts));\n if (value && typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value)) {\n if (opts?.skip?.(k) && typeof v === 'string') {\n out[k] = v;\n } else {\n out[k] = walk(v, opts);\n }\n }\n return out;\n }\n return value;\n}\n","import type { ToolClient } from '../tool-client.js';\n\n/**\n * Shared by every project-bound tool, so the remedy is worded once.\n *\n * It names what to do, not just what went wrong, and it names where to get the\n * missing value. The per-call remedy leads because it always works: a selection\n * made with `set_default` is held by the process serving the connection and is\n * gone after a reconnect, by the ruling in the app's MCP route.\n */\nexport const NO_DEFAULT_PROJECT_ERROR =\n 'No project selected and no projectId given. Pass projectId on this call, or call project_manage action \"set_default\" to select one. project_manage action \"list\" returns the available ids.';\n\n/** Resolves the project for actions that fall back to the CLI default when\n * `projectId` is omitted. Returns the resolved id, or undefined when there is\n * no default to fall back to (the no-project-at-all case). An explicit\n * `projectId` is always honoured as-is so the app's genuine NOT_FOUND still\n * surfaces for an explicit-but-wrong id. */\nexport function resolveDefaultProject(\n client: ToolClient,\n projectId: string | undefined,\n): string | undefined {\n return projectId ?? client.getDefaultProject() ?? undefined;\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\n\ndeclare const __VERSION__: string;\n\nconst TITLE = 'Send Feedback';\nconst DESCRIPTION = 'Send feedback about walkerOS';\n\nconst inputSchema = {\n text: z.string().describe('Your feedback text'),\n anonymous: z\n .boolean()\n .optional()\n .describe(\n 'Include user/project info? false = include, true = anonymous. Only needed on first call if not yet configured.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFeedbackToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'feedback',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => feedbackHandlerBody(client, input),\n };\n}\n\nasync function feedbackHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { text, anonymous: explicitAnonymous } = parsed.data;\n try {\n let anonymous = client.getFeedbackPreference();\n\n if (anonymous === undefined && explicitAnonymous === undefined) {\n return mcpResult(\n { needsConsent: true },\n {\n next: [\n 'Ask the user if they want to include their info',\n 'Call feedback again with anonymous: true or false',\n ],\n },\n );\n }\n\n if (anonymous === undefined && explicitAnonymous !== undefined) {\n anonymous = explicitAnonymous;\n client.setFeedbackPreference(anonymous);\n }\n\n const isAnonymous = explicitAnonymous ?? anonymous ?? true;\n\n await client.submitFeedback(text, {\n anonymous: isAnonymous,\n version: __VERSION__,\n });\n\n return mcpResult({ ok: true });\n } catch (error) {\n return mcpError(error);\n }\n}\n\nexport function registerFeedbackTool(server: McpServer, client: ToolClient) {\n const spec = createFeedbackToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => feedbackHandlerBody(client, args),\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult } from '@walkeros/core';\nimport { VERSION as CLI_VERSION, compareContract } from '@walkeros/cli';\nimport type { ContractComparison } from '@walkeros/cli';\nimport openapiSpec from '@walkeros/cli/openapi/spec.json';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { getPackageBaseUrl, getLastCatalogSource } from '../catalog.js';\nimport { normalizeBaseUrl } from '../base-url.js';\n\n// The bundled OpenAPI contract version, embedded at build time via the import\n// above (no runtime module resolution). This is the client's bundled baseline,\n// not the live backend's spec.\nconst CONTRACT_OPENAPI_VERSION: string = openapiSpec.info.version;\n\nconst TITLE = 'Diagnostics';\nconst DESCRIPTION =\n 'Report the MCP runtime surface: MCP and CLI versions, the resolved app URL ' +\n 'and its source, app /api/health reachability, the bundled OpenAPI contract ' +\n 'version, and which source served the last package catalog fetch. ' +\n 'Read-only and callable when logged out; use it when a request fails to see ' +\n 'which versions and backend you are on.';\n\n// No input fields: diagnostics is callable with `{}`, including logged out.\nconst inputSchema = {};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createDiagnosticsToolSpec(\n client: ToolClient,\n packageVersion: string,\n): ToolSpec {\n return {\n name: 'diagnostics',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: () => diagnosticsHandlerBody(client, packageVersion),\n };\n}\n\nasync function diagnosticsHandlerBody(\n client: ToolClient,\n packageVersion: string,\n) {\n // The backend comes from the CLIENT, never from the local CLI: the local\n // door resolves the user's machine, the hosted door is served by the app it\n // reports, and a tool that resolved this itself would name the wrong backend\n // on one of them.\n const resolved = client.appBaseUrl();\n\n // Provenance via the same helper the catalog uses; do not add a parallel\n // process.env check. It is a claim about the OVERRIDE only, and a proven\n // one: `env` means this process's WALKEROS_APP_URL is the URL the client\n // actually named. A client that ignores the variable (the hosted door does,\n // it is served on its own URL) therefore never reports `env` merely because\n // the variable happens to be set in its environment.\n // Normalized on both sides of the comparison: `resolved` is a base without a\n // trailing slash, and the env var is under no such obligation, so comparing\n // raw would report `default` for a slashed value that did set the URL.\n const envAppUrl = getPackageBaseUrl();\n const appUrlSource: 'env' | 'default' =\n envAppUrl !== undefined && normalizeBaseUrl(envAppUrl) === resolved\n ? 'env'\n : 'default';\n\n // checkHealth is optional on ToolClient: clients that cannot probe\n // reachability omit it, in which case diagnostics degrades to\n // { reachable: false }. When present, its contract is to resolve\n // { reachable: false } on failure, but catch here too so a throwing client\n // never breaks diagnostics.\n const health: { reachable: boolean; status?: string } = client.checkHealth\n ? await client.checkHealth().catch(() => ({ reachable: false }))\n : { reachable: false };\n const healthUnavailable = !client.checkHealth;\n\n // Contract drift verdict: compare the client's baked baseline against the\n // live app's /api/health. The probe gets the SAME `resolved` this response\n // prints as appUrl.resolved, never its own resolution: left to itself it\n // reads the local machine (WALKEROS_APP_URL, the CLI config file on disk,\n // then a hardcoded production default), so a hosted door, which has no CLI\n // config, would report a verdict about a backend it is not served by. Two\n // answers in one response must not describe two different backends.\n // `resolved` is already free of a trailing slash (ToolClient.appBaseUrl\n // promises that, and both doors normalize), so no normalizeBaseUrl here.\n // Degrade to 'unknown' if the probe throws so a network blip never breaks\n // diagnostics.\n const contractComparison: ContractComparison = await compareContract({\n baseUrl: resolved,\n }).catch(() => ({\n verdict: 'unknown' as const,\n bakedVersion: CONTRACT_OPENAPI_VERSION,\n }));\n\n const catalogInfo = getLastCatalogSource();\n\n const warnings: string[] = [];\n if (appUrlSource === 'default') {\n warnings.push(\n 'WALKEROS_APP_URL did not set the app URL; appUrl.resolved is the backend the client resolved on its own. On a local MCP, set WALKEROS_APP_URL to target a specific backend.',\n );\n }\n if (healthUnavailable) {\n warnings.push(\n 'health check is unavailable on this client; app reachability is reported as false.',\n );\n } else if (!health.reachable) {\n warnings.push(\n `app /api/health is unreachable at ${resolved}; check the URL, network, and that the app is running.`,\n );\n }\n if (\n contractComparison.verdict === 'client-older' &&\n contractComparison.action\n ) {\n warnings.push(\n `client contract is behind the server: ${contractComparison.action}.`,\n );\n }\n\n const result = {\n mcp: { version: packageVersion },\n cli: { version: CLI_VERSION },\n appUrl: { resolved, source: appUrlSource },\n // app.version is intentionally omitted: the CLI's generated HealthResponse\n // is { status } only, so it is not a typed field here.\n app: {\n reachable: health.reachable,\n ...(health.status !== undefined && { status: health.status }),\n },\n contract: {\n openapiVersion: CONTRACT_OPENAPI_VERSION,\n verdict: contractComparison.verdict,\n ...(contractComparison.action !== undefined && {\n action: contractComparison.action,\n }),\n },\n catalog: catalogInfo\n ? {\n lastSource: catalogInfo.source,\n lastCount: catalogInfo.count,\n partial: catalogInfo.partial,\n }\n : { lastSource: undefined, lastCount: undefined, partial: undefined },\n };\n\n return mcpResult(result, warnings.length > 0 ? { warnings } : undefined);\n}\n\nexport function registerDiagnosticsTool(\n server: McpServer,\n client: ToolClient,\n packageVersion: string,\n) {\n const spec = createDiagnosticsToolSpec(client, packageVersion);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n () => diagnosticsHandlerBody(client, packageVersion),\n );\n}\n","{\n \"openapi\": \"3.1.0\",\n \"info\": {\n \"title\": \"walkerOS Tag Manager API\",\n \"version\": \"4.7.0\",\n \"description\": \"API for managing walkerOS flows, projects, and real-time event observation.\",\n \"contact\": {\n \"name\": \"elbwalker\",\n \"url\": \"https://www.elbwalker.com\"\n }\n },\n \"servers\": [\n {\n \"url\": \"/\",\n \"description\": \"Current server\"\n }\n ],\n \"tags\": [\n {\n \"name\": \"Auth\",\n \"description\": \"Authentication (magic link, session, identity)\"\n },\n {\n \"name\": \"OAuth\",\n \"description\": \"OAuth 2.1 authorization server (client registration, admin clients)\"\n },\n {\n \"name\": \"Projects\",\n \"description\": \"Project management and membership\"\n },\n {\n \"name\": \"Flows\",\n \"description\": \"Flow CRUD (project-scoped)\"\n },\n {\n \"name\": \"Versions\",\n \"description\": \"Flow version history\"\n },\n {\n \"name\": \"Deployments\",\n \"description\": \"Flow deployment management\"\n },\n {\n \"name\": \"Settings\",\n \"description\": \"Per-settings management (named flows within a Config)\"\n },\n {\n \"name\": \"Tokens\",\n \"description\": \"API token management\"\n },\n {\n \"name\": \"Service Accounts\",\n \"description\": \"Project service accounts and their tokens\"\n },\n {\n \"name\": \"Invitations\",\n \"description\": \"Project membership invitations\"\n },\n {\n \"name\": \"Billing\",\n \"description\": \"Project billing details\"\n },\n {\n \"name\": \"Bundle\",\n \"description\": \"Flow bundling utility\"\n },\n {\n \"name\": \"Observe\",\n \"description\": \"Real-time event observation\"\n },\n {\n \"name\": \"Chat\",\n \"description\": \"AI chat sessions and elicitation\"\n },\n {\n \"name\": \"Telemetry\",\n \"description\": \"Anonymous CLI/MCP usage telemetry\"\n },\n {\n \"name\": \"System\",\n \"description\": \"Health and documentation\"\n },\n {\n \"name\": \"Observer\",\n \"description\": \"Observer service (Fastify, port 3001)\"\n },\n {\n \"name\": \"Feedback\",\n \"description\": \"Public feedback submission (CLI, MCP, in-app)\"\n }\n ],\n \"components\": {\n \"schemas\": {\n \"ErrorResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"object\",\n \"properties\": {\n \"code\": {\n \"type\": \"string\",\n \"example\": \"VALIDATION_ERROR\"\n },\n \"message\": {\n \"type\": \"string\",\n \"example\": \"Validation failed\"\n },\n \"details\": {\n \"type\": \"object\",\n \"properties\": {\n \"field\": {\n \"type\": \"string\"\n },\n \"reason\": {\n \"type\": \"string\"\n },\n \"errors\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"path\": {\n \"type\": \"string\"\n },\n \"message\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"path\", \"message\"]\n }\n }\n },\n \"additionalProperties\": {}\n }\n },\n \"required\": [\"code\", \"message\"]\n }\n },\n \"required\": [\"error\"]\n },\n \"ClientOutdatedError\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"object\",\n \"properties\": {\n \"code\": {\n \"type\": \"string\",\n \"enum\": [\"CLIENT_OUTDATED\"]\n },\n \"message\": {\n \"type\": \"string\",\n \"example\": \"This endpoint requires @walkeros/cli >= 3.5.0 (you are on 3.3.1).\"\n },\n \"minVersion\": {\n \"type\": \"string\",\n \"example\": \"3.5.0\"\n },\n \"clientVersion\": {\n \"type\": \"string\",\n \"example\": \"3.3.1\"\n },\n \"client\": {\n \"type\": \"string\",\n \"example\": \"cli\"\n },\n \"upgrade\": {\n \"type\": \"string\",\n \"example\": \"npm install -g @walkeros/cli@latest\"\n },\n \"docs\": {\n \"type\": \"string\",\n \"format\": \"uri\",\n \"example\": \"https://walkeros.io/docs/upgrading\"\n }\n },\n \"required\": [\n \"code\",\n \"message\",\n \"minVersion\",\n \"clientVersion\",\n \"client\",\n \"upgrade\",\n \"docs\"\n ]\n }\n },\n \"required\": [\"error\"]\n },\n \"FlowConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"version\": {\n \"type\": \"number\",\n \"enum\": [4]\n },\n \"$schema\": {\n \"type\": \"string\"\n },\n \"include\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"definitions\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"flows\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"contract\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"required\": [\"version\"],\n \"additionalProperties\": {}\n },\n \"Flow\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"example\": \"my-website-flow\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n },\n \"settings\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FlowSettingsSummary\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"deletedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"config\", \"createdAt\", \"updatedAt\"]\n },\n \"FlowSettingsSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"name\", \"platform\", \"createdAt\", \"updatedAt\"]\n },\n \"FlowSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"example\": \"my-website-flow\"\n },\n \"summary\": {\n \"type\": \"string\"\n },\n \"settings\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FlowSettingsListItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"deletedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"createdAt\", \"updatedAt\", \"deletedAt\"]\n },\n \"FlowSettingsListItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"serving\": {\n \"$ref\": \"#/components/schemas/ServingStatus\"\n },\n \"latestAttempt\": {\n \"$ref\": \"#/components/schemas/LatestAttemptStatus\"\n },\n \"deploymentUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"deployedAt\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"platform\",\n \"serving\",\n \"latestAttempt\",\n \"deploymentUrl\",\n \"deployedAt\"\n ]\n },\n \"ServingStatus\": {\n \"type\": \"string\",\n \"enum\": [\"live\", \"none\"]\n },\n \"LatestAttemptStatus\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\n \"idle\",\n \"deploying\",\n \"published\",\n \"active\",\n \"stopped\",\n \"failed\",\n null\n ]\n },\n \"Version\": {\n \"type\": \"object\",\n \"properties\": {\n \"version\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0,\n \"example\": 1\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\",\n \"enum\": [\"user\", \"auto_save\", \"restore\", \"deploy\", \"preview\"],\n \"example\": \"user\"\n },\n \"contentHash\": {\n \"type\": \"string\",\n \"example\": \"sha256:abc123...\"\n }\n },\n \"required\": [\"version\", \"createdAt\", \"createdBy\"]\n },\n \"Project\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"name\": {\n \"type\": \"string\",\n \"example\": \"My Website\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"owner\", \"admin\", \"member\", \"deployer\", \"viewer\"],\n \"example\": \"owner\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"memberCount\": {\n \"type\": \"integer\",\n \"example\": 3\n },\n \"flowCount\": {\n \"type\": \"integer\",\n \"example\": 5\n },\n \"deploymentCount\": {\n \"type\": \"integer\",\n \"example\": 2\n },\n \"isDemo\": {\n \"type\": \"boolean\",\n \"example\": false\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"role\",\n \"createdAt\",\n \"updatedAt\",\n \"memberCount\",\n \"flowCount\",\n \"deploymentCount\",\n \"isDemo\"\n ]\n },\n \"Member\": {\n \"type\": \"object\",\n \"properties\": {\n \"userId\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"owner\", \"admin\", \"member\", \"deployer\", \"viewer\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"userId\", \"email\", \"role\", \"createdAt\"]\n },\n \"DeleteAccountRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"confirm\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"example\": \"me@example.com\"\n }\n },\n \"required\": [\"confirm\"]\n },\n \"DeleteAccountBlocked\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"object\",\n \"properties\": {\n \"code\": {\n \"type\": \"string\",\n \"enum\": [\"SOLE_OWNER\"],\n \"example\": \"SOLE_OWNER\"\n },\n \"message\": {\n \"type\": \"string\"\n },\n \"details\": {\n \"type\": \"object\",\n \"properties\": {\n \"projects\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"example\": [\"proj_abc123\"]\n }\n },\n \"required\": [\"projects\"]\n }\n },\n \"required\": [\"code\", \"message\", \"details\"]\n }\n },\n \"required\": [\"error\"]\n },\n \"AccountExportResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"exportedAt\": {\n \"type\": \"string\",\n \"example\": \"2026-06-10T12:00:00.000Z\"\n },\n \"profile\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3d4\"\n },\n \"email\": {\n \"type\": \"string\",\n \"example\": \"me@example.com\"\n },\n \"displayName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\"\n },\n \"lastLoginAt\": {\n \"type\": [\"string\", \"null\"]\n },\n \"globalRole\": {\n \"type\": \"string\",\n \"example\": \"user\"\n },\n \"traits\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"email\",\n \"displayName\",\n \"createdAt\",\n \"lastLoginAt\",\n \"globalRole\",\n \"traits\"\n ]\n },\n \"memberships\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"projectId\": {\n \"type\": \"string\"\n },\n \"projectName\": {\n \"type\": \"string\"\n },\n \"role\": {\n \"type\": \"string\"\n },\n \"joinedAt\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"projectId\", \"projectName\", \"role\", \"joinedAt\"]\n }\n },\n \"tokens\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"example\": \"automation\"\n },\n \"scope\": {\n \"type\": \"string\",\n \"example\": \"read write\"\n },\n \"audience\": {\n \"type\": \"string\",\n \"example\": \"api mcp\"\n },\n \"projectId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\"\n },\n \"lastUsedAt\": {\n \"type\": [\"string\", \"null\"]\n },\n \"expiresAt\": {\n \"type\": \"string\"\n },\n \"revokedAt\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"kind\",\n \"scope\",\n \"audience\",\n \"projectId\",\n \"createdAt\",\n \"lastUsedAt\",\n \"expiresAt\",\n \"revokedAt\"\n ]\n }\n },\n \"sessions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\"\n },\n \"expiresAt\": {\n \"type\": \"string\"\n },\n \"lastTouchedAt\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"createdAt\", \"expiresAt\", \"lastTouchedAt\"]\n }\n },\n \"mcpSessions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"projectId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\"\n },\n \"lastActiveAt\": {\n \"type\": \"string\"\n },\n \"expiresAt\": {\n \"type\": \"string\"\n },\n \"messages\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"seq\": {\n \"type\": \"number\"\n },\n \"role\": {\n \"type\": \"string\"\n },\n \"content\": {},\n \"createdAt\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"seq\", \"role\", \"createdAt\"]\n }\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"createdAt\",\n \"lastActiveAt\",\n \"expiresAt\",\n \"messages\"\n ]\n }\n },\n \"feedback\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"projectId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"projectId\", \"text\", \"source\", \"createdAt\"]\n }\n },\n \"invitations\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"invitedEmail\": {\n \"type\": \"string\"\n },\n \"role\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\"\n },\n \"expiresAt\": {\n \"type\": \"string\"\n },\n \"acceptedAt\": {\n \"type\": [\"string\", \"null\"]\n },\n \"declinedAt\": {\n \"type\": [\"string\", \"null\"]\n },\n \"cancelledAt\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"invitedEmail\",\n \"role\",\n \"status\",\n \"createdAt\",\n \"expiresAt\",\n \"acceptedAt\",\n \"declinedAt\",\n \"cancelledAt\"\n ]\n }\n }\n },\n \"required\": [\n \"exportedAt\",\n \"profile\",\n \"memberships\",\n \"tokens\",\n \"sessions\",\n \"mcpSessions\",\n \"feedback\",\n \"invitations\"\n ]\n },\n \"AutomationTokenSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"example\": \"tok_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\",\n \"example\": \"CI Pipeline\"\n },\n \"tokenPrefix\": {\n \"type\": \"string\",\n \"example\": \"wos_pat_a1b2\"\n },\n \"scope\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"example\": [\"read\", \"write\"]\n },\n \"audience\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"example\": [\"api\", \"mcp\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"lastUsedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"expiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"revokedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"tokenPrefix\",\n \"scope\",\n \"audience\",\n \"createdAt\",\n \"lastUsedAt\",\n \"expiresAt\",\n \"revokedAt\"\n ]\n },\n \"FlowSettingsDetail\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"config\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"deployment\": {\n \"type\": [\"object\", \"null\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"containerUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publicUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"status\", \"type\", \"createdAt\", \"updatedAt\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"platform\",\n \"config\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"DeploySettingsRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"flow\": {\n \"type\": \"string\"\n },\n \"humanText\": {\n \"type\": \"string\",\n \"maxLength\": 4000\n }\n }\n },\n \"DeploySettingsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"deploymentId\": {\n \"type\": \"string\"\n },\n \"settingsId\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"status\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"deploymentId\", \"settingsId\", \"status\"]\n },\n \"FlowDetailResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"example\": \"my-website-flow\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n },\n \"settings\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FlowSettingsEnriched\"\n }\n },\n \"bundleId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"deletedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"config\",\n \"createdAt\",\n \"updatedAt\",\n \"deletedAt\"\n ]\n },\n \"FlowSettingsEnriched\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"]\n },\n \"deployment\": {\n \"type\": [\"object\", \"null\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"slug\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"containerUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"id\",\n \"slug\",\n \"status\",\n \"type\",\n \"target\",\n \"containerUrl\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"serving\": {\n \"$ref\": \"#/components/schemas/ServingStatus\"\n },\n \"latestAttempt\": {\n \"$ref\": \"#/components/schemas/LatestAttemptStatus\"\n },\n \"deployedAt\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"platform\",\n \"deployment\",\n \"serving\",\n \"latestAttempt\",\n \"deployedAt\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"FlowUpdateResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"example\": \"my-website-flow\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"name\", \"config\", \"createdAt\", \"updatedAt\"]\n },\n \"CreateProjectResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"name\", \"createdAt\"]\n },\n \"UpdateProjectResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"name\", \"updatedAt\"]\n },\n \"DeploymentSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"slug\": {\n \"type\": \"string\",\n \"pattern\": \"^[a-z0-9]{12}$\",\n \"example\": \"k7m2x9p4q1w8\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"label\": {\n \"type\": [\"string\", \"null\"]\n },\n \"origin\": {\n \"type\": \"string\",\n \"enum\": [\"cloud\", \"self-hosted\"],\n \"example\": \"cloud\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"idle\",\n \"deploying\",\n \"published\",\n \"active\",\n \"stopped\",\n \"failed\"\n ],\n \"example\": \"active\"\n },\n \"serving\": {\n \"$ref\": \"#/components/schemas/ServingStatus\"\n },\n \"currentVersionNumber\": {\n \"type\": [\"integer\", \"null\"],\n \"exclusiveMinimum\": 0\n },\n \"url\": {\n \"type\": [\"string\", \"null\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"],\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"flowName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"usageSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"eventsIn24h\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"healthy\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"eventsIn24h\", \"healthy\"]\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"slug\",\n \"target\",\n \"label\",\n \"origin\",\n \"status\",\n \"serving\",\n \"currentVersionNumber\",\n \"url\",\n \"flowId\",\n \"flowName\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"DeploymentDetailResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"slug\": {\n \"type\": \"string\",\n \"pattern\": \"^[a-z0-9]{12}$\",\n \"example\": \"k7m2x9p4q1w8\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"label\": {\n \"type\": [\"string\", \"null\"]\n },\n \"origin\": {\n \"type\": \"string\",\n \"enum\": [\"cloud\", \"self-hosted\"],\n \"example\": \"cloud\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"idle\",\n \"deploying\",\n \"published\",\n \"active\",\n \"stopped\",\n \"failed\"\n ],\n \"example\": \"active\"\n },\n \"currentVersion\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/DeploymentVersionDetail\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"versions\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/DeploymentVersionHistoryEntry\"\n }\n },\n \"error\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/DeploymentError\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"recentErrors\": {\n \"type\": [\"array\", \"null\"],\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"message\": {\n \"type\": \"string\"\n },\n \"count\": {\n \"type\": \"integer\"\n },\n \"firstSeen\": {\n \"type\": \"string\"\n },\n \"lastSeen\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"message\", \"count\", \"firstSeen\", \"lastSeen\"]\n }\n },\n \"recentLogs\": {\n \"type\": [\"array\", \"null\"],\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"time\": {\n \"type\": \"string\"\n },\n \"level\": {\n \"type\": \"string\"\n },\n \"message\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"time\", \"level\", \"message\"]\n }\n },\n \"url\": {\n \"type\": [\"string\", \"null\"]\n },\n \"selfHosted\": {\n \"type\": [\"object\", \"null\"],\n \"properties\": {\n \"lastHeartbeatAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"instanceId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"cliVersion\": {\n \"type\": [\"string\", \"null\"]\n },\n \"healthy\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"lastHeartbeatAt\",\n \"instanceId\",\n \"cliVersion\",\n \"healthy\"\n ]\n },\n \"lastHeartbeatAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"slug\",\n \"target\",\n \"label\",\n \"origin\",\n \"status\",\n \"currentVersion\",\n \"versions\",\n \"error\",\n \"url\",\n \"selfHosted\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"DeploymentVersionDetail\": {\n \"type\": \"object\",\n \"properties\": {\n \"number\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"flowSettingsId\": {\n \"type\": \"string\"\n },\n \"configHash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorCode\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publishedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"publishedBy\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"number\",\n \"status\",\n \"source\",\n \"errorMessage\",\n \"errorCode\",\n \"publishedAt\",\n \"publishedBy\"\n ]\n },\n \"DeploymentVersionHistoryEntry\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"errorCode\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorPhase\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorDetail\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publishedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"versionNumber\",\n \"status\",\n \"source\",\n \"errorCode\",\n \"errorMessage\",\n \"errorPhase\",\n \"publishedAt\"\n ]\n },\n \"DeploymentError\": {\n \"type\": \"object\",\n \"properties\": {\n \"code\": {\n \"type\": \"string\"\n },\n \"message\": {\n \"type\": \"string\"\n },\n \"phase\": {\n \"type\": \"string\",\n \"enum\": [\"preflight\", \"deploy\", \"bundle\", \"publish\", \"provision\"],\n \"example\": \"bundle\"\n },\n \"detail\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"code\", \"message\", \"phase\"]\n },\n \"CreateDeploymentResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"slug\": {\n \"type\": \"string\",\n \"pattern\": \"^[a-z0-9]{12}$\",\n \"example\": \"k7m2x9p4q1w8\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"label\": {\n \"type\": [\"string\", \"null\"]\n },\n \"origin\": {\n \"type\": \"string\",\n \"enum\": [\"cloud\", \"self-hosted\"],\n \"example\": \"cloud\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"idle\",\n \"deploying\",\n \"published\",\n \"active\",\n \"stopped\",\n \"failed\"\n ],\n \"example\": \"active\"\n },\n \"serving\": {\n \"$ref\": \"#/components/schemas/ServingStatus\"\n },\n \"currentVersionNumber\": {\n \"type\": [\"integer\", \"null\"],\n \"exclusiveMinimum\": 0\n },\n \"url\": {\n \"type\": [\"string\", \"null\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"],\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"flowName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"usageSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"eventsIn24h\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"healthy\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"eventsIn24h\", \"healthy\"]\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"slug\",\n \"target\",\n \"label\",\n \"origin\",\n \"status\",\n \"serving\",\n \"currentVersionNumber\",\n \"url\",\n \"flowId\",\n \"flowName\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"StartDeploymentResponse\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"deploymentId\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"slug\": {\n \"type\": \"string\",\n \"pattern\": \"^[a-z0-9]{12}$\",\n \"example\": \"k7m2x9p4q1w8\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"deploying\"]\n },\n \"settingsId\": {\n \"type\": \"string\"\n },\n \"versionId\": {\n \"type\": \"string\"\n },\n \"versionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n }\n },\n \"required\": [\n \"deploymentId\",\n \"slug\",\n \"target\",\n \"type\",\n \"status\",\n \"versionId\",\n \"versionNumber\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"deploymentId\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"already_created\"]\n }\n },\n \"required\": [\"deploymentId\", \"status\"]\n }\n ]\n },\n \"DeploymentStreamStatusEvent\": {\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\"\n },\n \"substatus\": {\n \"type\": [\"string\", \"null\"]\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"containerUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorCode\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"status\",\n \"substatus\",\n \"type\",\n \"target\",\n \"containerUrl\",\n \"errorCode\",\n \"errorMessage\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"ListDeploymentsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"deployments\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/DeploymentSummary\"\n }\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"limit\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"offset\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"nextCursor\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\"deployments\", \"total\", \"limit\", \"offset\", \"nextCursor\"]\n },\n \"UpdateDeploymentResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"slug\": {\n \"type\": \"string\",\n \"pattern\": \"^[a-z0-9]{12}$\",\n \"example\": \"k7m2x9p4q1w8\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"label\": {\n \"type\": [\"string\", \"null\"]\n },\n \"origin\": {\n \"type\": \"string\",\n \"enum\": [\"cloud\", \"self-hosted\"],\n \"example\": \"cloud\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"idle\",\n \"deploying\",\n \"published\",\n \"active\",\n \"stopped\",\n \"failed\"\n ],\n \"example\": \"active\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"slug\",\n \"target\",\n \"label\",\n \"origin\",\n \"status\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"LatestDeploymentsByFlow\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"slug\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"target\": {\n \"type\": [\"string\", \"null\"]\n },\n \"containerUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"flowId\",\n \"slug\",\n \"type\",\n \"status\",\n \"target\",\n \"containerUrl\",\n \"createdAt\"\n ]\n }\n },\n \"PublishVersionResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"versionId\": {\n \"type\": \"string\"\n },\n \"deploymentId\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"deploying\"]\n },\n \"source\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"flow\"]\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"flowSettingsName\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\", \"flowId\", \"flowSettingsName\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"config\"]\n }\n },\n \"required\": [\"type\"]\n }\n ]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"versionNumber\",\n \"versionId\",\n \"deploymentId\",\n \"status\",\n \"source\",\n \"createdAt\"\n ]\n },\n \"ListDeploymentVersionsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"versions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"number\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"flowSettingsId\": {\n \"type\": \"string\"\n },\n \"configHash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorCode\": {\n \"type\": [\"string\", \"null\"]\n },\n \"bundlePath\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publishedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"publishedBy\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"number\",\n \"status\",\n \"source\",\n \"errorMessage\",\n \"errorCode\",\n \"bundlePath\",\n \"publishedAt\",\n \"publishedBy\"\n ]\n }\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"limit\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"offset\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"versions\", \"total\", \"limit\", \"offset\"]\n },\n \"ListFlowReleasesResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"releases\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FlowRelease\"\n }\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"limit\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"offset\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"releases\", \"total\", \"limit\", \"offset\"]\n },\n \"FlowRelease\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"deploymentId\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"deploymentSlug\": {\n \"type\": [\"string\", \"null\"],\n \"pattern\": \"^[a-z0-9]{12}$\",\n \"example\": \"k7m2x9p4q1w8\"\n },\n \"deploymentType\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"web\", \"server\", null],\n \"example\": \"web\"\n },\n \"versionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"flowVersionId\": {\n \"type\": [\"string\", \"null\"],\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"flowVersionNumber\": {\n \"type\": [\"integer\", \"null\"],\n \"exclusiveMinimum\": 0\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"errorCode\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"createdBy\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdByLabel\": {\n \"type\": [\"string\", \"null\"]\n },\n \"rationale\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ReleaseRationaleSummary\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"required\": [\n \"id\",\n \"deploymentId\",\n \"deploymentSlug\",\n \"deploymentType\",\n \"versionNumber\",\n \"flowVersionId\",\n \"flowVersionNumber\",\n \"status\",\n \"source\",\n \"errorCode\",\n \"createdAt\",\n \"createdBy\",\n \"createdByLabel\"\n ]\n },\n \"ReleaseRationaleSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"hasHumanText\": {\n \"type\": \"boolean\"\n },\n \"hasGeneratedSummary\": {\n \"type\": \"boolean\"\n },\n \"firstLine\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\"hasHumanText\", \"hasGeneratedSummary\", \"firstLine\"]\n },\n \"ReleaseContentResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"versionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0,\n \"example\": 22\n },\n \"content\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\",\n \"enum\": [\"user\", \"auto_save\", \"restore\", \"deploy\", \"preview\"]\n }\n },\n \"required\": [\n \"versionId\",\n \"versionNumber\",\n \"content\",\n \"createdAt\",\n \"createdBy\"\n ]\n },\n \"ReleaseDiff\": {\n \"type\": \"object\",\n \"properties\": {\n \"prevVersionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"prevVersionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"contentIdentical\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"prevVersionId\",\n \"prevVersionNumber\",\n \"text\",\n \"contentIdentical\"\n ]\n },\n \"ReleaseDetailResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"versionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"contentHash\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"rationale\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/VersionAnnotation\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"diff\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ReleaseDiff\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"required\": [\n \"versionId\",\n \"versionNumber\",\n \"contentHash\",\n \"createdAt\",\n \"createdBy\",\n \"rationale\",\n \"diff\"\n ]\n },\n \"VersionAnnotation\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"humanText\": {\n \"type\": [\"string\", \"null\"]\n },\n \"generatedSummary\": {\n \"type\": [\"string\", \"null\"]\n },\n \"author\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3d4\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"versionId\",\n \"humanText\",\n \"generatedSummary\",\n \"author\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"ListVersionAnnotationsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"annotations\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/VersionAnnotation\"\n }\n }\n },\n \"required\": [\"annotations\"]\n },\n \"UpsertVersionAnnotationResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"humanText\": {\n \"type\": [\"string\", \"null\"]\n },\n \"generatedSummary\": {\n \"type\": [\"string\", \"null\"]\n },\n \"author\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3d4\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"versionId\",\n \"humanText\",\n \"generatedSummary\",\n \"author\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"ListHubThreadsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"threads\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/HubThread\"\n }\n },\n \"hasMoreThreads\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"threads\", \"hasMoreThreads\"]\n },\n \"HubThread\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^thr_[a-z0-9]+$\",\n \"example\": \"thr_a1b2c3d4\"\n },\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\"step\", \"entity_action\", \"release\", \"contract\", \"tag\"],\n \"example\": \"release\"\n },\n \"anchorKey\": {\n \"type\": \"string\"\n },\n \"anchorLabel\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"open\", \"resolved\"],\n \"example\": \"open\"\n },\n \"resolvedByVersionId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"resolvedByVersionNumber\": {\n \"type\": [\"integer\", \"null\"]\n },\n \"resolvedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"resolvedBy\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"messageCount\": {\n \"type\": \"integer\"\n },\n \"messages\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/HubMessage\"\n }\n },\n \"hasMoreMessages\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"id\",\n \"anchorType\",\n \"anchorKey\",\n \"anchorLabel\",\n \"status\",\n \"resolvedByVersionId\",\n \"resolvedByVersionNumber\",\n \"resolvedAt\",\n \"resolvedBy\",\n \"createdBy\",\n \"createdAt\",\n \"updatedAt\",\n \"messageCount\"\n ]\n },\n \"HubMessage\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"author\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3d4\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"author\", \"text\", \"createdAt\"]\n },\n \"HubThreadResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^thr_[a-z0-9]+$\",\n \"example\": \"thr_a1b2c3d4\"\n },\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\"step\", \"entity_action\", \"release\", \"contract\", \"tag\"],\n \"example\": \"release\"\n },\n \"anchorKey\": {\n \"type\": \"string\"\n },\n \"anchorLabel\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"open\", \"resolved\"],\n \"example\": \"open\"\n },\n \"resolvedByVersionId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"resolvedByVersionNumber\": {\n \"type\": [\"integer\", \"null\"]\n },\n \"resolvedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"resolvedBy\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"messageCount\": {\n \"type\": \"integer\"\n },\n \"messages\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/HubMessage\"\n }\n },\n \"hasMoreMessages\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"id\",\n \"anchorType\",\n \"anchorKey\",\n \"anchorLabel\",\n \"status\",\n \"resolvedByVersionId\",\n \"resolvedByVersionNumber\",\n \"resolvedAt\",\n \"resolvedBy\",\n \"createdBy\",\n \"createdAt\",\n \"updatedAt\",\n \"messageCount\"\n ]\n },\n \"ListKnowledgeResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"entries\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/KnowledgeEntry\"\n }\n },\n \"hasMoreEntries\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"entries\", \"hasMoreEntries\"]\n },\n \"KnowledgeEntry\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/components/schemas/KnowledgeThread\"\n },\n {\n \"$ref\": \"#/components/schemas/KnowledgeDescription\"\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"kind\",\n \"mapping\": {\n \"thread\": \"#/components/schemas/KnowledgeThread\",\n \"description\": \"#/components/schemas/KnowledgeDescription\"\n }\n }\n },\n \"KnowledgeThread\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"anchorKey\": {\n \"type\": \"string\"\n },\n \"anchorLabel\": {\n \"type\": \"string\"\n },\n \"frameId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"frameName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"subjectKey\": {\n \"type\": [\"string\", \"null\"]\n },\n \"spatial\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KnowledgeSpatial\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"validity\": {\n \"$ref\": \"#/components/schemas/KnowledgeValidity\"\n },\n \"freshness\": {\n \"type\": \"string\",\n \"enum\": [\"current\", \"subject_changed\", \"unknown\"]\n },\n \"author\": {\n \"$ref\": \"#/components/schemas/KnowledgeAuthor\"\n },\n \"source\": {\n \"type\": \"string\",\n \"enum\": [\"tag_mode\", \"hub\", \"mcp\"]\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"thread\"]\n },\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\n \"step\",\n \"entity_action\",\n \"release\",\n \"contract\",\n \"tag\",\n \"page\"\n ],\n \"example\": \"tag\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"open\", \"resolved\"],\n \"example\": \"open\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"messageCount\": {\n \"type\": \"integer\"\n },\n \"messages\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/KnowledgeMessage\"\n }\n },\n \"hasMoreMessages\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"id\",\n \"anchorKey\",\n \"anchorLabel\",\n \"frameId\",\n \"frameName\",\n \"flowId\",\n \"subjectKey\",\n \"spatial\",\n \"validity\",\n \"freshness\",\n \"author\",\n \"source\",\n \"updatedAt\",\n \"kind\",\n \"anchorType\",\n \"status\",\n \"createdAt\",\n \"messageCount\"\n ]\n },\n \"KnowledgeSpatial\": {\n \"type\": \"object\",\n \"properties\": {\n \"at\": {\n \"type\": \"object\",\n \"properties\": {\n \"x\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"y\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1\n }\n },\n \"required\": [\"x\", \"y\"]\n },\n \"element\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"required\": [\"at\"]\n },\n \"KnowledgeValidity\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"tier\": {\n \"type\": \"string\",\n \"enum\": [\"release\"]\n },\n \"versionId\": {\n \"type\": \"string\"\n },\n \"versionNumber\": {\n \"type\": \"integer\"\n },\n \"promoted\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"tier\", \"versionId\", \"versionNumber\", \"promoted\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"tier\": {\n \"type\": \"string\",\n \"enum\": [\"draft\"]\n },\n \"versionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"tier\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"tier\": {\n \"type\": \"string\",\n \"enum\": [\"none\"]\n }\n },\n \"required\": [\"tier\"]\n }\n ]\n },\n \"KnowledgeAuthor\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"user\", \"preview\", \"agent\"]\n },\n \"id\": {\n \"type\": [\"string\", \"null\"]\n },\n \"label\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"kind\", \"id\", \"label\"]\n },\n \"KnowledgeMessage\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"author\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3d4\"\n },\n \"authorLabel\": {\n \"type\": \"string\",\n \"example\": \"ayla@elbwalker.com\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"clientMessageId\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"id\",\n \"author\",\n \"authorLabel\",\n \"text\",\n \"createdAt\",\n \"clientMessageId\"\n ]\n },\n \"KnowledgeDescription\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"anchorKey\": {\n \"type\": \"string\"\n },\n \"anchorLabel\": {\n \"type\": \"string\"\n },\n \"frameId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"frameName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"subjectKey\": {\n \"type\": [\"string\", \"null\"]\n },\n \"spatial\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KnowledgeSpatial\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"validity\": {\n \"$ref\": \"#/components/schemas/KnowledgeValidity\"\n },\n \"freshness\": {\n \"type\": \"string\",\n \"enum\": [\"current\", \"subject_changed\", \"unknown\"]\n },\n \"author\": {\n \"$ref\": \"#/components/schemas/KnowledgeAuthor\"\n },\n \"source\": {\n \"type\": \"string\",\n \"enum\": [\"tag_mode\", \"hub\", \"mcp\"]\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"description\"]\n },\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\"tag\", \"page\"],\n \"example\": \"tag\"\n },\n \"body\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"anchorKey\",\n \"anchorLabel\",\n \"frameId\",\n \"frameName\",\n \"flowId\",\n \"subjectKey\",\n \"spatial\",\n \"validity\",\n \"freshness\",\n \"author\",\n \"source\",\n \"updatedAt\",\n \"kind\",\n \"anchorType\",\n \"body\"\n ]\n },\n \"KnowledgeThreadResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"anchorKey\": {\n \"type\": \"string\"\n },\n \"anchorLabel\": {\n \"type\": \"string\"\n },\n \"frameId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"frameName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"subjectKey\": {\n \"type\": [\"string\", \"null\"]\n },\n \"spatial\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KnowledgeSpatial\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"validity\": {\n \"$ref\": \"#/components/schemas/KnowledgeValidity\"\n },\n \"freshness\": {\n \"type\": \"string\",\n \"enum\": [\"current\", \"subject_changed\", \"unknown\"]\n },\n \"author\": {\n \"$ref\": \"#/components/schemas/KnowledgeAuthor\"\n },\n \"source\": {\n \"type\": \"string\",\n \"enum\": [\"tag_mode\", \"hub\", \"mcp\"]\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"thread\"]\n },\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\n \"step\",\n \"entity_action\",\n \"release\",\n \"contract\",\n \"tag\",\n \"page\"\n ],\n \"example\": \"tag\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"open\", \"resolved\"],\n \"example\": \"open\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"messageCount\": {\n \"type\": \"integer\"\n },\n \"messages\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/KnowledgeMessage\"\n }\n },\n \"hasMoreMessages\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"id\",\n \"anchorKey\",\n \"anchorLabel\",\n \"frameId\",\n \"frameName\",\n \"flowId\",\n \"subjectKey\",\n \"spatial\",\n \"validity\",\n \"freshness\",\n \"author\",\n \"source\",\n \"updatedAt\",\n \"kind\",\n \"anchorType\",\n \"status\",\n \"createdAt\",\n \"messageCount\"\n ]\n },\n \"KnowledgeDescriptionResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"anchorKey\": {\n \"type\": \"string\"\n },\n \"anchorLabel\": {\n \"type\": \"string\"\n },\n \"frameId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"frameName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"subjectKey\": {\n \"type\": [\"string\", \"null\"]\n },\n \"spatial\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KnowledgeSpatial\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"validity\": {\n \"$ref\": \"#/components/schemas/KnowledgeValidity\"\n },\n \"freshness\": {\n \"type\": \"string\",\n \"enum\": [\"current\", \"subject_changed\", \"unknown\"]\n },\n \"author\": {\n \"$ref\": \"#/components/schemas/KnowledgeAuthor\"\n },\n \"source\": {\n \"type\": \"string\",\n \"enum\": [\"tag_mode\", \"hub\", \"mcp\"]\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"description\"]\n },\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\"tag\", \"page\"],\n \"example\": \"tag\"\n },\n \"body\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"anchorKey\",\n \"anchorLabel\",\n \"frameId\",\n \"frameName\",\n \"flowId\",\n \"subjectKey\",\n \"spatial\",\n \"validity\",\n \"freshness\",\n \"author\",\n \"source\",\n \"updatedAt\",\n \"kind\",\n \"anchorType\",\n \"body\"\n ]\n },\n \"FrameInput\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"parentId\": {\n \"type\": [\"string\", \"null\"],\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"example\": \"frm_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"placements\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FramePlacement\"\n },\n \"minItems\": 1\n },\n \"size\": {\n \"$ref\": \"#/components/schemas/PlanSize\"\n },\n \"marks\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"extends\": {\n \"type\": [\"string\", \"null\"],\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"example\": \"frm_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"source\": {\n \"$ref\": \"#/components/schemas/FrameSource\"\n },\n \"origin\": {\n \"type\": \"string\",\n \"enum\": [\"drawn\", \"imported\", \"observed\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"],\n \"minLength\": 1,\n \"maxLength\": 255\n }\n },\n \"required\": [\n \"name\",\n \"parentId\",\n \"placements\",\n \"size\",\n \"marks\",\n \"extends\",\n \"source\",\n \"origin\",\n \"flowId\"\n ]\n },\n \"FramePlacement\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^pl_[A-Za-z0-9_-]{21}$\"\n },\n \"rect\": {\n \"$ref\": \"#/components/schemas/PlanRect\"\n },\n \"selector\": {\n \"type\": \"string\",\n \"maxLength\": 2048\n },\n \"anchor\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"required\": [\"id\", \"rect\"]\n },\n \"PlanRect\": {\n \"type\": \"object\",\n \"properties\": {\n \"x\": {\n \"type\": \"number\"\n },\n \"y\": {\n \"type\": \"number\"\n },\n \"w\": {\n \"type\": \"number\"\n },\n \"h\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"x\", \"y\", \"w\", \"h\"]\n },\n \"PlanSize\": {\n \"type\": \"object\",\n \"properties\": {\n \"width\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n },\n \"height\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n }\n },\n \"required\": [\"width\", \"height\"]\n },\n \"FrameSource\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"page\"]\n },\n \"key\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024\n },\n \"url\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 2048\n }\n },\n \"required\": [\"kind\", \"key\", \"url\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"figma\"]\n },\n \"fileKey\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"nodeId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n }\n },\n \"required\": [\"kind\", \"fileKey\", \"nodeId\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"image\"]\n }\n },\n \"required\": [\"kind\"]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"Frame\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"example\": \"frm_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"parentId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"placements\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FramePlacement\"\n }\n },\n \"size\": {\n \"$ref\": \"#/components/schemas/PlanSize\"\n },\n \"marks\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"extends\": {\n \"type\": [\"string\", \"null\"]\n },\n \"source\": {\n \"$ref\": \"#/components/schemas/FrameSource\"\n },\n \"origin\": {\n \"type\": \"string\",\n \"enum\": [\"drawn\", \"imported\", \"observed\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"screenshot\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/FrameScreenshot\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"version\": {\n \"type\": \"integer\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"updatedBy\": {\n \"type\": \"string\"\n },\n \"deletedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"name\",\n \"parentId\",\n \"placements\",\n \"size\",\n \"marks\",\n \"extends\",\n \"source\",\n \"origin\",\n \"flowId\",\n \"screenshot\",\n \"version\",\n \"createdAt\",\n \"updatedAt\",\n \"createdBy\",\n \"updatedBy\",\n \"deletedAt\"\n ]\n },\n \"FrameScreenshot\": {\n \"type\": \"object\",\n \"properties\": {\n \"assetId\": {\n \"type\": \"string\"\n },\n \"capturedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"size\": {\n \"$ref\": \"#/components/schemas/PlanSize\"\n },\n \"dpr\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n },\n \"capturedRect\": {\n \"$ref\": \"#/components/schemas/PlanRect\"\n }\n },\n \"required\": [\"assetId\", \"capturedAt\", \"size\", \"dpr\", \"capturedRect\"]\n },\n \"FrameLean\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"example\": \"frm_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"parentId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"placements\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FramePlacement\"\n }\n },\n \"size\": {\n \"$ref\": \"#/components/schemas/PlanSize\"\n },\n \"extends\": {\n \"type\": [\"string\", \"null\"]\n },\n \"source\": {\n \"$ref\": \"#/components/schemas/FrameSource\"\n },\n \"origin\": {\n \"type\": \"string\",\n \"enum\": [\"drawn\", \"imported\", \"observed\"]\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"screenshot\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/FrameScreenshot\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"version\": {\n \"type\": \"integer\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"updatedBy\": {\n \"type\": \"string\"\n },\n \"deletedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"name\",\n \"parentId\",\n \"placements\",\n \"size\",\n \"extends\",\n \"source\",\n \"origin\",\n \"flowId\",\n \"screenshot\",\n \"version\",\n \"createdAt\",\n \"updatedAt\",\n \"createdBy\",\n \"updatedBy\",\n \"deletedAt\"\n ]\n },\n \"FrameListResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"frames\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Frame\"\n }\n }\n },\n \"required\": [\"frames\"]\n },\n \"FrameLeanListResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"frames\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FrameLean\"\n }\n }\n },\n \"required\": [\"frames\"]\n },\n \"PutFrameResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"version\": {\n \"type\": \"integer\"\n }\n },\n \"required\": [\"version\"]\n },\n \"FrameConflictResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"object\",\n \"properties\": {\n \"code\": {\n \"type\": \"string\",\n \"enum\": [\"FRAME_VERSION_CONFLICT\"]\n },\n \"message\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"code\", \"message\"]\n },\n \"head\": {\n \"$ref\": \"#/components/schemas/Frame\"\n }\n },\n \"required\": [\"error\", \"head\"]\n },\n \"CanvasDocument\": {\n \"type\": \"object\",\n \"properties\": {\n \"v\": {\n \"type\": \"number\",\n \"enum\": [1]\n },\n \"nodes\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/CanvasNodeEntry\"\n },\n \"maxItems\": 2000\n },\n \"edges\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/CanvasEdgeEntry\"\n },\n \"maxItems\": 4000\n },\n \"hidden\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"maxLength\": 200\n },\n \"maxItems\": 4000\n }\n },\n \"required\": [\"v\", \"nodes\", \"edges\", \"hidden\"]\n },\n \"CanvasNodeEntry\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"pattern\": \"^[a-z][a-z0-9-]{0,31}$\"\n },\n \"ref\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128\n },\n \"position\": {\n \"$ref\": \"#/components/schemas/CanvasPoint\"\n },\n \"parent\": {\n \"type\": \"string\",\n \"maxLength\": 200\n },\n \"size\": {\n \"type\": \"object\",\n \"properties\": {\n \"width\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n },\n \"height\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n }\n },\n \"required\": [\"width\", \"height\"]\n },\n \"label\": {\n \"type\": \"string\",\n \"maxLength\": 255\n }\n },\n \"required\": [\"kind\", \"ref\", \"position\"]\n },\n \"CanvasPoint\": {\n \"type\": \"object\",\n \"properties\": {\n \"x\": {\n \"type\": \"number\"\n },\n \"y\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"x\", \"y\"]\n },\n \"CanvasEdgeEntry\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^edg_[A-Za-z0-9_-]{21}$\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"navigation\"]\n },\n \"from\": {\n \"type\": \"string\",\n \"maxLength\": 200\n },\n \"to\": {\n \"type\": \"string\",\n \"maxLength\": 200\n },\n \"label\": {\n \"type\": \"string\",\n \"maxLength\": 255\n }\n },\n \"required\": [\"id\", \"kind\", \"from\", \"to\"]\n },\n \"Canvas\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^cnv_[A-Za-z0-9_-]{21}$\",\n \"example\": \"cnv_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"document\": {\n \"$ref\": \"#/components/schemas/CanvasDocument\"\n },\n \"version\": {\n \"type\": \"integer\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"updatedBy\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"name\",\n \"document\",\n \"version\",\n \"createdAt\",\n \"updatedAt\",\n \"createdBy\",\n \"updatedBy\"\n ]\n },\n \"CanvasLean\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^cnv_[A-Za-z0-9_-]{21}$\",\n \"example\": \"cnv_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"version\": {\n \"type\": \"integer\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"updatedBy\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"name\",\n \"version\",\n \"createdAt\",\n \"updatedAt\",\n \"createdBy\",\n \"updatedBy\"\n ]\n },\n \"CanvasListResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"canvases\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/CanvasLean\"\n }\n }\n },\n \"required\": [\"canvases\"]\n },\n \"PutCanvasResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"version\": {\n \"type\": \"integer\"\n }\n },\n \"required\": [\"version\"]\n },\n \"CanvasConflictResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"object\",\n \"properties\": {\n \"code\": {\n \"type\": \"string\",\n \"enum\": [\"CANVAS_VERSION_CONFLICT\"]\n },\n \"message\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"code\", \"message\"]\n },\n \"head\": {\n \"$ref\": \"#/components/schemas/Canvas\"\n }\n },\n \"required\": [\"error\", \"head\"]\n },\n \"SummarizeReleaseResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\"draft\", \"check\"]\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"cached\": {\n \"type\": \"boolean\"\n },\n \"modelId\": {\n \"type\": \"string\",\n \"example\": \"mistral/platform/mistral-large-2512\"\n },\n \"versionNumber\": {\n \"type\": \"integer\"\n },\n \"prevVersionNumber\": {\n \"type\": \"integer\"\n }\n },\n \"required\": [\n \"mode\",\n \"text\",\n \"cached\",\n \"modelId\",\n \"versionNumber\",\n \"prevVersionNumber\"\n ]\n },\n \"StepHistoryResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"step\": {\n \"type\": \"string\"\n },\n \"flow\": {\n \"type\": [\"string\", \"null\"]\n },\n \"entries\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/StepHistoryEntry\"\n }\n },\n \"scanned\": {\n \"type\": \"integer\"\n },\n \"truncated\": {\n \"type\": \"boolean\"\n },\n \"entriesTruncated\": {\n \"type\": \"boolean\"\n },\n \"knownSteps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"step\",\n \"flow\",\n \"entries\",\n \"scanned\",\n \"truncated\",\n \"entriesTruncated\"\n ]\n },\n \"StepHistoryEntry\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"versionNumber\": {\n \"type\": \"integer\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"flow\": {\n \"type\": [\"string\", \"null\"]\n },\n \"change\": {\n \"type\": \"string\",\n \"enum\": [\"added\", \"removed\", \"changed\"],\n \"example\": \"changed\"\n },\n \"humanText\": {\n \"type\": [\"string\", \"null\"]\n },\n \"generatedSummary\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"versionId\",\n \"versionNumber\",\n \"createdAt\",\n \"flow\",\n \"change\",\n \"humanText\",\n \"generatedSummary\"\n ]\n },\n \"HeartbeatResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"ack\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n },\n \"deploymentId\": {\n \"type\": \"string\",\n \"pattern\": \"^dep_[a-zA-Z0-9_-]+$\",\n \"example\": \"dep_a1b2c3d4\"\n },\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"none\", \"stop\", \"update\"]\n },\n \"versionNumber\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"bundleUrl\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"ack\", \"deploymentId\", \"action\"]\n },\n \"ObserveTicketRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"scope\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"session\"]\n },\n \"sessionId\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"required\": [\"kind\", \"sessionId\"]\n }\n }\n },\n \"ObserveTicketResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticket\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"observerUrl\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n },\n \"required\": [\"ticket\", \"observerUrl\"]\n },\n \"PreviewResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^prv_[a-z0-9]+$\",\n \"example\": \"prv_abc123xyz456\"\n },\n \"flowId\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"flowSettingsId\": {\n \"type\": \"string\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"bundleUrl\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"activationUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"tagMode\": {\n \"type\": \"boolean\"\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"flowId\",\n \"flowSettingsId\",\n \"projectId\",\n \"bundleUrl\",\n \"activationUrl\",\n \"tagMode\",\n \"createdBy\",\n \"createdAt\"\n ]\n },\n \"CreatePreviewResponse\": {\n \"allOf\": [\n {\n \"$ref\": \"#/components/schemas/PreviewResponse\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"grant\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\"grant\"]\n }\n ]\n },\n \"ListPreviewsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"previews\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/PreviewResponse\"\n }\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"previews\", \"total\"]\n },\n \"CreatePreviewRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"flowSettingsId\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"draft\"]\n }\n },\n \"required\": [\"kind\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"deployment-version\"]\n },\n \"deploymentVersionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"kind\", \"deploymentVersionId\"]\n }\n ]\n },\n \"tagMode\": {\n \"type\": \"boolean\",\n \"default\": true\n }\n },\n \"required\": [\"flowSettingsId\"]\n },\n \"MintGrantRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"origins\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"maxLength\": 253,\n \"example\": \"https://shop.example.com\"\n },\n \"minItems\": 1,\n \"maxItems\": 5\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"origins\"]\n },\n \"MintGrantResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"grant\": {\n \"type\": \"string\"\n },\n \"activationUrl\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"sessionExpiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"sessionGrant\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"grant\", \"activationUrl\", \"sessionExpiresAt\"]\n },\n \"ObserveSessionResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"configSnapshot\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"observedFlowName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"serverFlowName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"serverEndpoint\": {\n \"type\": [\"string\", \"null\"]\n },\n \"web\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ObserveSessionWeb\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"server\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ObserveSessionServer\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"expiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"recordsReceived\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"createdBy\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"flowId\",\n \"status\",\n \"errorMessage\",\n \"configSnapshot\",\n \"observedFlowName\",\n \"serverFlowName\",\n \"serverEndpoint\",\n \"web\",\n \"server\",\n \"expiresAt\",\n \"recordsReceived\",\n \"createdBy\",\n \"createdAt\"\n ]\n },\n \"ObserveSessionWeb\": {\n \"type\": \"object\",\n \"properties\": {\n \"activationUrl\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"credential\": {\n \"type\": \"string\"\n },\n \"previewEnabled\": {\n \"type\": \"boolean\"\n },\n \"bundleUrl\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"binding\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"activationUrl\",\n \"credential\",\n \"previewEnabled\",\n \"bundleUrl\"\n ]\n },\n \"ObserveSessionServer\": {\n \"type\": \"object\",\n \"properties\": {\n \"endpoint\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"env\": {\n \"$ref\": \"#/components/schemas/ObserveSessionServerEnv\"\n }\n },\n \"required\": [\"endpoint\", \"env\"]\n },\n \"ObserveSessionServerEnv\": {\n \"type\": \"object\",\n \"properties\": {\n \"WALKEROS_OBSERVER_URL\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"WALKEROS_DEPLOYMENT_ID\": {\n \"type\": \"string\"\n },\n \"WALKEROS_INGEST_TOKEN\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"WALKEROS_OBSERVER_URL\",\n \"WALKEROS_DEPLOYMENT_ID\",\n \"WALKEROS_INGEST_TOKEN\"\n ]\n },\n \"ObserveSessionJourneysResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"sessionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"flowId\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"assembledAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"journeys\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"gaps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"unattributed\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n }\n },\n \"required\": [\"sessionId\", \"flowId\", \"assembledAt\", \"journeys\", \"gaps\"]\n },\n \"CreateObserveSessionRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"settingsName\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"force\": {\n \"type\": \"boolean\"\n },\n \"replace\": {\n \"type\": \"boolean\"\n },\n \"level\": {\n \"$ref\": \"#/components/schemas/ObserveLevel\"\n },\n \"origins\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"maxLength\": 253,\n \"example\": \"https://shop.example.com\"\n },\n \"maxItems\": 20\n },\n \"tagMode\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"settingsName\"]\n },\n \"ObserveLevel\": {\n \"type\": \"string\",\n \"enum\": [\"off\", \"standard\", \"trace\"]\n },\n \"ObserveSessionHeartbeatResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"ok\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n }\n },\n \"required\": [\"ok\"]\n },\n \"SecretName\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"pattern\": \"^[A-Z_][A-Z0-9_]*$\"\n },\n \"CreateSecretRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"pattern\": \"^[A-Z_][A-Z0-9_]*$\"\n },\n \"value\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 65536\n }\n },\n \"required\": [\"name\", \"value\"]\n },\n \"UpdateSecretRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"value\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 65536\n }\n },\n \"required\": [\"value\"]\n },\n \"SecretSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"flowId\", \"createdAt\", \"updatedAt\"]\n },\n \"SecretListResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"secrets\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"flowId\", \"createdAt\", \"updatedAt\"]\n }\n }\n },\n \"required\": [\"secrets\"]\n },\n \"FeedbackRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"text\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 5000,\n \"example\": \"The MCP flow_bundle tool is great but slow on large configs.\"\n },\n \"userId\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"alex@example.com\"\n },\n \"projectId\": {\n \"type\": \"string\",\n \"maxLength\": 255,\n \"example\": \"proj_abc123\"\n },\n \"version\": {\n \"type\": \"string\",\n \"maxLength\": 100,\n \"example\": \"0.4.2\"\n }\n },\n \"required\": [\"text\"]\n },\n \"FeedbackResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"ok\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n },\n \"id\": {\n \"type\": \"string\",\n \"example\": \"fb_abcdef1234567890\"\n }\n },\n \"required\": [\"ok\", \"id\"]\n },\n \"StepExample\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"public\": {\n \"type\": \"boolean\"\n },\n \"trigger\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\"\n },\n \"options\": {}\n }\n },\n \"mapping\": {},\n \"command\": {\n \"type\": \"string\"\n },\n \"in\": {\n \"$ref\": \"#/components/schemas/StepExampleEvent\"\n },\n \"out\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"array\",\n \"items\": {}\n }\n }\n },\n \"required\": [\"in\"]\n },\n \"StepExampleEvent\": {\n \"type\": \"object\",\n \"properties\": {\n \"entity\": {\n \"type\": \"string\"\n },\n \"action\": {\n \"type\": \"string\"\n },\n \"data\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"context\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"globals\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"custom\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"timestamp\": {\n \"type\": \"string\"\n },\n \"timing\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"user\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"version\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"trigger\": {\n \"type\": \"string\"\n }\n }\n },\n \"CreateStepExampleRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"public\": {\n \"type\": \"boolean\"\n },\n \"trigger\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\"\n },\n \"options\": {}\n }\n },\n \"mapping\": {},\n \"command\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"event\": {\n \"$ref\": \"#/components/schemas/StepExampleEvent\"\n },\n \"out\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"array\",\n \"items\": {}\n }\n }\n },\n \"required\": [\"name\", \"event\"]\n },\n \"EditStepExampleRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"public\": {\n \"type\": \"boolean\"\n },\n \"trigger\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\"\n },\n \"options\": {}\n }\n },\n \"mapping\": {},\n \"command\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"event\": {\n \"$ref\": \"#/components/schemas/StepExampleEvent\"\n },\n \"out\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"array\",\n \"items\": {}\n }\n }\n },\n \"required\": [\"name\"]\n },\n \"StepExamplesResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"examples\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/components/schemas/StepExample\"\n }\n }\n },\n \"required\": [\"examples\"]\n },\n \"ObserveStepExample\": {\n \"type\": \"object\",\n \"properties\": {\n \"in\": {},\n \"out\": {},\n \"mapping\": {},\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n }\n }\n },\n \"ObserveSaveExampleRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"stepPath\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"scenario\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"example\": {\n \"$ref\": \"#/components/schemas/ObserveStepExample\"\n }\n },\n \"required\": [\"stepPath\", \"scenario\", \"example\"]\n },\n \"SecretValuesResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"values\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\"values\"]\n },\n \"ServiceAccountSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"member\", \"deployer\", \"viewer\"]\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"name\", \"role\", \"email\", \"description\", \"createdAt\"]\n },\n \"CreateServiceAccountRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"member\", \"deployer\", \"viewer\"]\n },\n \"description\": {\n \"type\": \"string\",\n \"maxLength\": 1000\n }\n },\n \"required\": [\"name\", \"role\"]\n },\n \"UpdateServiceAccountRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"description\": {\n \"type\": \"string\",\n \"maxLength\": 1000\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"member\", \"deployer\", \"viewer\"]\n }\n }\n },\n \"CreateServiceAccountResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"member\", \"deployer\", \"viewer\"]\n },\n \"email\": {\n \"type\": \"string\"\n },\n \"token\": {\n \"type\": \"string\"\n },\n \"tokenId\": {\n \"type\": \"string\"\n },\n \"tokenPrefix\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"role\",\n \"email\",\n \"token\",\n \"tokenId\",\n \"tokenPrefix\",\n \"createdAt\"\n ]\n },\n \"ListServiceAccountsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"serviceAccounts\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ServiceAccountSummary\"\n }\n },\n \"total\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"serviceAccounts\", \"total\"]\n },\n \"CreateSaTokenRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 100\n },\n \"expiresInDays\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0,\n \"maximum\": 365\n }\n },\n \"required\": [\"name\"]\n },\n \"SaTokenSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"prefix\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"lastUsedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"expiresAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"revokedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"prefix\",\n \"createdAt\",\n \"lastUsedAt\",\n \"expiresAt\",\n \"revokedAt\"\n ]\n },\n \"CreateSaTokenResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"token\": {\n \"type\": \"string\"\n },\n \"prefix\": {\n \"type\": \"string\"\n },\n \"expiresAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"name\", \"token\", \"prefix\", \"expiresAt\", \"createdAt\"]\n },\n \"ListSaTokensResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"tokens\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/SaTokenSummary\"\n }\n },\n \"total\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"tokens\", \"total\"]\n },\n \"Invitation\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"admin\", \"member\", \"deployer\", \"viewer\"],\n \"default\": \"member\",\n \"example\": \"member\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"pending\", \"accepted\", \"declined\", \"expired\", \"cancelled\"]\n },\n \"invitedBy\": {\n \"type\": [\"string\", \"null\"]\n },\n \"expiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"email\",\n \"status\",\n \"invitedBy\",\n \"expiresAt\",\n \"createdAt\"\n ]\n },\n \"CreateInvitationRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"admin\", \"member\", \"deployer\", \"viewer\"],\n \"default\": \"member\",\n \"example\": \"member\"\n }\n },\n \"required\": [\"email\"]\n },\n \"CreateInvitationResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"admin\", \"member\", \"deployer\", \"viewer\"],\n \"default\": \"member\",\n \"example\": \"member\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"pending\"]\n },\n \"expiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\"id\", \"email\", \"status\", \"expiresAt\", \"createdAt\"]\n },\n \"ListInvitationsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"invitations\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Invitation\"\n }\n },\n \"total\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"invitations\", \"total\"]\n },\n \"InvitationPreview\": {\n \"type\": \"object\",\n \"properties\": {\n \"projectName\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"admin\", \"member\", \"deployer\", \"viewer\"],\n \"default\": \"member\",\n \"example\": \"member\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"pending\", \"accepted\", \"declined\", \"expired\", \"cancelled\"]\n },\n \"expiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"invitedByEmail\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n }\n },\n \"required\": [\n \"projectName\",\n \"email\",\n \"status\",\n \"expiresAt\",\n \"invitedByEmail\"\n ]\n },\n \"AcceptInvitationResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"projectId\": {\n \"type\": \"string\"\n },\n \"projectName\": {\n \"type\": \"string\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"admin\", \"member\", \"deployer\", \"viewer\"],\n \"default\": \"member\",\n \"example\": \"member\"\n },\n \"alreadyMember\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"projectId\", \"projectName\", \"alreadyMember\"]\n },\n \"TelemetryEvent\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"entity\": {\n \"type\": \"string\"\n },\n \"action\": {\n \"type\": \"string\"\n },\n \"data\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"context\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"globals\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"custom\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"user\": {\n \"type\": \"object\",\n \"properties\": {\n \"device\": {\n \"type\": \"string\"\n },\n \"session\": {\n \"type\": \"string\"\n },\n \"os\": {\n \"type\": \"string\"\n },\n \"osVersion\": {\n \"type\": \"string\"\n },\n \"node\": {\n \"type\": \"string\"\n },\n \"language\": {\n \"type\": \"string\"\n },\n \"timezone\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"device\",\n \"os\",\n \"osVersion\",\n \"node\",\n \"language\",\n \"timezone\"\n ],\n \"additionalProperties\": {}\n },\n \"nested\": {\n \"type\": \"array\",\n \"items\": {}\n },\n \"consent\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"boolean\"\n }\n },\n \"trigger\": {\n \"type\": \"string\"\n },\n \"timestamp\": {\n \"type\": \"number\"\n },\n \"timing\": {\n \"type\": \"number\"\n },\n \"source\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"cli\", \"mcp\"]\n },\n \"platform\": {\n \"type\": \"string\"\n },\n \"release\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"string\"\n }\n },\n \"version\": {\n \"type\": \"string\"\n },\n \"schema\": {\n \"type\": \"string\"\n },\n \"tool\": {\n \"type\": \"string\"\n },\n \"command\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": {}\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"entity\",\n \"action\",\n \"data\",\n \"context\",\n \"globals\",\n \"custom\",\n \"user\",\n \"nested\",\n \"consent\",\n \"trigger\",\n \"timestamp\",\n \"timing\",\n \"source\"\n ]\n },\n \"UpsertBillingDetailsRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"companyName\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"address\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"address2\": {\n \"type\": \"string\",\n \"maxLength\": 255\n },\n \"postalCode\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 20\n },\n \"city\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"country\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"maxLength\": 2\n },\n \"vatId\": {\n \"type\": \"string\",\n \"maxLength\": 50\n },\n \"invoiceEmail\": {\n \"type\": \"string\",\n \"format\": \"email\"\n },\n \"contactName\": {\n \"type\": \"string\",\n \"maxLength\": 255\n }\n },\n \"required\": [\n \"companyName\",\n \"address\",\n \"postalCode\",\n \"city\",\n \"country\",\n \"invoiceEmail\"\n ]\n },\n \"BillingDetailsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"companyName\": {\n \"type\": \"string\"\n },\n \"address\": {\n \"type\": \"string\"\n },\n \"address2\": {\n \"type\": [\"string\", \"null\"]\n },\n \"postalCode\": {\n \"type\": \"string\"\n },\n \"city\": {\n \"type\": \"string\"\n },\n \"country\": {\n \"type\": \"string\"\n },\n \"vatId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"invoiceEmail\": {\n \"type\": \"string\"\n },\n \"contactName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"taxTreatment\": {\n \"type\": \"string\",\n \"enum\": [\"reverse_charge\", \"domestic\", \"export\", \"eu_standard\"]\n },\n \"viesStatus\": {\n \"type\": \"string\",\n \"enum\": [\"verified\", \"invalid\", \"unavailable\", \"not_checked\"]\n },\n \"viesCompanyName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"projectId\",\n \"companyName\",\n \"address\",\n \"address2\",\n \"postalCode\",\n \"city\",\n \"country\",\n \"vatId\",\n \"invoiceEmail\",\n \"contactName\",\n \"taxTreatment\",\n \"viesStatus\",\n \"viesCompanyName\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"DeployedContentResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"deploymentId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"versionNumber\": {\n \"type\": [\"integer\", \"null\"],\n \"exclusiveMinimum\": 0\n },\n \"status\": {\n \"type\": [\"string\", \"null\"]\n },\n \"flowSettingsName\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publishedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"content\": {}\n },\n \"required\": [\n \"deploymentId\",\n \"versionNumber\",\n \"status\",\n \"flowSettingsName\",\n \"publishedAt\"\n ]\n },\n \"ListHeartbeatsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"records\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/HeartbeatRecord\"\n }\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"limit\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"offset\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"records\", \"total\", \"limit\", \"offset\"]\n },\n \"HeartbeatRecord\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"instanceId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"cliVersion\": {\n \"type\": [\"string\", \"null\"]\n },\n \"configVersion\": {\n \"type\": [\"integer\", \"null\"]\n },\n \"mode\": {\n \"type\": [\"string\", \"null\"]\n },\n \"uptime\": {\n \"type\": [\"integer\", \"null\"]\n },\n \"eventsIn\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"eventsOut\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"eventsFailed\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"perDestinationBreakdown\": {},\n \"receivedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"instanceId\",\n \"cliVersion\",\n \"configVersion\",\n \"mode\",\n \"uptime\",\n \"eventsIn\",\n \"eventsOut\",\n \"eventsFailed\",\n \"receivedAt\"\n ]\n },\n \"RotateIngestTokenResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"ingestToken\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"ingestToken\"]\n },\n \"DeploymentUsageResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"totalEventsIn\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"totalEventsOut\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"totalEventsFailed\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"totalInstances\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"heartbeatCount\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"from\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"to\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"averageThroughputPerHour\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"period\": {\n \"type\": \"string\"\n },\n \"buckets\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/UsageBucket\"\n }\n },\n \"destinations\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/UsageDestination\"\n }\n }\n },\n \"required\": [\n \"totalEventsIn\",\n \"totalEventsOut\",\n \"totalEventsFailed\",\n \"totalInstances\",\n \"heartbeatCount\",\n \"from\",\n \"to\",\n \"averageThroughputPerHour\",\n \"period\",\n \"buckets\"\n ]\n },\n \"UsageBucket\": {\n \"type\": \"object\",\n \"properties\": {\n \"bucket\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"eventsIn\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"eventsOut\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"eventsFailed\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"instances\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\n \"bucket\",\n \"eventsIn\",\n \"eventsOut\",\n \"eventsFailed\",\n \"instances\"\n ]\n },\n \"UsageDestination\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"failed\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"duration\": {\n \"type\": \"number\",\n \"minimum\": 0\n },\n \"dlqSize\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"dropped\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\n \"name\",\n \"count\",\n \"failed\",\n \"duration\",\n \"dlqSize\",\n \"dropped\"\n ]\n },\n \"CreateCustomDomainRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 253\n },\n \"deploymentId\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"required\": [\"hostname\"]\n },\n \"CustomDomain\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"deploymentId\": {\n \"type\": \"string\"\n },\n \"hostname\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"scwResourceId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"certStatus\": {\n \"type\": \"string\"\n },\n \"verifiedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"deploymentId\",\n \"hostname\",\n \"kind\",\n \"status\",\n \"scwResourceId\",\n \"certStatus\",\n \"verifiedAt\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"ListCustomDomainsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"domains\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/CustomDomain\"\n }\n }\n },\n \"required\": [\"domains\"]\n },\n \"DeployTokenStatusResponse\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"hasToken\": {\n \"type\": \"boolean\",\n \"enum\": [false]\n }\n },\n \"required\": [\"hasToken\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"hasToken\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n },\n \"deploymentId\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"healthy\": {\n \"type\": \"boolean\"\n },\n \"lastHeartbeatAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"instanceId\": {\n \"type\": [\"string\", \"null\"]\n },\n \"cliVersion\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\n \"hasToken\",\n \"deploymentId\",\n \"status\",\n \"healthy\",\n \"lastHeartbeatAt\",\n \"instanceId\",\n \"cliVersion\"\n ]\n }\n ]\n },\n \"CreateDeployTokenResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"token\": {\n \"type\": \"string\"\n },\n \"deploymentId\": {\n \"type\": \"string\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"configName\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"token\",\n \"deploymentId\",\n \"projectId\",\n \"flowId\",\n \"configName\"\n ]\n },\n \"EntitlementsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"planId\": {\n \"type\": \"string\"\n },\n \"role\": {\n \"type\": \"string\"\n },\n \"entitlements\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"number\"\n }\n ]\n }\n }\n },\n \"required\": [\"planId\", \"role\", \"entitlements\"]\n },\n \"SetLlmConfigRequest\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"clear\"]\n }\n },\n \"required\": [\"action\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"set\"]\n },\n \"config\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"provider\": {\n \"type\": \"string\",\n \"enum\": [\"mistral\"]\n },\n \"modelId\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"apiKey\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"required\": [\"provider\", \"modelId\", \"apiKey\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"provider\": {\n \"type\": \"string\",\n \"enum\": [\"anthropic\"]\n },\n \"modelId\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"apiKey\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"required\": [\"provider\", \"modelId\", \"apiKey\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"provider\": {\n \"type\": \"string\",\n \"enum\": [\"openai\"]\n },\n \"modelId\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"apiKey\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"required\": [\"provider\", \"modelId\", \"apiKey\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"provider\": {\n \"type\": \"string\",\n \"enum\": [\"google\"]\n },\n \"modelId\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"apiKey\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"required\": [\"provider\", \"modelId\", \"apiKey\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"provider\": {\n \"type\": \"string\",\n \"enum\": [\"openai-compatible\"]\n },\n \"modelId\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"apiKey\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"baseURL\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n },\n \"required\": [\"provider\", \"modelId\", \"apiKey\", \"baseURL\"]\n }\n ]\n }\n },\n \"required\": [\"action\", \"config\"]\n }\n ]\n },\n \"SetLlmConfigResponse\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"cleared\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n }\n },\n \"required\": [\"cleared\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"saved\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n }\n },\n \"required\": [\"saved\"]\n }\n ]\n },\n \"LlmConfigStatusResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"provider\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"string\",\n \"enum\": [\"platform\", \"byok\", \"byom\"]\n }\n },\n \"required\": [\"provider\", \"source\"]\n },\n \"ListChatSessionsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"sessions\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ChatSessionSummary\"\n }\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"sessions\", \"total\"]\n },\n \"ChatSessionSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastActiveAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"messageCount\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"firstUserMessage\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"createdAt\", \"lastActiveAt\", \"messageCount\"]\n },\n \"ChatSessionDetailResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastActiveAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"messages\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ChatSessionMessage\"\n }\n }\n },\n \"required\": [\"id\", \"createdAt\", \"lastActiveAt\", \"messages\"]\n },\n \"ChatSessionMessage\": {\n \"type\": \"object\",\n \"properties\": {\n \"seq\": {\n \"type\": \"integer\"\n },\n \"role\": {\n \"type\": \"string\"\n },\n \"content\": {},\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"seq\", \"role\", \"createdAt\"]\n },\n \"ElicitRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"sessionId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128\n },\n \"elicitationId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 128\n },\n \"result\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"accept\"]\n },\n \"content\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"number\"\n },\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n ]\n }\n }\n },\n \"required\": [\"action\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"decline\"]\n }\n },\n \"required\": [\"action\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"cancel\"]\n }\n },\n \"required\": [\"action\"]\n }\n ]\n }\n },\n \"required\": [\"sessionId\", \"elicitationId\", \"result\"]\n },\n \"ElicitResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"ok\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n }\n },\n \"required\": [\"ok\"]\n },\n \"PackageCatalogResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"catalog\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/PackageCatalogEntry\"\n }\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"catalog\", \"count\"]\n },\n \"PackageCatalogEntry\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"version\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"platform\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\"name\", \"version\", \"type\", \"platform\"]\n },\n \"PackageSearchResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"packages\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/PackageSearchHit\"\n }\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"packages\", \"count\"]\n },\n \"PackageSearchHit\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"version\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"name\", \"version\", \"description\"]\n },\n \"PackageSearchLogRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 214\n },\n \"result\": {\n \"type\": \"string\",\n \"enum\": [\"hit\", \"miss\"]\n },\n \"platform\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"]\n },\n \"projectId\": {\n \"type\": \"string\",\n \"maxLength\": 64\n }\n },\n \"required\": [\"query\", \"result\"]\n },\n \"ListRunnersResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"runners\": {\n \"type\": \"array\",\n \"items\": {}\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"runners\", \"total\"]\n },\n \"RunnerHeartbeatResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"instanceId\": {\n \"type\": \"string\"\n },\n \"deploymentId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"instanceId\", \"deploymentId\"]\n },\n \"ObserveTimingRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"connectId\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"ticketMs\": {\n \"type\": \"number\",\n \"minimum\": 0\n },\n \"sseMs\": {\n \"type\": \"number\",\n \"minimum\": 0\n },\n \"totalMs\": {\n \"type\": \"number\",\n \"minimum\": 0\n }\n },\n \"required\": [\"connectId\", \"ticketMs\", \"sseMs\", \"totalMs\"]\n },\n \"MagicLinkResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"success\": {\n \"type\": \"boolean\",\n \"example\": true\n },\n \"message\": {\n \"type\": \"string\",\n \"example\": \"Magic link sent\"\n }\n },\n \"required\": [\"success\", \"message\"]\n },\n \"MagicLinkRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n },\n \"redirect_to\": {\n \"type\": \"string\",\n \"example\": \"/dashboard\"\n }\n },\n \"required\": [\"email\"]\n },\n \"VerifyResponse\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"ok\"]\n },\n \"redirectTo\": {\n \"type\": \"string\",\n \"example\": \"/\"\n }\n },\n \"required\": [\"status\", \"redirectTo\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"confirm_required\"]\n },\n \"email\": {\n \"type\": \"string\",\n \"example\": \"user@example.com\"\n }\n },\n \"required\": [\"status\", \"email\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"expired\", \"used\", \"invalid\", \"malformed\"]\n }\n },\n \"required\": [\"status\"]\n }\n ]\n },\n \"VerifyRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"token\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"redirect_to\": {\n \"type\": \"string\",\n \"example\": \"/dashboard\"\n },\n \"confirm\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"token\"]\n },\n \"WhoamiResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"userId\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3d4\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n },\n \"projectId\": {\n \"type\": [\"string\", \"null\"],\n \"example\": null\n }\n },\n \"required\": [\"userId\", \"email\", \"projectId\"]\n },\n \"ListSessionsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"sessions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"expiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastTouchedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"isCurrent\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"id\",\n \"createdAt\",\n \"expiresAt\",\n \"lastTouchedAt\",\n \"isCurrent\"\n ]\n }\n }\n },\n \"required\": [\"sessions\"]\n },\n \"ListProjectsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"projects\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Project\"\n }\n },\n \"total\": {\n \"type\": \"number\"\n },\n \"nextCursor\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\"projects\", \"total\", \"nextCursor\"]\n },\n \"CreateProjectRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n }\n },\n \"required\": [\"name\"]\n },\n \"ProjectDetailResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"siteUrl\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\",\n \"example\": \"https://example.com\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"owner\", \"admin\", \"member\", \"deployer\", \"viewer\"]\n }\n },\n \"required\": [\"id\", \"name\", \"role\"]\n },\n \"UpdateProjectRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"siteUrl\": {\n \"type\": [\"string\", \"null\"],\n \"maxLength\": 2048,\n \"format\": \"uri\",\n \"example\": \"https://example.com\"\n }\n }\n },\n \"ListMembersResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"members\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Member\"\n }\n },\n \"total\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"members\", \"total\"]\n },\n \"AddMemberRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"example\": \"user@example.com\"\n },\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"owner\", \"admin\", \"member\", \"deployer\", \"viewer\"],\n \"default\": \"member\"\n }\n },\n \"required\": [\"email\"]\n },\n \"UpdateMemberRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"role\": {\n \"type\": \"string\",\n \"enum\": [\"owner\", \"admin\", \"member\", \"deployer\", \"viewer\"]\n }\n },\n \"required\": [\"role\"]\n },\n \"ListFlowsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"flows\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FlowSummary\"\n }\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"nextCursor\": {\n \"type\": [\"string\", \"null\"]\n }\n },\n \"required\": [\"flows\", \"total\", \"nextCursor\"]\n },\n \"CreateFlowRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"example\": \"my-website-flow\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n }\n },\n \"required\": [\"name\"]\n },\n \"UpdateFlowRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"example\": \"my-website-flow\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n }\n }\n },\n \"DuplicateFlowRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"example\": \"my-website-flow\"\n }\n }\n },\n \"DeploymentResponse\": {\n \"type\": [\"object\", \"null\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"]\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"containerUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publicUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"flowId\",\n \"type\",\n \"status\",\n \"containerUrl\",\n \"errorMessage\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"ListSettingsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"settings\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/FlowSettingsSummary\"\n }\n }\n },\n \"required\": [\"settings\"]\n },\n \"SettingsDeploymentResponse\": {\n \"type\": [\"object\", \"null\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"settingsId\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"]\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"containerUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publicUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"flowId\",\n \"settingsId\",\n \"type\",\n \"status\",\n \"containerUrl\",\n \"publicUrl\",\n \"errorMessage\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"SettingsDeploymentDetailResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"settingsId\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"]\n },\n \"containerUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"publicUrl\": {\n \"type\": [\"string\", \"null\"]\n },\n \"errorMessage\": {\n \"type\": [\"string\", \"null\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"flowId\",\n \"settingsId\",\n \"status\",\n \"type\",\n \"containerUrl\",\n \"publicUrl\",\n \"errorMessage\",\n \"createdAt\",\n \"updatedAt\"\n ]\n },\n \"FlowJourneysResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"sessionId\": {\n \"type\": [\"string\", \"null\"],\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"flowId\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"assembledAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"journeys\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"gaps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"unattributed\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n }\n },\n \"required\": [\"sessionId\", \"flowId\", \"assembledAt\", \"journeys\", \"gaps\"]\n },\n \"ListVersionsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Version\"\n }\n },\n \"flowId\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"total\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"limit\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0\n },\n \"offset\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"hasMore\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"data\", \"flowId\", \"total\", \"limit\", \"offset\", \"hasMore\"]\n },\n \"GetVersionResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"version\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0,\n \"example\": 1\n },\n \"content\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"createdBy\": {\n \"type\": \"string\",\n \"enum\": [\"user\", \"auto_save\", \"restore\", \"deploy\", \"preview\"]\n }\n },\n \"required\": [\"version\", \"content\", \"createdAt\", \"createdBy\"]\n },\n \"ListAutomationTokensResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"tokens\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AutomationTokenSummary\"\n }\n }\n },\n \"required\": [\"tokens\"]\n },\n \"CreateAutomationTokenResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"example\": \"tok_a1b2c3d4\"\n },\n \"name\": {\n \"type\": \"string\",\n \"example\": \"CI Pipeline\"\n },\n \"token\": {\n \"type\": \"string\",\n \"example\": \"wos_pat_a1b2c3d4...\"\n },\n \"tokenPrefix\": {\n \"type\": \"string\",\n \"example\": \"wos_pat_a1b2\"\n },\n \"scope\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"example\": [\"read\", \"write\"]\n },\n \"audience\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"example\": [\"api\", \"mcp\"]\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"expiresAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"token\",\n \"tokenPrefix\",\n \"scope\",\n \"audience\",\n \"createdAt\",\n \"expiresAt\"\n ]\n },\n \"CreateAutomationTokenRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 100,\n \"example\": \"CI Pipeline\"\n },\n \"scope\": {\n \"type\": \"string\",\n \"enum\": [\"read\", \"read write\"],\n \"example\": \"read write\"\n },\n \"expiresInDays\": {\n \"anyOf\": [\n {\n \"type\": \"number\",\n \"enum\": [30]\n },\n {\n \"type\": \"number\",\n \"enum\": [90]\n },\n {\n \"type\": \"number\",\n \"enum\": [180]\n },\n {\n \"type\": \"number\",\n \"enum\": [365]\n }\n ],\n \"example\": 90\n }\n },\n \"required\": [\"name\", \"scope\", \"expiresInDays\"]\n },\n \"RegisterRuntimeRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"flowId\": {\n \"type\": \"string\"\n },\n \"bundlePath\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"flowId\", \"bundlePath\"]\n },\n \"ValidateTicketResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"userId\": {\n \"type\": \"string\"\n },\n \"projectId\": {\n \"type\": \"string\"\n },\n \"replay\": {\n \"type\": \"object\",\n \"properties\": {\n \"size\": {\n \"type\": \"number\"\n },\n \"ttlMs\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"size\", \"ttlMs\"]\n },\n \"scope\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"session\"]\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"kind\", \"sessionId\"]\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"required\": [\"userId\", \"projectId\", \"replay\", \"scope\"]\n },\n \"ValidateTicketRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticket\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"required\": [\"ticket\"]\n },\n \"HealthResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\",\n \"example\": \"ok\"\n },\n \"appVersion\": {\n \"type\": \"string\",\n \"example\": \"a1b2c3d\",\n \"description\": \"Build identity of the running app (git short hash injected at build time).\"\n },\n \"contractVersion\": {\n \"type\": \"string\",\n \"example\": \"1.0.0\",\n \"description\": \"Semver of the API contract the server implements.\"\n },\n \"contractHash\": {\n \"type\": \"string\",\n \"example\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"description\": \"Deterministic sha256 of the OpenAPI contract content.\"\n }\n },\n \"required\": [\"status\", \"appVersion\", \"contractVersion\", \"contractHash\"]\n },\n \"DeclineInvitationResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"message\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"message\"]\n },\n \"ScreenshotUploadResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"assetId\": {\n \"type\": \"string\",\n \"pattern\": \"^fas_[A-Za-z0-9_-]{21}$\",\n \"example\": \"fas_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"reused\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"assetId\", \"reused\"]\n },\n \"FrameScreenshotMeta\": {\n \"type\": \"object\",\n \"properties\": {\n \"capturedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"size\": {\n \"$ref\": \"#/components/schemas/PlanSize\"\n },\n \"dpr\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n },\n \"capturedRect\": {\n \"$ref\": \"#/components/schemas/PlanRect\"\n }\n },\n \"required\": [\"capturedAt\", \"size\", \"dpr\", \"capturedRect\"]\n },\n \"HeartbeatRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"instanceId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 64,\n \"example\": \"a1b2c3d4e5f6\"\n },\n \"flowId\": {\n \"type\": \"string\",\n \"example\": \"flow_abc123\"\n },\n \"configVersion\": {\n \"type\": \"string\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\"local\", \"collect\", \"serve\"]\n },\n \"cliVersion\": {\n \"type\": \"string\",\n \"example\": \"1.3.0\"\n },\n \"uptime\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"deploymentId\": {\n \"type\": \"string\",\n \"example\": \"dpl_abc123\"\n },\n \"counters\": {\n \"type\": \"object\",\n \"properties\": {\n \"eventsIn\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"eventsOut\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"eventsFailed\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"destinations\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"object\",\n \"properties\": {\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"failed\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"duration\": {\n \"type\": \"number\",\n \"minimum\": 0\n },\n \"dlqSize\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"dropped\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"required\": [\"count\", \"failed\", \"duration\"]\n }\n }\n },\n \"required\": [\n \"eventsIn\",\n \"eventsOut\",\n \"eventsFailed\",\n \"destinations\"\n ]\n },\n \"recentErrors\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"message\": {\n \"type\": \"string\",\n \"maxLength\": 256\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"firstSeen\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastSeen\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"message\", \"count\", \"firstSeen\", \"lastSeen\"]\n },\n \"maxItems\": 50\n },\n \"recentLogs\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"time\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"level\": {\n \"type\": \"string\",\n \"enum\": [\"error\", \"warn\", \"info\", \"debug\"]\n },\n \"message\": {\n \"type\": \"string\",\n \"maxLength\": 256\n }\n },\n \"required\": [\"time\", \"level\", \"message\"]\n },\n \"maxItems\": 100\n }\n },\n \"required\": [\"instanceId\", \"flowId\"]\n },\n \"OAuthClientRegistrationResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"client_id\": {\n \"type\": \"string\",\n \"example\": \"client_abc\"\n },\n \"client_id_issued_at\": {\n \"type\": \"integer\",\n \"example\": 1725400000\n },\n \"client_name\": {\n \"type\": \"string\"\n },\n \"redirect_uris\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"token_endpoint_auth_method\": {\n \"type\": \"string\",\n \"enum\": [\"none\"]\n },\n \"grant_types\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"response_types\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\n \"client_id\",\n \"client_id_issued_at\",\n \"client_name\",\n \"redirect_uris\",\n \"token_endpoint_auth_method\",\n \"grant_types\",\n \"response_types\"\n ]\n },\n \"OAuthRegistrationError\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"string\",\n \"enum\": [\"invalid_client_metadata\", \"invalid_redirect_uri\"]\n },\n \"error_description\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"error\", \"error_description\"]\n },\n \"OAuthClientRegistrationRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"redirect_uris\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"minItems\": 1,\n \"maxItems\": 10,\n \"example\": [\"https://claude.ai/api/mcp/auth_callback\"]\n },\n \"client_name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"token_endpoint_auth_method\": {\n \"type\": \"string\",\n \"enum\": [\"none\"]\n },\n \"grant_types\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"authorization_code\", \"refresh_token\"]\n },\n \"minItems\": 1\n },\n \"response_types\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"code\"]\n }\n },\n \"client_uri\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"logo_uri\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"scope\": {\n \"type\": \"string\"\n },\n \"software_id\": {\n \"type\": \"string\"\n },\n \"software_version\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"redirect_uris\"]\n },\n \"DeviceAuthorizationResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"device_code\": {\n \"type\": \"string\"\n },\n \"user_code\": {\n \"type\": \"string\",\n \"example\": \"WDJB-MJHT\"\n },\n \"verification_uri\": {\n \"type\": \"string\"\n },\n \"verification_uri_complete\": {\n \"type\": \"string\"\n },\n \"expires_in\": {\n \"type\": \"integer\",\n \"example\": 900\n },\n \"interval\": {\n \"type\": \"integer\",\n \"example\": 5\n }\n },\n \"required\": [\n \"device_code\",\n \"user_code\",\n \"verification_uri\",\n \"verification_uri_complete\",\n \"expires_in\",\n \"interval\"\n ]\n },\n \"OAuthError\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"string\",\n \"example\": \"invalid_client\"\n },\n \"error_description\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"error\", \"error_description\"]\n },\n \"DeviceAuthorizationRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"client_id\": {\n \"type\": \"string\",\n \"example\": \"walkeros-cli\"\n },\n \"scope\": {\n \"type\": \"string\",\n \"example\": \"read write offline_access\"\n },\n \"resource\": {\n \"type\": \"string\",\n \"example\": \"https://app.walkeros.io/api\"\n }\n },\n \"required\": [\"client_id\"]\n },\n \"TokenResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"access_token\": {\n \"type\": \"string\"\n },\n \"token_type\": {\n \"type\": \"string\",\n \"enum\": [\"Bearer\"]\n },\n \"expires_in\": {\n \"type\": \"integer\",\n \"example\": 3600\n },\n \"refresh_token\": {\n \"type\": \"string\"\n },\n \"scope\": {\n \"type\": \"string\",\n \"example\": \"read write offline_access\"\n }\n },\n \"required\": [\"access_token\", \"token_type\", \"expires_in\", \"scope\"]\n },\n \"TokenRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"grant_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"authorization_code\",\n \"refresh_token\",\n \"urn:ietf:params:oauth:grant-type:device_code\"\n ],\n \"example\": \"authorization_code\"\n },\n \"client_id\": {\n \"type\": \"string\",\n \"example\": \"walkeros-cli\"\n },\n \"client_secret\": {\n \"type\": \"string\"\n },\n \"code\": {\n \"type\": \"string\"\n },\n \"redirect_uri\": {\n \"type\": \"string\"\n },\n \"code_verifier\": {\n \"type\": \"string\"\n },\n \"refresh_token\": {\n \"type\": \"string\"\n },\n \"device_code\": {\n \"type\": \"string\"\n },\n \"scope\": {\n \"type\": \"string\",\n \"example\": \"read offline_access\"\n },\n \"resource\": {\n \"type\": \"string\",\n \"example\": \"https://app.walkeros.io/api\"\n }\n },\n \"required\": [\"grant_type\"]\n },\n \"RevocationRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"token\": {\n \"type\": \"string\"\n },\n \"token_type_hint\": {\n \"type\": \"string\",\n \"enum\": [\"access_token\", \"refresh_token\"]\n },\n \"client_id\": {\n \"type\": \"string\"\n },\n \"client_secret\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"token\"]\n },\n \"DeviceApprovalResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"success\": {\n \"type\": \"boolean\",\n \"enum\": [true]\n },\n \"decision\": {\n \"type\": \"string\",\n \"enum\": [\"approve\", \"deny\"]\n }\n },\n \"required\": [\"success\", \"decision\"]\n },\n \"DeviceApprovalRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"userCode\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"example\": \"WDJB-MJHT\"\n },\n \"decision\": {\n \"type\": \"string\",\n \"enum\": [\"approve\", \"deny\"]\n }\n },\n \"required\": [\"userCode\", \"decision\"]\n },\n \"OAuthConsentDecisionResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"redirectTo\": {\n \"type\": \"string\",\n \"example\": \"https://claude.ai/api/mcp/auth_callback?code=abc&state=xyz\"\n }\n },\n \"required\": [\"redirectTo\"]\n },\n \"OAuthConsentDecisionRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticket\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"decision\": {\n \"type\": \"string\",\n \"enum\": [\"allow\", \"deny\"]\n }\n },\n \"required\": [\"ticket\", \"decision\"]\n },\n \"ListOAuthGrantsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"grants\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/OAuthGrantSummary\"\n }\n }\n },\n \"required\": [\"grants\"]\n },\n \"OAuthGrantSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientName\": {\n \"type\": \"string\"\n },\n \"scope\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"lastUsedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"id\",\n \"clientId\",\n \"clientName\",\n \"scope\",\n \"createdAt\",\n \"lastUsedAt\"\n ]\n },\n \"ListOAuthClientsResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"clients\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/OAuthClientSummary\"\n }\n }\n },\n \"required\": [\"clients\"]\n },\n \"OAuthClientSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientId\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"dcr\", \"cimd\", \"confidential\", \"builtin\"]\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"redirectUris\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"grantTypes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"tokenEndpointAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"none\", \"client_secret_basic\", \"client_secret_post\"]\n },\n \"allowedResources\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"mcp\", \"api\"]\n }\n },\n \"revokedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n }\n },\n \"required\": [\n \"clientId\",\n \"kind\",\n \"name\",\n \"redirectUris\",\n \"grantTypes\",\n \"tokenEndpointAuthMethod\",\n \"allowedResources\",\n \"revokedAt\"\n ]\n },\n \"CreateOAuthClientResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientId\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\"dcr\", \"cimd\", \"confidential\", \"builtin\"]\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"redirectUris\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"grantTypes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"tokenEndpointAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"none\", \"client_secret_basic\", \"client_secret_post\"]\n },\n \"allowedResources\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"mcp\", \"api\"]\n }\n },\n \"revokedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\",\n \"example\": \"2026-01-26T14:30:00.000Z\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"clientId\",\n \"kind\",\n \"name\",\n \"redirectUris\",\n \"grantTypes\",\n \"tokenEndpointAuthMethod\",\n \"allowedResources\",\n \"revokedAt\",\n \"clientSecret\"\n ]\n },\n \"CreateOAuthClientRequest\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"redirectUris\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"minItems\": 1,\n \"maxItems\": 10\n },\n \"grantTypes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"authorization_code\", \"refresh_token\"]\n },\n \"minItems\": 1,\n \"default\": [\"authorization_code\", \"refresh_token\"]\n },\n \"allowedResources\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"mcp\", \"api\"]\n },\n \"minItems\": 1,\n \"default\": [\"mcp\", \"api\"]\n },\n \"authMethod\": {\n \"type\": \"string\",\n \"enum\": [\"client_secret_basic\", \"client_secret_post\"],\n \"default\": \"client_secret_basic\"\n }\n },\n \"required\": [\"name\", \"redirectUris\"]\n }\n },\n \"parameters\": {}\n },\n \"paths\": {\n \"/api/auth/magic-link\": {\n \"post\": {\n \"tags\": [\"Auth\"],\n \"summary\": \"Request magic link\",\n \"description\": \"Send a magic link to the provided email address for passwordless authentication. Always returns success to prevent email enumeration.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/MagicLinkRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Magic link sent (or would be sent if email exists)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/MagicLinkResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/auth/verify\": {\n \"post\": {\n \"tags\": [\"Auth\"],\n \"summary\": \"Redeem magic link token\",\n \"description\": \"Redeem a magic link token and create an authenticated session. Redeems immediately when the browser-nonce cookie from the magic-link request matches; otherwise answers confirm_required and expects a follow-up call with confirm: true.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/VerifyRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Redemption result. status=ok sets the session cookie and carries the redirect target.\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/VerifyResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"get\": {\n \"tags\": [\"Auth\"],\n \"summary\": \"Legacy magic link entry point\",\n \"description\": \"Side-effect-free redirector to the /auth/verify page for links minted before the page-URL change. Never consumes the token; redemption happens via POST.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"example\": \"abc123...\",\n \"description\": \"Magic link token\"\n },\n \"required\": true,\n \"description\": \"Magic link token\",\n \"name\": \"token\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"/dashboard\",\n \"description\": \"Redirect URL after verification\"\n },\n \"required\": false,\n \"description\": \"Redirect URL after verification\",\n \"name\": \"redirect_to\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"307\": {\n \"description\": \"Redirect to the /auth/verify page with the token forwarded\"\n }\n }\n }\n },\n \"/api/auth/logout\": {\n \"post\": {\n \"tags\": [\"Auth\"],\n \"summary\": \"End session\",\n \"description\": \"Destroy the current session and clear the session cookie.\",\n \"responses\": {\n \"302\": {\n \"description\": \"Redirect to login page\"\n }\n }\n }\n },\n \"/api/auth/whoami\": {\n \"get\": {\n \"tags\": [\"Auth\"],\n \"summary\": \"Current identity\",\n \"description\": \"Return the identity of the authenticated user. Supports session cookie and Bearer token.\",\n \"responses\": {\n \"200\": {\n \"description\": \"Current user identity\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/WhoamiResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/account\": {\n \"delete\": {\n \"tags\": [\"Account\"],\n \"summary\": \"Delete own account\",\n \"description\": \"Soft-delete the authenticated account, starting the 30-day grace window. Requires a confirmation of the account email in the body. Revokes all sessions, API tokens, and MCP tokens. Blocked with 409 when the caller is the sole owner of a project that still has other members.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeleteAccountRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"204\": {\n \"description\": \"Account scheduled for deletion\"\n },\n \"400\": {\n \"description\": \"Confirmation email does not match\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Sole owner of a shared project\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeleteAccountBlocked\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/account/export\": {\n \"get\": {\n \"tags\": [\"Account\"],\n \"summary\": \"Export own account data\",\n \"description\": \"Download a portable JSON export of everything the platform holds about the authenticated account: profile, memberships, token and session metadata, MCP sessions with messages, feedback, and invitations. Metadata only; token hashes and secret values are never included. Served as a file attachment.\",\n \"responses\": {\n \"200\": {\n \"description\": \"Account data export (file attachment)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AccountExportResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/sessions\": {\n \"get\": {\n \"tags\": [\"Auth\"],\n \"summary\": \"List sessions\",\n \"description\": \"List all active sessions for the authenticated user. The current session is marked with isCurrent: true.\",\n \"responses\": {\n \"200\": {\n \"description\": \"List of active sessions\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListSessionsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/sessions/{id}\": {\n \"delete\": {\n \"tags\": [\"Auth\"],\n \"summary\": \"Revoke session\",\n \"description\": \"Revoke a session by ID. Cannot revoke the current session (use logout instead).\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"ses_abc123\"\n },\n \"required\": true,\n \"name\": \"id\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Session revoked\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"List my projects\",\n \"description\": \"List all projects where the authenticated user is a member.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"name\": \"cursor\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 100\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of projects\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListProjectsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Create project\",\n \"description\": \"Create a new project. The authenticated user becomes the owner.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateProjectRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Project created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateProjectResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Get project\",\n \"description\": \"Get a single project by ID. Requires membership.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Project details\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ProjectDetailResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"patch\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Update project\",\n \"description\": \"Update project details. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpdateProjectRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Project updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpdateProjectResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Delete project\",\n \"description\": \"Delete a project and all its resources. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Project deleted\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/members\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"List members\",\n \"description\": \"List all members of a project. Requires membership.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of members\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListMembersResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Add member\",\n \"description\": \"Add a member to the project by email. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AddMemberRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Member added\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Member\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/members/{userId}\": {\n \"patch\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Update member role\",\n \"description\": \"Update a member's role. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3\"\n },\n \"required\": true,\n \"name\": \"userId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpdateMemberRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Role updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Member\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Remove member\",\n \"description\": \"Remove a member from the project. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"user_a1b2c3\"\n },\n \"required\": true,\n \"name\": \"userId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Member removed\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows\": {\n \"get\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"List flows\",\n \"description\": \"List all flows for a project.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"name\", \"updated_at\", \"created_at\"],\n \"example\": \"updated_at\"\n },\n \"required\": false,\n \"name\": \"sort\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"asc\", \"desc\"],\n \"example\": \"desc\"\n },\n \"required\": false,\n \"name\": \"order\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"true\", \"false\"],\n \"example\": \"false\"\n },\n \"required\": false,\n \"name\": \"include_deleted\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"name\": \"cursor\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 100\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of flows\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListFlowsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Create flow\",\n \"description\": \"Create a new flow in the project. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateFlowRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Flow created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Flow\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}\": {\n \"get\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Get flow\",\n \"description\": \"Get a single flow by ID. Use ?fields to select specific sections (reduces response size).\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Comma-separated dot-paths to select specific fields (e.g., \\\"config.variables,config.flows.tracking.sources\\\"). Always includes id, createdAt, updatedAt.\",\n \"example\": \"config.variables,config.flows.tracking.sources\"\n },\n \"required\": false,\n \"description\": \"Comma-separated dot-paths to select specific fields (e.g., \\\"config.variables,config.flows.tracking.sources\\\"). Always includes id, createdAt, updatedAt.\",\n \"name\": \"fields\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Flow details\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/FlowDetailResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"patch\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Update flow\",\n \"description\": \"Update an existing flow. Creates a version snapshot before applying changes. Requires member role. Use Content-Type: application/merge-patch+json to send only changed fields (RFC 7386).\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"ETag from a previous GET. Returns 412 if flow was modified since.\",\n \"example\": \"\\\"a1b2c3d4e5f6g7h8\\\"\"\n },\n \"required\": false,\n \"description\": \"ETag from a previous GET. Returns 412 if flow was modified since.\",\n \"name\": \"if-match\",\n \"in\": \"header\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpdateFlowRequest\"\n }\n },\n \"application/merge-patch+json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpdateFlowRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Flow updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/FlowUpdateResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"412\": {\n \"description\": \"ETag mismatch — flow was modified since last read\"\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Soft-delete flow\",\n \"description\": \"Soft delete a flow (sets deleted_at timestamp). Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"ETag from a previous GET. Returns 412 if flow was modified since.\",\n \"example\": \"\\\"a1b2c3d4e5f6g7h8\\\"\"\n },\n \"required\": false,\n \"description\": \"ETag from a previous GET. Returns 412 if flow was modified since.\",\n \"name\": \"if-match\",\n \"in\": \"header\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Flow deleted\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"412\": {\n \"description\": \"ETag mismatch — flow was modified since last read\"\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/duplicate\": {\n \"post\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Duplicate flow\",\n \"description\": \"Create a copy of an existing flow with a new ID and no version history. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DuplicateFlowRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Flow duplicated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Flow\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/secrets\": {\n \"get\": {\n \"tags\": [\"Secrets\"],\n \"summary\": \"List secrets\",\n \"description\": \"List a flow's secrets as metadata only (name, id, timestamps). Values are never returned. Requires member role and the secrets entitlement.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Secret metadata list\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"secrets\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"flowId\",\n \"createdAt\",\n \"updatedAt\"\n ]\n }\n }\n },\n \"required\": [\"secrets\"]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Secrets\"],\n \"summary\": \"Create secret\",\n \"description\": \"Create a secret for a flow. The value is encrypted at rest and never returned. Requires member role and the secrets entitlement.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255,\n \"pattern\": \"^[A-Z_][A-Z0-9_]*$\"\n },\n \"value\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 65536\n }\n },\n \"required\": [\"name\", \"value\"]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Secret created (metadata only)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"flowId\", \"createdAt\", \"updatedAt\"]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/secrets/{secretId}\": {\n \"put\": {\n \"tags\": [\"Secrets\"],\n \"summary\": \"Update secret value\",\n \"description\": \"Rotate a secret's value (re-encrypts). The value is never returned. Requires member role and the secrets entitlement.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sec_abc123\"\n },\n \"required\": true,\n \"name\": \"secretId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"value\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 65536\n }\n },\n \"required\": [\"value\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Secret updated (metadata only)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"updatedAt\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"flowId\", \"createdAt\", \"updatedAt\"]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Secrets\"],\n \"summary\": \"Delete secret\",\n \"description\": \"Soft-delete a secret. Idempotent: deleting a missing secret returns 204. Requires member role and the secrets entitlement.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sec_abc123\"\n },\n \"required\": true,\n \"name\": \"secretId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Secret deleted\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/secrets/values\": {\n \"get\": {\n \"tags\": [\"Secrets\"],\n \"summary\": \"Get decrypted secret values\",\n \"description\": \"Return decrypted secret values for a flow as a name-to-value map. Dual auth: a runtime container Bearer token bound to (projectId, flowId) with the `runner:read-secrets` scope returns only the bundle-referenced subset; a session cookie with member role returns all of the flow's secrets for administration. Responses are never cached.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Decrypted secret values keyed by name\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"values\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\"values\"]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/steps/{stepPath}/examples\": {\n \"post\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Add step example\",\n \"description\": \"Add a named example to a step. Examples are stored as an object map keyed by name. Rejects duplicate names with 409.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Dot-segmented step path (sectionKey.stepName), e.g. \\\"destinations.gtag\\\".\",\n \"example\": \"destinations.gtag\"\n },\n \"required\": true,\n \"description\": \"Dot-segmented step path (sectionKey.stepName), e.g. \\\"destinations.gtag\\\".\",\n \"name\": \"stepPath\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateStepExampleRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Updated examples object map\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/StepExamplesResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"422\": {\n \"description\": \"Unprocessable entity\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"put\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Edit step example\",\n \"description\": \"Edit an existing named example in place, merging provided fields onto the stored entry. Returns 404 when the named example does not exist.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Dot-segmented step path (sectionKey.stepName), e.g. \\\"destinations.gtag\\\".\",\n \"example\": \"destinations.gtag\"\n },\n \"required\": true,\n \"description\": \"Dot-segmented step path (sectionKey.stepName), e.g. \\\"destinations.gtag\\\".\",\n \"name\": \"stepPath\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/EditStepExampleRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Updated examples object map\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/StepExamplesResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"422\": {\n \"description\": \"Unprocessable entity\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Flows\"],\n \"summary\": \"Remove step example\",\n \"description\": \"Remove a named example from a step. Returns 404 when the named example does not exist.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Dot-segmented step path (sectionKey.stepName), e.g. \\\"destinations.gtag\\\".\",\n \"example\": \"destinations.gtag\"\n },\n \"required\": true,\n \"description\": \"Dot-segmented step path (sectionKey.stepName), e.g. \\\"destinations.gtag\\\".\",\n \"name\": \"stepPath\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Name of the example to remove.\",\n \"example\": \"product view\"\n },\n \"required\": true,\n \"description\": \"Name of the example to remove.\",\n \"name\": \"name\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Updated examples object map\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/StepExamplesResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"422\": {\n \"description\": \"Unprocessable entity\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/observe-examples\": {\n \"post\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"Save an observed hop as a step example\",\n \"description\": \"Persist an observed journey hop as a named example on a step of the DRAFT flow config. Gated by the 'observe' feature. The step path and scenario come from the body; `example.in` is stored verbatim (post-redaction). Rejects a duplicate scenario name with 409.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveSaveExampleRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Updated examples object map\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/StepExamplesResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"422\": {\n \"description\": \"Unprocessable entity\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/deploy\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Get latest deployment\",\n \"description\": \"Get the latest deployment for a flow.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Latest deployment (or null)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeploymentResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Start deployment\",\n \"description\": \"Start a new deployment for a flow. The bundle runs asynchronously on the worker. Returns 400 AMBIGUOUS_CONFIG when the flow has multiple named settings (use the per-settings deploy endpoint instead). When an Idempotency-Key replays a prior request, returns 200 with status `already_created`.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Deployment started, or idempotent replay of a prior request\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/StartDeploymentResponse\"\n }\n }\n }\n },\n \"201\": {\n \"description\": \"Deployment started\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/StartDeploymentResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Deployment already in progress\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited or concurrent deploy limit (Retry-After header)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"503\": {\n \"description\": \"Service unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/deploy/{deploymentId}\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Get deployment\",\n \"description\": \"Get a specific deployment by ID.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Deployment details\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeploymentDetailResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Delete deployment\",\n \"description\": \"Delete a deployment and its container. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Deployment deleted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"deleted\"]\n }\n },\n \"required\": [\"id\", \"status\"]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/settings\": {\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"List settings\",\n \"description\": \"List active named settings for a flow.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of settings\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListSettingsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/settings/{settingsId}\": {\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Get settings\",\n \"description\": \"Get a single settings entry with its latest deployment.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Settings details with deployment\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/FlowSettingsDetail\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/json\": {\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Download settings JSON\",\n \"description\": \"Download the named flow settings as a self-contained Config JSON file. Includes parent variables and definitions.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Flow Config JSON file\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/FlowConfig\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/bundle\": {\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Download settings bundle\",\n \"description\": \"Download the compiled JS/MJS for the settings' latest deployment. Redirects to a presigned download URL.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"302\": {\n \"description\": \"Redirect to presigned bundle URL\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"503\": {\n \"description\": \"Service unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy\": {\n \"post\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Deploy settings\",\n \"description\": \"Start a deployment for a specific settings entry. Detects platform from the settings. The body is optional and carries only `humanText`, the reason for the change, which becomes the description of the release this deploy produces; it is ignored when the release already has one.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"required\": false,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeploySettingsRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Deployment started\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeploySettingsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Deployment already in progress\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"422\": {\n \"description\": \"Settings orphaned\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"503\": {\n \"description\": \"Service unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Get latest settings deployment\",\n \"description\": \"Get the latest deployment for a specific settings entry.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Latest deployment (or null)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/SettingsDeploymentResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deployments/{deploymentId}\": {\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Get settings deployment detail\",\n \"description\": \"Get a specific deployment by ID, scoped to a settings entry.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Deployment details\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/SettingsDeploymentDetailResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/previews\": {\n \"post\": {\n \"tags\": [\"Previews\"],\n \"summary\": \"Create preview\",\n \"description\": \"Create a new preview for a web flow settings entry. Bundles the flow and publishes to a unique token-based URL.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreatePreviewRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Preview created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreatePreviewResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Quota exceeded\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"502\": {\n \"description\": \"Bundle or upload failed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"get\": {\n \"tags\": [\"Previews\"],\n \"summary\": \"List previews\",\n \"description\": \"List all previews for a flow, ordered by creation date descending.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of previews\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListPreviewsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/previews/{previewId}\": {\n \"get\": {\n \"tags\": [\"Previews\"],\n \"summary\": \"Get preview\",\n \"description\": \"Get a single preview by ID.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^prv_[a-z0-9]+$\",\n \"example\": \"prv_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"previewId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Preview details\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/PreviewResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Previews\"],\n \"summary\": \"Delete preview\",\n \"description\": \"Delete a preview and its S3 bundle. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^prv_[a-z0-9]+$\",\n \"example\": \"prv_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"previewId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Preview deleted\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/previews/{previewId}/grant\": {\n \"post\": {\n \"tags\": [\"Previews\"],\n \"summary\": \"Mint preview activation grant\",\n \"description\": \"Mint a fresh, origin-bound activation grant for an existing preview. Grants are origin-bound, so a preview needs one grant per host origin — re-mint whenever the target origin changes.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^prv_[a-z0-9]+$\",\n \"example\": \"prv_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"previewId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/MintGrantRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Grant minted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/MintGrantResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"No active web deployment / host bundle not preview-enabled\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/observe-sessions\": {\n \"post\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"Start observe session\",\n \"description\": \"Start an Observe session for a flow. Validates the flow topology, inserts the row, and kicks off detached provisioning. Returns the row immediately as arming.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateObserveSessionRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Observe session started\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveSessionResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Flow topology not supported\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limit exceeded\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}\": {\n \"get\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"Get observe session\",\n \"description\": \"Get an observe session: status, error message, config snapshot, web activation info, and the live server endpoint when live.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"sessionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Observe session details\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveSessionResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"End observe session\",\n \"description\": \"End an observe session: tear down the container, revoke credentials, delete the web preview, delete the row. Idempotent.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"sessionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Observe session ended\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}/journeys\": {\n \"get\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"Get observe session journeys\",\n \"description\": \"Assemble the session's cross-runtime journeys server-side: fetch the raw records from the observer, derive the pipeline topology from the config snapshot, and run the pure assembler. Returns the journeys and per-platform loss gaps wrapped with the session scope.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"sessionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Assembled journeys\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveSessionJourneysResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"502\": {\n \"description\": \"Observer unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/journeys\": {\n \"get\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"Get flow journeys\",\n \"description\": \"Resolve the flow's single active Observe session and assemble its cross-runtime journeys server-side. `observe_sessions.flow_id` is UNIQUE, so a flow has at most one session; when none is active the response carries `sessionId: null` with empty journeys rather than a 404. Narrow with `traceId` (one trace) and `limit` (page cap, most recent kept). This is the MCP `observe_journeys` REST contract.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"required\": false,\n \"name\": \"traceId\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 100\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Assembled flow journeys\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/FlowJourneysResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"502\": {\n \"description\": \"Observer unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}/heartbeat\": {\n \"post\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"Heartbeat observe session\",\n \"description\": \"Keep an observe session warm. The window posts this every 30s while open; a stale session is reaped by the janitor.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"sessionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Heartbeat recorded\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveSessionHeartbeatResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}/end\": {\n \"post\": {\n \"tags\": [\"Observe Sessions\"],\n \"summary\": \"End observe session (beacon)\",\n \"description\": \"The navigator.sendBeacon end target for page unload. Mirrors the DELETE end route because sendBeacon cannot send a DELETE. Idempotent.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^ses_[a-zA-Z0-9_-]+$\",\n \"example\": \"ses_abc123xyz456\"\n },\n \"required\": true,\n \"name\": \"sessionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Observe session ended\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/versions\": {\n \"get\": {\n \"tags\": [\"Versions\"],\n \"summary\": \"List versions\",\n \"description\": \"List all versions for a flow.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of versions\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListVersionsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/versions/{versionNumber}\": {\n \"get\": {\n \"tags\": [\"Versions\"],\n \"summary\": \"Get version\",\n \"description\": \"Get a specific version of a flow.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0,\n \"example\": 1\n },\n \"required\": true,\n \"name\": \"versionNumber\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Version details with content\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/GetVersionResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/versions/{versionNumber}/restore\": {\n \"post\": {\n \"tags\": [\"Versions\"],\n \"summary\": \"Restore version\",\n \"description\": \"Restore a flow to a specific version. Creates a new version snapshot. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0,\n \"example\": 1\n },\n \"required\": true,\n \"name\": \"versionNumber\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Flow restored\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Flow\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/tokens\": {\n \"get\": {\n \"tags\": [\"Tokens\"],\n \"summary\": \"List my automation tokens\",\n \"description\": \"The caller's live automation tokens, with the scope and audience each carries. No raw token value is ever returned; `tokenPrefix` is the only fragment of one that survives issuance. A connected app's access token lives in the same store and is deliberately absent: it is taken back by disconnecting the app.\",\n \"responses\": {\n \"200\": {\n \"description\": \"List of automation tokens\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListAutomationTokensResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Tokens\"],\n \"summary\": \"Create automation token\",\n \"description\": \"Mint an automation token for the authenticated user. The audience is `api` and `mcp`, so one token works against REST and against `/api/mcp`, and the chosen scope decides how far it gets at either: `read` is refused every non-safe REST method with 403 `INSUFFICIENT_SCOPE`. The raw token is returned once and cannot be retrieved again, so the answer carries `Cache-Control: no-store`.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateAutomationTokenRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Token created (raw token shown once)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateAutomationTokenResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/tokens/revoke-all\": {\n \"post\": {\n \"tags\": [\"Tokens\"],\n \"summary\": \"Revoke all access\",\n \"description\": \"Revoke every grant this person holds, the tokens hanging from them, and every automation token they hold. Runner tokens survive: those are the credentials deployed flow containers run with, so revoking them would stop every container the person is running. Session only: a bearer credential is refused with 401 `SESSION_REQUIRED`, so a machine token cannot disconnect everything its owner has connected.\",\n \"responses\": {\n \"204\": {\n \"description\": \"Access revoked\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/tokens/{tokenId}\": {\n \"delete\": {\n \"tags\": [\"Tokens\"],\n \"summary\": \"Revoke automation token\",\n \"description\": \"Revoke one of the caller's tokens. Idempotent and scoped to the caller: an unknown id, another person's token and an already revoked one all answer 204, since a distinguishable answer would tell the caller which ids exist.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^tok_[a-zA-Z0-9_-]+$\",\n \"example\": \"tok_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"tokenId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Token revoked\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/bundle\": {\n \"post\": {\n \"tags\": [\"Bundle\"],\n \"summary\": \"Bundle flow\",\n \"description\": \"Bundle a flow for deploy or download. Requires ?output=download: bearer callers get a 302 to a presigned S3 URL, session callers get the bundle bytes streamed. A POST without output=download returns 400.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"my-web-flow\",\n \"description\": \"Named flow to bundle (required for multi-settings flows)\"\n },\n \"required\": false,\n \"description\": \"Named flow to bundle (required for multi-settings flows)\",\n \"name\": \"flow\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"download\"],\n \"description\": \"Required. Must be \\\"download\\\"\"\n },\n \"required\": true,\n \"description\": \"Required. Must be \\\"download\\\"\",\n \"name\": \"output\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Bundle file streamed (session callers)\"\n },\n \"302\": {\n \"description\": \"Redirect to presigned bundle URL (bearer callers)\"\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"502\": {\n \"description\": \"Bundle upstream unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List deployments\",\n \"description\": \"List deployments for a project. Supports filtering by status, type, origin, and flowId, plus pagination.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"idle\",\n \"deploying\",\n \"published\",\n \"active\",\n \"stopped\",\n \"failed\"\n ]\n },\n \"required\": false,\n \"name\": \"status\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"]\n },\n \"required\": false,\n \"name\": \"type\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"cloud\", \"self-hosted\"]\n },\n \"required\": false,\n \"name\": \"origin\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": false,\n \"name\": \"flowId\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"created_at\", \"updated_at\"]\n },\n \"required\": false,\n \"name\": \"sort\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"asc\", \"desc\"]\n },\n \"required\": false,\n \"name\": \"order\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 100\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"required\": false,\n \"name\": \"offset\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"name\": \"cursor\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of deployments\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListDeploymentsResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Create deployment\",\n \"description\": \"Create a new deployment slot. Supports an Idempotency-Key header — a repeated key returns the original deployment id with status `already_created`. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Optional client key to make creation idempotent.\"\n },\n \"required\": false,\n \"description\": \"Optional client key to make creation idempotent.\",\n \"name\": \"idempotency-key\",\n \"in\": \"header\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\"web\", \"server\"],\n \"example\": \"web\"\n },\n \"label\": {\n \"type\": \"string\",\n \"maxLength\": 255\n },\n \"flowId\": {\n \"type\": \"string\"\n },\n \"flowSettingsId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\"]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Deployment created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateDeploymentResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/latest\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List latest deployments\",\n \"description\": \"List the latest deployment for each flow in the project.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Latest deployment per flow\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/LatestDeploymentsByFlow\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/runtimes/register\": {\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Register runtime\",\n \"description\": \"Register a server-side runtime container and get a presigned bundle URL.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/RegisterRuntimeRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Presigned bundle URL\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/observe/ticket\": {\n \"post\": {\n \"tags\": [\"Observe\"],\n \"summary\": \"Create SSE ticket\",\n \"description\": \"Generate a one-time ticket for authenticating an SSE connection to the Observer service. Requires project membership. An optional scope narrows the ticket to a subset of the project feed (e.g. one Observe session).\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"required\": false,\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveTicketRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Ticket generated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveTicketResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/observe/validate-ticket\": {\n \"post\": {\n \"tags\": [\"Observe\"],\n \"summary\": \"Validate ticket\",\n \"description\": \"Internal endpoint for the Observer service to validate and consume a ticket.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ValidateTicketRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Ticket payload\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ValidateTicketResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Invalid or expired ticket\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/health\": {\n \"get\": {\n \"tags\": [\"System\"],\n \"summary\": \"Health check\",\n \"description\": \"Check the health of the API and its dependencies.\",\n \"responses\": {\n \"200\": {\n \"description\": \"Health status\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/HealthResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/openapi.json\": {\n \"get\": {\n \"tags\": [\"System\"],\n \"summary\": \"OpenAPI spec\",\n \"description\": \"Return the OpenAPI 3.1 specification for this API.\",\n \"responses\": {\n \"200\": {\n \"description\": \"OpenAPI document\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {},\n \"additionalProperties\": {}\n }\n }\n }\n }\n }\n }\n },\n \"/ingest/v1/{projectId}\": {\n \"post\": {\n \"tags\": [\"Observer\"],\n \"summary\": \"Event ingestion\",\n \"description\": \"Ingest walkerOS events for a project. Served by the Observer service (port 3001).\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"202\": {\n \"description\": \"Accepted\"\n }\n }\n }\n },\n \"/stream/v1\": {\n \"get\": {\n \"tags\": [\"Observer\"],\n \"summary\": \"SSE stream\",\n \"description\": \"Server-Sent Events stream for real-time event observation. Requires a valid ticket. Served by the Observer service (port 3001).\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"One-time ticket from /api/projects/{projectId}/observe/ticket\"\n },\n \"required\": true,\n \"description\": \"One-time ticket from /api/projects/{projectId}/observe/ticket\",\n \"name\": \"ticket\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Project ID for scoped validation\"\n },\n \"required\": true,\n \"description\": \"Project ID for scoped validation\",\n \"name\": \"project\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"SSE event stream\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/health\": {\n \"get\": {\n \"tags\": [\"Observer\"],\n \"summary\": \"Observer health\",\n \"description\": \"Health check for the Observer service (port 3001).\",\n \"responses\": {\n \"200\": {\n \"description\": \"Health status\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"status\"]\n }\n }\n }\n }\n }\n }\n },\n \"/api/feedback\": {\n \"post\": {\n \"tags\": [\"Feedback\"],\n \"summary\": \"Submit user feedback\",\n \"description\": \"Accepts free-form feedback from the walkerOS CLI, MCP, or a future in-app form. Public endpoint — no authentication required. The body `userId` is stored verbatim as a best-effort contact email and is not validated against the app users table.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/FeedbackRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Feedback stored\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/FeedbackResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/service-accounts\": {\n \"get\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"List service accounts\",\n \"description\": \"List service accounts for a project. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of service accounts\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListServiceAccountsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"Create service account\",\n \"description\": \"Create a service account and its first token. The raw token is returned once and cannot be retrieved again. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateServiceAccountRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Service account created (raw token shown once)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateServiceAccountResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/service-accounts/{serviceAccountId}\": {\n \"get\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"Get service account\",\n \"description\": \"Get a single service account by ID. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sa_abc123\"\n },\n \"required\": true,\n \"name\": \"serviceAccountId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Service account details\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ServiceAccountSummary\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"patch\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"Update service account\",\n \"description\": \"Update a service account's name, description, or role. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sa_abc123\"\n },\n \"required\": true,\n \"name\": \"serviceAccountId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpdateServiceAccountRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Service account updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ServiceAccountSummary\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"Delete service account\",\n \"description\": \"Soft-delete a service account and revoke all its tokens. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sa_abc123\"\n },\n \"required\": true,\n \"name\": \"serviceAccountId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Service account deleted\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/service-accounts/{serviceAccountId}/tokens\": {\n \"get\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"List service account tokens\",\n \"description\": \"List tokens for a service account. Returns summaries (no raw token values). Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sa_abc123\"\n },\n \"required\": true,\n \"name\": \"serviceAccountId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of tokens\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListSaTokensResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"Create service account token\",\n \"description\": \"Create a new token for a service account. The raw token is returned once and cannot be retrieved again. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sa_abc123\"\n },\n \"required\": true,\n \"name\": \"serviceAccountId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateSaTokenRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Token created (raw token shown once)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateSaTokenResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/service-accounts/{serviceAccountId}/tokens/{tokenId}\": {\n \"delete\": {\n \"tags\": [\"Service Accounts\"],\n \"summary\": \"Revoke service account token\",\n \"description\": \"Revoke a service account token. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sa_abc123\"\n },\n \"required\": true,\n \"name\": \"serviceAccountId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"tok_abc123\"\n },\n \"required\": true,\n \"name\": \"tokenId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Token revoked\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/invitations\": {\n \"get\": {\n \"tags\": [\"Invitations\"],\n \"summary\": \"List invitations\",\n \"description\": \"List invitations for a project. Defaults to pending; pass ?status=all for every status. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"pending\",\n \"accepted\",\n \"declined\",\n \"expired\",\n \"cancelled\",\n \"all\"\n ],\n \"example\": \"pending\"\n },\n \"required\": false,\n \"name\": \"status\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"List of invitations\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListInvitationsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Invitations\"],\n \"summary\": \"Create invitation\",\n \"description\": \"Create an invitation and send the invite email. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateInvitationRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Invitation created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateInvitationResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Invitation limit reached\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/invitations/{inviteId}\": {\n \"delete\": {\n \"tags\": [\"Invitations\"],\n \"summary\": \"Cancel invitation\",\n \"description\": \"Cancel a pending invitation. Requires admin role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"inv_abc123\"\n },\n \"required\": true,\n \"name\": \"inviteId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Invitation cancelled\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/invitations/{token}\": {\n \"get\": {\n \"tags\": [\"Invitations\"],\n \"summary\": \"Preview invitation\",\n \"description\": \"Preview invitation details. No authentication required — the token is the credential.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Opaque invitation token (the credential).\",\n \"example\": \"a1b2c3d4e5f6\"\n },\n \"required\": true,\n \"description\": \"Opaque invitation token (the credential).\",\n \"name\": \"token\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Invitation preview\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/InvitationPreview\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/invitations/{token}/accept\": {\n \"post\": {\n \"tags\": [\"Invitations\"],\n \"summary\": \"Accept invitation\",\n \"description\": \"Accept an invitation. Requires authentication; the authenticated user's email must match the invitation email.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Opaque invitation token (the credential).\",\n \"example\": \"a1b2c3d4e5f6\"\n },\n \"required\": true,\n \"description\": \"Opaque invitation token (the credential).\",\n \"name\": \"token\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Invitation accepted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AcceptInvitationResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/invitations/{token}/decline\": {\n \"post\": {\n \"tags\": [\"Invitations\"],\n \"summary\": \"Decline invitation\",\n \"description\": \"Decline an invitation. No authentication required — the token is the credential.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Opaque invitation token (the credential).\",\n \"example\": \"a1b2c3d4e5f6\"\n },\n \"required\": true,\n \"description\": \"Opaque invitation token (the credential).\",\n \"name\": \"token\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Invitation declined\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeclineInvitationResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/telemetry\": {\n \"post\": {\n \"tags\": [\"Telemetry\"],\n \"summary\": \"Submit telemetry event\",\n \"description\": \"Accept a single walkerOS v4 event from the CLI or MCP telemetry emitter. Public endpoint — no authentication. `source.type` is constrained to `cli` or `mcp`.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/TelemetryEvent\"\n }\n }\n }\n },\n \"responses\": {\n \"204\": {\n \"description\": \"Telemetry event accepted\"\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/billing\": {\n \"get\": {\n \"tags\": [\"Billing\"],\n \"summary\": \"Get billing details\",\n \"description\": \"Get billing details for a project, or null when none are set. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Billing details (or null when unset)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/BillingDetailsResponse\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"put\": {\n \"tags\": [\"Billing\"],\n \"summary\": \"Upsert billing details\",\n \"description\": \"Create or update billing details for a project. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpsertBillingDetailsRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Billing details saved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/BillingDetailsResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Get deployment detail\",\n \"description\": \"Get deployment detail. Accepts a dep_ID or a slug. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Deployment detail\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeploymentDetailResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"patch\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Update deployment\",\n \"description\": \"Update a deployment's label, or stop/resume it. Stop and resume require admin role; label updates require member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\",\n \"maxLength\": 255\n },\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\"stop\", \"resume\"]\n }\n }\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Deployment updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpdateDeploymentResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Deployment state changed concurrently\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Delete deployment\",\n \"description\": \"Tear down and soft-delete a deployment. Idempotent. Requires owner role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Deployment deleted (or already absent)\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}/publish\": {\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Publish deployment version\",\n \"description\": \"Push a new version to a deployment, either from an existing flow setting or from a direct config upload. Bundles in-process and transitions the deployment to `deploying`. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Optional client key to make publishing idempotent.\"\n },\n \"required\": false,\n \"description\": \"Optional client key to make publishing idempotent.\",\n \"name\": \"idempotency-key\",\n \"in\": \"header\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"source\": {\n \"type\": \"string\",\n \"enum\": [\"flow\"]\n },\n \"flowId\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\"\n },\n \"flowSettingsName\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 100\n }\n },\n \"required\": [\"source\", \"flowId\", \"flowSettingsName\"]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"source\": {\n \"type\": \"string\",\n \"enum\": [\"config\"]\n },\n \"config\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n }\n },\n \"required\": [\"source\", \"config\"]\n }\n ]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Version published (bundling/deploying)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/PublishVersionResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Publish already in progress\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited or concurrent deploy limit\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"503\": {\n \"description\": \"Build service unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}/stream\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Stream deployment status (SSE)\",\n \"description\": \"Server-Sent Events (`text/event-stream`) stream of a deployment's live status. Emits named events: `status` (a snapshot payload, schema below), `done` (terminal, no body), and `timeout`. The CLI consumes this with a raw fetch while waiting for a deploy to finish. Requires member role. The schema documents the JSON `data:` of a `status` event; `errorCode`/`errorMessage` carry the persisted, redacted classification of a failed deploy.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"SSE stream; `status` event payload shape documented here.\",\n \"content\": {\n \"text/event-stream\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeploymentStreamStatusEvent\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}/versions\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List deployment versions\",\n \"description\": \"List the version history for a deployment, paginated. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 100\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"required\": false,\n \"name\": \"offset\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Version history\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListDeploymentVersionsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/releases\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List flow releases\",\n \"description\": \"List the release history for a flow across all of its deployment lineages, newest first, paginated. Each entry is a deployed version joined to its parent deployment (slug and type). `rationale=true` joins each row's stored rationale summary on, which requires the `hub` feature; without it the `rationale` key is absent from every row rather than null, and no feature beyond member role is needed. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 100\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"required\": false,\n \"name\": \"offset\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"true\", \"false\"]\n },\n \"required\": false,\n \"name\": \"rationale\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Flow release history\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListFlowReleasesResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/releases/{versionId}\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Read one release in full\",\n \"description\": \"One release of this flow with its rationale and its diff. The path segment is either the spine version id (`ver_...`) or the flow-unique spine number, and the route decides which it was, so a caller holding only the number needs no lookup first. The diff is computed server-side from the two stored snapshots and is never accepted from a caller; its predecessor is the next LOWER spine number, not the previous row by time, because spine rows are reused across redeploys of identical content. `diff.text` is rendered from masked content, so an empty string can still mean the releases differ inside an inline secret: `diff.contentIdentical`, compared over the unmasked hashes, is the trustworthy answer. `diff` is null for the flow's oldest release. An unknown address, a sibling flow's version, and an autosave revision all answer 404 alike. Requires member role and the `hub` feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^(ver_[a-zA-Z0-9_-]+|[1-9][0-9]*)$\",\n \"example\": \"ver_a1b2c3d4\",\n \"description\": \"Spine version id of the release (ver_...) or its spine number\"\n },\n \"required\": true,\n \"description\": \"Spine version id of the release (ver_...) or its spine number\",\n \"name\": \"versionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The release, its rationale, and its diff\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ReleaseDetailResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid release reference\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/releases/{versionId}/content\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Read a release snapshot\",\n \"description\": \"The flow config one release of this flow froze, addressed by its spine version id. This is the only route that serves a release snapshot: the positional `/versions/{versionNumber}` route numbers the autosave revisions, a disjoint set of rows, so a release number handed to it addresses an unrelated revision or nothing. Inline secret literals are masked. An unknown id, a sibling flow's version, and an autosave revision all answer 404 alike. Requires member role and the `hub` feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\",\n \"description\": \"Spine version ID of the release (ver_...)\"\n },\n \"required\": true,\n \"description\": \"Spine version ID of the release (ver_...)\",\n \"name\": \"versionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The release snapshot\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ReleaseContentResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid version id\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/releases/annotations\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List release rationale\",\n \"description\": \"Read the rationale attached to the given releases of a flow. `versionIds` is a comma-separated list of spine version ids (at most 100), all of which must belong to this flow. Releases without rationale are absent from the response. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"ver_a1b2c3d4,ver_e5f6g7h8\"\n },\n \"required\": true,\n \"name\": \"versionIds\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Rationale for the requested releases\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListVersionAnnotationsResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid version ids\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"put\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Write release rationale\",\n \"description\": \"Create or update the human rationale for one release of this flow. A null `humanText` clears it. The generated summary is machine-written and cannot be set through this route. The target must be a numbered release version of this flow, not an autosave revision. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"humanText\": {\n \"type\": [\"string\", \"null\"],\n \"maxLength\": 4000\n }\n },\n \"required\": [\"versionId\", \"humanText\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"The stored rationale\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/UpsertVersionAnnotationResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, or the target is not a release\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/threads\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List discussion threads on a flow\",\n \"description\": \"Threads anchored to things in this flow, most recently active first. `anchorType` and `anchorKey` narrow to one anchor and are only meaningful together. `includeMessages=true` attaches the messages; otherwise each thread carries `messageCount` alone. Attaching them holds the page to a smaller ceiling than the lean index and caps each thread at its newest 50 messages, with `hasMoreMessages` set when a thread holds more. Because that ceiling is below the `limit` a caller may pass, the response carries `hasMoreThreads`: a full page is not proof of a complete list. A resolved thread carries the release that settled it, and `resolvedByVersionId` is null once that release is gone, which is what `anchorLabel` is kept for. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"step\", \"entity_action\", \"release\", \"contract\", \"tag\"],\n \"example\": \"release\"\n },\n \"required\": false,\n \"name\": \"anchorType\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"required\": false,\n \"name\": \"anchorKey\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"open\", \"resolved\"],\n \"example\": \"open\"\n },\n \"required\": false,\n \"name\": \"status\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"true\", \"false\"]\n },\n \"required\": false,\n \"name\": \"includeMessages\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"example\": 50\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Threads on this flow\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListHubThreadsResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid query\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Open a discussion thread\",\n \"description\": \"Open a thread on one anchor, with its first message. A thread never exists empty, so `text` is required and may not be blank. A `release` anchor must name a numbered release of this flow: the server verifies it and derives the label, so `anchorLabel` is ignored for that type. For any other anchor type `anchorLabel` is a display snapshot of the anchor as it reads now, stored so a later rename leaves the thread readable instead of unlabeled, and defaults to the anchor key. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\n \"step\",\n \"entity_action\",\n \"release\",\n \"contract\",\n \"tag\"\n ],\n \"example\": \"release\"\n },\n \"anchorKey\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"anchorLabel\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"text\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4000\n }\n },\n \"required\": [\"anchorType\", \"anchorKey\", \"text\"]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"The opened thread, with its first message\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/HubThreadResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, or the anchor is not a release\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Flow not found, or the anchor names no release of it\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/threads/{threadId}/messages\": {\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Reply to a thread\",\n \"description\": \"Append a message to a thread. `text` may not be blank: a message cannot be cleared, so empty is invalid rather than a way to erase one. Replying does not reopen a resolved thread: the resolve link is a statement about a release and is never retracted implicitly. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^thr_[a-z0-9]+$\",\n \"example\": \"thr_a1b2c3d4\",\n \"description\": \"Thread ID (thr_...)\"\n },\n \"required\": true,\n \"description\": \"Thread ID (thr_...)\",\n \"name\": \"threadId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"text\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4000\n }\n },\n \"required\": [\"text\"]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"The thread, with the new message\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/HubThreadResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/threads/{threadId}\": {\n \"patch\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Resolve or reopen a thread\",\n \"description\": \"Resolving records the release that settled the thread: pass `resolvedByVersionId`, or omit it to record the flow’s newest release. The target must be a numbered release of this flow, never an autosave revision. Reopening drops the link. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^thr_[a-z0-9]+$\",\n \"example\": \"thr_a1b2c3d4\",\n \"description\": \"Thread ID (thr_...)\"\n },\n \"required\": true,\n \"description\": \"Thread ID (thr_...)\",\n \"name\": \"threadId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"open\", \"resolved\"],\n \"example\": \"open\"\n },\n \"resolvedByVersionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n }\n },\n \"required\": [\"status\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"The updated thread\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/HubThreadResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, or the target is not a release\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/knowledge\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"List knowledge captured in this project\",\n \"description\": \"What people wrote on the frames of a page, most recently active first. Two kinds come back together and `kind` separates them: a `thread` carries its text in messages, a `description` carries one body and cannot be replied to. `pageKey` narrows to a whole page, resolved server-side to every frame that page holds at any depth; `frameId` narrows to one frame; `markId` narrows to one mark within it and is refused without `frameId`, since a mark id alone addresses nothing. `includeMessages=true` attaches message bodies and holds the page to a much smaller ceiling, so `hasMoreEntries` is what separates a complete answer from a truncated one. `validity` says when an entry was true and `freshness` compares that against the flow’s newest release; neither is a verdict. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"https://shop.example/checkout\"\n },\n \"required\": false,\n \"name\": \"pageKey\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"example\": \"frm_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"required\": false,\n \"name\": \"frameId\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"mark_add_to_cart\"\n },\n \"required\": false,\n \"name\": \"markId\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"true\", \"false\"]\n },\n \"required\": false,\n \"name\": \"includeMessages\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"example\": 50\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Knowledge in this project\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListKnowledgeResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid query, or a mark filter with no frame\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Open a thread on a mark or a frame\",\n \"description\": \"Open a thread on one mark of one frame, or on the frame itself with `anchorType` `page` and no `markId`, with its first message. A thread never exists empty, so `text` is required and may not be blank. `clientThreadId` and `clientMessageId` are minted by the client at compose time and are what make a replay idempotent: repeating a known `clientThreadId` hands back the existing thread and writes nothing, so an offline queue can drain repeatedly without duplicating what a person wrote once. `flowId` binds the capture to a flow or is explicitly null; a flow this project cannot see answers 404, never 403. A frame this project does not hold answers 404 with `FRAME_NOT_FOUND`, which a draining client waits on and retries, because the frame’s own write may not have landed yet. The server decides the composed anchor key, the born release, the author and the source: a client cannot assert any of them. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\"tag\", \"page\"],\n \"example\": \"tag\"\n },\n \"frameId\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"example\": \"frm_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"markId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 200\n },\n \"anchorLabel\": {\n \"type\": \"string\",\n \"maxLength\": 255\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"],\n \"minLength\": 1\n },\n \"subjectKey\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"spatial\": {\n \"$ref\": \"#/components/schemas/KnowledgeSpatial\"\n },\n \"clientThreadId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 64,\n \"example\": \"ct_7f3a91\"\n },\n \"text\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4000\n },\n \"clientMessageId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 64,\n \"example\": \"ct_7f3a91\"\n }\n },\n \"required\": [\n \"anchorType\",\n \"frameId\",\n \"flowId\",\n \"clientThreadId\",\n \"text\",\n \"clientMessageId\"\n ]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"The thread, with its first message\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/KnowledgeThreadResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"The named flow or frame is not in this project\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/knowledge/{threadId}/messages\": {\n \"post\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Reply to a knowledge thread\",\n \"description\": \"Append a message to a thread and get the whole thread back, so a surface renders the new exchange without a second read. `text` may not be blank: a message cannot be cleared, so empty is invalid rather than a way to erase one. Repeating a `clientMessageId` already on the thread appends nothing and leaves `updatedAt` alone, so a retrying drain never keeps bumping a thread to the top of every list. A description has no conversation and cannot be replied to; addressing one answers 404. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^thr_[a-z0-9]+$\",\n \"example\": \"thr_a1b2c3d4\",\n \"description\": \"Thread ID (thr_...)\"\n },\n \"required\": true,\n \"description\": \"Thread ID (thr_...)\",\n \"name\": \"threadId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"text\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4000\n },\n \"clientMessageId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 64,\n \"example\": \"ct_7f3a91\"\n }\n },\n \"required\": [\"text\", \"clientMessageId\"]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"The thread, with the new message\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/KnowledgeThreadResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/knowledge/description\": {\n \"put\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Write the description of a mark or a frame\",\n \"description\": \"Write the one description of one anchor, a mark or the frame itself, replacing whatever it said before. There is no id to mint: the anchor is the key, so a replayed write lands on the same row by construction, which is why this is a PUT. An empty `body` is refused rather than stored, so a drain that arrives with nothing to say can never erase what a person wrote. The response is 200 whether the description was opened or replaced. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"anchorType\": {\n \"type\": \"string\",\n \"enum\": [\"tag\", \"page\"],\n \"example\": \"tag\"\n },\n \"frameId\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"example\": \"frm_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"markId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 200\n },\n \"anchorLabel\": {\n \"type\": \"string\",\n \"maxLength\": 255\n },\n \"flowId\": {\n \"type\": [\"string\", \"null\"],\n \"minLength\": 1\n },\n \"subjectKey\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"spatial\": {\n \"$ref\": \"#/components/schemas/KnowledgeSpatial\"\n },\n \"body\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4000\n }\n },\n \"required\": [\"anchorType\", \"frameId\", \"flowId\", \"body\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"The stored description\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/KnowledgeDescriptionResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"The named flow or frame is not in this project\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/frames\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"List the frames of a page, or of the whole project\",\n \"description\": \"A frame is a named rectangle with marks inside it, the spatial unit of a measurement plan. Naming a `pageKey` returns that page’s frames at any depth, marks and all, newest updated first: the walk starts at the page’s top-level frames and descends containment, so a child is reachable through its parent rather than by carrying a page of its own. Naming no page returns every live frame of the project WITHOUT its marks, which is what makes that read cheap enough to answer \\\"what does this project have\\\": the marks are the bulk of a frame and a listing never renders them. That lean read asks nothing about containment, so a frame whose parent cannot be resolved still appears. `include=marks` asks that project-wide read for the marks anyway, for a surface that spans pages and cannot fetch a page at a time; it is a second, heavier read of the same rows, taken after the lean list has already painted, and omitting it returns exactly the lean rows. It says nothing to the page read, which carries marks either way. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 1024\n },\n \"required\": false,\n \"name\": \"pageKey\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"marks\"]\n },\n \"required\": false,\n \"name\": \"include\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The page’s frames with their marks, or the project’s frames without them\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/FrameListResponse\"\n },\n {\n \"$ref\": \"#/components/schemas/FrameLeanListResponse\"\n }\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/frames/{frameId}\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Read one frame\",\n \"description\": \"One frame with its marks. A frame of another project reads back as nothing and answers 404, never 403, so this route cannot become an oracle for what exists elsewhere. A deleted frame is gone to every read. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"description\": \"Frame ID (frm_...)\"\n },\n \"required\": true,\n \"description\": \"Frame ID (frm_...)\",\n \"name\": \"frameId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The frame\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Frame\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"The path segment does not address a frame\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"put\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Create or replace one frame\",\n \"description\": \"The path is the identity, so the body carries no id: a create is a write to an absent row at `baseVersion` 0 and everything else is a replace. `clientWriteId` is minted at compose time and is what makes a replayed drain exact: a write whose id already produced the stored version landed once and is answered with that version, writing nothing, so an offline queue drains repeatedly without turning one edit into two versions. A write against a version someone else has moved past answers 409 `FRAME_VERSION_CONFLICT` carrying the head, which is what lets a client raise keep-mine against load-theirs on the one frame that conflicted instead of dropping what a person drew. A name another live frame already holds is a distinct 409 `FRAME_NAME_EXISTS`. A relation naming a frame this project does not hold, or one that would place a frame inside itself, is 400 `INVALID_FRAME`. The screenshot is never touched here: a frame write carries no capture. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"description\": \"Frame ID (frm_...)\"\n },\n \"required\": true,\n \"description\": \"Frame ID (frm_...)\",\n \"name\": \"frameId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"frame\": {\n \"$ref\": \"#/components/schemas/FrameInput\"\n },\n \"baseVersion\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"clientWriteId\": {\n \"type\": \"string\",\n \"pattern\": \"^cw_[A-Za-z0-9_-]{21}$\"\n }\n },\n \"required\": [\"frame\", \"baseVersion\", \"clientWriteId\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"The stored version\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/PutFrameResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, a bad relation, or a path segment that addresses no frame\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"A stale base version, carrying the head, or a name another live frame already holds. Only the version conflict carries `head`: a name clash needs no frame to resolve, since the client already knows the name it sent.\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/FrameConflictResponse\"\n },\n {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n ]\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Delete one frame\",\n \"description\": \"Soft-delete the frame and, transitively, every variation of what this delete removes. Children are not variations and survive: each live frame under a removed one is re-parented to its nearest live ancestor in the same transaction, and one left with no live ancestor becomes top-level and inherits the page it hung under, so nothing is left unreachable. Those re-parents are server writes that bump their own versions, so a client still holding a pre-delete version meets a conflict carrying the new parent. A frame this project does not hold answers 404: a delete that removed nothing is not a delete that succeeded. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"description\": \"Frame ID (frm_...)\"\n },\n \"required\": true,\n \"description\": \"Frame ID (frm_...)\",\n \"name\": \"frameId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"The frame is deleted\"\n },\n \"400\": {\n \"description\": \"The path segment does not address a frame\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/frames/{frameId}/screenshot\": {\n \"post\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Store the capture of one frame\",\n \"description\": \"Store one screenshot and set it on its frame. The image arrives as base64 rather than multipart, because the extension relay carries string bodies only. The server decides everything about the bytes: it decodes them, counts the DECODED length against a 4 MB cap, reads the type from the file’s own magic bytes, and hashes them, so nothing the client claims about size or type is consulted. Captures are deduplicated by content within a project: identical pixels resolve to one asset and one upload, and `reused` says whether that happened, which is the common answer rather than the rare one because re-capturing an unchanged frame produces identical bytes. A body past the cap is 413 `PAYLOAD_TOO_LARGE` and one that is not a PNG is 415 `UNSUPPORTED_MEDIA_TYPE`. The capture bumps no frame version: it is not an edit, so an upload never conflicts with the frame write the client queued beside it. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^frm_[A-Za-z0-9_-]{21}$\",\n \"description\": \"Frame ID (frm_...)\"\n },\n \"required\": true,\n \"description\": \"Frame ID (frm_...)\",\n \"name\": \"frameId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"imageBase64\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"meta\": {\n \"$ref\": \"#/components/schemas/FrameScreenshotMeta\"\n }\n },\n \"required\": [\"imageBase64\", \"meta\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"The asset the bytes resolved to, and whether it already existed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ScreenshotUploadResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, or a path segment that addresses no frame\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"This project does not hold the named frame\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"413\": {\n \"description\": \"The decoded image is past the 4 MB cap\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"415\": {\n \"description\": \"The bytes are not a PNG\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/assets/{assetId}\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Read one stored capture\",\n \"description\": \"The bytes of one frame screenshot, for the app canvas. The extension keeps its own capture locally and never reads assets back. Same-origin and session-authenticated: the response carries `Cross-Origin-Resource-Policy: same-origin`, so no other site can embed a tenant capture off the reader’s session. The bytes are immutable by construction, since the object key is their own content hash, which is why they are cacheable for a year, and `private` keeps a shared cache from serving one tenant’s capture to the next request for the same URL. An asset another project holds answers 404, never 403. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^fas_[A-Za-z0-9_-]{21}$\",\n \"description\": \"Asset ID (fas_...)\"\n },\n \"required\": true,\n \"description\": \"Asset ID (fas_...)\",\n \"name\": \"assetId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The image bytes\",\n \"content\": {\n \"image/png\": {\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"binary\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"The path segment does not address an asset\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/canvases\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"List the canvases of the project\",\n \"description\": \"A canvas is a named, freely arranged board over a project’s frames, the surface on which a plan is laid out across pages rather than within one. This returns every live canvas by name WITHOUT its document: the document is the bulk of a canvas and a listing renders none of it, so opening a board is the single-canvas read. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The project’s canvases, without their documents\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CanvasListResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Create one canvas\",\n \"description\": \"Create one empty canvas at version 1. The id is the client’s, so a board drawn before the first save keeps its identity when it arrives. A canvas comes into existence here and nowhere else: a document write to an id the project does not hold is a 404 rather than a create, which is what keeps a stray write from minting a board. A name another live canvas already holds is 409 `CANVAS_NAME_EXISTS`; the partial unique index is over live rows, so a name a deleted canvas still carries is free. An id that is not a canvas id is refused by the body schema as 400 `VALIDATION_ERROR`. An id that is not available, because a canvas, in this project or another, already holds it, is 400 `INVALID_CANVAS`, whose message says nothing about the project that holds it. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^cnv_[A-Za-z0-9_-]{21}$\",\n \"example\": \"cnv_V1StGXR8Z5jdHi6BmyT7K\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n }\n },\n \"required\": [\"id\", \"name\"]\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"The created canvas, with its empty document\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Canvas\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, or an id that is not available\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"A name another live canvas already holds\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/canvases/{canvasId}\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Read one canvas\",\n \"description\": \"One canvas with its whole document: the nodes with their positions, the edges, and the node keys the board suppresses. A canvas of another project reads back as nothing and answers 404, never 403, so this route cannot become an oracle for what exists elsewhere. A deleted canvas is gone to every read. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cnv_[A-Za-z0-9_-]{21}$\",\n \"example\": \"cnv_V1StGXR8Z5jdHi6BmyT7K\",\n \"description\": \"Canvas ID (cnv_...)\"\n },\n \"required\": true,\n \"description\": \"Canvas ID (cnv_...)\",\n \"name\": \"canvasId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The canvas\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Canvas\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"The path segment does not address a canvas\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"put\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Replace the document of one canvas\",\n \"description\": \"The whole board every time: a canvas is read and written as a unit, so there is no partial write to reconcile. `clientWriteId` is minted at compose time and is what makes a replayed drain exact: a write whose id already produced the stored version landed once and is answered with that version, writing nothing, so an offline queue drains repeatedly without turning one edit into two versions. A write against a version someone else has moved past answers 409 `CANVAS_VERSION_CONFLICT` carrying the head, which is what lets a client raise keep-mine against load-theirs on the board that conflicted instead of dropping what a person drew. A canvas this project does not hold, or one that was removed, is 404 `CANVAS_NOT_FOUND`: this door replaces a document and never creates one. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cnv_[A-Za-z0-9_-]{21}$\",\n \"example\": \"cnv_V1StGXR8Z5jdHi6BmyT7K\",\n \"description\": \"Canvas ID (cnv_...)\"\n },\n \"required\": true,\n \"description\": \"Canvas ID (cnv_...)\",\n \"name\": \"canvasId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"document\": {\n \"$ref\": \"#/components/schemas/CanvasDocument\"\n },\n \"baseVersion\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"clientWriteId\": {\n \"type\": \"string\",\n \"pattern\": \"^cw_[A-Za-z0-9_-]{21}$\"\n }\n },\n \"required\": [\"document\", \"baseVersion\", \"clientWriteId\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"The stored version\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/PutCanvasResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, or a path segment that addresses no canvas\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"This project does not hold the named canvas\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"A stale base version, carrying the head\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CanvasConflictResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/releases/step-history\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List the releases that touched one step\",\n \"description\": \"The releases of this flow that added, changed, or removed one step, newest first, each carrying the rationale stored for it. `step` is a `type.name` key over source, transformer, destination, store, and contract. `flow` narrows the scan to one named flow inside the config and is ignored for a contract key. `limit` bounds the releases scanned, not the entries returned. When nothing matched, `knownSteps` lists the addressable keys of the newest scanned release. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"destination.ga4\"\n },\n \"required\": true,\n \"name\": \"step\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"web\"\n },\n \"required\": false,\n \"name\": \"flow\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": [\"integer\", \"null\"],\n \"example\": 25\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"The releases that touched the step\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/StepHistoryResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid step key or query\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/releases/summarize\": {\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Summarize or check a release\",\n \"description\": \"Describe what one release of this flow changed against an earlier release, or check a written note against that same change. In `draft` mode the generated text is stored as the release's generated summary; in `check` mode nothing is stored and the response says whether the note matches. The diff is always recomputed from the two stored snapshots, with secret literals masked, and is never taken from the request. Both versions must be numbered releases of this flow, and `prevVersionId` must be the earlier of the two. Requires member role and the `hub` feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"versionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"prevVersionId\": {\n \"type\": \"string\",\n \"pattern\": \"^ver_[a-zA-Z0-9_-]+$\",\n \"example\": \"ver_a1b2c3d4\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\"draft\", \"check\"]\n },\n \"currentText\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 4000\n }\n },\n \"required\": [\"versionId\", \"prevVersionId\", \"mode\"]\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"The generated summary or the check verdict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/SummarizeReleaseResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid body, a target is not a release, the pair is out of order, or no LLM provider is configured\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"502\": {\n \"description\": \"The model call failed or returned no usable text\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}/versions/current/content\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Get current deployed content\",\n \"description\": \"Get the active deployed per-setting content for a deployment, used to diff changes since deploy. Content is masked and display-only; every field is null when there is no deployed baseline. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Deployed content (or a null baseline)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeployedContentResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Rate limited\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}/heartbeats\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List deployment heartbeats\",\n \"description\": \"List heartbeat records for a deployment with optional from/to time-range filtering and pagination. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"ISO start of the time range.\"\n },\n \"required\": false,\n \"description\": \"ISO start of the time range.\",\n \"name\": \"from\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"ISO end of the time range.\"\n },\n \"required\": false,\n \"description\": \"ISO end of the time range.\",\n \"name\": \"to\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 1000\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"required\": false,\n \"name\": \"offset\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Heartbeat history\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListHeartbeatsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}/rotate-ingest-token\": {\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Rotate ingest token\",\n \"description\": \"Rotate the ingest token for a deployment. Owner-only. No grace window: the previous token is immediately invalidated and the new token is returned once.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"New ingest token\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/RotateIngestTokenResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/deployments/{deploymentId}/usage\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Deployment usage\",\n \"description\": \"Aggregate usage summary plus bucketed chart data for a deployment over the requested period. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dep_abc123\"\n },\n \"required\": true,\n \"name\": \"deploymentId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\"1h\", \"24h\", \"7d\", \"30d\"],\n \"description\": \"Time window for the usage summary.\"\n },\n \"required\": false,\n \"description\": \"Time window for the usage summary.\",\n \"name\": \"period\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Usage summary and chart buckets\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeploymentUsageResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/custom-domains\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List custom domains\",\n \"description\": \"List custom domains attached to any deployment of this flow. Requires member role and the customDomains feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Custom domains for the flow\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListCustomDomainsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Attach custom domain\",\n \"description\": \"Attach a custom domain to the flow's latest server deployment, or to an explicit deployment supplied in the body. Requires member role and the customDomains feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateCustomDomainRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Custom domain attached\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CustomDomain\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"409\": {\n \"description\": \"Conflict\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/custom-domains/{domainId}\": {\n \"delete\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Detach custom domain\",\n \"description\": \"Detach a custom domain from its deployment and remove the Scaleway record. Idempotent: a missing domain still returns 204.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"dom_abc123\"\n },\n \"required\": true,\n \"name\": \"domainId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Custom domain detached\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy-token\": {\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Self-hosted deploy-token status\",\n \"description\": \"Report whether a self-hosted deploy token exists for this config, plus the deployment health summary when present. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Deploy-token status\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeployTokenStatusResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Mint self-hosted deploy token\",\n \"description\": \"Create a self-hosted deployment (if none exists) and mint a flow+deployment-bound runner token. Admin-only. The raw token is returned once and never stored in plaintext.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^flow_[a-zA-Z0-9_-]+$\",\n \"example\": \"flow_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"flowId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^cfg_[a-zA-Z0-9_-]+$\",\n \"example\": \"cfg_a1b2c3d4\"\n },\n \"required\": true,\n \"name\": \"settingsId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"201\": {\n \"description\": \"Deploy token minted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateDeployTokenResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/entitlements\": {\n \"get\": {\n \"tags\": [\"Projects\"],\n \"summary\": \"Resolved entitlements\",\n \"description\": \"Return resolved feature entitlements for the authenticated user and project. Used by CLI/API clients; the web UI uses SSR-resolved entitlements. Requires viewer role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Resolved entitlements\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/EntitlementsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/settings/llm\": {\n \"get\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Active LLM provider\",\n \"description\": \"Report which LLM provider is currently active for the project and where billing is sourced. Never returns the apiKey. Requires member role and the chat feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Active LLM provider status\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/LlmConfigStatusResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"503\": {\n \"description\": \"No platform LLM provider configured\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/LlmConfigStatusResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"Settings\"],\n \"summary\": \"Set LLM provider\",\n \"description\": \"Set or clear the project LLM provider override. Admin-only, gated by the chat feature. The apiKey is write-only: it is encrypted and never returned.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/SetLlmConfigRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"LLM config saved or cleared\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/SetLlmConfigResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/chat/sessions\": {\n \"get\": {\n \"tags\": [\"Chat\"],\n \"summary\": \"List chat sessions\",\n \"description\": \"List the caller's recent chat sessions for a project, ordered by last activity. Requires member role and the chat feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 100\n },\n \"required\": false,\n \"name\": \"limit\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 0\n },\n \"required\": false,\n \"name\": \"offset\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Chat session list\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListChatSessionsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/chat/sessions/{sessionId}\": {\n \"get\": {\n \"tags\": [\"Chat\"],\n \"summary\": \"Get chat session\",\n \"description\": \"Return a chat session and its full message history when the caller owns it. Foreign or unknown sessions return 404 (never 403) so existence is not leaked. Requires member role and the chat feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"sess_abc123\"\n },\n \"required\": true,\n \"name\": \"sessionId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Chat session with messages\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ChatSessionDetailResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/chat/elicit\": {\n \"post\": {\n \"tags\": [\"Chat\"],\n \"summary\": \"Answer elicitation prompt\",\n \"description\": \"Answer a pending MCP elicitation prompt (accept, decline, or cancel), unblocking the waiting tool invocation. Requires member role and the chat feature.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ElicitRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Elicitation resolved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ElicitResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/runners\": {\n \"get\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"List runners (deprecated)\",\n \"description\": \"Deprecated: runners migrated to deployments (origin=self-hosted). Always returns an empty list for backward compatibility. Requires member role.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Empty runner list\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListRunnersResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/projects/{projectId}/runners/heartbeat\": {\n \"post\": {\n \"tags\": [\"Deployments\"],\n \"summary\": \"Runner heartbeat\",\n \"description\": \"Accept a self-hosted runner heartbeat with usage counters. Authenticated by a flow+deployment-bound runner token. Updates deployment liveness and records an immutable usage row.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"pattern\": \"^proj_[a-zA-Z0-9_-]+$\",\n \"example\": \"proj_x7y8z9\"\n },\n \"required\": true,\n \"name\": \"projectId\",\n \"in\": \"path\"\n }\n ],\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/HeartbeatRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Heartbeat accepted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/RunnerHeartbeatResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/packages\": {\n \"get\": {\n \"tags\": [\"System\"],\n \"summary\": \"Package catalog\",\n \"description\": \"Resolved `@walkeros/*` package catalog for the add-step picker, optionally filtered by type and platform.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Filter by package type.\"\n },\n \"required\": false,\n \"description\": \"Filter by package type.\",\n \"name\": \"type\",\n \"in\": \"query\"\n },\n {\n \"schema\": {\n \"type\": \"string\",\n \"description\": \"Filter by platform.\"\n },\n \"required\": false,\n \"description\": \"Filter by platform.\",\n \"name\": \"platform\",\n \"in\": \"query\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Package catalog\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/PackageCatalogResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"502\": {\n \"description\": \"Package catalog unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/packages/search\": {\n \"get\": {\n \"tags\": [\"System\"],\n \"summary\": \"Search packages\",\n \"description\": \"Returns the full @walkeros/* package catalog; clients filter locally.\",\n \"responses\": {\n \"200\": {\n \"description\": \"Search results\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/PackageSearchResponse\"\n }\n }\n }\n },\n \"502\": {\n \"description\": \"Package search unavailable\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"System\"],\n \"summary\": \"Log a settled search\",\n \"description\": \"Records one settled search outcome (the term the user paused on and whether the catalog matched it). Fire-and-forget; returns 204.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/PackageSearchLogRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"204\": {\n \"description\": \"Search logged\"\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/observe/timing\": {\n \"post\": {\n \"tags\": [\"Observe\"],\n \"summary\": \"Report connect timing\",\n \"description\": \"Fire-and-forget beacon for client-side connect timing SLIs. No auth required; carries no secrets. Returns 204.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ObserveTimingRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"204\": {\n \"description\": \"Timing recorded\"\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/register\": {\n \"post\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Register a client\",\n \"description\": \"RFC 7591 dynamic client registration. Unauthenticated: a client registers itself before it holds any credential. Issues public clients only (`token_endpoint_auth_method: none`), which prove themselves with PKCE. Errors use the RFC 7591 section 3.2.2 shape, not the standard error envelope.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthClientRegistrationRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Client registered\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthClientRegistrationResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Invalid client metadata or redirect URI\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthRegistrationError\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Registration ceiling reached (Retry-After header)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/device_authorization\": {\n \"post\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Start a device authorization\",\n \"description\": \"RFC 8628 section 3.1. A client that cannot host a browser redirect asks for a device code and a user code here, then polls the token endpoint while the person approves the user code at `/oauth/device`. Unauthenticated, and public clients only: the code is worth nothing until a signed-in person approves it. Body is `application/x-www-form-urlencoded`; errors use the RFC 6749 section 5.2 shape, not the standard error envelope.\",\n \"requestBody\": {\n \"content\": {\n \"application/x-www-form-urlencoded\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeviceAuthorizationRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Device authorization opened\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeviceAuthorizationResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"invalid_request, unauthorized_client, invalid_scope or invalid_target\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthError\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"invalid_client: unknown, revoked or confidential client\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthError\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/token\": {\n \"post\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Exchange a grant for tokens\",\n \"description\": \"RFC 6749 section 3.2. Runs the authorization code, refresh token and device code grants. The client authenticates here: a public client with PKCE, a confidential one with HTTP Basic or a form secret. Body is `application/x-www-form-urlencoded` only; errors use the RFC 6749 section 5.2 shape, not the standard error envelope, and a failed Basic authentication is answered with a `WWW-Authenticate: Basic` challenge. Responses are never cacheable. Rate limited per `client_id`.\",\n \"requestBody\": {\n \"content\": {\n \"application/x-www-form-urlencoded\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/TokenRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Tokens issued\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/TokenResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"invalid_request, invalid_grant, invalid_scope, invalid_target, unsupported_grant_type, or a device grant status (authorization_pending, slow_down, access_denied, expired_token)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthError\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"invalid_client: unknown, revoked, or bad credentials\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthError\"\n }\n }\n }\n },\n \"429\": {\n \"description\": \"Per-client token budget reached (Retry-After header)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/revoke\": {\n \"post\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Revoke a token\",\n \"description\": \"RFC 7009. Client authentication is the same as at the token endpoint. A refresh token revokes its whole rotation family, an access token only itself. An authenticated request always answers 200 with an empty body, unknown tokens included: a distinguishable answer would be an oracle. Body is `application/x-www-form-urlencoded`.\",\n \"requestBody\": {\n \"content\": {\n \"application/x-www-form-urlencoded\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/RevocationRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Revoked, or nothing matched\"\n },\n \"400\": {\n \"description\": \"invalid_request or unsupported_token_type\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthError\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"invalid_client: unknown, revoked, or bad credentials\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthError\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/device/approve\": {\n \"post\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Decide a device authorization\",\n \"description\": \"The person's approve or deny decision on a pending device authorization. Session only: a bearer credential is refused with 401 `SESSION_REQUIRED`, so a machine token can never approve its own device. Requires the `X-CSRF-Token` minted with the consent page, bound to this user code.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeviceApprovalRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Decision recorded\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/DeviceApprovalResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"403\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/authorize\": {\n \"post\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Decide a consent request\",\n \"description\": \"The person's allow or deny decision on the consent screen at `/oauth/authorize`. The ticket is the HMAC-signed authorization request that screen was rendered from, so the decision cannot alter what was validated, and it is bound to the person it was minted for. Session only: a bearer credential is refused with 401 `SESSION_REQUIRED`, so a machine token can never approve a consent. The response says where to send the browser: the client's registered redirect URI, carrying `code` on allow and `error=access_denied` on deny.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthConsentDecisionRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"200\": {\n \"description\": \"Decision recorded\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/OAuthConsentDecisionResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/grants\": {\n \"get\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"List connected apps\",\n \"description\": \"The apps the signed-in person has consented to, as the Connected apps page renders them. Revoked grants are absent. Session only: a bearer credential is refused with 401 `SESSION_REQUIRED`, so a machine token cannot read the connections its owner holds.\",\n \"responses\": {\n \"200\": {\n \"description\": \"Connected apps\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListOAuthGrantsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"delete\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Disconnect every app\",\n \"description\": \"Revoke every grant this person holds and the tokens hanging from them. Automation tokens hang from no grant and survive. Session only: a bearer credential is refused with 401 `SESSION_REQUIRED`, so a read-scoped machine token cannot disconnect everything its owner has connected.\",\n \"responses\": {\n \"204\": {\n \"description\": \"Apps disconnected\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/oauth/grants/{grantId}\": {\n \"delete\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Disconnect one app\",\n \"description\": \"Revoke one grant and the tokens hanging from it. Idempotent: an unknown grant, another person's grant and an already revoked one all answer 204, and the token sweep runs either way, so pressing Disconnect twice cleans up a token minted inside the first press's window. Session only: a bearer credential is refused with 401 `SESSION_REQUIRED`.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"grant_abc123\"\n },\n \"required\": true,\n \"name\": \"grantId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"App disconnected\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/admin/oauth/clients\": {\n \"get\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"List OAuth clients\",\n \"description\": \"Every registered OAuth client, revoked ones included. No secret material is returned. Admin only: a non-admin caller gets 404, not 403, so the endpoint does not confirm its own existence.\",\n \"responses\": {\n \"200\": {\n \"description\": \"OAuth client list\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ListOAuthClientsResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Create a confidential OAuth client\",\n \"description\": \"Create an OAuth client that authenticates with a secret. The raw secret is returned exactly once and is never retrievable afterwards. Admin only: a non-admin caller gets 404, not 403.\",\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateOAuthClientRequest\"\n }\n }\n }\n },\n \"responses\": {\n \"201\": {\n \"description\": \"Client created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/CreateOAuthClientResponse\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Validation error\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n },\n \"/api/admin/oauth/clients/{clientId}\": {\n \"delete\": {\n \"tags\": [\"OAuth\"],\n \"summary\": \"Revoke an OAuth client\",\n \"description\": \"Revoke a client together with the grants consented to it and the tokens minted under them. Admin only: a non-admin caller gets 404, not 403, the same answer an unknown client id gets.\",\n \"parameters\": [\n {\n \"schema\": {\n \"type\": \"string\",\n \"example\": \"client_abc123\"\n },\n \"required\": true,\n \"name\": \"clientId\",\n \"in\": \"path\"\n }\n ],\n \"responses\": {\n \"204\": {\n \"description\": \"Client revoked\"\n },\n \"401\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"Not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/ErrorResponse\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"webhooks\": {}\n}\n","/**\n * One spelling of a walkerOS app base URL, so every consumer concatenates a\n * path onto the same shape.\n *\n * The two doors resolve their base from different worlds and neither\n * guarantees the shape on its own: the local door hands back whatever\n * `WALKEROS_APP_URL` or the CLI config file holds, and a valid URL may carry a\n * trailing slash, a query string or a fragment. Normalizing at the seam is what\n * keeps a link built from one door from reading\n * `https://app.example.com//projects/...` while the same link from the other\n * door reads cleanly.\n *\n * A query or a fragment is worse than a stray slash, because a path appended to\n * one lands INSIDE it: `https://app.example.com?a=b` plus `/projects/p1` reads\n * `https://app.example.com?a=b/projects/p1`, which is a broken link that a tool\n * then puts in somebody's chat transcript. Neither belongs on a base URL, so\n * both are dropped. The path is kept: an app mounted under a subpath is a real\n * deployment, and dropping it would break every link instead of fixing one.\n *\n * This never throws, deliberately. Its callers include `diagnostics`, whose job\n * is to NAME a misconfigured app URL; a normalizer that threw would take out\n * the tool that exists to report the problem. A string that does not parse as a\n * URL is handed back with only its trailing slashes trimmed, and fails later at\n * the request, where the error names the URL.\n */\nexport function normalizeBaseUrl(url: string): string {\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n return stripTrailingSlashes(url);\n }\n\n parsed.search = '';\n parsed.hash = '';\n return stripTrailingSlashes(parsed.toString());\n}\n\nfunction stripTrailingSlashes(value: string): string {\n return value.replace(/\\/+$/, '');\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\n\nconst TITLE = 'Authentication';\nconst DESCRIPTION =\n 'Manage walkerOS authentication. Check login status, log in via the device authorization grant, or log out. ' +\n 'No terminal or browser required, the MCP client handles the authorization URL.';\n\nconst inputSchema = {\n action: z\n .enum(['status', 'login', 'logout'])\n .describe('Authentication action to perform'),\n deviceCode: z\n .string()\n .optional()\n .describe(\n 'Device code from a previous pending login attempt. Provide to resume polling without requesting a new code.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createAuthToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'auth',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => authHandlerBody(client, input),\n };\n}\n\nasync function authHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { action, deviceCode } = parsed.data;\n try {\n switch (action) {\n case 'status': {\n if (!client.credentialSource()) {\n return mcpResult(\n { authenticated: false },\n { next: ['Use auth with action \"login\" to authenticate'] },\n );\n }\n const user = await client.whoami();\n return mcpResult({\n authenticated: true,\n ...fieldsOf(user),\n });\n }\n\n case 'login': {\n if (deviceCode) {\n const poll = await client.pollForToken(deviceCode, {\n timeoutMs: 60000,\n });\n\n if (poll.status === 'ok') {\n return mcpResult(\n { authenticated: true },\n {\n next: [\n 'Use auth with action \"status\" to see which account you are on',\n 'Use project_manage with action \"list\" to see your projects',\n ],\n },\n );\n }\n\n // The approval is still outstanding, so the code is still good and\n // the same one comes back for the next attempt. `slow_down` is the\n // server asking for a wider gap before that attempt.\n if (poll.status === 'pending' || poll.status === 'slow_down') {\n return mcpResult({\n authenticated: false,\n status: 'pending',\n message:\n poll.status === 'slow_down'\n ? 'Still waiting, and the server asked for a longer gap between checks. Try again in a minute.'\n : 'Still waiting for authorization. Try again shortly.',\n deviceCode,\n });\n }\n\n if (poll.status === 'denied')\n return mcpError(new Error('Authorization was denied.'));\n if (poll.status === 'expired')\n return mcpError(\n new Error(\n 'The one-time code expired. Run auth with action \"login\" for a new one.',\n ),\n );\n\n return mcpError(new Error(poll.error));\n }\n\n const code = await client.requestDeviceCode();\n const loginUrl = code.verificationUriComplete;\n\n return mcpResult({\n authenticated: false,\n status: 'awaiting_authorization',\n loginUrl,\n message: `Open this link to authorize: ${loginUrl}`,\n deviceCode: code.deviceCode,\n });\n }\n\n case 'logout': {\n const { deleted } = await client.logout();\n const hadEnvToken =\n typeof process.env.WALKEROS_TOKEN === 'string' &&\n process.env.WALKEROS_TOKEN.length > 0;\n delete process.env.WALKEROS_TOKEN;\n let message: string;\n if (deleted && hadEnvToken) {\n message =\n 'Logged out. Config removed and WALKEROS_TOKEN cleared from process environment.';\n } else if (deleted) {\n message = 'Logged out and config removed.';\n } else if (hadEnvToken) {\n message =\n 'No config found. WALKEROS_TOKEN cleared from process environment.';\n } else {\n message = 'No config found, already logged out.';\n }\n return mcpResult({\n loggedOut: true,\n message,\n });\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: status, login, logout`,\n );\n }\n } catch (error) {\n return mcpError(error);\n }\n}\n\nexport function registerAuthTool(server: McpServer, client: ToolClient) {\n const spec = createAuthToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => authHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { wrapUserData } from '../user-data.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf, isRecord, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n PROJECT_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\n\n/** A project record with its display name wrapped as user data. */\nfunction wrapProjectName(project: unknown): unknown {\n const name = stringField(project, 'name');\n return isRecord(project) && name !== undefined\n ? { ...project, name: wrapUserData(name) }\n : project;\n}\n\nconst TITLE = 'Project Management';\nconst DESCRIPTION =\n 'Manage walkerOS projects. List, create, update, delete projects, or set a default project for CLI operations.';\n\nconst inputSchema = {\n action: z\n .enum(['list', 'get', 'create', 'update', 'delete', 'set_default'])\n .describe('Project management action to perform'),\n projectId: z\n .string()\n .optional()\n .describe('Required for get, update, delete, set_default.'),\n name: z\n .string()\n .optional()\n .describe(\n 'Required for create and update (update also requires projectId).',\n ),\n cursor: z\n .string()\n .optional()\n .describe(\n 'Pagination cursor from a previous list response. Only used with the list action.',\n ),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe('Max items per page (1-100). Only used with the list action.'),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createProjectManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'project_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => projectManageHandlerBody(client, input),\n };\n}\n\nasync function projectManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { action, projectId, name, cursor, limit } = parsed.data;\n const validationError = validateActionInput(\n 'project_manage',\n action ?? '',\n { projectId, name },\n PROJECT_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n switch (action) {\n case 'list': {\n const projects = await client.listProjects({ cursor, limit });\n const listed = isRecord(projects) ? projects.projects : undefined;\n const items = Array.isArray(projects)\n ? projects\n : Array.isArray(listed)\n ? listed\n : [];\n if (items.length === 0) {\n return mcpResult(\n { projects: [] },\n {\n next: [\n 'Use project_manage with action \"create\" to create your first project',\n 'Use project_manage with action \"set_default\" after creating to set it as default',\n ],\n },\n );\n }\n const safe = Array.isArray(projects)\n ? items.map(wrapProjectName)\n : { ...fieldsOf(projects), projects: items.map(wrapProjectName) };\n return mcpResult(safe);\n }\n\n case 'get': {\n const project = await client.getProject({ projectId });\n return mcpResult(wrapProjectName(project));\n }\n\n case 'create': {\n assertParam(name, 'name', 'create');\n const created = await client.createProject({ name });\n return mcpResult(wrapProjectName(created), {\n next: [\n 'Use project_manage with action \"set_default\" to make this your active project',\n ],\n });\n }\n\n case 'update': {\n assertParam(name, 'name', 'update');\n const updated = await client.updateProject({ projectId, name });\n return mcpResult(wrapProjectName(updated));\n }\n\n case 'delete': {\n const deleted = await client.deleteProject({ projectId });\n return mcpResult(deleted);\n }\n\n case 'set_default': {\n assertParam(projectId, 'projectId', 'set_default');\n client.setDefaultProject(projectId);\n return mcpResult(\n { defaultProjectId: projectId },\n {\n next: [\n 'Use flow_manage with action \"list\" to see flows in this project',\n ],\n },\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: list, get, create, update, delete, set_default`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerProjectManageTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createProjectManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => projectManageHandlerBody(client, args),\n );\n}\n","export interface ActionRule {\n /** Params that must each be present for this action. */\n required?: string[];\n /** Param groups where at least one of each group must be present. */\n oneOf?: string[][];\n /** Optional discovery hint appended to the error (e.g. 'Use action \"list\" ...'). */\n hint?: string;\n}\n\nexport type ActionRequirementMap = Record<string, ActionRule>;\n\n/**\n * Returns a canonical error message string when `input` is missing a\n * required (or one-of) param for `action`, otherwise null. The message is\n * uniform across tools so error quality cannot drift between tools.\n * Required params are checked (and reported) before oneOf groups.\n */\nexport function validateActionInput(\n toolName: string,\n action: string,\n input: Record<string, unknown>,\n map: ActionRequirementMap,\n): string | null {\n const rule = map[action];\n if (!rule) return null;\n for (const param of rule.required ?? []) {\n if (\n input[param] === undefined ||\n input[param] === null ||\n input[param] === ''\n ) {\n return missing(toolName, action, param, rule.hint);\n }\n }\n for (const group of rule.oneOf ?? []) {\n const satisfied = group.some(\n (p) => input[p] !== undefined && input[p] !== null && input[p] !== '',\n );\n if (!satisfied) {\n return `${toolName} action \"${action}\" requires one of: ${group.join(', ')}.${rule.hint ? ' ' + rule.hint : ''}`;\n }\n }\n return null;\n}\n\n/**\n * Narrows a param that the action's requirement map has already validated as\n * present, so typed client calls accept it without re-checking. The companion\n * to `validateActionInput`: callers run that first to produce a friendly error,\n * then use this assertion at the use site to recover the non-nullable type.\n * Because validation guarantees presence, this never throws in practice; the\n * throw exists only to satisfy the assertion-signature contract. The thrown\n * message mirrors the `missing()` form (\"<param> is required for <action> action.\").\n */\nexport function assertParam(\n value: string | undefined,\n param: string,\n action: string,\n): asserts value is string {\n if (value === undefined || value === null || value === '')\n throw new Error(`${param} is required for ${action} action.`);\n}\n\nfunction missing(\n tool: string,\n action: string,\n param: string,\n hint?: string,\n): string {\n // Keep the substring \"<param> is required\" so existing assertions/docs that\n // string-match it stay green.\n return `${param} is required for ${action} action.${hint ? ' ' + hint : ''}`;\n}\n\nexport const FLOW_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n get: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n update: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n delete: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n duplicate: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n create: { required: ['name'] },\n preview_list: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n preview_get: { required: ['flowId', 'previewId'] },\n preview_create: {\n required: ['flowId'],\n oneOf: [['flowName', 'flowSettingsId']],\n },\n preview_delete: { required: ['flowId', 'previewId'] },\n preview_regrant: { required: ['flowId', 'previewId'] },\n};\n\nexport const DEPLOY_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n deploy: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n get: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n delete: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n};\n\nexport const SECRET_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n list: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n set: {\n required: ['flowId', 'name', 'value'],\n hint: 'Use action \"list\" to see existing secret names for this flow.',\n },\n update: {\n required: ['flowId', 'secretId', 'value'],\n hint: 'Use action \"list\" to find the secretId.',\n },\n delete: {\n required: ['flowId', 'secretId'],\n hint: 'Use action \"list\" to find the secretId.',\n },\n};\n\nexport const PROJECT_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n get: {\n required: ['projectId'],\n hint: 'Use action \"list\" to see available projects.',\n },\n update: {\n required: ['projectId', 'name'],\n hint: 'Use action \"list\" to see available projects.',\n },\n delete: {\n required: ['projectId'],\n hint: 'Use action \"list\" to see available projects.',\n },\n set_default: {\n required: ['projectId'],\n hint: 'Use action \"list\" to see available projects.',\n },\n create: { required: ['name'] },\n};\n\nexport const FRAME_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n page: {\n required: ['pageKey'],\n hint: 'Use action \"list\" to see the source keys of the project’s frames.',\n },\n get: {\n required: ['frameId'],\n hint: 'Use action \"list\" or \"page\" to find a frameId.',\n },\n};\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport {\n wrapUserData,\n redactNestedStrings,\n keepStructural,\n} from '../user-data.js';\nimport { flowCanvasResult } from '../ui-parts.js';\nimport { links } from '../links.js';\n\n/** Peek at a Flow.Json root (v4) and decide whether the bubble should render\n * as web-flavoured or server-flavoured. The platform is recorded on\n * `flows[name].config.platform`. We pick the first flow's platform; if no\n * platform is set we fall back to `'server'` so the chat bubble can still\n * render even if the user is mid-edit. */\nfunction pickPlatform(content: unknown): 'web' | 'server' {\n const flows = recordField(content, 'flows');\n for (const flow of Object.values(flows ?? {})) {\n const platform = stringField(recordField(flow, 'config'), 'platform');\n if (platform === 'web' || platform === 'server') return platform;\n }\n return 'server';\n}\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf, isRecord, recordField, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n FLOW_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\n\n/**\n * The flow's page in the app, or nothing when the response carried no id (a\n * shape this module already tolerates everywhere else it reads `id`). The base\n * URL comes from the door, so one definition serves both of them.\n */\nfunction flowPageUrl(\n client: ToolClient,\n projectId: string,\n flowId: string | undefined,\n): string | undefined {\n if (flowId === undefined) return undefined;\n return links.flow({ baseUrl: client.appBaseUrl(), projectId, flowId });\n}\n\n/** A flow summary with its display name wrapped as user data. */\nfunction safeSummary(flow: unknown): unknown {\n const name = stringField(flow, 'name');\n return isRecord(flow) && name !== undefined\n ? { ...flow, name: wrapUserData(name) }\n : flow;\n}\n\n/** A flow record with its name wrapped and its config's strings redacted. */\ninterface SafeFlowDetail {\n fields: Record<string, unknown>;\n id?: string;\n name?: string;\n config?: Record<string, unknown>;\n}\n\nfunction safeDetail(flow: unknown): SafeFlowDetail {\n const fields: Record<string, unknown> = { ...fieldsOf(flow) };\n const name = stringField(fields, 'name');\n if (name !== undefined) fields.name = wrapUserData(name);\n if (fields.config !== undefined) {\n fields.config = redactNestedStrings(fields.config, {\n skip: keepStructural,\n });\n }\n return {\n fields,\n id: stringField(fields, 'id'),\n name: stringField(fields, 'name'),\n config: recordField(fields, 'config'),\n };\n}\n\nconst TITLE = 'Flow Management';\nconst DESCRIPTION =\n 'Manage walkerOS flows and their previews. List/get/create/update/delete/duplicate flows, or create/inspect/delete preview bundles and mint activation grants (preview_regrant) for testing flow changes on live sites.';\n\nconst inputSchema = {\n action: z\n .enum([\n 'list',\n 'get',\n 'create',\n 'update',\n 'delete',\n 'duplicate',\n 'preview_list',\n 'preview_get',\n 'preview_create',\n 'preview_delete',\n 'preview_regrant',\n ])\n .describe('Flow management action to perform'),\n flowId: z\n .string()\n .optional()\n .describe(\n 'Flow ID (flow_...) or config ID (cfg_...). Required for get, update, delete, duplicate, preview_list, preview_get, preview_create, preview_delete, preview_regrant.',\n ),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional filter for list (omit to list all projects). Required for create if no default project set.',\n ),\n name: z\n .string()\n .optional()\n .describe(\n 'Flow name. Required for create. Optional for update (to rename) and duplicate.',\n ),\n content: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Flow.Json content. Used for create and update.'),\n patch: z\n .boolean()\n .optional()\n .describe(\n 'Merge-patch for update (default true). When true, only provided fields are updated.',\n ),\n fields: z\n .array(z.string())\n .optional()\n .describe('Dot-path selectors for get to return only specific fields.'),\n sort: z\n .enum(['name', 'updated_at', 'created_at'])\n .optional()\n .describe('Sort field for list.'),\n order: z.enum(['asc', 'desc']).optional().describe('Sort order for list.'),\n includeDeleted: z\n .boolean()\n .optional()\n .describe('Include soft-deleted flows in list results.'),\n cursor: z\n .string()\n .optional()\n .describe(\n 'Pagination cursor from a previous list response. Only used with the list action.',\n ),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe('Max items per page (1-100). Only used with the list action.'),\n previewId: z\n .string()\n .optional()\n .describe(\n 'Preview ID (prv_...). Required for preview_get, preview_delete, and preview_regrant (all also require flowId).',\n ),\n flowName: z\n .string()\n .optional()\n .describe(\n 'Used by preview_create — provide one of flowName or flowSettingsId (preview_create also requires flowId).',\n ),\n flowSettingsId: z\n .string()\n .optional()\n .describe(\n 'Used by preview_create — provide one of flowName or flowSettingsId (preview_create also requires flowId).',\n ),\n source: z\n .discriminatedUnion('kind', [\n z.object({ kind: z.literal('draft') }),\n z.object({\n kind: z.literal('deployment-version'),\n deploymentVersionId: z.string(),\n }),\n ])\n .optional()\n .describe(\n \"What the preview should run, for preview_create: the flow's draft (default) or a deployed version's stored config (kind 'deployment-version' with its deploymentVersionId).\",\n ),\n siteUrl: z\n .string()\n .optional()\n .describe(\n 'Optional site URL (e.g. https://shop.example.com) for preview_create. When provided, the activation grant is minted for that origin so the returned activationUrl works there.',\n ),\n origins: z\n .array(z.string())\n .optional()\n .describe(\n 'Site origins (bare https://host[:port]) to mint a preview activation grant for. Used by preview_regrant; the returned activationUrl targets the first origin.',\n ),\n sessionId: z\n .string()\n .optional()\n .describe(\n 'Observe session id — when set, preview_regrant mints an activation/forwarding grant PAIR: the returned activationUrl both activates the web preview and lets the page forward events to the session container (elbPreviewSession param). Pass it to observe server-side hops; omit for a plain web preview.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\n// Preview results land in agent transcripts and logs, so the MCP boundary\n// enforces a field whitelist instead of trusting whatever shape a client\n// returns: the raw ingest `token` and `projectId` must never surface here.\n// Grants (`grant`, `sessionGrant`, `activationUrl`) are deliberate outputs —\n// short-lived, origin/session-bound capabilities the caller needs to activate\n// a preview or forward events to an observe session. The list covers both\n// client shapes: the app's in-process summary (`previewId`, `status`,\n// `observeFeed`) and the CLI-backed HTTP client's raw API response (`id`,\n// `createdBy`, `createdAt`).\nconst PREVIEW_SUMMARY_FIELDS = [\n 'id',\n 'previewId',\n 'flowId',\n 'flowSettingsId',\n 'bundleUrl',\n 'activationUrl',\n 'grant',\n 'sessionGrant',\n 'sessionExpiresAt',\n 'sessionId',\n 'status',\n 'observeFeed',\n 'createdBy',\n 'createdAt',\n] as const;\n\nfunction redactPreview(data: unknown): Record<string, unknown> {\n if (!isRecord(data)) return {};\n const out: Record<string, unknown> = {};\n for (const field of PREVIEW_SUMMARY_FIELDS) {\n if (data[field] !== undefined) out[field] = data[field];\n }\n return out;\n}\n\nfunction redactPreviewList(data: unknown): Record<string, unknown> {\n if (!isRecord(data)) return { previews: [] };\n return {\n previews: Array.isArray(data.previews)\n ? data.previews.map(redactPreview)\n : [],\n ...(data.total !== undefined ? { total: data.total } : {}),\n };\n}\n\n/**\n * Resolve the flow's live Observe session, or null when there is none.\n *\n * `listJourneys` is the flow-keyed read the app already exposes and its\n * `sessionId` IS the flow's single active window, so it doubles as the\n * resolver. Best-effort by design: this only enriches a regrant, so a failing\n * or unavailable read degrades to a plain web preview grant instead of failing\n * the mint the caller actually asked for.\n */\nasync function resolveLiveSessionId(\n client: ToolClient,\n flowId: string,\n projectId: string | undefined,\n): Promise<string | null> {\n try {\n const result = await client.listJourneys({\n flowId,\n ...(projectId !== undefined && { projectId }),\n limit: 1,\n });\n return result.sessionId;\n } catch {\n return null;\n }\n}\n\nexport function createFlowManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'flow_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowManageHandlerBody(client, input),\n };\n}\n\nasync function flowManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n action,\n flowId,\n projectId,\n name,\n content,\n patch,\n fields,\n sort,\n order,\n includeDeleted,\n cursor,\n limit,\n previewId,\n flowName,\n flowSettingsId,\n source,\n siteUrl,\n origins,\n sessionId,\n } = parsed.data;\n const validationError = validateActionInput(\n 'flow_manage',\n action ?? '',\n { flowId, projectId, name, previewId, flowName, flowSettingsId },\n FLOW_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n switch (action) {\n case 'list': {\n if (projectId) {\n const data = await client.listFlows({\n projectId,\n sort,\n order,\n includeDeleted,\n cursor,\n limit,\n });\n const flows = isRecord(data) ? data.flows : undefined;\n const safe =\n isRecord(data) && Array.isArray(flows)\n ? { ...data, flows: flows.map(safeSummary) }\n : data;\n return mcpResult(safe);\n }\n const data = await client.listAllFlows({\n sort,\n order,\n includeDeleted,\n cursor,\n limit,\n });\n const safe = Array.isArray(data) ? data.map(safeSummary) : data;\n return mcpResult(\n { projects: safe },\n {\n next: [\n 'Use flow_manage with action \"get\" and a flowId to inspect a specific flow',\n 'Use flow_load to open a flow for editing',\n ],\n },\n );\n }\n\n case 'get': {\n assertParam(flowId, 'flowId', 'get');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const flow = await client.getFlow({\n flowId,\n projectId: resolvedProjectId,\n fields,\n });\n const safe = safeDetail(flow);\n const appUrl = flowPageUrl(client, resolvedProjectId, safe.id);\n return flowCanvasResult({\n flowId: safe.id,\n configName: safe.name ?? 'default',\n platform: pickPlatform(safe.config),\n flowConfig: safe.config ?? {},\n ...(appUrl !== undefined && { appUrl }),\n suggestions: [\n {\n label: 'Validate this flow',\n prompt: `Validate flow ${safe.id}`,\n autoSend: true,\n },\n {\n label: 'Add a destination',\n prompt: `Help me add a destination to flow ${safe.id}`,\n },\n ],\n });\n }\n\n case 'create': {\n assertParam(name, 'name', 'create');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const created = await client.createFlow({\n name,\n content: content ?? {},\n projectId: resolvedProjectId,\n });\n const safeCreated = safeDetail(created);\n const createdAppUrl = flowPageUrl(\n client,\n resolvedProjectId,\n safeCreated.id,\n );\n return flowCanvasResult({\n flowId: safeCreated.id,\n configName: safeCreated.name ?? 'default',\n platform: pickPlatform(safeCreated.config),\n flowConfig: safeCreated.config ?? {},\n ...(createdAppUrl !== undefined && { appUrl: createdAppUrl }),\n suggestions: [\n {\n label: 'Validate this flow',\n prompt: `Validate flow ${safeCreated.id}`,\n autoSend: true,\n },\n {\n label: 'Deploy it',\n prompt: `Deploy flow ${safeCreated.id}`,\n },\n ],\n });\n }\n\n case 'update': {\n assertParam(flowId, 'flowId', 'update');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const updated = await client.updateFlow({\n flowId,\n projectId: resolvedProjectId,\n name,\n content,\n mergePatch: patch ?? true,\n });\n const safeUpdated = safeDetail(updated);\n return flowCanvasResult({\n flowId: safeUpdated.id,\n configName: safeUpdated.name ?? 'default',\n platform: pickPlatform(safeUpdated.config),\n flowConfig: safeUpdated.config ?? {},\n suggestions: [\n {\n label: 'Validate this flow',\n prompt: `Validate flow ${safeUpdated.id}`,\n autoSend: true,\n },\n {\n label: 'Deploy it',\n prompt: `Deploy flow ${safeUpdated.id}`,\n },\n ],\n });\n }\n\n case 'delete': {\n assertParam(flowId, 'flowId', 'delete');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const deleted = await client.deleteFlow({\n flowId,\n projectId: resolvedProjectId,\n });\n return mcpResult(deleted);\n }\n\n case 'duplicate': {\n assertParam(flowId, 'flowId', 'duplicate');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const duplicated = await client.duplicateFlow({\n flowId,\n name,\n projectId: resolvedProjectId,\n });\n return mcpResult(safeDetail(duplicated).fields);\n }\n\n case 'preview_list': {\n assertParam(flowId, 'flowId', 'preview_list');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const data = await client.listPreviews({\n projectId: resolvedProjectId,\n flowId,\n });\n return mcpResult(redactPreviewList(data));\n }\n\n case 'preview_get': {\n assertParam(flowId, 'flowId', 'preview_get');\n assertParam(previewId, 'previewId', 'preview_get');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const data = await client.getPreview({\n projectId: resolvedProjectId,\n flowId,\n previewId,\n });\n return mcpResult(redactPreview(data));\n }\n\n case 'preview_create': {\n assertParam(flowId, 'flowId', 'preview_create');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n // Whitelist the summary at the boundary: the HTTP client returns the\n // raw API response (which carries the ingest token and project id),\n // and the handler must never surface those regardless of the client.\n // It also adds no token-derived URL of its own.\n const preview = await client.createPreview({\n projectId: resolvedProjectId,\n flowId,\n flowName,\n flowSettingsId,\n ...(source ? { source } : {}),\n ...(siteUrl ? { siteUrl } : {}),\n });\n return mcpResult(redactPreview(preview), {\n next: [\n 'Open activationUrl on your site to activate preview mode. When activationUrl is null, no grant has been minted for a site yet — use action \"preview_regrant\" with your site origins to mint one.',\n 'Poll observeFeed (observe_journeys with this flowId) to watch preview events arrive.',\n ],\n });\n }\n\n case 'preview_delete': {\n assertParam(flowId, 'flowId', 'preview_delete');\n assertParam(previewId, 'previewId', 'preview_delete');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const data = await client.deletePreview({\n projectId: resolvedProjectId,\n flowId,\n previewId,\n });\n // The app responds 204 No Content; an older CLI maps that to null.\n // mcpResult requires a record for structuredContent, so synthesize a\n // confirmation when the body is empty.\n return mcpResult(\n data && typeof data === 'object'\n ? data\n : { deleted: true, previewId },\n );\n }\n\n case 'preview_regrant': {\n assertParam(flowId, 'flowId', 'preview_regrant');\n assertParam(previewId, 'previewId', 'preview_regrant');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n if (!client.regrantPreview) {\n return mcpError(\n new Error('preview_regrant is not supported by this client'),\n );\n }\n // Auto-pair with the flow's live Observe window so a regrant made\n // while the flow is being observed forwards into it by default. An\n // explicit sessionId stays the override, and an unresolvable window is\n // not a failure: it degrades to a plain web preview grant.\n // Resolve under the SAME project the regrant is sent to: this path\n // degrades silently, so a project mismatch would never surface.\n const pairedSessionId =\n sessionId ??\n (await resolveLiveSessionId(client, flowId, resolvedProjectId));\n // Whitelisted grant summary: activationUrl plus the raw grant values\n // the caller may need (`sessionGrant` is how an agent authenticates\n // direct server-hop test events) — never the ingest token.\n const data = await client.regrantPreview({\n projectId: resolvedProjectId,\n flowId,\n previewId,\n origins: origins ?? [],\n ...(pairedSessionId ? { sessionId: pairedSessionId } : {}),\n });\n return mcpResult(redactPreview(data), {\n next: [\n pairedSessionId\n ? 'Open activationUrl on the target origin: it activates the web preview AND forwards its events to the observe session. Use sessionGrant as the X-Walkeros-Preview header for direct server-hop test events.'\n : 'Open activationUrl on the target origin to activate preview mode.',\n ],\n });\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: list, get, create, update, delete, duplicate, preview_list, preview_get, preview_create, preview_delete, preview_regrant`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerFlowManageTool(server: McpServer, client: ToolClient) {\n const spec = createFlowManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => flowManageHandlerBody(client, args),\n );\n}\n","export type SuggestionTile = {\n label: string;\n description?: string;\n prompt: string;\n autoSend?: boolean;\n};\n\nexport interface FlowCanvasPayload {\n flowId?: string;\n configName: string;\n platform: 'web' | 'server';\n flowConfig: Record<string, unknown>;\n highlight?: { stepAddress: string; reason: string };\n suggestions?: SuggestionTile[];\n /**\n * Absolute link to this flow's page in the app, from `links.flow`.\n *\n * Named for the `appBaseUrl()` seam it is built from, and never `url`: that\n * is a field several app responses already use for something of their own\n * (a deployment's `url` is where it SERVES), and one key meaning one thing\n * across every tool is what keeps a link from ever landing on top of it.\n *\n * Optional because a tool that cannot name the project or the flow emits no\n * link rather than a guess, and because the in-app chat renders the canvas\n * itself and has no use for a link to the page it is already on.\n */\n appUrl?: string;\n}\n\nexport interface FlowCanvasToolResult extends FlowCanvasPayload {\n kind: 'flow-canvas';\n}\n\n/**\n * Tool-result helper that marks a response as renderable as a FlowCanvas.\n * The chat UI inspects `structuredContent.kind === 'flow-canvas'` and mounts\n * a `FlowCanvasBubble` instead of the generic JSON fallback. The `content[0]`\n * text is the same JSON stringified — the LLM sees a self-describing object.\n */\nexport function flowCanvasResult(payload: FlowCanvasPayload) {\n const structured: FlowCanvasToolResult = { kind: 'flow-canvas', ...payload };\n return {\n content: [\n {\n type: 'text' as const,\n text: JSON.stringify(structured, null, 2),\n },\n ],\n structuredContent: structured as unknown as Record<string, unknown> & {\n kind: 'flow-canvas';\n },\n };\n}\n\nexport function isFlowCanvasResult(v: unknown): v is FlowCanvasToolResult {\n return (\n typeof v === 'object' &&\n v !== null &&\n (v as { kind?: unknown }).kind === 'flow-canvas'\n );\n}\n","/**\n * Addresses of walkerOS app screens, built in one place so every tool hands a\n * person the same link for the same screen.\n *\n * WHY THIS EXISTS. A tool that names a release, a step, or a deployment in\n * prose leaves the person to go find it. A link ends that: the answer and the\n * screen it is about arrive together. Building the address in each tool would\n * instead give as many spellings of `/projects/.../flows/...` as there are\n * emission points, and the first one to drift would send someone to a 404 that\n * no test here could see.\n *\n * THE BASE URL IS CONSUMED RAW. `client.appBaseUrl()` is already normalized by\n * the door that answers it (the CLI-backed door wraps `resolveAppUrl()` in\n * `normalizeBaseUrl`; the hosted door returns the same expression it publishes\n * as its OAuth issuer, which cannot carry a trailing slash). Normalizing again\n * here would put a second opinion about the shape in the system, which is\n * exactly what one normalization point per door exists to prevent.\n *\n * ONE DEFINITION, BOTH DOORS. Nothing here branches on which door is calling.\n * The base URL is the only thing that differs between them, and it arrives as\n * an argument.\n *\n * EVERY LINK IS ABSOLUTE. These land in a chat transcript, where a path\n * relative to nothing is useless.\n *\n * AN UNBUILDABLE LINK IS `undefined`, NEVER A GUESS. Every builder returns\n * `undefined` when it cannot name a screen that exists, and callers spread the\n * field conditionally so the result simply carries no link. A link that lands\n * on a 404, or on the app's \"can't open that\" notice, is worse than no link:\n * it costs the person a click and teaches them the tool's links are unreliable.\n *\n * THE URL SHAPES ARE THE APP'S, NOT OURS. They mirror what the app routes\n * today: `/projects/{projectId}/flows/{flowId}` and\n * `/projects/{projectId}/deployments/{deploymentId}`, with a view on the flow\n * page addressed by the `view` query param whose value names a SUBJECT\n * (`variables`, `secrets`, `contract`, `history`, `releases`, `knowledge`,\n * `step`). A step is `?view=step&flow=<named flow>&step=<type.name>`, the same\n * vocabulary `hub_manage` already takes as its `flow` and `step` params.\n */\n\n/** A flow page: the address every flow-scoped view hangs off. */\nexport interface FlowLinkTarget {\n /** From `client.appBaseUrl()`. Consumed as given. */\n baseUrl: string;\n projectId: string;\n flowId: string;\n}\n\n/**\n * One step inside a flow. `flow` is the named flow within the config (\"web\",\n * \"server\"); `step` is `\"type.name\"`, e.g. `\"destination.ga4\"`.\n */\nexport interface StepLinkTarget extends FlowLinkTarget {\n step: string;\n /**\n * Null and undefined both mean \"the caller did not name one\", which is the\n * shape `hub_manage`'s step history answers with when it was not filtered by\n * flow.\n */\n flow?: string | null;\n}\n\n/** One discussion thread, addressed by what it hangs on. */\nexport interface ThreadLinkTarget extends FlowLinkTarget {\n anchorType: string;\n}\n\n/**\n * One deployment.\n *\n * Pass the `dep_...` id, not the slug. The detail route resolves either, but\n * the page's live-status stream matches on the id alone, so a slug link opens a\n * page whose status stream fails while the deployment is still deploying. This\n * builder does not inspect the value: naming the id is the caller's job.\n */\nexport interface DeploymentLinkTarget {\n baseUrl: string;\n projectId: string;\n deploymentId: string;\n}\n\n/**\n * Contract entries are top-level and carry no named flow, so they are not\n * `?view=step` addresses.\n */\nconst CONTRACT_PREFIX = 'contract.';\n\n/** Every address component has to be a non-empty string, or there is no link. */\nfunction addressable(...parts: string[]): boolean {\n return parts.every((part) => part !== '');\n}\n\nfunction flowPage(target: FlowLinkTarget): string | undefined {\n const { baseUrl, projectId, flowId } = target;\n if (!addressable(baseUrl, projectId, flowId)) return undefined;\n return `${baseUrl}/projects/${encodeURIComponent(projectId)}/flows/${encodeURIComponent(flowId)}`;\n}\n\n/**\n * A view on the flow page. `view` leads because it is the primary key: the\n * other params only mean anything beside it.\n */\nfunction flowView(\n target: FlowLinkTarget,\n view: string,\n params: Record<string, string> = {},\n): string | undefined {\n const page = flowPage(target);\n if (page === undefined) return undefined;\n const query = new URLSearchParams({ view, ...params });\n return `${page}?${query.toString()}`;\n}\n\nexport const links = {\n /** The flow page itself. `undefined` when any part of the address is empty. */\n flow(target: FlowLinkTarget): string | undefined {\n return flowPage(target);\n },\n\n /**\n * The screen showing one step.\n *\n * A `contract` step, in any of its spellings, is answered with the CONTRACT\n * view rather than a step address. `?view=step&step=contract.checkout` is a\n * legitimate address in the vocabulary this tool speaks, but the app has\n * deliberately deferred opening ONE contract entry and refuses that link with\n * a notice. `?view=contract` opens the contract editor the entry lives in,\n * which is the nearest screen that actually exists. A `flow` alongside a\n * contract step is a caller mistake (contract entries are top-level) and is\n * ignored rather than turned into a refused link.\n *\n * Otherwise a step needs its named flow: `type.name` alone is not unique in a\n * config holding both a web and a server flow, and the app resolves an\n * address without one to nothing and says so on screen. So an unnamed flow\n * yields `undefined` here. Callers that want the link can re-ask with `flow`.\n *\n * What this cannot check is whether the step is still IN that flow. The\n * address is resolved against the live config when the page opens, and a step\n * since renamed or removed gets a notice there rather than a broken screen.\n */\n step(target: StepLinkTarget): string | undefined {\n const { step, flow } = target;\n if (step === '') return undefined;\n if (step === 'contract' || step.startsWith(CONTRACT_PREFIX))\n return flowView(target, 'contract');\n if (typeof flow !== 'string' || flow === '') return undefined;\n return flowView(target, 'step', { flow, step });\n },\n\n /**\n * The release history of a flow.\n *\n * The app has no address for ONE release: `?view=releases` declares no params\n * and opens the list the release is a row of. That is the screen a person\n * asking about a release wants to be on, so this takes the flow and nothing\n * else rather than pretending to a precision the app does not have.\n */\n release(target: FlowLinkTarget): string | undefined {\n return flowView(target, 'releases');\n },\n\n /**\n * The screen a thread is read on.\n *\n * Only a release anchor can be addressed from the wire shape this tool\n * holds. The app renders release-anchored discussions inside the release\n * history, beside the release they hang on. Step and entity-action anchors\n * have no surface at all yet. A TAG anchor does have one, the knowledge list\n * on `?view=knowledge`, but only when the thread was captured in Tag Mode\n * and carries a frame: `HubThreadWire` has no `frameId`, so nothing here can\n * tell such a thread from one written over MCP against a null frame, and a\n * knowledge link would open a list the thread may be absent from. So\n * everything but a release anchor gets no link rather than a possibly empty\n * one.\n */\n thread(target: ThreadLinkTarget): string | undefined {\n if (target.anchorType !== 'release') return undefined;\n return flowView(target, 'releases');\n },\n\n /** One deployment's detail page. */\n deployment(target: DeploymentLinkTarget): string | undefined {\n const { baseUrl, projectId, deploymentId } = target;\n if (!addressable(baseUrl, projectId, deploymentId)) return undefined;\n return `${baseUrl}/projects/${encodeURIComponent(projectId)}/deployments/${encodeURIComponent(deploymentId)}`;\n },\n};\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { redactDisplayNames } from '../user-data.js';\nimport { links } from '../links.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf, isRecord, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n resolveDeploymentSlug,\n type DeploymentSummaryForResolver,\n type ListDeploymentsForResolver,\n} from './_resolvers.js';\nimport { resolveDefaultProject } from './project-context.js';\nimport {\n validateActionInput,\n assertParam,\n DEPLOY_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\n\nconst TITLE = 'Deploy Management';\nconst DESCRIPTION =\n 'Deploy walkerOS flows and manage deployments. ' +\n 'deploy waits for the deployment to reach a terminal status by default (wait=true), with a 12-minute budget; pass wait=false to return immediately with the deployment id. ' +\n 'A finished deployment carries its status and, on failure, an errorMessage with the user-facing reason; use the get action to re-read it. ' +\n 'list supports cursor and limit for pagination. ' +\n 'delete removes an active deployment. ' +\n 'For get and delete pass flowId (required) plus optional slug to disambiguate when a flow has multiple active deployments. ' +\n \"If a flow has >=2 active deployments and no slug is supplied, the tool returns a MULTIPLE_DEPLOYMENTS error with a details[] list showing each deployment's slug, type, status, and updatedAt.\";\n\nconst inputSchema = {\n action: z\n .enum(['deploy', 'list', 'get', 'delete'])\n .describe('Deployment action to perform'),\n projectId: z\n .string()\n .optional()\n .describe('Project ID. Optional; falls back to the default project.'),\n flowId: z.string().optional().describe('Required for deploy, get, delete.'),\n slug: z\n .string()\n .optional()\n .describe(\n 'Deployment slug. Optional disambiguator for get/delete when the flow has multiple active deployments.',\n ),\n type: z\n .enum(['web', 'server'])\n .optional()\n .describe('Deployment type filter for list.'),\n status: z.string().optional().describe('Status filter for list.'),\n wait: z\n .boolean()\n .optional()\n .describe(\n 'Wait for the deployment to reach a terminal status (default true), with a 12-minute budget. Set false to return the deployment id immediately. Only used with deploy action.',\n ),\n flowName: z\n .string()\n .optional()\n .describe(\n 'Flow name for multi-settings flows. Only used with deploy action.',\n ),\n cursor: z\n .string()\n .optional()\n .describe(\n 'Pagination cursor from a previous list response. Only used with the list action.',\n ),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe('Max items per page (1-100). Only used with the list action.'),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\n/**\n * The deployment's ID, however the response spells it: the deploy start body\n * carries `deploymentId`, the detail read carries `id`.\n *\n * The `slug` both bodies also carry is deliberately NOT an address here. The\n * detail route resolves a slug, but the page's live-status stream matches on\n * the id alone, so a slug link opens a page whose status stream fails on a\n * deployment that is still deploying. A response carrying neither id spelling\n * gets no link.\n */\nfunction deploymentAddress(data: unknown): string | undefined {\n if (data === null || typeof data !== 'object' || Array.isArray(data))\n return undefined;\n const record: Record<string, unknown> = { ...data };\n for (const key of ['id', 'deploymentId']) {\n const value = record[key];\n if (typeof value === 'string' && value !== '') return value;\n }\n return undefined;\n}\n\n/**\n * The deployment's page in the app.\n *\n * The project is resolved the way every other project-bound tool resolves it,\n * falling back to the door's default. That fallback is for the LINK only:\n * nothing here changes which project the call itself reads, and a door with no\n * default simply yields no link rather than a wrong one.\n */\nfunction deploymentUrl(\n client: ToolClient,\n projectId: string | undefined,\n data: unknown,\n): string | undefined {\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (resolvedProjectId === undefined) return undefined;\n const deploymentId = deploymentAddress(data);\n if (deploymentId === undefined) return undefined;\n return links.deployment({\n baseUrl: client.appBaseUrl(),\n projectId: resolvedProjectId,\n deploymentId,\n });\n}\n\n/**\n * Attach the link to a response body without disturbing what it already\n * carries.\n *\n * The key is `appUrl`, and it may never be `url`. A deployment response\n * ALREADY carries `url`, and it means where this deployment is SERVING: the\n * app sets it to the deployment's target while published or active. Writing\n * the app page over it would silently replace a live endpoint with a UI link,\n * with nothing to signal that the meaning of the field had changed. `appUrl`\n * also names the `appBaseUrl()` seam it is built from.\n *\n * A non-object body (nothing the app returns today, but the client types are\n * `unknown`) is passed through untouched rather than wrapped.\n */\nfunction withAppUrl(data: unknown, appUrl: string | undefined): unknown {\n if (\n appUrl === undefined ||\n data === null ||\n typeof data !== 'object' ||\n Array.isArray(data)\n ) {\n return data;\n }\n return { ...data, appUrl };\n}\n\n/** One deployment summary, or none when a field the resolver reads is missing. */\nfunction readDeploymentSummary(value: unknown): DeploymentSummaryForResolver[] {\n if (!isRecord(value)) return [];\n const slug = stringField(value, 'slug');\n const type = stringField(value, 'type');\n const status = stringField(value, 'status');\n const updatedAt = stringField(value, 'updatedAt');\n return slug !== undefined &&\n type !== undefined &&\n status !== undefined &&\n updatedAt !== undefined\n ? [{ ...value, slug, type, status, updatedAt }]\n : [];\n}\n\nfunction listForResolver(\n client: ToolClient,\n projectId: string | undefined,\n): ListDeploymentsForResolver {\n return async (q) => {\n const resp = await client.listDeployments({\n projectId: projectId || q.projectId || undefined,\n flowId: q.flowId,\n });\n const deployments = isRecord(resp) ? resp.deployments : undefined;\n return Array.isArray(deployments)\n ? deployments.flatMap(readDeploymentSummary)\n : [];\n };\n}\n\nexport function createDeployManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'deploy_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => deployManageHandlerBody(client, input),\n };\n}\n\nasync function deployManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n action,\n projectId,\n flowId,\n slug,\n type,\n status,\n wait,\n flowName,\n cursor,\n limit,\n } = parsed.data;\n const validationError = validateActionInput(\n 'deploy_manage',\n action ?? '',\n { flowId, projectId },\n DEPLOY_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n switch (action) {\n case 'deploy': {\n assertParam(flowId, 'flowId', 'deploy');\n // `projectId` travels with the deploy itself, not just with the link.\n // Without it the deploy resolved the door's default while the link\n // resolved the explicit id, so an explicit projectId that differed\n // from the default deployed in one project and linked into another,\n // and the project-scoped deployment route answered that link with a\n // 404.\n const result = await client.deploy({\n flowId,\n projectId,\n wait: wait ?? true,\n flowName,\n });\n // The deployment's own page, whether this call waited for a terminal\n // status or returned the id straight away. It is where the status the\n // hint tells the agent to re-read is shown, so the person can watch it\n // instead of asking again.\n const appUrl = deploymentUrl(client, projectId, result);\n return mcpResult(withAppUrl(redactDisplayNames(result), appUrl), {\n next: [\n 'Use deploy_manage with action \"get\" to check deployment status',\n ],\n });\n }\n\n case 'list': {\n const data = await client.listDeployments({\n projectId,\n flowId,\n type,\n status,\n cursor,\n limit,\n });\n return mcpResult(redactDisplayNames(data));\n }\n\n case 'get': {\n assertParam(flowId, 'flowId', 'get');\n const resolvedSlug = await resolveDeploymentSlug({\n projectId: projectId ?? '',\n flowId,\n slug,\n list: listForResolver(client, projectId),\n });\n const data = await client.getDeploymentBySlug({\n slug: resolvedSlug,\n projectId,\n });\n const appUrl = deploymentUrl(client, projectId, data);\n return mcpResult(withAppUrl(redactDisplayNames(data), appUrl));\n }\n\n case 'delete': {\n assertParam(flowId, 'flowId', 'delete');\n const resolvedSlug = await resolveDeploymentSlug({\n projectId: projectId ?? '',\n flowId,\n slug,\n list: listForResolver(client, projectId),\n });\n const data = await client.deleteDeployment({\n slug: resolvedSlug,\n projectId,\n });\n return mcpResult(\n redactDisplayNames({\n deleted: true,\n ...fieldsOf(data),\n }),\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: deploy, list, get, delete`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerDeployTool(server: McpServer, client: ToolClient) {\n const spec = createDeployManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => deployManageHandlerBody(client, args),\n );\n}\n","/**\n * Internal helpers shared by deploy_manage actions. Not re-exported from the\n * tools barrel; leading underscore marks this as tool-module internal.\n *\n * All collaborators are passed in as arguments so unit tests can inject fakes\n * without relying on jest.mock. This keeps resolver tests local to the\n * resolver signature and avoids shared-mock drift.\n */\n\n/**\n * The subset of a deployment summary the resolver needs to decide 0 / 1 / many\n * and to surface a useful MULTIPLE_DEPLOYMENTS error. Kept structurally\n * compatible with the CLI's DeploymentSummaryForFlow.\n */\nexport interface DeploymentSummaryForResolver {\n slug: string;\n type: string;\n status: string;\n updatedAt: string;\n}\n\n/**\n * Dependency injected list function. Must return only non-deleted deployments\n * for the given project + flow. The production wiring calls\n * `listDeployments({ projectId, flowId })` from `@walkeros/cli`, which hits\n * the app API; the API excludes soft-deleted rows.\n */\nexport type ListDeploymentsForResolver = (q: {\n projectId: string;\n flowId: string;\n}) => Promise<DeploymentSummaryForResolver[]>;\n\n/**\n * Error thrown when a flow has 0 matching deployments, or when a caller passed\n * a slug that does not match any active deployment of the flow. The MCP layer\n * translates this into an mcpError with `code: 'NOT_FOUND'`.\n */\nexport class DeploymentNotFoundError extends Error {\n readonly code = 'NOT_FOUND';\n constructor(message: string) {\n super(message);\n this.name = 'DeploymentNotFoundError';\n }\n}\n\n/**\n * Error thrown when a flow has >= 2 active deployments and the caller did not\n * pass a slug. Carries a `details[]` list so the MCP layer can surface the\n * options to the user.\n */\nexport class MultipleDeploymentsError extends Error {\n readonly code = 'MULTIPLE_DEPLOYMENTS';\n readonly details: DeploymentSummaryForResolver[];\n constructor(message: string, details: DeploymentSummaryForResolver[]) {\n super(message);\n this.name = 'MultipleDeploymentsError';\n this.details = details;\n }\n}\n\n/**\n * Resolve a concrete deployment slug for a (projectId, flowId, slug?) tuple.\n *\n * Behavior:\n * - 0 matches: throws DeploymentNotFoundError.\n * - 1 match, no slug: returns the single slug.\n * - slug provided and matches: returns the slug.\n * - slug provided and does not match: throws DeploymentNotFoundError.\n * - >= 2 matches, no slug: throws MultipleDeploymentsError with details[].\n */\nexport async function resolveDeploymentSlug(args: {\n projectId: string;\n flowId: string;\n slug?: string;\n list: ListDeploymentsForResolver;\n}): Promise<string> {\n const matches = await args.list({\n projectId: args.projectId,\n flowId: args.flowId,\n });\n\n if (matches.length === 0) {\n throw new DeploymentNotFoundError(\n `No deployments found for flow ${args.flowId}`,\n );\n }\n\n if (args.slug !== undefined) {\n const hit = matches.find((m) => m.slug === args.slug);\n if (!hit) {\n throw new DeploymentNotFoundError(\n `No deployment with slug ${args.slug} in flow ${args.flowId}`,\n );\n }\n return hit.slug;\n }\n\n if (matches.length === 1) {\n return matches[0].slug;\n }\n\n throw new MultipleDeploymentsError(\n `Flow ${args.flowId} has ${matches.length} active deployments; pass slug to disambiguate`,\n matches.map((m) => ({\n slug: m.slug,\n type: m.type,\n status: m.status,\n updatedAt: m.updatedAt,\n })),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n SECRET_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\n\nconst TITLE = 'Secret Management';\nconst DESCRIPTION =\n 'Manage a flow’s managed secrets (the $secret.<NAME> values its steps reference at deploy/run time). ' +\n 'Actions: list (metadata only), set (create), update (rotate value), delete. ' +\n 'Secrets are write-mostly: values are encrypted at rest and are NEVER returned, listed, or echoed. ' +\n 'Reference a secret from a flow step as $secret.<NAME>. Credentials, tokens, and private keys must use $secret, not $env: ' +\n 'the deploy pipeline only injects values referenced as $secret.<NAME> into the server runner. Server flows only.';\n\nconst inputSchema = {\n action: z\n .enum(['list', 'set', 'update', 'delete'])\n .describe('Secret management action to perform'),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional: falls back to the default project when omitted.',\n ),\n flowId: z\n .string()\n .describe(\n 'Flow ID (flow_...) or config ID (cfg_...). Required for list, set, update, and delete: secrets are flow-scoped.',\n ),\n name: z\n .string()\n .regex(\n /^[A-Z_][A-Z0-9_]*$/,\n 'Secret name must be uppercase letters, digits, and underscores, starting with a letter or underscore.',\n )\n .optional()\n .describe(\n 'Secret name (UPPER_SNAKE_CASE). Required for set. Referenced in flows as $secret.<NAME>.',\n ),\n value: z\n .string()\n .min(1)\n .max(65536)\n .optional()\n .describe(\n 'Secret value (1-65536 chars). Required for set and update. Write-only: never returned or logged.',\n ),\n secretId: z\n .string()\n .optional()\n .describe(\n 'Secret ID (sec_...). Required for update and delete. Use action \"list\" to find it.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createSecretManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'secret_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => secretManageHandlerBody(client, input),\n };\n}\n\nasync function secretManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { action, projectId, flowId, name, value, secretId } = parsed.data;\n const validationError = validateActionInput(\n 'secret_manage',\n action ?? '',\n { flowId, name, value, secretId },\n SECRET_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId)\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n\n switch (action) {\n case 'list': {\n assertParam(flowId, 'flowId', 'list');\n const data = await client.listSecrets({\n projectId: resolvedProjectId,\n flowId,\n });\n return mcpResult(data, {\n next: [\n 'Reference a listed secret from a flow step as $secret.<NAME>.',\n 'Use action \"set\" to add a secret or \"update\" to rotate one.',\n ],\n });\n }\n\n case 'set': {\n assertParam(flowId, 'flowId', 'set');\n assertParam(name, 'name', 'set');\n assertParam(value, 'value', 'set');\n const created = await client.createSecret({\n projectId: resolvedProjectId,\n flowId,\n name,\n value,\n });\n // Response is metadata only; value is never echoed back.\n return mcpResult(created, {\n next: [`Reference it in this flow as $secret.${name}.`],\n });\n }\n\n case 'update': {\n assertParam(flowId, 'flowId', 'update');\n assertParam(secretId, 'secretId', 'update');\n assertParam(value, 'value', 'update');\n const updated = await client.updateSecret({\n projectId: resolvedProjectId,\n flowId,\n secretId,\n value,\n });\n return mcpResult(updated);\n }\n\n case 'delete': {\n assertParam(flowId, 'flowId', 'delete');\n assertParam(secretId, 'secretId', 'delete');\n const deleted = await client.deleteSecret({\n projectId: resolvedProjectId,\n flowId,\n secretId,\n });\n return mcpResult(\n deleted && typeof deleted === 'object'\n ? deleted\n : { deleted: true, secretId },\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: list, set, update, delete`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerSecretManageTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createSecretManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => secretManageHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport type { Journey, JourneyHop, JourneyBranch } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { redactNestedStrings } from '../user-data.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\n\nconst TITLE = 'Observe Journeys';\nconst DESCRIPTION =\n 'Read the assembled, cross-runtime journeys for a flow that is currently being observed (an active Observe session). ' +\n 'Pass flowId; the active session is resolved for you (a flow has at most one). ' +\n 'Each journey is one traced event reconstructed end to end across web and server: its ordered hops (source, transformer, collector, destination), each hop status (pending/done/skipped/error), captured in/out payloads, consent, and vendor calls. ' +\n 'Use this to see what actually happened to live events: which destinations fired, what mapping ran, where an event was skipped or errored, and whether records were lost (gaps + a journey `lossy` flag). ' +\n 'When the flow has no active session the result is `{ sessionId: null, journeys: [], gaps: [] }` — start an Observe session in the app and drive traffic first, then read again. ' +\n 'Narrow with traceId (one trace) and limit (page cap, most recent kept; default 50). ' +\n 'Read-only.';\n\nconst inputSchema = {\n flowId: z\n .string()\n .describe('Flow to read journeys for (its active Observe session).'),\n projectId: z\n .string()\n .optional()\n .describe('Project ID. Optional; falls back to the default project.'),\n traceId: z\n .string()\n .optional()\n .describe('Return only the journeys for this trace id.'),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\n 'Max journeys to return (1-100, most recent kept). Defaults to 50.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\n/**\n * Neutralise ONLY the captured, event-controlled payload fields of a journey for\n * third-party LLM context, deep-wrapping every string inside them in\n * <user_data>. Everything else stays literal.\n *\n * The distinction is load-bearing, not cosmetic: `observe_journeys` takes\n * `traceId` as a filter input, so the trigger -> read -> filter-by-traceId loop\n * only works if `traceId` (and the other correlation handles the agent\n * references) comes back verbatim. Wrapping them would break re-querying.\n *\n * KEEP LITERAL (assembler/wire-generated correlation handles, enums, numbers, or\n * the user's own config vocabulary):\n * id, correlation, traceId, entry.eventId/sourceId/timestamp, hop.stepId,\n * stepType, eventId, parentEventId, status, terminalPhase, skipReason,\n * mappingKey, contractRule, consent/consentApplied (config category -> bool),\n * platform(s), branchId, batched/flushConfirmed, and every timestamp/duration/\n * seq/gap-bound number.\n *\n * WRAP (data captured off the live event stream, attacker-influenceable):\n * entry.name (inbound event name), hop.in, hop.out, hop.error, hop.calls,\n * hop.meta, and the same out/error/calls on each fan-out branch.\n *\n * A structure-aware transform rather than a key-skip over `redactNestedStrings`,\n * because a flat key skip is depth-agnostic: it would either wrap the correlation\n * handles (breaking the query loop) or, if it skipped keys like `stepId`\n * globally, leave a captured payload field that happens to be named `stepId`\n * unwrapped. Wrapping whole payload sub-trees keeps every correlation handle\n * literal AND wraps every captured string, whatever its key.\n */\nfunction redactJourneyPayloads(journeys: Journey[]): Journey[] {\n return journeys.map((journey) => ({\n ...journey,\n entry: {\n ...journey.entry,\n ...(journey.entry.name !== undefined && {\n name: redactNestedStrings(journey.entry.name),\n }),\n },\n hops: journey.hops.map(redactHopPayloads),\n }));\n}\n\nfunction redactHopPayloads(hop: JourneyHop): JourneyHop {\n return {\n ...hop,\n ...(hop.in !== undefined && { in: redactNestedStrings(hop.in) }),\n ...(hop.out !== undefined && { out: redactNestedStrings(hop.out) }),\n ...(hop.error !== undefined && { error: redactNestedStrings(hop.error) }),\n ...(hop.calls !== undefined && { calls: redactNestedStrings(hop.calls) }),\n ...(hop.meta !== undefined && { meta: redactNestedStrings(hop.meta) }),\n ...(hop.branches !== undefined && {\n branches: hop.branches.map(redactBranchPayloads),\n }),\n };\n}\n\nfunction redactBranchPayloads(branch: JourneyBranch): JourneyBranch {\n return {\n ...branch,\n ...(branch.out !== undefined && { out: redactNestedStrings(branch.out) }),\n ...(branch.error !== undefined && {\n error: redactNestedStrings(branch.error),\n }),\n ...(branch.calls !== undefined && {\n calls: redactNestedStrings(branch.calls),\n }),\n };\n}\n\nexport function createObserveJourneysToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'observe_journeys',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => observeJourneysHandlerBody(client, input),\n };\n}\n\nasync function observeJourneysHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { flowId, projectId, traceId, limit } = parsed.data;\n if (!flowId) {\n return mcpError(new Error('flowId is required for observe_journeys.'));\n }\n try {\n const result = await client.listJourneys({\n flowId,\n ...(projectId !== undefined && { projectId }),\n ...(traceId !== undefined && { traceId }),\n ...(limit !== undefined && { limit }),\n });\n // Wrap only the captured, event-controlled payload sub-trees (in/out/error/\n // calls/meta + entry.name) in <user_data> for third-party LLM context, while\n // keeping every correlation handle (traceId/stepId/eventId/mappingKey) and\n // enum/number literal so the agent can feed them straight back as filter\n // input. gaps are numeric + platform enum only, so they pass through, and\n // so does unattributed: platform enum, numbers, and stepIds from the user's\n // own config, with no captured event payload to wrap. Absent stays absent,\n // since \"no loss to report\" reads differently from an empty array.\n const safe = {\n sessionId: result.sessionId,\n flowId: result.flowId,\n assembledAt: result.assembledAt,\n journeys: redactJourneyPayloads(result.journeys),\n gaps: result.gaps,\n ...(result.unattributed !== undefined && {\n unattributed: result.unattributed,\n }),\n };\n return mcpResult(safe, {\n next:\n result.sessionId === null\n ? [\n 'No active Observe session for this flow. Start one in the app and drive traffic, then read again.',\n ]\n : [\n 'Inspect a single trace with traceId, or adjust the flow config and re-read to confirm the change.',\n ],\n });\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerObserveJourneysTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createObserveJourneysToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => observeJourneysHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\n\nimport type {\n ToolClient,\n ObserveSessionResult,\n ObserveLevel,\n} from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { isRecord, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\n\nconst TITLE = 'Observe Session';\n/**\n * Exported so the hosted plane can assert parity against this exact string\n * instead of retyping it.\n */\nexport const DESCRIPTION =\n 'Open, inspect, or end an Observe session: a time-boxed window on one flow that runtimes attach to as arms. ' +\n 'A preview arm streams from a browser, a container arm runs server-side, and both feed ONE shared journeys feed. ' +\n 'start opens the window (arms picks which runtimes attach), status reports per-arm state plus recordsReceived and expiresAt, stop ends the whole session including every arm. ' +\n 'A flow has at most one session, so status/stop resolve it from flowId when sessionId is omitted. ' +\n 'Read the events with observe_journeys; this tool never returns event data and never judges whether events are correct.';\n\n/**\n * Hints carry the verb ladder rather than the description. Module constants so\n * the wording is one string per idea, quotable verbatim, and identical across\n * planes. Exported so the hosted plane imports them instead of retyping them,\n * which makes cross-plane parity a compiler concern.\n */\nexport const HINT_SIMULATE_FIRST =\n 'Simulate before preview: flow_simulate checks mapping with no browser.';\nexport const HINT_PREVIEW_STREAMS =\n 'Preview streams into this session: mint a link with flow_manage preview_regrant, then open it on your site.';\nexport const HINT_READ =\n 'Read with observe_journeys (flowId); it is the only read.';\nexport const HINT_STOP = 'End both arms with observe_session stop.';\nexport const HINT_EMPTY_FEED =\n 'recordsReceived is 0: nothing has reached the feed yet. Drive traffic on an attached arm.';\nexport const HINT_ENDED =\n 'Session ended and both arms detached. Start a new one with observe_session start.';\nexport const HINT_NO_WINDOW =\n 'No Observe session on this flow. Open one with observe_session start.';\n\nconst inputSchema = {\n action: z\n .enum(['start', 'status', 'stop'])\n .describe(\n 'start opens a session, status reports arm state, stop ends the whole session.',\n ),\n flowId: z.string().describe('Flow the Observe session runs on.'),\n projectId: z\n .string()\n .optional()\n .describe('Project ID. Optional; falls back to the default project.'),\n sessionId: z\n .string()\n .optional()\n .describe(\n 'Session to act on for status/stop. Optional; the flow has at most one session and it is resolved for you.',\n ),\n arms: z\n .object({\n container: z\n .literal(true)\n .optional()\n .describe(\n \"Pass true to attach the server container arm, which selects the flow's server settings when no preview arm is named. Only true is accepted: a web settings that references a server flow always brings its container arm along, so a container cannot be suppressed here.\",\n ),\n preview: z\n .string()\n .optional()\n .describe(\n \"Name the flow settings this session observes. A web settings attaches the browser preview arm (plus the container arm of any server flow it references); a server settings attaches the container arm alone. Omit to use the flow's single web settings.\",\n ),\n })\n .optional()\n .describe(\n 'Which runtimes attach. Omit to attach the default preview arm; a web settings that references a server flow brings its container arm with it.',\n ),\n origins: z\n .array(z.string())\n .optional()\n .describe(\n 'Bare https origins (https://host[:port]) the session may ingest web events from.',\n ),\n level: z\n .enum(['off', 'standard', 'trace'])\n .optional()\n .describe(\"Container observation verbosity. Defaults to the app's own.\"),\n replace: z\n .boolean()\n .optional()\n .describe(\n \"Replace the flow's existing window instead of attaching to it. Re-provisions from the new config.\",\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\ninterface ArmsInput {\n container?: true;\n preview?: string;\n}\n\ninterface SettingsEntry {\n name: string;\n platform: 'web' | 'server';\n}\n\n/**\n * Read the settings summaries off a flow response. `getFlow` is typed\n * `Promise<unknown>` on the client, so it is read structurally:\n * anything that is not a well-formed settings entry is simply not a candidate.\n */\nfunction readSettings(flow: unknown): SettingsEntry[] {\n if (!isRecord(flow)) return [];\n const settings = flow.settings;\n if (!Array.isArray(settings)) return [];\n const entries: SettingsEntry[] = [];\n for (const entry of settings) {\n const name = stringField(entry, 'name');\n const platform = stringField(entry, 'platform');\n if (name === undefined) continue;\n if (platform !== 'web' && platform !== 'server') continue;\n entries.push({ name, platform });\n }\n return entries;\n}\n\n/**\n * Translate the arms shape onto the one field the session contract takes.\n *\n * The app derives a session's arms from the flow topology under a single\n * `settingsName`: a web settings that references a server flow provisions both\n * arms, a server settings provisions the container alone. So arms selects a\n * NAME here rather than toggling arms on the wire.\n */\nfunction resolveSettingsName(\n settings: SettingsEntry[],\n arms: ArmsInput | undefined,\n): string {\n if (arms?.preview !== undefined) {\n const named = settings.find((entry) => entry.name === arms.preview);\n if (!named) {\n throw new Error(\n `This flow has no settings named \"${arms.preview}\". Available: ${describeSettings(settings)}`,\n );\n }\n return named.name;\n }\n\n if (arms?.container === true) {\n const servers = settings.filter((entry) => entry.platform === 'server');\n const only = servers[0];\n if (!only) {\n throw new Error(\n `The container arm needs a server settings, and this flow has no server settings. Available: ${describeSettings(settings)}`,\n );\n }\n if (servers.length > 1) {\n throw new Error(\n `This flow has several server settings. Name one with arms.preview. Available: ${describeSettings(settings)}`,\n );\n }\n return only.name;\n }\n\n const webs = settings.filter((entry) => entry.platform === 'web');\n const onlyWeb = webs[0];\n if (onlyWeb && webs.length === 1) return onlyWeb.name;\n if (webs.length > 1) {\n throw new Error(\n `This flow has several web settings. Name one with arms.preview. Available: ${describeSettings(settings)}`,\n );\n }\n\n const onlySettings = settings[0];\n if (onlySettings && settings.length === 1) return onlySettings.name;\n throw new Error(\n `Could not pick a settings to observe. Name one with arms.preview. Available: ${describeSettings(settings)}`,\n );\n}\n\nfunction describeSettings(settings: SettingsEntry[]): string {\n if (settings.length === 0) return 'none';\n return settings\n .map((entry) => `${entry.name} (${entry.platform})`)\n .join(', ');\n}\n\n/**\n * Per-arm state derived from the response shape: a part being non-null is what\n * makes its arm attached. Connect secrets (the web credential, the container\n * env trio) stay out by construction.\n */\nfunction toArms(session: ObserveSessionResult) {\n return {\n preview: {\n attached: session.web !== null,\n settingsName: session.observedFlowName,\n activationUrl: session.web?.activationUrl ?? null,\n previewEnabled: session.web?.previewEnabled ?? false,\n },\n container: {\n attached: session.server !== null,\n settingsName: session.serverFlowName,\n endpoint: session.server?.endpoint ?? null,\n },\n };\n}\n\nfunction toSummary(session: ObserveSessionResult) {\n return {\n sessionId: session.id,\n flowId: session.flowId,\n status: session.status,\n errorMessage: session.errorMessage,\n expiresAt: session.expiresAt,\n recordsReceived: session.recordsReceived,\n arms: toArms(session),\n };\n}\n\nexport const SESSION_RESOLUTION_FAILED =\n \"Could not resolve this flow's Observe session because the journeys read that identifies it is unavailable. Pass sessionId explicitly to act on the session without that lookup.\";\n\n/**\n * Wraps a failed lookup while preserving the structured fields `mcpError`\n * renders, so the caller keeps the machine-readable code alongside the\n * recovery instruction. The original failure rides along as `cause`.\n */\nclass SessionResolutionError extends Error {\n readonly code: string | undefined;\n readonly details: unknown[] | undefined;\n\n constructor(message: string, cause: unknown) {\n super(message, { cause });\n this.name = 'SessionResolutionError';\n this.code = readStringField(cause, 'code');\n this.details = readArrayField(cause, 'details');\n }\n}\n\nfunction readStringField(source: unknown, key: string): string | undefined {\n if (source === null || typeof source !== 'object' || !(key in source))\n return undefined;\n const value = Reflect.get(source, key);\n return typeof value === 'string' ? value : undefined;\n}\n\nfunction readArrayField(source: unknown, key: string): unknown[] | undefined {\n if (source === null || typeof source !== 'object' || !(key in source))\n return undefined;\n const value = Reflect.get(source, key);\n return Array.isArray(value) ? value : undefined;\n}\n\n/**\n * Resolve the flow's live window. `listJourneys` is the flow-keyed read the app\n * already exposes and its `sessionId` IS the flow's single active session, so\n * it doubles as the resolver: no second lookup contract is needed.\n *\n * That read depends on the observer, which status and stop themselves do not.\n * A failing lookup therefore reports the fallback rather than reading as \"this\n * flow has no session\", so stop stays reachable when the observer is down.\n */\nasync function resolveSessionId(\n client: ToolClient,\n options: { flowId: string; projectId?: string },\n): Promise<string | null> {\n try {\n const result = await client.listJourneys({\n flowId: options.flowId,\n ...(options.projectId !== undefined && { projectId: options.projectId }),\n limit: 1,\n });\n return result.sessionId;\n } catch (error) {\n // An auth failure is about the caller, not the lookup: let it through\n // unwrapped so the handler still attaches AUTH_HINT.\n if (isAuthError(error)) throw error;\n const detail = error instanceof Error ? error.message : String(error);\n // Carry the structured fields across: `mcpError` reads `code` and\n // `details` off the thrown error, so a bare `new Error` would strip the\n // machine-readable code and leave callers only the prose.\n throw new SessionResolutionError(\n `${SESSION_RESOLUTION_FAILED} (${detail})`,\n error,\n );\n }\n}\n\nfunction resolveProjectId(\n client: ToolClient,\n projectId: string | undefined,\n): string | null {\n return projectId ?? client.getDefaultProject();\n}\n\nconst NO_DEFAULT_PROJECT_ERROR =\n 'No project ID given and no default project set. Pass projectId or set one with project_manage set_default.';\n\nexport function createObserveSessionToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'observe_session',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => observeSessionHandlerBody(client, input),\n };\n}\n\nasync function observeSessionHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n action,\n flowId,\n projectId,\n sessionId,\n arms,\n origins,\n level,\n replace,\n } = parsed.data;\n\n if (!flowId) {\n return mcpError(new Error('flowId is required for observe_session.'));\n }\n const resolvedProjectId = resolveProjectId(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n\n try {\n switch (action) {\n case 'start': {\n if (!client.startObserveSession) {\n return mcpError(\n new Error('observe_session start is not supported by this client.'),\n );\n }\n const settings = readSettings(\n await client.getFlow({\n flowId,\n projectId: resolvedProjectId,\n fields: ['settings'],\n }),\n );\n const settingsName = resolveSettingsName(settings, arms);\n const session = await client.startObserveSession({\n projectId: resolvedProjectId,\n flowId,\n settingsName,\n ...(origins !== undefined && { origins }),\n ...(level !== undefined && { level }),\n ...(replace !== undefined && { replace }),\n });\n return mcpResult(toSummary(session), {\n next: [HINT_SIMULATE_FIRST, HINT_PREVIEW_STREAMS, HINT_READ],\n });\n }\n\n case 'status': {\n if (!client.getObserveSession) {\n return mcpError(\n new Error(\n 'observe_session status is not supported by this client.',\n ),\n );\n }\n const resolvedSessionId =\n sessionId ??\n (await resolveSessionId(client, {\n flowId,\n projectId: resolvedProjectId,\n }));\n if (!resolvedSessionId) {\n return mcpResult(\n { sessionId: null, flowId },\n { next: [HINT_NO_WINDOW, HINT_SIMULATE_FIRST] },\n );\n }\n const session = await client.getObserveSession({\n projectId: resolvedProjectId,\n flowId,\n sessionId: resolvedSessionId,\n });\n return mcpResult(toSummary(session), {\n next:\n session.recordsReceived === 0\n ? [HINT_EMPTY_FEED, HINT_READ, HINT_STOP]\n : [HINT_READ, HINT_STOP],\n });\n }\n\n case 'stop': {\n if (!client.endObserveSession) {\n return mcpError(\n new Error('observe_session stop is not supported by this client.'),\n );\n }\n const resolvedSessionId =\n sessionId ??\n (await resolveSessionId(client, {\n flowId,\n projectId: resolvedProjectId,\n }));\n if (!resolvedSessionId) {\n return mcpResult(\n { sessionId: null, flowId, ended: false },\n { next: [HINT_NO_WINDOW] },\n );\n }\n await client.endObserveSession({\n projectId: resolvedProjectId,\n flowId,\n sessionId: resolvedSessionId,\n });\n return mcpResult(\n { sessionId: resolvedSessionId, flowId, ended: true },\n { next: [HINT_ENDED] },\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${String(action)}. Use one of: start, status, stop`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerObserveSessionTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createObserveSessionToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => observeSessionHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { wrapUserData } from '../user-data.js';\nimport { links } from '../links.js';\nimport type {\n ToolClient,\n ReleaseRef,\n ReleaseDetailWire,\n StepHistoryWire,\n VersionAnnotationWire,\n HubThreadWire,\n KnowledgeEntryWire,\n ThreadAnchorType,\n} from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { inputIssuesMessage } from './parse-input.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\nimport { errorHint } from './feature-gate.js';\n\n/**\n * `hub_manage`: the time-and-why dimension of a flow over MCP.\n *\n * The rest of the MCP surface answers what a flow IS right now. Nothing else\n * exposes the version spine, so this is the only door an agent has to the\n * release history and the reasoning attached to it. It registers on the SAME\n * server instance as `flow_manage`, `package_get`, and the rest, which is what\n * lets an agent compose the two: current config from those tools, history and\n * rationale from this one.\n *\n * Reads are progressive: `releases` is a lean index and never carries a\n * snapshot, `release_get` opens exactly one release in full. The diff in\n * `release_get` is computed by the server from the two stored snapshots, never\n * supplied by the caller, because capture is optional by design and an\n * unannotated release's diff is the only truth left to read.\n *\n * `knowledge` is the page dimension of the same story: what people wrote on the\n * frames of a page in Tag Mode. It is addressed by frame and mark rather than\n * by flow, because a note outlives the flow it was written against and one page\n * carries notes about several. `pageKey` narrows to a whole page, resolved to\n * its frames server-side. It reads only. Writing one happens where the mark is,\n * and settling one is a person's call, the same rule the threads actions\n * follow.\n *\n * Writes are additive only. `rationale_set` replaces the human note on one\n * release and `note_add` appends to a discussion; this tool has no delete\n * action of any kind, and no way to resolve a thread. Resolving states that a\n * release settled a question, which is a person's call to make in the app.\n */\n\n// Caps and patterns the server enforces. Duplicated here so the schema can\n// describe them; the app's src/lib/hub/threads.ts, src/lib/versions/step-history.ts,\n// src/lib/hub/knowledge.ts and src/lib/api/schemas/frames.ts are the authority.\nconst MAX_ANNOTATION_TEXT_LENGTH = 4000;\nconst MAX_ANCHOR_KEY_LENGTH = 255;\nconst MAX_ANCHOR_LABEL_LENGTH = 255;\nconst MAX_STEP_HISTORY_LIMIT = 50;\nconst MAX_STEP_HISTORY_ENTRIES = 200;\nconst MAX_THREAD_LIMIT = 100;\nconst MAX_THREADS_WITH_MESSAGES = 20;\nconst MAX_SOURCE_KEY_LENGTH = 1024;\nconst MAX_MARK_ID_LENGTH = 200;\nconst FRAME_ID_PATTERN = /^frm_[A-Za-z0-9_-]{21}$/;\nconst THREAD_STATUSES = ['open', 'resolved'] as const;\n\nconst TITLE = 'Release History and Rationale';\n\n/**\n * Exported so a host asserts parity against this exact string instead of\n * retyping it.\n */\nexport const HUB_MANAGE_DESCRIPTION =\n 'Read a flow’s release history and the reasoning behind it: what each release changed, and why. ' +\n 'Actions: releases (lean index of a flow’s releases, newest first, no snapshots), ' +\n 'release_get (one release in full: its rationale plus a server-computed diff against the release before it), ' +\n 'step_history (which releases added, changed, or removed one step), ' +\n 'rationale_set (write the human rationale for one release; additive, nothing is ever deleted), ' +\n 'threads (the discussion anchored to one release, or every open discussion on the flow), ' +\n 'note_add (add a message to a thread, or open a new one on a release), ' +\n 'knowledge (read what people wrote on the marks of a page in Tag Mode: one page, one mark, or the whole project). ' +\n 'Threads are resolved by a person in the app, never here: this tool can only add to a discussion. ' +\n 'Knowledge is read-only here for the same reason, and is addressed by frame and mark rather than by flow. ' +\n 'Steps are addressed as \"type.name\", the same form flow_simulate takes, for example \"destination.ga4\", ' +\n '\"transformer.router\", \"source.browser\", \"store.session\", or \"contract.checkout\" for a contract entry. ' +\n 'This tool carries history only: use flow_manage for the current config and package_get for step schemas.';\n\nconst ACTIONS = [\n 'releases',\n 'release_get',\n 'step_history',\n 'rationale_set',\n 'threads',\n 'note_add',\n 'knowledge',\n] as const;\n\n/**\n * The anchors a caller may name here: the stored vocabulary MINUS `page`.\n *\n * A `page` anchor hangs on a FRAME, and every action here that opens a thread\n * opens it on a flow. The flow's threads response is parsed on the way out, so\n * a single page-anchored flow thread written from here would make the read fail\n * its own parse from then on, permanently, for everyone. Fencing the write is\n * what keeps that row from ever existing. Notes on a frame are written where\n * the frame is, never here.\n *\n * `satisfies` is the fence: the list is proved to be values the response\n * schemas can carry, so a member that only the storage layer knows about\n * cannot be added here without the wire contract moving first.\n */\nconst TOOL_ANCHOR_TYPES = [\n 'step',\n 'entity_action',\n 'release',\n 'contract',\n 'tag',\n] as const satisfies readonly ThreadAnchorType[];\n\n/**\n * One flat schema with an `action` enum and per-action optional fields, the\n * shape `flow_manage`, `project_manage`, and `secret_manage` already use.\n * Per-action requirements are enforced in the handler, so later actions add a\n * field and an enum member without reshaping what callers already send.\n *\n * Exported so the declarative registry holds the same object rather than a\n * second copy of it.\n */\nexport const HUB_MANAGE_INPUT_SCHEMA = {\n action: z\n .enum(ACTIONS, {\n error: () => `Unknown action. Use one of: ${ACTIONS.join(', ')}`,\n })\n .describe('Which part of the release history to read or write'),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional: falls back to the default project when omitted.',\n ),\n flowId: z\n .string()\n .optional()\n .describe(\n 'Flow ID (flow_...). Required for every action except \"knowledge\", which hangs on a page rather than a flow and refuses this field.',\n ),\n versionId: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Release version ID (ver_...) from action \"releases\". Addresses one release for release_get and rationale_set. Pass this or versionNumber.',\n ),\n versionNumber: z\n .number()\n .int()\n .positive()\n .optional()\n .describe(\n 'Spine release number for this flow, the `versionNumber` field of action \"releases\". Alternative to versionId. Not the same as a row\\'s deploymentAttempt.',\n ),\n step: z\n .string()\n .optional()\n .describe(\n 'Step key as \"type.name\", e.g. \"destination.ga4\" or \"contract.checkout\". Required for step_history.',\n ),\n flow: z\n .string()\n .optional()\n .describe(\n 'Named flow inside the config, e.g. \"web\" or \"server\". Optional for step_history: omit to scan every named flow. Ignored for contract steps, which are top-level.',\n ),\n text: z\n .string()\n // Trimmed BEFORE the checks. Whitespace-only text otherwise satisfies\n // min(1) and then normalizes to empty downstream, which stores a blank\n // message, and on `rationale_set` reaches the annotation writer where\n // empty means CLEAR: the delete this additive-only tool does not have.\n .trim()\n .min(1)\n .max(MAX_ANNOTATION_TEXT_LENGTH)\n .optional()\n .describe(\n `The text to write (1-${MAX_ANNOTATION_TEXT_LENGTH} chars). Required for rationale_set and note_add. As rationale it replaces the note already on the release and never touches the machine summary; as a note it is appended to a thread and nothing is ever replaced.`,\n ),\n limit: z\n .number()\n .int()\n .positive()\n .optional()\n .describe(\n `Page size. Releases to list for action \"releases\" (max 100), or releases to SCAN for step_history (max ${MAX_STEP_HISTORY_LIMIT}). For step_history this bounds releases, not entries: a step present in several named flows yields one entry per flow per release, and the scan stops at ${MAX_STEP_HISTORY_ENTRIES} entries with entriesTruncated set. Narrow with \"flow\" to avoid that. For threads it bounds threads, and a read that carries messages is held to ${MAX_THREADS_WITH_MESSAGES} of them. Knowledge entries are bounded the same way.`,\n ),\n offset: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe('Releases to skip. Action \"releases\" only.'),\n anchorType: z\n .enum(TOOL_ANCHOR_TYPES)\n .optional()\n .describe(\n 'What a thread hangs on. Defaults to \"release\", the only anchor the app writes today. Pair it with anchorKey; a key means a different thing under each type.',\n ),\n anchorKey: z\n .string()\n .min(1)\n .max(MAX_ANCHOR_KEY_LENGTH)\n .optional()\n .describe(\n 'What the anchor addresses within its type: a release version ID (ver_...) for \"release\", a \"type.name\" step key for \"step\". For a release you can pass versionId or versionNumber instead. Omit entirely on action \"threads\" to read every thread on the flow.',\n ),\n anchorLabel: z\n .string()\n .min(1)\n .max(MAX_ANCHOR_LABEL_LENGTH)\n .optional()\n .describe(\n 'How the anchor reads on screen, stored once when a thread is opened so a later rename leaves it readable. Derived for a release (\"v14\"); pass it only when opening a thread on another anchor type.',\n ),\n threadId: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Thread ID (thr_...) from action \"threads\". Pass it to note_add to reply in that thread; omit it to open a new thread on the anchor.',\n ),\n status: z\n .enum(THREAD_STATUSES)\n .optional()\n .describe(\n 'Read only threads in this state. Action \"threads\" only; omit for both.',\n ),\n pageKey: z\n .string()\n .min(1)\n .max(MAX_SOURCE_KEY_LENGTH)\n .optional()\n .describe(\n 'The page a note was left on, as Tag Mode addressed it, usually the page URL. Narrows action \"knowledge\" to every frame that page holds, at any depth; omit it to read the whole project.',\n ),\n frameId: z\n .string()\n .regex(FRAME_ID_PATTERN)\n .optional()\n .describe(\n 'One frame (frm_...), the named rectangle a note hangs on. Action \"knowledge\" only. Narrower than pageKey, since a page holds several frames.',\n ),\n markId: z\n .string()\n .min(1)\n .max(MAX_MARK_ID_LENGTH)\n .optional()\n .describe(\n 'One tag within \"frameId\", by its tag id (the id of an entry in frame_manage marks.tags). Action \"knowledge\" only, and refused without frameId, since a mark id alone addresses nothing. Naming a mark is also what attaches the message bodies.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: false,\n // False because of `note_add`, which APPENDS. `rationale_set` is an upsert\n // and repeating it is harmless, but this block covers the whole tool, and a\n // client that retries a timed-out call on the strength of an idempotent hint\n // would post the same remark twice into a human discussion. Nothing here is\n // destructive either way: a duplicate message can be read past, and there is\n // no delete to undo it with.\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\n/**\n * Hints carry the verb ladder rather than the description. One constant per\n * sentence the tool can emit, so the surface fixture pins wording and ordering\n * by name and a reword fails a test instead of drifting.\n */\nexport const HUB_HINT_RELEASE_GET =\n 'Use action \"release_get\" with a versionId or versionNumber to read one release in full, with its diff.';\nexport const HUB_HINT_ROWS_ARE_DEPLOYMENTS =\n 'Rows are deployments, not releases: the same versionId on several rows is a redeploy of identical content, so count distinct versionId values, and note that total counts deployments.';\nexport const HUB_HINT_STEP_HISTORY =\n 'Use action \"step_history\" to see which releases touched one step.';\nexport const HUB_HINT_MASKED_ONLY =\n 'The diff is empty because the only changes are inside masked values. Say that the change is not visible here rather than that nothing changed.';\nexport const HUB_HINT_TRACE_STEP =\n 'Use action \"step_history\" to trace one step across releases.';\nexport const HUB_HINT_WRITE_RATIONALE =\n 'This release has no human rationale. Read the diff, then use action \"rationale_set\" to record why it changed.';\nexport const HUB_HINT_SCAN_CAPPED =\n 'The scan stopped at the entry cap, so older releases were not compared. Narrow with \"flow\" to see the whole history of one occurrence.';\nexport const HUB_HINT_NO_MATCH =\n 'No scanned release touched this step. Check the step key against knownSteps, or raise limit to scan further back.';\nexport const HUB_HINT_OPEN_RELEASE =\n 'Use action \"release_get\" on one of these versionIds to read the full diff and rationale.';\nexport const HUB_HINT_RATIONALE_VISIBLE =\n 'The rationale is now visible on this release in the app.';\nexport const HUB_HINT_CONFIRM_INDEX =\n 'Use action \"releases\" to confirm it appears in the index.';\nexport const HUB_HINT_THREADS_PAGE_CAPPED = `More threads match than were returned (the page is capped at ${MAX_THREADS_WITH_MESSAGES} when messages are attached). Narrow with anchorType and anchorKey, or with status, rather than treating this as the complete list.`;\nexport const HUB_HINT_NOTHING_DISCUSSED =\n 'Nothing is being discussed on this flow. Use action \"note_add\" with a versionId to start a thread on a release.';\nexport const HUB_HINT_NO_THREAD_ON_ANCHOR =\n 'No thread hangs on this anchor yet. Use action \"note_add\" to open one.';\nexport const HUB_HINT_THREADS_INDEX =\n 'This is an index: message bodies are omitted. Pass a versionId, or anchorType with anchorKey, to read one discussion in full.';\nexport const HUB_HINT_MESSAGES_TRUNCATED =\n 'A thread here is marked hasMoreMessages: only its newest messages were returned. Say the discussion is longer than what you read rather than summarizing it as complete.';\nexport const HUB_HINT_REPLY_OR_OPEN =\n 'Use action \"note_add\" with a threadId to reply in one of these threads, or without one to open another.';\nexport const HUB_HINT_RESOLVE_IN_APP =\n 'Resolving a thread into a release is done by a person in the app, not through this tool.';\nexport const HUB_HINT_MESSAGE_VISIBLE =\n 'The message is now visible in this thread in the app.';\nexport const HUB_HINT_STAYS_RESOLVED =\n 'This thread is resolved and stayed resolved: a reply never retracts the release link.';\nexport const HUB_HINT_READ_BACK =\n 'Use action \"threads\" to read the discussion back.';\nexport const HUB_HINT_THREAD_OPEN =\n 'The thread is now open on this anchor in the app.';\nexport const HUB_HINT_KEEP_ONE_THREAD =\n 'Pass its threadId back to action \"note_add\" to keep the conversation in one place instead of opening another thread.';\nexport const HUB_HINT_KNOWLEDGE_PAGE_CAPPED =\n 'More knowledge matches than was returned. Narrow with pageKey, then frameId, then markId, rather than treating this as everything that was written.';\nexport const HUB_HINT_NOTHING_WRITTEN =\n 'Nothing has been written here. Notes are left on the page in Tag Mode, not through this tool.';\nexport const HUB_HINT_KNOWLEDGE_INDEX =\n 'This is an index: message bodies are omitted. Pass markId with frameId to read one mark in full.';\nexport const HUB_HINT_ENTRY_NAMES_FLOW =\n 'An entry names the flow it was written against in flowId, and validity says which release was live at the time.';\nexport const HUB_HINT_KNOWLEDGE_READ_ONLY =\n 'This tool only reads knowledge. Answering a note, and settling it, are done by a person in the app.';\nexport const HUB_HINT_READ_FRAME =\n 'Use frame_manage action \"get\" with the frameId to read the frame and its marks.';\nexport const HUB_NOT_FOUND_HINT =\n 'Use action \"releases\" to find version ids and action \"threads\" to find thread ids.';\n\n/**\n * The same shape the transport validates against, applied again here.\n *\n * The MCP SDK does parse arguments before invoking a tool callback, but that\n * parse happens in whichever SDK copy the host linked, and this module's spec\n * is deliberately drivable without a transport at all. Parsing here is what\n * keeps the 4000-char cap and the additive-only guarantee inside this file:\n * `text: null` would otherwise reach the annotation writer, where null means\n * CLEAR, and quietly become the delete action this tool does not have.\n */\nconst hubInputSchema = z.object(HUB_MANAGE_INPUT_SCHEMA);\n\ntype HubInput = z.infer<typeof hubInputSchema>;\n\n/**\n * Why a call was refused. Carried as `code` so an agent can branch on the\n * denial it is most likely to hit instead of matching prose. A denial the\n * server raises, such as FEATURE_NOT_AVAILABLE, arrives with its own code and\n * never needs a member here.\n */\nexport type HubToolErrorCode = 'INVALID_INPUT' | 'NOT_FOUND';\n\nexport class HubToolError extends Error {\n constructor(\n public readonly code: HubToolErrorCode,\n message: string,\n ) {\n super(message);\n this.name = 'HubToolError';\n }\n}\n\nfunction requireParam<T>(\n value: T | undefined,\n name: string,\n action: string,\n): T {\n if (value === undefined) {\n throw new HubToolError(\n 'INVALID_INPUT',\n `${name} is required for action \"${action}\"`,\n );\n }\n return value;\n}\n\n/**\n * Resolve the release address a caller gave. `versionId` wins when both are\n * present, so an explicit id is never silently reinterpreted as a number.\n */\nfunction releaseRef(input: HubInput, action: string): ReleaseRef {\n if (input.versionId !== undefined) return { versionId: input.versionId };\n if (input.versionNumber !== undefined) {\n return { versionNumber: input.versionNumber };\n }\n throw new HubToolError(\n 'INVALID_INPUT',\n `versionId or versionNumber is required for action \"${action}\". Use action \"releases\" to find one.`,\n );\n}\n\n/**\n * Stored annotation text is written by people and lands in third-party model\n * context, so it is wrapped as data. Ids, numbers, and timestamps stay literal:\n * the agent has to echo them back verbatim in the next call.\n */\nfunction serializeAnnotation(annotation: VersionAnnotationWire) {\n return {\n versionId: annotation.versionId,\n humanText:\n annotation.humanText === null ? null : wrapUserData(annotation.humanText),\n generatedSummary:\n annotation.generatedSummary === null\n ? null\n : wrapUserData(annotation.generatedSummary),\n author: annotation.author,\n createdAt: annotation.createdAt,\n updatedAt: annotation.updatedAt,\n };\n}\n\n/**\n * The scan result as an index. An entry's own rationale text is not surfaced\n * here: `release_get` is the detail read, and repeating every note across a\n * fifty-release scan would make this the opposite of an index.\n */\nfunction serializeStepHistory(history: StepHistoryWire) {\n return {\n step: history.step,\n flow: history.flow,\n entries: history.entries.map((entry) => ({\n versionId: entry.versionId,\n versionNumber: entry.versionNumber,\n createdAt: entry.createdAt,\n flow: entry.flow,\n change: entry.change,\n })),\n scanned: history.scanned,\n truncated: history.truncated,\n entriesTruncated: history.entriesTruncated,\n // Step keys and flow names are addresses the caller passes straight back,\n // so they stay literal for the same reason ids do.\n ...(history.knownSteps !== undefined && { knownSteps: history.knownSteps }),\n };\n}\n\n/**\n * Thread text is written by people and lands in third-party model context, so\n * message bodies and the anchor label are wrapped as data. Ids, the status, and\n * timestamps stay literal: the agent echoes them back in the next call.\n */\nfunction serializeThread(thread: HubThreadWire) {\n return {\n threadId: thread.id,\n anchorType: thread.anchorType,\n anchorKey: thread.anchorKey,\n anchorLabel: wrapUserData(thread.anchorLabel),\n status: thread.status,\n // The release that settled it, null while open AND once that release is\n // gone. `status` is what separates those two, never this field.\n resolvedByVersionId: thread.resolvedByVersionId,\n resolvedByVersionNumber: thread.resolvedByVersionNumber,\n resolvedBy: thread.resolvedBy,\n createdBy: thread.createdBy,\n createdAt: thread.createdAt,\n updatedAt: thread.updatedAt,\n messageCount: thread.messageCount,\n ...(thread.messages !== undefined\n ? {\n // Set when the thread holds more than this call carried. The tail is\n // the OLD end: what is here is always the newest exchange.\n hasMoreMessages: thread.hasMoreMessages === true,\n messages: thread.messages.map((message) => ({\n author: message.author,\n text: wrapUserData(message.text),\n createdAt: message.createdAt,\n })),\n }\n : {}),\n };\n}\n\n/**\n * Knowledge is written on a live page and lands in third-party model context,\n * so the description body, the message bodies, the anchor's label, the frame's\n * name and the author's display name are wrapped as data. Ids, keys, the\n * derived validity and freshness, and timestamps stay literal: the agent\n * addresses the next call with the first and branches on the rest.\n *\n * The spatial placement is dropped rather than serialized. Its `element` is an\n * opaque DOM anchor captured from the page, of unbounded size and shape, and\n * the fractional point beside it only means something to something that draws\n * the overlay. Neither tells a reader here anything, and the first is page\n * content this tool would then have to wrap.\n */\nfunction serializeKnowledge(entry: KnowledgeEntryWire) {\n const shared = {\n id: entry.id,\n anchorType: entry.anchorType,\n anchorKey: entry.anchorKey,\n anchorLabel: wrapUserData(entry.anchorLabel),\n frameId: entry.frameId,\n /** A person names a frame, so the name is page content like any other. */\n frameName: entry.frameName === null ? null : wrapUserData(entry.frameName),\n /** The flow it was written against, or null. Never a filter. */\n flowId: entry.flowId,\n subjectKey: entry.subjectKey,\n /** When it was true, and whether it still is. Derived at read time. */\n validity: entry.validity,\n freshness: entry.freshness,\n author: {\n kind: entry.author.kind,\n id: entry.author.id,\n label: wrapUserData(entry.author.label),\n },\n source: entry.source,\n updatedAt: entry.updatedAt,\n };\n\n if (entry.kind === 'description') {\n return { ...shared, kind: entry.kind, body: wrapUserData(entry.body) };\n }\n\n return {\n ...shared,\n kind: entry.kind,\n status: entry.status,\n createdAt: entry.createdAt,\n messageCount: entry.messageCount,\n ...(entry.messages !== undefined\n ? {\n // Set when the thread holds more than this call carried, and only\n // meaningful beside the messages it describes.\n hasMoreMessages: entry.hasMoreMessages === true,\n messages: entry.messages.map((message) => ({\n author: message.author,\n text: wrapUserData(message.text),\n createdAt: message.createdAt,\n })),\n }\n : {}),\n };\n}\n\nasync function handleReleases(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const { releases, total } = await client.listReleases({\n projectId,\n flowId,\n ...(input.limit !== undefined && { limit: input.limit }),\n ...(input.offset !== undefined && { offset: input.offset }),\n });\n\n // The screen this index is of. Structured rather than only mentioned in a\n // hint, so an agent can hand it on as data instead of re-typing it out of\n // prose. Named `appUrl`, the one key every tool here emits a link under, so\n // it can never collide with a `url` that some response already uses for\n // something of its own.\n const appUrl = links.release({\n baseUrl: client.appBaseUrl(),\n projectId,\n flowId,\n });\n\n return mcpResult(\n {\n releases: releases.map((release) => ({\n // The spine address. `release_get` and `rationale_set` take this pair\n // and nothing else.\n versionId: release.flowVersionId,\n versionNumber: release.flowVersionNumber,\n deployment: release.deploymentSlug,\n deploymentType: release.deploymentType,\n // The publish attempt within that deployment lineage. Deliberately NOT\n // called a version: it addresses nothing in this tool, and a row\n // carrying two numbers both named \"version\" is a trap.\n deploymentAttempt: release.versionNumber,\n status: release.status,\n source: release.source,\n errorCode: release.errorCode,\n createdAt: release.createdAt,\n createdBy: release.createdBy,\n rationale: release.rationale\n ? {\n hasHumanText: release.rationale.hasHumanText,\n hasGeneratedSummary: release.rationale.hasGeneratedSummary,\n firstLine:\n release.rationale.firstLine === null\n ? null\n : wrapUserData(release.rationale.firstLine),\n }\n : null,\n })),\n total,\n ...(appUrl !== undefined && { appUrl }),\n },\n {\n next: [\n HUB_HINT_RELEASE_GET,\n HUB_HINT_ROWS_ARE_DEPLOYMENTS,\n HUB_HINT_STEP_HISTORY,\n ],\n },\n );\n}\n\nasync function handleReleaseGet(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const release = await client.getRelease({\n projectId,\n flowId,\n ref: releaseRef(input, 'release_get'),\n });\n\n // The rendered diff is built from MASKED content, so an empty diff does not\n // mean the releases are the same: a change confined to an inline secret\n // renders as nothing. `contentIdentical` is decided over unmasked content,\n // so it is the only trustworthy identity signal, and the gap between the two\n // is stated rather than left for the reader to infer.\n const contentIdentical =\n release.diff !== null && release.diff.contentIdentical;\n const maskedOnly =\n release.diff !== null && release.diff.text === '' && !contentIdentical;\n\n return mcpResult(\n {\n versionId: release.versionId,\n versionNumber: release.versionNumber,\n contentHash: release.contentHash,\n createdAt: release.createdAt,\n createdBy: release.createdBy,\n rationale: release.rationale\n ? serializeAnnotation(release.rationale)\n : null,\n diff: release.diff\n ? {\n prevVersionId: release.diff.prevVersionId,\n prevVersionNumber: release.diff.prevVersionNumber,\n // Config values are user-authored, and inline secrets are masked\n // before the text is built.\n text:\n release.diff.text === '' ? null : wrapUserData(release.diff.text),\n /** Compared over unmasked content, so this is the real answer. */\n contentIdentical,\n note: maskedOnly\n ? 'These releases differ, but only inside values that are masked in the diff, typically inline secrets. Do not report this release as unchanged.'\n : null,\n }\n : null,\n diffUnavailable: release.diff\n ? null\n : 'This is the flow’s oldest release, so there is nothing to diff it against.',\n },\n {\n next: maskedOnly\n ? [HUB_HINT_MASKED_ONLY]\n : release.rationale?.humanText\n ? [HUB_HINT_TRACE_STEP]\n : [HUB_HINT_WRITE_RATIONALE],\n },\n );\n}\n\nasync function handleStepHistory(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const step = requireParam(input.step, 'step', 'step_history');\n\n const history = await client.listStepHistory({\n projectId,\n flowId,\n step,\n ...(input.flow !== undefined && { flow: input.flow }),\n ...(input.limit !== undefined && { limit: input.limit }),\n });\n\n const next = history.entriesTruncated\n ? [HUB_HINT_SCAN_CAPPED]\n : history.entries.length === 0\n ? [HUB_HINT_NO_MATCH]\n : [HUB_HINT_OPEN_RELEASE];\n\n // The step on screen, linked only when the scan itself says the step is\n // still there.\n //\n // `history.flow` is the caller's own filter echoed back, unvalidated, so a\n // scan that named no flow gets no link (a step address without one resolves\n // to nothing in the app) and a scan that named a wrong one would otherwise\n // build an address the flow page opens and then refuses. Entries come back\n // newest first, so an empty scan found the step in no release at all, and a\n // newest entry of `removed` means the last thing that happened to it was its\n // removal. Both are exactly the cases the app answers with its \"not found in\n // this flow\" notice, and no link beats a link to a notice.\n //\n // The flow names on the ENTRIES are deliberately not used as the address\n // instead: they say where the step USED to live. What remains is a step\n // renamed since the newest release, which no signal in hand can catch; the\n // app names that on screen.\n const newest = history.entries[0];\n const stepIsLive = newest !== undefined && newest.change !== 'removed';\n const appUrl = stepIsLive\n ? links.step({\n baseUrl: client.appBaseUrl(),\n projectId,\n flowId,\n step: history.step,\n flow: history.flow,\n })\n : undefined;\n\n return mcpResult(\n {\n ...serializeStepHistory(history),\n ...(appUrl !== undefined && { appUrl }),\n },\n { next },\n );\n}\n\n/**\n * Every release address goes through the detail read, by id as much as by\n * number: it is the one call that proves the release belongs to THIS flow and\n * hands back the number the app shows. A sibling flow's id therefore meets\n * NOT_FOUND from the client before anything is written.\n */\nasync function resolveRelease(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n action: string,\n): Promise<ReleaseDetailWire> {\n return client.getRelease({\n projectId,\n flowId,\n ref: releaseRef(input, action),\n });\n}\n\nasync function handleRationaleSet(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const text = requireParam(input.text, 'text', 'rationale_set');\n const release = await resolveRelease(\n client,\n projectId,\n flowId,\n input,\n 'rationale_set',\n );\n\n const annotation = await client.setReleaseRationale({\n projectId,\n flowId,\n versionId: release.versionId,\n text,\n });\n\n return mcpResult(\n {\n versionId: annotation.versionId,\n versionNumber: release.versionNumber,\n rationale: serializeAnnotation(annotation),\n },\n { next: [HUB_HINT_RATIONALE_VISIBLE, HUB_HINT_CONFIRM_INDEX] },\n );\n}\n\n/** One anchor a thread hangs on, resolved from whatever the caller addressed. */\ninterface ResolvedAnchor {\n anchorType: ThreadAnchorType;\n anchorKey: string;\n anchorLabel: string;\n}\n\n/**\n * The anchor the caller addressed, or null when they addressed none.\n *\n * A release can be addressed the way every other action here takes one\n * (`versionId` / `versionNumber`), which is resolved through the flow so a\n * sibling flow's release is refused and the display label is derived from the\n * real release number rather than trusted from the caller. Any other anchor\n * type is taken as given: this tool cannot verify a step key against a config\n * it does not load, and a thread on a key that no longer exists is exactly what\n * `anchorLabel` and the unanchored bucket are for.\n */\nasync function resolveAnchor(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n action: string,\n): Promise<ResolvedAnchor | null> {\n const type = input.anchorType ?? 'release';\n\n if (type === 'release') {\n if (input.versionId === undefined && input.versionNumber === undefined) {\n if (input.anchorKey === undefined) return null;\n // An explicit key for a release anchor still has to be a release of this\n // flow, or the thread would point at nothing readable.\n const byKey = await client.getRelease({\n projectId,\n flowId,\n ref: { versionId: input.anchorKey },\n });\n return {\n anchorType: 'release',\n anchorKey: byKey.versionId,\n anchorLabel: `v${byKey.versionNumber}`,\n };\n }\n\n const release = await resolveRelease(\n client,\n projectId,\n flowId,\n input,\n action,\n );\n return {\n anchorType: 'release',\n anchorKey: release.versionId,\n anchorLabel: `v${release.versionNumber}`,\n };\n }\n\n if (input.anchorKey === undefined) return null;\n return {\n anchorType: type,\n anchorKey: input.anchorKey,\n anchorLabel: input.anchorLabel ?? input.anchorKey,\n };\n}\n\nasync function handleThreads(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const anchor = await resolveAnchor(\n client,\n projectId,\n flowId,\n input,\n 'threads',\n );\n\n // Message bodies come back only for ONE anchor. A whole-flow listing is an\n // index, and carrying every word ever written on every anchor would make it\n // the opposite of one.\n const { threads, hasMoreThreads } = await client.listThreads({\n projectId,\n flowId,\n includeMessages: anchor !== null,\n ...(anchor !== null\n ? { anchorType: anchor.anchorType, anchorKey: anchor.anchorKey }\n : {}),\n ...(input.status !== undefined && { status: input.status }),\n ...(input.limit !== undefined && {\n limit: Math.min(input.limit, MAX_THREAD_LIMIT),\n }),\n });\n\n const truncated = threads.some((thread) => thread.hasMoreMessages === true);\n\n // The page ceiling is not what the caller asked for: a read that carries\n // message bodies is clamped hard. Saying so keeps an agent from reporting a\n // truncated page as the whole of a flow's discussion.\n const pageHint = hasMoreThreads ? [HUB_HINT_THREADS_PAGE_CAPPED] : [];\n\n const next =\n threads.length === 0\n ? [\n anchor === null\n ? HUB_HINT_NOTHING_DISCUSSED\n : HUB_HINT_NO_THREAD_ON_ANCHOR,\n ]\n : anchor === null\n ? [...pageHint, HUB_HINT_THREADS_INDEX]\n : [\n ...pageHint,\n ...(truncated ? [HUB_HINT_MESSAGES_TRUNCATED] : []),\n HUB_HINT_REPLY_OR_OPEN,\n HUB_HINT_RESOLVE_IN_APP,\n ];\n\n // Where these are read. An anchored read links the anchor's own screen, and\n // only a release anchor can be addressed from the shape held here. An\n // unanchored read is the flow's whole discussion, which is read in the\n // release history, so it links that.\n const flowTarget = { baseUrl: client.appBaseUrl(), projectId, flowId };\n const appUrl =\n anchor === null\n ? links.release(flowTarget)\n : links.thread({ ...flowTarget, anchorType: anchor.anchorType });\n\n return mcpResult(\n {\n threads: threads.map(serializeThread),\n hasMoreThreads,\n ...(appUrl !== undefined && { appUrl }),\n },\n { next },\n );\n}\n\nasync function handleNoteAdd(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const text = requireParam(input.text, 'text', 'note_add');\n\n if (input.threadId !== undefined) {\n const thread = await client.addThreadMessage({\n projectId,\n flowId,\n threadId: input.threadId,\n text,\n });\n return mcpResult(\n { thread: serializeThread(thread) },\n {\n next: [\n HUB_HINT_MESSAGE_VISIBLE,\n thread.status === 'resolved'\n ? HUB_HINT_STAYS_RESOLVED\n : HUB_HINT_READ_BACK,\n ],\n },\n );\n }\n\n const anchor = await resolveAnchor(\n client,\n projectId,\n flowId,\n input,\n 'note_add',\n );\n if (anchor === null) {\n throw new HubToolError(\n 'INVALID_INPUT',\n 'note_add needs somewhere to write: pass threadId to reply, or versionId (or anchorType with anchorKey) to open a thread on an anchor.',\n );\n }\n\n const thread = await client.createThread({\n projectId,\n flowId,\n anchorType: anchor.anchorType,\n anchorKey: anchor.anchorKey,\n // A release anchor is labeled by the server from the release number, so the\n // label travels only for the other anchor types.\n ...(anchor.anchorType !== 'release' && { anchorLabel: anchor.anchorLabel }),\n text,\n });\n\n return mcpResult(\n { thread: serializeThread(thread) },\n { next: [HUB_HINT_THREAD_OPEN, HUB_HINT_KEEP_ONE_THREAD] },\n );\n}\n\nasync function handleKnowledge(\n client: ToolClient,\n projectId: string,\n input: HubInput,\n) {\n // Message bodies come back only for ONE mark, the rule `threads` follows for\n // one anchor: a page-wide or project-wide read is an index, and carrying\n // every word written on every mark would make it the opposite of one.\n const oneMark = input.markId !== undefined;\n\n // The server refuses a mark without its page rather than answering an\n // unnarrowed list, and that refusal carries its own code through mcpError.\n const { entries, hasMoreEntries } = await client.listKnowledge({\n projectId,\n includeMessages: oneMark,\n ...(input.pageKey !== undefined && { pageKey: input.pageKey }),\n ...(input.frameId !== undefined && { frameId: input.frameId }),\n ...(input.markId !== undefined && { markId: input.markId }),\n ...(input.limit !== undefined && { limit: input.limit }),\n });\n\n const truncated = entries.some(\n (entry) => entry.kind === 'thread' && entry.hasMoreMessages === true,\n );\n\n const pageHint = hasMoreEntries ? [HUB_HINT_KNOWLEDGE_PAGE_CAPPED] : [];\n\n const next =\n entries.length === 0\n ? [HUB_HINT_NOTHING_WRITTEN]\n : [\n ...pageHint,\n ...(oneMark\n ? truncated\n ? [HUB_HINT_MESSAGES_TRUNCATED]\n : []\n : [HUB_HINT_KNOWLEDGE_INDEX]),\n HUB_HINT_ENTRY_NAMES_FLOW,\n HUB_HINT_KNOWLEDGE_READ_ONLY,\n HUB_HINT_READ_FRAME,\n ];\n\n return mcpResult(\n { entries: entries.map(serializeKnowledge), hasMoreEntries },\n { next },\n );\n}\n\nexport async function hubManageHandler(client: ToolClient, rawInput: unknown) {\n try {\n // Parse, never assert: see the note on `hubInputSchema`. A raw ZodError\n // stringifies its whole issue list into `message`, so the issues are\n // rewritten as one readable line carrying the same code as every other\n // refusal here.\n const parsed = hubInputSchema.safeParse(rawInput ?? {});\n if (!parsed.success) {\n throw new HubToolError('INVALID_INPUT', inputIssuesMessage(parsed.error));\n }\n const input: HubInput = parsed.data;\n const { action } = input;\n\n const projectId = resolveDefaultProject(client, input.projectId);\n if (!projectId) {\n throw new HubToolError('INVALID_INPUT', NO_DEFAULT_PROJECT_ERROR);\n }\n\n if (action === 'knowledge') {\n // Nothing here narrows knowledge by flow. Taking the field and answering\n // with every page's notes anyway is the failure mode this refuses: the\n // caller asked for one flow's and would read the answer as that.\n if (input.flowId !== undefined) {\n throw new HubToolError(\n 'INVALID_INPUT',\n 'flowId does not narrow action \"knowledge\", which is addressed by frame and mark: pass pageKey, frameId or markId instead. Each entry names the flow it was written against.',\n );\n }\n return await handleKnowledge(client, projectId, input);\n }\n\n const flowId = requireParam(input.flowId, 'flowId', action);\n\n switch (action) {\n case 'releases':\n return await handleReleases(client, projectId, flowId, input);\n case 'release_get':\n return await handleReleaseGet(client, projectId, flowId, input);\n case 'step_history':\n return await handleStepHistory(client, projectId, flowId, input);\n case 'rationale_set':\n return await handleRationaleSet(client, projectId, flowId, input);\n case 'threads':\n return await handleThreads(client, projectId, flowId, input);\n case 'note_add':\n return await handleNoteAdd(client, projectId, flowId, input);\n }\n } catch (error) {\n // `mcpError` lifts a `code` property off the error, so a HubToolError and\n // whatever the client raises both surface their code without a branch here.\n return mcpError(error, errorHint(error, 'hub', HUB_NOT_FOUND_HINT));\n }\n}\n\n/**\n * The tool as data, so it can be driven without an MCP transport (tests, and\n * any in-process bridge).\n */\nexport function createHubManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'hub_manage',\n title: TITLE,\n description: HUB_MANAGE_DESCRIPTION,\n inputSchema: HUB_MANAGE_INPUT_SCHEMA,\n annotations,\n handler: (input) => hubManageHandler(client, input),\n };\n}\n\nexport function registerHubManageTool(server: McpServer, client: ToolClient) {\n const spec = createHubManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => hubManageHandler(client, args),\n );\n}\n","import { isAuthError, AUTH_HINT } from '../types.js';\n\n/** The code every door answers a plan or project gate with. */\nexport const FEATURE_NOT_AVAILABLE = 'FEATURE_NOT_AVAILABLE';\n\n/** The features a door can refuse a whole tool for. */\nexport type GatedFeature = 'hub' | 'frames';\n\nfunction codeOf(error: unknown): string | undefined {\n if (!(error instanceof Error) || !('code' in error)) return undefined;\n const code = error.code;\n return typeof code === 'string' ? code : undefined;\n}\n\n/**\n * A denial is recognised by its code, never by its wording: the two doors phrase\n * the refusal differently and only the code is contractual.\n */\nexport function isFeatureDenial(error: unknown): boolean {\n return codeOf(error) === FEATURE_NOT_AVAILABLE;\n}\n\n/**\n * Names the feature so an agent can tell the person what is missing. Enabling\n * it is a plan or project entitlement change made in the app, never something\n * a tool can do, and the hint says so instead of inviting a retry.\n */\nexport function featureDenialHint(feature: GatedFeature): string {\n return `The \"${feature}\" feature is not enabled for this project. Tell the person that \"${feature}\" needs a plan or project entitlement that unlocks it, which is changed in the app, not through this tool.`;\n}\n\n/**\n * One hint rule for the gated tools: a feature denial names the feature, an\n * auth failure points at the auth tool, a NOT_FOUND points at discovery, and\n * anything else carries no hint.\n *\n * Order matters, though not because of the HTTP status: `isAuthError` reads the\n * error's code and the words in its message, never a status. A denial carries\n * its own code, but its MESSAGE is a door's free choice, and one worded\n * \"Forbidden\" is a message `isAuthError` answers to. Reading the specific\n * reason first is what keeps such a denial from being reported as a login\n * problem the person could fix by logging in again.\n */\nexport function errorHint(\n error: unknown,\n feature: GatedFeature,\n notFoundHint: string,\n): string | undefined {\n if (isFeatureDenial(error)) return featureDenialHint(feature);\n if (isAuthError(error)) return AUTH_HINT;\n if (codeOf(error) === 'NOT_FOUND') return notFoundHint;\n return undefined;\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { redactNestedStrings, wrapUserData } from '../user-data.js';\nimport type { ToolClient, FrameLeanWire, FrameWire } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { inputIssuesMessage } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n FRAME_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\nimport { errorHint } from './feature-gate.js';\n\n/**\n * `frame_manage`: the place dimension of a measurement plan over MCP.\n *\n * A frame is a named rectangle over a page, with marks inside it. It answers\n * WHERE something is measured, which nothing else on this surface carries:\n * `flow_manage` holds the config, `hub_manage` holds the history and the\n * reasoning, and this holds the drawing those two are argued about on.\n *\n * Read-only, on purpose. A frame is drawn against a live page or an import,\n * and its geometry only means anything next to the pixels it was drawn on.\n * A tool that cannot see the page cannot place a rectangle on it, so writing\n * one from here would be guessing. Editing happens in Tag Mode or the app.\n *\n * Reads are progressive, the same ladder `hub_manage` uses. `list` is the lean\n * project index and never carries marks, because the marks of a whole project\n * are the largest thing this tool could return and are almost never what a\n * caller wanted. `page` opens one page's frames with their marks, and `get`\n * opens exactly one frame.\n *\n * It composes with `hub_manage` through ids: a tag id read here is the\n * `markId` that tool's \"knowledge\" action takes, which is why tag ids stay\n * literal while everything else inside the marks is wrapped as user data.\n */\n\n// Caps and patterns the server enforces. Duplicated here so the schema can\n// describe them; the app's src/lib/api/schemas/frames.ts is the authority.\nconst FRAME_ID_PATTERN = /^frm_[A-Za-z0-9_-]{21}$/;\nconst MAX_PAGE_KEY_CHARS = 1024;\n\nconst TITLE = 'Frames';\n\n/**\n * Exported so a host asserts parity against this exact string instead of\n * retyping it.\n */\nexport const FRAME_MANAGE_DESCRIPTION =\n 'Read the frames of a measurement plan: named rectangles with marks inside them, drawn in Tag Mode or in the app. ' +\n 'Actions: list (every frame of the project, without marks), page (the frames of one page at any depth, with marks), get (one frame with its marks). ' +\n 'Read-only: frames are drawn and edited in Tag Mode or the app, never here. ' +\n 'A frame name is documentation; the marks inside it carry the meaning. A frame that extends another stores only what it adds, so its tags may carry only the fields they change. ' +\n 'Marks are { tags, note }: tags is one flat list of tags, each with an id, a kind such as entity, property or action, a name, and a parentId naming the tag it sits under; note is the frame’s own description and thread. ' +\n 'Use hub_manage action \"knowledge\" with a frameId or markId to read what people wrote on a frame. ' +\n 'A markId is a tag id: a tag’s id, parentId and threadRef come back literal when they have the shape the app mints, so they can be passed straight back; every other string value in the marks is wrapped as data, and so is an object key that is not a plain identifier.';\n\n/**\n * Exported so the declarative registry holds the same object rather than a\n * second copy of it.\n */\nexport const FRAME_MANAGE_INPUT_SCHEMA = {\n action: z\n .enum(['list', 'page', 'get'])\n .describe(\n 'list the project’s frames, read one page with marks, or read one frame',\n ),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional: falls back to the default project when omitted.',\n ),\n pageKey: z\n .string()\n .min(1)\n .max(MAX_PAGE_KEY_CHARS)\n .optional()\n .describe(\n 'The page as its frames address it (the `source.key` of a page frame, usually the page URL without query). Required for page.',\n ),\n frameId: z\n .string()\n .regex(FRAME_ID_PATTERN)\n .optional()\n .describe(\n 'Frame ID (frm_...). Required for get. Use action \"list\" or \"page\" to find one.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\n/**\n * Hints carry the verb ladder rather than the description. One constant per\n * sentence the tool can emit, so the surface fixture pins wording and ordering\n * by name and a reword fails a test instead of drifting.\n */\nexport const FRAME_HINT_OPEN_PAGE_OR_GET =\n 'Use action \"page\" with a pageKey (a frame’s source.key) to read a page with marks, or action \"get\" with a frameId.';\nexport const FRAME_HINT_NAMES_ARE_DOCUMENTATION =\n 'Frame names are documentation; the marks inside a frame carry the meaning.';\nexport const FRAME_HINT_NONE_YET =\n 'This project has no frames yet. Frames are drawn in Tag Mode or the app, not through this tool.';\nexport const FRAME_HINT_MARK_SPACE =\n 'Tag geometry is fractional: a rect is 0..1 of its frame, and an at is 0..1 of its parent tag’s box, or of the frame for a root tag; a child frame sits inside its parent through placements[].rect.';\nexport const FRAME_HINT_READ_KNOWLEDGE =\n 'Use hub_manage action \"knowledge\" with frameId (and markId) to read what people wrote here. A markId is a tag id from these marks, and a tag’s threadRef is the id of its thread entry there.';\nexport const FRAME_HINT_NONE_ON_PAGE =\n 'No frames on this page. Check the pageKey against the source.key values from action \"list\".';\nexport const FRAME_HINT_EXTENDS_BASE =\n 'This frame extends another and stores only what it adds; read the base frame (extends) for the rest.';\nexport const FRAME_NOT_FOUND_HINT =\n 'Use action \"list\" or \"page\" to find frame ids.';\n\n/**\n * The two source keys that stay literal, and only those. `kind` is the\n * discriminator a reader branches on, and `key` is the pageKey the `page`\n * action takes, so it has to be echoed back verbatim. Every other string in a\n * source is text a reader only ever looks at: the page `url`, and the `fileKey`\n * and `nodeId` of an imported design. No action takes any of them, so they are\n * wrapped like any other value.\n */\nconst keepSourceAddress = (key: string): boolean =>\n key === 'kind' || key === 'key';\n\n/**\n * A placement's `selector` and `anchor` are opaque DOM anchors captured off a\n * live page, of unbounded size: page content a reader gains nothing from and\n * this tool would otherwise have to wrap. Only the rectangle is kept.\n *\n * `projectId` and `deletedAt` are dropped for a different reason: the caller\n * named the project, and a listing only ever carries live frames, so both\n * would be noise on every row.\n */\nfunction serializeLean(frame: FrameLeanWire) {\n return {\n id: frame.id,\n name: wrapUserData(frame.name),\n parentId: frame.parentId,\n extends: frame.extends,\n source: redactNestedStrings(frame.source, { skip: keepSourceAddress }),\n origin: frame.origin,\n flowId: frame.flowId,\n placements: frame.placements.map((placement) => ({\n id: placement.id,\n rect: placement.rect,\n })),\n size: frame.size,\n screenshot: frame.screenshot\n ? {\n assetId: frame.screenshot.assetId,\n capturedAt: frame.screenshot.capturedAt,\n size: frame.screenshot.size,\n dpr: frame.screenshot.dpr,\n capturedRect: frame.screenshot.capturedRect,\n }\n : null,\n version: frame.version,\n createdAt: frame.createdAt,\n updatedAt: frame.updatedAt,\n createdBy: frame.createdBy,\n updatedBy: frame.updatedBy,\n };\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * The rule for everything inside a marks document, in one place.\n *\n * - An ADDRESS stays literal, because another tool consumes it and it has to\n * be passed back exactly as it came. A sanitised address names a tag the app\n * never stored, so cleaning one trades a working lookup for a silent miss.\n * - Everything else is text a person or a page wrote, and is always wrapped,\n * so it cannot close the envelope and be read as instructions.\n *\n * Marks are a passthrough record: the server checks nothing inside them, so a\n * client writes whatever keys and values it likes, and a name that means\n * \"identifier\" in a flow config means nothing here. An address is therefore\n * decided by WHERE a value lives and by WHAT it looks like, never by the\n * spelling of its key alone.\n *\n * Where: a marks document is `{ tags, note }`. `tags` is one flat list of tags,\n * related through `parentId`, and `note` is the frame's own description and\n * thread. Only the top-level fields of a tag in that list, and of that note, can\n * be addresses. Below them nothing is, whatever it is called: `id` inside an\n * anchor is `el.id` read off the host page, and `id` on a thread message is a\n * row id no tool takes, so both are text like their siblings.\n *\n * What: a value in an address position stays literal only when it has the shape\n * the app mints for that address. Nothing upstream enforces the shape, so a\n * sentence stored under `id` is text and is wrapped like any other. A real\n * address that falls outside the shape comes back wrapped too, which costs a\n * lookup and never leaks an instruction.\n *\n * A key this file does not name, at any level, is walked as text. Object keys\n * are client-written too, so a key keeps its spelling only when it is a plain\n * identifier (see {@link markKey}); any other key is wrapped like a value.\n */\n\n/**\n * A tag id as the app mints it, and nothing wider:\n *\n * - `<prefix>_<n>` from the editor (`nextMarkId` in `tag-plan/frames.ts`,\n * `freshId` in `tag-plan/write.ts`);\n * - `e_<entity>`, `...#data.v<n>` and `...#action.<n>` from a contract or observed\n * events (`tag-plan/contract.ts`, `tag-plan/infer.ts`);\n * - `<entity>-<n>`, a nested `.../<entity>-<n>`, `...#data.<n>`, `...#action.<n>`,\n * `...#context.<n>`, `globals#<n>` and `page#action.<n>` from a page read\n * (`tag-plan/walker-plan.ts`).\n *\n * No colon, which keeps the hub key `<frameId>:<markId>` parseable, and no\n * whitespace, quote or angle bracket. An entity name outside `[A-Za-z0-9_-]`\n * makes the last two minters spell an id this does not match, which then wraps.\n */\nconst TAG_ID_PATTERN =\n /^[A-Za-z0-9_-]+(?:\\/[A-Za-z0-9_-]+)*(?:#(?:data\\.v?[0-9]+|action\\.[0-9]+|context\\.[0-9]+|[0-9]+))?$/;\n\n/** The longest mark id the hub accepts (`MAX_MARK_ID_LENGTH` in the app's\n * `src/lib/hub/knowledge.ts`), so a longer value cannot be a markId. */\nconst MAX_TAG_ID_CHARS = 200;\n\n/** A hub thread id as the app mints it: `thr_` plus a 21-character lowercase\n * alphanumeric nanoid (`src/lib/id.ts`, `src/lib/hub/knowledge.ts`). */\nconst THREAD_ID_PATTERN = /^thr_[a-z0-9]{21}$/;\n\nconst isTagId = (value: string): boolean =>\n value.length <= MAX_TAG_ID_CHARS && TAG_ID_PATTERN.test(value);\n\nconst isThreadId = (value: string): boolean => THREAD_ID_PATTERN.test(value);\n\n/** The fields of a tag that are addresses, each with the shape it must have. */\nconst TAG_ADDRESSES: ReadonlyMap<string, (value: string) => boolean> = new Map([\n // The tag id: the markId `hub_manage` action \"knowledge\" takes, which the\n // app joins to the frame id as the anchor key `<frameId>:<markId>`.\n ['id', isTagId],\n // The tag this one sits under, which is that tag's id: the only relation\n // between tags, so a reader joins it to `id` to rebuild the tree, and it is\n // a markId in its own right.\n ['parentId', isTagId],\n // The hub thread this tag's note thread became: the `id` of the thread\n // entry `hub_manage` action \"knowledge\" returns for this tag.\n ['threadRef', isThreadId],\n]);\n\n/** The fields of the frame note that are addresses. The note belongs to the\n * frame, which `hub_manage` addresses by frameId, so its one address is the hub\n * thread it became, read the same way as a tag's. */\nconst NOTE_ADDRESSES: ReadonlyMap<string, (value: string) => boolean> = new Map(\n [['threadRef', isThreadId]],\n);\n\n/** A key the app writes: a JavaScript-style identifier, dashes allowed for\n * attribute names, bounded in length. Such a key cannot close the envelope or\n * carry a sentence, so it stays readable. */\nconst MARK_KEY_PATTERN = /^[A-Za-z_$][A-Za-z0-9_$-]{0,63}$/;\n\n/** A marks key as it is handed back: literal when it has the shape of a key the\n * app writes, wrapped as data otherwise. */\nconst markKey = (key: string): string =>\n MARK_KEY_PATTERN.test(key) ? key : wrapUserData(key);\n\n/** Text below the addresses: every string wrapped, every key through\n * {@link markKey}. */\nfunction walkText(value: unknown): unknown {\n if (typeof value === 'string') return wrapUserData(value);\n if (Array.isArray(value)) return value.map(walkText);\n if (!isRecord(value)) return value;\n const out: Record<string, unknown> = {};\n for (const [key, child] of Object.entries(value)) {\n out[markKey(key)] = walkText(child);\n }\n return out;\n}\n\n/** Walks a marks document applying the rule above. */\nfunction walkMarks(marks: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(marks)) {\n if (key === 'tags' && Array.isArray(value)) {\n out[key] = value.map((tag) => walkAddressed(tag, TAG_ADDRESSES));\n } else if (key === 'note') {\n out[key] = walkAddressed(value, NOTE_ADDRESSES);\n } else {\n out[markKey(key)] = walkText(value);\n }\n }\n return out;\n}\n\n/**\n * One record whose own fields named in `addresses` stay literal when their\n * value has that address's shape. A value there without the shape, a string or\n * not, is not an address, so it is walked like anything else rather than passed\n * through unseen, and so is everything below the record's own fields. A value\n * that is not a record has no fields to address and is text.\n */\nfunction walkAddressed(\n value: unknown,\n addresses: ReadonlyMap<string, (value: string) => boolean>,\n): unknown {\n if (!isRecord(value)) return walkText(value);\n const out: Record<string, unknown> = {};\n for (const [key, field] of Object.entries(value)) {\n const isAddress = addresses.get(key);\n out[markKey(key)] =\n isAddress !== undefined && typeof field === 'string' && isAddress(field)\n ? field\n : walkText(field);\n }\n return out;\n}\n\nfunction serializeFrame(frame: FrameWire) {\n return {\n ...serializeLean(frame),\n marks: walkMarks(frame.marks),\n };\n}\n\n/**\n * The same shape the transport validates against, applied again here, on the\n * rule `hub_manage` states: this module's spec is deliberately drivable without\n * a transport, so the caps and the id pattern have to hold inside this file\n * rather than in whichever SDK copy a host linked.\n */\nconst frameInputSchema = z.object(FRAME_MANAGE_INPUT_SCHEMA);\n\n/**\n * Annotated so the `action` switch below is checked for exhaustiveness: a\n * member added to the enum without a case makes the function fall off its end,\n * which a declared non-undefined return type refuses.\n */\ntype FrameManageResult =\n | ReturnType<typeof mcpResult>\n | ReturnType<typeof mcpError>;\n\nasync function frameManageHandler(\n client: ToolClient,\n rawInput: unknown,\n): Promise<FrameManageResult> {\n // Parse, never assert: a raw ZodError stringifies its whole issue list into\n // `message`, so the issues are rewritten as one readable line.\n const parsed = frameInputSchema.safeParse(rawInput ?? {});\n if (!parsed.success) {\n return mcpError(new Error(inputIssuesMessage(parsed.error)));\n }\n const { action, projectId, pageKey, frameId } = parsed.data;\n const validationError = validateActionInput(\n 'frame_manage',\n action,\n { pageKey, frameId },\n FRAME_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n\n try {\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n\n switch (action) {\n case 'list': {\n const { frames } = await client.listFrames({\n projectId: resolvedProjectId,\n });\n return mcpResult(\n { frames: frames.map(serializeLean) },\n {\n next:\n frames.length === 0\n ? [FRAME_HINT_NONE_YET]\n : [\n FRAME_HINT_OPEN_PAGE_OR_GET,\n FRAME_HINT_NAMES_ARE_DOCUMENTATION,\n ],\n },\n );\n }\n case 'page': {\n assertParam(pageKey, 'pageKey', 'page');\n const { frames } = await client.listPageFrames({\n projectId: resolvedProjectId,\n pageKey,\n });\n return mcpResult(\n { pageKey, frames: frames.map(serializeFrame) },\n {\n next:\n frames.length === 0\n ? [FRAME_HINT_NONE_ON_PAGE]\n : [FRAME_HINT_MARK_SPACE, FRAME_HINT_READ_KNOWLEDGE],\n },\n );\n }\n case 'get': {\n assertParam(frameId, 'frameId', 'get');\n const frame = await client.getFrame({\n projectId: resolvedProjectId,\n frameId,\n });\n return mcpResult(\n { frame: serializeFrame(frame) },\n {\n next:\n frame.extends !== null\n ? [FRAME_HINT_EXTENDS_BASE, FRAME_HINT_READ_KNOWLEDGE]\n : [FRAME_HINT_READ_KNOWLEDGE],\n },\n );\n }\n }\n } catch (error) {\n // `mcpError` lifts a `code` property off the error, so whatever the client\n // raises surfaces its code without a branch here.\n return mcpError(error, errorHint(error, 'frames', FRAME_NOT_FOUND_HINT));\n }\n}\n\n/**\n * The tool as data, so it can be driven without an MCP transport (tests, and\n * any in-process bridge).\n */\nexport function createFrameManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'frame_manage',\n title: TITLE,\n description: FRAME_MANAGE_DESCRIPTION,\n inputSchema: FRAME_MANAGE_INPUT_SCHEMA,\n annotations,\n handler: (input) => frameManageHandler(client, input),\n };\n}\n\nexport function registerFrameManageTool(server: McpServer, client: ToolClient) {\n const spec = createFrameManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => frameManageHandler(client, args),\n );\n}\n","import { ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { fetchPackageSchema } from '@walkeros/core';\nimport { fetchCatalog, getPackageBaseUrl } from '../catalog.js';\n\nexport function registerPackageSchemaResources(server: McpServer) {\n const template = new ResourceTemplate('walkeros://schema/{packageName}', {\n list: async () => {\n const { entries } = await fetchCatalog({ baseUrl: getPackageBaseUrl() });\n return {\n resources: entries.map((pkg) => ({\n uri: `walkeros://schema/${encodeURIComponent(pkg.name)}`,\n name: pkg.name,\n description: `Schema and examples for ${pkg.name}`,\n mimeType: 'application/json' as const,\n })),\n };\n },\n });\n\n server.registerResource(\n 'package-schema',\n template,\n {\n title: 'walkerOS Package Schema',\n description:\n 'JSON Schema and configuration examples for walkerOS packages',\n mimeType: 'application/json',\n },\n async (uri, { packageName }) => {\n const info = await fetchPackageSchema(\n decodeURIComponent(packageName as string),\n );\n return {\n contents: [\n {\n uri: uri.toString(),\n mimeType: 'application/json' as const,\n text: JSON.stringify(info, null, 2),\n },\n ],\n };\n },\n );\n}\n","/**\n * Reference resources — pure schema and structural data only.\n *\n * Design principle: resources are loaded into context and should contain\n * only schemas, type definitions, and structural references. Behavioral\n * guidance, tutorials, and step-by-step instructions belong in prompts.\n * Vendor-specific examples belong in packages (fetched via package_get).\n */\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { schemas } from '@walkeros/core/dev';\nimport openapiSpec from '@walkeros/cli/openapi/spec.json';\nimport { fetchCatalog, getPackageBaseUrl } from '../catalog.js';\n\nexport function registerReferenceResources(server: McpServer) {\n // Flow Schema reference (generated from Zod)\n server.resource(\n 'flow-schema',\n 'walkeros://reference/flow-schema',\n {\n description:\n 'JSON Schema for Flow.Json — the complete flow configuration structure',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/flow-schema',\n text: JSON.stringify(schemas.configJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Event Model reference (generated from Zod)\n server.resource(\n 'event-model',\n 'walkeros://reference/event-model',\n {\n description:\n 'JSON Schema for walkerOS events: entity-action naming, data, context, globals, user, consent',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/event-model',\n text: JSON.stringify(schemas.eventJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Mapping reference (generated from Zod — composite of related schemas)\n server.resource(\n 'mapping',\n 'walkeros://reference/mapping',\n {\n description:\n 'JSON Schemas for walkerOS mapping: rules, valueConfig, rule, policy',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/mapping',\n text: JSON.stringify(\n {\n rules: schemas.rulesJsonSchema,\n valueConfig: schemas.valueConfigJsonSchema,\n rule: schemas.ruleJsonSchema,\n policy: schemas.policyJsonSchema,\n },\n null,\n 2,\n ),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Consent reference (generated from Zod)\n server.resource(\n 'consent',\n 'walkeros://reference/consent',\n {\n description:\n 'JSON Schema for walkerOS consent: destination-level, rule-level, and field-level consent gating',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/consent',\n text: JSON.stringify(schemas.consentJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Variables reference (hand-maintained — runtime interpolation patterns not captured in Zod schemas)\n server.resource(\n 'variables',\n 'walkeros://reference/variables',\n {\n description:\n 'walkerOS variable patterns: $var, $env, $contract, $code, $store, $secret substitution',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/variables',\n text: JSON.stringify(\n {\n separatorRule:\n '`.` for names and paths; `:` for literal values or raw-code payloads.',\n patterns: {\n '$var.name':\n 'Variable reference. Whole-string preserves native type (object, array, scalar). Inline interpolation requires a scalar. Reusable fragments (mapping templates, matcher lists, consent objects) live in the variables block and are referenced by name.',\n '$var.name.deep.path':\n 'Deep-path access into a structured variable. Walks nested keys/indices. Whole-string preserves type at the leaf; inline still requires a scalar leaf.',\n '$env.NAME':\n 'Environment variable, resolved at bundle/deploy time. $env.GA_ID reads process.env.GA_ID. Use for non-secret config (IDs, hostnames, regions), never for credentials.',\n '$env.NAME:default':\n 'Environment variable with fallback. $env.GA_ID:G-DEFAULT (the `:` is the literal default separator).',\n '$contract.name':\n 'Contract reference. Links to a named contract for validation.',\n '$contract.name.path':\n 'Nested contract access. $contract.ecommerce.product.',\n '$code:(expr)':\n 'Inline JavaScript. $code:(event) => event.data.price * 100 (the `:` carries the raw-code payload).',\n '$store.storeId':\n 'Store injection in env values. Wires runtime store access.',\n '$secret.NAME':\n 'Managed secret injection (created via the secret manager). The deploy pipeline detects $secret.NAME references and injects the secret value into the server runner’s environment at runtime. Use for credentials, tokens, and private keys. Server flows only; $env does NOT inject managed secrets.',\n },\n cascade: {\n priority: [\n '1. Step-level variables (highest)',\n '2. Flow-level variables',\n '3. Config-level variables (lowest)',\n ],\n example: {\n variables: {\n apiUrl: 'https://x.io',\n mapping: { id: 'data.id' },\n },\n flows: {\n production: {\n destinations: {\n api: {\n config: {\n url: '$var.apiUrl',\n idPath: '$var.mapping.id',\n },\n },\n },\n },\n },\n },\n },\n },\n null,\n 2,\n ),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Contract reference (generated from Zod)\n server.resource(\n 'contract',\n 'walkeros://reference/contract',\n {\n description:\n 'JSON Schema for walkerOS contracts: event schema validation with entity-action keying',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/contract',\n text: JSON.stringify(schemas.contractJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Examples reference (loaded from @walkeros/cli at runtime)\n server.resource(\n 'examples',\n 'walkeros://reference/examples',\n {\n description:\n 'Complete, tested flow config (flow-complete.json): web, server and warehouse flows with mapping, consent, contracts, routes, state, stores and step examples. Its guide is examples/flow-complete.md in @walkeros/cli.',\n mimeType: 'application/json',\n },\n async () => {\n let example: string;\n try {\n const { readFileSync } = await import('fs');\n const { createRequire } = await import('module');\n const require = createRequire(import.meta.url);\n const examplePath =\n require.resolve('@walkeros/cli/examples/flow-complete.json');\n example = readFileSync(examplePath, 'utf-8');\n } catch {\n example = JSON.stringify({ error: 'Example not found' });\n }\n return {\n contents: [\n {\n uri: 'walkeros://reference/examples',\n text: example,\n mimeType: 'application/json',\n },\n ],\n };\n },\n );\n\n // OpenAPI 3.1 specification for the walkerOS cloud HTTP API\n server.resource(\n 'openapi',\n 'walkeros://reference/openapi',\n {\n description: 'walkerOS cloud API — OpenAPI 3.1 specification',\n mimeType: 'application/json',\n },\n // The spec is embedded at build time (import above), so it is always\n // available with no runtime module resolution. This serves the client's\n // bundled contract baseline, not the live backend's spec.\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/openapi',\n text: JSON.stringify(openapiSpec, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Packages catalog resource\n server.resource(\n 'packages',\n 'walkeros://reference/packages',\n {\n description:\n 'Complete walkerOS package catalog — all sources, destinations, transformers, and stores',\n mimeType: 'application/json',\n },\n async () => {\n const { entries } = await fetchCatalog({ baseUrl: getPackageBaseUrl() });\n return {\n contents: [\n {\n uri: 'walkeros://reference/packages',\n text: JSON.stringify(entries, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n },\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nexport function registerAddStepPrompt(server: McpServer) {\n server.registerPrompt(\n 'add-step',\n {\n description:\n 'Add a source, destination, transformer, or store step to a flow configuration. ' +\n 'Guides through package selection, config scaffolding, and wiring.',\n argsSchema: {\n stepType: z\n .string()\n .optional()\n .describe(\n 'Type of step to add: source, destination, transformer, or store',\n ),\n flowPath: z\n .string()\n .optional()\n .describe('Path to the flow.json file to modify'),\n },\n },\n async ({ stepType, flowPath }) => ({\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: [\n `Help me add a ${stepType || 'new'} step to my flow${flowPath ? ` at ${flowPath}` : ''}.`,\n '',\n 'Follow these steps:',\n `1. ${stepType ? '' : 'Ask what type of step (source, destination, transformer, store). Then '}Use package_search to browse available packages for the selected type and platform.`,\n '2. Use package_get to read the package\\'s config schema (schemas.config contains the full config shape: base fields like consent/require/logger + package-specific settings). Use section=\"hints\" for additional guidance.',\n '3. Use package_get with section=\"examples\" to see working configuration examples.',\n '4. Scaffold the step config using the package schemas — include required settings with placeholder values.',\n '5. Wire the step into the flow: add to packages section (with version if needed), connect via next/before chains if needed.',\n '6. For destinations: configure mapping using nested entity → action keys. Event \"product add\" maps to `{ \"product\": { \"add\": { name: \"AddToCart\" } } }`. Use the setup-mapping prompt for guidance.',\n '7. For destinations: if consent-gated loading is needed, add require: [\"consent\"] to config. ' +\n 'Note: require delays initialization until a \"walker consent\" event fires. ' +\n 'When simulating with flow_simulate, destinations with require will error \"not found\" — ' +\n 'remove require temporarily or test without it. ' +\n 'For per-event consent filtering, add consent: { marketing: true } to config.',\n '8. Use flow_validate to verify the result.',\n '9. For server sources: check if the package supports `ingest` configuration via package_get. Ingest extracts request metadata (IP, user-agent, headers) using mapping syntax. Transformers like fingerprint depend on ingest data.',\n '10. When adding a transformer that uses ingest fields, verify the source has `ingest` configured — otherwise ingest fields resolve to empty values.',\n '',\n 'Important:',\n '- Read the walkeros://reference/flow-schema resource to understand connection rules.',\n '- Sources connect to transformers via `next` (runs before the collector).',\n '- The collector connects to transformers via `collector.next` (runs once per event before the destination fan-out, for every destination).',\n '- Destinations connect to transformers via `before` (runs for that destination only; put per-destination filtering here).',\n '- Routing uses one grammar in every chain field: string IDs, sequences (`[\"a\", \"b\"]`, where a member\\'s own `next` runs right after it), or RouteConfig (`{ match?, next }` for a gated link, `{ match?, one: [...] }` for first-match dispatch, `{ match?, many: [...] }` to fork each match into its own copy that finishes the rest of the path, `{ match?, stop: true }` to drop). A `stop` in `collector.next` drops the event for all destinations. Omit `match` for always-match.',\n '- A transformer entry can be code-bearing (`code`), package-bearing (`package`), or a **pass-through step** (no `code`, no `package`). Pass-through synthesis is automatic at runtime. Three flavors of pass-through: `before`/`next`-only (named hop reusable across destinations), `cache`-only (dedup, rate-limit), or `mapping`-only (declarative event-to-event transform). A pass-through must declare at least one of `before`, `next`, `cache`, or `mapping`.',\n '- The `mapping` field on a transformer step uses the same `Mapping.Config` shape as destinations, but the semantic is event-to-event (mutates the event in place via `policy`, per-rule `policy`, `mapping[].name` for renames, `mapping[].ignore` to drop). Vendor-payload fields (`data`, `silent`) are no-ops at this position.',\n '- Closed schema: unknown top-level keys on a transformer step are errors (catches typos like `dedup` instead of `cache`). `code` + `package` together is a conflict.',\n '- Stores are passive — referenced via `$store.storeName` in env values.',\n '- Use variables ($var) for values that change between environments.',\n '- For required settings without defaults in the package schema, ask the user which value to use. Do not guess credentials, IDs, or environment-specific values.',\n '- If $meta.exports lists named exports, set the `code` field on the step to the chosen export name. If only one export exists, use it automatically.',\n ].join('\\n'),\n },\n },\n ],\n }),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nexport function registerSetupMappingPrompt(server: McpServer) {\n server.registerPrompt(\n 'setup-mapping',\n {\n description:\n 'Set up event mapping for any step in a flow. Teaches mapping syntax and uses package examples as templates.',\n argsSchema: {\n stepName: z\n .string()\n .optional()\n .describe('Step name in the flow (e.g., \"gtag\", \"meta\", \"express\")'),\n },\n },\n async ({ stepName }) => ({\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: [\n `Help me set up mapping${stepName ? ` for the \"${stepName}\" step` : ''}.`,\n '',\n 'Follow these steps:',\n '1. Read the walkeros://reference/mapping resource for syntax reference.',\n `2. ${stepName ? `Identify the package for \"${stepName}\" in the flow, then u` : 'U'}se package_get with section=\"examples\" to see the source output shape — mapping keys must match the actual events the source emits.`,\n '3. Ask whether this is source mapping (raw input → walkerOS events) or destination mapping (walkerOS events → vendor format).',\n '4. Ask which events to map (one at a time, not all at once).',\n '5. Generate one mapping rule using the package examples as templates. Validate it with flow_validate before moving to the next.',\n '6. Repeat for each event.',\n '',\n 'Mapping uses nested entity → action keys. Event \"product add\" maps to `{ \"product\": { \"add\": Rule } }`. Wildcards: `{ \"*\": { \"view\": Rule } }`.',\n '',\n 'Extract shared mapping shapes into variables, reference via $var.name (deep paths supported).',\n '',\n 'Policy and consent in mapping:',\n '- config.policy runs BEFORE mapping rules — use it to inject or redact fields on the event.',\n '- rule.policy runs after config.policy but before data transformation — use for event-specific pre-processing.',\n '- config.consent gates ALL events to this destination. rule.consent gates specific event types.',\n '- Individual value configs support consent: { marketing: true } for field-level gating.',\n ].join('\\n'),\n },\n },\n ],\n }),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nexport function registerManageContractPrompt(server: McpServer) {\n server.registerPrompt(\n 'manage-contract',\n {\n description:\n 'Create or update event contracts for a flow. Can generate contracts from existing mappings or scaffold mappings from contracts.',\n argsSchema: {\n direction: z\n .string()\n .optional()\n .describe(\n 'Direction: \"from-mappings\" (extract contract from existing mappings), ' +\n '\"from-scratch\" (create new contract), or \"to-mappings\" (scaffold mappings from contract)',\n ),\n },\n },\n async ({ direction }) => ({\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: [\n `Help me ${direction === 'to-mappings' ? 'scaffold mappings from a contract' : direction === 'from-mappings' ? 'generate a contract from existing mappings' : 'manage event contracts'}.`,\n '',\n 'Follow these steps:',\n '1. Read the walkeros://reference/contract resource to understand contract structure.',\n direction === 'from-mappings'\n ? '2. Read all destination mappings in the flow, extract referenced event fields, and generate a contract with those as required properties.'\n : direction === 'to-mappings'\n ? '2. Read the contract from the flow, then scaffold mapping stubs for each destination based on the contract fields.'\n : '2. Ask for entity-action names and required properties, or ask whether to generate from existing mappings.',\n '3. Use entity-action keying with wildcards (*.*, *.action, entity.*) for broad rules.',\n '4. Define JSON Schema for events, globals, context, custom, user, and consent.',\n '5. Use flow_validate to verify the contract.',\n '',\n 'Contracts and mappings are bidirectional:',\n '- **Contract → Mappings**: contract defines what events look like, mappings are scaffolded to match.',\n '- **Mappings → Contract**: existing mappings reveal which fields are used, contract formalizes them.',\n '',\n 'For server flows: if the contract references fields populated by ingest (e.g., user fingerprint hash), verify the source config.ingest extracts the needed request metadata.',\n '',\n 'Use $contract.name references to link contracts in the flow.',\n 'Contracts support extends for inheritance between event types.',\n ].join('\\n'),\n },\n },\n ],\n }),\n );\n}\n","export const SERVER_INSTRUCTIONS = `walkerOS is an open-source, privacy-first event data collection platform. Define event pipelines as code using JSON flow configurations.\n\n## Rules\n\n- **Never guess package names.** Always use \\`package_search\\` first to find exact names, then \\`package_get\\` for details.\n- **Never construct flow configs from memory.** Read \\`walkeros://reference/flow-schema\\` and use \\`package_get\\` for package-specific schemas.\n- **Always validate.** Run \\`flow_validate\\` after every config change. If validation fails, fix and re-validate. By default it checks every flow and step, package settings included; a valid result can still list \\`details.skipped\\` checks, so read them before trusting it (\\`strict: true\\` turns warnings and skips into failures: \\`valid\\` is false).\n- **Simulate before deploying.** Use \\`flow_simulate\\` to test with mocked API calls before \\`flow_bundle\\` or \\`flow_push\\`.\n- **When a request fails,** call \\`diagnostics\\` to see which MCP/CLI versions, app URL, and backend you are on, plus whether the app is reachable.\n\n## Workflow\n\n1. \\`auth({ action: \"status\" })\\` — check if logged in, or \\`auth({ action: \"login\" })\\` to connect\n2. \\`project_manage({ action: \"list\" })\\` — see your projects\n3. \\`flow_manage({ action: \"list\" })\\` — see all flows across projects\n4. \\`flow_load({ platform: \"web\" })\\` or \\`flow_load({ source: \"./flow.json\" })\\` — create or load\n5. \\`package_search({ type: \"destination\", platform: \"web\" })\\` — discover packages\n6. \\`package_get({ package: \"...\" })\\` — read schemas, hints, examples\n7. Use the \\`add-step\\` prompt — guided step addition\n8. Use the \\`setup-mapping\\` prompt — event transformation config\n9. \\`flow_validate({ type: \"flow\", input: \"flow.json\" })\\` — verify\n10. \\`flow_simulate({ configPath: \"flow.json\", event: \"...\" })\\` — test\n11. \\`flow_manage({ action: \"update\", flowId: \"...\", content: {...} })\\` — save to cloud\n12. \\`deploy_manage({ action: \"deploy\", flowId: \"...\" })\\` — deploy\n13. \\`observe_session({ action: \"start\", flowId: \"...\" })\\` - open an Observe session: a time-boxed window on one flow that runtimes attach to as arms\n14. \\`flow_manage({ action: \"preview_regrant\", flowId: \"...\", previewId: \"...\", origins: [...] })\\` - mint an activation link; minted while the flow is observed, it pairs with that Observe session automatically, so the previewed page streams into the same feed\n15. \\`observe_journeys({ flowId: \"...\" })\\` - read what arrived; it is the only read, and it never judges whether events are correct\n16. \\`hub_manage({ action: \"releases\", flowId: \"...\" })\\` - read what changed across releases and why; \\`release_get\\` carries a server-computed diff, \\`rationale_set\\` records why\n17. \\`frame_manage({ action: \"page\", pageKey: \"...\" })\\` - read the frames of a page with their marks; read-only, edited in Tag Mode or the app\n\n## Architecture: Source → Collector → Destination(s)\n\nEvery component in a flow is a **step**: sources capture events, transformers process them, destinations deliver them, stores provide shared state. Steps connect via chains: \\`source.next\\` runs before the collector, \\`collector.next\\` runs once per event before the destination fan-out (all destinations), and \\`destination.before\\` runs for one destination.\n\n## Flow Config Structure\n\n\\`\\`\\`json\n{\n \"version\": 4,\n \"flows\": {\n \"default\": {\n \"config\": { \"platform\": \"web\" },\n \"sources\": { \"<name>\": { \"package\": \"<npm-package>\", \"config\": {} } },\n \"destinations\": { \"<name>\": { \"package\": \"<npm-package>\", \"config\": { \"settings\": {} } } }\n }\n }\n}\n\\`\\`\\`\n\n- \\`version: 4\\` is required\n- Each flow declares its target via \\`config.platform\\` (\\`\"web\"\\` or \\`\"server\"\\`)\n- Destination settings go inside \\`config.settings\\`, not directly on the destination\n- Event format: \\`{ name: \"entity action\", data: {...}, entity: \"...\", action: \"...\" }\\`\n\n## Key Concepts\n\n- **Mapping** transforms events using data/map/loop/set/condition rules. Same syntax on sources and destinations. Mapping rules use NESTED entity → action keying: event name \"product add\" maps to \\`{ \"product\": { \"add\": Rule } }\\`. Wildcards: \\`{ \"*\": { \"view\": Rule } }\\`.\n- **Contracts** define event schemas using entity-action keying. Can generate FROM mappings or scaffold mappings FROM contracts.\n- **Variables** (\\$var, \\$env, \\$secret, \\$code, \\$store) enable DRY, environment-aware config. \\`$var.name\\` is a reusable flow variable from the top-level \\`variables\\` block; whole-string refs preserve native type (object/array/scalar), inline interpolation requires a scalar, deep paths via \\`$var.name.deep.path\\`. \\`$env.NAME[:default]\\` is an environment variable resolved at bundle/deploy time (non-secret config only). \\`$secret.NAME\\` is a managed secret the deploy pipeline injects into the server runner at runtime; credentials, tokens, and private keys must use \\`$secret\\`, not \\`$env\\`.\n- **Consent** gates destinations, mapping rules, and individual fields. Privacy-first by design.\n- **Routing** uses one grammar in every chain field (\\`source.before\\`, \\`source.next\\`, \\`transformer.before\\`, \\`transformer.next\\`, \\`collector.next\\`, \\`destination.before\\`, \\`destination.next\\`). A route is a string ID, a sequence (\\`[\"a\", \"b\"]\\`), or a RouteConfig: \\`{ match?, next }\\`, \\`{ match?, one: [...] }\\` (first match wins), \\`{ match?, many: [...] }\\` (every match becomes its own copy of the event with its own id and finishes the rest of the path on its own, never merged), or \\`{ match?, stop: true }\\` (ends that copy). In a sequence, a member's own \\`next\\` runs right after it, then the sequence continues. \\`match\\` reads \\`{ ingest, event }\\` and each route is evaluated when the event reaches it. A \\`stop\\` in \\`collector.next\\` drops the event for every destination; per-destination filtering belongs in \\`destination.before\\`. An array of only route configs is an implicit \\`one\\`. The optional \\`match\\` field is omitted to mean always-match (no wildcard literal).\n- **Pass-through steps** are transformer entries with no \\`code\\` and no \\`package\\`. The runtime synthesizes the push for them automatically. Three flavors share this shape: a \\`before\\` / \\`next\\`-only step (named hop reusable across destinations), a \\`cache\\`-only step (dedup, rate-limit), and a \\`mapping\\`-only step (declarative event-to-event transform). A pass-through must declare at least one of \\`before\\`, \\`next\\`, \\`cache\\`, or \\`mapping\\`.\n- **Mapping at the transformer position** uses the same \\`Mapping.Config\\` shape as destinations, but the semantic is event-to-event: \\`policy\\` and per-rule \\`policy\\`, \\`mapping[].name\\` (rename), \\`mapping[].ignore\\` (drop from chain), \\`consent\\`, and \\`include\\` apply. Vendor-payload fields (\\`data\\`, \\`silent\\`, \\`mapping[].data\\`) are no-ops at this position.\n- **Closed-schema rule on transformer entries:** known keys only. Operative keys are \\`code\\`, \\`package\\`, \\`before\\`, \\`next\\`, \\`cache\\`, \\`mapping\\`. Combined with structural keys (\\`config\\`, \\`env\\`, \\`validate\\`, \\`disabled\\`, \\`id\\`, etc.). Unknown top-level keys on a transformer step are errors (catches typos like \\`dedup: {}\\` instead of nested under \\`cache\\`). \\`code\\` + \\`package\\` together is a conflict.\n- **Cache** memoizes step output on a configured store. Set \\`cache.stop: true\\` to short-circuit the chain on HIT (sources default to stop-on-HIT); in a source chain or \\`collector.next\\` that halts the event for all destinations. Set \\`cache.namespace\\` to prefix keys; omit it to write keys directly. \\`CacheRule.match\\` is optional, omit for always-match.\n\n## Simulation Tips\n\n- Destinations with \\`require: [\"consent\"]\\` stay **pending** until a \\`\"walker consent\"\\` event fires. Simulation will error \"not found\" for pending destinations, remove \\`require\\` from config when testing with \\`flow_simulate\\`.\n- Destinations with \\`consent: { marketing: true }\\` silently skip events that lack matching consent. Include \\`consent\\` in the event: \\`{ name: \"page view\", data: {...}, consent: { marketing: true } }\\`.\n- **Mapping** transforms event names and data at the destination level. Events without a matching mapping rule pass through unmodified.\n- **Policy** modifies the event before mapping runs, use it to inject computed fields or redact sensitive data.\n\n## Reference Resources\n\nRead these before constructing configs manually: \\`walkeros://reference/flow-schema\\`, \\`walkeros://reference/mapping\\`, \\`walkeros://reference/event-model\\`, \\`walkeros://reference/consent\\`, \\`walkeros://reference/variables\\`, \\`walkeros://reference/contract\\`, \\`walkeros://reference/examples\\`.`;\n","import { randomUUID } from 'crypto';\nimport { telemetry } from '@walkeros/cli';\n\n/**\n * Options for the MCP telemetry emitter wrapper.\n *\n * `clientInfo` mirrors the MCP SDK shape negotiated during initialize.\n * When the client doesn't send one, we record the client name as \"unknown\"\n * inside the per-event data so downstream analytics can still bucket the\n * event. The walkerOS source identifier is the package itself (`mcp`), not\n * the client.\n */\nexport interface McpEmitterOptions {\n clientInfo?: { name: string; version: string };\n packageVersion: string;\n}\n\n/**\n * MCP-specific event emitter.\n *\n * Wraps `@walkeros/cli`'s `telemetry.createEmitter` with:\n * - `source.type` fixed to `\"mcp\"`\n * - `source.platform` fixed to `\"server\"`\n * - per-emission `source.tool` for `cmd invoke` events\n * - a fresh session UUID per MCP server instance\n *\n * Surfaces the narrow set of events the MCP server needs to emit.\n */\nexport interface McpEmitter {\n emitStart(): Promise<void>;\n emitInvoke(\n tool: string,\n outcome: 'success' | 'error',\n timingMs: number,\n ): Promise<void>;\n emitError(kind: 'uncaught' | 'unhandledRejection' | 'startup'): Promise<void>;\n}\n\n/**\n * Build an MCP telemetry emitter.\n *\n * All consent, debug, and endpoint resolution is delegated to the CLI's\n * underlying `telemetry.createEmitter`. This wrapper only provides\n * MCP-specific field mapping and event shorthands.\n */\nexport async function createMcpEmitter(\n opts: McpEmitterOptions,\n): Promise<McpEmitter> {\n const clientName = opts.clientInfo?.name || 'unknown';\n const session = randomUUID();\n\n const emitter = await telemetry.createEmitter({\n source: {\n type: 'mcp',\n platform: 'server',\n },\n packageVersion: opts.packageVersion,\n session,\n });\n\n return {\n async emitStart() {\n const ci = telemetry.getCiInfo();\n await emitter.send('mcp start', {\n ...ci,\n client: clientName,\n });\n },\n async emitInvoke(tool, outcome, timingMs) {\n await emitter.send(\n 'cmd invoke',\n { outcome, client: clientName },\n timingMs,\n { tool },\n );\n },\n async emitError(kind) {\n await emitter.send('error throw', { kind });\n },\n };\n}\n","import type { ToolClient } from '../tool-client.js';\nimport { flowConfigOf, isCloudId } from '../cloud-flow.js';\nimport { RuntimeRefusal, type FlowRuntime } from './types.js';\n\nfunction isHttpUrl(value: string): boolean {\n try {\n const url = new URL(value);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\n/**\n * Whether a bare string is shaped like a filesystem path: it names a directory\n * hop, starts with a dot, or carries a file extension. Nothing is ever read\n * either way; the distinction only decides which error a hosted load raises.\n * A path-shaped input is refused outright, while a plain phrase such as an\n * event name is merely unresolvable here, which is what lets `flow_validate`\n * keep its event-name shorthand.\n */\nfunction looksLikePath(value: string): boolean {\n return (\n /[\\\\/]/.test(value) ||\n value.startsWith('.') ||\n /\\.[A-Za-z0-9]+$/.test(value)\n );\n}\n\nexport type ConfigInputKind =\n | 'inline-json'\n | 'cloud-id'\n | 'url'\n | 'local-path'\n | 'bare-string';\n\n/**\n * Classify a config input the way the local loader would resolve it: an\n * http(s) URL, a reserved cloud id, an inline JSON document, a path-shaped\n * string, or a bare string that names none of these. Order matters, a URL is\n * checked before the cloud-id and JSON shapes.\n */\nexport function classifyConfigInput(input: string): ConfigInputKind {\n const trimmed = input.trim();\n if (isHttpUrl(trimmed)) return 'url';\n if (isCloudId(trimmed)) return 'cloud-id';\n if (trimmed.startsWith('{') || trimmed.startsWith('[')) return 'inline-json';\n if (looksLikePath(trimmed)) return 'local-path';\n return 'bare-string';\n}\n\nconst HINT_INLINE_OR_ID =\n 'Pass the flow inline as JSON, or reference a saved flow by its flow_ or cfg_ id.';\n\nfunction refuseLocalPath(): RuntimeRefusal {\n return new RuntimeRefusal(\n 'Local file paths are not available on the hosted walkerOS MCP server.',\n HINT_INLINE_OR_ID,\n );\n}\n\nfunction refuseUrl(): RuntimeRefusal {\n return new RuntimeRefusal(\n 'Fetching URLs is not available on the hosted walkerOS MCP server.',\n HINT_INLINE_OR_ID,\n );\n}\n\nfunction parseInline(trimmed: string): unknown {\n try {\n return JSON.parse(trimmed);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new Error(`Input appears to be JSON but contains errors: ${message}`);\n }\n}\n\n/**\n * The least-privilege runtime for a shared, network-reached process: the app's\n * OAuth door, in-app chat, and any third-party HTTP host.\n *\n * It never touches the filesystem or the network on the caller's behalf. A\n * saved `flow_`/`cfg_` id is resolved through the access-scoped tool client, a\n * document is parsed inline, and everything else is refused. `bundle`,\n * `simulate` and `push` are deliberately absent: compiling or importing a\n * caller's flow pulls that caller's code (inline or by package name) into this\n * process, and no input shape makes that safe here.\n */\nexport function createHostedRuntime(\n client: Pick<ToolClient, 'getFlow'>,\n): FlowRuntime {\n return {\n async load(input) {\n const trimmed = input.trim();\n if (trimmed === '') throw new Error('Input is required');\n switch (classifyConfigInput(trimmed)) {\n case 'url':\n throw refuseUrl();\n case 'cloud-id':\n return flowConfigOf(await client.getFlow({ flowId: trimmed }));\n case 'inline-json':\n return parseInline(trimmed);\n case 'local-path':\n throw refuseLocalPath();\n case 'bare-string':\n // Not a refusal: nothing was withheld, the input simply names nothing\n // this runtime can resolve.\n throw new Error(\n `Cannot resolve \"${trimmed}\" on the hosted walkerOS MCP server. ${HINT_INLINE_OR_ID}`,\n );\n }\n },\n };\n}\n","import {\n listProjects,\n getProject,\n createProject,\n updateProject,\n deleteProject,\n setDefaultProject,\n getDefaultProject,\n listAllFlows,\n listFlows,\n getFlow,\n createFlow,\n updateFlow,\n deleteFlow,\n duplicateFlow,\n listPreviews,\n getPreview,\n createPreview,\n deletePreview,\n regrantPreview,\n listSecrets,\n createSecret,\n updateSecret,\n deleteSecret,\n deploy,\n listDeployments,\n getDeploymentBySlug,\n deleteDeployment,\n listJourneys,\n startObserveSession,\n getObserveSession,\n endObserveSession,\n listReleases,\n getRelease,\n listStepHistory,\n setReleaseRationale,\n listThreads,\n createThread,\n addThreadMessage,\n listKnowledge,\n listFrames,\n listPageFrames,\n getFrame,\n startDeviceAuthorization,\n completeDeviceLogin,\n whoami,\n credentialSource,\n resolveAppUrl,\n logout,\n feedback,\n getFeedbackPreference,\n setFeedbackPreference,\n} from '@walkeros/cli';\nimport type {\n DeviceAuthorization,\n DeviceLoginResult,\n ListFlowsOptions,\n DeployOptions,\n ListDeploymentsOptions,\n ListPreviewsOptions,\n GetPreviewOptions,\n CreatePreviewOptions,\n DeletePreviewOptions,\n ListSecretsOptions,\n CreateSecretOptions,\n UpdateSecretOptions,\n DeleteSecretOptions,\n FeedbackOptions,\n} from '@walkeros/cli';\n\nimport { normalizeBaseUrl } from './base-url.js';\nimport type {\n ToolClient,\n JourneysResult,\n RegrantPreviewOptions,\n ObserveSessionResult,\n ObserveSessionRef,\n StartObserveSessionOptions,\n ReleaseRef,\n ReleaseIndexWire,\n ReleaseDetailWire,\n StepHistoryWire,\n VersionAnnotationWire,\n ThreadAnchorType,\n ThreadStatus,\n HubThreadWire,\n ListThreadsWire,\n ListKnowledgeWire,\n FrameWire,\n FrameListWire,\n FrameLeanListWire,\n} from './tool-client.js';\n\n/**\n * Default ToolClient implementation backed by @walkeros/cli. Every method\n * delegates to the CLI's programmatic API, which in turn talks to the\n * walkerOS app over HTTPS via openapi-fetch. Token resolution and the\n * base URL come from the CLI's config file and environment\n * (WALKEROS_TOKEN, WALKEROS_APP_URL), so no constructor args are required.\n */\nexport class HttpToolClient implements ToolClient {\n async listProjects(options?: {\n cursor?: string;\n limit?: number;\n }): Promise<unknown> {\n return listProjects(options);\n }\n async getProject(options: { projectId?: string }): Promise<unknown> {\n return getProject(options);\n }\n async createProject(options: { name: string }): Promise<unknown> {\n return createProject(options);\n }\n async updateProject(options: {\n projectId?: string;\n name: string;\n }): Promise<unknown> {\n return updateProject(options);\n }\n async deleteProject(options: { projectId?: string }): Promise<unknown> {\n return deleteProject(options);\n }\n setDefaultProject(projectId: string): void {\n setDefaultProject(projectId);\n }\n getDefaultProject(): string | null {\n return getDefaultProject();\n }\n\n async listAllFlows(options?: {\n sort?: string;\n order?: 'asc' | 'desc';\n includeDeleted?: boolean;\n cursor?: string;\n limit?: number;\n }): Promise<unknown> {\n return listAllFlows(options as Parameters<typeof listAllFlows>[0]);\n }\n async listFlows(options: ListFlowsOptions): Promise<unknown> {\n return listFlows(options);\n }\n async getFlow(options: {\n flowId: string;\n projectId?: string;\n fields?: string[];\n }): Promise<unknown> {\n return getFlow(options);\n }\n async createFlow(options: {\n name: string;\n content: Record<string, unknown>;\n projectId?: string;\n }): Promise<unknown> {\n return createFlow(options);\n }\n async updateFlow(options: {\n flowId: string;\n projectId?: string;\n name?: string;\n content?: Record<string, unknown>;\n mergePatch?: boolean;\n }): Promise<unknown> {\n return updateFlow(options);\n }\n async deleteFlow(options: {\n flowId: string;\n projectId?: string;\n }): Promise<unknown> {\n return deleteFlow(options);\n }\n async duplicateFlow(options: {\n flowId: string;\n name?: string;\n projectId?: string;\n }): Promise<unknown> {\n return duplicateFlow(options);\n }\n\n async listPreviews(options: ListPreviewsOptions): Promise<unknown> {\n return listPreviews(options);\n }\n async getPreview(options: GetPreviewOptions): Promise<unknown> {\n return getPreview(options);\n }\n async createPreview(\n options: CreatePreviewOptions & { siteUrl?: string },\n ): Promise<unknown> {\n // flow-manage passes `siteUrl` (the shared handler's field); the CLI's\n // createPreview mints an origin-bound grant when given `url`. Bridge the two\n // so a preview_create with a site URL over the HTTP client mints a real\n // grant instead of returning a null activationUrl.\n return createPreview({ ...options, url: options.url ?? options.siteUrl });\n }\n async deletePreview(options: DeletePreviewOptions): Promise<unknown> {\n return deletePreview(options);\n }\n async regrantPreview(options: RegrantPreviewOptions): Promise<unknown> {\n return regrantPreview(options);\n }\n\n async listSecrets(options: ListSecretsOptions): Promise<unknown> {\n return listSecrets(options);\n }\n async createSecret(options: CreateSecretOptions): Promise<unknown> {\n return createSecret(options);\n }\n async updateSecret(options: UpdateSecretOptions): Promise<unknown> {\n return updateSecret(options);\n }\n async deleteSecret(options: DeleteSecretOptions): Promise<unknown> {\n return deleteSecret(options);\n }\n\n async deploy(options: DeployOptions): Promise<unknown> {\n return deploy(options);\n }\n async listDeployments(options: ListDeploymentsOptions): Promise<unknown> {\n return listDeployments(options);\n }\n async getDeploymentBySlug(options: {\n slug: string;\n projectId?: string;\n }): Promise<unknown> {\n return getDeploymentBySlug(options);\n }\n async deleteDeployment(options: {\n slug: string;\n projectId?: string;\n }): Promise<unknown> {\n return deleteDeployment(options);\n }\n\n async listJourneys(options: {\n flowId: string;\n projectId?: string;\n traceId?: string;\n limit?: number;\n }): Promise<JourneysResult> {\n return listJourneys(options);\n }\n\n /**\n * Observe session lifecycle over the CLI's authenticated boundary. The trio\n * routes through the same `apiFetch` as every other method here, so token\n * resolution, base URL, and `ApiError` shaping (which `isAuthError` reads)\n * stay identical to the rest of the client.\n */\n async startObserveSession(\n options: StartObserveSessionOptions,\n ): Promise<ObserveSessionResult> {\n return startObserveSession(options);\n }\n async getObserveSession(\n options: ObserveSessionRef,\n ): Promise<ObserveSessionResult> {\n return getObserveSession(options);\n }\n async endObserveSession(options: ObserveSessionRef): Promise<void> {\n return endObserveSession(options);\n }\n\n async listReleases(options: {\n projectId: string;\n flowId: string;\n limit?: number;\n offset?: number;\n }): Promise<ReleaseIndexWire> {\n return listReleases(options);\n }\n async getRelease(options: {\n projectId: string;\n flowId: string;\n ref: ReleaseRef;\n }): Promise<ReleaseDetailWire> {\n return getRelease(options);\n }\n async listStepHistory(options: {\n projectId: string;\n flowId: string;\n step: string;\n flow?: string;\n limit?: number;\n }): Promise<StepHistoryWire> {\n return listStepHistory(options);\n }\n async setReleaseRationale(options: {\n projectId: string;\n flowId: string;\n versionId: string;\n text: string;\n }): Promise<VersionAnnotationWire> {\n return setReleaseRationale(options);\n }\n async listThreads(options: {\n projectId: string;\n flowId: string;\n anchorType?: ThreadAnchorType;\n anchorKey?: string;\n status?: ThreadStatus;\n includeMessages: boolean;\n limit?: number;\n }): Promise<ListThreadsWire> {\n return listThreads(options);\n }\n async createThread(options: {\n projectId: string;\n flowId: string;\n anchorType: ThreadAnchorType;\n anchorKey: string;\n anchorLabel?: string;\n text: string;\n }): Promise<HubThreadWire> {\n return createThread(options);\n }\n async addThreadMessage(options: {\n projectId: string;\n flowId: string;\n threadId: string;\n text: string;\n }): Promise<HubThreadWire> {\n return addThreadMessage(options);\n }\n async listKnowledge(options: {\n projectId: string;\n pageKey?: string;\n frameId?: string;\n markId?: string;\n includeMessages: boolean;\n limit?: number;\n }): Promise<ListKnowledgeWire> {\n return listKnowledge(options);\n }\n\n async listFrames(options: { projectId: string }): Promise<FrameLeanListWire> {\n return listFrames(options);\n }\n async listPageFrames(options: {\n projectId: string;\n pageKey: string;\n }): Promise<FrameListWire> {\n return listPageFrames(options);\n }\n async getFrame(options: {\n projectId: string;\n frameId: string;\n }): Promise<FrameWire> {\n return getFrame(options);\n }\n\n async requestDeviceCode(): Promise<DeviceAuthorization> {\n return startDeviceAuthorization(resolveAppUrl());\n }\n async pollForToken(\n deviceCode: string,\n options?: { timeoutMs?: number },\n ): Promise<DeviceLoginResult> {\n return completeDeviceLogin(deviceCode, options);\n }\n async whoami(): Promise<unknown> {\n return whoami();\n }\n credentialSource(): 'env' | 'config' | null {\n return credentialSource();\n }\n async logout(): Promise<{ deleted: boolean }> {\n return logout();\n }\n\n /**\n * The app this local door talks to: `WALKEROS_APP_URL`, then the CLI config\n * file, then the built-in default, which is exactly the chain every other\n * method here already resolves its base URL through. Normalized, because\n * neither the env var nor the config file is obliged to omit a trailing\n * slash and the interface promises a base without one.\n */\n appBaseUrl(): string {\n return normalizeBaseUrl(resolveAppUrl());\n }\n\n /**\n * Unauthenticated reachability probe of the app's PUBLIC `/api/health`\n * route. Uses a plain `fetch` (no `createApiClient`, whose every request\n * rejects without a credential) so diagnostics works logged-out. Resolves\n * `{ reachable: false }` only on a real network/timeout failure.\n */\n async checkHealth(): Promise<{\n reachable: boolean;\n status?: string;\n version?: string;\n }> {\n try {\n const res = await fetch(`${resolveAppUrl()}/api/health`, {\n signal: AbortSignal.timeout(5000),\n });\n // A non-2xx status still means the app is reachable; only network or\n // timeout errors (the catch below) mark it unreachable.\n const body: unknown = await res.json().catch(() => undefined);\n const result: { reachable: boolean; status?: string; version?: string } =\n { reachable: true };\n if (body && typeof body === 'object') {\n const record = body as Record<string, unknown>;\n if (typeof record.status === 'string') result.status = record.status;\n if (typeof record.version === 'string') result.version = record.version;\n }\n return result;\n } catch {\n return { reachable: false };\n }\n }\n\n async submitFeedback(text: string, options?: FeedbackOptions): Promise<void> {\n await feedback(text, options);\n }\n getFeedbackPreference(): boolean | undefined {\n return getFeedbackPreference();\n }\n setFeedbackPreference(anonymous: boolean): void {\n setFeedbackPreference(anonymous);\n }\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\nimport {\n collectKnownSecrets,\n loadConfig,\n loadJsonConfig,\n bundle,\n push,\n simulateSource,\n simulateTransformer,\n simulateCollector,\n simulateDestination,\n} from '@walkeros/cli';\nimport { isObject } from '@walkeros/core';\nimport { isFlowJson } from '../tools/narrow.js';\nimport type { Flow, WalkerOS } from '@walkeros/core';\nimport { schemas } from '@walkeros/core/dev';\nimport { getOrBuildBundle } from './bundle-cache.js';\nimport type { FlowRuntime } from './types.js';\n\n/**\n * The full-capability runtime for the user's own machine (stdio, the developer\n * CLI). It wraps the `@walkeros/cli` loaders and runners exactly as the tools\n * called them before the runtime seam existed, so local behaviour is unchanged:\n * a config may be a file path, an http(s) URL or inline JSON, and bundling,\n * simulation and push run in this process.\n *\n * This is the only module in the package that may bind those cli functions;\n * the tools reach them through the `FlowRuntime` interface and nothing else.\n */\nexport function createLocalRuntime(): FlowRuntime {\n return {\n load: (input) => loadJsonConfig(input),\n\n baseDir(input) {\n const file = path.resolve(input);\n return fs.existsSync(file) && fs.statSync(file).isFile()\n ? path.dirname(file)\n : undefined;\n },\n\n bundle: (input, opts) =>\n bundle(input, {\n flowName: opts.flowName,\n stats: opts.stats,\n buildOverrides: opts.output ? { output: opts.output } : undefined,\n }),\n\n async simulate(input, opts) {\n // Reuse a prebuilt bundle across calls with the same resolved config. The\n // simulate fns take their fast `mode: 'prebuilt'` branch when given a\n // bundlePath, skipping the per-call rebuild. On any bundle failure fall\n // back to undefined so the simulate fn rebuilds and surfaces its own error.\n let bundlePath: string | undefined;\n try {\n bundlePath = await getOrBuildBundle(input);\n } catch {\n bundlePath = undefined;\n }\n const common = { bundlePath, flow: opts.flow, silent: true };\n const config = opts.config ?? input;\n\n switch (opts.stepType) {\n case 'source':\n return simulateSource(config, opts.event, {\n sourceId: opts.stepId,\n ...common,\n consent: opts.state?.consent,\n });\n case 'transformer':\n return simulateTransformer(config, partialEvent(opts.event), {\n transformerId: opts.stepId,\n ...common,\n ingest: opts.ingest,\n consent: opts.state?.consent,\n });\n case 'collector':\n return simulateCollector(config, partialEvent(opts.event), {\n collectorName: opts.stepId,\n ...common,\n state: opts.state,\n ingest: opts.ingest,\n });\n case 'destination':\n return simulateDestination(config, eventObject(opts.event), {\n destinationId: opts.stepId,\n ...common,\n ingest: opts.ingest,\n consent: opts.state?.consent,\n command: opts.command,\n });\n }\n },\n\n knownSecrets: async (input) =>\n collectKnownSecrets(await loadJsonConfig<Flow.Json>(input)),\n\n async loadRun(input) {\n // One read, detected the way push detects its input: content that\n // parses as JSON is a config, anything else a prebuilt bundle, which\n // carries no config and so no secrets to resolve.\n const content = await loadConfig(input, { json: false });\n const config =\n typeof content === 'string' ? parseJson(content) : undefined;\n if (!isFlowJson(config)) return { knownSecrets: [] };\n return { config, knownSecrets: collectKnownSecrets(config) };\n },\n\n push: (input, event, opts) =>\n push(input, event, {\n json: true,\n flow: opts.flow,\n platform: opts.platform,\n ...(opts.config !== undefined && { raw: opts.config }),\n }),\n };\n}\n\n/**\n * The event a transformer or collector step runs on, checked against the\n * partial event schema the CLI applies. The value passes through as given.\n */\nfunction partialEvent(value: unknown): WalkerOS.DeepPartialEvent {\n if (isPartialEvent(value)) return value;\n const parsed = schemas.PartialEventSchema.safeParse(value);\n throw new Error(parsed.error?.message ?? 'Invalid event');\n}\n\nfunction isPartialEvent(value: unknown): value is WalkerOS.DeepPartialEvent {\n return schemas.PartialEventSchema.safeParse(value).success;\n}\n\n/** A destination step's event, or a command's data: an object. */\nfunction eventObject(value: unknown): Record<string, unknown> {\n if (isObject(value)) return value;\n throw new Error('event must be an object.');\n}\n\nfunction parseJson(content: string): unknown {\n try {\n return JSON.parse(content);\n } catch {\n return undefined;\n }\n}\n","import { createHash } from 'node:crypto';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { mkdir, rm, writeFile } from 'node:fs/promises';\nimport { rmSync } from 'node:fs';\nimport { bundle } from '@walkeros/cli';\n\n/**\n * Content-addressed cache of prebuilt simulate bundles for the MCP\n * `flow_simulate` tool. Each `flow_simulate` call otherwise re-bundles the\n * whole flow (`mode: 'build'`), which dominates latency. By keying a prebuilt\n * ESM by the hash of the *resolved* config content, repeated simulations of the\n * same flow reuse one bundle and a changed flow rebuilds.\n *\n * The CLI simulate functions accept a `bundlePath`; passing it takes their\n * `mode: 'prebuilt'` branch and skips the bundle step entirely.\n */\n\ninterface CacheEntry {\n bundlePath: string;\n dir: string;\n}\n\n/** LRU bound: enough to cover a few flows iterated in one session without\n * leaking temp dirs. Oldest entry is evicted (and its dir removed) on insert. */\nconst MAX_ENTRIES = 8;\n\n/** Insertion-ordered map gives us LRU for free: delete+set on access moves the\n * key to the end; the first key is the least-recently used. */\nconst cache = new Map<string, CacheEntry>();\n\n/** In-flight builds, deduped by key so two concurrent identical simulate calls\n * bundle once instead of racing to write the same artifact. */\nconst inFlight = new Map<string, Promise<string>>();\n\nlet cleanupRegistered = false;\n\nfunction hashConfig(resolvedConfig: string): string {\n return createHash('sha256').update(resolvedConfig).digest('hex');\n}\n\n/**\n * Inline JSON config content is cacheable: its full content is the cache key,\n * so an edit always re-keys. A file path or URL is NOT: `resolveConfigPath`\n * returns it unchanged, so the key would be the path string and an edit to the\n * file behind it would silently reuse a stale bundle. Such inputs skip the\n * cache and take the simulate fns' build path (which re-reads the file).\n *\n * The discriminator matches how the CLI simulate fns treat `configPath`: a\n * string that parses as JSON is inline config; anything else is a path/URL.\n */\nfunction isInlineJsonConfig(resolvedConfig: string): boolean {\n const trimmed = resolvedConfig.trimStart();\n if (!trimmed.startsWith('{') && !trimmed.startsWith('[')) return false;\n try {\n JSON.parse(resolvedConfig);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction registerProcessCleanup(): void {\n if (cleanupRegistered) return;\n cleanupRegistered = true;\n const cleanup = () => {\n for (const entry of cache.values()) {\n // Synchronous best-effort removal on exit; async fs is not safe here.\n try {\n rmSync(entry.dir, { recursive: true, force: true });\n } catch {\n // Temp dir already gone or unwritable; nothing to recover.\n }\n }\n cache.clear();\n };\n process.once('exit', cleanup);\n}\n\nasync function evictIfNeeded(): Promise<void> {\n while (cache.size > MAX_ENTRIES) {\n const oldestKey = cache.keys().next().value;\n if (oldestKey === undefined) break;\n const evicted = cache.get(oldestKey);\n cache.delete(oldestKey);\n if (evicted) await rm(evicted.dir, { recursive: true, force: true });\n }\n}\n\n/**\n * Build the resolved config into a prebuilt simulate ESM and return its path,\n * reusing a cached bundle when the same resolved config was bundled before.\n *\n * `resolvedConfig` is the exact string the simulate functions would otherwise\n * receive as `configPath` (inline JSON for cloud ids after id resolution, or a\n * file path / URL / inline JSON otherwise). Keying on it means a cloud id whose\n * underlying content changes between calls rebuilds correctly.\n *\n * Returns `undefined` for file-path / URL configs (see `isInlineJsonConfig`):\n * those bypass the cache so an edited file is never served from a stale bundle.\n * The caller then passes the original configPath with no bundlePath, taking the\n * simulate fns' build path exactly as before.\n *\n * The producer mirrors the CLI build-mode bundle: target `simulate`\n * (skipWrapper + withDev, /dev graph inlined) written as ESM. The flow's own\n * platform is preserved via the bundler's platform defaults; only the output\n * format is pinned to ESM so the CLI can import it directly.\n */\nexport async function getOrBuildBundle(\n resolvedConfig: string,\n): Promise<string | undefined> {\n if (!isInlineJsonConfig(resolvedConfig)) return undefined;\n\n registerProcessCleanup();\n const key = hashConfig(resolvedConfig);\n\n const cached = cache.get(key);\n if (cached) {\n // Refresh LRU position.\n cache.delete(key);\n cache.set(key, cached);\n return cached.bundlePath;\n }\n\n const pending = inFlight.get(key);\n if (pending) return pending;\n\n const build = (async () => {\n const dir = path.join(\n os.tmpdir(),\n `walkeros-mcp-bundle-${key.slice(0, 16)}`,\n );\n await rm(dir, { recursive: true, force: true });\n await mkdir(dir, { recursive: true });\n const bundlePath = path.join(dir, 'flow.mjs');\n\n // Touch the file first so a producer that only mutates (rather than writes)\n // still leaves a real artifact; the bundler overwrites it with the real ESM.\n await writeFile(bundlePath, '', 'utf-8');\n\n // Load-bearing: `bundle()` derives platform from the flow config and\n // intentionally ignores `preset.platform` (the 'simulate' preset is node),\n // so a web flow still bundles browser-platform, equivalent to build-mode.\n // If `bundle()` ever honors `preset.platform`, web simulations via this\n // cache would silently bundle for node and diverge.\n await bundle(resolvedConfig, {\n target: 'simulate',\n silent: true,\n buildOverrides: { output: bundlePath, format: 'esm', minify: false },\n });\n\n cache.set(key, { bundlePath, dir });\n await evictIfNeeded();\n return bundlePath;\n })();\n\n inFlight.set(key, build);\n try {\n return await build;\n } finally {\n inFlight.delete(key);\n }\n}\n\n/** Test-only: clear the cache and remove all temp dirs. */\nexport async function __resetBundleCacheForTests(): Promise<void> {\n inFlight.clear();\n const dirs = Array.from(cache.values(), (e) => e.dir);\n cache.clear();\n await Promise.all(\n dirs.map((dir) => rm(dir, { recursive: true, force: true })),\n );\n}\n"],"mappings":";;;AAAA,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;;;ACDjC,SAAS,iBAAiB;;;ACA1B,SAAS,gBAAgB;AAEzB,SAAS,eAAe;AAExB,SAAS,WAAW,gBAAgB;;;ACJpC,SAAS,SAAS;AAGlB,IAAM,sBAAsB;AAAA,EAC1B,MAAM,EAAE,OAAO;AAAA,EACf,SAAS,EAAE,OAAO;AAAA,EAClB,OAAO,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC5B,MAAM,EACH,OAAO,EACP,SAAS,EACT,SAAS,iDAAiD;AAAA,EAC7D,SAAS,EACN,OAAO,EACP,SAAS,EACT,SAAS,gDAAgD;AAC9D;AAEO,IAAM,sBAAsB;AAAA,EACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,2BAA2B;AAAA,EACvD,MAAM,EACH,MAAM;AAAA,IACL,EAAE,KAAK,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KAAK,EAAE,MAAM,OAAO,UAAU;AAI5B,MAAI;AACF,UAAM,UAAU,MAAM,iBAAiB;AAAA,MACrC,YAAY;AAAA,MACZ,gBAAgB;AAAA,IAClB,CAAC;AACD,UAAM,QAAQ,UAAU,SAAS;AAAA,EACnC,QAAQ;AAAA,EAER;AACA,UAAQ,MAAM,oCAAoC,KAAK;AACvD,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["path","schemas","mcpResult","mcpError","z","mcpError","TITLE","DESCRIPTION","inputSchema","schemas","annotations","mcpError","mcpResult","z","schemas","mcpResult","mcpError","isObject","mcpResult","TITLE","inputSchema","schemas","z","annotations","mcpError","mcpResult","require","z","schemas","mcpError","TITLE","DESCRIPTION","inputSchema","schemas","z","annotations","mcpError","z","mcpResult","mcpError","schemas","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpResult","mcpError","z","fetchPackage","mcpResult","mcpError","z","mcpResult","fetchPackage","mcpError","schemas","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpResult","mcpError","mcpResult","TITLE","DESCRIPTION","inputSchema","annotations","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpResult","mcpError","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","data","safe","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","NO_DEFAULT_PROJECT_ERROR","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","z","annotations","mcpResult","thread","mcpError","z","mcpResult","mcpError","FRAME_ID_PATTERN","TITLE","z","annotations","isRecord","mcpError","mcpResult","schemas","schemas","require","z","z","z","path","bundle","isObject","schemas","cache","bundle","schemas","isObject"]}
|
|
1
|
+
{"version":3,"sources":["../src/stdio.ts","../src/server.ts","../src/tools/validate.ts","../src/schemas/output.ts","../src/runtime/types.ts","../src/cloud-flow.ts","../src/tools/bundle.ts","../src/tools/parse-input.ts","../src/tools/resolve-config-path.ts","../src/tools/simulate.ts","../src/tools/simulate-description.ts","../src/tools/egress.ts","../src/tools/push.ts","../src/tools/examples.ts","../src/catalog.ts","../src/tools/narrow.ts","../src/tools/package.ts","../src/tools/flow-load.ts","../src/types.ts","../src/user-data.ts","../src/tools/project-context.ts","../src/tools/feedback.ts","../src/tools/diagnostics.ts","../src/base-url.ts","../src/tools/auth.ts","../src/tools/project-manage.ts","../src/action-requirements.ts","../src/tools/flow-manage.ts","../src/ui-parts.ts","../src/links.ts","../src/tools/deploy-manage.ts","../src/tools/_resolvers.ts","../src/tools/secret-manage.ts","../src/tools/observe-journeys.ts","../src/tools/observe-session.ts","../src/tools/hub-manage.ts","../src/tools/feature-gate.ts","../src/tools/frame-manage.ts","../src/resources/package-schemas.ts","../src/resources/references.ts","../src/prompts/add-step.ts","../src/prompts/setup-mapping.ts","../src/prompts/manage-contract.ts","../src/instructions.ts","../src/telemetry.ts","../src/runtime/hosted.ts","../src/http-tool-client.ts","../src/runtime/local.ts","../src/runtime/bundle-cache.ts"],"sourcesContent":["import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { setClientContext } from '@walkeros/cli';\n\nimport { createWalkerOSMcpServer, getMcpEmitterSingleton } from './server.js';\nimport { HttpToolClient } from './http-tool-client.js';\nimport { createMcpEmitter } from './telemetry.js';\nimport { createLocalRuntime } from './runtime/local.js';\n\ndeclare const __VERSION__: string;\n\nsetClientContext({ type: 'mcp', version: __VERSION__ });\n\n// Hook process-level error channels so we can emit `error throw` before the\n// process tears down. Both handlers look up the emitter lazily: if the MCP\n// handshake never completed, no emitter exists and we silently skip.\n// We don't call process.exit — stdio transport already propagates failures\n// up to the parent client via the JSON-RPC channel.\nprocess.on('uncaughtException', (err) => {\n const emitter = getMcpEmitterSingleton();\n if (emitter) {\n emitter.emitError('uncaught').catch(() => {});\n }\n console.error('Uncaught exception in Flow MCP server:', err);\n});\n\nprocess.on('unhandledRejection', (reason) => {\n const emitter = getMcpEmitterSingleton();\n if (emitter) {\n emitter.emitError('unhandledRejection').catch(() => {});\n }\n console.error('Unhandled rejection in Flow MCP server:', reason);\n});\n\nasync function main() {\n // stdio runs on the user's own machine: the local runtime keeps file, URL and\n // in-process bundle, simulate and push behaviour exactly as before.\n const server = createWalkerOSMcpServer({\n client: new HttpToolClient(),\n version: __VERSION__,\n runtime: createLocalRuntime(),\n });\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error('walkerOS Flow MCP server running on stdio');\n}\n\nmain().catch(async (error) => {\n // Startup failure — no client handshake happened, so there's no emitter in\n // the module singleton. Build a one-shot emitter with an unknown client so\n // the error is still visible to telemetry.\n try {\n const emitter = await createMcpEmitter({\n clientInfo: undefined,\n packageVersion: __VERSION__,\n });\n await emitter.emitError('startup');\n } catch {\n // swallow — telemetry must never mask the original startup error\n }\n console.error('Failed to start Flow MCP server:', error);\n process.exit(1);\n});\n","import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport type { ToolClient } from './tool-client.js';\nimport { registerFlowValidateTool } from './tools/validate.js';\nimport { registerFlowBundleTool } from './tools/bundle.js';\nimport { registerFlowSimulateTool } from './tools/simulate.js';\nimport { registerFlowPushTool } from './tools/push.js';\nimport { registerFlowExamplesTool } from './tools/examples.js';\nimport {\n registerPackageSearchTool,\n registerGetPackageSchemaTool,\n} from './tools/package.js';\nimport { registerFlowLoadTool } from './tools/flow-load.js';\nimport { registerFeedbackTool } from './tools/feedback.js';\nimport { registerDiagnosticsTool } from './tools/diagnostics.js';\nimport { registerAuthTool } from './tools/auth.js';\nimport { registerProjectManageTool } from './tools/project-manage.js';\nimport { registerFlowManageTool } from './tools/flow-manage.js';\nimport { registerDeployTool } from './tools/deploy-manage.js';\nimport { registerSecretManageTool } from './tools/secret-manage.js';\nimport { registerObserveJourneysTool } from './tools/observe-journeys.js';\nimport { registerObserveSessionTool } from './tools/observe-session.js';\nimport { registerHubManageTool } from './tools/hub-manage.js';\nimport { registerFrameManageTool } from './tools/frame-manage.js';\nimport { registerPackageSchemaResources } from './resources/package-schemas.js';\nimport { registerReferenceResources } from './resources/references.js';\nimport { registerAddStepPrompt } from './prompts/add-step.js';\nimport { registerSetupMappingPrompt } from './prompts/setup-mapping.js';\nimport { registerManageContractPrompt } from './prompts/manage-contract.js';\nimport { SERVER_INSTRUCTIONS } from './instructions.js';\nimport { createMcpEmitter, type McpEmitter } from './telemetry.js';\nimport type { FlowRuntime } from './runtime/types.js';\nimport { createHostedRuntime } from './runtime/hosted.js';\n\nexport interface Logger {\n debug?(message: string, meta?: Record<string, unknown>): void;\n info?(message: string, meta?: Record<string, unknown>): void;\n warn?(message: string, meta?: Record<string, unknown>): void;\n error?(message: string, meta?: Record<string, unknown>): void;\n}\n\nexport interface CreateServerOptions {\n client: ToolClient;\n logger?: Logger;\n version?: string;\n catalogBaseUrl?: string;\n /**\n * The capability runtime the flow tools read, build and run flows through.\n * Omitted, the HOSTED runtime is used, the safe default for any shared or\n * network-reached process: inline JSON and saved flow ids only, no local\n * files, no URLs, no in-process bundle, simulate or push. Pass\n * `createLocalRuntime()` only on the user's own machine (stdio, the CLI) to\n * keep local file, URL and execution behaviour. See `FlowRuntime`.\n */\n runtime?: FlowRuntime;\n}\n\n/**\n * Module-scoped singleton emitter, populated once the MCP `initialize`\n * handshake completes and clientInfo is known. The stdio entrypoint reads\n * this to emit process-level `error throw` events from uncaughtException /\n * unhandledRejection hooks, where the Server instance isn't in scope.\n */\nlet currentEmitter: McpEmitter | undefined;\n\nexport function getMcpEmitterSingleton(): McpEmitter | undefined {\n return currentEmitter;\n}\n\n/**\n * Internal: reset for tests that want a clean slate between cases.\n * Not exported from the package.\n */\nexport function __resetMcpEmitterSingletonForTesting(): void {\n currentEmitter = undefined;\n}\n\n/**\n * Minimal shape of a `_registeredTools` entry we rely on for handler\n * wrapping. Typed locally to avoid leaking SDK internals while keeping\n * strict typing on the handler signature.\n */\ntype WrappableRegisteredTool = {\n handler: (...args: unknown[]) => unknown;\n};\n\ntype RegisteredToolsRecord = Record<string, WrappableRegisteredTool>;\n\n/**\n * Wrap every already-registered tool handler with telemetry. The wrapper\n * emits `cmd invoke` with outcome + timing, swallowing any telemetry error\n * so it never surfaces to the tool caller. We look up the emitter lazily at\n * call time so wrapping can happen before the emitter is created.\n */\nfunction wrapRegisteredToolsWithTelemetry(server: McpServer): void {\n const internal = server as unknown as {\n _registeredTools: RegisteredToolsRecord;\n };\n const tools = internal._registeredTools;\n if (!tools) return;\n for (const [toolName, tool] of Object.entries(tools)) {\n const original = tool.handler;\n tool.handler = async (...args: unknown[]): Promise<unknown> => {\n const start = Date.now();\n try {\n const result = await original(...args);\n const emitter = currentEmitter;\n if (emitter) {\n emitter\n .emitInvoke(toolName, 'success', Date.now() - start)\n .catch(() => {});\n }\n return result;\n } catch (err) {\n const emitter = currentEmitter;\n if (emitter) {\n emitter\n .emitInvoke(toolName, 'error', Date.now() - start)\n .catch(() => {});\n }\n throw err;\n }\n };\n }\n}\n\nexport function createWalkerOSMcpServer(opts: CreateServerOptions): McpServer {\n const packageVersion = opts.version ?? '0.0.0';\n const runtime = opts.runtime ?? createHostedRuntime(opts.client);\n const server = new McpServer(\n {\n name: 'walkeros-flow',\n version: packageVersion,\n },\n { instructions: SERVER_INSTRUCTIONS },\n );\n\n registerAuthTool(server, opts.client);\n registerProjectManageTool(server, opts.client);\n registerFlowManageTool(server, opts.client);\n registerDeployTool(server, opts.client);\n registerSecretManageTool(server, opts.client);\n registerObserveSessionTool(server, opts.client);\n registerObserveJourneysTool(server, opts.client);\n registerHubManageTool(server, opts.client);\n registerFrameManageTool(server, opts.client);\n registerFeedbackTool(server, opts.client);\n registerDiagnosticsTool(server, opts.client, packageVersion);\n\n registerFlowValidateTool(server, runtime);\n registerFlowBundleTool(server, opts.client, runtime);\n registerFlowSimulateTool(server, opts.client, runtime);\n registerFlowPushTool(server, runtime);\n registerFlowExamplesTool(server, runtime);\n registerFlowLoadTool(server, opts.client, runtime);\n\n registerPackageSearchTool(server);\n registerGetPackageSchemaTool(server);\n\n registerPackageSchemaResources(server);\n registerReferenceResources(server, opts.client);\n registerAddStepPrompt(server);\n registerSetupMappingPrompt(server);\n registerManageContractPrompt(server);\n\n wrapRegisteredToolsWithTelemetry(server);\n\n // MCP SDK fires `oninitialized` after the `initialized` notification, which\n // follows a successful `initialize` request. At that point `getClientVersion`\n // returns the negotiated client identity. We create the emitter here and\n // emit `mcp start`, so consent, debug, and endpoint resolution happen lazily\n // at the moment a real client connects.\n const priorOnInitialized = server.server.oninitialized;\n server.server.oninitialized = () => {\n try {\n priorOnInitialized?.();\n } catch {\n // existing handler must not prevent telemetry setup\n }\n const clientInfo = server.server.getClientVersion();\n void createMcpEmitter({\n clientInfo,\n packageVersion,\n })\n .then(async (emitter) => {\n currentEmitter = emitter;\n await emitter.emitStart();\n })\n .catch(() => {\n // telemetry must never break the server; swallow setup/emit errors.\n });\n };\n\n return server;\n}\n","import { validate } from '@walkeros/cli';\nimport type { ValidateResult } from '@walkeros/cli';\nimport { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { ValidateOutputShape } from '../schemas/output.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport {\n HINT_OUT_OF_PROCESS,\n refusalHint,\n RuntimeRefusal,\n type FlowRuntime,\n} from '../runtime/types.js';\nimport { isCloudId } from '../cloud-flow.js';\n\ntype ValidateType = 'contract' | 'event' | 'flow' | 'mapping';\n\n/**\n * Resolve the validate input through the runtime. For `type: 'event'`, a bare\n * string the runtime cannot resolve is the event-name shorthand and becomes\n * `{ name }`; the shorthand reads nothing, so it holds under every runtime.\n * Every other failure surfaces: a `RuntimeRefusal` (a policy decision), a\n * failed saved-id lookup, and any load error for a flow, mapping or contract.\n */\nasync function loadValidateInput(\n runtime: FlowRuntime,\n input: string,\n type: ValidateType,\n): Promise<unknown> {\n if (!input || input.trim() === '') throw new Error(`${type} is required`);\n const trimmed = input.trim();\n const looksLikeJson = trimmed.startsWith('{') || trimmed.startsWith('[');\n try {\n return await runtime.load(input);\n } catch (error) {\n if (error instanceof RuntimeRefusal || isCloudId(trimmed)) throw error;\n if (looksLikeJson) {\n const message = error instanceof Error ? error.message : String(error);\n throw new Error(`Failed to parse ${type}. ${message}`);\n }\n if (type === 'event') return { name: trimmed };\n throw error;\n }\n}\n\nconst TITLE = 'Validate Flow';\nconst DESCRIPTION =\n 'Validate walkerOS events, flow configurations, mapping rules, or data contracts. ' +\n 'Accepts JSON strings, file paths, or URLs as input; on the hosted server only inline JSON or a saved flow id (flow_ or cfg_), no file paths or URLs. ' +\n \"With only type and input, a flow runs every check on every flow and step, including each package's settings schema (fetched from the package CDN; offline: true skips that and says so). \" +\n 'flow and path narrow the run; strict turns warnings and skips into failures: valid is false. ' +\n 'Returns valid, errors and warnings with stable codes, and details.scope (what was checked), details.skipped (checks that could not run) and details.deferred (values known only at runtime).';\n\nconst inputSchema = schemas.ValidateInputShape;\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createFlowValidateToolSpec(runtime: FlowRuntime): ToolSpec {\n return {\n name: 'flow_validate',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowValidateHandlerBody(runtime, input),\n };\n}\n\nasync function flowValidateHandlerBody(runtime: FlowRuntime, input: unknown) {\n const parsed = schemas.ValidateInputSchema.safeParse(input ?? {});\n if (!parsed.success) {\n return mcpError(parsed.error, 'Check the flow_validate input fields');\n }\n const {\n type,\n input: validateInput,\n flow,\n path,\n strict,\n offline,\n } = parsed.data;\n try {\n // Resolve the input through the runtime and validate the parsed document.\n // Handed a string, the cli `validate` would read files and URLs itself;\n // handing it the parsed object keeps every read behind the runtime.\n const resolved = await loadValidateInput(runtime, validateInput, type);\n const configDir = runtime.baseDir?.(validateInput);\n const result: ValidateResult = await validate(type, resolved, {\n flow,\n path,\n strict,\n offline,\n ...(configDir ? { configDir } : {}),\n });\n\n const skipped = result.details.skipped ?? [];\n const next = runtime.simulate\n ? ['Use flow_simulate to test event flow', 'Use flow_bundle to build']\n : [HINT_OUT_OF_PROCESS];\n const hints =\n !result.valid && result.errors.length === 0\n ? {\n next: [\n `strict: ${result.warnings.length} warning(s) and ${skipped.length} skipped check(s) count as failures; resolve them, or run without strict`,\n ],\n }\n : !result.valid\n ? {\n next: [\n 'Fix errors above, then run flow_validate again',\n 'Read walkeros://reference/flow-schema for correct structure',\n ],\n }\n : skipped.length > 0\n ? {\n next: [\n `Valid in checked scope; ${skipped.length} check(s) skipped, see details.skipped`,\n ...next,\n ],\n }\n : { next };\n // Validation `message` and `path` are tool-generated, not echoed user\n // input — both stay literal, never wrapped in <user_data>.\n return mcpResult(result, hints);\n } catch (error) {\n return mcpError(\n error,\n refusalHint(\n error,\n 'Check the input parameter — expected a JSON string, file path, or URL',\n ),\n );\n }\n}\n\nexport function registerFlowValidateTool(\n server: McpServer,\n runtime: FlowRuntime,\n) {\n const spec = createFlowValidateToolSpec(runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: ValidateOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowValidateHandlerBody(runtime, args),\n );\n}\n","import { z } from 'zod';\n\n// CLI tool output shapes\nconst ValidateIssueFields = {\n path: z.string(),\n message: z.string(),\n value: z.unknown().optional(),\n code: z\n .string()\n .optional()\n .describe('Stable code (the documented validate code list)'),\n keyword: z\n .string()\n .optional()\n .describe('JSON Schema keyword of an ENTRY_SCHEMA finding'),\n};\n\nexport const ValidateOutputShape = {\n valid: z.boolean().describe('Whether validation passed'),\n type: z\n .union([\n z.enum(['contract', 'entry', 'event', 'flow', 'mapping']),\n z.string().regex(/^(destinations|sources|transformers)\\.\\w+$/),\n ])\n .describe('What was validated'),\n errors: z.array(z.object(ValidateIssueFields)).describe('Validation errors'),\n warnings: z\n .array(\n z.object({\n ...ValidateIssueFields,\n suggestion: z.string().optional(),\n }),\n )\n .describe('Validation warnings'),\n details: z\n .object({\n scope: z\n .object({\n flows: z.array(z.string()),\n entry: z\n .object({\n section: z.string().optional(),\n key: z.string(),\n flows: z.array(z.string()),\n searchedFlows: z.array(z.string()),\n })\n .optional(),\n checks: z.array(z.string()),\n offline: z.literal(true).optional(),\n })\n .optional()\n .describe('What the run covered'),\n skipped: z\n .array(\n z.object({\n path: z.string(),\n check: z.string(),\n reason: z.string(),\n code: z.string(),\n }),\n )\n .optional()\n .describe('Checks in scope that did not run, with the reason'),\n deferred: z\n .array(z.object({ path: z.string(), reference: z.string() }))\n .optional()\n .describe('Values known only at runtime, not schema-checked'),\n })\n .catchall(z.unknown())\n .describe('Additional validation details'),\n _hints: z\n .object({\n next: z.array(z.string()).optional(),\n warnings: z.array(z.string()).optional(),\n })\n .optional()\n .describe('Suggested next steps'),\n};\n\nexport const BundleOutputShape = {\n success: z.boolean().describe('Whether bundling succeeded'),\n totalSize: z.number().optional().describe('Total bundle size in bytes'),\n buildTime: z.number().optional().describe('Build time in milliseconds'),\n packages: z\n .array(\n z.object({\n name: z.string(),\n }),\n )\n .optional()\n .describe('Names of packages included in the bundle'),\n treeshakingEffective: z\n .boolean()\n .optional()\n .describe('Whether tree-shaking was effective'),\n message: z.string().optional().describe('Status message'),\n};\n\nexport const SimulateOutputShape = {\n success: z.boolean().describe('Whether simulation succeeded'),\n error: z.string().optional().describe('Error message if failed'),\n summary: z.string().describe('One-line result summary'),\n destinations: z\n .record(\n z.string(),\n z.object({\n received: z\n .boolean()\n .describe('Whether destination received the event'),\n calls: z.number().describe('Number of API calls made'),\n payload: z\n .unknown()\n .optional()\n .describe('All intercepted API calls (only when verbose: true)'),\n }),\n )\n .optional()\n .describe('Per-destination results'),\n capturedEvents: z\n .array(z.record(z.string(), z.unknown()))\n .optional()\n .describe('Events captured by source simulation'),\n calls: z\n .array(z.unknown())\n .optional()\n .describe(\n 'Calls a simulated source made on its mock env (only when verbose: true)',\n ),\n skipped: z\n .object({\n reason: z.enum(['consent', 'pending']),\n required: z.record(z.string(), z.boolean()).optional(),\n granted: z.record(z.string(), z.boolean()).optional(),\n require: z.array(z.string()).optional(),\n })\n .optional()\n .describe(\n 'Why the destination sent nothing: a consent skip, or waiting for its require',\n ),\n duration: z.number().optional().describe('Simulation duration in ms'),\n};\n\nexport const PushOutputShape = {\n success: z.boolean().describe('Whether push succeeded'),\n elbResult: z.unknown().optional().describe('Push result from the collector'),\n duration: z.number().describe('Push duration in milliseconds'),\n error: z.string().optional().describe('Error message if push failed'),\n};\n\n// Examples List output shape\nexport const ExamplesListOutputShape = {\n flow: z.string().describe('Flow name'),\n count: z.number().describe('Number of examples found'),\n examples: z\n .array(\n z.object({\n step: z.string().describe('Step location (e.g., \"destination.gtag\")'),\n stepType: z\n .enum(['source', 'transformer', 'destination'])\n .describe('Step type'),\n stepName: z.string().describe('Step name'),\n exampleName: z.string().describe('Example name'),\n source: z\n .enum(['inline', 'package'])\n .describe(\n 'Where the example came from: \"inline\" (defined in the flow step) or \"package\" (shipped by the referenced package)',\n ),\n title: z.string().optional().describe('Human-readable title if set'),\n description: z\n .string()\n .optional()\n .describe('Short human-readable description'),\n public: z\n .boolean()\n .optional()\n .describe(\n 'Whether the example is public (defaults to true if omitted)',\n ),\n hasIn: z.boolean().describe('Whether the example has an input value'),\n hasOut: z.boolean().describe('Whether the example has an output value'),\n hasMapping: z\n .boolean()\n .describe('Whether the example has a mapping configuration'),\n hasTrigger: z\n .boolean()\n .describe('Whether the example has trigger metadata'),\n in: z.unknown().optional().describe('Input event data'),\n out: z.unknown().optional().describe('Expected output data'),\n mapping: z\n .unknown()\n .optional()\n .describe('Mapping configuration for destinations'),\n trigger: z\n .object({\n type: z.string().optional(),\n options: z.unknown().optional(),\n })\n .optional()\n .describe('Trigger metadata for source simulation'),\n }),\n )\n .describe('Step examples'),\n};\n","import type { Flow, Ingest, Simulation, WalkerOS } from '@walkeros/core';\nimport type { BundleStats, PushResult } from '@walkeros/cli';\n\n/**\n * The capability seam between the flow tools and the machine they run on.\n *\n * Every file read, URL fetch, bundle, simulation and push a tool performs goes\n * through a `FlowRuntime` and nothing else, so the runtime alone decides what\n * the process it lives in may do:\n *\n * - `createLocalRuntime()` keeps every capability. It is for the user's own\n * machine (stdio, the developer CLI), where the user is responsible for what\n * runs there.\n * - `createHostedRuntime(client)` is least privilege for a shared, network\n * reached process: it loads inline JSON and saved flow ids only, refuses\n * local paths and URLs, and has no `bundle`, `simulate` or `push` at all.\n *\n * A tool whose operation the runtime does not provide refuses with a hint that\n * names only out-of-process routes.\n */\nexport interface FlowRuntime {\n /**\n * Resolve a config input to parsed JSON. Local: a file path, an http(s) URL\n * or inline JSON. Hosted: inline JSON or a saved `flow_`/`cfg_` id; a local\n * path or URL is refused with a `RuntimeRefusal`.\n */\n load(input: string): Promise<unknown>;\n /**\n * The directory local `path` packages of a loaded input resolve against:\n * the input file's directory. Absent on a runtime without a filesystem,\n * where such packages stay a reported skip.\n */\n baseDir?(input: string): string | undefined;\n /** Compile a flow. Absent on a runtime that must not build in its process. */\n bundle?(input: string, opts: BundleOptions): Promise<BundleStats | void>;\n /** Build and run one step of a flow. Absent where that must not happen. */\n simulate?(input: string, opts: SimulateOptions): Promise<Simulation.Result>;\n /**\n * The values of the secrets a flow config references (`$secret.NAME`),\n * masked wherever a simulation or push result egresses. Read by the tools\n * only on a runtime without `loadRun`; a read that fails stops the run.\n */\n knownSecrets?(input: string): Promise<string[]>;\n /**\n * Read a push or simulate input once: the config and the values of the\n * secrets it references. A prebuilt bundle yields no config. A read that\n * fails rejects. Absent with `simulate` and `push`.\n */\n loadRun?(input: string): Promise<LoadedRun>;\n /** Build and run a flow against real destinations. Absent where forbidden. */\n push?(\n input: string,\n event: Record<string, unknown>,\n opts: PushOptions,\n ): Promise<PushResult>;\n}\n\nexport interface BundleOptions {\n flowName?: string;\n stats?: boolean;\n output?: string;\n}\n\nexport type SimulateStepType =\n | 'source'\n | 'transformer'\n | 'collector'\n | 'destination';\n\nexport interface SimulateOptions {\n stepType: SimulateStepType;\n stepId: string;\n event: unknown;\n flow?: string;\n /** The config from `loadRun`: the runtime does not read the input again. */\n config?: Flow.Json;\n /**\n * Transformer, collector and destination steps: pipeline context the step\n * reads via `ctx.ingest`. Source steps ignore it.\n */\n ingest?: Omit<Ingest, '_meta'>;\n /**\n * Collector state the step starts from. `consent` applies to every step\n * (the collector's starting consent); `user`, `globals` and `timing` to\n * collector steps only.\n */\n state?: {\n consent?: WalkerOS.Consent;\n user?: WalkerOS.User;\n globals?: WalkerOS.Properties;\n timing?: number;\n };\n /**\n * Destination steps only: run this collector command with `event` as its\n * data instead of pushing it (a step example with `command`).\n */\n command?: Flow.StepCommand;\n}\n\n/** A push or simulate input as read once by `loadRun`. */\nexport interface LoadedRun {\n config?: Flow.Json;\n knownSecrets: string[];\n}\n\nexport interface PushOptions {\n flow?: string;\n platform?: 'web' | 'server';\n /** The config from `loadRun`: the runtime does not read the input again. */\n config?: Flow.Json;\n}\n\n/**\n * Thrown by a runtime when it refuses an input on principle rather than on a\n * fault. Carries the hint a tool should surface next to the message.\n */\nexport class RuntimeRefusal extends Error {\n readonly hint: string;\n\n constructor(message: string, hint: string) {\n super(message);\n this.name = 'RuntimeRefusal';\n this.hint = hint;\n }\n}\n\n/** The hint for a refused runtime error, or a tool's own fallback otherwise. */\nexport function refusalHint(error: unknown, fallback: string): string {\n return error instanceof RuntimeRefusal ? error.hint : fallback;\n}\n\n/**\n * Every route named here runs outside the tool's process: the app's own deploy\n * pipeline, or the caller's own machine. A refused\n * caller is never pointed at another in-process route, such as saving the\n * flow and simulating it by id, which would be the same execution one step\n * later.\n */\nexport const HINT_OUT_OF_PROCESS =\n 'Build and deploy through the app with deploy_manage. To simulate, validate or bundle, use the walkerOS CLI on your own machine.';\n\n/** The refusal a tool raises when its runtime does not provide an operation. */\nexport function unavailableOperation(\n operation: 'bundle' | 'simulate' | 'push',\n): RuntimeRefusal {\n const verb =\n operation === 'bundle'\n ? 'Bundling'\n : operation === 'simulate'\n ? 'Simulating'\n : 'Running';\n return new RuntimeRefusal(\n `${verb} a flow is not available on the hosted walkerOS MCP server.`,\n HINT_OUT_OF_PROCESS,\n );\n}\n","import { isObject, type WalkerOS } from '@walkeros/core';\n\n/**\n * Saved flow references, shared by every place that recognises or reads one.\n *\n * `flow_` and `cfg_` are the reserved cloud flow/config id namespaces. The\n * pattern is anchored and limited to id characters, so a path that merely\n * starts with a prefix (`flow_../x`) is never mistaken for an id.\n */\nexport const CLOUD_ID_PATTERN = /^(flow|cfg)_[A-Za-z0-9_-]+$/;\n\nexport function isCloudId(input: string): boolean {\n return CLOUD_ID_PATTERN.test(input);\n}\n\n/**\n * The config of a flow record returned by the tool client, or `{}` when the\n * record carries none. The client seam returns an opaque shape, so this is the\n * one narrowing every reader shares.\n */\nexport function flowConfigOf(flow: unknown): WalkerOS.AnyObject {\n return isObject(flow) && isObject(flow.config) ? flow.config : {};\n}\n","import { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { BundleOutputShape } from '../schemas/output.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { resolveConfigPath } from './resolve-config-path.js';\nimport {\n refusalHint,\n unavailableOperation,\n type FlowRuntime,\n} from '../runtime/types.js';\n\nconst TITLE = 'Bundle Flow';\nconst DESCRIPTION =\n 'Bundle a walkerOS flow configuration into deployable JavaScript. ' +\n 'Resolves all destinations, sources, and transformers, then outputs ' +\n 'a tree-shaken production bundle. Returns bundle statistics.';\n\nconst inputSchema = {\n ...schemas.BundleInputShape,\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFlowBundleToolSpec(\n client: ToolClient,\n runtime: FlowRuntime,\n): ToolSpec {\n return {\n name: 'flow_bundle',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowBundleHandlerBody(client, runtime, input),\n };\n}\n\nasync function flowBundleHandlerBody(\n client: ToolClient,\n runtime: FlowRuntime,\n input: unknown,\n) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { configPath, flow, stats, output } = parsed.data;\n // Bundling compiles the config and resolves every package it names. A\n // runtime that must not do that in its process provides no `bundle`.\n if (!runtime.bundle) {\n const refusal = unavailableOperation('bundle');\n return mcpError(refusal, refusal.hint);\n }\n try {\n // Accept a cloud flow/config id as configPath, resolving it to inline JSON.\n const resolvedConfigPath = await resolveConfigPath(client, configPath);\n const result = await runtime.bundle(resolvedConfigPath, {\n flowName: flow,\n stats: stats ?? true,\n output,\n });\n\n if (!result) {\n return mcpResult(\n { success: false, message: 'Bundle produced no output' },\n {\n warnings: [\n 'The build returned no result. The flow may be empty or misconfigured.',\n ],\n next: ['Run flow_validate to check your configuration'],\n },\n );\n }\n\n return mcpResult(\n { success: true, ...result },\n {\n next: [\n 'Use flow_simulate to test',\n 'Use deploy_manage with action \"deploy\" to publish',\n ],\n },\n );\n } catch (error) {\n return mcpError(\n error,\n refusalHint(error, 'Run flow_validate for detailed error messages'),\n );\n }\n}\n\nexport function registerFlowBundleTool(\n server: McpServer,\n client: ToolClient,\n runtime: FlowRuntime,\n) {\n const spec = createFlowBundleToolSpec(client, runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: BundleOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowBundleHandlerBody(client, runtime, args),\n );\n}\n","import { z, type ZodRawShape } from 'zod';\nimport { mcpError } from '@walkeros/core';\n\n/** A tool's input as its input shape parses it, defaults applied. */\nexport type ToolInput<S extends ZodRawShape> = z.output<z.ZodObject<S>>;\n\n/**\n * Every issue as one readable line, `path: message; ...`. A raw ZodError\n * stringifies its whole issue list into `message`, so it is never passed on\n * as is.\n */\nexport function inputIssuesMessage(error: z.ZodError): string {\n return error.issues\n .map((issue) => `${issue.path.join('.') || 'input'}: ${issue.message}`)\n .join('; ');\n}\n\n/**\n * Parse, never assert: a tool spec is drivable without a transport, so its\n * handler applies the same input shape the transport validates against.\n * Input that fails it comes back as an error result.\n */\nexport function parseToolInput<S extends ZodRawShape>(\n shape: S,\n raw: unknown,\n):\n | { ok: true; data: ToolInput<S> }\n | { ok: false; error: ReturnType<typeof mcpError> } {\n const parsed = z.object(shape).safeParse(raw ?? {});\n if (!parsed.success) {\n return {\n ok: false,\n error: mcpError(new Error(inputIssuesMessage(parsed.error))),\n };\n }\n return { ok: true, data: parsed.data };\n}\n","import type { ToolClient } from '../tool-client.js';\nimport { flowConfigOf, isCloudId } from '../cloud-flow.js';\n\n/**\n * Resolve a `configPath` for tools that consume it (simulate, bundle). When it\n * is a cloud flow/config id, fetch the flow via the same client seam `flow_load`\n * uses and return its config serialized as JSON (the underlying CLI functions\n * accept inline JSON as `configPath`). Otherwise return the value unchanged so\n * file paths, URLs, and inline JSON pass through as before.\n */\nexport async function resolveConfigPath(\n client: Pick<ToolClient, 'getFlow'>,\n configPath: string,\n): Promise<string> {\n if (!isCloudId(configPath)) return configPath;\n\n const flow = await client.getFlow({ flowId: configPath });\n return JSON.stringify(flowConfigOf(flow));\n}\n","import { z } from 'zod';\nimport { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { filterValues, mcpResult, mcpError } from '@walkeros/core';\nimport type { Flow, Ingest, Simulation, WalkerOS } from '@walkeros/core';\nimport { SimulateOutputShape } from '../schemas/output.js';\nimport { FLOW_SIMULATE_DESCRIPTION } from './simulate-description.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { resolveConfigPath } from './resolve-config-path.js';\nimport { readRun, scrubbed, scrubbedError } from './egress.js';\nimport {\n refusalHint,\n unavailableOperation,\n type FlowRuntime,\n type SimulateStepType,\n} from '../runtime/types.js';\n\ninterface DestinationSummary {\n received: boolean;\n calls: number;\n payload?: unknown;\n}\n\nconst STEP_TYPES: readonly SimulateStepType[] = [\n 'source',\n 'transformer',\n 'collector',\n 'destination',\n];\n\nfunction isStepType(value: string): value is SimulateStepType {\n return STEP_TYPES.some((t) => t === value);\n}\n\nconst TITLE = 'Simulate Flow';\nconst COMMANDS: readonly [Flow.StepCommand, ...Flow.StepCommand[]] = [\n 'config',\n 'consent',\n 'user',\n 'run',\n];\n\nconst inputSchema = {\n configPath: schemas.SimulateInputShape.configPath,\n event: z\n .union([z.record(z.string(), z.unknown()), z.string()])\n .optional()\n .describe(\n \"For destinations: { name, data, consent? }; the event's consent counts \" +\n \"toward the destination's consent requirement, on top of state.consent. \" +\n \"With command: the command's data, e.g. { marketing: true } for consent. \" +\n 'For sources: { content, trigger? } where content is the walkerOS event ' +\n \"{ name, data }. A web source's page URL goes in trigger.options.url \" +\n '(default http://localhost). ' +\n 'Can also be a JSON string or file path.',\n ),\n flow: schemas.SimulateInputShape.flow,\n platform: schemas.SimulateInputShape.platform,\n // Override the (optional) CLI `step` shape: the simulate handler hard-requires\n // a target step (no all-steps mode), so the registered schema must be honest.\n step: z\n .string()\n .describe(\n 'Required. Target step as \"type.name\", e.g. \"source.demo\", \"collector.default\", \"destination.gtag\", \"transformer.router\". ' +\n 'A collector step runs enrichment and then collector.next, returning every event the destinations would receive (none after a stop).',\n ),\n verbose: z\n .boolean()\n .optional()\n .describe('Include full payload per destination (default: false)'),\n ingest: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\n 'Pipeline context a step reads via ctx.ingest, e.g. { url } for a ' +\n 'request decoder or { ip, userAgent } for a conversion API. Used for ' +\n 'transformer, collector and destination steps (their before chains ' +\n 'included); _meta is always set by the runtime.',\n ),\n state: z\n .object({\n consent: z.record(z.string(), z.boolean()).optional(),\n user: z.record(z.string(), z.unknown()).optional(),\n globals: z.record(z.string(), z.unknown()).optional(),\n timing: z.number().optional(),\n })\n .optional()\n .describe(\n 'Collector state the step starts from. consent: every step (starts a ' +\n 'destination that requires consent and feeds its consent check; for a ' +\n 'source, the consent a consent-gated source waits for). ' +\n 'user/globals/timing: collector steps, seeded before enrichment runs.',\n ),\n command: z\n .enum(COMMANDS)\n .optional()\n .describe(\n 'Destination steps only: run this collector command with event as its ' +\n 'data instead of pushing it, as a step example with command does.',\n ),\n};\n\nconst annotations = {\n // Simulation downloads the packages a config names and runs caller-controlled\n // flow code in process. Destinations are mocked, but that code is not, so the\n // hints stay conservative: side effects possible, repeat calls not assumed\n // safe, external systems reachable.\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFlowSimulateToolSpec(\n client: ToolClient,\n runtime: FlowRuntime,\n): ToolSpec {\n return {\n name: 'flow_simulate',\n title: TITLE,\n description: FLOW_SIMULATE_DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowSimulateHandlerBody(client, runtime, input),\n };\n}\n\n/** Plain values kept as walkerOS properties; values no property can hold dropped. */\nfunction toProperties(\n value: Record<string, unknown> | undefined,\n): WalkerOS.Properties | undefined {\n if (!value) return undefined;\n const properties: WalkerOS.Properties = {};\n for (const [key, entry] of Object.entries(value)) {\n const property = filterValues(entry);\n if (property !== undefined) properties[key] = property;\n }\n return properties;\n}\n\nasync function flowSimulateHandlerBody(\n client: ToolClient,\n runtime: FlowRuntime,\n input: unknown,\n) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n configPath,\n event,\n flow,\n platform,\n step,\n verbose,\n ingest,\n state,\n command,\n } = parsed.data;\n // Simulation compiles the config and imports the bundle, running caller\n // controlled flow code. A runtime that must not do that in its process\n // provides no `simulate`, whatever the input looks like.\n if (!runtime.simulate) {\n const refusal = unavailableOperation('simulate');\n return mcpError(refusal, refusal.hint);\n }\n let known: string[] = [];\n try {\n if (!event) {\n throw new Error(\n 'event is required. For sources provide { content, trigger? }, for destinations provide { name, data }.',\n );\n }\n\n if (!step) {\n throw new Error(\n 'step is required. Specify a target like \"source.browser\", \"destination.gtag\", or \"transformer.demo\".',\n );\n }\n\n // Resolve string event input (JSON string)\n let resolvedEvent: unknown = event;\n if (typeof event === 'string') {\n try {\n resolvedEvent = JSON.parse(event);\n } catch {\n throw new Error(\n 'Event string must be valid JSON. Got: ' + event.substring(0, 50),\n );\n }\n }\n\n // Parse step into type and id\n const dotIndex = step.indexOf('.');\n if (dotIndex === -1) {\n throw new Error(\n `Invalid step format \"${step}\". Use \"type.name\" (e.g. \"source.browser\", \"destination.gtag\").`,\n );\n }\n const stepType = step.substring(0, dotIndex);\n const stepId = step.substring(dotIndex + 1);\n\n if (!isStepType(stepType)) {\n throw new Error(\n `Unknown step type \"${stepType}\". Use \"source\", \"collector\", \"transformer\", or \"destination\".`,\n );\n }\n\n if (command !== undefined && stepType !== 'destination') {\n throw new Error('command applies to destination steps only.');\n }\n\n // Accept a cloud flow/config id as configPath, resolving it to inline JSON.\n const resolvedConfigPath = await resolveConfigPath(client, configPath);\n // Read once: the simulation runs on exactly the config whose secrets\n // mask the result.\n const run = await readRun(runtime, resolvedConfigPath);\n known = run.knownSecrets;\n\n const result: Simulation.Result = await runtime.simulate(\n resolvedConfigPath,\n {\n stepType,\n stepId,\n event: resolvedEvent,\n flow,\n ingest,\n state: state && {\n consent: state.consent,\n user: toProperties(state.user),\n globals: toProperties(state.globals),\n timing: state.timing,\n },\n command,\n config: run.config,\n },\n );\n\n const success = !result.error;\n const errorMessage = result.error?.message;\n\n // Source simulation: captured events are result.events, the source's\n // own walker commands its `elb` calls. Mock-env calls stay verbose-only.\n if (result.step === 'source') {\n const eventCount = result.events.length;\n const commandCount = result.calls.filter(\n (call) => call.fn === 'elb',\n ).length;\n const summary =\n `Source captured ${eventCount} event${eventCount !== 1 ? 's' : ''}` +\n ` and ${commandCount} command${commandCount !== 1 ? 's' : ''}`;\n const shownCalls = verbose\n ? result.calls\n : result.calls.filter((call) => call.fn === 'elb');\n\n return mcpResult(\n scrubbed(\n {\n success,\n error: errorMessage,\n summary,\n capturedEvents: result.events,\n ...(shownCalls.length > 0 ? { calls: shownCalls } : {}),\n duration: result.duration,\n },\n known,\n ),\n {\n next:\n eventCount + commandCount > 0\n ? [\n 'Use flow_simulate with a destination step to test downstream processing',\n ]\n : [\n 'Check source package examples with package_get, verify trigger type matches',\n ],\n },\n );\n }\n\n // Transformer simulation: surface the transformed events\n if (result.step === 'transformer') {\n return mcpResult(\n scrubbed(\n {\n success,\n error: errorMessage,\n summary: `Transformer processed event`,\n capturedEvents: result.events,\n duration: result.duration,\n },\n known,\n ),\n {\n next: ['Use flow_bundle to build for production'],\n },\n );\n }\n\n // Collector simulation: surface the enriched event\n if (result.step === 'collector') {\n return mcpResult(\n scrubbed(\n {\n success,\n error: errorMessage,\n summary: `Collector enriched event`,\n capturedEvents: result.events,\n duration: result.duration,\n },\n known,\n ),\n {\n next: ['Use flow_simulate with a destination step to test delivery'],\n },\n );\n }\n\n // Destination simulation: count intercepted env calls, key by step name\n const destinations: Record<string, DestinationSummary> = {};\n const callCount = result.calls.length;\n const destSummary: DestinationSummary = {\n received: callCount > 0,\n calls: callCount,\n };\n if (verbose && callCount > 0) {\n destSummary.payload = result.calls;\n }\n destinations[result.name] = destSummary;\n\n const destCount = Object.keys(destinations).length;\n const receivedCount = Object.values(destinations).filter(\n (d) => d.received,\n ).length;\n\n const warnings: string[] = [];\n if (receivedCount === 0 && success) warnings.push(notReceived(result));\n\n const resultObj = {\n success,\n error: errorMessage,\n summary: `${receivedCount}/${destCount} destinations received the event`,\n destinations,\n ...(result.skipped ? { skipped: result.skipped } : {}),\n duration: result.duration,\n };\n\n return mcpResult(scrubbed(resultObj, known), {\n next: ['Use flow_bundle to build for production'],\n ...(warnings.length > 0 ? { warnings } : {}),\n });\n } catch (error) {\n const hint = 'Run flow_validate for detailed error messages';\n return scrubbedError(mcpError(error, refusalHint(error, hint)), known);\n }\n}\n\nfunction keysOf(consent: WalkerOS.Consent | undefined): string {\n const keys = Object.entries(consent ?? {})\n .filter(([, granted]) => granted)\n .map(([key]) => key);\n return keys.length > 0 ? keys.join(', ') : 'none';\n}\n\n/** Why a destination received nothing, from the result's own `skipped`. */\nfunction notReceived(result: Simulation.Result): string {\n const { skipped } = result;\n if (skipped?.reason === 'pending') {\n const require = skipped.require ?? [];\n const waits = require.length ? require.join(', ') : 'its require';\n const advice = require.includes('consent')\n ? 'pass state.consent (e.g. { functional: true }) to start it.'\n : `it starts once the flow provides ${waits}; a simulation cannot seed that.`;\n return `Destination waits for ${waits} (require) and never started: ${advice}`;\n }\n if (skipped?.reason === 'consent') {\n return (\n `Consent skip: requires ${keysOf(skipped.required)}; granted ${keysOf(skipped.granted)}. ` +\n \"Grant it in state.consent or in the event's consent.\"\n );\n }\n return (\n 'Destination made no calls. Common causes: ' +\n '(1) mapping rules do not match the event name or ignore it, ' +\n '(2) policy redacted required fields, ' +\n '(3) a before chain stopped the event.'\n );\n}\n\nexport function registerFlowSimulateTool(\n server: McpServer,\n client: ToolClient,\n runtime: FlowRuntime,\n) {\n const spec = createFlowSimulateToolSpec(client, runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: SimulateOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowSimulateHandlerBody(client, runtime, args),\n );\n}\n","/**\n * The flow_simulate tool description, shared by the registered tool and the\n * declarative `TOOL_DEFINITIONS` registry (which must not import the tool's\n * node-only code).\n */\nexport const FLOW_SIMULATE_DESCRIPTION =\n 'Simulate events through a walkerOS flow without making real API calls. ' +\n 'For destinations: event is a walkerOS event { name: \"entity action\", data: {...} }. ' +\n 'For sources: event is { content, trigger?: { type?, options? } }, where content is the ' +\n 'walkerOS event { name: \"entity action\", data: {...} }. Only the simulated source starts. ' +\n 'step (required) targets the step to simulate, e.g. \"destination.gtag\". ' +\n 'Use flow_examples to discover available test data. ' +\n 'A destination simulation starts only its target destination. ' +\n \"A source's own walker commands (e.g. a CMP's walker consent) are returned as elb calls. \" +\n 'Consent: state.consent is the collector consent the step starts from ' +\n '(any step; a consent-gated source such as the session source waits for it). A destination with ' +\n 'require: [\"consent\"] waits until consent is present, so pass state.consent to start it; ' +\n 'a destination with consent: { marketing: true } receives an event only when that ' +\n \"consent is granted in state.consent or in the event's own consent. \" +\n 'When a destination sends nothing, the result says why (waiting for its require, or a consent skip). ' +\n 'command runs a step example with command (e.g. \"consent\") on a destination: ' +\n \"event is the command's data, state.consent still applies first. \" +\n 'Mapping transforms event names and data at the destination level. ' +\n 'Policy redacts or injects fields before mapping runs.';\n","import type { PushResult } from '@walkeros/cli';\nimport { isObject, mcpError, mcpResult } from '@walkeros/core';\nimport { scrubJson, scrubSecrets } from '@walkeros/core/node';\nimport type { FlowRuntime, LoadedRun } from '../runtime/types.js';\n\n/**\n * Simulate and push results carry recorded vendor calls, network requests and\n * vendor responses whose values can hold credentials. They egress like a log\n * line: `scrubJson` (masking the values of the secrets the flow references,\n * `known`, and credential patterns), then parse back into the structured\n * result.\n */\nexport function scrubbed(\n result: Record<string, unknown>,\n known: readonly string[],\n): Record<string, unknown> {\n const parsed = parseObject(scrubJson(result, { known }));\n if (!parsed) throw new Error('Result could not be redacted as JSON.');\n return parsed;\n}\n\n/** An error response as built by `mcpError`; a stub may lack the structured copy. */\ntype ErrorResponse = Omit<ReturnType<typeof mcpError>, 'structuredContent'> & {\n structuredContent?: Record<string, unknown>;\n};\n\n/**\n * The error response egresses the same way: its structured copy is scrubbed,\n * and the text is that copy serialized (as `mcpError` builds it), so it stays\n * valid JSON. Without a structured copy that scrubs, each text part is\n * scrubbed as a line instead, so the error message is never lost.\n */\nexport function scrubbedError(\n response: ErrorResponse,\n known: readonly string[],\n): ReturnType<typeof mcpError> {\n let structuredContent: Record<string, unknown> | undefined;\n try {\n if (response.structuredContent)\n structuredContent = scrubbed(response.structuredContent, known);\n } catch {\n structuredContent = undefined;\n }\n if (structuredContent) {\n return {\n ...response,\n content: [{ type: 'text', text: JSON.stringify(structuredContent) }],\n structuredContent,\n };\n }\n return {\n ...response,\n content: response.content.map((part) => ({\n ...part,\n text: scrubSecrets(part.text, { known }),\n })),\n structuredContent: { error: 'The error could not be redacted.' },\n };\n}\n\n/**\n * A push result as it egresses: scrubbed and parsed back. `success` and\n * `duration` come from the CLI, never from a vendor, and stay as they are so\n * the output schema always holds. A push already happened, so this never\n * throws: if the scrubbed text does not parse, the text alone carries the\n * result and the structured copy keeps the scalars.\n */\nexport function scrubbedPushResult(\n result: PushResult,\n known: readonly string[],\n): ReturnType<typeof mcpResult> {\n const text = scrubJson(result, { known, space: 2 });\n const parsed = parseObject(text);\n if (parsed)\n return mcpResult({\n ...parsed,\n success: result.success,\n duration: result.duration,\n });\n return {\n content: [{ type: 'text', text }],\n structuredContent: { success: result.success, duration: result.duration },\n };\n}\n\nfunction parseObject(text: string): Record<string, unknown> | undefined {\n try {\n const parsed: unknown = JSON.parse(text);\n return isObject(parsed) ? parsed : undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * The run input read once: `loadRun`, else, on a runtime without it, the\n * values its `knownSecrets` returns. A failed read rejects, so the caller\n * stops instead of egressing with pattern masking only.\n */\nexport async function readRun(\n runtime: FlowRuntime,\n input: string,\n): Promise<LoadedRun> {\n if (runtime.loadRun) return runtime.loadRun(input);\n return {\n knownSecrets: runtime.knownSecrets ? await runtime.knownSecrets(input) : [],\n };\n}\n","import { z } from 'zod';\nimport type { PushResult } from '@walkeros/cli';\nimport { schemas } from '@walkeros/cli/dev';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport { mcpError } from '@walkeros/core';\nimport { PushOutputShape } from '../schemas/output.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { readRun, scrubbedError, scrubbedPushResult } from './egress.js';\nimport {\n refusalHint,\n unavailableOperation,\n type FlowRuntime,\n} from '../runtime/types.js';\n\nconst TITLE = 'Push Events';\nconst DESCRIPTION =\n 'Push a real event through a walkerOS flow to actual destinations. ' +\n 'Makes real API calls to real endpoints. ' +\n 'Best suited for server-side flows — web flows should use flow_simulate for testing.';\n\nconst inputSchema = {\n configPath: schemas.PushInputShape.configPath,\n event: z\n .record(z.string(), z.unknown())\n .describe(\n 'Event object, e.g. { name: \"page view\", data: { title: \"Home\" } }',\n ),\n flow: schemas.PushInputShape.flow,\n platform: schemas.PushInputShape.platform,\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFlowPushToolSpec(runtime: FlowRuntime): ToolSpec {\n return {\n name: 'flow_push',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowPushHandlerBody(runtime, input),\n };\n}\n\nasync function flowPushHandlerBody(\n runtime: FlowRuntime,\n input: unknown,\n): Promise<CallToolResult> {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { configPath, event, flow, platform } = parsed.data;\n // Push compiles the config, imports it, and makes real outbound calls. A\n // runtime that must not do that in its process provides no `push`.\n if (!runtime.push) {\n const refusal = unavailableOperation('push');\n return mcpError(refusal, refusal.hint);\n }\n // Push results can carry vendor requests and responses: they egress with\n // the flow's secret values and credential patterns masked. The config is\n // read once, so the push runs on exactly the config whose secrets mask the\n // result; a config that cannot be read stops the push.\n let known: string[] = [];\n try {\n const run = await readRun(runtime, configPath);\n known = run.knownSecrets;\n const result: PushResult = await runtime.push(configPath, event, {\n flow,\n platform,\n config: run.config,\n });\n\n if (!result.success) {\n return scrubbedError(\n mcpError(\n new Error(result.error || 'Push failed'),\n 'Check destination configuration and connectivity.',\n ),\n known,\n );\n }\n\n return scrubbedPushResult(result, known);\n } catch (error) {\n return scrubbedError(\n mcpError(\n error,\n refusalHint(\n error,\n 'Check configPath and event format. For web flows, use flow_simulate.',\n ),\n ),\n known,\n );\n }\n}\n\nexport function registerFlowPushTool(server: McpServer, runtime: FlowRuntime) {\n const spec = createFlowPushToolSpec(runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: PushOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowPushHandlerBody(runtime, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { fetchPackage, mcpResult, mcpError } from '@walkeros/core';\nimport type { Flow, WalkerOSPackage } from '@walkeros/core';\nimport { resolveExportName, selectDevExamples } from '@walkeros/cli';\nimport { ExamplesListOutputShape } from '../schemas/output.js';\nimport { getPackageBaseUrl, CLIENT_HEADER } from '../catalog.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport { isFlowJson, stepExamplesOf, type StepExampleView } from './narrow.js';\nimport {\n HINT_OUT_OF_PROCESS,\n refusalHint,\n type FlowRuntime,\n} from '../runtime/types.js';\n\n/** Upper bound on distinct package example lookups per call. */\nexport const MAX_PACKAGE_LOOKUPS = 25;\n\nconst TITLE = 'Flow Examples';\nconst DESCRIPTION =\n 'List all step examples in a walkerOS flow configuration. ' +\n 'Shows example names, step locations, and in/out shapes. ' +\n 'Inline examples on a step take precedence; steps without inline examples ' +\n 'fall back to the examples shipped by their referenced package. ' +\n 'Each result is tagged with its source (\"inline\" or \"package\"). ' +\n 'On the hosted server configPath accepts only inline JSON or a saved flow id (flow_ or cfg_), no file paths or URLs. ' +\n 'Use this to discover available test fixtures and simulation data.';\n\nconst inputSchema = {\n configPath: z\n .string()\n .min(1)\n .describe(\n 'Inline JSON string, file path, or URL of a flow configuration (hosted server: inline JSON or a saved flow id only)',\n ),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n step: z\n .string()\n .optional()\n .describe('Filter to a specific step (e.g., \"destination.gtag\")'),\n full: z\n .boolean()\n .optional()\n .describe(\n 'Return full in/out/mapping data for each example (default: false, returns metadata only)',\n ),\n includeHidden: z\n .boolean()\n .optional()\n .describe(\n 'Include examples marked public: false (default: false). Set true for test/debug discovery.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\nexport function createFlowExamplesToolSpec(runtime: FlowRuntime): ToolSpec {\n return {\n name: 'flow_examples',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowExamplesHandlerBody(runtime, input),\n };\n}\n\nasync function flowExamplesHandlerBody(runtime: FlowRuntime, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { configPath, flow, step, full, includeHidden } = parsed.data;\n try {\n const rawConfig = await runtime.load(configPath);\n if (!isFlowJson(rawConfig)) {\n throw new Error('Config is not a flow config: it has no flows object.');\n }\n\n // Resolve flow name\n const flowNames = Object.keys(rawConfig.flows || {});\n const flowName =\n flow || (flowNames.length === 1 ? flowNames[0] : undefined);\n\n if (!flowName) {\n throw new Error(\n `Multiple flows found. Specify flow parameter. Available: ${flowNames.join(', ')}`,\n );\n }\n\n const flowSettings = rawConfig.flows[flowName];\n if (!flowSettings) {\n throw new Error(`Flow \"${flowName}\" not found`);\n }\n\n // Collect all examples\n type ExampleItem = {\n step: string;\n stepType: string;\n stepName: string;\n exampleName: string;\n source: 'inline' | 'package';\n title?: string;\n description?: string;\n public?: boolean;\n hasIn: boolean;\n hasOut: boolean;\n hasMapping: boolean;\n hasTrigger: boolean;\n in?: unknown;\n out?: unknown;\n mapping?: unknown;\n trigger?: unknown;\n };\n const examples: ExampleItem[] = [];\n\n const toItems = (\n stepExamples: Record<string, StepExampleView>,\n type: string,\n name: string,\n source: 'inline' | 'package',\n ): ExampleItem[] => {\n const items: ExampleItem[] = [];\n for (const [exName, ex] of Object.entries(stepExamples)) {\n if (!includeHidden && ex.public === false) continue;\n items.push({\n step: `${type}.${name}`,\n stepType: type,\n stepName: name,\n exampleName: exName,\n source,\n title: ex.title,\n description: ex.description,\n public: ex.public,\n hasIn: ex.in !== undefined,\n hasOut: ex.out !== undefined,\n hasMapping: ex.mapping !== undefined,\n hasTrigger: ex.trigger !== undefined,\n ...(full\n ? {\n in: ex.in,\n out: ex.out,\n mapping: ex.mapping,\n trigger: ex.trigger,\n }\n : {}),\n });\n }\n return items;\n };\n\n // Pull a referenced package's shipped examples via the same path\n // package_get uses. A failed fetch must not break the whole tool: the\n // step is skipped and inline examples from other steps still return.\n const baseUrl = getPackageBaseUrl();\n const loadPackage = async (\n packageName: string,\n ): Promise<WalkerOSPackage | undefined> => {\n try {\n return await fetchPackage(packageName, {\n baseUrl,\n client: CLIENT_HEADER,\n });\n } catch {\n // Swallow: graceful fallback skip for this package.\n }\n return undefined;\n };\n\n // One lookup per distinct package, capped per call, so a config naming\n // many packages cannot fan out into an unbounded number of fetches.\n const packageLookups = new Map<\n string,\n Promise<WalkerOSPackage | undefined>\n >();\n let skippedPackages = false;\n const skippedExamples: string[] = [];\n const packageFor = (\n packageName: string,\n ): Promise<WalkerOSPackage | undefined> => {\n const existing = packageLookups.get(packageName);\n if (existing) return existing;\n if (packageLookups.size >= MAX_PACKAGE_LOOKUPS) {\n skippedPackages = true;\n return Promise.resolve(undefined);\n }\n const lookup = loadPackage(packageName);\n packageLookups.set(packageName, lookup);\n return lookup;\n };\n\n // The step examples of the step's own export: a multi-export package\n // ships `exportExamples` keyed by export name, the same rule simulate\n // uses (an export missing from the map has no examples).\n const stepExamplesFor = (\n info: WalkerOSPackage,\n exportName: string | undefined,\n ): ReturnType<typeof stepExamplesOf> => {\n const selected = selectDevExamples(\n { examples: info.examples, exportExamples: info.exportExamples },\n exportName,\n );\n return stepExamplesOf(selected?.step);\n };\n\n const stepTypes = [\n { key: 'sources' as const, type: 'source' as const },\n { key: 'transformers' as const, type: 'transformer' as const },\n { key: 'destinations' as const, type: 'destination' as const },\n ];\n\n for (const { key, type } of stepTypes) {\n const refs = flowSettings[key] || {};\n for (const [name, ref] of Object.entries(refs)) {\n // Apply step filter\n if (step && `${type}.${name}` !== step) continue;\n\n // Inline examples take precedence over package-shipped ones.\n if (ref.examples) {\n examples.push(...toItems(ref.examples, type, name, 'inline'));\n continue;\n }\n\n // No inline examples: fall back to the referenced package's shipped\n // examples (only for refs that actually name a package).\n if (!ref.package) continue;\n const info = await packageFor(ref.package);\n if (!info) continue;\n const { exportName } = resolveExportName(flowSettings, type, name);\n const packageExamples = stepExamplesFor(info, exportName);\n if (!packageExamples) continue;\n examples.push(\n ...toItems(packageExamples.examples, type, name, 'package'),\n );\n for (const exampleName of packageExamples.skipped)\n skippedExamples.push(`${type}.${name}.${exampleName}`);\n }\n }\n\n const result = {\n flow: flowName,\n count: examples.length,\n examples,\n };\n\n const warnings: string[] = [];\n if (examples.length === 0) {\n warnings.push(\n 'No examples found. Add examples to step entries, or reference a package that ships examples (see package_get).',\n );\n }\n if (skippedExamples.length > 0) {\n warnings.push(\n `Skipped ${skippedExamples.length} package example(s) that do not match the step example schema: ${skippedExamples.join(', ')}.`,\n );\n }\n if (skippedPackages) {\n warnings.push(\n `Package examples were looked up for the first ${MAX_PACKAGE_LOOKUPS} packages only. Use step to narrow the result.`,\n );\n }\n const hints: { next: string[]; warnings?: string[] } = {\n next: [\n runtime.simulate\n ? 'Use flow_simulate with step and event to simulate'\n : HINT_OUT_OF_PROCESS,\n ],\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n return mcpResult(result, hints);\n } catch (error) {\n return mcpError(\n error,\n refusalHint(error, 'Check configPath — expected a flow.json file'),\n );\n }\n}\n\nexport function registerFlowExamplesTool(\n server: McpServer,\n runtime: FlowRuntime,\n) {\n const spec = createFlowExamplesToolSpec(runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema: ExamplesListOutputShape,\n annotations: spec.annotations,\n },\n (args) => flowExamplesHandlerBody(runtime, args),\n );\n}\n","import { apiRequest } from '@walkeros/cli';\nimport type { ResponseJson } from '@walkeros/cli';\n\n// __VERSION__ is replaced at build time by tsup's `define` (see tsup.config.ts).\n// In tests, it's set on globalThis (see src/__tests__/support/version.ts).\ndeclare const __VERSION__: string;\n\nconst NPM_SEARCH_URL = 'https://registry.npmjs.org/-/v1/search';\nconst JSDELIVR_BASE = 'https://cdn.jsdelivr.net/npm';\nconst WALKEROS_JSON_PATH = 'dist/walkerOS.json';\nconst CACHE_TTL = 5 * 60 * 1000;\n\nexport const CLIENT_HEADER = 'walkeros-mcp/' + __VERSION__;\n\n/**\n * Resolve the walkerOS app base URL for MCP outbound calls.\n *\n * Env-only by design: the MCP runs in an editor with explicit `.mcp.json`\n * env. No config-file precedence (which is what `@walkeros/cli`'s\n * `resolveAppUrl()` does for the `walkeros` CLI binary). Hard-cut:\n * `APP_URL` is no longer recognized.\n *\n * Lives here (not in tools/package.ts) because both the package tools and the\n * catalog resources need to resolve the same app-primary base URL. This is an\n * in-package helper, not a cross-package registry.\n */\nexport function getPackageBaseUrl(): string | undefined {\n return process.env.WALKEROS_APP_URL || undefined;\n}\n\nexport interface CatalogEntry {\n name: string;\n version: string;\n description?: string;\n type: string;\n platform: string[];\n}\n\nexport interface CatalogResult {\n entries: CatalogEntry[];\n warnings: string[];\n}\n\n/**\n * Provenance of the most recent `fetchCatalog` call. Module-scoped and\n * last-call-wins: the stdio MCP is a single process, so the diagnostics tool\n * reads which source (`app` vs `npm` fallback) served the last catalog fetch,\n * how many entries it produced, and whether any were dropped (partial).\n * `undefined` until the first fetch.\n */\nexport interface LastCatalogFetchInfo {\n source: 'app' | 'npm';\n count: number;\n partial: boolean;\n timestamp: number;\n}\n\nlet lastFetchInfo: LastCatalogFetchInfo | undefined;\n\nexport function getLastCatalogSource(): LastCatalogFetchInfo | undefined {\n return lastFetchInfo;\n}\n\n// Cache keyed by effective source (app baseUrl or 'npm'). The tool reads\n// app-primary and the resources read npm-primary; a shared cache let one\n// source's result leak into the other. Only complete, non-empty results are\n// cached, so a transient empty/partial fetch never freezes for the TTL.\nconst cache = new Map<string, { entries: CatalogEntry[]; timestamp: number }>();\n\nexport function clearCatalogCache() {\n cache.clear();\n}\n\nexport function normalizePlatform(platform?: unknown): string[] {\n if (platform == null) return [];\n if (typeof platform === 'string') {\n return platform === 'universal' ? ['web', 'server'] : [platform];\n }\n if (Array.isArray(platform)) {\n return platform.filter((v): v is string => typeof v === 'string');\n }\n return [];\n}\n\ninterface SourceResult {\n entries: CatalogEntry[];\n complete: boolean;\n // Number of packages the source listed before enrichment, so the caller can\n // compute how many were dropped (listed minus enriched).\n requested: number;\n}\n\nexport async function fetchCatalog(filters?: {\n type?: string;\n platform?: string;\n baseUrl?: string;\n}): Promise<CatalogResult> {\n const sourceKey = filters?.baseUrl ?? 'npm';\n const warnings: string[] = [];\n\n const cached = cache.get(sourceKey);\n if (cached && Date.now() - cached.timestamp < CACHE_TTL) {\n lastFetchInfo = {\n source: filters?.baseUrl ? 'app' : 'npm',\n count: cached.entries.length,\n partial: false,\n timestamp: Date.now(),\n };\n return { entries: applyFilters(cached.entries, filters), warnings };\n }\n\n let result: SourceResult;\n // Which source actually served. Starts as the requested source, flips to\n // 'npm' when an app fetch fails over to the npm fallback.\n let servedBy: 'app' | 'npm' = filters?.baseUrl ? 'app' : 'npm';\n if (filters?.baseUrl) {\n try {\n result = await fetchCatalogFrom(filters.baseUrl, filters);\n } catch {\n warnings.push(\n 'app catalog endpoint unavailable, fell back to npm; results may be incomplete',\n );\n servedBy = 'npm';\n try {\n result = await fetchFromNpm();\n } catch {\n lastFetchInfo = {\n source: 'npm',\n count: 0,\n partial: true,\n timestamp: Date.now(),\n };\n return { entries: [], warnings };\n }\n }\n } else {\n try {\n result = await fetchFromNpm();\n } catch {\n lastFetchInfo = {\n source: 'npm',\n count: 0,\n partial: true,\n timestamp: Date.now(),\n };\n return { entries: [], warnings };\n }\n }\n\n const dropped = result.requested - result.entries.length;\n if (dropped > 0) {\n warnings.push(\n `${dropped} package(s) could not be enriched and were omitted`,\n );\n }\n\n lastFetchInfo = {\n source: servedBy,\n count: result.entries.length,\n partial: !result.complete,\n timestamp: Date.now(),\n };\n\n // Only freeze a complete, non-empty result. Empty or partial fetches must\n // retry on the next call rather than serve a stale shortfall for the TTL.\n if (result.entries.length > 0 && result.complete) {\n cache.set(sourceKey, { entries: result.entries, timestamp: Date.now() });\n }\n\n return { entries: applyFilters(result.entries, filters), warnings };\n}\n\nasync function fetchCatalogFrom(\n baseUrl: string,\n filters?: { type?: string; platform?: string },\n): Promise<SourceResult> {\n const res = await apiRequest('GET /api/packages', {\n auth: 'none',\n baseUrl,\n query: {\n type: filters?.type || undefined,\n platform: filters?.platform || undefined,\n },\n signal: AbortSignal.timeout(15000),\n headers: { 'X-Walkeros-Client': CLIENT_HEADER },\n });\n if (!res.ok) throw new Error(`Catalog fetch failed: ${res.status}`);\n\n const data: ResponseJson<'GET /api/packages', 200> = await res.json();\n const entries: CatalogEntry[] = data.catalog;\n return { entries, complete: entries.length > 0, requested: entries.length };\n}\n\nasync function fetchFromNpm(): Promise<SourceResult> {\n const res = await fetch(`${NPM_SEARCH_URL}?text=@walkeros/&size=250`, {\n signal: AbortSignal.timeout(10000),\n headers: { 'X-Walkeros-Client': CLIENT_HEADER },\n });\n if (!res.ok) throw new Error(`npm search failed: ${res.status}`);\n\n const data = (await res.json()) as {\n objects: Array<{\n package: { name: string; version: string; description?: string };\n }>;\n };\n\n const requested = data.objects.length;\n\n const metaResults = await Promise.allSettled(\n data.objects.map((obj) => enrichWithMeta(obj.package)),\n );\n\n const entries = metaResults\n .filter(\n (r): r is PromiseFulfilledResult<CatalogEntry | undefined> =>\n r.status === 'fulfilled',\n )\n .map((r) => r.value)\n .filter((entry): entry is CatalogEntry => entry !== undefined);\n\n // A non-empty npm list with fewer enriched entries means jsdelivr silently\n // dropped some packages; treat that as incomplete so it is not cached.\n const complete = requested === 0 || entries.length === requested;\n return { entries, complete, requested };\n}\n\nasync function enrichWithMeta(pkg: {\n name: string;\n version: string;\n description?: string;\n}): Promise<CatalogEntry | undefined> {\n try {\n const res = await fetch(\n `${JSDELIVR_BASE}/${pkg.name}@${pkg.version}/${WALKEROS_JSON_PATH}`,\n {\n signal: AbortSignal.timeout(5000),\n headers: { 'X-Walkeros-Client': CLIENT_HEADER },\n },\n );\n if (!res.ok) return undefined;\n\n const json = (await res.json()) as { $meta?: Record<string, unknown> };\n const meta = json.$meta;\n if (!meta || typeof meta.type !== 'string') return undefined;\n\n return {\n name: pkg.name,\n version: pkg.version,\n description: pkg.description,\n type: meta.type,\n platform: normalizePlatform(meta.platform),\n };\n } catch {\n return undefined;\n }\n}\n\nfunction applyFilters(\n entries: CatalogEntry[],\n filters?: { type?: string; platform?: string },\n): CatalogEntry[] {\n let results = entries;\n if (filters?.type) {\n results = results.filter((e) => e.type === filters.type);\n }\n if (filters?.platform) {\n // Empty platform means platform-agnostic → matches any filter\n results = results.filter(\n (e) => e.platform.length === 0 || e.platform.includes(filters.platform!),\n );\n }\n return results;\n}\n","/**\n * Structural reads of values the tools receive untyped: app responses\n * (`ToolClient` returns `unknown`) and loaded configs. Each reader checks the\n * shape it returns, so a field that is not what a tool expects reads as\n * absent instead of being asserted into place.\n */\nimport type { Flow } from '@walkeros/core';\nimport { schemas, type z } from '@walkeros/core/dev';\n\n/** A plain JSON object. */\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** A string field of an object, absent when it is not a string. */\nexport function stringField(value: unknown, key: string): string | undefined {\n if (!isRecord(value)) return undefined;\n const field = value[key];\n return typeof field === 'string' ? field : undefined;\n}\n\n/** An object field of an object, absent when it is not an object. */\nexport function recordField(\n value: unknown,\n key: string,\n): Record<string, unknown> | undefined {\n if (!isRecord(value)) return undefined;\n const field = value[key];\n return isRecord(field) ? field : undefined;\n}\n\n/** The fields of an object response to spread into a result; none otherwise. */\nexport function fieldsOf(value: unknown): Record<string, unknown> {\n return isRecord(value) ? value : {};\n}\n\n/**\n * A flow config (`Flow.Json`): an object with a `flows` object, the same\n * shallow check the CLI's push makes. Every consumer passes it on to the CLI,\n * which validates the config in depth.\n */\nexport function isFlowJson(value: unknown): value is Flow.Json {\n return isRecord(value) && isRecord(value.flows);\n}\n\n/** A step example as core's `StepExampleSchema` reads it. */\nexport type StepExampleView = z.infer<\n typeof schemas.FlowSchemas.StepExampleSchema\n>;\n\n/**\n * The step examples of an object, each checked with core's\n * `StepExampleSchema`. Names that fail it are returned as `skipped`, so a\n * caller reports them instead of dropping them unseen.\n */\nexport function stepExamplesOf(\n value: unknown,\n):\n | { examples: Record<string, StepExampleView>; skipped: string[] }\n | undefined {\n if (!isRecord(value)) return undefined;\n const examples: Record<string, StepExampleView> = {};\n const skipped: string[] = [];\n for (const [name, example] of Object.entries(value)) {\n const parsed = schemas.FlowSchemas.StepExampleSchema.safeParse(example);\n if (parsed.success) examples[name] = parsed.data;\n else skipped.push(name);\n }\n return { examples, skipped };\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { fetchPackage, mcpResult, mcpError } from '@walkeros/core';\nimport { mergeConfigSchema } from '@walkeros/core/dev';\nimport {\n fetchCatalog,\n normalizePlatform,\n getPackageBaseUrl,\n CLIENT_HEADER,\n} from '../catalog.js';\n\nimport type { ToolSpec } from '../tool-spec.js';\nimport { recordField, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\n\n// `getPackageBaseUrl` lives in ../catalog.js because both these tools and the\n// catalog resources resolve the same app-primary base URL. Re-exported here so\n// existing importers of `tools/package.js` keep working.\nexport { getPackageBaseUrl };\n\n// ---------- package_search ----------\n\nconst SEARCH_TITLE = 'Search Package';\nconst SEARCH_DESCRIPTION =\n 'Start here for package discovery. Never guess package names: use this tool first to find exact names. ' +\n 'Without package name: returns catalog filtered by type/platform. ' +\n 'With package name: returns metadata, hint keys, and example summaries.';\n\nconst searchInputSchema = {\n package: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Exact npm package name for detailed lookup (e.g., @walkeros/web-destination-snowplow)',\n ),\n type: z\n .enum(['source', 'destination', 'transformer', 'store'])\n .optional()\n .describe('Filter by package type (browse mode)'),\n platform: z\n .enum(['web', 'server'])\n .optional()\n .describe('Filter by platform (browse mode, includes universal packages)'),\n version: z\n .string()\n .optional()\n .describe('Package version for detailed lookup (default: latest)'),\n};\n\nconst searchAnnotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\nexport function createPackageSearchToolSpec(): ToolSpec {\n return {\n name: 'package_search',\n title: SEARCH_TITLE,\n description: SEARCH_DESCRIPTION,\n inputSchema: searchInputSchema,\n annotations: searchAnnotations,\n handler: (input) => packageSearchHandlerBody(input),\n };\n}\n\nasync function packageSearchHandlerBody(input: unknown) {\n const parsed = parseToolInput(searchInputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { package: packageName, type, platform, version } = parsed.data;\n const baseUrl = getPackageBaseUrl();\n\n // Browse mode: no package specified → return catalog\n if (!packageName) {\n const { entries, warnings } = await fetchCatalog({\n type,\n platform,\n baseUrl,\n });\n const result = { catalog: entries, count: entries.length };\n return mcpResult(result, {\n next: ['Use package_get for schemas and examples'],\n ...(warnings.length > 0 ? { warnings } : {}),\n });\n }\n\n // Lookup mode: fetch specific package details\n try {\n const info = await fetchPackage(packageName, {\n version,\n baseUrl,\n client: CLIENT_HEADER,\n });\n\n const result = {\n package: info.packageName,\n version: info.version,\n description: info.description,\n type: info.type,\n platform: normalizePlatform(info.platform),\n hintKeys: info.hintKeys,\n exampleSummaries: info.exampleSummaries,\n };\n\n return mcpResult(result, {\n next: ['Use package_get for schemas and examples'],\n });\n } catch (error) {\n return mcpError(\n error,\n 'Package not found. Use package_search without parameters to browse available packages.',\n );\n }\n}\n\nexport function registerPackageSearchTool(server: McpServer) {\n const spec = createPackageSearchToolSpec();\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // No outputSchema: browse mode returns {catalog, count}, lookup returns metadata — incompatible shapes\n annotations: spec.annotations,\n },\n (args) => packageSearchHandlerBody(args),\n );\n}\n\n// ---------- package_get ----------\n\nconst GET_TITLE = 'Get Package';\nconst GET_DESCRIPTION =\n 'Requires exact package name: do not guess names, use package_search first to find them. ' +\n 'Returns schemas + hint texts + example summaries by default (lightweight). ' +\n 'Use section parameter for full content: \"hints\" (with code blocks), \"examples\" (full in/out data), or \"all\".';\n\nconst getInputSchema = {\n package: z\n .string()\n .min(1)\n .describe(\n 'Exact npm package name (e.g., @walkeros/web-destination-snowplow)',\n ),\n version: z.string().optional().describe('Package version (default: latest)'),\n section: z\n .enum(['hints', 'examples', 'all'])\n .optional()\n .describe(\n 'Section to expand with full content. Default: summary view with schemas + hint texts + example descriptions',\n ),\n};\n\nconst getAnnotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createPackageGetToolSpec(): ToolSpec {\n return {\n name: 'package_get',\n title: GET_TITLE,\n description: GET_DESCRIPTION,\n inputSchema: getInputSchema,\n annotations: getAnnotations,\n handler: (input) => packageGetHandlerBody(input),\n };\n}\n\nconst STEP_PACKAGE_TYPES = [\n 'source',\n 'destination',\n 'transformer',\n 'store',\n] as const;\n\nfunction isStepPackageType(\n type: string | undefined,\n): type is (typeof STEP_PACKAGE_TYPES)[number] {\n return STEP_PACKAGE_TYPES.some((stepType) => stepType === type);\n}\n\n/**\n * Base config merged with the package settings as `config`; every other\n * schema (mapping, setup, ga4, ...) kept as a sibling.\n */\nfunction shapeSchemas(\n type: string | undefined,\n schemas: Record<string, unknown>,\n): Record<string, unknown> {\n const shaped: Record<string, unknown> = {};\n\n if (isStepPackageType(type)) {\n const settings = recordField(schemas, 'settings');\n const credentials = recordField(schemas, 'credentials');\n shaped.config = mergeConfigSchema(type, {\n ...schemas,\n settings,\n credentials,\n });\n }\n\n for (const [key, value] of Object.entries(schemas)) {\n if (key !== 'settings') shaped[key] = value;\n }\n return shaped;\n}\n\nasync function packageGetHandlerBody(input: unknown) {\n const parsed = parseToolInput(getInputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { package: packageName, version, section } = parsed.data;\n const baseUrl = getPackageBaseUrl();\n\n try {\n const info = await fetchPackage(packageName, {\n version,\n baseUrl,\n client: CLIENT_HEADER,\n });\n\n const result: Record<string, unknown> = {\n package: info.packageName,\n version: info.version,\n type: info.type,\n platform: normalizePlatform(info.platform),\n schemas: shapeSchemas(info.type, info.schemas),\n };\n\n // Multi-export packages: schemas per export, each with its own config\n if (info.exportSchemas) {\n result.exportSchemas = Object.fromEntries(\n Object.entries(info.exportSchemas).map(([name, schemas]) => [\n name,\n shapeSchemas(info.type, schemas),\n ]),\n );\n }\n\n // Hints\n if (info.hints) {\n if (section === 'hints' || section === 'all') {\n result.hints = info.hints;\n } else {\n const hintSummary: Record<string, { text: string }> = {};\n for (const [key, hint] of Object.entries(info.hints)) {\n const text = stringField(hint, 'text');\n if (text !== undefined) hintSummary[key] = { text };\n }\n result.hints = hintSummary;\n }\n }\n\n // Examples\n if (section === 'examples' || section === 'all') {\n result.examples = info.examples;\n // Multi-export packages: examples per export, keyed by export name\n if (info.exportExamples) result.exportExamples = info.exportExamples;\n } else {\n result.exampleSummaries = info.exampleSummaries;\n }\n\n return mcpResult(result);\n } catch (error) {\n return mcpError(\n error,\n 'Use package_search to browse available package names.',\n );\n }\n}\n\nexport function registerGetPackageSchemaTool(server: McpServer) {\n const spec = createPackageGetToolSpec();\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // No outputSchema: removed to avoid SDK -32602 crashes on unexpected field values\n annotations: spec.annotations,\n },\n (args) => packageGetHandlerBody(args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { redactNestedStrings, keepStructural } from '../user-data.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\nimport { RuntimeRefusal, type FlowRuntime } from '../runtime/types.js';\n\nimport { flowConfigOf, isCloudId } from '../cloud-flow.js';\n\nconst WEB_SKELETON = {\n version: 4,\n flows: {\n default: {\n config: { platform: 'web', bundle: { packages: {} } },\n sources: {},\n destinations: {},\n },\n },\n};\n\nconst SERVER_SKELETON = {\n version: 4,\n flows: {\n default: {\n config: { platform: 'server', bundle: { packages: {} } },\n sources: {},\n destinations: {},\n },\n },\n};\n\nconst TITLE = 'Load or Create Flow';\nconst DESCRIPTION =\n 'Load an existing flow configuration from a local file path, URL, or walkerOS API (by flow ID). ' +\n 'On the hosted server only inline JSON or a saved flow id is accepted, no file paths or URLs. ' +\n 'Or create a new empty flow by specifying a platform (web or server). ' +\n 'Use the add-step prompt to add sources, destinations, transformers, or stores to the flow.';\n\nconst inputSchema = {\n source: z\n .string()\n .optional()\n .describe(\n 'Flow source: local file path (./flow.json), URL (https://...), ' +\n 'inline JSON string, or API flow ID (cfg_...). Omit to create a new flow.',\n ),\n platform: z\n .enum(['web', 'server'])\n .optional()\n .describe(\n 'Platform for new flows. Required when source is omitted. ' +\n 'web = browser tracking, server = Node.js HTTP.',\n ),\n};\n\nconst outputSchema = {\n version: z.number().describe('Flow config version'),\n flows: z.record(z.string(), z.unknown()).describe('Flow entries'),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createFlowLoadToolSpec(\n client: ToolClient,\n runtime: FlowRuntime,\n): ToolSpec {\n return {\n name: 'flow_load',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowLoadHandlerBody(client, runtime, input),\n };\n}\n\nasync function flowLoadHandlerBody(\n client: ToolClient,\n runtime: FlowRuntime,\n input: unknown,\n) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { source, platform } = parsed.data;\n\n // Load by cloud flow/config id (flow_… / cfg_…) via the same client seam\n // flow_manage `get` uses. Its NOT_FOUND surfaces directly, never remapped\n // to the local \"file not found\" hint below.\n if (source && isCloudId(source)) {\n const resolvedProjectId = resolveDefaultProject(client, undefined);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n try {\n const flow = await client.getFlow({\n flowId: source,\n projectId: resolvedProjectId,\n });\n return mcpResult(\n redactNestedStrings(flowConfigOf(flow), { skip: keepStructural }),\n {\n next: ['Use flow_validate to check', 'Use add-step prompt to modify'],\n },\n );\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n }\n\n try {\n if (source) {\n // Every file or URL read goes through the runtime, which decides what\n // this process may load.\n const config = await runtime.load(source);\n return mcpResult(redactNestedStrings(config, { skip: keepStructural }), {\n next: ['Use flow_validate to check', 'Use add-step prompt to modify'],\n });\n }\n\n if (!platform) {\n return mcpError(\n new Error(\n 'Provide source (file path, URL, or flow ID) to load existing flow, ' +\n 'or platform (web/server) to create a new one.',\n ),\n );\n }\n\n const skeleton = platform === 'web' ? WEB_SKELETON : SERVER_SKELETON;\n return mcpResult(skeleton, {\n next: [\n 'Read walkeros://reference/flow-schema for config structure',\n 'Use add-step prompt to add sources and destinations',\n ],\n });\n } catch (error) {\n if (error instanceof RuntimeRefusal) return mcpError(error, error.hint);\n const msg = error instanceof Error ? error.message : '';\n if (msg.includes('not found') || msg.includes('ENOENT'))\n return mcpError(error, 'Check configPath — expected a flow.json file');\n return mcpError(error);\n }\n}\n\nexport function registerFlowLoadTool(\n server: McpServer,\n client: ToolClient,\n runtime: FlowRuntime,\n) {\n const spec = createFlowLoadToolSpec(client, runtime);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n // outputSchema is wire-only; not part of ToolSpec\n outputSchema,\n annotations: spec.annotations,\n },\n (args) => flowLoadHandlerBody(client, runtime, args),\n );\n}\n","// Shared types for MCP management tools.\n// Keep this file dependency-light: only type-level imports from SDK/core.\n\n/**\n * Discriminated input shape for action-based MCP tools.\n * Example: ActionToolInput<'list', { projectId?: string }>\n */\nexport type ActionToolInput<A extends string, T = Record<string, never>> = {\n action: A;\n} & T;\n\n/**\n * Uniform handler return shape used by all mgmt tools.\n * Matches mcpResult / mcpError from @walkeros/core.\n */\nexport type ToolHandlerResult = {\n content: Array<{ type: 'text'; text: string }>;\n structuredContent: Record<string, unknown>;\n isError?: true;\n};\n\n/**\n * True when the error looks like an authentication/authorization failure\n * from the walkerOS cloud API. Used to decide whether to append the\n * \"Are you logged in?\" hint on caught errors.\n */\nexport function isAuthError(error: unknown): boolean {\n if (!(error instanceof Error)) return false;\n const msg = error.message.toLowerCase();\n if (\n msg.includes('unauthorized') ||\n msg.includes('forbidden') ||\n msg.includes('invalid token') ||\n msg.includes('token expired') ||\n msg.includes('not authenticated')\n ) {\n return true;\n }\n const code = (error as Error & { code?: string }).code;\n if (!code) return false;\n const upperCode = code.toUpperCase();\n return (\n upperCode === 'UNAUTHORIZED' ||\n upperCode === 'FORBIDDEN' ||\n upperCode === '401' ||\n upperCode === '403' ||\n upperCode.startsWith('AUTH_')\n );\n}\n\nexport const AUTH_HINT =\n 'Are you logged in? Use auth(action: \"status\") to check.';\n","/**\n * Wraps a user-writable string in `<user_data>…</user_data>` so the chat\n * assistant treats it as data, never as instructions. Inner `</user_data>`\n * sequences are mangled (`</user_data_>`) so a malicious string can't close\n * the envelope early.\n *\n * Idempotent: a string that is already a well-formed envelope with no inner\n * `</user_data>` is returned unchanged.\n */\nexport function wrapUserData(s: string): string {\n const alreadyWrapped =\n s.startsWith('<user_data>') &&\n s.endsWith('</user_data>') &&\n s.slice(11, -12).indexOf('</user_data>') === -1;\n if (alreadyWrapped) return s;\n const neutralised = s.replace(/<\\/user_data>/g, '</user_data_>');\n return `<user_data>${neutralised}</user_data>`;\n}\n\n/**\n * The single redaction rule for every tool that echoes flow/deployment data\n * back to the chat assistant:\n *\n * wrap only the human-facing display `name`/`flowName` field and deep config\n * VALUES; leave all structural ids/keys literal everywhere.\n *\n * Redaction exists to neutralise user-CONTROLLED string VALUES so an injected\n * `</user_data>` can't escape the envelope. It must NOT touch:\n * - structural keys (ids, slugs, dates, immutable identifiers): the LLM needs\n * to reference them verbatim, and wrapping them breaks get→edit→update\n * round-trips (e.g. wrapping `package`/`platform` corrupts a config the\n * user pushes straight back).\n * - tool-generated text (validation messages, error strings): that text is\n * authored by us, not echoed user input, so it stays literal like `path`.\n *\n * `STRUCTURAL_KEYS` is the union of every key whose value is an id/slug/date/\n * immutable identifier rather than user free-text. Confirmed: none of these key\n * names ever hold a genuine user-authored free-text value — `package`/`platform`\n * are enum/package-name fields, `kind` is a discriminator, the rest are\n * server-generated ids/timestamps.\n */\nexport const STRUCTURAL_KEYS = new Set([\n 'id',\n 'flowId',\n 'projectId',\n 'previewId',\n 'version',\n 'slug',\n 'kind',\n 'createdAt',\n 'updatedAt',\n 'deletedAt',\n 'package',\n 'platform',\n]);\n\n/** Return `true` for keys that must stay literal (ids, slugs, dates, package,\n * platform). Use as the `skip` predicate for {@link redactNestedStrings}. */\nexport const keepStructural = (key: string): boolean =>\n STRUCTURAL_KEYS.has(key);\n\nexport interface RedactOptions {\n /** Return `true` to skip wrapping for a given object key. Only invoked for\n * string values on object entries — not for array elements or scalar\n * roots. Use to keep ids / slugs / dates literal. */\n skip?: (key: string) => boolean;\n}\n\n/**\n * Recursively walks `value` and returns a deep-copied structure where every\n * string leaf has been passed through `wrapUserData`. Pass `skip` to exclude\n * specific keys (e.g. `id`) from wrapping.\n */\nexport function redactNestedStrings<T>(value: T, opts?: RedactOptions): T {\n return walk(value, opts) as T;\n}\n\n/** Human-facing display fields wrapped on echoed flow/deployment summaries even\n * when the rest of the object is left literal. */\nconst DISPLAY_NAME_KEYS = new Set(['name', 'flowName']);\n\n/**\n * Recursively wraps ONLY the human-facing display `name`/`flowName` fields,\n * leaving every other value (ids, slugs, status, type, dates) literal. Use on\n * tool responses that echo deployment/flow summaries where the only\n * user-authored free-text is the display name.\n */\nexport function redactDisplayNames<T>(value: T): T {\n return walkDisplay(value) as T;\n}\n\nfunction walkDisplay(value: unknown): unknown {\n if (Array.isArray(value)) return value.map(walkDisplay);\n if (value && typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value)) {\n if (DISPLAY_NAME_KEYS.has(k) && typeof v === 'string') {\n out[k] = wrapUserData(v);\n } else {\n out[k] = walkDisplay(v);\n }\n }\n return out;\n }\n return value;\n}\n\nfunction walk(value: unknown, opts?: RedactOptions): unknown {\n if (typeof value === 'string') return wrapUserData(value);\n if (Array.isArray(value)) return value.map((v) => walk(v, opts));\n if (value && typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(value)) {\n if (opts?.skip?.(k) && typeof v === 'string') {\n out[k] = v;\n } else {\n out[k] = walk(v, opts);\n }\n }\n return out;\n }\n return value;\n}\n","import type { ToolClient } from '../tool-client.js';\n\n/**\n * Shared by every project-bound tool, so the remedy is worded once.\n *\n * It names what to do, not just what went wrong, and it names where to get the\n * missing value. The per-call remedy leads because it always works: a selection\n * made with `set_default` is held by the process serving the connection and is\n * gone after a reconnect, by the ruling in the app's MCP route.\n */\nexport const NO_DEFAULT_PROJECT_ERROR =\n 'No project selected and no projectId given. Pass projectId on this call, or call project_manage action \"set_default\" to select one. project_manage action \"list\" returns the available ids.';\n\n/** Resolves the project for actions that fall back to the CLI default when\n * `projectId` is omitted. Returns the resolved id, or undefined when there is\n * no default to fall back to (the no-project-at-all case). An explicit\n * `projectId` is always honoured as-is so the app's genuine NOT_FOUND still\n * surfaces for an explicit-but-wrong id. */\nexport function resolveDefaultProject(\n client: ToolClient,\n projectId: string | undefined,\n): string | undefined {\n return projectId ?? client.getDefaultProject() ?? undefined;\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\n\ndeclare const __VERSION__: string;\n\nconst TITLE = 'Send Feedback';\nconst DESCRIPTION = 'Send feedback about walkerOS';\n\nconst inputSchema = {\n text: z.string().describe('Your feedback text'),\n anonymous: z\n .boolean()\n .optional()\n .describe(\n 'Include user/project info? false = include, true = anonymous. Only needed on first call if not yet configured.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createFeedbackToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'feedback',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => feedbackHandlerBody(client, input),\n };\n}\n\nasync function feedbackHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { text, anonymous: explicitAnonymous } = parsed.data;\n try {\n let anonymous = client.getFeedbackPreference();\n\n if (anonymous === undefined && explicitAnonymous === undefined) {\n return mcpResult(\n { needsConsent: true },\n {\n next: [\n 'Ask the user if they want to include their info',\n 'Call feedback again with anonymous: true or false',\n ],\n },\n );\n }\n\n if (anonymous === undefined && explicitAnonymous !== undefined) {\n anonymous = explicitAnonymous;\n client.setFeedbackPreference(anonymous);\n }\n\n const isAnonymous = explicitAnonymous ?? anonymous ?? true;\n\n await client.submitFeedback(text, {\n anonymous: isAnonymous,\n version: __VERSION__,\n });\n\n return mcpResult({ ok: true });\n } catch (error) {\n return mcpError(error);\n }\n}\n\nexport function registerFeedbackTool(server: McpServer, client: ToolClient) {\n const spec = createFeedbackToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => feedbackHandlerBody(client, args),\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult } from '@walkeros/core';\nimport {\n VERSION as CLI_VERSION,\n bakedContractVersion,\n operationUrl,\n} from '@walkeros/cli';\nimport type { ContractComparison } from '@walkeros/cli';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { getPackageBaseUrl, getLastCatalogSource } from '../catalog.js';\nimport { normalizeBaseUrl } from '../base-url.js';\n\nconst TITLE = 'Diagnostics';\nconst DESCRIPTION =\n 'Report the MCP runtime surface: MCP and CLI versions, the resolved app URL ' +\n 'and its source, app /api/health reachability, the API contract verdict ' +\n 'against that app, and which source served the last package catalog fetch. ' +\n 'Read-only and callable when logged out; use it when a request fails to see ' +\n 'which versions and backend you are on.';\n\n// No input fields: diagnostics is callable with `{}`, including logged out.\nconst inputSchema = {};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nexport function createDiagnosticsToolSpec(\n client: ToolClient,\n packageVersion: string,\n): ToolSpec {\n return {\n name: 'diagnostics',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: () => diagnosticsHandlerBody(client, packageVersion),\n };\n}\n\nasync function diagnosticsHandlerBody(\n client: ToolClient,\n packageVersion: string,\n) {\n // The backend comes from the CLIENT, never from the local CLI: the local\n // door resolves the user's machine, the hosted door is served by the app it\n // reports, and a tool that resolved this itself would name the wrong backend\n // on one of them.\n const resolved = client.appBaseUrl();\n\n // Provenance via the same helper the catalog uses; do not add a parallel\n // process.env check. It is a claim about the OVERRIDE only, and a proven\n // one: `env` means this process's WALKEROS_APP_URL is the URL the client\n // actually named. A client that ignores the variable (the hosted door does,\n // it is served on its own URL) therefore never reports `env` merely because\n // the variable happens to be set in its environment.\n // Normalized on both sides of the comparison: `resolved` is a base without a\n // trailing slash, and the env var is under no such obligation, so comparing\n // raw would report `default` for a slashed value that did set the URL.\n const envAppUrl = getPackageBaseUrl();\n const appUrlSource: 'env' | 'default' =\n envAppUrl !== undefined && normalizeBaseUrl(envAppUrl) === resolved\n ? 'env'\n : 'default';\n\n // checkHealth is optional on ToolClient: clients that cannot probe\n // reachability omit it, in which case diagnostics degrades to\n // { reachable: false }. When present, its contract is to resolve\n // { reachable: false } on failure, but catch here too so a throwing client\n // never breaks diagnostics.\n const healthCheck: Promise<{\n reachable: boolean;\n status?: string;\n version?: string;\n error?: string;\n }> = client.checkHealth\n ? client.checkHealth().catch((error: unknown) => ({\n reachable: false,\n error: errorMessage(error),\n }))\n : Promise.resolve({ reachable: false });\n\n // The contract verdict comes from the CLIENT, like the URL: the local door\n // compares per operation against the app it resolves, a hosted door served\n // inside the app answers `in-process`. A client without the method, or one\n // that throws, yields `unknown` with the reason.\n const contractCheck: Promise<ContractComparison> = client.checkContract\n ? client\n .checkContract()\n .catch((error: unknown) =>\n unknownContract(\n resolved,\n packageVersion,\n `contract check failed: ${errorMessage(error)}`,\n ),\n )\n : Promise.resolve(\n unknownContract(\n resolved,\n packageVersion,\n 'no contract check on this client',\n ),\n );\n\n const [health, contract] = await Promise.all([healthCheck, contractCheck]);\n\n const catalogInfo = getLastCatalogSource();\n\n const warnings: string[] = [];\n if (envAppUrl === undefined) {\n warnings.push(`WALKEROS_APP_URL is not set; app URL from ${appUrlSource}`);\n }\n if (!client.checkHealth) {\n warnings.push('no health check on this client');\n } else if (!health.reachable) {\n const url = operationUrl('GET /api/health', { baseUrl: resolved });\n warnings.push(`GET ${url} failed: ${health.error ?? 'no response'}`);\n }\n\n const result = {\n mcp: { version: packageVersion },\n cli: { version: CLI_VERSION },\n appUrl: { resolved, source: appUrlSource },\n app: {\n reachable: health.reachable,\n ...(health.status !== undefined && { status: health.status }),\n ...(health.version !== undefined && { version: health.version }),\n },\n contract: { openapiVersion: bakedContractVersion, ...contract },\n catalog: catalogInfo\n ? {\n lastSource: catalogInfo.source,\n lastCount: catalogInfo.count,\n partial: catalogInfo.partial,\n }\n : { lastSource: undefined, lastCount: undefined, partial: undefined },\n };\n\n return mcpResult(result, warnings.length > 0 ? { warnings } : undefined);\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/** The `unknown` verdict this MCP reports when its client gives none. */\nfunction unknownContract(\n appUrl: string,\n packageVersion: string,\n reason: string,\n): ContractComparison {\n return {\n verdict: 'unknown',\n appUrl,\n client: {\n package: '@walkeros/mcp',\n version: packageVersion,\n contract: bakedContractVersion,\n },\n reason,\n };\n}\n\nexport function registerDiagnosticsTool(\n server: McpServer,\n client: ToolClient,\n packageVersion: string,\n) {\n const spec = createDiagnosticsToolSpec(client, packageVersion);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n () => diagnosticsHandlerBody(client, packageVersion),\n );\n}\n","/**\n * One spelling of a walkerOS app base URL, so every consumer concatenates a\n * path onto the same shape.\n *\n * The two doors resolve their base from different worlds and neither\n * guarantees the shape on its own: the local door hands back whatever\n * `WALKEROS_APP_URL` or the CLI config file holds, and a valid URL may carry a\n * trailing slash, a query string or a fragment. Normalizing at the seam is what\n * keeps a link built from one door from reading\n * `https://app.example.com//projects/...` while the same link from the other\n * door reads cleanly.\n *\n * A query or a fragment is worse than a stray slash, because a path appended to\n * one lands INSIDE it: `https://app.example.com?a=b` plus `/projects/p1` reads\n * `https://app.example.com?a=b/projects/p1`, which is a broken link that a tool\n * then puts in somebody's chat transcript. Neither belongs on a base URL, so\n * both are dropped. The path is kept: an app mounted under a subpath is a real\n * deployment, and dropping it would break every link instead of fixing one.\n *\n * This never throws, deliberately. Its callers include `diagnostics`, whose job\n * is to NAME a misconfigured app URL; a normalizer that threw would take out\n * the tool that exists to report the problem. A string that does not parse as a\n * URL is handed back with only its trailing slashes trimmed, and fails later at\n * the request, where the error names the URL.\n */\nexport function normalizeBaseUrl(url: string): string {\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n return stripTrailingSlashes(url);\n }\n\n parsed.search = '';\n parsed.hash = '';\n return stripTrailingSlashes(parsed.toString());\n}\n\nfunction stripTrailingSlashes(value: string): string {\n return value.replace(/\\/+$/, '');\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\n\nconst TITLE = 'Authentication';\nconst DESCRIPTION =\n 'Manage walkerOS authentication. Check login status, log in via the device authorization grant, or log out. ' +\n 'No terminal or browser required, the MCP client handles the authorization URL.';\n\nconst inputSchema = {\n action: z\n .enum(['status', 'login', 'logout'])\n .describe('Authentication action to perform'),\n deviceCode: z\n .string()\n .optional()\n .describe(\n 'Device code from a previous pending login attempt. Provide to resume polling without requesting a new code.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createAuthToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'auth',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => authHandlerBody(client, input),\n };\n}\n\nasync function authHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { action, deviceCode } = parsed.data;\n try {\n switch (action) {\n case 'status': {\n if (!client.credentialSource()) {\n return mcpResult(\n { authenticated: false },\n { next: ['Use auth with action \"login\" to authenticate'] },\n );\n }\n const user = await client.whoami();\n return mcpResult({\n authenticated: true,\n ...fieldsOf(user),\n });\n }\n\n case 'login': {\n if (deviceCode) {\n const poll = await client.pollForToken(deviceCode, {\n timeoutMs: 60000,\n });\n\n if (poll.status === 'ok') {\n return mcpResult(\n { authenticated: true },\n {\n next: [\n 'Use auth with action \"status\" to see which account you are on',\n 'Use project_manage with action \"list\" to see your projects',\n ],\n },\n );\n }\n\n // The approval is still outstanding, so the code is still good and\n // the same one comes back for the next attempt. `slow_down` is the\n // server asking for a wider gap before that attempt.\n if (poll.status === 'pending' || poll.status === 'slow_down') {\n return mcpResult({\n authenticated: false,\n status: 'pending',\n message:\n poll.status === 'slow_down'\n ? 'Still waiting, and the server asked for a longer gap between checks. Try again in a minute.'\n : 'Still waiting for authorization. Try again shortly.',\n deviceCode,\n });\n }\n\n if (poll.status === 'denied')\n return mcpError(new Error('Authorization was denied.'));\n if (poll.status === 'expired')\n return mcpError(\n new Error(\n 'The one-time code expired. Run auth with action \"login\" for a new one.',\n ),\n );\n\n return mcpError(new Error(poll.error));\n }\n\n const code = await client.requestDeviceCode();\n const loginUrl = code.verificationUriComplete;\n\n return mcpResult({\n authenticated: false,\n status: 'awaiting_authorization',\n loginUrl,\n message: `Open this link to authorize: ${loginUrl}`,\n deviceCode: code.deviceCode,\n });\n }\n\n case 'logout': {\n const { deleted } = await client.logout();\n const hadEnvToken =\n typeof process.env.WALKEROS_TOKEN === 'string' &&\n process.env.WALKEROS_TOKEN.length > 0;\n delete process.env.WALKEROS_TOKEN;\n let message: string;\n if (deleted && hadEnvToken) {\n message =\n 'Logged out. Config removed and WALKEROS_TOKEN cleared from process environment.';\n } else if (deleted) {\n message = 'Logged out and config removed.';\n } else if (hadEnvToken) {\n message =\n 'No config found. WALKEROS_TOKEN cleared from process environment.';\n } else {\n message = 'No config found, already logged out.';\n }\n return mcpResult({\n loggedOut: true,\n message,\n });\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: status, login, logout`,\n );\n }\n } catch (error) {\n return mcpError(error);\n }\n}\n\nexport function registerAuthTool(server: McpServer, client: ToolClient) {\n const spec = createAuthToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => authHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { wrapUserData } from '../user-data.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf, isRecord, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n PROJECT_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\n\n/** A project record with its display name wrapped as user data. */\nfunction wrapProjectName(project: unknown): unknown {\n const name = stringField(project, 'name');\n return isRecord(project) && name !== undefined\n ? { ...project, name: wrapUserData(name) }\n : project;\n}\n\nconst TITLE = 'Project Management';\nconst DESCRIPTION =\n 'Manage walkerOS projects. List, create, update, delete projects, or set a default project for CLI operations.';\n\nconst inputSchema = {\n action: z\n .enum(['list', 'get', 'create', 'update', 'delete', 'set_default'])\n .describe('Project management action to perform'),\n projectId: z\n .string()\n .optional()\n .describe('Required for get, update, delete, set_default.'),\n name: z\n .string()\n .optional()\n .describe(\n 'Required for create and update (update also requires projectId).',\n ),\n cursor: z\n .string()\n .optional()\n .describe(\n 'Pagination cursor from a previous list response. Only used with the list action.',\n ),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe('Max items per page (1-100). Only used with the list action.'),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createProjectManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'project_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => projectManageHandlerBody(client, input),\n };\n}\n\nasync function projectManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { action, projectId, name, cursor, limit } = parsed.data;\n const validationError = validateActionInput(\n 'project_manage',\n action ?? '',\n { projectId, name },\n PROJECT_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n switch (action) {\n case 'list': {\n const projects = await client.listProjects({ cursor, limit });\n const listed = isRecord(projects) ? projects.projects : undefined;\n const items = Array.isArray(projects)\n ? projects\n : Array.isArray(listed)\n ? listed\n : [];\n if (items.length === 0) {\n return mcpResult(\n { projects: [] },\n {\n next: [\n 'Use project_manage with action \"create\" to create your first project',\n 'Use project_manage with action \"set_default\" after creating to set it as default',\n ],\n },\n );\n }\n const safe = Array.isArray(projects)\n ? items.map(wrapProjectName)\n : { ...fieldsOf(projects), projects: items.map(wrapProjectName) };\n return mcpResult(safe);\n }\n\n case 'get': {\n const project = await client.getProject({ projectId });\n return mcpResult(wrapProjectName(project));\n }\n\n case 'create': {\n assertParam(name, 'name', 'create');\n const created = await client.createProject({ name });\n return mcpResult(wrapProjectName(created), {\n next: [\n 'Use project_manage with action \"set_default\" to make this your active project',\n ],\n });\n }\n\n case 'update': {\n assertParam(name, 'name', 'update');\n const updated = await client.updateProject({ projectId, name });\n return mcpResult(wrapProjectName(updated));\n }\n\n case 'delete': {\n const deleted = await client.deleteProject({ projectId });\n return mcpResult(deleted);\n }\n\n case 'set_default': {\n assertParam(projectId, 'projectId', 'set_default');\n client.setDefaultProject(projectId);\n return mcpResult(\n { defaultProjectId: projectId },\n {\n next: [\n 'Use flow_manage with action \"list\" to see flows in this project',\n ],\n },\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: list, get, create, update, delete, set_default`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerProjectManageTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createProjectManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => projectManageHandlerBody(client, args),\n );\n}\n","export interface ActionRule {\n /** Params that must each be present for this action. */\n required?: string[];\n /** Param groups where at least one of each group must be present. */\n oneOf?: string[][];\n /** Optional discovery hint appended to the error (e.g. 'Use action \"list\" ...'). */\n hint?: string;\n}\n\nexport type ActionRequirementMap = Record<string, ActionRule>;\n\n/**\n * Returns a canonical error message string when `input` is missing a\n * required (or one-of) param for `action`, otherwise null. The message is\n * uniform across tools so error quality cannot drift between tools.\n * Required params are checked (and reported) before oneOf groups.\n */\nexport function validateActionInput(\n toolName: string,\n action: string,\n input: Record<string, unknown>,\n map: ActionRequirementMap,\n): string | null {\n const rule = map[action];\n if (!rule) return null;\n for (const param of rule.required ?? []) {\n if (\n input[param] === undefined ||\n input[param] === null ||\n input[param] === ''\n ) {\n return missing(toolName, action, param, rule.hint);\n }\n }\n for (const group of rule.oneOf ?? []) {\n const satisfied = group.some(\n (p) => input[p] !== undefined && input[p] !== null && input[p] !== '',\n );\n if (!satisfied) {\n return `${toolName} action \"${action}\" requires one of: ${group.join(', ')}.${rule.hint ? ' ' + rule.hint : ''}`;\n }\n }\n return null;\n}\n\n/**\n * Narrows a param that the action's requirement map has already validated as\n * present, so typed client calls accept it without re-checking. The companion\n * to `validateActionInput`: callers run that first to produce a friendly error,\n * then use this assertion at the use site to recover the non-nullable type.\n * Because validation guarantees presence, this never throws in practice; the\n * throw exists only to satisfy the assertion-signature contract. The thrown\n * message mirrors the `missing()` form (\"<param> is required for <action> action.\").\n */\nexport function assertParam(\n value: string | undefined,\n param: string,\n action: string,\n): asserts value is string {\n if (value === undefined || value === null || value === '')\n throw new Error(`${param} is required for ${action} action.`);\n}\n\nfunction missing(\n tool: string,\n action: string,\n param: string,\n hint?: string,\n): string {\n // Keep the substring \"<param> is required\" so existing assertions/docs that\n // string-match it stay green.\n return `${param} is required for ${action} action.${hint ? ' ' + hint : ''}`;\n}\n\nexport const FLOW_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n get: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n update: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n delete: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n duplicate: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n create: { required: ['name'] },\n preview_list: {\n required: ['flowId'],\n hint: 'Use action \"list\" to see available flows.',\n },\n preview_get: { required: ['flowId', 'previewId'] },\n preview_create: {\n required: ['flowId'],\n oneOf: [['flowName', 'flowSettingsId']],\n },\n preview_delete: { required: ['flowId', 'previewId'] },\n preview_regrant: { required: ['flowId', 'previewId'] },\n};\n\nexport const DEPLOY_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n deploy: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n get: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n delete: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n};\n\nexport const SECRET_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n list: {\n required: ['flowId'],\n hint: 'Use flow_manage action \"list\" to see available flows.',\n },\n set: {\n required: ['flowId', 'name', 'value'],\n hint: 'Use action \"list\" to see existing secret names for this flow.',\n },\n update: {\n required: ['flowId', 'secretId', 'value'],\n hint: 'Use action \"list\" to find the secretId.',\n },\n delete: {\n required: ['flowId', 'secretId'],\n hint: 'Use action \"list\" to find the secretId.',\n },\n};\n\nexport const PROJECT_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n get: {\n required: ['projectId'],\n hint: 'Use action \"list\" to see available projects.',\n },\n update: {\n required: ['projectId', 'name'],\n hint: 'Use action \"list\" to see available projects.',\n },\n delete: {\n required: ['projectId'],\n hint: 'Use action \"list\" to see available projects.',\n },\n set_default: {\n required: ['projectId'],\n hint: 'Use action \"list\" to see available projects.',\n },\n create: { required: ['name'] },\n};\n\nexport const FRAME_MANAGE_REQUIREMENTS: ActionRequirementMap = {\n page: {\n required: ['pageKey'],\n hint: 'Use action \"list\" to see the source keys of the project’s frames.',\n },\n get: {\n required: ['frameId'],\n hint: 'Use action \"list\" or \"page\" to find a frameId.',\n },\n};\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport {\n wrapUserData,\n redactNestedStrings,\n keepStructural,\n} from '../user-data.js';\nimport { flowCanvasResult } from '../ui-parts.js';\nimport { links } from '../links.js';\n\n/** Peek at a Flow.Json root (v4) and decide whether the bubble should render\n * as web-flavoured or server-flavoured. The platform is recorded on\n * `flows[name].config.platform`. We pick the first flow's platform; if no\n * platform is set we fall back to `'server'` so the chat bubble can still\n * render even if the user is mid-edit. */\nfunction pickPlatform(content: unknown): 'web' | 'server' {\n const flows = recordField(content, 'flows');\n for (const flow of Object.values(flows ?? {})) {\n const platform = stringField(recordField(flow, 'config'), 'platform');\n if (platform === 'web' || platform === 'server') return platform;\n }\n return 'server';\n}\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf, isRecord, recordField, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n FLOW_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\n\n/**\n * The flow's page in the app, or nothing when the response carried no id (a\n * shape this module already tolerates everywhere else it reads `id`). The base\n * URL comes from the door, so one definition serves both of them.\n */\nfunction flowPageUrl(\n client: ToolClient,\n projectId: string,\n flowId: string | undefined,\n): string | undefined {\n if (flowId === undefined) return undefined;\n return links.flow({ baseUrl: client.appBaseUrl(), projectId, flowId });\n}\n\n/** A flow summary with its display name wrapped as user data. */\nfunction safeSummary(flow: unknown): unknown {\n const name = stringField(flow, 'name');\n return isRecord(flow) && name !== undefined\n ? { ...flow, name: wrapUserData(name) }\n : flow;\n}\n\n/** A flow record with its name wrapped and its config's strings redacted. */\ninterface SafeFlowDetail {\n fields: Record<string, unknown>;\n id?: string;\n name?: string;\n config?: Record<string, unknown>;\n}\n\nfunction safeDetail(flow: unknown): SafeFlowDetail {\n const fields: Record<string, unknown> = { ...fieldsOf(flow) };\n const name = stringField(fields, 'name');\n if (name !== undefined) fields.name = wrapUserData(name);\n if (fields.config !== undefined) {\n fields.config = redactNestedStrings(fields.config, {\n skip: keepStructural,\n });\n }\n return {\n fields,\n id: stringField(fields, 'id'),\n name: stringField(fields, 'name'),\n config: recordField(fields, 'config'),\n };\n}\n\nconst TITLE = 'Flow Management';\nconst DESCRIPTION =\n 'Manage walkerOS flows and their previews. List/get/create/update/delete/duplicate flows, or create/inspect/delete preview bundles and mint activation grants (preview_regrant) for testing flow changes on live sites.';\n\nconst inputSchema = {\n action: z\n .enum([\n 'list',\n 'get',\n 'create',\n 'update',\n 'delete',\n 'duplicate',\n 'preview_list',\n 'preview_get',\n 'preview_create',\n 'preview_delete',\n 'preview_regrant',\n ])\n .describe('Flow management action to perform'),\n flowId: z\n .string()\n .optional()\n .describe(\n 'Flow ID (flow_...) or config ID (cfg_...). Required for get, update, delete, duplicate, preview_list, preview_get, preview_create, preview_delete, preview_regrant.',\n ),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional filter for list (omit to list all projects). Required for create if no default project set.',\n ),\n name: z\n .string()\n .optional()\n .describe(\n 'Flow name. Required for create. Optional for update (to rename) and duplicate.',\n ),\n content: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('Flow.Json content. Used for create and update.'),\n patch: z\n .boolean()\n .optional()\n .describe(\n 'Merge-patch for update (default true). When true, only provided fields are updated.',\n ),\n fields: z\n .array(z.string())\n .optional()\n .describe('Dot-path selectors for get to return only specific fields.'),\n sort: z\n .enum(['name', 'updated_at', 'created_at'])\n .optional()\n .describe('Sort field for list.'),\n order: z.enum(['asc', 'desc']).optional().describe('Sort order for list.'),\n includeDeleted: z\n .boolean()\n .optional()\n .describe('Include soft-deleted flows in list results.'),\n cursor: z\n .string()\n .optional()\n .describe(\n 'Pagination cursor from a previous list response. Only used with the list action.',\n ),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe('Max items per page (1-100). Only used with the list action.'),\n previewId: z\n .string()\n .optional()\n .describe(\n 'Preview ID (prv_...). Required for preview_get, preview_delete, and preview_regrant (all also require flowId).',\n ),\n flowName: z\n .string()\n .optional()\n .describe(\n 'Used by preview_create — provide one of flowName or flowSettingsId (preview_create also requires flowId).',\n ),\n flowSettingsId: z\n .string()\n .optional()\n .describe(\n 'Used by preview_create — provide one of flowName or flowSettingsId (preview_create also requires flowId).',\n ),\n source: z\n .discriminatedUnion('kind', [\n z.object({ kind: z.literal('draft') }),\n z.object({\n kind: z.literal('deployment-version'),\n deploymentVersionId: z.string(),\n }),\n ])\n .optional()\n .describe(\n \"What the preview should run, for preview_create: the flow's draft (default) or a deployed version's stored config (kind 'deployment-version' with its deploymentVersionId).\",\n ),\n siteUrl: z\n .string()\n .optional()\n .describe(\n 'Optional site URL (e.g. https://shop.example.com) for preview_create. When provided, the activation grant is minted for that origin so the returned activationUrl works there.',\n ),\n origins: z\n .array(z.string())\n .optional()\n .describe(\n 'Site origins (bare https://host[:port]) to mint a preview activation grant for. Used by preview_regrant; the returned activationUrl targets the first origin.',\n ),\n sessionId: z\n .string()\n .optional()\n .describe(\n 'Observe session id — when set, preview_regrant mints an activation/forwarding grant PAIR: the returned activationUrl both activates the web preview and lets the page forward events to the session container (elbPreviewSession param). Pass it to observe server-side hops; omit for a plain web preview.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\n// Preview results land in agent transcripts and logs, so the MCP boundary\n// enforces a field whitelist instead of trusting whatever shape a client\n// returns: the raw ingest `token` and `projectId` must never surface here.\n// Grants (`grant`, `sessionGrant`, `activationUrl`) are deliberate outputs —\n// short-lived, origin/session-bound capabilities the caller needs to activate\n// a preview or forward events to an observe session. The list covers both\n// client shapes: the app's in-process summary (`previewId`, `status`,\n// `observeFeed`) and the CLI-backed HTTP client's raw API response (`id`,\n// `createdBy`, `createdAt`).\nconst PREVIEW_SUMMARY_FIELDS = [\n 'id',\n 'previewId',\n 'flowId',\n 'flowSettingsId',\n 'bundleUrl',\n 'activationUrl',\n 'grant',\n 'sessionGrant',\n 'sessionExpiresAt',\n 'sessionId',\n 'status',\n 'observeFeed',\n 'createdBy',\n 'createdAt',\n] as const;\n\nfunction redactPreview(data: unknown): Record<string, unknown> {\n if (!isRecord(data)) return {};\n const out: Record<string, unknown> = {};\n for (const field of PREVIEW_SUMMARY_FIELDS) {\n if (data[field] !== undefined) out[field] = data[field];\n }\n return out;\n}\n\nfunction redactPreviewList(data: unknown): Record<string, unknown> {\n if (!isRecord(data)) return { previews: [] };\n return {\n previews: Array.isArray(data.previews)\n ? data.previews.map(redactPreview)\n : [],\n ...(data.total !== undefined ? { total: data.total } : {}),\n };\n}\n\n/**\n * Resolve the flow's live Observe session, or null when there is none.\n *\n * `listJourneys` is the flow-keyed read the app already exposes and its\n * `sessionId` IS the flow's single active window, so it doubles as the\n * resolver. Best-effort by design: this only enriches a regrant, so a failing\n * or unavailable read degrades to a plain web preview grant instead of failing\n * the mint the caller actually asked for.\n */\nasync function resolveLiveSessionId(\n client: ToolClient,\n flowId: string,\n projectId: string | undefined,\n): Promise<string | null> {\n try {\n const result = await client.listJourneys({\n flowId,\n ...(projectId !== undefined && { projectId }),\n limit: 1,\n });\n return result.sessionId;\n } catch {\n return null;\n }\n}\n\nexport function createFlowManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'flow_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => flowManageHandlerBody(client, input),\n };\n}\n\nasync function flowManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n action,\n flowId,\n projectId,\n name,\n content,\n patch,\n fields,\n sort,\n order,\n includeDeleted,\n cursor,\n limit,\n previewId,\n flowName,\n flowSettingsId,\n source,\n siteUrl,\n origins,\n sessionId,\n } = parsed.data;\n const validationError = validateActionInput(\n 'flow_manage',\n action ?? '',\n { flowId, projectId, name, previewId, flowName, flowSettingsId },\n FLOW_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n switch (action) {\n case 'list': {\n if (projectId) {\n const data = await client.listFlows({\n projectId,\n sort,\n order,\n includeDeleted,\n cursor,\n limit,\n });\n const flows = isRecord(data) ? data.flows : undefined;\n const safe =\n isRecord(data) && Array.isArray(flows)\n ? { ...data, flows: flows.map(safeSummary) }\n : data;\n return mcpResult(safe);\n }\n const data = await client.listAllFlows({\n sort,\n order,\n includeDeleted,\n cursor,\n limit,\n });\n const safe = Array.isArray(data) ? data.map(safeSummary) : data;\n return mcpResult(\n { projects: safe },\n {\n next: [\n 'Use flow_manage with action \"get\" and a flowId to inspect a specific flow',\n 'Use flow_load to open a flow for editing',\n ],\n },\n );\n }\n\n case 'get': {\n assertParam(flowId, 'flowId', 'get');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const flow = await client.getFlow({\n flowId,\n projectId: resolvedProjectId,\n fields,\n });\n const safe = safeDetail(flow);\n const appUrl = flowPageUrl(client, resolvedProjectId, safe.id);\n return flowCanvasResult({\n flowId: safe.id,\n configName: safe.name ?? 'default',\n platform: pickPlatform(safe.config),\n flowConfig: safe.config ?? {},\n ...(appUrl !== undefined && { appUrl }),\n suggestions: [\n {\n label: 'Validate this flow',\n prompt: `Validate flow ${safe.id}`,\n autoSend: true,\n },\n {\n label: 'Add a destination',\n prompt: `Help me add a destination to flow ${safe.id}`,\n },\n ],\n });\n }\n\n case 'create': {\n assertParam(name, 'name', 'create');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const created = await client.createFlow({\n name,\n content: content ?? {},\n projectId: resolvedProjectId,\n });\n const safeCreated = safeDetail(created);\n const createdAppUrl = flowPageUrl(\n client,\n resolvedProjectId,\n safeCreated.id,\n );\n return flowCanvasResult({\n flowId: safeCreated.id,\n configName: safeCreated.name ?? 'default',\n platform: pickPlatform(safeCreated.config),\n flowConfig: safeCreated.config ?? {},\n ...(createdAppUrl !== undefined && { appUrl: createdAppUrl }),\n suggestions: [\n {\n label: 'Validate this flow',\n prompt: `Validate flow ${safeCreated.id}`,\n autoSend: true,\n },\n {\n label: 'Deploy it',\n prompt: `Deploy flow ${safeCreated.id}`,\n },\n ],\n });\n }\n\n case 'update': {\n assertParam(flowId, 'flowId', 'update');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const updated = await client.updateFlow({\n flowId,\n projectId: resolvedProjectId,\n name,\n content,\n mergePatch: patch ?? true,\n });\n const safeUpdated = safeDetail(updated);\n return flowCanvasResult({\n flowId: safeUpdated.id,\n configName: safeUpdated.name ?? 'default',\n platform: pickPlatform(safeUpdated.config),\n flowConfig: safeUpdated.config ?? {},\n suggestions: [\n {\n label: 'Validate this flow',\n prompt: `Validate flow ${safeUpdated.id}`,\n autoSend: true,\n },\n {\n label: 'Deploy it',\n prompt: `Deploy flow ${safeUpdated.id}`,\n },\n ],\n });\n }\n\n case 'delete': {\n assertParam(flowId, 'flowId', 'delete');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const deleted = await client.deleteFlow({\n flowId,\n projectId: resolvedProjectId,\n });\n return mcpResult(deleted);\n }\n\n case 'duplicate': {\n assertParam(flowId, 'flowId', 'duplicate');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const duplicated = await client.duplicateFlow({\n flowId,\n name,\n projectId: resolvedProjectId,\n });\n return mcpResult(safeDetail(duplicated).fields);\n }\n\n case 'preview_list': {\n assertParam(flowId, 'flowId', 'preview_list');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const data = await client.listPreviews({\n projectId: resolvedProjectId,\n flowId,\n });\n return mcpResult(redactPreviewList(data));\n }\n\n case 'preview_get': {\n assertParam(flowId, 'flowId', 'preview_get');\n assertParam(previewId, 'previewId', 'preview_get');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const data = await client.getPreview({\n projectId: resolvedProjectId,\n flowId,\n previewId,\n });\n return mcpResult(redactPreview(data));\n }\n\n case 'preview_create': {\n assertParam(flowId, 'flowId', 'preview_create');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n // Whitelist the summary at the boundary: the HTTP client returns the\n // raw API response (which carries the ingest token and project id),\n // and the handler must never surface those regardless of the client.\n // It also adds no token-derived URL of its own.\n const preview = await client.createPreview({\n projectId: resolvedProjectId,\n flowId,\n flowName,\n flowSettingsId,\n ...(source ? { source } : {}),\n ...(siteUrl ? { siteUrl } : {}),\n });\n return mcpResult(redactPreview(preview), {\n next: [\n 'Open activationUrl on your site to activate preview mode. When activationUrl is null, no grant has been minted for a site yet — use action \"preview_regrant\" with your site origins to mint one.',\n 'Poll observeFeed (observe_journeys with this flowId) to watch preview events arrive.',\n ],\n });\n }\n\n case 'preview_delete': {\n assertParam(flowId, 'flowId', 'preview_delete');\n assertParam(previewId, 'previewId', 'preview_delete');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n const data = await client.deletePreview({\n projectId: resolvedProjectId,\n flowId,\n previewId,\n });\n // The app responds 204 No Content; an older CLI maps that to null.\n // mcpResult requires a record for structuredContent, so synthesize a\n // confirmation when the body is empty.\n return mcpResult(\n data && typeof data === 'object'\n ? data\n : { deleted: true, previewId },\n );\n }\n\n case 'preview_regrant': {\n assertParam(flowId, 'flowId', 'preview_regrant');\n assertParam(previewId, 'previewId', 'preview_regrant');\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n if (!client.regrantPreview) {\n return mcpError(\n new Error('preview_regrant is not supported by this client'),\n );\n }\n // Auto-pair with the flow's live Observe window so a regrant made\n // while the flow is being observed forwards into it by default. An\n // explicit sessionId stays the override, and an unresolvable window is\n // not a failure: it degrades to a plain web preview grant.\n // Resolve under the SAME project the regrant is sent to: this path\n // degrades silently, so a project mismatch would never surface.\n const pairedSessionId =\n sessionId ??\n (await resolveLiveSessionId(client, flowId, resolvedProjectId));\n // Whitelisted grant summary: activationUrl plus the raw grant values\n // the caller may need (`sessionGrant` is how an agent authenticates\n // direct server-hop test events) — never the ingest token.\n const data = await client.regrantPreview({\n projectId: resolvedProjectId,\n flowId,\n previewId,\n origins: origins ?? [],\n ...(pairedSessionId ? { sessionId: pairedSessionId } : {}),\n });\n return mcpResult(redactPreview(data), {\n next: [\n pairedSessionId\n ? 'Open activationUrl on the target origin: it activates the web preview AND forwards its events to the observe session. Use sessionGrant as the X-Walkeros-Preview header for direct server-hop test events.'\n : 'Open activationUrl on the target origin to activate preview mode.',\n ],\n });\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: list, get, create, update, delete, duplicate, preview_list, preview_get, preview_create, preview_delete, preview_regrant`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerFlowManageTool(server: McpServer, client: ToolClient) {\n const spec = createFlowManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => flowManageHandlerBody(client, args),\n );\n}\n","export type SuggestionTile = {\n label: string;\n description?: string;\n prompt: string;\n autoSend?: boolean;\n};\n\nexport interface FlowCanvasPayload {\n flowId?: string;\n configName: string;\n platform: 'web' | 'server';\n flowConfig: Record<string, unknown>;\n highlight?: { stepAddress: string; reason: string };\n suggestions?: SuggestionTile[];\n /**\n * Absolute link to this flow's page in the app, from `links.flow`.\n *\n * Named for the `appBaseUrl()` seam it is built from, and never `url`: that\n * is a field several app responses already use for something of their own\n * (a deployment's `url` is where it SERVES), and one key meaning one thing\n * across every tool is what keeps a link from ever landing on top of it.\n *\n * Optional because a tool that cannot name the project or the flow emits no\n * link rather than a guess, and because the in-app chat renders the canvas\n * itself and has no use for a link to the page it is already on.\n */\n appUrl?: string;\n}\n\nexport interface FlowCanvasToolResult extends FlowCanvasPayload {\n kind: 'flow-canvas';\n}\n\n/**\n * Tool-result helper that marks a response as renderable as a FlowCanvas.\n * The chat UI inspects `structuredContent.kind === 'flow-canvas'` and mounts\n * a `FlowCanvasBubble` instead of the generic JSON fallback. The `content[0]`\n * text is the same JSON stringified — the LLM sees a self-describing object.\n */\nexport function flowCanvasResult(payload: FlowCanvasPayload) {\n const structured: FlowCanvasToolResult = { kind: 'flow-canvas', ...payload };\n return {\n content: [\n {\n type: 'text' as const,\n text: JSON.stringify(structured, null, 2),\n },\n ],\n structuredContent: structured as unknown as Record<string, unknown> & {\n kind: 'flow-canvas';\n },\n };\n}\n\nexport function isFlowCanvasResult(v: unknown): v is FlowCanvasToolResult {\n return (\n typeof v === 'object' &&\n v !== null &&\n (v as { kind?: unknown }).kind === 'flow-canvas'\n );\n}\n","/**\n * Addresses of walkerOS app screens, built in one place so every tool hands a\n * person the same link for the same screen.\n *\n * WHY THIS EXISTS. A tool that names a release, a step, or a deployment in\n * prose leaves the person to go find it. A link ends that: the answer and the\n * screen it is about arrive together. Building the address in each tool would\n * instead give as many spellings of `/projects/.../flows/...` as there are\n * emission points, and the first one to drift would send someone to a 404 that\n * no test here could see.\n *\n * THE BASE URL IS CONSUMED RAW. `client.appBaseUrl()` is already normalized by\n * the door that answers it (the CLI-backed door wraps `resolveAppUrl()` in\n * `normalizeBaseUrl`; the hosted door returns the same expression it publishes\n * as its OAuth issuer, which cannot carry a trailing slash). Normalizing again\n * here would put a second opinion about the shape in the system, which is\n * exactly what one normalization point per door exists to prevent.\n *\n * ONE DEFINITION, BOTH DOORS. Nothing here branches on which door is calling.\n * The base URL is the only thing that differs between them, and it arrives as\n * an argument.\n *\n * EVERY LINK IS ABSOLUTE. These land in a chat transcript, where a path\n * relative to nothing is useless.\n *\n * AN UNBUILDABLE LINK IS `undefined`, NEVER A GUESS. Every builder returns\n * `undefined` when it cannot name a screen that exists, and callers spread the\n * field conditionally so the result simply carries no link. A link that lands\n * on a 404, or on the app's \"can't open that\" notice, is worse than no link:\n * it costs the person a click and teaches them the tool's links are unreliable.\n *\n * THE URL SHAPES ARE THE APP'S, NOT OURS. They mirror what the app routes\n * today: `/projects/{projectId}/flows/{flowId}` and\n * `/projects/{projectId}/deployments/{deploymentId}`, with a view on the flow\n * page addressed by the `view` query param whose value names a SUBJECT\n * (`variables`, `secrets`, `contract`, `history`, `releases`, `knowledge`,\n * `step`). A step is `?view=step&flow=<named flow>&step=<type.name>`, the same\n * vocabulary `hub_manage` already takes as its `flow` and `step` params.\n */\n\n/** A flow page: the address every flow-scoped view hangs off. */\nexport interface FlowLinkTarget {\n /** From `client.appBaseUrl()`. Consumed as given. */\n baseUrl: string;\n projectId: string;\n flowId: string;\n}\n\n/**\n * One step inside a flow. `flow` is the named flow within the config (\"web\",\n * \"server\"); `step` is `\"type.name\"`, e.g. `\"destination.ga4\"`.\n */\nexport interface StepLinkTarget extends FlowLinkTarget {\n step: string;\n /**\n * Null and undefined both mean \"the caller did not name one\", which is the\n * shape `hub_manage`'s step history answers with when it was not filtered by\n * flow.\n */\n flow?: string | null;\n}\n\n/** One discussion thread, addressed by what it hangs on. */\nexport interface ThreadLinkTarget extends FlowLinkTarget {\n anchorType: string;\n}\n\n/**\n * One deployment.\n *\n * Pass the `dep_...` id, not the slug. The detail route resolves either, but\n * the page's live-status stream matches on the id alone, so a slug link opens a\n * page whose status stream fails while the deployment is still deploying. This\n * builder does not inspect the value: naming the id is the caller's job.\n */\nexport interface DeploymentLinkTarget {\n baseUrl: string;\n projectId: string;\n deploymentId: string;\n}\n\n/**\n * Contract entries are top-level and carry no named flow, so they are not\n * `?view=step` addresses.\n */\nconst CONTRACT_PREFIX = 'contract.';\n\n/** Every address component has to be a non-empty string, or there is no link. */\nfunction addressable(...parts: string[]): boolean {\n return parts.every((part) => part !== '');\n}\n\nfunction flowPage(target: FlowLinkTarget): string | undefined {\n const { baseUrl, projectId, flowId } = target;\n if (!addressable(baseUrl, projectId, flowId)) return undefined;\n return `${baseUrl}/projects/${encodeURIComponent(projectId)}/flows/${encodeURIComponent(flowId)}`;\n}\n\n/**\n * A view on the flow page. `view` leads because it is the primary key: the\n * other params only mean anything beside it.\n */\nfunction flowView(\n target: FlowLinkTarget,\n view: string,\n params: Record<string, string> = {},\n): string | undefined {\n const page = flowPage(target);\n if (page === undefined) return undefined;\n const query = new URLSearchParams({ view, ...params });\n return `${page}?${query.toString()}`;\n}\n\nexport const links = {\n /** The flow page itself. `undefined` when any part of the address is empty. */\n flow(target: FlowLinkTarget): string | undefined {\n return flowPage(target);\n },\n\n /**\n * The screen showing one step.\n *\n * A `contract` step, in any of its spellings, is answered with the CONTRACT\n * view rather than a step address. `?view=step&step=contract.checkout` is a\n * legitimate address in the vocabulary this tool speaks, but the app has\n * deliberately deferred opening ONE contract entry and refuses that link with\n * a notice. `?view=contract` opens the contract editor the entry lives in,\n * which is the nearest screen that actually exists. A `flow` alongside a\n * contract step is a caller mistake (contract entries are top-level) and is\n * ignored rather than turned into a refused link.\n *\n * Otherwise a step needs its named flow: `type.name` alone is not unique in a\n * config holding both a web and a server flow, and the app resolves an\n * address without one to nothing and says so on screen. So an unnamed flow\n * yields `undefined` here. Callers that want the link can re-ask with `flow`.\n *\n * What this cannot check is whether the step is still IN that flow. The\n * address is resolved against the live config when the page opens, and a step\n * since renamed or removed gets a notice there rather than a broken screen.\n */\n step(target: StepLinkTarget): string | undefined {\n const { step, flow } = target;\n if (step === '') return undefined;\n if (step === 'contract' || step.startsWith(CONTRACT_PREFIX))\n return flowView(target, 'contract');\n if (typeof flow !== 'string' || flow === '') return undefined;\n return flowView(target, 'step', { flow, step });\n },\n\n /**\n * The release history of a flow.\n *\n * The app has no address for ONE release: `?view=releases` declares no params\n * and opens the list the release is a row of. That is the screen a person\n * asking about a release wants to be on, so this takes the flow and nothing\n * else rather than pretending to a precision the app does not have.\n */\n release(target: FlowLinkTarget): string | undefined {\n return flowView(target, 'releases');\n },\n\n /**\n * The screen a thread is read on.\n *\n * Only a release anchor can be addressed from the wire shape this tool\n * holds. The app renders release-anchored discussions inside the release\n * history, beside the release they hang on. Step and entity-action anchors\n * have no surface at all yet. A TAG anchor does have one, the knowledge list\n * on `?view=knowledge`, but only when the thread was captured in Tag Mode\n * and carries a frame: `HubThreadWire` has no `frameId`, so nothing here can\n * tell such a thread from one written over MCP against a null frame, and a\n * knowledge link would open a list the thread may be absent from. So\n * everything but a release anchor gets no link rather than a possibly empty\n * one.\n */\n thread(target: ThreadLinkTarget): string | undefined {\n if (target.anchorType !== 'release') return undefined;\n return flowView(target, 'releases');\n },\n\n /** One deployment's detail page. */\n deployment(target: DeploymentLinkTarget): string | undefined {\n const { baseUrl, projectId, deploymentId } = target;\n if (!addressable(baseUrl, projectId, deploymentId)) return undefined;\n return `${baseUrl}/projects/${encodeURIComponent(projectId)}/deployments/${encodeURIComponent(deploymentId)}`;\n },\n};\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { DeploymentStatus, DeploymentType } from '@walkeros/cli';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { redactDisplayNames } from '../user-data.js';\nimport { links } from '../links.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { fieldsOf, isRecord, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n resolveDeploymentSlug,\n type DeploymentSummaryForResolver,\n type ListDeploymentsForResolver,\n} from './_resolvers.js';\nimport { resolveDefaultProject } from './project-context.js';\nimport {\n validateActionInput,\n assertParam,\n DEPLOY_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\n\nconst TITLE = 'Deploy Management';\nconst DESCRIPTION =\n 'Deploy walkerOS flows and manage deployments. ' +\n 'deploy waits for the deployment to reach a terminal status by default (wait=true), with a 12-minute budget; pass wait=false to return immediately with the deployment id. ' +\n 'A finished deployment carries its status and, on failure, an errorMessage with the user-facing reason; use the get action to re-read it. ' +\n 'list supports cursor and limit for pagination. ' +\n 'delete removes an active deployment. ' +\n 'For get and delete pass flowId (required) plus optional slug to disambiguate when a flow has multiple active deployments. ' +\n \"If a flow has >=2 active deployments and no slug is supplied, the tool returns a MULTIPLE_DEPLOYMENTS error with a details[] list showing each deployment's slug, type, status, and updatedAt.\";\n\n// The list filters' values. The compiler holds each record equal to the\n// contract's enum, which the CLI types as DeploymentStatus and DeploymentType.\nconst DEPLOYMENT_STATUSES = {\n idle: true,\n deploying: true,\n published: true,\n active: true,\n stopped: true,\n failed: true,\n} satisfies Record<DeploymentStatus, true>;\n\nconst DEPLOYMENT_TYPES = {\n web: true,\n server: true,\n} satisfies Record<DeploymentType, true>;\n\n/** A record's keys, each narrowed to the record's key type. */\nfunction membersOf<T extends string>(members: Readonly<Record<T, true>>): T[] {\n return Object.keys(members).filter((key): key is T =>\n Object.hasOwn(members, key),\n );\n}\n\nconst inputSchema = {\n action: z\n .enum(['deploy', 'list', 'get', 'delete'])\n .describe('Deployment action to perform'),\n projectId: z\n .string()\n .optional()\n .describe('Project ID. Optional; falls back to the default project.'),\n flowId: z.string().optional().describe('Required for deploy, get, delete.'),\n slug: z\n .string()\n .optional()\n .describe(\n 'Deployment slug. Optional disambiguator for get/delete when the flow has multiple active deployments.',\n ),\n type: z\n .enum(membersOf(DEPLOYMENT_TYPES))\n .optional()\n .describe('Deployment type filter for list.'),\n status: z\n .enum(membersOf(DEPLOYMENT_STATUSES))\n .optional()\n .describe('Status filter for list.'),\n wait: z\n .boolean()\n .optional()\n .describe(\n 'Wait for the deployment to reach a terminal status (default true), with a 12-minute budget. Set false to return the deployment id immediately. Only used with deploy action.',\n ),\n flowName: z\n .string()\n .optional()\n .describe(\n 'Flow name for multi-settings flows. Only used with deploy action.',\n ),\n cursor: z\n .string()\n .optional()\n .describe(\n 'Pagination cursor from a previous list response. Only used with the list action.',\n ),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe('Max items per page (1-100). Only used with the list action.'),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\n/**\n * The deployment's ID, however the response spells it: the deploy start body\n * carries `deploymentId`, the detail read carries `id`.\n *\n * The `slug` both bodies also carry is deliberately NOT an address here. The\n * detail route resolves a slug, but the page's live-status stream matches on\n * the id alone, so a slug link opens a page whose status stream fails on a\n * deployment that is still deploying. A response carrying neither id spelling\n * gets no link.\n */\nfunction deploymentAddress(data: unknown): string | undefined {\n if (data === null || typeof data !== 'object' || Array.isArray(data))\n return undefined;\n const record: Record<string, unknown> = { ...data };\n for (const key of ['id', 'deploymentId']) {\n const value = record[key];\n if (typeof value === 'string' && value !== '') return value;\n }\n return undefined;\n}\n\n/**\n * The deployment's page in the app.\n *\n * The project is resolved the way every other project-bound tool resolves it,\n * falling back to the door's default. That fallback is for the LINK only:\n * nothing here changes which project the call itself reads, and a door with no\n * default simply yields no link rather than a wrong one.\n */\nfunction deploymentUrl(\n client: ToolClient,\n projectId: string | undefined,\n data: unknown,\n): string | undefined {\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (resolvedProjectId === undefined) return undefined;\n const deploymentId = deploymentAddress(data);\n if (deploymentId === undefined) return undefined;\n return links.deployment({\n baseUrl: client.appBaseUrl(),\n projectId: resolvedProjectId,\n deploymentId,\n });\n}\n\n/**\n * Attach the link to a response body without disturbing what it already\n * carries.\n *\n * The key is `appUrl`, and it may never be `url`. A deployment response\n * ALREADY carries `url`, and it means where this deployment is SERVING: the\n * app sets it to the deployment's target while published or active. Writing\n * the app page over it would silently replace a live endpoint with a UI link,\n * with nothing to signal that the meaning of the field had changed. `appUrl`\n * also names the `appBaseUrl()` seam it is built from.\n *\n * A non-object body (nothing the app returns today, but the client types are\n * `unknown`) is passed through untouched rather than wrapped.\n */\nfunction withAppUrl(data: unknown, appUrl: string | undefined): unknown {\n if (\n appUrl === undefined ||\n data === null ||\n typeof data !== 'object' ||\n Array.isArray(data)\n ) {\n return data;\n }\n return { ...data, appUrl };\n}\n\n/** One deployment summary, or none when a field the resolver reads is missing. */\nfunction readDeploymentSummary(value: unknown): DeploymentSummaryForResolver[] {\n if (!isRecord(value)) return [];\n const slug = stringField(value, 'slug');\n const type = stringField(value, 'type');\n const status = stringField(value, 'status');\n const updatedAt = stringField(value, 'updatedAt');\n return slug !== undefined &&\n type !== undefined &&\n status !== undefined &&\n updatedAt !== undefined\n ? [{ ...value, slug, type, status, updatedAt }]\n : [];\n}\n\nfunction listForResolver(\n client: ToolClient,\n projectId: string | undefined,\n): ListDeploymentsForResolver {\n return async (q) => {\n const resp = await client.listDeployments({\n projectId: projectId || q.projectId || undefined,\n flowId: q.flowId,\n });\n const deployments = isRecord(resp) ? resp.deployments : undefined;\n return Array.isArray(deployments)\n ? deployments.flatMap(readDeploymentSummary)\n : [];\n };\n}\n\nexport function createDeployManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'deploy_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => deployManageHandlerBody(client, input),\n };\n}\n\nasync function deployManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n action,\n projectId,\n flowId,\n slug,\n type,\n status,\n wait,\n flowName,\n cursor,\n limit,\n } = parsed.data;\n const validationError = validateActionInput(\n 'deploy_manage',\n action ?? '',\n { flowId, projectId },\n DEPLOY_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n switch (action) {\n case 'deploy': {\n assertParam(flowId, 'flowId', 'deploy');\n // `projectId` travels with the deploy itself, not just with the link.\n // Without it the deploy resolved the door's default while the link\n // resolved the explicit id, so an explicit projectId that differed\n // from the default deployed in one project and linked into another,\n // and the project-scoped deployment route answered that link with a\n // 404.\n const result = await client.deploy({\n flowId,\n projectId,\n wait: wait ?? true,\n flowName,\n });\n // The deployment's own page, whether this call waited for a terminal\n // status or returned the id straight away. It is where the status the\n // hint tells the agent to re-read is shown, so the person can watch it\n // instead of asking again.\n const appUrl = deploymentUrl(client, projectId, result);\n return mcpResult(withAppUrl(redactDisplayNames(result), appUrl), {\n next: [\n 'Use deploy_manage with action \"get\" to check deployment status',\n ],\n });\n }\n\n case 'list': {\n const data = await client.listDeployments({\n projectId,\n flowId,\n type,\n status,\n cursor,\n limit,\n });\n return mcpResult(redactDisplayNames(data));\n }\n\n case 'get': {\n assertParam(flowId, 'flowId', 'get');\n const resolvedSlug = await resolveDeploymentSlug({\n projectId: projectId ?? '',\n flowId,\n slug,\n list: listForResolver(client, projectId),\n });\n const data = await client.getDeploymentBySlug({\n slug: resolvedSlug,\n projectId,\n });\n const appUrl = deploymentUrl(client, projectId, data);\n return mcpResult(withAppUrl(redactDisplayNames(data), appUrl));\n }\n\n case 'delete': {\n assertParam(flowId, 'flowId', 'delete');\n const resolvedSlug = await resolveDeploymentSlug({\n projectId: projectId ?? '',\n flowId,\n slug,\n list: listForResolver(client, projectId),\n });\n const data = await client.deleteDeployment({\n slug: resolvedSlug,\n projectId,\n });\n return mcpResult(\n redactDisplayNames({\n deleted: true,\n ...fieldsOf(data),\n }),\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: deploy, list, get, delete`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerDeployTool(server: McpServer, client: ToolClient) {\n const spec = createDeployManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => deployManageHandlerBody(client, args),\n );\n}\n","/**\n * Internal helpers shared by deploy_manage actions. Not re-exported from the\n * tools barrel; leading underscore marks this as tool-module internal.\n *\n * All collaborators are passed in as arguments so unit tests can inject fakes\n * without relying on jest.mock. This keeps resolver tests local to the\n * resolver signature and avoids shared-mock drift.\n */\n\n/**\n * The subset of a deployment summary the resolver needs to decide 0 / 1 / many\n * and to surface a useful MULTIPLE_DEPLOYMENTS error. Kept structurally\n * compatible with the CLI's DeploymentSummaryForFlow.\n */\nexport interface DeploymentSummaryForResolver {\n slug: string;\n type: string;\n status: string;\n updatedAt: string;\n}\n\n/**\n * Dependency injected list function. Must return only non-deleted deployments\n * for the given project + flow. The production wiring calls\n * `listDeployments({ projectId, flowId })` from `@walkeros/cli`, which hits\n * the app API; the API excludes soft-deleted rows.\n */\nexport type ListDeploymentsForResolver = (q: {\n projectId: string;\n flowId: string;\n}) => Promise<DeploymentSummaryForResolver[]>;\n\n/**\n * Error thrown when a flow has 0 matching deployments, or when a caller passed\n * a slug that does not match any active deployment of the flow. The MCP layer\n * translates this into an mcpError with `code: 'NOT_FOUND'`.\n */\nexport class DeploymentNotFoundError extends Error {\n readonly code = 'NOT_FOUND';\n constructor(message: string) {\n super(message);\n this.name = 'DeploymentNotFoundError';\n }\n}\n\n/**\n * Error thrown when a flow has >= 2 active deployments and the caller did not\n * pass a slug. Carries a `details[]` list so the MCP layer can surface the\n * options to the user.\n */\nexport class MultipleDeploymentsError extends Error {\n readonly code = 'MULTIPLE_DEPLOYMENTS';\n readonly details: DeploymentSummaryForResolver[];\n constructor(message: string, details: DeploymentSummaryForResolver[]) {\n super(message);\n this.name = 'MultipleDeploymentsError';\n this.details = details;\n }\n}\n\n/**\n * Resolve a concrete deployment slug for a (projectId, flowId, slug?) tuple.\n *\n * Behavior:\n * - 0 matches: throws DeploymentNotFoundError.\n * - 1 match, no slug: returns the single slug.\n * - slug provided and matches: returns the slug.\n * - slug provided and does not match: throws DeploymentNotFoundError.\n * - >= 2 matches, no slug: throws MultipleDeploymentsError with details[].\n */\nexport async function resolveDeploymentSlug(args: {\n projectId: string;\n flowId: string;\n slug?: string;\n list: ListDeploymentsForResolver;\n}): Promise<string> {\n const matches = await args.list({\n projectId: args.projectId,\n flowId: args.flowId,\n });\n\n if (matches.length === 0) {\n throw new DeploymentNotFoundError(\n `No deployments found for flow ${args.flowId}`,\n );\n }\n\n if (args.slug !== undefined) {\n const hit = matches.find((m) => m.slug === args.slug);\n if (!hit) {\n throw new DeploymentNotFoundError(\n `No deployment with slug ${args.slug} in flow ${args.flowId}`,\n );\n }\n return hit.slug;\n }\n\n if (matches.length === 1) {\n return matches[0].slug;\n }\n\n throw new MultipleDeploymentsError(\n `Flow ${args.flowId} has ${matches.length} active deployments; pass slug to disambiguate`,\n matches.map((m) => ({\n slug: m.slug,\n type: m.type,\n status: m.status,\n updatedAt: m.updatedAt,\n })),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n SECRET_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\n\nconst TITLE = 'Secret Management';\nconst DESCRIPTION =\n 'Manage a flow’s managed secrets (the $secret.<NAME> values its steps reference at deploy/run time). ' +\n 'Actions: list (metadata only), set (create), update (rotate value), delete. ' +\n 'Secrets are write-mostly: values are encrypted at rest and are NEVER returned, listed, or echoed. ' +\n 'Reference a secret from a flow step as $secret.<NAME>. Credentials, tokens, and private keys must use $secret, not $env: ' +\n 'the deploy pipeline only injects values referenced as $secret.<NAME> into the server runner. Server flows only.';\n\nconst inputSchema = {\n action: z\n .enum(['list', 'set', 'update', 'delete'])\n .describe('Secret management action to perform'),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional: falls back to the default project when omitted.',\n ),\n flowId: z\n .string()\n .describe(\n 'Flow ID (flow_...) or config ID (cfg_...). Required for list, set, update, and delete: secrets are flow-scoped.',\n ),\n name: z\n .string()\n .regex(\n /^[A-Z_][A-Z0-9_]*$/,\n 'Secret name must be uppercase letters, digits, and underscores, starting with a letter or underscore.',\n )\n .optional()\n .describe(\n 'Secret name (UPPER_SNAKE_CASE). Required for set. Referenced in flows as $secret.<NAME>.',\n ),\n value: z\n .string()\n .min(1)\n .max(65536)\n .optional()\n .describe(\n 'Secret value (1-65536 chars). Required for set and update. Write-only: never returned or logged.',\n ),\n secretId: z\n .string()\n .optional()\n .describe(\n 'Secret ID (sec_...). Required for update and delete. Use action \"list\" to find it.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nexport function createSecretManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'secret_manage',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => secretManageHandlerBody(client, input),\n };\n}\n\nasync function secretManageHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { action, projectId, flowId, name, value, secretId } = parsed.data;\n const validationError = validateActionInput(\n 'secret_manage',\n action ?? '',\n { flowId, name, value, secretId },\n SECRET_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n try {\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId)\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n\n switch (action) {\n case 'list': {\n assertParam(flowId, 'flowId', 'list');\n const data = await client.listSecrets({\n projectId: resolvedProjectId,\n flowId,\n });\n return mcpResult(data, {\n next: [\n 'Reference a listed secret from a flow step as $secret.<NAME>.',\n 'Use action \"set\" to add a secret or \"update\" to rotate one.',\n ],\n });\n }\n\n case 'set': {\n assertParam(flowId, 'flowId', 'set');\n assertParam(name, 'name', 'set');\n assertParam(value, 'value', 'set');\n const created = await client.createSecret({\n projectId: resolvedProjectId,\n flowId,\n name,\n value,\n });\n // Response is metadata only; value is never echoed back.\n return mcpResult(created, {\n next: [`Reference it in this flow as $secret.${name}.`],\n });\n }\n\n case 'update': {\n assertParam(flowId, 'flowId', 'update');\n assertParam(secretId, 'secretId', 'update');\n assertParam(value, 'value', 'update');\n const updated = await client.updateSecret({\n projectId: resolvedProjectId,\n flowId,\n secretId,\n value,\n });\n return mcpResult(updated);\n }\n\n case 'delete': {\n assertParam(flowId, 'flowId', 'delete');\n assertParam(secretId, 'secretId', 'delete');\n const deleted = await client.deleteSecret({\n projectId: resolvedProjectId,\n flowId,\n secretId,\n });\n return mcpResult(\n deleted && typeof deleted === 'object'\n ? deleted\n : { deleted: true, secretId },\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${action}. Use one of: list, set, update, delete`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerSecretManageTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createSecretManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => secretManageHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport type { Journey, JourneyHop, JourneyBranch } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\nimport { redactNestedStrings } from '../user-data.js';\n\nimport type { ToolClient } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { parseToolInput } from './parse-input.js';\n\nconst TITLE = 'Observe Journeys';\nconst DESCRIPTION =\n 'Read the assembled, cross-runtime journeys for a flow that is currently being observed (an active Observe session). ' +\n 'Pass flowId; the active session is resolved for you (a flow has at most one). ' +\n 'Each journey is one traced event reconstructed end to end across web and server: its ordered hops (source, transformer, collector, destination), each hop status (pending/done/skipped/error), captured in/out payloads, consent, and vendor calls. ' +\n 'Use this to see what actually happened to live events: which destinations fired, what mapping ran, where an event was skipped or errored, and whether records were lost (gaps + a journey `lossy` flag). ' +\n 'When the flow has no active session the result is `{ sessionId: null, journeys: [], gaps: [] }` — start an Observe session in the app and drive traffic first, then read again. ' +\n 'Narrow with traceId (one trace) and limit (page cap, most recent kept; default 50). ' +\n 'Read-only.';\n\nconst inputSchema = {\n flowId: z\n .string()\n .describe('Flow to read journeys for (its active Observe session).'),\n projectId: z\n .string()\n .optional()\n .describe('Project ID. Optional; falls back to the default project.'),\n traceId: z\n .string()\n .optional()\n .describe('Return only the journeys for this trace id.'),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\n 'Max journeys to return (1-100, most recent kept). Defaults to 50.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\n/**\n * Neutralise ONLY the captured, event-controlled payload fields of a journey for\n * third-party LLM context, deep-wrapping every string inside them in\n * <user_data>. Everything else stays literal.\n *\n * The distinction is load-bearing, not cosmetic: `observe_journeys` takes\n * `traceId` as a filter input, so the trigger -> read -> filter-by-traceId loop\n * only works if `traceId` (and the other correlation handles the agent\n * references) comes back verbatim. Wrapping them would break re-querying.\n *\n * KEEP LITERAL (assembler/wire-generated correlation handles, enums, numbers, or\n * the user's own config vocabulary):\n * id, correlation, traceId, entry.eventId/sourceId/timestamp, hop.stepId,\n * stepType, eventId, parentEventId, status, terminalPhase, skipReason,\n * mappingKey, contractRule, consent/consentApplied (config category -> bool),\n * platform(s), branchId, batched/flushConfirmed, and every timestamp/duration/\n * seq/gap-bound number.\n *\n * WRAP (data captured off the live event stream, attacker-influenceable):\n * entry.name (inbound event name), hop.in, hop.out, hop.error, hop.calls,\n * hop.meta, and the same out/error/calls on each fan-out branch.\n *\n * A structure-aware transform rather than a key-skip over `redactNestedStrings`,\n * because a flat key skip is depth-agnostic: it would either wrap the correlation\n * handles (breaking the query loop) or, if it skipped keys like `stepId`\n * globally, leave a captured payload field that happens to be named `stepId`\n * unwrapped. Wrapping whole payload sub-trees keeps every correlation handle\n * literal AND wraps every captured string, whatever its key.\n */\nfunction redactJourneyPayloads(journeys: Journey[]): Journey[] {\n return journeys.map((journey) => ({\n ...journey,\n entry: {\n ...journey.entry,\n ...(journey.entry.name !== undefined && {\n name: redactNestedStrings(journey.entry.name),\n }),\n },\n hops: journey.hops.map(redactHopPayloads),\n }));\n}\n\nfunction redactHopPayloads(hop: JourneyHop): JourneyHop {\n return {\n ...hop,\n ...(hop.in !== undefined && { in: redactNestedStrings(hop.in) }),\n ...(hop.out !== undefined && { out: redactNestedStrings(hop.out) }),\n ...(hop.error !== undefined && { error: redactNestedStrings(hop.error) }),\n ...(hop.calls !== undefined && { calls: redactNestedStrings(hop.calls) }),\n ...(hop.meta !== undefined && { meta: redactNestedStrings(hop.meta) }),\n ...(hop.branches !== undefined && {\n branches: hop.branches.map(redactBranchPayloads),\n }),\n };\n}\n\nfunction redactBranchPayloads(branch: JourneyBranch): JourneyBranch {\n return {\n ...branch,\n ...(branch.out !== undefined && { out: redactNestedStrings(branch.out) }),\n ...(branch.error !== undefined && {\n error: redactNestedStrings(branch.error),\n }),\n ...(branch.calls !== undefined && {\n calls: redactNestedStrings(branch.calls),\n }),\n };\n}\n\nexport function createObserveJourneysToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'observe_journeys',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => observeJourneysHandlerBody(client, input),\n };\n}\n\nasync function observeJourneysHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const { flowId, projectId, traceId, limit } = parsed.data;\n if (!flowId) {\n return mcpError(new Error('flowId is required for observe_journeys.'));\n }\n try {\n const result = await client.listJourneys({\n flowId,\n ...(projectId !== undefined && { projectId }),\n ...(traceId !== undefined && { traceId }),\n ...(limit !== undefined && { limit }),\n });\n // Wrap only the captured, event-controlled payload sub-trees (in/out/error/\n // calls/meta + entry.name) in <user_data> for third-party LLM context, while\n // keeping every correlation handle (traceId/stepId/eventId/mappingKey) and\n // enum/number literal so the agent can feed them straight back as filter\n // input. gaps are numeric + platform enum only, so they pass through, and\n // so does unattributed: platform enum, numbers, and stepIds from the user's\n // own config, with no captured event payload to wrap. Absent stays absent,\n // since \"no loss to report\" reads differently from an empty array.\n const safe = {\n sessionId: result.sessionId,\n flowId: result.flowId,\n assembledAt: result.assembledAt,\n journeys: redactJourneyPayloads(result.journeys),\n gaps: result.gaps,\n ...(result.unattributed !== undefined && {\n unattributed: result.unattributed,\n }),\n };\n return mcpResult(safe, {\n next:\n result.sessionId === null\n ? [\n 'No active Observe session for this flow. Start one in the app and drive traffic, then read again.',\n ]\n : [\n 'Inspect a single trace with traceId, or adjust the flow config and re-read to confirm the change.',\n ],\n });\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerObserveJourneysTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createObserveJourneysToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => observeJourneysHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { isAuthError, AUTH_HINT } from '../types.js';\n\nimport type {\n ToolClient,\n ObserveSessionResult,\n ObserveLevel,\n} from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { isRecord, stringField } from './narrow.js';\nimport { parseToolInput } from './parse-input.js';\n\nconst TITLE = 'Observe Session';\n/**\n * Exported so the hosted plane can assert parity against this exact string\n * instead of retyping it.\n */\nexport const DESCRIPTION =\n 'Open, inspect, or end an Observe session: a time-boxed window on one flow that runtimes attach to as arms. ' +\n 'A preview arm streams from a browser, a container arm runs server-side, and both feed ONE shared journeys feed. ' +\n 'start opens the window (arms picks which runtimes attach), status reports per-arm state plus recordsReceived and expiresAt, stop ends the whole session including every arm. ' +\n 'A flow has at most one session, so status/stop resolve it from flowId when sessionId is omitted. ' +\n 'Read the events with observe_journeys; this tool never returns event data and never judges whether events are correct.';\n\n/**\n * Hints carry the verb ladder rather than the description. Module constants so\n * the wording is one string per idea, quotable verbatim, and identical across\n * planes. Exported so the hosted plane imports them instead of retyping them,\n * which makes cross-plane parity a compiler concern.\n */\nexport const HINT_SIMULATE_FIRST =\n 'Simulate before preview: flow_simulate checks mapping with no browser.';\nexport const HINT_PREVIEW_STREAMS =\n 'Preview streams into this session: mint a link with flow_manage preview_regrant, then open it on your site.';\nexport const HINT_READ =\n 'Read with observe_journeys (flowId); it is the only read.';\nexport const HINT_STOP = 'End both arms with observe_session stop.';\nexport const HINT_EMPTY_FEED =\n 'recordsReceived is 0: nothing has reached the feed yet. Drive traffic on an attached arm.';\nexport const HINT_ENDED =\n 'Session ended and both arms detached. Start a new one with observe_session start.';\nexport const HINT_NO_WINDOW =\n 'No Observe session on this flow. Open one with observe_session start.';\n\nconst inputSchema = {\n action: z\n .enum(['start', 'status', 'stop'])\n .describe(\n 'start opens a session, status reports arm state, stop ends the whole session.',\n ),\n flowId: z.string().describe('Flow the Observe session runs on.'),\n projectId: z\n .string()\n .optional()\n .describe('Project ID. Optional; falls back to the default project.'),\n sessionId: z\n .string()\n .optional()\n .describe(\n 'Session to act on for status/stop. Optional; the flow has at most one session and it is resolved for you.',\n ),\n arms: z\n .object({\n container: z\n .literal(true)\n .optional()\n .describe(\n \"Pass true to attach the server container arm, which selects the flow's server settings when no preview arm is named. Only true is accepted: a web settings that references a server flow always brings its container arm along, so a container cannot be suppressed here.\",\n ),\n preview: z\n .string()\n .optional()\n .describe(\n \"Name the flow settings this session observes. A web settings attaches the browser preview arm (plus the container arm of any server flow it references); a server settings attaches the container arm alone. Omit to use the flow's single web settings.\",\n ),\n })\n .optional()\n .describe(\n 'Which runtimes attach. Omit to attach the default preview arm; a web settings that references a server flow brings its container arm with it.',\n ),\n origins: z\n .array(z.string())\n .optional()\n .describe(\n 'Bare https origins (https://host[:port]) the session may ingest web events from.',\n ),\n level: z\n .enum(['off', 'standard', 'trace'])\n .optional()\n .describe(\"Container observation verbosity. Defaults to the app's own.\"),\n replace: z\n .boolean()\n .optional()\n .describe(\n \"Replace the flow's existing window instead of attaching to it. Re-provisions from the new config.\",\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\ninterface ArmsInput {\n container?: true;\n preview?: string;\n}\n\ninterface SettingsEntry {\n name: string;\n platform: 'web' | 'server';\n}\n\n/**\n * Read the settings summaries off a flow response. `getFlow` is typed\n * `Promise<unknown>` on the client, so it is read structurally:\n * anything that is not a well-formed settings entry is simply not a candidate.\n */\nfunction readSettings(flow: unknown): SettingsEntry[] {\n if (!isRecord(flow)) return [];\n const settings = flow.settings;\n if (!Array.isArray(settings)) return [];\n const entries: SettingsEntry[] = [];\n for (const entry of settings) {\n const name = stringField(entry, 'name');\n const platform = stringField(entry, 'platform');\n if (name === undefined) continue;\n if (platform !== 'web' && platform !== 'server') continue;\n entries.push({ name, platform });\n }\n return entries;\n}\n\n/**\n * Translate the arms shape onto the one field the session contract takes.\n *\n * The app derives a session's arms from the flow topology under a single\n * `settingsName`: a web settings that references a server flow provisions both\n * arms, a server settings provisions the container alone. So arms selects a\n * NAME here rather than toggling arms on the wire.\n */\nfunction resolveSettingsName(\n settings: SettingsEntry[],\n arms: ArmsInput | undefined,\n): string {\n if (arms?.preview !== undefined) {\n const named = settings.find((entry) => entry.name === arms.preview);\n if (!named) {\n throw new Error(\n `This flow has no settings named \"${arms.preview}\". Available: ${describeSettings(settings)}`,\n );\n }\n return named.name;\n }\n\n if (arms?.container === true) {\n const servers = settings.filter((entry) => entry.platform === 'server');\n const only = servers[0];\n if (!only) {\n throw new Error(\n `The container arm needs a server settings, and this flow has no server settings. Available: ${describeSettings(settings)}`,\n );\n }\n if (servers.length > 1) {\n throw new Error(\n `This flow has several server settings. Name one with arms.preview. Available: ${describeSettings(settings)}`,\n );\n }\n return only.name;\n }\n\n const webs = settings.filter((entry) => entry.platform === 'web');\n const onlyWeb = webs[0];\n if (onlyWeb && webs.length === 1) return onlyWeb.name;\n if (webs.length > 1) {\n throw new Error(\n `This flow has several web settings. Name one with arms.preview. Available: ${describeSettings(settings)}`,\n );\n }\n\n const onlySettings = settings[0];\n if (onlySettings && settings.length === 1) return onlySettings.name;\n throw new Error(\n `Could not pick a settings to observe. Name one with arms.preview. Available: ${describeSettings(settings)}`,\n );\n}\n\nfunction describeSettings(settings: SettingsEntry[]): string {\n if (settings.length === 0) return 'none';\n return settings\n .map((entry) => `${entry.name} (${entry.platform})`)\n .join(', ');\n}\n\n/**\n * Per-arm state derived from the response shape: a part being non-null is what\n * makes its arm attached. Connect secrets (the web credential, the container\n * env trio) stay out by construction.\n */\nfunction toArms(session: ObserveSessionResult) {\n return {\n preview: {\n attached: session.web !== null,\n settingsName: session.observedFlowName,\n activationUrl: session.web?.activationUrl ?? null,\n previewEnabled: session.web?.previewEnabled ?? false,\n },\n container: {\n attached: session.server !== null,\n settingsName: session.serverFlowName,\n endpoint: session.server?.endpoint ?? null,\n },\n };\n}\n\nfunction toSummary(session: ObserveSessionResult) {\n return {\n sessionId: session.id,\n flowId: session.flowId,\n status: session.status,\n errorMessage: session.errorMessage,\n expiresAt: session.expiresAt,\n recordsReceived: session.recordsReceived,\n arms: toArms(session),\n };\n}\n\nexport const SESSION_RESOLUTION_FAILED =\n \"Could not resolve this flow's Observe session because the journeys read that identifies it is unavailable. Pass sessionId explicitly to act on the session without that lookup.\";\n\n/**\n * Wraps a failed lookup while preserving the structured fields `mcpError`\n * renders, so the caller keeps the machine-readable code alongside the\n * recovery instruction. The original failure rides along as `cause`.\n */\nclass SessionResolutionError extends Error {\n readonly code: string | undefined;\n readonly details: unknown[] | undefined;\n\n constructor(message: string, cause: unknown) {\n super(message, { cause });\n this.name = 'SessionResolutionError';\n this.code = readStringField(cause, 'code');\n this.details = readArrayField(cause, 'details');\n }\n}\n\nfunction readStringField(source: unknown, key: string): string | undefined {\n if (source === null || typeof source !== 'object' || !(key in source))\n return undefined;\n const value = Reflect.get(source, key);\n return typeof value === 'string' ? value : undefined;\n}\n\nfunction readArrayField(source: unknown, key: string): unknown[] | undefined {\n if (source === null || typeof source !== 'object' || !(key in source))\n return undefined;\n const value = Reflect.get(source, key);\n return Array.isArray(value) ? value : undefined;\n}\n\n/**\n * Resolve the flow's live window. `listJourneys` is the flow-keyed read the app\n * already exposes and its `sessionId` IS the flow's single active session, so\n * it doubles as the resolver: no second lookup contract is needed.\n *\n * That read depends on the observer, which status and stop themselves do not.\n * A failing lookup therefore reports the fallback rather than reading as \"this\n * flow has no session\", so stop stays reachable when the observer is down.\n */\nasync function resolveSessionId(\n client: ToolClient,\n options: { flowId: string; projectId?: string },\n): Promise<string | null> {\n try {\n const result = await client.listJourneys({\n flowId: options.flowId,\n ...(options.projectId !== undefined && { projectId: options.projectId }),\n limit: 1,\n });\n return result.sessionId;\n } catch (error) {\n // An auth failure is about the caller, not the lookup: let it through\n // unwrapped so the handler still attaches AUTH_HINT.\n if (isAuthError(error)) throw error;\n const detail = error instanceof Error ? error.message : String(error);\n // Carry the structured fields across: `mcpError` reads `code` and\n // `details` off the thrown error, so a bare `new Error` would strip the\n // machine-readable code and leave callers only the prose.\n throw new SessionResolutionError(\n `${SESSION_RESOLUTION_FAILED} (${detail})`,\n error,\n );\n }\n}\n\nfunction resolveProjectId(\n client: ToolClient,\n projectId: string | undefined,\n): string | null {\n return projectId ?? client.getDefaultProject();\n}\n\nconst NO_DEFAULT_PROJECT_ERROR =\n 'No project ID given and no default project set. Pass projectId or set one with project_manage set_default.';\n\nexport function createObserveSessionToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'observe_session',\n title: TITLE,\n description: DESCRIPTION,\n inputSchema,\n annotations,\n handler: (input) => observeSessionHandlerBody(client, input),\n };\n}\n\nasync function observeSessionHandlerBody(client: ToolClient, input: unknown) {\n const parsed = parseToolInput(inputSchema, input);\n if (!parsed.ok) return parsed.error;\n const {\n action,\n flowId,\n projectId,\n sessionId,\n arms,\n origins,\n level,\n replace,\n } = parsed.data;\n\n if (!flowId) {\n return mcpError(new Error('flowId is required for observe_session.'));\n }\n const resolvedProjectId = resolveProjectId(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n\n try {\n switch (action) {\n case 'start': {\n if (!client.startObserveSession) {\n return mcpError(\n new Error('observe_session start is not supported by this client.'),\n );\n }\n const settings = readSettings(\n await client.getFlow({\n flowId,\n projectId: resolvedProjectId,\n fields: ['settings'],\n }),\n );\n const settingsName = resolveSettingsName(settings, arms);\n const session = await client.startObserveSession({\n projectId: resolvedProjectId,\n flowId,\n settingsName,\n ...(origins !== undefined && { origins }),\n ...(level !== undefined && { level }),\n ...(replace !== undefined && { replace }),\n });\n return mcpResult(toSummary(session), {\n next: [HINT_SIMULATE_FIRST, HINT_PREVIEW_STREAMS, HINT_READ],\n });\n }\n\n case 'status': {\n if (!client.getObserveSession) {\n return mcpError(\n new Error(\n 'observe_session status is not supported by this client.',\n ),\n );\n }\n const resolvedSessionId =\n sessionId ??\n (await resolveSessionId(client, {\n flowId,\n projectId: resolvedProjectId,\n }));\n if (!resolvedSessionId) {\n return mcpResult(\n { sessionId: null, flowId },\n { next: [HINT_NO_WINDOW, HINT_SIMULATE_FIRST] },\n );\n }\n const session = await client.getObserveSession({\n projectId: resolvedProjectId,\n flowId,\n sessionId: resolvedSessionId,\n });\n return mcpResult(toSummary(session), {\n next:\n session.recordsReceived === 0\n ? [HINT_EMPTY_FEED, HINT_READ, HINT_STOP]\n : [HINT_READ, HINT_STOP],\n });\n }\n\n case 'stop': {\n if (!client.endObserveSession) {\n return mcpError(\n new Error('observe_session stop is not supported by this client.'),\n );\n }\n const resolvedSessionId =\n sessionId ??\n (await resolveSessionId(client, {\n flowId,\n projectId: resolvedProjectId,\n }));\n if (!resolvedSessionId) {\n return mcpResult(\n { sessionId: null, flowId, ended: false },\n { next: [HINT_NO_WINDOW] },\n );\n }\n await client.endObserveSession({\n projectId: resolvedProjectId,\n flowId,\n sessionId: resolvedSessionId,\n });\n return mcpResult(\n { sessionId: resolvedSessionId, flowId, ended: true },\n { next: [HINT_ENDED] },\n );\n }\n\n default:\n throw new Error(\n `Unknown action: ${String(action)}. Use one of: start, status, stop`,\n );\n }\n } catch (error) {\n return mcpError(error, isAuthError(error) ? AUTH_HINT : undefined);\n }\n}\n\nexport function registerObserveSessionTool(\n server: McpServer,\n client: ToolClient,\n) {\n const spec = createObserveSessionToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => observeSessionHandlerBody(client, args),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { wrapUserData } from '../user-data.js';\nimport { links } from '../links.js';\nimport type {\n ToolClient,\n ReleaseRef,\n ReleaseDetailWire,\n StepHistoryWire,\n VersionAnnotationWire,\n HubThreadWire,\n KnowledgeEntryWire,\n ThreadAnchorType,\n} from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { inputIssuesMessage } from './parse-input.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\nimport { errorHint } from './feature-gate.js';\n\n/**\n * `hub_manage`: the time-and-why dimension of a flow over MCP.\n *\n * The rest of the MCP surface answers what a flow IS right now. Nothing else\n * exposes the version spine, so this is the only door an agent has to the\n * release history and the reasoning attached to it. It registers on the SAME\n * server instance as `flow_manage`, `package_get`, and the rest, which is what\n * lets an agent compose the two: current config from those tools, history and\n * rationale from this one.\n *\n * Reads are progressive: `releases` is a lean index and never carries a\n * snapshot, `release_get` opens exactly one release in full. The diff in\n * `release_get` is computed by the server from the two stored snapshots, never\n * supplied by the caller, because capture is optional by design and an\n * unannotated release's diff is the only truth left to read.\n *\n * `knowledge` is the page dimension of the same story: what people wrote on the\n * frames of a page in Tag Mode. It is addressed by frame and mark rather than\n * by flow, because a note outlives the flow it was written against and one page\n * carries notes about several. `pageKey` narrows to a whole page, resolved to\n * its frames server-side. It reads only. Writing one happens where the mark is,\n * and settling one is a person's call, the same rule the threads actions\n * follow.\n *\n * Writes are additive only. `rationale_set` replaces the human note on one\n * release and `note_add` appends to a discussion; this tool has no delete\n * action of any kind, and no way to resolve a thread. Resolving states that a\n * release settled a question, which is a person's call to make in the app.\n */\n\n// Caps and patterns the server enforces. Duplicated here so the schema can\n// describe them; the app's src/lib/hub/threads.ts, src/lib/versions/step-history.ts,\n// src/lib/hub/knowledge.ts and src/lib/api/schemas/frames.ts are the authority.\nconst MAX_ANNOTATION_TEXT_LENGTH = 4000;\nconst MAX_ANCHOR_KEY_LENGTH = 255;\nconst MAX_ANCHOR_LABEL_LENGTH = 255;\nconst MAX_STEP_HISTORY_LIMIT = 50;\nconst MAX_STEP_HISTORY_ENTRIES = 200;\nconst MAX_THREAD_LIMIT = 100;\nconst MAX_THREADS_WITH_MESSAGES = 20;\nconst MAX_SOURCE_KEY_LENGTH = 1024;\nconst MAX_MARK_ID_LENGTH = 200;\nconst FRAME_ID_PATTERN = /^frm_[A-Za-z0-9_-]{21}$/;\nconst THREAD_STATUSES = ['open', 'resolved'] as const;\n\nconst TITLE = 'Release History and Rationale';\n\n/**\n * Exported so a host asserts parity against this exact string instead of\n * retyping it.\n */\nexport const HUB_MANAGE_DESCRIPTION =\n 'Read a flow’s release history and the reasoning behind it: what each release changed, and why. ' +\n 'Actions: releases (lean index of a flow’s releases, newest first, no snapshots), ' +\n 'release_get (one release in full: its rationale plus a server-computed diff against the release before it), ' +\n 'step_history (which releases added, changed, or removed one step), ' +\n 'rationale_set (write the human rationale for one release; additive, nothing is ever deleted), ' +\n 'threads (the discussion anchored to one release, or every open discussion on the flow), ' +\n 'note_add (add a message to a thread, or open a new one on a release), ' +\n 'knowledge (read what people wrote on the marks of a page in Tag Mode: one page, one mark, or the whole project). ' +\n 'Threads are resolved by a person in the app, never here: this tool can only add to a discussion. ' +\n 'Knowledge is read-only here for the same reason, and is addressed by frame and mark rather than by flow. ' +\n 'Steps are addressed as \"type.name\", the same form flow_simulate takes, for example \"destination.ga4\", ' +\n '\"transformer.router\", \"source.browser\", \"store.session\", or \"contract.checkout\" for a contract entry. ' +\n 'This tool carries history only: use flow_manage for the current config and package_get for step schemas.';\n\nconst ACTIONS = [\n 'releases',\n 'release_get',\n 'step_history',\n 'rationale_set',\n 'threads',\n 'note_add',\n 'knowledge',\n] as const;\n\n/**\n * The anchors a caller may name here: the stored vocabulary MINUS `page`.\n *\n * A `page` anchor hangs on a FRAME, and every action here that opens a thread\n * opens it on a flow. The flow's threads response is parsed on the way out, so\n * a single page-anchored flow thread written from here would make the read fail\n * its own parse from then on, permanently, for everyone. Fencing the write is\n * what keeps that row from ever existing. Notes on a frame are written where\n * the frame is, never here.\n *\n * `satisfies` is the fence: the list is proved to be values the response\n * schemas can carry, so a member that only the storage layer knows about\n * cannot be added here without the wire contract moving first.\n */\nconst TOOL_ANCHOR_TYPES = [\n 'step',\n 'entity_action',\n 'release',\n 'contract',\n 'tag',\n] as const satisfies readonly ThreadAnchorType[];\n\n/**\n * One flat schema with an `action` enum and per-action optional fields, the\n * shape `flow_manage`, `project_manage`, and `secret_manage` already use.\n * Per-action requirements are enforced in the handler, so later actions add a\n * field and an enum member without reshaping what callers already send.\n *\n * Exported so the declarative registry holds the same object rather than a\n * second copy of it.\n */\nexport const HUB_MANAGE_INPUT_SCHEMA = {\n action: z\n .enum(ACTIONS, {\n error: () => `Unknown action. Use one of: ${ACTIONS.join(', ')}`,\n })\n .describe('Which part of the release history to read or write'),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional: falls back to the default project when omitted.',\n ),\n flowId: z\n .string()\n .optional()\n .describe(\n 'Flow ID (flow_...). Required for every action except \"knowledge\", which hangs on a page rather than a flow and refuses this field.',\n ),\n versionId: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Release version ID (ver_...) from action \"releases\". Addresses one release for release_get and rationale_set. Pass this or versionNumber.',\n ),\n versionNumber: z\n .number()\n .int()\n .positive()\n .optional()\n .describe(\n 'Spine release number for this flow, the `versionNumber` field of action \"releases\". Alternative to versionId. Not the same as a row\\'s deploymentAttempt.',\n ),\n step: z\n .string()\n .optional()\n .describe(\n 'Step key as \"type.name\", e.g. \"destination.ga4\" or \"contract.checkout\". Required for step_history.',\n ),\n flow: z\n .string()\n .optional()\n .describe(\n 'Named flow inside the config, e.g. \"web\" or \"server\". Optional for step_history: omit to scan every named flow. Ignored for contract steps, which are top-level.',\n ),\n text: z\n .string()\n // Trimmed BEFORE the checks. Whitespace-only text otherwise satisfies\n // min(1) and then normalizes to empty downstream, which stores a blank\n // message, and on `rationale_set` reaches the annotation writer where\n // empty means CLEAR: the delete this additive-only tool does not have.\n .trim()\n .min(1)\n .max(MAX_ANNOTATION_TEXT_LENGTH)\n .optional()\n .describe(\n `The text to write (1-${MAX_ANNOTATION_TEXT_LENGTH} chars). Required for rationale_set and note_add. As rationale it replaces the note already on the release and never touches the machine summary; as a note it is appended to a thread and nothing is ever replaced.`,\n ),\n limit: z\n .number()\n .int()\n .positive()\n .optional()\n .describe(\n `Page size. Releases to list for action \"releases\" (max 100), or releases to SCAN for step_history (max ${MAX_STEP_HISTORY_LIMIT}). For step_history this bounds releases, not entries: a step present in several named flows yields one entry per flow per release, and the scan stops at ${MAX_STEP_HISTORY_ENTRIES} entries with entriesTruncated set. Narrow with \"flow\" to avoid that. For threads it bounds threads, and a read that carries messages is held to ${MAX_THREADS_WITH_MESSAGES} of them. Knowledge entries are bounded the same way.`,\n ),\n offset: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe('Releases to skip. Action \"releases\" only.'),\n anchorType: z\n .enum(TOOL_ANCHOR_TYPES)\n .optional()\n .describe(\n 'What a thread hangs on. Defaults to \"release\", the only anchor the app writes today. Pair it with anchorKey; a key means a different thing under each type.',\n ),\n anchorKey: z\n .string()\n .min(1)\n .max(MAX_ANCHOR_KEY_LENGTH)\n .optional()\n .describe(\n 'What the anchor addresses within its type: a release version ID (ver_...) for \"release\", a \"type.name\" step key for \"step\". For a release you can pass versionId or versionNumber instead. Omit entirely on action \"threads\" to read every thread on the flow.',\n ),\n anchorLabel: z\n .string()\n .min(1)\n .max(MAX_ANCHOR_LABEL_LENGTH)\n .optional()\n .describe(\n 'How the anchor reads on screen, stored once when a thread is opened so a later rename leaves it readable. Derived for a release (\"v14\"); pass it only when opening a thread on another anchor type.',\n ),\n threadId: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Thread ID (thr_...) from action \"threads\". Pass it to note_add to reply in that thread; omit it to open a new thread on the anchor.',\n ),\n status: z\n .enum(THREAD_STATUSES)\n .optional()\n .describe(\n 'Read only threads in this state. Action \"threads\" only; omit for both.',\n ),\n pageKey: z\n .string()\n .min(1)\n .max(MAX_SOURCE_KEY_LENGTH)\n .optional()\n .describe(\n 'The page a note was left on, as Tag Mode addressed it, usually the page URL. Narrows action \"knowledge\" to every frame that page holds, at any depth; omit it to read the whole project.',\n ),\n frameId: z\n .string()\n .regex(FRAME_ID_PATTERN)\n .optional()\n .describe(\n 'One frame (frm_...), the named rectangle a note hangs on. Action \"knowledge\" only. Narrower than pageKey, since a page holds several frames.',\n ),\n markId: z\n .string()\n .min(1)\n .max(MAX_MARK_ID_LENGTH)\n .optional()\n .describe(\n 'One tag within \"frameId\", by its tag id (the id of an entry in frame_manage marks.tags). Action \"knowledge\" only, and refused without frameId, since a mark id alone addresses nothing. Naming a mark is also what attaches the message bodies.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: false,\n destructiveHint: false,\n // False because of `note_add`, which APPENDS. `rationale_set` is an upsert\n // and repeating it is harmless, but this block covers the whole tool, and a\n // client that retries a timed-out call on the strength of an idempotent hint\n // would post the same remark twice into a human discussion. Nothing here is\n // destructive either way: a duplicate message can be read past, and there is\n // no delete to undo it with.\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\n/**\n * Hints carry the verb ladder rather than the description. One constant per\n * sentence the tool can emit, so the surface fixture pins wording and ordering\n * by name and a reword fails a test instead of drifting.\n */\nexport const HUB_HINT_RELEASE_GET =\n 'Use action \"release_get\" with a versionId or versionNumber to read one release in full, with its diff.';\nexport const HUB_HINT_ROWS_ARE_DEPLOYMENTS =\n 'Rows are deployments, not releases: the same versionId on several rows is a redeploy of identical content, so count distinct versionId values, and note that total counts deployments.';\nexport const HUB_HINT_STEP_HISTORY =\n 'Use action \"step_history\" to see which releases touched one step.';\nexport const HUB_HINT_MASKED_ONLY =\n 'The diff is empty because the only changes are inside masked values. Say that the change is not visible here rather than that nothing changed.';\nexport const HUB_HINT_TRACE_STEP =\n 'Use action \"step_history\" to trace one step across releases.';\nexport const HUB_HINT_WRITE_RATIONALE =\n 'This release has no human rationale. Read the diff, then use action \"rationale_set\" to record why it changed.';\nexport const HUB_HINT_SCAN_CAPPED =\n 'The scan stopped at the entry cap, so older releases were not compared. Narrow with \"flow\" to see the whole history of one occurrence.';\nexport const HUB_HINT_NO_MATCH =\n 'No scanned release touched this step. Check the step key against knownSteps, or raise limit to scan further back.';\nexport const HUB_HINT_OPEN_RELEASE =\n 'Use action \"release_get\" on one of these versionIds to read the full diff and rationale.';\nexport const HUB_HINT_RATIONALE_VISIBLE =\n 'The rationale is now visible on this release in the app.';\nexport const HUB_HINT_CONFIRM_INDEX =\n 'Use action \"releases\" to confirm it appears in the index.';\nexport const HUB_HINT_THREADS_PAGE_CAPPED = `More threads match than were returned (the page is capped at ${MAX_THREADS_WITH_MESSAGES} when messages are attached). Narrow with anchorType and anchorKey, or with status, rather than treating this as the complete list.`;\nexport const HUB_HINT_NOTHING_DISCUSSED =\n 'Nothing is being discussed on this flow. Use action \"note_add\" with a versionId to start a thread on a release.';\nexport const HUB_HINT_NO_THREAD_ON_ANCHOR =\n 'No thread hangs on this anchor yet. Use action \"note_add\" to open one.';\nexport const HUB_HINT_THREADS_INDEX =\n 'This is an index: message bodies are omitted. Pass a versionId, or anchorType with anchorKey, to read one discussion in full.';\nexport const HUB_HINT_MESSAGES_TRUNCATED =\n 'A thread here is marked hasMoreMessages: only its newest messages were returned. Say the discussion is longer than what you read rather than summarizing it as complete.';\nexport const HUB_HINT_REPLY_OR_OPEN =\n 'Use action \"note_add\" with a threadId to reply in one of these threads, or without one to open another.';\nexport const HUB_HINT_RESOLVE_IN_APP =\n 'Resolving a thread into a release is done by a person in the app, not through this tool.';\nexport const HUB_HINT_MESSAGE_VISIBLE =\n 'The message is now visible in this thread in the app.';\nexport const HUB_HINT_STAYS_RESOLVED =\n 'This thread is resolved and stayed resolved: a reply never retracts the release link.';\nexport const HUB_HINT_READ_BACK =\n 'Use action \"threads\" to read the discussion back.';\nexport const HUB_HINT_THREAD_OPEN =\n 'The thread is now open on this anchor in the app.';\nexport const HUB_HINT_KEEP_ONE_THREAD =\n 'Pass its threadId back to action \"note_add\" to keep the conversation in one place instead of opening another thread.';\nexport const HUB_HINT_KNOWLEDGE_PAGE_CAPPED =\n 'More knowledge matches than was returned. Narrow with pageKey, then frameId, then markId, rather than treating this as everything that was written.';\nexport const HUB_HINT_NOTHING_WRITTEN =\n 'Nothing has been written here. Notes are left on the page in Tag Mode, not through this tool.';\nexport const HUB_HINT_KNOWLEDGE_INDEX =\n 'This is an index: message bodies are omitted. Pass markId with frameId to read one mark in full.';\nexport const HUB_HINT_ENTRY_NAMES_FLOW =\n 'An entry names the flow it was written against in flowId, and validity says which release was live at the time.';\nexport const HUB_HINT_KNOWLEDGE_READ_ONLY =\n 'This tool only reads knowledge. Answering a note, and settling it, are done by a person in the app.';\nexport const HUB_HINT_READ_FRAME =\n 'Use frame_manage action \"get\" with the frameId to read the frame and its marks.';\nexport const HUB_NOT_FOUND_HINT =\n 'Use action \"releases\" to find version ids and action \"threads\" to find thread ids.';\n\n/**\n * The same shape the transport validates against, applied again here.\n *\n * The MCP SDK does parse arguments before invoking a tool callback, but that\n * parse happens in whichever SDK copy the host linked, and this module's spec\n * is deliberately drivable without a transport at all. Parsing here is what\n * keeps the 4000-char cap and the additive-only guarantee inside this file:\n * `text: null` would otherwise reach the annotation writer, where null means\n * CLEAR, and quietly become the delete action this tool does not have.\n */\nconst hubInputSchema = z.object(HUB_MANAGE_INPUT_SCHEMA);\n\ntype HubInput = z.infer<typeof hubInputSchema>;\n\n/**\n * Why a call was refused. Carried as `code` so an agent can branch on the\n * denial it is most likely to hit instead of matching prose. A denial the\n * server raises, such as FEATURE_NOT_AVAILABLE, arrives with its own code and\n * never needs a member here.\n */\nexport type HubToolErrorCode = 'INVALID_INPUT' | 'NOT_FOUND';\n\nexport class HubToolError extends Error {\n constructor(\n public readonly code: HubToolErrorCode,\n message: string,\n ) {\n super(message);\n this.name = 'HubToolError';\n }\n}\n\nfunction requireParam<T>(\n value: T | undefined,\n name: string,\n action: string,\n): T {\n if (value === undefined) {\n throw new HubToolError(\n 'INVALID_INPUT',\n `${name} is required for action \"${action}\"`,\n );\n }\n return value;\n}\n\n/**\n * Resolve the release address a caller gave. `versionId` wins when both are\n * present, so an explicit id is never silently reinterpreted as a number.\n */\nfunction releaseRef(input: HubInput, action: string): ReleaseRef {\n if (input.versionId !== undefined) return { versionId: input.versionId };\n if (input.versionNumber !== undefined) {\n return { versionNumber: input.versionNumber };\n }\n throw new HubToolError(\n 'INVALID_INPUT',\n `versionId or versionNumber is required for action \"${action}\". Use action \"releases\" to find one.`,\n );\n}\n\n/**\n * Stored annotation text is written by people and lands in third-party model\n * context, so it is wrapped as data. Ids, numbers, and timestamps stay literal:\n * the agent has to echo them back verbatim in the next call.\n */\nfunction serializeAnnotation(annotation: VersionAnnotationWire) {\n return {\n versionId: annotation.versionId,\n humanText:\n annotation.humanText === null ? null : wrapUserData(annotation.humanText),\n generatedSummary:\n annotation.generatedSummary === null\n ? null\n : wrapUserData(annotation.generatedSummary),\n author: annotation.author,\n createdAt: annotation.createdAt,\n updatedAt: annotation.updatedAt,\n };\n}\n\n/**\n * The scan result as an index. An entry's own rationale text is not surfaced\n * here: `release_get` is the detail read, and repeating every note across a\n * fifty-release scan would make this the opposite of an index.\n */\nfunction serializeStepHistory(history: StepHistoryWire) {\n return {\n step: history.step,\n flow: history.flow,\n entries: history.entries.map((entry) => ({\n versionId: entry.versionId,\n versionNumber: entry.versionNumber,\n createdAt: entry.createdAt,\n flow: entry.flow,\n change: entry.change,\n })),\n scanned: history.scanned,\n truncated: history.truncated,\n entriesTruncated: history.entriesTruncated,\n // Step keys and flow names are addresses the caller passes straight back,\n // so they stay literal for the same reason ids do.\n ...(history.knownSteps !== undefined && { knownSteps: history.knownSteps }),\n };\n}\n\n/**\n * Thread text is written by people and lands in third-party model context, so\n * message bodies and the anchor label are wrapped as data. Ids, the status, and\n * timestamps stay literal: the agent echoes them back in the next call.\n */\nfunction serializeThread(thread: HubThreadWire) {\n return {\n threadId: thread.id,\n anchorType: thread.anchorType,\n anchorKey: thread.anchorKey,\n anchorLabel: wrapUserData(thread.anchorLabel),\n status: thread.status,\n // The release that settled it, null while open AND once that release is\n // gone. `status` is what separates those two, never this field.\n resolvedByVersionId: thread.resolvedByVersionId,\n resolvedByVersionNumber: thread.resolvedByVersionNumber,\n resolvedBy: thread.resolvedBy,\n createdBy: thread.createdBy,\n createdAt: thread.createdAt,\n updatedAt: thread.updatedAt,\n messageCount: thread.messageCount,\n ...(thread.messages !== undefined\n ? {\n // Set when the thread holds more than this call carried. The tail is\n // the OLD end: what is here is always the newest exchange.\n hasMoreMessages: thread.hasMoreMessages === true,\n messages: thread.messages.map((message) => ({\n author: message.author,\n text: wrapUserData(message.text),\n createdAt: message.createdAt,\n })),\n }\n : {}),\n };\n}\n\n/**\n * Knowledge is written on a live page and lands in third-party model context,\n * so the description body, the message bodies, the anchor's label, the frame's\n * name and the author's display name are wrapped as data. Ids, keys, the\n * derived validity and freshness, and timestamps stay literal: the agent\n * addresses the next call with the first and branches on the rest.\n *\n * The spatial placement is dropped rather than serialized. Its `element` is an\n * opaque DOM anchor captured from the page, of unbounded size and shape, and\n * the fractional point beside it only means something to something that draws\n * the overlay. Neither tells a reader here anything, and the first is page\n * content this tool would then have to wrap.\n */\nfunction serializeKnowledge(entry: KnowledgeEntryWire) {\n const shared = {\n id: entry.id,\n anchorType: entry.anchorType,\n anchorKey: entry.anchorKey,\n anchorLabel: wrapUserData(entry.anchorLabel),\n frameId: entry.frameId,\n /** A person names a frame, so the name is page content like any other. */\n frameName: entry.frameName === null ? null : wrapUserData(entry.frameName),\n /** The flow it was written against, or null. Never a filter. */\n flowId: entry.flowId,\n subjectKey: entry.subjectKey,\n /** When it was true, and whether it still is. Derived at read time. */\n validity: entry.validity,\n freshness: entry.freshness,\n author: {\n kind: entry.author.kind,\n id: entry.author.id,\n label: wrapUserData(entry.author.label),\n },\n source: entry.source,\n updatedAt: entry.updatedAt,\n };\n\n if (entry.kind === 'description') {\n return { ...shared, kind: entry.kind, body: wrapUserData(entry.body) };\n }\n\n return {\n ...shared,\n kind: entry.kind,\n status: entry.status,\n createdAt: entry.createdAt,\n messageCount: entry.messageCount,\n ...(entry.messages !== undefined\n ? {\n // Set when the thread holds more than this call carried, and only\n // meaningful beside the messages it describes.\n hasMoreMessages: entry.hasMoreMessages === true,\n messages: entry.messages.map((message) => ({\n author: message.author,\n text: wrapUserData(message.text),\n createdAt: message.createdAt,\n })),\n }\n : {}),\n };\n}\n\nasync function handleReleases(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const { releases, total } = await client.listReleases({\n projectId,\n flowId,\n ...(input.limit !== undefined && { limit: input.limit }),\n ...(input.offset !== undefined && { offset: input.offset }),\n });\n\n // The screen this index is of. Structured rather than only mentioned in a\n // hint, so an agent can hand it on as data instead of re-typing it out of\n // prose. Named `appUrl`, the one key every tool here emits a link under, so\n // it can never collide with a `url` that some response already uses for\n // something of its own.\n const appUrl = links.release({\n baseUrl: client.appBaseUrl(),\n projectId,\n flowId,\n });\n\n return mcpResult(\n {\n releases: releases.map((release) => ({\n // The spine address. `release_get` and `rationale_set` take this pair\n // and nothing else.\n versionId: release.flowVersionId,\n versionNumber: release.flowVersionNumber,\n deployment: release.deploymentSlug,\n deploymentType: release.deploymentType,\n // The publish attempt within that deployment lineage. Deliberately NOT\n // called a version: it addresses nothing in this tool, and a row\n // carrying two numbers both named \"version\" is a trap.\n deploymentAttempt: release.versionNumber,\n status: release.status,\n source: release.source,\n errorCode: release.errorCode,\n createdAt: release.createdAt,\n createdBy: release.createdBy,\n rationale: release.rationale\n ? {\n hasHumanText: release.rationale.hasHumanText,\n hasGeneratedSummary: release.rationale.hasGeneratedSummary,\n firstLine:\n release.rationale.firstLine === null\n ? null\n : wrapUserData(release.rationale.firstLine),\n }\n : null,\n })),\n total,\n ...(appUrl !== undefined && { appUrl }),\n },\n {\n next: [\n HUB_HINT_RELEASE_GET,\n HUB_HINT_ROWS_ARE_DEPLOYMENTS,\n HUB_HINT_STEP_HISTORY,\n ],\n },\n );\n}\n\nasync function handleReleaseGet(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const release = await client.getRelease({\n projectId,\n flowId,\n ref: releaseRef(input, 'release_get'),\n });\n\n // The rendered diff is built from MASKED content, so an empty diff does not\n // mean the releases are the same: a change confined to an inline secret\n // renders as nothing. `contentIdentical` is decided over unmasked content,\n // so it is the only trustworthy identity signal, and the gap between the two\n // is stated rather than left for the reader to infer.\n const contentIdentical =\n release.diff !== null && release.diff.contentIdentical;\n const maskedOnly =\n release.diff !== null && release.diff.text === '' && !contentIdentical;\n\n return mcpResult(\n {\n versionId: release.versionId,\n versionNumber: release.versionNumber,\n contentHash: release.contentHash,\n createdAt: release.createdAt,\n createdBy: release.createdBy,\n rationale: release.rationale\n ? serializeAnnotation(release.rationale)\n : null,\n diff: release.diff\n ? {\n prevVersionId: release.diff.prevVersionId,\n prevVersionNumber: release.diff.prevVersionNumber,\n // Config values are user-authored, and inline secrets are masked\n // before the text is built.\n text:\n release.diff.text === '' ? null : wrapUserData(release.diff.text),\n /** Compared over unmasked content, so this is the real answer. */\n contentIdentical,\n note: maskedOnly\n ? 'These releases differ, but only inside values that are masked in the diff, typically inline secrets. Do not report this release as unchanged.'\n : null,\n }\n : null,\n diffUnavailable: release.diff\n ? null\n : 'This is the flow’s oldest release, so there is nothing to diff it against.',\n },\n {\n next: maskedOnly\n ? [HUB_HINT_MASKED_ONLY]\n : release.rationale?.humanText\n ? [HUB_HINT_TRACE_STEP]\n : [HUB_HINT_WRITE_RATIONALE],\n },\n );\n}\n\nasync function handleStepHistory(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const step = requireParam(input.step, 'step', 'step_history');\n\n const history = await client.listStepHistory({\n projectId,\n flowId,\n step,\n ...(input.flow !== undefined && { flow: input.flow }),\n ...(input.limit !== undefined && { limit: input.limit }),\n });\n\n const next = history.entriesTruncated\n ? [HUB_HINT_SCAN_CAPPED]\n : history.entries.length === 0\n ? [HUB_HINT_NO_MATCH]\n : [HUB_HINT_OPEN_RELEASE];\n\n // The step on screen, linked only when the scan itself says the step is\n // still there.\n //\n // `history.flow` is the caller's own filter echoed back, unvalidated, so a\n // scan that named no flow gets no link (a step address without one resolves\n // to nothing in the app) and a scan that named a wrong one would otherwise\n // build an address the flow page opens and then refuses. Entries come back\n // newest first, so an empty scan found the step in no release at all, and a\n // newest entry of `removed` means the last thing that happened to it was its\n // removal. Both are exactly the cases the app answers with its \"not found in\n // this flow\" notice, and no link beats a link to a notice.\n //\n // The flow names on the ENTRIES are deliberately not used as the address\n // instead: they say where the step USED to live. What remains is a step\n // renamed since the newest release, which no signal in hand can catch; the\n // app names that on screen.\n const newest = history.entries[0];\n const stepIsLive = newest !== undefined && newest.change !== 'removed';\n const appUrl = stepIsLive\n ? links.step({\n baseUrl: client.appBaseUrl(),\n projectId,\n flowId,\n step: history.step,\n flow: history.flow,\n })\n : undefined;\n\n return mcpResult(\n {\n ...serializeStepHistory(history),\n ...(appUrl !== undefined && { appUrl }),\n },\n { next },\n );\n}\n\n/**\n * Every release address goes through the detail read, by id as much as by\n * number: it is the one call that proves the release belongs to THIS flow and\n * hands back the number the app shows. A sibling flow's id therefore meets\n * NOT_FOUND from the client before anything is written.\n */\nasync function resolveRelease(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n action: string,\n): Promise<ReleaseDetailWire> {\n return client.getRelease({\n projectId,\n flowId,\n ref: releaseRef(input, action),\n });\n}\n\nasync function handleRationaleSet(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const text = requireParam(input.text, 'text', 'rationale_set');\n const release = await resolveRelease(\n client,\n projectId,\n flowId,\n input,\n 'rationale_set',\n );\n\n const annotation = await client.setReleaseRationale({\n projectId,\n flowId,\n versionId: release.versionId,\n text,\n });\n\n return mcpResult(\n {\n versionId: annotation.versionId,\n versionNumber: release.versionNumber,\n rationale: serializeAnnotation(annotation),\n },\n { next: [HUB_HINT_RATIONALE_VISIBLE, HUB_HINT_CONFIRM_INDEX] },\n );\n}\n\n/** One anchor a thread hangs on, resolved from whatever the caller addressed. */\ninterface ResolvedAnchor {\n anchorType: ThreadAnchorType;\n anchorKey: string;\n anchorLabel: string;\n}\n\n/**\n * The anchor the caller addressed, or null when they addressed none.\n *\n * A release can be addressed the way every other action here takes one\n * (`versionId` / `versionNumber`), which is resolved through the flow so a\n * sibling flow's release is refused and the display label is derived from the\n * real release number rather than trusted from the caller. Any other anchor\n * type is taken as given: this tool cannot verify a step key against a config\n * it does not load, and a thread on a key that no longer exists is exactly what\n * `anchorLabel` and the unanchored bucket are for.\n */\nasync function resolveAnchor(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n action: string,\n): Promise<ResolvedAnchor | null> {\n const type = input.anchorType ?? 'release';\n\n if (type === 'release') {\n if (input.versionId === undefined && input.versionNumber === undefined) {\n if (input.anchorKey === undefined) return null;\n // An explicit key for a release anchor still has to be a release of this\n // flow, or the thread would point at nothing readable.\n const byKey = await client.getRelease({\n projectId,\n flowId,\n ref: { versionId: input.anchorKey },\n });\n return {\n anchorType: 'release',\n anchorKey: byKey.versionId,\n anchorLabel: `v${byKey.versionNumber}`,\n };\n }\n\n const release = await resolveRelease(\n client,\n projectId,\n flowId,\n input,\n action,\n );\n return {\n anchorType: 'release',\n anchorKey: release.versionId,\n anchorLabel: `v${release.versionNumber}`,\n };\n }\n\n if (input.anchorKey === undefined) return null;\n return {\n anchorType: type,\n anchorKey: input.anchorKey,\n anchorLabel: input.anchorLabel ?? input.anchorKey,\n };\n}\n\nasync function handleThreads(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const anchor = await resolveAnchor(\n client,\n projectId,\n flowId,\n input,\n 'threads',\n );\n\n // Message bodies come back only for ONE anchor. A whole-flow listing is an\n // index, and carrying every word ever written on every anchor would make it\n // the opposite of one.\n const { threads, hasMoreThreads } = await client.listThreads({\n projectId,\n flowId,\n includeMessages: anchor !== null,\n ...(anchor !== null\n ? { anchorType: anchor.anchorType, anchorKey: anchor.anchorKey }\n : {}),\n ...(input.status !== undefined && { status: input.status }),\n ...(input.limit !== undefined && {\n limit: Math.min(input.limit, MAX_THREAD_LIMIT),\n }),\n });\n\n const truncated = threads.some((thread) => thread.hasMoreMessages === true);\n\n // The page ceiling is not what the caller asked for: a read that carries\n // message bodies is clamped hard. Saying so keeps an agent from reporting a\n // truncated page as the whole of a flow's discussion.\n const pageHint = hasMoreThreads ? [HUB_HINT_THREADS_PAGE_CAPPED] : [];\n\n const next =\n threads.length === 0\n ? [\n anchor === null\n ? HUB_HINT_NOTHING_DISCUSSED\n : HUB_HINT_NO_THREAD_ON_ANCHOR,\n ]\n : anchor === null\n ? [...pageHint, HUB_HINT_THREADS_INDEX]\n : [\n ...pageHint,\n ...(truncated ? [HUB_HINT_MESSAGES_TRUNCATED] : []),\n HUB_HINT_REPLY_OR_OPEN,\n HUB_HINT_RESOLVE_IN_APP,\n ];\n\n // Where these are read. An anchored read links the anchor's own screen, and\n // only a release anchor can be addressed from the shape held here. An\n // unanchored read is the flow's whole discussion, which is read in the\n // release history, so it links that.\n const flowTarget = { baseUrl: client.appBaseUrl(), projectId, flowId };\n const appUrl =\n anchor === null\n ? links.release(flowTarget)\n : links.thread({ ...flowTarget, anchorType: anchor.anchorType });\n\n return mcpResult(\n {\n threads: threads.map(serializeThread),\n hasMoreThreads,\n ...(appUrl !== undefined && { appUrl }),\n },\n { next },\n );\n}\n\nasync function handleNoteAdd(\n client: ToolClient,\n projectId: string,\n flowId: string,\n input: HubInput,\n) {\n const text = requireParam(input.text, 'text', 'note_add');\n\n if (input.threadId !== undefined) {\n const thread = await client.addThreadMessage({\n projectId,\n flowId,\n threadId: input.threadId,\n text,\n });\n return mcpResult(\n { thread: serializeThread(thread) },\n {\n next: [\n HUB_HINT_MESSAGE_VISIBLE,\n thread.status === 'resolved'\n ? HUB_HINT_STAYS_RESOLVED\n : HUB_HINT_READ_BACK,\n ],\n },\n );\n }\n\n const anchor = await resolveAnchor(\n client,\n projectId,\n flowId,\n input,\n 'note_add',\n );\n if (anchor === null) {\n throw new HubToolError(\n 'INVALID_INPUT',\n 'note_add needs somewhere to write: pass threadId to reply, or versionId (or anchorType with anchorKey) to open a thread on an anchor.',\n );\n }\n\n const thread = await client.createThread({\n projectId,\n flowId,\n anchorType: anchor.anchorType,\n anchorKey: anchor.anchorKey,\n // A release anchor is labeled by the server from the release number, so the\n // label travels only for the other anchor types.\n ...(anchor.anchorType !== 'release' && { anchorLabel: anchor.anchorLabel }),\n text,\n });\n\n return mcpResult(\n { thread: serializeThread(thread) },\n { next: [HUB_HINT_THREAD_OPEN, HUB_HINT_KEEP_ONE_THREAD] },\n );\n}\n\nasync function handleKnowledge(\n client: ToolClient,\n projectId: string,\n input: HubInput,\n) {\n // Message bodies come back only for ONE mark, the rule `threads` follows for\n // one anchor: a page-wide or project-wide read is an index, and carrying\n // every word written on every mark would make it the opposite of one.\n const oneMark = input.markId !== undefined;\n\n // The server refuses a mark without its page rather than answering an\n // unnarrowed list, and that refusal carries its own code through mcpError.\n const { entries, hasMoreEntries } = await client.listKnowledge({\n projectId,\n includeMessages: oneMark,\n ...(input.pageKey !== undefined && { pageKey: input.pageKey }),\n ...(input.frameId !== undefined && { frameId: input.frameId }),\n ...(input.markId !== undefined && { markId: input.markId }),\n ...(input.limit !== undefined && { limit: input.limit }),\n });\n\n const truncated = entries.some(\n (entry) => entry.kind === 'thread' && entry.hasMoreMessages === true,\n );\n\n const pageHint = hasMoreEntries ? [HUB_HINT_KNOWLEDGE_PAGE_CAPPED] : [];\n\n const next =\n entries.length === 0\n ? [HUB_HINT_NOTHING_WRITTEN]\n : [\n ...pageHint,\n ...(oneMark\n ? truncated\n ? [HUB_HINT_MESSAGES_TRUNCATED]\n : []\n : [HUB_HINT_KNOWLEDGE_INDEX]),\n HUB_HINT_ENTRY_NAMES_FLOW,\n HUB_HINT_KNOWLEDGE_READ_ONLY,\n HUB_HINT_READ_FRAME,\n ];\n\n return mcpResult(\n { entries: entries.map(serializeKnowledge), hasMoreEntries },\n { next },\n );\n}\n\nexport async function hubManageHandler(client: ToolClient, rawInput: unknown) {\n try {\n // Parse, never assert: see the note on `hubInputSchema`. A raw ZodError\n // stringifies its whole issue list into `message`, so the issues are\n // rewritten as one readable line carrying the same code as every other\n // refusal here.\n const parsed = hubInputSchema.safeParse(rawInput ?? {});\n if (!parsed.success) {\n throw new HubToolError('INVALID_INPUT', inputIssuesMessage(parsed.error));\n }\n const input: HubInput = parsed.data;\n const { action } = input;\n\n const projectId = resolveDefaultProject(client, input.projectId);\n if (!projectId) {\n throw new HubToolError('INVALID_INPUT', NO_DEFAULT_PROJECT_ERROR);\n }\n\n if (action === 'knowledge') {\n // Nothing here narrows knowledge by flow. Taking the field and answering\n // with every page's notes anyway is the failure mode this refuses: the\n // caller asked for one flow's and would read the answer as that.\n if (input.flowId !== undefined) {\n throw new HubToolError(\n 'INVALID_INPUT',\n 'flowId does not narrow action \"knowledge\", which is addressed by frame and mark: pass pageKey, frameId or markId instead. Each entry names the flow it was written against.',\n );\n }\n return await handleKnowledge(client, projectId, input);\n }\n\n const flowId = requireParam(input.flowId, 'flowId', action);\n\n switch (action) {\n case 'releases':\n return await handleReleases(client, projectId, flowId, input);\n case 'release_get':\n return await handleReleaseGet(client, projectId, flowId, input);\n case 'step_history':\n return await handleStepHistory(client, projectId, flowId, input);\n case 'rationale_set':\n return await handleRationaleSet(client, projectId, flowId, input);\n case 'threads':\n return await handleThreads(client, projectId, flowId, input);\n case 'note_add':\n return await handleNoteAdd(client, projectId, flowId, input);\n }\n } catch (error) {\n // `mcpError` lifts a `code` property off the error, so a HubToolError and\n // whatever the client raises both surface their code without a branch here.\n return mcpError(error, errorHint(error, 'hub', HUB_NOT_FOUND_HINT));\n }\n}\n\n/**\n * The tool as data, so it can be driven without an MCP transport (tests, and\n * any in-process bridge).\n */\nexport function createHubManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'hub_manage',\n title: TITLE,\n description: HUB_MANAGE_DESCRIPTION,\n inputSchema: HUB_MANAGE_INPUT_SCHEMA,\n annotations,\n handler: (input) => hubManageHandler(client, input),\n };\n}\n\nexport function registerHubManageTool(server: McpServer, client: ToolClient) {\n const spec = createHubManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => hubManageHandler(client, args),\n );\n}\n","import { isAuthError, AUTH_HINT } from '../types.js';\n\n/** The code every door answers a plan or project gate with. */\nexport const FEATURE_NOT_AVAILABLE = 'FEATURE_NOT_AVAILABLE';\n\n/** The features a door can refuse a whole tool for. */\nexport type GatedFeature = 'hub' | 'frames';\n\nfunction codeOf(error: unknown): string | undefined {\n if (!(error instanceof Error) || !('code' in error)) return undefined;\n const code = error.code;\n return typeof code === 'string' ? code : undefined;\n}\n\n/**\n * A denial is recognised by its code, never by its wording: the two doors phrase\n * the refusal differently and only the code is contractual.\n */\nexport function isFeatureDenial(error: unknown): boolean {\n return codeOf(error) === FEATURE_NOT_AVAILABLE;\n}\n\n/**\n * Names the feature so an agent can tell the person what is missing. Enabling\n * it is a plan or project entitlement change made in the app, never something\n * a tool can do, and the hint says so instead of inviting a retry.\n */\nexport function featureDenialHint(feature: GatedFeature): string {\n return `The \"${feature}\" feature is not enabled for this project. Tell the person that \"${feature}\" needs a plan or project entitlement that unlocks it, which is changed in the app, not through this tool.`;\n}\n\n/**\n * One hint rule for the gated tools: a feature denial names the feature, an\n * auth failure points at the auth tool, a NOT_FOUND points at discovery, and\n * anything else carries no hint.\n *\n * Order matters, though not because of the HTTP status: `isAuthError` reads the\n * error's code and the words in its message, never a status. A denial carries\n * its own code, but its MESSAGE is a door's free choice, and one worded\n * \"Forbidden\" is a message `isAuthError` answers to. Reading the specific\n * reason first is what keeps such a denial from being reported as a login\n * problem the person could fix by logging in again.\n */\nexport function errorHint(\n error: unknown,\n feature: GatedFeature,\n notFoundHint: string,\n): string | undefined {\n if (isFeatureDenial(error)) return featureDenialHint(feature);\n if (isAuthError(error)) return AUTH_HINT;\n if (codeOf(error) === 'NOT_FOUND') return notFoundHint;\n return undefined;\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { redactNestedStrings, wrapUserData } from '../user-data.js';\nimport type { ToolClient, FrameLeanWire, FrameWire } from '../tool-client.js';\nimport type { ToolSpec } from '../tool-spec.js';\nimport { inputIssuesMessage } from './parse-input.js';\nimport {\n validateActionInput,\n assertParam,\n FRAME_MANAGE_REQUIREMENTS,\n} from '../action-requirements.js';\nimport {\n NO_DEFAULT_PROJECT_ERROR,\n resolveDefaultProject,\n} from './project-context.js';\nimport { errorHint } from './feature-gate.js';\n\n/**\n * `frame_manage`: the place dimension of a measurement plan over MCP.\n *\n * A frame is a named rectangle over a page, with marks inside it. It answers\n * WHERE something is measured, which nothing else on this surface carries:\n * `flow_manage` holds the config, `hub_manage` holds the history and the\n * reasoning, and this holds the drawing those two are argued about on.\n *\n * Read-only, on purpose. A frame is drawn against a live page or an import,\n * and its geometry only means anything next to the pixels it was drawn on.\n * A tool that cannot see the page cannot place a rectangle on it, so writing\n * one from here would be guessing. Editing happens in Tag Mode or the app.\n *\n * Reads are progressive, the same ladder `hub_manage` uses. `list` is the lean\n * project index and never carries marks, because the marks of a whole project\n * are the largest thing this tool could return and are almost never what a\n * caller wanted. `page` opens one page's frames with their marks, and `get`\n * opens exactly one frame.\n *\n * It composes with `hub_manage` through ids: a tag id read here is the\n * `markId` that tool's \"knowledge\" action takes, which is why tag ids stay\n * literal while everything else inside the marks is wrapped as user data.\n */\n\n// Caps and patterns the server enforces. Duplicated here so the schema can\n// describe them; the app's src/lib/api/schemas/frames.ts is the authority.\nconst FRAME_ID_PATTERN = /^frm_[A-Za-z0-9_-]{21}$/;\nconst MAX_PAGE_KEY_CHARS = 1024;\n\nconst TITLE = 'Frames';\n\n/**\n * Exported so a host asserts parity against this exact string instead of\n * retyping it.\n */\nexport const FRAME_MANAGE_DESCRIPTION =\n 'Read the frames of a measurement plan: named rectangles with marks inside them, drawn in Tag Mode or in the app. ' +\n 'Actions: list (every frame of the project, without marks), page (the frames of one page at any depth, with marks), get (one frame with its marks). ' +\n 'Read-only: frames are drawn and edited in Tag Mode or the app, never here. ' +\n 'A frame name is documentation; the marks inside it carry the meaning. A frame that extends another stores only what it adds, so its tags may carry only the fields they change. ' +\n 'Marks are { tags, note }: tags is one flat list of tags, each with an id, a kind such as entity, property or action, a name, and a parentId naming the tag it sits under; note is the frame’s own description and thread. ' +\n 'Use hub_manage action \"knowledge\" with a frameId or markId to read what people wrote on a frame. ' +\n 'A markId is a tag id: a tag’s id, parentId and threadRef come back literal when they have the shape the app mints, so they can be passed straight back; every other string value in the marks is wrapped as data, and so is an object key that is not a plain identifier.';\n\n/**\n * Exported so the declarative registry holds the same object rather than a\n * second copy of it.\n */\nexport const FRAME_MANAGE_INPUT_SCHEMA = {\n action: z\n .enum(['list', 'page', 'get'])\n .describe(\n 'list the project’s frames, read one page with marks, or read one frame',\n ),\n projectId: z\n .string()\n .optional()\n .describe(\n 'Project ID. Optional: falls back to the default project when omitted.',\n ),\n pageKey: z\n .string()\n .min(1)\n .max(MAX_PAGE_KEY_CHARS)\n .optional()\n .describe(\n 'The page as its frames address it (the `source.key` of a page frame, usually the page URL without query). Required for page.',\n ),\n frameId: z\n .string()\n .regex(FRAME_ID_PATTERN)\n .optional()\n .describe(\n 'Frame ID (frm_...). Required for get. Use action \"list\" or \"page\" to find one.',\n ),\n};\n\nconst annotations = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\n/**\n * Hints carry the verb ladder rather than the description. One constant per\n * sentence the tool can emit, so the surface fixture pins wording and ordering\n * by name and a reword fails a test instead of drifting.\n */\nexport const FRAME_HINT_OPEN_PAGE_OR_GET =\n 'Use action \"page\" with a pageKey (a frame’s source.key) to read a page with marks, or action \"get\" with a frameId.';\nexport const FRAME_HINT_NAMES_ARE_DOCUMENTATION =\n 'Frame names are documentation; the marks inside a frame carry the meaning.';\nexport const FRAME_HINT_NONE_YET =\n 'This project has no frames yet. Frames are drawn in Tag Mode or the app, not through this tool.';\nexport const FRAME_HINT_MARK_SPACE =\n 'Tag geometry is fractional: a rect is 0..1 of its frame, and an at is 0..1 of its parent tag’s box, or of the frame for a root tag; a child frame sits inside its parent through placements[].rect.';\nexport const FRAME_HINT_READ_KNOWLEDGE =\n 'Use hub_manage action \"knowledge\" with frameId (and markId) to read what people wrote here. A markId is a tag id from these marks, and a tag’s threadRef is the id of its thread entry there.';\nexport const FRAME_HINT_NONE_ON_PAGE =\n 'No frames on this page. Check the pageKey against the source.key values from action \"list\".';\nexport const FRAME_HINT_EXTENDS_BASE =\n 'This frame extends another and stores only what it adds; read the base frame (extends) for the rest.';\nexport const FRAME_NOT_FOUND_HINT =\n 'Use action \"list\" or \"page\" to find frame ids.';\n\n/**\n * The two source keys that stay literal, and only those. `kind` is the\n * discriminator a reader branches on, and `key` is the pageKey the `page`\n * action takes, so it has to be echoed back verbatim. Every other string in a\n * source is text a reader only ever looks at: the page `url`, and the `fileKey`\n * and `nodeId` of an imported design. No action takes any of them, so they are\n * wrapped like any other value.\n */\nconst keepSourceAddress = (key: string): boolean =>\n key === 'kind' || key === 'key';\n\n/**\n * A placement's `selector` and `anchor` are opaque DOM anchors captured off a\n * live page, of unbounded size: page content a reader gains nothing from and\n * this tool would otherwise have to wrap. Only the rectangle is kept.\n *\n * `projectId` and `deletedAt` are dropped for a different reason: the caller\n * named the project, and a listing only ever carries live frames, so both\n * would be noise on every row.\n */\nfunction serializeLean(frame: FrameLeanWire) {\n return {\n id: frame.id,\n name: wrapUserData(frame.name),\n parentId: frame.parentId,\n extends: frame.extends,\n source: redactNestedStrings(frame.source, { skip: keepSourceAddress }),\n origin: frame.origin,\n flowId: frame.flowId,\n placements: frame.placements.map((placement) => ({\n id: placement.id,\n rect: placement.rect,\n })),\n size: frame.size,\n screenshot: frame.screenshot\n ? {\n assetId: frame.screenshot.assetId,\n capturedAt: frame.screenshot.capturedAt,\n size: frame.screenshot.size,\n dpr: frame.screenshot.dpr,\n capturedRect: frame.screenshot.capturedRect,\n }\n : null,\n version: frame.version,\n createdAt: frame.createdAt,\n updatedAt: frame.updatedAt,\n createdBy: frame.createdBy,\n updatedBy: frame.updatedBy,\n };\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * The rule for everything inside a marks document, in one place.\n *\n * - An ADDRESS stays literal, because another tool consumes it and it has to\n * be passed back exactly as it came. A sanitised address names a tag the app\n * never stored, so cleaning one trades a working lookup for a silent miss.\n * - Everything else is text a person or a page wrote, and is always wrapped,\n * so it cannot close the envelope and be read as instructions.\n *\n * Marks are a passthrough record: the server checks nothing inside them, so a\n * client writes whatever keys and values it likes, and a name that means\n * \"identifier\" in a flow config means nothing here. An address is therefore\n * decided by WHERE a value lives and by WHAT it looks like, never by the\n * spelling of its key alone.\n *\n * Where: a marks document is `{ tags, note }`. `tags` is one flat list of tags,\n * related through `parentId`, and `note` is the frame's own description and\n * thread. Only the top-level fields of a tag in that list, and of that note, can\n * be addresses. Below them nothing is, whatever it is called: `id` inside an\n * anchor is `el.id` read off the host page, and `id` on a thread message is a\n * row id no tool takes, so both are text like their siblings.\n *\n * What: a value in an address position stays literal only when it has the shape\n * the app mints for that address. Nothing upstream enforces the shape, so a\n * sentence stored under `id` is text and is wrapped like any other. A real\n * address that falls outside the shape comes back wrapped too, which costs a\n * lookup and never leaks an instruction.\n *\n * A key this file does not name, at any level, is walked as text. Object keys\n * are client-written too, so a key keeps its spelling only when it is a plain\n * identifier (see {@link markKey}); any other key is wrapped like a value.\n */\n\n/**\n * A tag id as the app mints it, and nothing wider:\n *\n * - `<prefix>_<n>` from the editor (`nextMarkId` in `tag-plan/frames.ts`,\n * `freshId` in `tag-plan/write.ts`);\n * - `e_<entity>`, `...#data.v<n>` and `...#action.<n>` from a contract or observed\n * events (`tag-plan/contract.ts`, `tag-plan/infer.ts`);\n * - `<entity>-<n>`, a nested `.../<entity>-<n>`, `...#data.<n>`, `...#action.<n>`,\n * `...#context.<n>`, `globals#<n>` and `page#action.<n>` from a page read\n * (`tag-plan/walker-plan.ts`).\n *\n * No colon, which keeps the hub key `<frameId>:<markId>` parseable, and no\n * whitespace, quote or angle bracket. An entity name outside `[A-Za-z0-9_-]`\n * makes the last two minters spell an id this does not match, which then wraps.\n */\nconst TAG_ID_PATTERN =\n /^[A-Za-z0-9_-]+(?:\\/[A-Za-z0-9_-]+)*(?:#(?:data\\.v?[0-9]+|action\\.[0-9]+|context\\.[0-9]+|[0-9]+))?$/;\n\n/** The longest mark id the hub accepts (`MAX_MARK_ID_LENGTH` in the app's\n * `src/lib/hub/knowledge.ts`), so a longer value cannot be a markId. */\nconst MAX_TAG_ID_CHARS = 200;\n\n/** A hub thread id as the app mints it: `thr_` plus a 21-character lowercase\n * alphanumeric nanoid (`src/lib/id.ts`, `src/lib/hub/knowledge.ts`). */\nconst THREAD_ID_PATTERN = /^thr_[a-z0-9]{21}$/;\n\nconst isTagId = (value: string): boolean =>\n value.length <= MAX_TAG_ID_CHARS && TAG_ID_PATTERN.test(value);\n\nconst isThreadId = (value: string): boolean => THREAD_ID_PATTERN.test(value);\n\n/** The fields of a tag that are addresses, each with the shape it must have. */\nconst TAG_ADDRESSES: ReadonlyMap<string, (value: string) => boolean> = new Map([\n // The tag id: the markId `hub_manage` action \"knowledge\" takes, which the\n // app joins to the frame id as the anchor key `<frameId>:<markId>`.\n ['id', isTagId],\n // The tag this one sits under, which is that tag's id: the only relation\n // between tags, so a reader joins it to `id` to rebuild the tree, and it is\n // a markId in its own right.\n ['parentId', isTagId],\n // The hub thread this tag's note thread became: the `id` of the thread\n // entry `hub_manage` action \"knowledge\" returns for this tag.\n ['threadRef', isThreadId],\n]);\n\n/** The fields of the frame note that are addresses. The note belongs to the\n * frame, which `hub_manage` addresses by frameId, so its one address is the hub\n * thread it became, read the same way as a tag's. */\nconst NOTE_ADDRESSES: ReadonlyMap<string, (value: string) => boolean> = new Map(\n [['threadRef', isThreadId]],\n);\n\n/** A key the app writes: a JavaScript-style identifier, dashes allowed for\n * attribute names, bounded in length. Such a key cannot close the envelope or\n * carry a sentence, so it stays readable. */\nconst MARK_KEY_PATTERN = /^[A-Za-z_$][A-Za-z0-9_$-]{0,63}$/;\n\n/** A marks key as it is handed back: literal when it has the shape of a key the\n * app writes, wrapped as data otherwise. */\nconst markKey = (key: string): string =>\n MARK_KEY_PATTERN.test(key) ? key : wrapUserData(key);\n\n/** Text below the addresses: every string wrapped, every key through\n * {@link markKey}. */\nfunction walkText(value: unknown): unknown {\n if (typeof value === 'string') return wrapUserData(value);\n if (Array.isArray(value)) return value.map(walkText);\n if (!isRecord(value)) return value;\n const out: Record<string, unknown> = {};\n for (const [key, child] of Object.entries(value)) {\n out[markKey(key)] = walkText(child);\n }\n return out;\n}\n\n/** Walks a marks document applying the rule above. */\nfunction walkMarks(marks: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(marks)) {\n if (key === 'tags' && Array.isArray(value)) {\n out[key] = value.map((tag) => walkAddressed(tag, TAG_ADDRESSES));\n } else if (key === 'note') {\n out[key] = walkAddressed(value, NOTE_ADDRESSES);\n } else {\n out[markKey(key)] = walkText(value);\n }\n }\n return out;\n}\n\n/**\n * One record whose own fields named in `addresses` stay literal when their\n * value has that address's shape. A value there without the shape, a string or\n * not, is not an address, so it is walked like anything else rather than passed\n * through unseen, and so is everything below the record's own fields. A value\n * that is not a record has no fields to address and is text.\n */\nfunction walkAddressed(\n value: unknown,\n addresses: ReadonlyMap<string, (value: string) => boolean>,\n): unknown {\n if (!isRecord(value)) return walkText(value);\n const out: Record<string, unknown> = {};\n for (const [key, field] of Object.entries(value)) {\n const isAddress = addresses.get(key);\n out[markKey(key)] =\n isAddress !== undefined && typeof field === 'string' && isAddress(field)\n ? field\n : walkText(field);\n }\n return out;\n}\n\nfunction serializeFrame(frame: FrameWire) {\n return {\n ...serializeLean(frame),\n marks: walkMarks(frame.marks),\n };\n}\n\n/**\n * The same shape the transport validates against, applied again here, on the\n * rule `hub_manage` states: this module's spec is deliberately drivable without\n * a transport, so the caps and the id pattern have to hold inside this file\n * rather than in whichever SDK copy a host linked.\n */\nconst frameInputSchema = z.object(FRAME_MANAGE_INPUT_SCHEMA);\n\n/**\n * Annotated so the `action` switch below is checked for exhaustiveness: a\n * member added to the enum without a case makes the function fall off its end,\n * which a declared non-undefined return type refuses.\n */\ntype FrameManageResult =\n | ReturnType<typeof mcpResult>\n | ReturnType<typeof mcpError>;\n\nasync function frameManageHandler(\n client: ToolClient,\n rawInput: unknown,\n): Promise<FrameManageResult> {\n // Parse, never assert: a raw ZodError stringifies its whole issue list into\n // `message`, so the issues are rewritten as one readable line.\n const parsed = frameInputSchema.safeParse(rawInput ?? {});\n if (!parsed.success) {\n return mcpError(new Error(inputIssuesMessage(parsed.error)));\n }\n const { action, projectId, pageKey, frameId } = parsed.data;\n const validationError = validateActionInput(\n 'frame_manage',\n action,\n { pageKey, frameId },\n FRAME_MANAGE_REQUIREMENTS,\n );\n if (validationError) return mcpError(new Error(validationError));\n\n try {\n const resolvedProjectId = resolveDefaultProject(client, projectId);\n if (!resolvedProjectId) {\n return mcpError(new Error(NO_DEFAULT_PROJECT_ERROR));\n }\n\n switch (action) {\n case 'list': {\n const { frames } = await client.listFrames({\n projectId: resolvedProjectId,\n });\n return mcpResult(\n { frames: frames.map(serializeLean) },\n {\n next:\n frames.length === 0\n ? [FRAME_HINT_NONE_YET]\n : [\n FRAME_HINT_OPEN_PAGE_OR_GET,\n FRAME_HINT_NAMES_ARE_DOCUMENTATION,\n ],\n },\n );\n }\n case 'page': {\n assertParam(pageKey, 'pageKey', 'page');\n const { frames } = await client.listPageFrames({\n projectId: resolvedProjectId,\n pageKey,\n });\n return mcpResult(\n { pageKey, frames: frames.map(serializeFrame) },\n {\n next:\n frames.length === 0\n ? [FRAME_HINT_NONE_ON_PAGE]\n : [FRAME_HINT_MARK_SPACE, FRAME_HINT_READ_KNOWLEDGE],\n },\n );\n }\n case 'get': {\n assertParam(frameId, 'frameId', 'get');\n const frame = await client.getFrame({\n projectId: resolvedProjectId,\n frameId,\n });\n return mcpResult(\n { frame: serializeFrame(frame) },\n {\n next:\n frame.extends !== null\n ? [FRAME_HINT_EXTENDS_BASE, FRAME_HINT_READ_KNOWLEDGE]\n : [FRAME_HINT_READ_KNOWLEDGE],\n },\n );\n }\n }\n } catch (error) {\n // `mcpError` lifts a `code` property off the error, so whatever the client\n // raises surfaces its code without a branch here.\n return mcpError(error, errorHint(error, 'frames', FRAME_NOT_FOUND_HINT));\n }\n}\n\n/**\n * The tool as data, so it can be driven without an MCP transport (tests, and\n * any in-process bridge).\n */\nexport function createFrameManageToolSpec(client: ToolClient): ToolSpec {\n return {\n name: 'frame_manage',\n title: TITLE,\n description: FRAME_MANAGE_DESCRIPTION,\n inputSchema: FRAME_MANAGE_INPUT_SCHEMA,\n annotations,\n handler: (input) => frameManageHandler(client, input),\n };\n}\n\nexport function registerFrameManageTool(server: McpServer, client: ToolClient) {\n const spec = createFrameManageToolSpec(client);\n server.registerTool(\n spec.name,\n {\n title: spec.title,\n description: spec.description,\n inputSchema: spec.inputSchema,\n annotations: spec.annotations,\n },\n (args) => frameManageHandler(client, args),\n );\n}\n","import { ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { fetchPackageSchema } from '@walkeros/core';\nimport { fetchCatalog, getPackageBaseUrl } from '../catalog.js';\n\nexport function registerPackageSchemaResources(server: McpServer) {\n const template = new ResourceTemplate('walkeros://schema/{packageName}', {\n list: async () => {\n const { entries } = await fetchCatalog({ baseUrl: getPackageBaseUrl() });\n return {\n resources: entries.map((pkg) => ({\n uri: `walkeros://schema/${encodeURIComponent(pkg.name)}`,\n name: pkg.name,\n description: `Schema and examples for ${pkg.name}`,\n mimeType: 'application/json' as const,\n })),\n };\n },\n });\n\n server.registerResource(\n 'package-schema',\n template,\n {\n title: 'walkerOS Package Schema',\n description:\n 'JSON Schema and configuration examples for walkerOS packages',\n mimeType: 'application/json',\n },\n async (uri, { packageName }) => {\n const info = await fetchPackageSchema(\n decodeURIComponent(packageName as string),\n );\n return {\n contents: [\n {\n uri: uri.toString(),\n mimeType: 'application/json' as const,\n text: JSON.stringify(info, null, 2),\n },\n ],\n };\n },\n );\n}\n","/**\n * Reference resources — pure schema and structural data only.\n *\n * Design principle: resources are loaded into context and should contain\n * only schemas, type definitions, and structural references. Behavioral\n * guidance, tutorials, and step-by-step instructions belong in prompts.\n * Vendor-specific examples belong in packages (fetched via package_get).\n */\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { schemas } from '@walkeros/core/dev';\nimport { fetchCatalog, getPackageBaseUrl } from '../catalog.js';\nimport type { ToolClient } from '../tool-client.js';\n\nconst OPENAPI_URI = 'walkeros://reference/openapi';\n\n/** The live OpenAPI document as text, or why it is unavailable. */\nasync function openapiText(\n client: ToolClient,\n): Promise<{ text: string; mimeType: string }> {\n if (!client.openapiDocument) {\n return {\n text: 'openapi document unavailable: no openapi document on this client',\n mimeType: 'text/plain',\n };\n }\n try {\n const document = await client.openapiDocument();\n return {\n text: JSON.stringify(document, null, 2),\n mimeType: 'application/json',\n };\n } catch (error) {\n const reason = error instanceof Error ? error.message : String(error);\n return {\n text: `openapi document unavailable: ${reason}`,\n mimeType: 'text/plain',\n };\n }\n}\n\nexport function registerReferenceResources(\n server: McpServer,\n client: ToolClient,\n) {\n // Flow Schema reference (generated from Zod)\n server.resource(\n 'flow-schema',\n 'walkeros://reference/flow-schema',\n {\n description:\n 'JSON Schema for Flow.Json — the complete flow configuration structure',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/flow-schema',\n text: JSON.stringify(schemas.configJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Event Model reference (generated from Zod)\n server.resource(\n 'event-model',\n 'walkeros://reference/event-model',\n {\n description:\n 'JSON Schema for walkerOS events: entity-action naming, data, context, globals, user, consent',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/event-model',\n text: JSON.stringify(schemas.eventJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Mapping reference (generated from Zod — composite of related schemas)\n server.resource(\n 'mapping',\n 'walkeros://reference/mapping',\n {\n description:\n 'JSON Schemas for walkerOS mapping: rules, valueConfig, rule, policy',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/mapping',\n text: JSON.stringify(\n {\n rules: schemas.rulesJsonSchema,\n valueConfig: schemas.valueConfigJsonSchema,\n rule: schemas.ruleJsonSchema,\n policy: schemas.policyJsonSchema,\n },\n null,\n 2,\n ),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Consent reference (generated from Zod)\n server.resource(\n 'consent',\n 'walkeros://reference/consent',\n {\n description:\n 'JSON Schema for walkerOS consent: destination-level, rule-level, and field-level consent gating',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/consent',\n text: JSON.stringify(schemas.consentJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Variables reference (hand-maintained — runtime interpolation patterns not captured in Zod schemas)\n server.resource(\n 'variables',\n 'walkeros://reference/variables',\n {\n description:\n 'walkerOS variable patterns: $var, $env, $contract, $code, $store, $secret substitution',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/variables',\n text: JSON.stringify(\n {\n separatorRule:\n '`.` for names and paths; `:` for literal values or raw-code payloads.',\n patterns: {\n '$var.name':\n 'Variable reference. Whole-string preserves native type (object, array, scalar). Inline interpolation requires a scalar. Reusable fragments (mapping templates, matcher lists, consent objects) live in the variables block and are referenced by name.',\n '$var.name.deep.path':\n 'Deep-path access into a structured variable. Walks nested keys/indices. Whole-string preserves type at the leaf; inline still requires a scalar leaf.',\n '$env.NAME':\n 'Environment variable, resolved at bundle/deploy time. $env.GA_ID reads process.env.GA_ID. Use for non-secret config (IDs, hostnames, regions), never for credentials.',\n '$env.NAME:default':\n 'Environment variable with fallback. $env.GA_ID:G-DEFAULT (the `:` is the literal default separator).',\n '$contract.name':\n 'Contract reference. Links to a named contract for validation.',\n '$contract.name.path':\n 'Nested contract access. $contract.ecommerce.product.',\n '$code:(expr)':\n 'Inline JavaScript. $code:(event) => event.data.price * 100 (the `:` carries the raw-code payload).',\n '$store.storeId':\n 'Store injection in env values. Wires runtime store access.',\n '$secret.NAME':\n 'Managed secret injection (created via the secret manager). The deploy pipeline detects $secret.NAME references and injects the secret value into the server runner’s environment at runtime. Use for credentials, tokens, and private keys. Server flows only; $env does NOT inject managed secrets.',\n },\n cascade: {\n priority: [\n '1. Step-level variables (highest)',\n '2. Flow-level variables',\n '3. Config-level variables (lowest)',\n ],\n example: {\n variables: {\n apiUrl: 'https://x.io',\n mapping: { id: 'data.id' },\n },\n flows: {\n production: {\n destinations: {\n api: {\n config: {\n url: '$var.apiUrl',\n idPath: '$var.mapping.id',\n },\n },\n },\n },\n },\n },\n },\n },\n null,\n 2,\n ),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Contract reference (generated from Zod)\n server.resource(\n 'contract',\n 'walkeros://reference/contract',\n {\n description:\n 'JSON Schema for walkerOS contracts: event schema validation with entity-action keying',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://reference/contract',\n text: JSON.stringify(schemas.contractJsonSchema, null, 2),\n mimeType: 'application/json',\n },\n ],\n }),\n );\n\n // Examples reference (loaded from @walkeros/cli at runtime)\n server.resource(\n 'examples',\n 'walkeros://reference/examples',\n {\n description:\n 'Complete, tested flow config (flow-complete.json): web, server and warehouse flows with mapping, consent, contracts, routes, state, stores and step examples. Its guide is examples/flow-complete.md in @walkeros/cli.',\n mimeType: 'application/json',\n },\n async () => {\n let example: string;\n try {\n const { readFileSync } = await import('fs');\n const { createRequire } = await import('module');\n const require = createRequire(import.meta.url);\n const examplePath =\n require.resolve('@walkeros/cli/examples/flow-complete.json');\n example = readFileSync(examplePath, 'utf-8');\n } catch {\n example = JSON.stringify({ error: 'Example not found' });\n }\n return {\n contents: [\n {\n uri: 'walkeros://reference/examples',\n text: example,\n mimeType: 'application/json',\n },\n ],\n };\n },\n );\n\n // The live OpenAPI 3.1 document of the app the client talks to, read on\n // each request, so it always describes the backend the tools reach.\n server.resource(\n 'openapi',\n OPENAPI_URI,\n {\n description:\n 'walkerOS cloud API: the live OpenAPI 3.1 document of the app this server talks to',\n mimeType: 'application/json',\n },\n async () => ({\n contents: [{ uri: OPENAPI_URI, ...(await openapiText(client)) }],\n }),\n );\n\n // Packages catalog resource\n server.resource(\n 'packages',\n 'walkeros://reference/packages',\n {\n description:\n 'Complete walkerOS package catalog — all sources, destinations, transformers, and stores',\n mimeType: 'application/json',\n },\n async () => {\n const { entries } = await fetchCatalog({ baseUrl: getPackageBaseUrl() });\n return {\n contents: [\n {\n uri: 'walkeros://reference/packages',\n text: JSON.stringify(entries, null, 2),\n mimeType: 'application/json',\n },\n ],\n };\n },\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nexport function registerAddStepPrompt(server: McpServer) {\n server.registerPrompt(\n 'add-step',\n {\n description:\n 'Add a source, destination, transformer, or store step to a flow configuration. ' +\n 'Guides through package selection, config scaffolding, and wiring.',\n argsSchema: {\n stepType: z\n .string()\n .optional()\n .describe(\n 'Type of step to add: source, destination, transformer, or store',\n ),\n flowPath: z\n .string()\n .optional()\n .describe('Path to the flow.json file to modify'),\n },\n },\n async ({ stepType, flowPath }) => ({\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: [\n `Help me add a ${stepType || 'new'} step to my flow${flowPath ? ` at ${flowPath}` : ''}.`,\n '',\n 'Follow these steps:',\n `1. ${stepType ? '' : 'Ask what type of step (source, destination, transformer, store). Then '}Use package_search to browse available packages for the selected type and platform.`,\n '2. Use package_get to read the package\\'s config schema (schemas.config contains the full config shape: base fields like consent/require/logger + package-specific settings). Use section=\"hints\" for additional guidance.',\n '3. Use package_get with section=\"examples\" to see working configuration examples.',\n '4. Scaffold the step config using the package schemas — include required settings with placeholder values.',\n '5. Wire the step into the flow: add to packages section (with version if needed), connect via next/before chains if needed.',\n '6. For destinations: configure mapping using nested entity → action keys. Event \"product add\" maps to `{ \"product\": { \"add\": { name: \"AddToCart\" } } }`. Use the setup-mapping prompt for guidance.',\n '7. For destinations: if consent-gated loading is needed, add require: [\"consent\"] to config. ' +\n 'Note: require delays initialization until a \"walker consent\" event fires. ' +\n 'When simulating with flow_simulate, destinations with require will error \"not found\" — ' +\n 'remove require temporarily or test without it. ' +\n 'For per-event consent filtering, add consent: { marketing: true } to config.',\n '8. Use flow_validate to verify the result.',\n '9. For server sources: check if the package supports `ingest` configuration via package_get. Ingest extracts request metadata (IP, user-agent, headers) using mapping syntax. Transformers like fingerprint depend on ingest data.',\n '10. When adding a transformer that uses ingest fields, verify the source has `ingest` configured — otherwise ingest fields resolve to empty values.',\n '',\n 'Important:',\n '- Read the walkeros://reference/flow-schema resource to understand connection rules.',\n '- Sources connect to transformers via `next` (runs before the collector).',\n '- The collector connects to transformers via `collector.next` (runs once per event before the destination fan-out, for every destination).',\n '- Destinations connect to transformers via `before` (runs for that destination only; put per-destination filtering here).',\n '- Routing uses one grammar in every chain field: string IDs, sequences (`[\"a\", \"b\"]`, where a member\\'s own `next` runs right after it), or RouteConfig (`{ match?, next }` for a gated link, `{ match?, one: [...] }` for first-match dispatch, `{ match?, many: [...] }` to fork each match into its own copy that finishes the rest of the path, `{ match?, stop: true }` to drop). A `stop` in `collector.next` drops the event for all destinations. Omit `match` for always-match.',\n '- A transformer entry can be code-bearing (`code`), package-bearing (`package`), or a **pass-through step** (no `code`, no `package`). Pass-through synthesis is automatic at runtime. Three flavors of pass-through: `before`/`next`-only (named hop reusable across destinations), `cache`-only (dedup, rate-limit), or `mapping`-only (declarative event-to-event transform). A pass-through must declare at least one of `before`, `next`, `cache`, or `mapping`.',\n '- The `mapping` field on a transformer step uses the same `Mapping.Config` shape as destinations, but the semantic is event-to-event (mutates the event in place via `policy`, per-rule `policy`, `mapping[].name` for renames, `mapping[].ignore` to drop). Vendor-payload fields (`data`, `silent`) are no-ops at this position.',\n '- Closed schema: unknown top-level keys on a transformer step are errors (catches typos like `dedup` instead of `cache`). `code` + `package` together is a conflict.',\n '- Stores are passive — referenced via `$store.storeName` in env values.',\n '- Use variables ($var) for values that change between environments.',\n '- For required settings without defaults in the package schema, ask the user which value to use. Do not guess credentials, IDs, or environment-specific values.',\n '- If $meta.exports lists named exports, set the `code` field on the step to the chosen export name. If only one export exists, use it automatically.',\n ].join('\\n'),\n },\n },\n ],\n }),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nexport function registerSetupMappingPrompt(server: McpServer) {\n server.registerPrompt(\n 'setup-mapping',\n {\n description:\n 'Set up event mapping for any step in a flow. Teaches mapping syntax and uses package examples as templates.',\n argsSchema: {\n stepName: z\n .string()\n .optional()\n .describe('Step name in the flow (e.g., \"gtag\", \"meta\", \"express\")'),\n },\n },\n async ({ stepName }) => ({\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: [\n `Help me set up mapping${stepName ? ` for the \"${stepName}\" step` : ''}.`,\n '',\n 'Follow these steps:',\n '1. Read the walkeros://reference/mapping resource for syntax reference.',\n `2. ${stepName ? `Identify the package for \"${stepName}\" in the flow, then u` : 'U'}se package_get with section=\"examples\" to see the source output shape — mapping keys must match the actual events the source emits.`,\n '3. Ask whether this is source mapping (raw input → walkerOS events) or destination mapping (walkerOS events → vendor format).',\n '4. Ask which events to map (one at a time, not all at once).',\n '5. Generate one mapping rule using the package examples as templates. Validate it with flow_validate before moving to the next.',\n '6. Repeat for each event.',\n '',\n 'Mapping uses nested entity → action keys. Event \"product add\" maps to `{ \"product\": { \"add\": Rule } }`. Wildcards: `{ \"*\": { \"view\": Rule } }`.',\n '',\n 'Extract shared mapping shapes into variables, reference via $var.name (deep paths supported).',\n '',\n 'Policy and consent in mapping:',\n '- config.policy runs BEFORE mapping rules — use it to inject or redact fields on the event.',\n '- rule.policy runs after config.policy but before data transformation — use for event-specific pre-processing.',\n '- config.consent gates ALL events to this destination. rule.consent gates specific event types.',\n '- Individual value configs support consent: { marketing: true } for field-level gating.',\n ].join('\\n'),\n },\n },\n ],\n }),\n );\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nexport function registerManageContractPrompt(server: McpServer) {\n server.registerPrompt(\n 'manage-contract',\n {\n description:\n 'Create or update event contracts for a flow. Can generate contracts from existing mappings or scaffold mappings from contracts.',\n argsSchema: {\n direction: z\n .string()\n .optional()\n .describe(\n 'Direction: \"from-mappings\" (extract contract from existing mappings), ' +\n '\"from-scratch\" (create new contract), or \"to-mappings\" (scaffold mappings from contract)',\n ),\n },\n },\n async ({ direction }) => ({\n messages: [\n {\n role: 'user' as const,\n content: {\n type: 'text' as const,\n text: [\n `Help me ${direction === 'to-mappings' ? 'scaffold mappings from a contract' : direction === 'from-mappings' ? 'generate a contract from existing mappings' : 'manage event contracts'}.`,\n '',\n 'Follow these steps:',\n '1. Read the walkeros://reference/contract resource to understand contract structure.',\n direction === 'from-mappings'\n ? '2. Read all destination mappings in the flow, extract referenced event fields, and generate a contract with those as required properties.'\n : direction === 'to-mappings'\n ? '2. Read the contract from the flow, then scaffold mapping stubs for each destination based on the contract fields.'\n : '2. Ask for entity-action names and required properties, or ask whether to generate from existing mappings.',\n '3. Use entity-action keying with wildcards (*.*, *.action, entity.*) for broad rules.',\n '4. Define JSON Schema for events, globals, context, custom, user, and consent.',\n '5. Use flow_validate to verify the contract.',\n '',\n 'Contracts and mappings are bidirectional:',\n '- **Contract → Mappings**: contract defines what events look like, mappings are scaffolded to match.',\n '- **Mappings → Contract**: existing mappings reveal which fields are used, contract formalizes them.',\n '',\n 'For server flows: if the contract references fields populated by ingest (e.g., user fingerprint hash), verify the source config.ingest extracts the needed request metadata.',\n '',\n 'Use $contract.name references to link contracts in the flow.',\n 'Contracts support extends for inheritance between event types.',\n ].join('\\n'),\n },\n },\n ],\n }),\n );\n}\n","export const SERVER_INSTRUCTIONS = `walkerOS is an open-source, privacy-first event data collection platform. Define event pipelines as code using JSON flow configurations.\n\n## Rules\n\n- **Never guess package names.** Always use \\`package_search\\` first to find exact names, then \\`package_get\\` for details.\n- **Never construct flow configs from memory.** Read \\`walkeros://reference/flow-schema\\` and use \\`package_get\\` for package-specific schemas.\n- **Always validate.** Run \\`flow_validate\\` after every config change. If validation fails, fix and re-validate. By default it checks every flow and step, package settings included; a valid result can still list \\`details.skipped\\` checks, so read them before trusting it (\\`strict: true\\` turns warnings and skips into failures: \\`valid\\` is false).\n- **Simulate before deploying.** Use \\`flow_simulate\\` to test with mocked API calls before \\`flow_bundle\\` or \\`flow_push\\`.\n- **When a request fails,** call \\`diagnostics\\` to see which MCP/CLI versions, app URL, and backend you are on, plus whether the app is reachable.\n\n## Workflow\n\n1. \\`auth({ action: \"status\" })\\` — check if logged in, or \\`auth({ action: \"login\" })\\` to connect\n2. \\`project_manage({ action: \"list\" })\\` — see your projects\n3. \\`flow_manage({ action: \"list\" })\\` — see all flows across projects\n4. \\`flow_load({ platform: \"web\" })\\` or \\`flow_load({ source: \"./flow.json\" })\\` — create or load\n5. \\`package_search({ type: \"destination\", platform: \"web\" })\\` — discover packages\n6. \\`package_get({ package: \"...\" })\\` — read schemas, hints, examples\n7. Use the \\`add-step\\` prompt — guided step addition\n8. Use the \\`setup-mapping\\` prompt — event transformation config\n9. \\`flow_validate({ type: \"flow\", input: \"flow.json\" })\\` — verify\n10. \\`flow_simulate({ configPath: \"flow.json\", event: \"...\" })\\` — test\n11. \\`flow_manage({ action: \"update\", flowId: \"...\", content: {...} })\\` — save to cloud\n12. \\`deploy_manage({ action: \"deploy\", flowId: \"...\" })\\` — deploy\n13. \\`observe_session({ action: \"start\", flowId: \"...\" })\\` - open an Observe session: a time-boxed window on one flow that runtimes attach to as arms\n14. \\`flow_manage({ action: \"preview_regrant\", flowId: \"...\", previewId: \"...\", origins: [...] })\\` - mint an activation link; minted while the flow is observed, it pairs with that Observe session automatically, so the previewed page streams into the same feed\n15. \\`observe_journeys({ flowId: \"...\" })\\` - read what arrived; it is the only read, and it never judges whether events are correct\n16. \\`hub_manage({ action: \"releases\", flowId: \"...\" })\\` - read what changed across releases and why; \\`release_get\\` carries a server-computed diff, \\`rationale_set\\` records why\n17. \\`frame_manage({ action: \"page\", pageKey: \"...\" })\\` - read the frames of a page with their marks; read-only, edited in Tag Mode or the app\n\n## Architecture: Source → Collector → Destination(s)\n\nEvery component in a flow is a **step**: sources capture events, transformers process them, destinations deliver them, stores provide shared state. Steps connect via chains: \\`source.next\\` runs before the collector, \\`collector.next\\` runs once per event before the destination fan-out (all destinations), and \\`destination.before\\` runs for one destination.\n\n## Flow Config Structure\n\n\\`\\`\\`json\n{\n \"version\": 4,\n \"flows\": {\n \"default\": {\n \"config\": { \"platform\": \"web\" },\n \"sources\": { \"<name>\": { \"package\": \"<npm-package>\", \"config\": {} } },\n \"destinations\": { \"<name>\": { \"package\": \"<npm-package>\", \"config\": { \"settings\": {} } } }\n }\n }\n}\n\\`\\`\\`\n\n- \\`version: 4\\` is required\n- Each flow declares its target via \\`config.platform\\` (\\`\"web\"\\` or \\`\"server\"\\`)\n- Destination settings go inside \\`config.settings\\`, not directly on the destination\n- Event format: \\`{ name: \"entity action\", data: {...}, entity: \"...\", action: \"...\" }\\`\n\n## Key Concepts\n\n- **Mapping** transforms events using data/map/loop/set/condition rules. Same syntax on sources and destinations. Mapping rules use NESTED entity → action keying: event name \"product add\" maps to \\`{ \"product\": { \"add\": Rule } }\\`. Wildcards: \\`{ \"*\": { \"view\": Rule } }\\`.\n- **Contracts** define event schemas using entity-action keying. Can generate FROM mappings or scaffold mappings FROM contracts.\n- **Variables** (\\$var, \\$env, \\$secret, \\$code, \\$store) enable DRY, environment-aware config. \\`$var.name\\` is a reusable flow variable from the top-level \\`variables\\` block; whole-string refs preserve native type (object/array/scalar), inline interpolation requires a scalar, deep paths via \\`$var.name.deep.path\\`. \\`$env.NAME[:default]\\` is an environment variable resolved at bundle/deploy time (non-secret config only). \\`$secret.NAME\\` is a managed secret the deploy pipeline injects into the server runner at runtime; credentials, tokens, and private keys must use \\`$secret\\`, not \\`$env\\`.\n- **Consent** gates destinations, mapping rules, and individual fields. Privacy-first by design.\n- **Routing** uses one grammar in every chain field (\\`source.before\\`, \\`source.next\\`, \\`transformer.before\\`, \\`transformer.next\\`, \\`collector.next\\`, \\`destination.before\\`, \\`destination.next\\`). A route is a string ID, a sequence (\\`[\"a\", \"b\"]\\`), or a RouteConfig: \\`{ match?, next }\\`, \\`{ match?, one: [...] }\\` (first match wins), \\`{ match?, many: [...] }\\` (every match becomes its own copy of the event with its own id and finishes the rest of the path on its own, never merged), or \\`{ match?, stop: true }\\` (ends that copy). In a sequence, a member's own \\`next\\` runs right after it, then the sequence continues. \\`match\\` reads \\`{ ingest, event }\\` and each route is evaluated when the event reaches it. A \\`stop\\` in \\`collector.next\\` drops the event for every destination; per-destination filtering belongs in \\`destination.before\\`. An array of only route configs is an implicit \\`one\\`. The optional \\`match\\` field is omitted to mean always-match (no wildcard literal).\n- **Pass-through steps** are transformer entries with no \\`code\\` and no \\`package\\`. The runtime synthesizes the push for them automatically. Three flavors share this shape: a \\`before\\` / \\`next\\`-only step (named hop reusable across destinations), a \\`cache\\`-only step (dedup, rate-limit), and a \\`mapping\\`-only step (declarative event-to-event transform). A pass-through must declare at least one of \\`before\\`, \\`next\\`, \\`cache\\`, or \\`mapping\\`.\n- **Mapping at the transformer position** uses the same \\`Mapping.Config\\` shape as destinations, but the semantic is event-to-event: \\`policy\\` and per-rule \\`policy\\`, \\`mapping[].name\\` (rename), \\`mapping[].ignore\\` (drop from chain), \\`consent\\`, and \\`include\\` apply. Vendor-payload fields (\\`data\\`, \\`silent\\`, \\`mapping[].data\\`) are no-ops at this position.\n- **Closed-schema rule on transformer entries:** known keys only. Operative keys are \\`code\\`, \\`package\\`, \\`before\\`, \\`next\\`, \\`cache\\`, \\`mapping\\`. Combined with structural keys (\\`config\\`, \\`env\\`, \\`validate\\`, \\`disabled\\`, \\`id\\`, etc.). Unknown top-level keys on a transformer step are errors (catches typos like \\`dedup: {}\\` instead of nested under \\`cache\\`). \\`code\\` + \\`package\\` together is a conflict.\n- **Cache** memoizes step output on a configured store. Set \\`cache.stop: true\\` to short-circuit the chain on HIT (sources default to stop-on-HIT); in a source chain or \\`collector.next\\` that halts the event for all destinations. Set \\`cache.namespace\\` to prefix keys; omit it to write keys directly. \\`CacheRule.match\\` is optional, omit for always-match.\n\n## Simulation Tips\n\n- Destinations with \\`require: [\"consent\"]\\` stay **pending** until a \\`\"walker consent\"\\` event fires. Simulation will error \"not found\" for pending destinations, remove \\`require\\` from config when testing with \\`flow_simulate\\`.\n- Destinations with \\`consent: { marketing: true }\\` silently skip events that lack matching consent. Include \\`consent\\` in the event: \\`{ name: \"page view\", data: {...}, consent: { marketing: true } }\\`.\n- **Mapping** transforms event names and data at the destination level. Events without a matching mapping rule pass through unmodified.\n- **Policy** modifies the event before mapping runs, use it to inject computed fields or redact sensitive data.\n\n## Reference Resources\n\nRead these before constructing configs manually: \\`walkeros://reference/flow-schema\\`, \\`walkeros://reference/mapping\\`, \\`walkeros://reference/event-model\\`, \\`walkeros://reference/consent\\`, \\`walkeros://reference/variables\\`, \\`walkeros://reference/contract\\`, \\`walkeros://reference/examples\\`.`;\n","import { randomUUID } from 'crypto';\nimport { telemetry } from '@walkeros/cli';\n\n/**\n * Options for the MCP telemetry emitter wrapper.\n *\n * `clientInfo` mirrors the MCP SDK shape negotiated during initialize.\n * When the client doesn't send one, we record the client name as \"unknown\"\n * inside the per-event data so downstream analytics can still bucket the\n * event. The walkerOS source identifier is the package itself (`mcp`), not\n * the client.\n */\nexport interface McpEmitterOptions {\n clientInfo?: { name: string; version: string };\n packageVersion: string;\n}\n\n/**\n * MCP-specific event emitter.\n *\n * Wraps `@walkeros/cli`'s `telemetry.createEmitter` with:\n * - `source.type` fixed to `\"mcp\"`\n * - `source.platform` fixed to `\"server\"`\n * - per-emission `source.tool` for `cmd invoke` events\n * - a fresh session UUID per MCP server instance\n *\n * Surfaces the narrow set of events the MCP server needs to emit.\n */\nexport interface McpEmitter {\n emitStart(): Promise<void>;\n emitInvoke(\n tool: string,\n outcome: 'success' | 'error',\n timingMs: number,\n ): Promise<void>;\n emitError(kind: 'uncaught' | 'unhandledRejection' | 'startup'): Promise<void>;\n}\n\n/**\n * Build an MCP telemetry emitter.\n *\n * All consent, debug, and endpoint resolution is delegated to the CLI's\n * underlying `telemetry.createEmitter`. This wrapper only provides\n * MCP-specific field mapping and event shorthands.\n */\nexport async function createMcpEmitter(\n opts: McpEmitterOptions,\n): Promise<McpEmitter> {\n const clientName = opts.clientInfo?.name || 'unknown';\n const session = randomUUID();\n\n const emitter = await telemetry.createEmitter({\n source: {\n type: 'mcp',\n platform: 'server',\n },\n packageVersion: opts.packageVersion,\n session,\n });\n\n return {\n async emitStart() {\n const ci = telemetry.getCiInfo();\n await emitter.send('mcp start', {\n ...ci,\n client: clientName,\n });\n },\n async emitInvoke(tool, outcome, timingMs) {\n await emitter.send(\n 'cmd invoke',\n { outcome, client: clientName },\n timingMs,\n { tool },\n );\n },\n async emitError(kind) {\n await emitter.send('error throw', { kind });\n },\n };\n}\n","import type { ToolClient } from '../tool-client.js';\nimport { flowConfigOf, isCloudId } from '../cloud-flow.js';\nimport { RuntimeRefusal, type FlowRuntime } from './types.js';\n\nfunction isHttpUrl(value: string): boolean {\n try {\n const url = new URL(value);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\n/**\n * Whether a bare string is shaped like a filesystem path: it names a directory\n * hop, starts with a dot, or carries a file extension. Nothing is ever read\n * either way; the distinction only decides which error a hosted load raises.\n * A path-shaped input is refused outright, while a plain phrase such as an\n * event name is merely unresolvable here, which is what lets `flow_validate`\n * keep its event-name shorthand.\n */\nfunction looksLikePath(value: string): boolean {\n return (\n /[\\\\/]/.test(value) ||\n value.startsWith('.') ||\n /\\.[A-Za-z0-9]+$/.test(value)\n );\n}\n\nexport type ConfigInputKind =\n | 'inline-json'\n | 'cloud-id'\n | 'url'\n | 'local-path'\n | 'bare-string';\n\n/**\n * Classify a config input the way the local loader would resolve it: an\n * http(s) URL, a reserved cloud id, an inline JSON document, a path-shaped\n * string, or a bare string that names none of these. Order matters, a URL is\n * checked before the cloud-id and JSON shapes.\n */\nexport function classifyConfigInput(input: string): ConfigInputKind {\n const trimmed = input.trim();\n if (isHttpUrl(trimmed)) return 'url';\n if (isCloudId(trimmed)) return 'cloud-id';\n if (trimmed.startsWith('{') || trimmed.startsWith('[')) return 'inline-json';\n if (looksLikePath(trimmed)) return 'local-path';\n return 'bare-string';\n}\n\nconst HINT_INLINE_OR_ID =\n 'Pass the flow inline as JSON, or reference a saved flow by its flow_ or cfg_ id.';\n\nfunction refuseLocalPath(): RuntimeRefusal {\n return new RuntimeRefusal(\n 'Local file paths are not available on the hosted walkerOS MCP server.',\n HINT_INLINE_OR_ID,\n );\n}\n\nfunction refuseUrl(): RuntimeRefusal {\n return new RuntimeRefusal(\n 'Fetching URLs is not available on the hosted walkerOS MCP server.',\n HINT_INLINE_OR_ID,\n );\n}\n\nfunction parseInline(trimmed: string): unknown {\n try {\n return JSON.parse(trimmed);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new Error(`Input appears to be JSON but contains errors: ${message}`);\n }\n}\n\n/**\n * The least-privilege runtime for a shared, network-reached process: the app's\n * OAuth door, in-app chat, and any third-party HTTP host.\n *\n * It never touches the filesystem or the network on the caller's behalf. A\n * saved `flow_`/`cfg_` id is resolved through the access-scoped tool client, a\n * document is parsed inline, and everything else is refused. `bundle`,\n * `simulate` and `push` are deliberately absent: compiling or importing a\n * caller's flow pulls that caller's code (inline or by package name) into this\n * process, and no input shape makes that safe here.\n */\nexport function createHostedRuntime(\n client: Pick<ToolClient, 'getFlow'>,\n): FlowRuntime {\n return {\n async load(input) {\n const trimmed = input.trim();\n if (trimmed === '') throw new Error('Input is required');\n switch (classifyConfigInput(trimmed)) {\n case 'url':\n throw refuseUrl();\n case 'cloud-id':\n return flowConfigOf(await client.getFlow({ flowId: trimmed }));\n case 'inline-json':\n return parseInline(trimmed);\n case 'local-path':\n throw refuseLocalPath();\n case 'bare-string':\n // Not a refusal: nothing was withheld, the input simply names nothing\n // this runtime can resolve.\n throw new Error(\n `Cannot resolve \"${trimmed}\" on the hosted walkerOS MCP server. ${HINT_INLINE_OR_ID}`,\n );\n }\n },\n };\n}\n","import {\n listProjects,\n getProject,\n createProject,\n updateProject,\n deleteProject,\n setDefaultProject,\n getDefaultProject,\n listAllFlows,\n listFlows,\n getFlow,\n createFlow,\n updateFlow,\n deleteFlow,\n duplicateFlow,\n listPreviews,\n getPreview,\n createPreview,\n deletePreview,\n regrantPreview,\n listSecrets,\n createSecret,\n updateSecret,\n deleteSecret,\n deploy,\n listDeployments,\n getDeploymentBySlug,\n deleteDeployment,\n listJourneys,\n startObserveSession,\n getObserveSession,\n endObserveSession,\n listReleases,\n getRelease,\n listStepHistory,\n setReleaseRationale,\n listThreads,\n createThread,\n addThreadMessage,\n listKnowledge,\n listFrames,\n listPageFrames,\n getFrame,\n startDeviceAuthorization,\n completeDeviceLogin,\n whoami,\n credentialSource,\n resolveAppUrl,\n logout,\n feedback,\n getFeedbackPreference,\n setFeedbackPreference,\n fetchHealth,\n fetchOpenApi,\n compareContract,\n} from '@walkeros/cli';\nimport type {\n ContractComparison,\n DeviceAuthorization,\n DeviceLoginResult,\n ListFlowsOptions,\n DeployOptions,\n ListDeploymentsOptions,\n ListPreviewsOptions,\n GetPreviewOptions,\n CreatePreviewOptions,\n DeletePreviewOptions,\n ListSecretsOptions,\n CreateSecretOptions,\n UpdateSecretOptions,\n DeleteSecretOptions,\n FeedbackOptions,\n} from '@walkeros/cli';\n\nimport { normalizeBaseUrl } from './base-url.js';\nimport type {\n ToolClient,\n JourneysResult,\n RegrantPreviewOptions,\n ObserveSessionResult,\n ObserveSessionRef,\n StartObserveSessionOptions,\n ReleaseRef,\n ReleaseIndexWire,\n ReleaseDetailWire,\n StepHistoryWire,\n VersionAnnotationWire,\n ThreadAnchorType,\n ThreadStatus,\n HubThreadWire,\n ListThreadsWire,\n ListKnowledgeWire,\n FrameWire,\n FrameListWire,\n FrameLeanListWire,\n} from './tool-client.js';\n\n// __VERSION__ is this package's version, replaced at build time by tsup's\n// `define` (see tsup.config.ts). In tests, it is set on globalThis (see\n// src/__tests__/support/version.ts).\ndeclare const __VERSION__: string;\n\n/**\n * Default ToolClient implementation backed by @walkeros/cli. Every method\n * delegates to the CLI's programmatic API, which in turn talks to the\n * walkerOS app over HTTPS via openapi-fetch. Token resolution and the\n * base URL come from the CLI's config file and environment\n * (WALKEROS_TOKEN, WALKEROS_APP_URL), so no constructor args are required.\n */\nexport class HttpToolClient implements ToolClient {\n async listProjects(options?: {\n cursor?: string;\n limit?: number;\n }): Promise<unknown> {\n return listProjects(options);\n }\n async getProject(options: { projectId?: string }): Promise<unknown> {\n return getProject(options);\n }\n async createProject(options: { name: string }): Promise<unknown> {\n return createProject(options);\n }\n async updateProject(options: {\n projectId?: string;\n name: string;\n }): Promise<unknown> {\n return updateProject(options);\n }\n async deleteProject(options: { projectId?: string }): Promise<unknown> {\n return deleteProject(options);\n }\n setDefaultProject(projectId: string): void {\n setDefaultProject(projectId);\n }\n getDefaultProject(): string | null {\n return getDefaultProject();\n }\n\n async listAllFlows(options?: {\n sort?: string;\n order?: 'asc' | 'desc';\n includeDeleted?: boolean;\n cursor?: string;\n limit?: number;\n }): Promise<unknown> {\n return listAllFlows(options as Parameters<typeof listAllFlows>[0]);\n }\n async listFlows(options: ListFlowsOptions): Promise<unknown> {\n return listFlows(options);\n }\n async getFlow(options: {\n flowId: string;\n projectId?: string;\n fields?: string[];\n }): Promise<unknown> {\n return getFlow(options);\n }\n async createFlow(options: {\n name: string;\n content: Record<string, unknown>;\n projectId?: string;\n }): Promise<unknown> {\n return createFlow(options);\n }\n async updateFlow(options: {\n flowId: string;\n projectId?: string;\n name?: string;\n content?: Record<string, unknown>;\n mergePatch?: boolean;\n }): Promise<unknown> {\n return updateFlow(options);\n }\n async deleteFlow(options: {\n flowId: string;\n projectId?: string;\n }): Promise<unknown> {\n return deleteFlow(options);\n }\n async duplicateFlow(options: {\n flowId: string;\n name?: string;\n projectId?: string;\n }): Promise<unknown> {\n return duplicateFlow(options);\n }\n\n async listPreviews(options: ListPreviewsOptions): Promise<unknown> {\n return listPreviews(options);\n }\n async getPreview(options: GetPreviewOptions): Promise<unknown> {\n return getPreview(options);\n }\n async createPreview(\n options: CreatePreviewOptions & { siteUrl?: string },\n ): Promise<unknown> {\n // flow-manage passes `siteUrl` (the shared handler's field); the CLI's\n // createPreview mints an origin-bound grant when given `url`. Bridge the two\n // so a preview_create with a site URL over the HTTP client mints a real\n // grant instead of returning a null activationUrl.\n return createPreview({ ...options, url: options.url ?? options.siteUrl });\n }\n async deletePreview(options: DeletePreviewOptions): Promise<unknown> {\n return deletePreview(options);\n }\n async regrantPreview(options: RegrantPreviewOptions): Promise<unknown> {\n return regrantPreview(options);\n }\n\n async listSecrets(options: ListSecretsOptions): Promise<unknown> {\n return listSecrets(options);\n }\n async createSecret(options: CreateSecretOptions): Promise<unknown> {\n return createSecret(options);\n }\n async updateSecret(options: UpdateSecretOptions): Promise<unknown> {\n return updateSecret(options);\n }\n async deleteSecret(options: DeleteSecretOptions): Promise<unknown> {\n return deleteSecret(options);\n }\n\n async deploy(options: DeployOptions): Promise<unknown> {\n return deploy(options);\n }\n async listDeployments(options: ListDeploymentsOptions): Promise<unknown> {\n return listDeployments(options);\n }\n async getDeploymentBySlug(options: {\n slug: string;\n projectId?: string;\n }): Promise<unknown> {\n return getDeploymentBySlug(options);\n }\n async deleteDeployment(options: {\n slug: string;\n projectId?: string;\n }): Promise<unknown> {\n return deleteDeployment(options);\n }\n\n async listJourneys(options: {\n flowId: string;\n projectId?: string;\n traceId?: string;\n limit?: number;\n }): Promise<JourneysResult> {\n return listJourneys(options);\n }\n\n /**\n * Observe session lifecycle over the CLI's authenticated boundary. The trio\n * routes through the same `apiFetch` as every other method here, so token\n * resolution, base URL, and `ApiError` shaping (which `isAuthError` reads)\n * stay identical to the rest of the client.\n */\n async startObserveSession(\n options: StartObserveSessionOptions,\n ): Promise<ObserveSessionResult> {\n return startObserveSession(options);\n }\n async getObserveSession(\n options: ObserveSessionRef,\n ): Promise<ObserveSessionResult> {\n return getObserveSession(options);\n }\n async endObserveSession(options: ObserveSessionRef): Promise<void> {\n return endObserveSession(options);\n }\n\n async listReleases(options: {\n projectId: string;\n flowId: string;\n limit?: number;\n offset?: number;\n }): Promise<ReleaseIndexWire> {\n return listReleases(options);\n }\n async getRelease(options: {\n projectId: string;\n flowId: string;\n ref: ReleaseRef;\n }): Promise<ReleaseDetailWire> {\n return getRelease(options);\n }\n async listStepHistory(options: {\n projectId: string;\n flowId: string;\n step: string;\n flow?: string;\n limit?: number;\n }): Promise<StepHistoryWire> {\n return listStepHistory(options);\n }\n async setReleaseRationale(options: {\n projectId: string;\n flowId: string;\n versionId: string;\n text: string;\n }): Promise<VersionAnnotationWire> {\n return setReleaseRationale(options);\n }\n async listThreads(options: {\n projectId: string;\n flowId: string;\n anchorType?: ThreadAnchorType;\n anchorKey?: string;\n status?: ThreadStatus;\n includeMessages: boolean;\n limit?: number;\n }): Promise<ListThreadsWire> {\n return listThreads(options);\n }\n async createThread(options: {\n projectId: string;\n flowId: string;\n anchorType: ThreadAnchorType;\n anchorKey: string;\n anchorLabel?: string;\n text: string;\n }): Promise<HubThreadWire> {\n return createThread(options);\n }\n async addThreadMessage(options: {\n projectId: string;\n flowId: string;\n threadId: string;\n text: string;\n }): Promise<HubThreadWire> {\n return addThreadMessage(options);\n }\n async listKnowledge(options: {\n projectId: string;\n pageKey?: string;\n frameId?: string;\n markId?: string;\n includeMessages: boolean;\n limit?: number;\n }): Promise<ListKnowledgeWire> {\n return listKnowledge(options);\n }\n\n async listFrames(options: { projectId: string }): Promise<FrameLeanListWire> {\n return listFrames(options);\n }\n async listPageFrames(options: {\n projectId: string;\n pageKey: string;\n }): Promise<FrameListWire> {\n return listPageFrames(options);\n }\n async getFrame(options: {\n projectId: string;\n frameId: string;\n }): Promise<FrameWire> {\n return getFrame(options);\n }\n\n async requestDeviceCode(): Promise<DeviceAuthorization> {\n return startDeviceAuthorization(resolveAppUrl());\n }\n async pollForToken(\n deviceCode: string,\n options?: { timeoutMs?: number },\n ): Promise<DeviceLoginResult> {\n return completeDeviceLogin(deviceCode, options);\n }\n async whoami(): Promise<unknown> {\n return whoami();\n }\n credentialSource(): 'env' | 'config' | null {\n return credentialSource();\n }\n async logout(): Promise<{ deleted: boolean }> {\n return logout();\n }\n\n /**\n * The app this local door talks to: `WALKEROS_APP_URL`, then the CLI config\n * file, then the built-in default, which is exactly the chain every other\n * method here already resolves its base URL through. Normalized, because\n * neither the env var nor the config file is obliged to omit a trailing\n * slash and the interface promises a base without one.\n */\n appBaseUrl(): string {\n return normalizeBaseUrl(resolveAppUrl());\n }\n\n /**\n * Unauthenticated reachability probe of the app's PUBLIC health route\n * (`GET /api/health`) at `appBaseUrl()`, through the CLI's `fetchHealth`.\n * Sends no credential, so diagnostics works logged-out. Resolves\n * `{ reachable: false, error }` only on a real network/timeout failure.\n */\n async checkHealth(): Promise<{\n reachable: boolean;\n status?: string;\n version?: string;\n error?: string;\n }> {\n const health = await fetchHealth(this.appBaseUrl());\n return {\n reachable: health.reachable,\n ...(health.status !== undefined && { status: health.status }),\n ...(health.appVersion !== undefined && { version: health.appVersion }),\n ...(health.error !== undefined && { error: health.error }),\n };\n }\n\n /**\n * The contract verdict for this MCP against `appBaseUrl()`, per operation,\n * naming `@walkeros/mcp` as the client.\n */\n async checkContract(): Promise<ContractComparison> {\n return compareContract({\n baseUrl: this.appBaseUrl(),\n client: { type: 'mcp', version: __VERSION__ },\n });\n }\n\n /** The live public OpenAPI document of `appBaseUrl()`, without a credential. */\n async openapiDocument(): Promise<unknown> {\n const result = await fetchOpenApi(this.appBaseUrl());\n if (!result.ok) throw new Error(`GET ${result.url}: ${result.error}`);\n return result.document;\n }\n\n async submitFeedback(text: string, options?: FeedbackOptions): Promise<void> {\n await feedback(text, options);\n }\n getFeedbackPreference(): boolean | undefined {\n return getFeedbackPreference();\n }\n setFeedbackPreference(anonymous: boolean): void {\n setFeedbackPreference(anonymous);\n }\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\nimport {\n collectKnownSecrets,\n loadConfig,\n loadJsonConfig,\n bundle,\n push,\n simulateSource,\n simulateTransformer,\n simulateCollector,\n simulateDestination,\n} from '@walkeros/cli';\nimport { isObject } from '@walkeros/core';\nimport { isFlowJson } from '../tools/narrow.js';\nimport type { Flow, WalkerOS } from '@walkeros/core';\nimport { schemas } from '@walkeros/core/dev';\nimport { getOrBuildBundle } from './bundle-cache.js';\nimport type { FlowRuntime } from './types.js';\n\n/**\n * The full-capability runtime for the user's own machine (stdio, the developer\n * CLI). It wraps the `@walkeros/cli` loaders and runners exactly as the tools\n * called them before the runtime seam existed, so local behaviour is unchanged:\n * a config may be a file path, an http(s) URL or inline JSON, and bundling,\n * simulation and push run in this process.\n *\n * This is the only module in the package that may bind those cli functions;\n * the tools reach them through the `FlowRuntime` interface and nothing else.\n */\nexport function createLocalRuntime(): FlowRuntime {\n return {\n load: (input) => loadJsonConfig(input),\n\n baseDir(input) {\n const file = path.resolve(input);\n return fs.existsSync(file) && fs.statSync(file).isFile()\n ? path.dirname(file)\n : undefined;\n },\n\n bundle: (input, opts) =>\n bundle(input, {\n flowName: opts.flowName,\n stats: opts.stats,\n buildOverrides: opts.output ? { output: opts.output } : undefined,\n }),\n\n async simulate(input, opts) {\n // Reuse a prebuilt bundle across calls with the same resolved config. The\n // simulate fns take their fast `mode: 'prebuilt'` branch when given a\n // bundlePath, skipping the per-call rebuild. On any bundle failure fall\n // back to undefined so the simulate fn rebuilds and surfaces its own error.\n let bundlePath: string | undefined;\n try {\n bundlePath = await getOrBuildBundle(input);\n } catch {\n bundlePath = undefined;\n }\n const common = { bundlePath, flow: opts.flow, silent: true };\n const config = opts.config ?? input;\n\n switch (opts.stepType) {\n case 'source':\n return simulateSource(config, opts.event, {\n sourceId: opts.stepId,\n ...common,\n consent: opts.state?.consent,\n });\n case 'transformer':\n return simulateTransformer(config, partialEvent(opts.event), {\n transformerId: opts.stepId,\n ...common,\n ingest: opts.ingest,\n consent: opts.state?.consent,\n });\n case 'collector':\n return simulateCollector(config, partialEvent(opts.event), {\n collectorName: opts.stepId,\n ...common,\n state: opts.state,\n ingest: opts.ingest,\n });\n case 'destination':\n return simulateDestination(config, eventObject(opts.event), {\n destinationId: opts.stepId,\n ...common,\n ingest: opts.ingest,\n consent: opts.state?.consent,\n command: opts.command,\n });\n }\n },\n\n knownSecrets: async (input) =>\n collectKnownSecrets(await loadJsonConfig<Flow.Json>(input)),\n\n async loadRun(input) {\n // One read, detected the way push detects its input: content that\n // parses as JSON is a config, anything else a prebuilt bundle, which\n // carries no config and so no secrets to resolve.\n const content = await loadConfig(input, { json: false });\n const config =\n typeof content === 'string' ? parseJson(content) : undefined;\n if (!isFlowJson(config)) return { knownSecrets: [] };\n return { config, knownSecrets: collectKnownSecrets(config) };\n },\n\n push: (input, event, opts) =>\n push(input, event, {\n json: true,\n flow: opts.flow,\n platform: opts.platform,\n ...(opts.config !== undefined && { raw: opts.config }),\n }),\n };\n}\n\n/**\n * The event a transformer or collector step runs on, checked against the\n * partial event schema the CLI applies. The value passes through as given.\n */\nfunction partialEvent(value: unknown): WalkerOS.DeepPartialEvent {\n if (isPartialEvent(value)) return value;\n const parsed = schemas.PartialEventSchema.safeParse(value);\n throw new Error(parsed.error?.message ?? 'Invalid event');\n}\n\nfunction isPartialEvent(value: unknown): value is WalkerOS.DeepPartialEvent {\n return schemas.PartialEventSchema.safeParse(value).success;\n}\n\n/** A destination step's event, or a command's data: an object. */\nfunction eventObject(value: unknown): Record<string, unknown> {\n if (isObject(value)) return value;\n throw new Error('event must be an object.');\n}\n\nfunction parseJson(content: string): unknown {\n try {\n return JSON.parse(content);\n } catch {\n return undefined;\n }\n}\n","import { createHash } from 'node:crypto';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { mkdir, rm, writeFile } from 'node:fs/promises';\nimport { rmSync } from 'node:fs';\nimport { bundle } from '@walkeros/cli';\n\n/**\n * Content-addressed cache of prebuilt simulate bundles for the MCP\n * `flow_simulate` tool. Each `flow_simulate` call otherwise re-bundles the\n * whole flow (`mode: 'build'`), which dominates latency. By keying a prebuilt\n * ESM by the hash of the *resolved* config content, repeated simulations of the\n * same flow reuse one bundle and a changed flow rebuilds.\n *\n * The CLI simulate functions accept a `bundlePath`; passing it takes their\n * `mode: 'prebuilt'` branch and skips the bundle step entirely.\n */\n\ninterface CacheEntry {\n bundlePath: string;\n dir: string;\n}\n\n/** LRU bound: enough to cover a few flows iterated in one session without\n * leaking temp dirs. Oldest entry is evicted (and its dir removed) on insert. */\nconst MAX_ENTRIES = 8;\n\n/** Insertion-ordered map gives us LRU for free: delete+set on access moves the\n * key to the end; the first key is the least-recently used. */\nconst cache = new Map<string, CacheEntry>();\n\n/** In-flight builds, deduped by key so two concurrent identical simulate calls\n * bundle once instead of racing to write the same artifact. */\nconst inFlight = new Map<string, Promise<string>>();\n\nlet cleanupRegistered = false;\n\nfunction hashConfig(resolvedConfig: string): string {\n return createHash('sha256').update(resolvedConfig).digest('hex');\n}\n\n/**\n * Inline JSON config content is cacheable: its full content is the cache key,\n * so an edit always re-keys. A file path or URL is NOT: `resolveConfigPath`\n * returns it unchanged, so the key would be the path string and an edit to the\n * file behind it would silently reuse a stale bundle. Such inputs skip the\n * cache and take the simulate fns' build path (which re-reads the file).\n *\n * The discriminator matches how the CLI simulate fns treat `configPath`: a\n * string that parses as JSON is inline config; anything else is a path/URL.\n */\nfunction isInlineJsonConfig(resolvedConfig: string): boolean {\n const trimmed = resolvedConfig.trimStart();\n if (!trimmed.startsWith('{') && !trimmed.startsWith('[')) return false;\n try {\n JSON.parse(resolvedConfig);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction registerProcessCleanup(): void {\n if (cleanupRegistered) return;\n cleanupRegistered = true;\n const cleanup = () => {\n for (const entry of cache.values()) {\n // Synchronous best-effort removal on exit; async fs is not safe here.\n try {\n rmSync(entry.dir, { recursive: true, force: true });\n } catch {\n // Temp dir already gone or unwritable; nothing to recover.\n }\n }\n cache.clear();\n };\n process.once('exit', cleanup);\n}\n\nasync function evictIfNeeded(): Promise<void> {\n while (cache.size > MAX_ENTRIES) {\n const oldestKey = cache.keys().next().value;\n if (oldestKey === undefined) break;\n const evicted = cache.get(oldestKey);\n cache.delete(oldestKey);\n if (evicted) await rm(evicted.dir, { recursive: true, force: true });\n }\n}\n\n/**\n * Build the resolved config into a prebuilt simulate ESM and return its path,\n * reusing a cached bundle when the same resolved config was bundled before.\n *\n * `resolvedConfig` is the exact string the simulate functions would otherwise\n * receive as `configPath` (inline JSON for cloud ids after id resolution, or a\n * file path / URL / inline JSON otherwise). Keying on it means a cloud id whose\n * underlying content changes between calls rebuilds correctly.\n *\n * Returns `undefined` for file-path / URL configs (see `isInlineJsonConfig`):\n * those bypass the cache so an edited file is never served from a stale bundle.\n * The caller then passes the original configPath with no bundlePath, taking the\n * simulate fns' build path exactly as before.\n *\n * The producer mirrors the CLI build-mode bundle: target `simulate`\n * (skipWrapper + withDev, /dev graph inlined) written as ESM. The flow's own\n * platform is preserved via the bundler's platform defaults; only the output\n * format is pinned to ESM so the CLI can import it directly.\n */\nexport async function getOrBuildBundle(\n resolvedConfig: string,\n): Promise<string | undefined> {\n if (!isInlineJsonConfig(resolvedConfig)) return undefined;\n\n registerProcessCleanup();\n const key = hashConfig(resolvedConfig);\n\n const cached = cache.get(key);\n if (cached) {\n // Refresh LRU position.\n cache.delete(key);\n cache.set(key, cached);\n return cached.bundlePath;\n }\n\n const pending = inFlight.get(key);\n if (pending) return pending;\n\n const build = (async () => {\n const dir = path.join(\n os.tmpdir(),\n `walkeros-mcp-bundle-${key.slice(0, 16)}`,\n );\n await rm(dir, { recursive: true, force: true });\n await mkdir(dir, { recursive: true });\n const bundlePath = path.join(dir, 'flow.mjs');\n\n // Touch the file first so a producer that only mutates (rather than writes)\n // still leaves a real artifact; the bundler overwrites it with the real ESM.\n await writeFile(bundlePath, '', 'utf-8');\n\n // Load-bearing: `bundle()` derives platform from the flow config and\n // intentionally ignores `preset.platform` (the 'simulate' preset is node),\n // so a web flow still bundles browser-platform, equivalent to build-mode.\n // If `bundle()` ever honors `preset.platform`, web simulations via this\n // cache would silently bundle for node and diverge.\n await bundle(resolvedConfig, {\n target: 'simulate',\n silent: true,\n buildOverrides: { output: bundlePath, format: 'esm', minify: false },\n });\n\n cache.set(key, { bundlePath, dir });\n await evictIfNeeded();\n return bundlePath;\n })();\n\n inFlight.set(key, build);\n try {\n return await build;\n } finally {\n inFlight.delete(key);\n }\n}\n\n/** Test-only: clear the cache and remove all temp dirs. */\nexport async function __resetBundleCacheForTests(): Promise<void> {\n inFlight.clear();\n const dirs = Array.from(cache.values(), (e) => e.dir);\n cache.clear();\n await Promise.all(\n dirs.map((dir) => rm(dir, { recursive: true, force: true })),\n );\n}\n"],"mappings":";;;AAAA,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;;;ACDjC,SAAS,iBAAiB;;;ACA1B,SAAS,gBAAgB;AAEzB,SAAS,eAAe;AAExB,SAAS,WAAW,gBAAgB;;;ACJpC,SAAS,SAAS;AAGlB,IAAM,sBAAsB;AAAA,EAC1B,MAAM,EAAE,OAAO;AAAA,EACf,SAAS,EAAE,OAAO;AAAA,EAClB,OAAO,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC5B,MAAM,EACH,OAAO,EACP,SAAS,EACT,SAAS,iDAAiD;AAAA,EAC7D,SAAS,EACN,OAAO,EACP,SAAS,EACT,SAAS,gDAAgD;AAC9D;AAEO,IAAM,sBAAsB;AAAA,EACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,2BAA2B;AAAA,EACvD,MAAM,EACH,MAAM;AAAA,IACL,EAAE,KAAK,CAAC,YAAY,SAAS,SAAS,QAAQ,SAAS,CAAC;AAAA,IACxD,EAAE,OAAO,EAAE,MAAM,4CAA4C;AAAA,EAC/D,CAAC,EACA,SAAS,oBAAoB;AAAA,EAChC,QAAQ,EAAE,MAAM,EAAE,OAAO,mBAAmB,CAAC,EAAE,SAAS,mBAAmB;AAAA,EAC3E,UAAU,EACP;AAAA,IACC,EAAE,OAAO;AAAA,MACP,GAAG;AAAA,MACH,YAAY,EAA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,KAAK,EAAE,MAAM,OAAO,UAAU;AAI5B,MAAI;AACF,UAAM,UAAU,MAAM,iBAAiB;AAAA,MACrC,YAAY;AAAA,MACZ,gBAAgB;AAAA,IAClB,CAAC;AACD,UAAM,QAAQ,UAAU,SAAS;AAAA,EACnC,QAAQ;AAAA,EAER;AACA,UAAQ,MAAM,oCAAoC,KAAK;AACvD,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["path","schemas","mcpResult","mcpError","z","mcpError","TITLE","DESCRIPTION","inputSchema","schemas","annotations","mcpError","mcpResult","z","schemas","mcpResult","mcpError","isObject","mcpResult","TITLE","inputSchema","schemas","z","annotations","mcpError","errorMessage","mcpResult","require","z","schemas","mcpError","TITLE","DESCRIPTION","inputSchema","schemas","z","annotations","mcpError","z","mcpResult","mcpError","schemas","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpResult","mcpError","z","fetchPackage","mcpResult","mcpError","z","mcpResult","fetchPackage","mcpError","schemas","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpResult","mcpError","mcpResult","TITLE","DESCRIPTION","inputSchema","annotations","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpResult","mcpError","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","data","safe","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","DESCRIPTION","inputSchema","z","annotations","NO_DEFAULT_PROJECT_ERROR","mcpError","mcpResult","z","mcpResult","mcpError","TITLE","z","annotations","mcpResult","thread","mcpError","z","mcpResult","mcpError","FRAME_ID_PATTERN","TITLE","z","annotations","isRecord","mcpError","mcpResult","schemas","schemas","require","z","z","z","path","bundle","isObject","schemas","cache","bundle","schemas","isObject"]}
|