{"version":3,"file":"dist-C7ptcoHx.cjs","names":["z"],"sources":["../../shared/dist/index.mjs"],"sourcesContent":["import { z } from \"zod\";\n//#region src/constants/conventions.ts\n/** File-layout rules shared by agents, workflows, triggers, and OpenAPI `x-keystroke`. */\nconst DISCOVERY_CONVENTIONS = {\n\tagents: {\n\t\tflat: \"{name}.ts → POST /agents/{name}\",\n\t\tnested: \"{path}/agent.ts or {path}/index.ts → POST /agents/{path}\",\n\t\thelpers: \"Other .ts files under nested folders are not mounted.\"\n\t},\n\tworkflows: {\n\t\tflat: \"{name}.ts → POST /workflows/{name}\",\n\t\tnested: \"{path}/workflow.ts or {path}/index.ts → POST /workflows/{path}\",\n\t\thelpers: \"Other .ts files under nested folders are not mounted.\"\n\t},\n\ttriggers: {\n\t\tflat: \"{name}.ts → trigger slug {name}, attachment slug {triggerSlug}:{targetSlug}\",\n\t\tnested: \"{path}/trigger.ts or {path}/index.ts → trigger slug {path}\",\n\t\thelpers: \"Reusable sources live under triggers/sources/ and are not discovered.\"\n\t},\n\topenapi: \"GET /openapi.json lists invoke-route paths derived from the stored registry manifest; x-keystroke.manifest carries the full v2 manifest.\"\n};\n//#endregion\n//#region src/constants/http.ts\nconst ACTIVE_ORG_COOKIE = \"keystroke-active-org-id\";\nconst ACTIVE_ORG_HEADER = \"x-keystroke-org-id\";\n//#endregion\n//#region src/organization-slug.ts\n/** Auth, session, and account-entry URL segments. */\nconst AUTH_ACCOUNT_SLUGS = [\n\t\"2fa\",\n\t\"accept-invite\",\n\t\"auth\",\n\t\"authorize\",\n\t\"callback\",\n\t\"callbacks\",\n\t\"confirm-email\",\n\t\"confirmation\",\n\t\"connect\",\n\t\"device\",\n\t\"email-verification\",\n\t\"forgot-password\",\n\t\"invite\",\n\t\"invites\",\n\t\"login\",\n\t\"logout\",\n\t\"magic-link\",\n\t\"mfa\",\n\t\"oauth\",\n\t\"onboarding\",\n\t\"password\",\n\t\"recovery\",\n\t\"register\",\n\t\"reset-password\",\n\t\"saml\",\n\t\"session\",\n\t\"sessions\",\n\t\"sign-in\",\n\t\"sign-up\",\n\t\"signin\",\n\t\"signout\",\n\t\"signup\",\n\t\"sso\",\n\t\"token\",\n\t\"tokens\",\n\t\"unlink\",\n\t\"verify\",\n\t\"verify-email\"\n];\n/** Org, workspace, billing, and account-management URL segments. */\nconst ORG_ACCOUNT_SLUGS = [\n\t\"account\",\n\t\"accounts\",\n\t\"billing\",\n\t\"console\",\n\t\"invoice\",\n\t\"invoices\",\n\t\"member\",\n\t\"members\",\n\t\"me\",\n\t\"org\",\n\t\"organization\",\n\t\"organizations\",\n\t\"orgs\",\n\t\"payment\",\n\t\"payments\",\n\t\"plan\",\n\t\"plans\",\n\t\"portal\",\n\t\"preferences\",\n\t\"profile\",\n\t\"settings\",\n\t\"subscription\",\n\t\"subscriptions\",\n\t\"team\",\n\t\"teams\",\n\t\"upgrade\",\n\t\"usage\",\n\t\"user\",\n\t\"users\",\n\t\"workspace\",\n\t\"workspaces\"\n];\n/** Product surfaces, resource types, and in-app navigation segments. */\nconst PRODUCT_SLUGS = [\n\t\"action\",\n\t\"actions\",\n\t\"activity\",\n\t\"agent\",\n\t\"agents\",\n\t\"analytics\",\n\t\"app\",\n\t\"apps\",\n\t\"artifact\",\n\t\"artifacts\",\n\t\"assistant\",\n\t\"assistants\",\n\t\"audit\",\n\t\"audit-log\",\n\t\"automation\",\n\t\"automations\",\n\t\"branch\",\n\t\"branches\",\n\t\"canvas\",\n\t\"chat\",\n\t\"chats\",\n\t\"connection\",\n\t\"connections\",\n\t\"create\",\n\t\"credential\",\n\t\"credentials\",\n\t\"dashboard\",\n\t\"deployment\",\n\t\"deployments\",\n\t\"examples\",\n\t\"execute\",\n\t\"execution\",\n\t\"executions\",\n\t\"explore\",\n\t\"get-started\",\n\t\"history\",\n\t\"inbox\",\n\t\"inspector\",\n\t\"integration\",\n\t\"integrations\",\n\t\"library\",\n\t\"logs\",\n\t\"marketplace\",\n\t\"mcp\",\n\t\"mcps\",\n\t\"new\",\n\t\"notifications\",\n\t\"observe\",\n\t\"plugin\",\n\t\"plugins\",\n\t\"primitive\",\n\t\"primitives\",\n\t\"project\",\n\t\"projects\",\n\t\"recents\",\n\t\"registry\",\n\t\"reports\",\n\t\"run\",\n\t\"runs\",\n\t\"runtime\",\n\t\"runtimes\",\n\t\"sandbox\",\n\t\"sandboxes\",\n\t\"search\",\n\t\"skill\",\n\t\"skills\",\n\t\"templates\",\n\t\"thread\",\n\t\"threads\",\n\t\"trigger\",\n\t\"triggers\",\n\t\"version\",\n\t\"versions\",\n\t\"workflow\",\n\t\"workflows\"\n];\n/** Marketing, docs, company, and go-to-market URL segments. */\nconst MARKETING_SITE_SLUGS = [\n\t\"about\",\n\t\"affiliates\",\n\t\"ai\",\n\t\"announcements\",\n\t\"anthropic\",\n\t\"blog\",\n\t\"book-demo\",\n\t\"brand\",\n\t\"campaigns\",\n\t\"career\",\n\t\"careers\",\n\t\"case-studies\",\n\t\"casestudies\",\n\t\"changelog\",\n\t\"chatgpt\",\n\t\"chrome-extension\",\n\t\"claude\",\n\t\"codex\",\n\t\"community\",\n\t\"company\",\n\t\"compare\",\n\t\"contact\",\n\t\"contribute\",\n\t\"creators\",\n\t\"customers\",\n\t\"demo\",\n\t\"demos\",\n\t\"discord\",\n\t\"docs\",\n\t\"documentation\",\n\t\"download\",\n\t\"downloads\",\n\t\"dust\",\n\t\"emerging-talent\",\n\t\"engineering-blog\",\n\t\"enterprise\",\n\t\"events\",\n\t\"experts\",\n\t\"extension\",\n\t\"faq\",\n\t\"faqs\",\n\t\"features\",\n\t\"forum\",\n\t\"glean\",\n\t\"grok\",\n\t\"guide\",\n\t\"guides\",\n\t\"gumloop\",\n\t\"handbook\",\n\t\"help\",\n\t\"help-center\",\n\t\"home\",\n\t\"how-it-works\",\n\t\"howitworks\",\n\t\"inspo\",\n\t\"intern\",\n\t\"investors\",\n\t\"jobs\",\n\t\"legal\",\n\t\"lindy\",\n\t\"llm\",\n\t\"llms\",\n\t\"love\",\n\t\"make\",\n\t\"manifesto\",\n\t\"media\",\n\t\"merch\",\n\t\"mission\",\n\t\"mobile\",\n\t\"models\",\n\t\"n8n\",\n\t\"news\",\n\t\"newsroom\",\n\t\"open\",\n\t\"open-claw\",\n\t\"open-source\",\n\t\"openai\",\n\t\"our-story\",\n\t\"overview\",\n\t\"partners\",\n\t\"pi\",\n\t\"pipedream\",\n\t\"platform\",\n\t\"press\",\n\t\"press-kit\",\n\t\"pricing\",\n\t\"privacy\",\n\t\"product\",\n\t\"products\",\n\t\"provider\",\n\t\"providers\",\n\t\"quick-start\",\n\t\"quickstart\",\n\t\"refer\",\n\t\"relay\",\n\t\"relay-app\",\n\t\"reporting\",\n\t\"request-demo\",\n\t\"resources\",\n\t\"roadmap\",\n\t\"schedule-demo\",\n\t\"security\",\n\t\"solutions\",\n\t\"stack-ai\",\n\t\"stackai\",\n\t\"startup\",\n\t\"startups\",\n\t\"status\",\n\t\"stories\",\n\t\"story\",\n\t\"students\",\n\t\"support\",\n\t\"swag\",\n\t\"switch\",\n\t\"talent\",\n\t\"terms\",\n\t\"testimonials\",\n\t\"thesis\",\n\t\"tines\",\n\t\"trust\",\n\t\"tutorials\",\n\t\"university\",\n\t\"use-case\",\n\t\"use-cases\",\n\t\"usecases\",\n\t\"versus\",\n\t\"vellum\",\n\t\"vs\",\n\t\"webinars\",\n\t\"workato\",\n\t\"xai\",\n\t\"yc\",\n\t\"zapier\"\n];\n/** Integrations, competitors, and partner brand slugs (marketing / integration pages). */\nconst INTEGRATION_BRAND_SLUGS = [\n\t\"airtable\",\n\t\"asana\",\n\t\"aws\",\n\t\"azure\",\n\t\"bun\",\n\t\"confluence\",\n\t\"copilot\",\n\t\"cursor\",\n\t\"databricks\",\n\t\"figma\",\n\t\"firebase\",\n\t\"fly\",\n\t\"gcp\",\n\t\"gemini\",\n\t\"github\",\n\t\"gitlab\",\n\t\"gmail\",\n\t\"heroku\",\n\t\"hubspot\",\n\t\"huggingface\",\n\t\"jira\",\n\t\"linear\",\n\t\"mailchimp\",\n\t\"meta\",\n\t\"mistral\",\n\t\"mixmax\",\n\t\"monday\",\n\t\"netlify\",\n\t\"neon\",\n\t\"notion\",\n\t\"npm\",\n\t\"outlook\",\n\t\"outreach\",\n\t\"perplexity\",\n\t\"planetscale\",\n\t\"pnpm\",\n\t\"postmark\",\n\t\"ramp\",\n\t\"railway\",\n\t\"render\",\n\t\"resend\",\n\t\"salesforce\",\n\t\"segment\",\n\t\"sendgrid\",\n\t\"shopify\",\n\t\"slack\",\n\t\"snowflake\",\n\t\"stripe\",\n\t\"supabase\",\n\t\"terraform\",\n\t\"trello\",\n\t\"turso\",\n\t\"twilio\",\n\t\"typeform\",\n\t\"vercel\",\n\t\"vscode\",\n\t\"windsurf\",\n\t\"yarn\"\n];\n/** Company, team, and department landing-page segments. */\nconst COMPANY_TEAM_SLUGS = [\n\t\"engineers\",\n\t\"engineering\",\n\t\"executives\",\n\t\"hc\",\n\t\"intern\",\n\t\"it\",\n\t\"leadership\",\n\t\"marketing\",\n\t\"ops\",\n\t\"revops\",\n\t\"sales\",\n\t\"services\",\n\t\"tech\"\n];\n/** Legal, trust, compliance, and policy URL segments. */\nconst LEGAL_TRUST_SLUGS = [\n\t\"accessibility\",\n\t\"agreement\",\n\t\"a11y\",\n\t\"bug-bounty\",\n\t\"compliance\",\n\t\"cookie-policy\",\n\t\"cookies\",\n\t\"data-use\",\n\t\"disclose\",\n\t\"dpa\",\n\t\"eula\",\n\t\"gdpr\",\n\t\"hipaa\",\n\t\"iso\",\n\t\"msa\",\n\t\"pci\",\n\t\"responsible-disclosure\",\n\t\"sla\",\n\t\"soc2\",\n\t\"tos\",\n\t\"trust-center\",\n\t\"trustcenter\",\n\t\"vulnerability\"\n];\n/** Developer, API, CLI, and technical URL segments. */\nconst DEVELOPER_TECH_SLUGS = [\n\t\"api\",\n\t\"api-docs\",\n\t\"cli\",\n\t\"code\",\n\t\"config\",\n\t\"developer\",\n\t\"developer-tools\",\n\t\"developers\",\n\t\"dev-tools\",\n\t\"devtools\",\n\t\"dev\",\n\t\"dev-states\",\n\t\"graphql\",\n\t\"graphql-playground\",\n\t\"mcp-server\",\n\t\"mcp-servers\",\n\t\"openapi\",\n\t\"sdk\",\n\t\"swagger\"\n];\n/** Infra, ops, static assets, and system URL segments. */\nconst INFRA_SYSTEM_SLUGS = [\n\t\"acme-challenge\",\n\t\"admin\",\n\t\"apple-app-site-association\",\n\t\"assets\",\n\t\"batch\",\n\t\"cache\",\n\t\"cdn\",\n\t\"cron\",\n\t\"debug\",\n\t\"error\",\n\t\"errors\",\n\t\"favicon\",\n\t\"feed\",\n\t\"files\",\n\t\"health\",\n\t\"healthcheck\",\n\t\"healthz\",\n\t\"hooks\",\n\t\"internal\",\n\t\"item\",\n\t\"manifest\",\n\t\"metrics\",\n\t\"null\",\n\t\"ping\",\n\t\"prod\",\n\t\"public\",\n\t\"redirect\",\n\t\"robots\",\n\t\"rpc\",\n\t\"rss\",\n\t\"sharer\",\n\t\"sitemap\",\n\t\"staging\",\n\t\"static\",\n\t\"storage\",\n\t\"test\",\n\t\"undefined\",\n\t\"universal\",\n\t\"webhooks\",\n\t\"well-known\",\n\t\"www\"\n];\n/** Reserved slugs that are valid org names in theory but blocked for routing safety. */\nconst ROUTING_SAFETY_SLUGS = [\n\t\"alpha\",\n\t\"anonymous\",\n\t\"archive\",\n\t\"archived\",\n\t\"beta\",\n\t\"clone\",\n\t\"copy\",\n\t\"default\",\n\t\"deleted\",\n\t\"demo-org\",\n\t\"draft\",\n\t\"drafts\",\n\t\"duplicate\",\n\t\"early-access\",\n\t\"embed\",\n\t\"embedded\",\n\t\"export\",\n\t\"fork\",\n\t\"free\",\n\t\"guest\",\n\t\"import\",\n\t\"index\",\n\t\"list\",\n\t\"manage\",\n\t\"moderator\",\n\t\"newsletter\",\n\t\"owner\",\n\t\"preview\",\n\t\"previews\",\n\t\"private\",\n\t\"pro\",\n\t\"public-api\",\n\t\"publish\",\n\t\"published\",\n\t\"queue\",\n\t\"remove\",\n\t\"root\",\n\t\"sample\",\n\t\"samples\",\n\t\"selection\",\n\t\"share\",\n\t\"shared\",\n\t\"sponsor\",\n\t\"sponsors\",\n\t\"sponsorship\",\n\t\"subscribe\",\n\t\"super\",\n\t\"superuser\",\n\t\"system\",\n\t\"sys\",\n\t\"test-org\",\n\t\"trash\",\n\t\"unpublish\",\n\t\"unsubscribe\",\n\t\"upload\",\n\t\"uploads\",\n\t\"waitlist\",\n\t\"widget\",\n\t\"widgets\",\n\t\"worker\",\n\t\"workers\"\n];\n/**\n* URL segments reserved for global (non-org) routes — cannot be used as an org slug.\n* Prefer adding new entries to the category arrays above; the Set is the enforcement surface.\n*/\nconst RESERVED_ORGANIZATION_SLUGS = new Set([\n\t...AUTH_ACCOUNT_SLUGS,\n\t...ORG_ACCOUNT_SLUGS,\n\t...PRODUCT_SLUGS,\n\t...MARKETING_SITE_SLUGS,\n\t...INTEGRATION_BRAND_SLUGS,\n\t...COMPANY_TEAM_SLUGS,\n\t...LEGAL_TRUST_SLUGS,\n\t...DEVELOPER_TECH_SLUGS,\n\t...INFRA_SYSTEM_SLUGS,\n\t...ROUTING_SAFETY_SLUGS\n]);\n/**\n* Base slug format: lowercase, 2-64 chars, alphanumeric + dashes.\n*\n* IMPORTANT: this is the schema for *reading* slugs (persisted rows, API\n* responses). It intentionally does NOT enforce the reserved-name list — an org\n* created before a name became reserved must still parse on read. Use\n* `ClaimableOrganizationSlugSchema` to validate slugs a user is trying to claim.\n*/\nconst OrganizationSlugSchema = z.string().trim().toLowerCase().min(2, \"Slug must be at least 2 characters\").max(64, \"Slug must be at most 64 characters\").regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, \"Use lowercase letters, numbers, and dashes only\");\n/**\n* Slug validation for *claiming* a slug (organization create/rename). Adds the\n* reserved-name check on top of the base format. Never use this to parse\n* existing org data, or pre-existing orgs whose slug later became reserved would\n* fail to load.\n*/\nconst ClaimableOrganizationSlugSchema = OrganizationSlugSchema.refine((slug) => !RESERVED_ORGANIZATION_SLUGS.has(slug), \"This slug is reserved\");\nconst ORGANIZATION_NAME_APOSTROPHE_PATTERN = /[''\\u2018\\u2019]/g;\n/** Normalize a display name into slug-shaped text (may be empty or too short to claim). */\nfunction normalizeOrganizationNameToSlugBase(name) {\n\treturn name.trim().toLowerCase().replace(ORGANIZATION_NAME_APOSTROPHE_PATTERN, \"\").replace(/[^a-z0-9]+/g, \"-\").replace(/-+/g, \"-\").replace(/^-|-$/g, \"\");\n}\n/**\n* Live slug preview while typing an org name. Returns normalized text only —\n* no server-side `\"org\"` fallback when the preview is empty or under min length.\n*/\nfunction previewOrganizationSlugFromName(name) {\n\treturn normalizeOrganizationNameToSlugBase(name);\n}\n/** Derive a URL slug from a display name (not guaranteed unique). */\nfunction slugifyOrganizationName(name) {\n\tconst base = normalizeOrganizationNameToSlugBase(name);\n\tif (!base) return \"org\";\n\tconst parsed = OrganizationSlugSchema.safeParse(base);\n\treturn parsed.success ? parsed.data : \"org\";\n}\nfunction parseOrganizationSlug(input) {\n\treturn OrganizationSlugSchema.parse(input);\n}\n//#endregion\n//#region src/project-slug.ts\n/** Same format as organization slugs — org-scoped, no global reserved list. */\nconst ProjectSlugSchema = OrganizationSlugSchema;\n/** Derive a URL slug from a project display name (not guaranteed unique within the org). */\nfunction slugifyProjectName(name) {\n\tconst base = normalizeOrganizationNameToSlugBase(name);\n\tif (!base) return \"project\";\n\tconst parsed = ProjectSlugSchema.safeParse(base);\n\treturn parsed.success ? parsed.data : \"project\";\n}\nfunction parseProjectSlug(input) {\n\treturn ProjectSlugSchema.parse(input);\n}\n//#endregion\n//#region src/schemas/organizations.ts\n/** Canonical copy for slug collision errors (API + UI). */\nconst ORGANIZATION_SLUG_TAKEN_MESSAGE = \"That slug is already taken.\";\nconst PROJECT_SLUG_TAKEN_MESSAGE = \"That slug is already taken.\";\nconst OrganizationSlugErrorCodeSchema = z.enum([\n\t\"slug_taken\",\n\t\"slug_reserved\",\n\t\"slug_invalid\"\n]);\nconst SlugAvailabilityReasonSchema = z.enum([\n\t\"taken\",\n\t\"reserved\",\n\t\"invalid\"\n]);\nconst SlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: SlugAvailabilityReasonSchema.optional(),\n\tsuggestion: OrganizationSlugSchema.optional()\n});\nconst SlugAvailabilityQuerySchema = z.object({\n\tslug: z.string().trim().min(1),\n\texcludeOrganizationId: z.string().min(1).optional()\n});\nconst ProjectSlugAvailabilityReasonSchema = z.enum([\"taken\", \"invalid\"]);\nconst ProjectSlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: ProjectSlugAvailabilityReasonSchema.optional(),\n\tsuggestion: ProjectSlugSchema.optional()\n});\nconst ProjectSlugAvailabilityQuerySchema = z.object({\n\tslug: z.string().trim().min(1),\n\texcludeProjectId: z.string().min(1).optional()\n});\n/** Client-side instant validation before hitting the project slug availability endpoint. */\nfunction validateProjectSlug(slug) {\n\tconst normalized = slug.trim().toLowerCase();\n\tif (!normalized) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: \"Slug is required\"\n\t};\n\tconst parsed = ProjectSlugSchema.safeParse(normalized);\n\tif (!parsed.success) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: parsed.error.issues[0]?.message ?? \"Invalid slug\"\n\t};\n\treturn { valid: true };\n}\n/** Client-side instant validation before hitting the availability endpoint. */\nfunction validateClaimableOrganizationSlug(slug) {\n\tconst normalized = slug.trim().toLowerCase();\n\tif (!normalized) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: \"Slug is required\"\n\t};\n\tconst format = OrganizationSlugSchema.safeParse(normalized);\n\tif (!format.success) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: format.error.issues[0]?.message ?? \"Invalid slug\"\n\t};\n\tif (RESERVED_ORGANIZATION_SLUGS.has(format.data)) return {\n\t\tvalid: false,\n\t\treason: \"reserved\",\n\t\tmessage: \"This slug is reserved\"\n\t};\n\treturn { valid: true };\n}\nfunction organizationSlugErrorCodeFromMessage(message) {\n\tif (message === \"That slug is already taken.\" || /already taken/i.test(message)) return \"slug_taken\";\n\tif (/reserved/i.test(message)) return \"slug_reserved\";\n\treturn \"slug_invalid\";\n}\nconst ProjectStatusSchema = z.enum([\n\t\"inactive\",\n\t\"starting\",\n\t\"active\",\n\t\"failed\"\n]);\nconst OrganizationUserRoleSchema = z.enum([\n\t\"owner\",\n\t\"admin\",\n\t\"builder\"\n]);\nconst isoDateTime$5 = z.string().datetime();\nconst OrganizationSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tslug: OrganizationSlugSchema,\n\tverified: z.boolean(),\n\tcreatedAt: isoDateTime$5,\n\tupdatedAt: isoDateTime$5\n});\nconst ProjectSchema = z.object({\n\tid: z.string(),\n\torganizationId: z.string(),\n\tname: z.string(),\n\tslug: ProjectSlugSchema,\n\tdescription: z.string().nullable(),\n\tstatus: ProjectStatusSchema,\n\tbaseUrl: z.string().nullable(),\n\truntimeId: z.string().nullable(),\n\tlastError: z.string().nullable(),\n\tcreatedAt: isoDateTime$5,\n\tupdatedAt: isoDateTime$5\n});\nconst UserOrganizationSchema = z.object({\n\torganization: OrganizationSchema,\n\trole: OrganizationUserRoleSchema\n});\nconst CurrentOrganizationResponseSchema = UserOrganizationSchema.nullable();\nconst ActiveOrganizationResponseSchema = CurrentOrganizationResponseSchema;\nconst ListOrganizationsResponseSchema = z.array(UserOrganizationSchema);\nconst CreateOrganizationRequestSchema = z.object({\n\tname: z.string().trim().min(1),\n\t/** Format-only at the wire boundary; reserved-name checks run in platform-database. */\n\tslug: OrganizationSlugSchema.optional()\n});\nconst UpdateOrganizationRequestSchema = z.object({\n\tname: z.string().trim().min(1).optional(),\n\tslug: ClaimableOrganizationSlugSchema.optional()\n}).refine((data) => data.name !== void 0 || data.slug !== void 0, { message: \"At least one field is required\" });\nconst CreateOrganizationResponseSchema = UserOrganizationSchema;\nconst ListProjectsResponseSchema = z.array(ProjectSchema);\nconst ProjectListMetricsSchema = z.object({\n\tagentCount: z.number(),\n\tworkflowCount: z.number(),\n\tskillCount: z.number(),\n\tcredentialCount: z.number(),\n\tlastDeploymentAt: isoDateTime$5.nullable()\n});\nconst ListProjectMetricsResponseSchema = z.record(z.string(), ProjectListMetricsSchema);\nconst CreateProjectRequestSchema = z.object({\n\tname: z.string().trim().min(1),\n\tdescription: z.string().trim().min(1).optional()\n});\nconst UpdateProjectRequestSchema = z.object({\n\tname: z.string().trim().min(1).optional(),\n\tdescription: z.string().trim().optional(),\n\tslug: ProjectSlugSchema.optional()\n}).refine((data) => data.name !== void 0 || data.description !== void 0 || data.slug !== void 0, { message: \"At least one field is required\" });\nconst CreateProjectResponseSchema = ProjectSchema;\nconst ProjectResponseSchema = ProjectSchema;\nconst ProjectReachabilityResponseSchema = z.object({ reachable: z.boolean() });\nfunction parseCreateOrganizationRequest(input) {\n\treturn CreateOrganizationRequestSchema.parse(input);\n}\n//#endregion\n//#region src/app-slug.ts\n/** Org-custom app slug segment (the part after `{orgSlug}/`). Same format as project slugs. */\nconst AppSlugSchema = ProjectSlugSchema;\nconst APP_SLUG_TAKEN_MESSAGE = PROJECT_SLUG_TAKEN_MESSAGE;\n/** Derive a slug segment from a display name (not guaranteed unique). */\nfunction slugifyAppName(name) {\n\treturn slugifyProjectName(name);\n}\nconst validateAppSlug = validateProjectSlug;\n//#endregion\n//#region src/constants/projects.ts\n/** Platform wait for project /health before declaring unreachable. */\nconst PROJECT_PING_TIMEOUT_MS = 15e3;\n/** Browser→platform request budget (ping + small platform overhead). */\nconst PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS = 17e3;\n/** Pause between reachability checks after the previous check finishes. */\nconst PROJECT_REACHABILITY_RETRY_MS = 5e3;\n//#endregion\n//#region src/docs-url.ts\n/** Path of the public Mintlify-hosted docs search MCP server, relative to the web origin. */\nconst DOCS_MCP_PATH = \"/docs/mcp\";\n/**\n* Tool names exposed by the public Mintlify-hosted docs MCP server. These are the\n* upstream tool identifiers we proxy to; our CLI and MCP server present stable\n* `docs search`/`query` and `search_docs`/`query_docs` surfaces on top of them.\n*/\nconst DOCS_SEARCH_TOOL = \"search_keystroke\";\nconst DOCS_QUERY_TOOL = \"query_docs_filesystem_keystroke\";\n/**\n* Resolve the public Keystroke docs MCP URL. Defaults to `{webUrl}/docs/mcp`;\n* an explicit `override` (e.g. `KEYSTROKE_DOCS_MCP_URL`) wins for dev/testing.\n*/\nfunction resolveDocsMcpUrl(options) {\n\tconst override = options.override?.trim();\n\tif (override) return override.replace(/\\/+$/, \"\");\n\treturn `${options.webUrl.replace(/\\/+$/, \"\")}${DOCS_MCP_PATH}`;\n}\n//#endregion\n//#region src/public-url.ts\n/** Normalize a public origin URL (no trailing slash). */\nfunction originFromPublicUrl(value, fallback) {\n\tconst trimmed = value?.trim();\n\tif (!trimmed) return fallback.replace(/\\/+$/, \"\");\n\treturn trimmed.replace(/\\/+$/, \"\");\n}\n/** TCP port to bind for a local server, derived from a public URL. */\nfunction listenPortFromUrl(url, fallback) {\n\tconst parsed = new URL(url);\n\tif (parsed.port) {\n\t\tconst port = Number(parsed.port);\n\t\tif (Number.isFinite(port) && port > 0) return port;\n\t}\n\tif (parsed.protocol === \"https:\") return 443;\n\tif (parsed.protocol === \"http:\") return 80;\n\treturn fallback;\n}\n/** Shorthand: listen port from `PUBLIC_*_URL` or fallback. */\nfunction listenPortFromPublicUrl(value, fallback) {\n\tconst trimmed = value?.trim();\n\tif (!trimmed) return fallback;\n\ttry {\n\t\treturn listenPortFromUrl(trimmed, fallback);\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n//#endregion\n//#region src/platform-origin.ts\nconst LOCAL_PLATFORM_ORIGIN = \"http://localhost:3002\";\n/** Default production platform origin when no env override is set. */\nconst DEFAULT_CLOUD_PLATFORM_ORIGIN = \"https://api.keystroke.ai\";\n/** Reads `PUBLIC_PLATFORM_URL` when explicitly set. */\nfunction resolveExplicitPublicPlatformOrigin(env = process.env) {\n\treturn env.PUBLIC_PLATFORM_URL?.replace(/\\/$/, \"\") || void 0;\n}\n/** `PUBLIC_PLATFORM_URL` origin; falls back to {@link LOCAL_PLATFORM_ORIGIN} when unset. */\nfunction resolvePublicPlatformOrigin(env = process.env) {\n\treturn resolveExplicitPublicPlatformOrigin(env) ?? \"http://localhost:3002\";\n}\n/**\n* Provider-facing platform origin (OAuth redirect URIs, webhook intake URLs).\n*\n* When the platform runs on localhost but is exposed through an HTTPS tunnel\n* (e.g. cloudflared), set `PUBLIC_PLATFORM_PROXY_URL` to the tunnel origin so external\n* providers get reachable HTTPS URLs while `PUBLIC_PLATFORM_URL` stays on localhost\n* for browser auth/CORS. Requires an explicit platform URL (no localhost fallback).\n*/\nfunction resolveExternalPlatformOrigin(env = process.env) {\n\tconst proxy = env.PUBLIC_PLATFORM_PROXY_URL?.replace(/\\/$/, \"\");\n\tif (proxy) return proxy;\n\treturn resolveExplicitPublicPlatformOrigin(env);\n}\n/** Platform API origin: `<platform>/api`. */\nfunction resolvePublicPlatformApiOrigin(env = process.env) {\n\tconst platform = resolveExternalPlatformOrigin(env);\n\tif (!platform) return;\n\treturn `${platform}/api`;\n}\n/** Webhook intake origin for a project: `<platform>/api/projects/<id>`. */\nfunction resolvePlatformWebhookOrigin(projectId, env = process.env) {\n\tconst platform = resolveExternalPlatformOrigin(env);\n\tif (!platform) return;\n\treturn `${platform}/api/projects/${encodeURIComponent(projectId)}`;\n}\n/**\n* Platform origin injected into MCP workspace CLI environments (`KEYSTROKE_PLATFORM_URL`).\n* Prefers the tunnel/proxy URL so remote workspaces can reach a local dev platform.\n*/\nfunction resolveMcpPlatformUrl(env = process.env) {\n\tconst external = resolveExternalPlatformOrigin(env);\n\tif (external) return external;\n\tconst platform = env.PLATFORM_URL?.trim().replace(/\\/+$/, \"\");\n\tif (platform) return platform;\n\treturn DEFAULT_CLOUD_PLATFORM_ORIGIN;\n}\n//#endregion\n//#region src/tool-parameters.ts\n/**\n* JSON Schema draft 2020-12 for LLM tool inputs (not OpenAPI 3.0).\n*\n* Enforces an object root: Anthropic (and the AI SDK gateway path) reject any\n* tool whose `input_schema` is a bare union/array at the root with\n* `input_schema.type: Field required`, which silently kills the whole turn. A\n* top-level `z.discriminatedUnion`/`z.union` is the usual culprit — flatten it\n* into a single object (discriminator field + optional fields). Unions nested\n* under a property are fine.\n*/\nfunction toolParameters(schema) {\n\tconst json = z.toJSONSchema(schema, { target: \"draft-2020-12\" });\n\tif (json.type !== \"object\") {\n\t\tconst root = json.type ?? Object.keys(json).find((key) => key === \"anyOf\" || key === \"oneOf\");\n\t\tthrow new Error(`Tool input schema root must be type:\"object\" (got ${JSON.stringify(root)}). Flatten top-level unions into one object with a discriminator field.`);\n\t}\n\treturn json;\n}\n//#endregion\n//#region src/prompt-context.ts\nconst AGENT_CONTEXT_OPEN = \"<keystroke-context>\";\nconst AGENT_CONTEXT_CLOSE = \"</keystroke-context>\";\n/** Wrap injected prompt context so the UI can strip it while the agent still reads it. */\nfunction wrapPromptContext(context) {\n\treturn `${AGENT_CONTEXT_OPEN}\\n${context}\\n${AGENT_CONTEXT_CLOSE}`;\n}\n/** Remove sentinel tag strings from user-controlled values before embedding them. */\nfunction sanitizePromptContextContent(text) {\n\treturn text.replaceAll(AGENT_CONTEXT_OPEN, \"\").replaceAll(AGENT_CONTEXT_CLOSE, \"\");\n}\nconst CONTEXT_BLOCK = /<keystroke-context>[\\s\\S]*?<\\/keystroke-context>\\s*/g;\n/** Remove any wrapped context block(s) from a text string. */\nfunction stripPromptContext(text) {\n\treturn text.replace(CONTEXT_BLOCK, \"\").trimStart();\n}\n//#endregion\n//#region src/define-tool.ts\n/** Attached by {@link defineTool} for optional introspection (not on wire). */\nconst AGENT_TOOL_INPUT = Symbol.for(\"keystroke.agentTool.inputSchema\");\nfunction getAgentToolInputSchema(tool) {\n\treturn tool[AGENT_TOOL_INPUT];\n}\n/** Author an agent tool from Zod; converts to JSON Schema and validates input on every `execute`. */\nfunction defineTool(tool) {\n\tconst { parameters: inputSchema, execute, prepareArguments, ...rest } = tool;\n\treturn {\n\t\t...rest,\n\t\tparameters: toolParameters(inputSchema),\n\t\tasync execute(toolCallId, params, signal, onUpdate) {\n\t\t\tconst parsed = inputSchema.parse(params);\n\t\t\treturn execute(toolCallId, prepareArguments ? prepareArguments(parsed) : parsed, signal, onUpdate);\n\t\t},\n\t\t[AGENT_TOOL_INPUT]: inputSchema\n\t};\n}\n//#endregion\n//#region src/constants/route-manifest.ts\n/** On-disk path under the project root (packed in deploy artifacts when present). */\nconst ROUTE_MANIFEST_REL_PATH = \"dist/.keystroke/route-manifest.json\";\n//#endregion\n//#region src/schemas/credentials.ts\n/** How a credential instance is stored (`credential_instances.auth_kind`). */\nconst CredentialAuthKindSchema = z.enum([\n\t\"api_key\",\n\t\"oauth_managed\",\n\t\"keystroke\"\n]);\n/**\n* Where a credential instance is stored (`credential_instances.scope_type`), and the only thing an\n* action/tool can pin via `.scope(...)`. There is no resolution chain: when no scope is pinned, the\n* resolver tries the project default, then the org default, then throws.\n*/\nconst CredentialScopeTypeSchema = z.enum([\n\t\"organization\",\n\t\"project\",\n\t\"user\"\n]);\nconst CREDENTIAL_AUTH_KINDS = CredentialAuthKindSchema.options;\nconst CREDENTIAL_SCOPE_TYPES = CredentialScopeTypeSchema.options;\n//#endregion\n//#region src/schemas/display-text.ts\n/** Non-empty human-readable label or description (trimmed). */\nconst requiredDisplayTextSchema = z.string().trim().min(1);\n//#endregion\n//#region src/schemas/workflow-canvas.ts\n/**\n* Structural workflow-canvas graph contract.\n*\n* This is the deterministic skeleton the deploy-time AST producer emits for a\n* workflow (nodes + edges), plus the manifest-derived trigger-source nodes. It\n* is the single source of truth shared by:\n* - the AST producer (emits it at deploy, stored with the manifest),\n* - the platform route that serves the canvas, and\n* - the SDK / web client that renders it (React Flow).\n*\n* Only the structural skeleton lives here. The LLM enrichment + run-overlay\n* envelope types live in `workflow-canvas-envelope.ts`; the SDK re-exports them.\n* See WORKFLOW.md (§4 grammar, §8 node ids, §9 caching).\n*/\n/**\n* Canvas node taxonomy — the single discriminator for every canvas node. The\n* client derives the React Flow component, icon, and per-node treatment from it\n* (no parallel `type` / `data.kind` fields), and the producer + fixtures emit it\n* directly, so the structural contract can never silently diverge across the\n* deploy → render boundary.\n* - Boundaries: `entry` (Start, owns input) · `exit` (Output, owns output) ·\n*   `error` (a terminal `throw` — an error output that ends the run on a branch)\n* - Callable: `step` (action / agent / llm / hook / child-workflow invocation) —\n*   the invocation flavor lives in {@link WorkflowCanvasCallKind}\n* - Structural control flow: `code-block` · `decision` · `merge` · `loop` ·\n*   `parallel` (group containers) · `loop-start` (the group body's entry marker,\n*   shared by loop + parallel)\n* - Upstream of entry: `trigger-source` (one per manifest trigger attachment)\n*\n* `Promise.all([...])` is modeled as a `parallel` group container: the branches\n* are stacked inside and the container itself is the single prong leaving the\n* wrapper (there is no separate fork/join pair).\n*\n* `exit` and `error` are both terminals: a `return` flows to the shared `exit`\n* (the workflow output), while a `throw` gets its own `error` terminal off the\n* branch so guard clauses (`if (bad) throw …`) read as a visible dead-end.\n*/\nconst WorkflowCanvasNodeTypeSchema = z.enum([\n\t\"entry\",\n\t\"exit\",\n\t\"error\",\n\t\"step\",\n\t\"code-block\",\n\t\"decision\",\n\t\"merge\",\n\t\"loop\",\n\t\"parallel\",\n\t\"loop-start\",\n\t\"trigger-source\"\n]);\n/**\n* How a `step` node is invoked in source (drives the step icon). The structural\n* flavor (agent vs. plain action vs. LLM vs. sleep/hook) lives here so `nodeType`\n* stays `\"step\"` for every durable step.\n*\n* The AST producer emits `workflow-step` · `agent` · `llm` · `wait` · `hook`\n* today. `tool` and `child-workflow` are reserved for the deploy-time join to\n* classify a step against its resolved definition (the client already renders\n* both); they are part of the contract even though the producer doesn't emit\n* them yet.\n*/\nconst WorkflowCanvasCallKindSchema = z.enum([\n\t\"workflow-step\",\n\t\"agent\",\n\t\"llm\",\n\t\"wait\",\n\t\"hook\",\n\t\"tool\",\n\t\"child-workflow\"\n]);\n/** A labeled branch output on a decision-style node. */\nconst WorkflowCanvasNodeOutputSchema = z.object({\n\tid: z.string(),\n\tlabel: z.string()\n});\n/**\n* One token of a step's call-site argument value as captured by the producer.\n*\n* Raw form, one per source-expression shape so the inspector can render each\n* distinctly instead of dumping raw text:\n* - `text` — a literal value (string/number/boolean) or inert template chunk.\n* - `reference` — an upstream node output; carries only the structural\n*   `sourceNodeId` + `field` (the human `sourceLabel` is filled by the platform\n*   metadata join).\n* - `variable` — a code identifier / property access that isn't an upstream\n*   reference (e.g. a `const`, a loop variable, `job.id`). `text` is the source\n*   name; the platform may attach a `resolvedValue` for known top-level consts.\n* - `call` — a function call; carries only the callee `name` (e.g.\n*   `buildPrompt`), never the full argument list.\n*/\nconst WorkflowCanvasRawValueTokenSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"text\"),\n\t\ttext: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"reference\"),\n\t\t/** Upstream node id this value flows from; absent only for unresolved refs. */\n\t\tsourceNodeId: z.string().optional(),\n\t\t/** Output field of the source (dotted path); omitted = the whole output. */\n\t\tfield: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"variable\"),\n\t\ttext: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"call\"),\n\t\tname: z.string()\n\t})\n]);\n/**\n* A step input's configured value at its call site, captured deterministically\n* by the producer from the call's argument object. The platform join turns this\n* into the inspector's {@link WorkflowNodeInputBinding} (filling display labels).\n*/\nconst WorkflowCanvasRawBindingSchema = z.object({\n\ttokens: z.array(WorkflowCanvasRawValueTokenSchema),\n\t/** Render as a tall multi-line box (object/array/multiline template values). */\n\tmultiline: z.boolean().optional()\n});\n/**\n* Statically-captured `promptLlm` options for an `llm` step node. Literal-only:\n* dynamic/expression values (a computed model, a `system` built by a function) are\n* not captured; `system`/`outputSchema` record presence so the inspector can note\n* \"a system prompt is configured\" / \"structured output\" without their values.\n*/\nconst WorkflowCanvasLlmOptionsSchema = z.object({\n\tmodel: z.string().optional(),\n\tmaxTokens: z.number().optional(),\n\ttemperature: z.number().optional(),\n\tthinkingLevel: z.string().optional(),\n\thasSystemPrompt: z.boolean().optional(),\n\thasOutputSchema: z.boolean().optional()\n});\nconst WorkflowCanvasNodeDataSchema = z.object({\n\tlabel: z.string(),\n\t/** Set on group nodes (loop / parallel section containers). */\n\tgroupKind: z.enum([\n\t\t\"loop\",\n\t\t\"parallel\",\n\t\t\"conditional\"\n\t]).optional(),\n\tdescription: z.string().optional(),\n\t/** {@link WorkflowCanvasCallKind} or a looser raw call-site label. */\n\tcallKind: z.string().optional(),\n\t/**\n\t* App/integration slug for a `step` whose action/agent is imported directly\n\t* from a `@keystrokehq/<app>` package (e.g. \"slack\", \"apollo\"). Lets the client\n\t* badge the node with that app's logo; absent for custom (project-local)\n\t* actions, which fall back to the call-kind icon.\n\t*/\n\tappSlug: z.string().optional(),\n\t/** Cron/webhook/poll discriminator on trigger-source nodes. */\n\ttriggerType: z.string().optional(),\n\t/** Branch outputs (decision nodes). */\n\toutputs: z.array(WorkflowCanvasNodeOutputSchema).optional(),\n\t/**\n\t* Action/agent/workflow slug resolved at deploy time (via import → definition).\n\t* Optional when the deploy build cannot resolve source (dist-only artifacts).\n\t*/\n\tslug: z.string().optional(),\n\t/**\n\t* Durable call-site ids nested inside an off-grammar `code-block` (same-file only).\n\t* Used by the run overlay to light the block when any contained step executes.\n\t*/\n\tcontainedCallSiteIds: z.array(z.string()).optional(),\n\t/**\n\t* Per-input call-site value bindings for `step` nodes, keyed by input field name.\n\t* Deterministically captured from the call's argument object; reference tokens point\n\t* at the upstream node that produced the value. The platform join fills display labels.\n\t*/\n\tinputBindings: z.record(z.string(), WorkflowCanvasRawBindingSchema).optional(),\n\t/**\n\t* Static `promptLlm(prompt, options)` configuration captured at the call site for\n\t* `llm` step nodes. Only literal values are captured (model/maxTokens/temperature/\n\t* thinkingLevel); `system`/`outputSchema` are usually expressions, so only their\n\t* presence is recorded. Absent when no options are statically resolvable.\n\t*/\n\tllmOptions: WorkflowCanvasLlmOptionsSchema.optional()\n});\n/**\n* A single structural node. This is the deploy artifact's shape: identity\n* (`id`), the canonical discriminator (`nodeType`), display `data`, and group\n* nesting (`parentId`). All layout/rendering — React Flow component key,\n* positions, sizes, `extent`, group box dimensions — is derived entirely\n* client-side from this structure, so it never leaks into the wire contract.\n*/\nconst WorkflowCanvasGraphNodeSchema = z.object({\n\tid: z.string(),\n\tnodeType: WorkflowCanvasNodeTypeSchema,\n\tdata: WorkflowCanvasNodeDataSchema,\n\t/** Set on children nested inside a group (loop / parallel) container. */\n\tparentId: z.string().optional()\n});\nconst WorkflowCanvasEdgeSchema = z.object({\n\tid: z.string(),\n\tsource: z.string(),\n\ttarget: z.string(),\n\ttype: z.string().optional(),\n\tlabel: z.string().optional(),\n\tsourceHandle: z.string().optional(),\n\ttargetHandle: z.string().optional(),\n\tdata: z.object({ branchKind: z.enum([\n\t\t\"then\",\n\t\t\"else\",\n\t\t\"parallel-branch\",\n\t\t\"error\"\n\t]).optional() }).optional()\n});\n/** A statically-evaluable top-level `const` value (literal scalars only). */\nconst WorkflowCanvasConstantValueSchema = z.union([\n\tz.string(),\n\tz.number(),\n\tz.boolean()\n]);\n/**\n* Top-level `const NAME = <literal>` declarations in the workflow source, captured\n* at deploy. Lets the platform resolve `variable` value tokens (e.g. a `model` set\n* to a named const) to their concrete value for display. Scalars only — computed,\n* function-local, or non-literal consts are intentionally omitted.\n*/\nconst WorkflowCanvasConstantsSchema = z.record(z.string(), WorkflowCanvasConstantValueSchema);\nconst WorkflowCanvasGraphSchema = z.object({\n\tnodes: z.array(WorkflowCanvasGraphNodeSchema),\n\tedges: z.array(WorkflowCanvasEdgeSchema),\n\t/** Top-level literal constants from the workflow source (for value-token resolution). */\n\tconstants: WorkflowCanvasConstantsSchema.optional()\n});\n//#endregion\n//#region src/schemas/route-manifest.ts\n/**\n* Deploy-time summary of one credential a step requires, derived from the\n* action/agent-tool definition's `.credentials`. The workflow-canvas credential\n* overlay joins a step node's `slug` to these to resolve the bound instance.\n* `key` doubles as the app slug (matches `credential_instances.app_slug`).\n*/\nconst CredentialRequirementSummarySchema = z.object({\n\tkey: z.string(),\n\tkind: CredentialAuthKindSchema,\n\t/** Scope pinned via `.scope(...)`; absent means project-default → org-default. */\n\tscope: CredentialScopeTypeSchema.optional()\n});\nconst StoredRouteManifestSkillSchema = z.object({\n\tslug: z.string(),\n\tname: requiredDisplayTextSchema,\n\tdescription: requiredDisplayTextSchema,\n\tmoduleFile: z.string()\n});\nconst attachmentSchemasSchema = z.record(z.string(), z.object({\n\trequestSchema: z.record(z.string(), z.unknown()),\n\tfilterSchema: z.record(z.string(), z.unknown()).optional()\n}));\nconst attachmentMetaSchema = z.record(z.string(), z.object({\n\tname: requiredDisplayTextSchema,\n\tdescription: requiredDisplayTextSchema\n}));\nconst storedRouteManifestEntryV2Schema = z.discriminatedUnion(\"kind\", [\n\tz.object({ kind: z.literal(\"health\") }),\n\tz.object({\n\t\tkind: z.literal(\"agent\"),\n\t\tslug: z.string(),\n\t\tmoduleFile: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema,\n\t\tmodel: z.string(),\n\t\tsystemPrompt: z.string(),\n\t\ttoolCount: z.number().int().nonnegative(),\n\t\tcredentialCount: z.number().int().nonnegative(),\n\t\tappSlugs: z.array(z.string()).default([]),\n\t\ttoolSlugs: z.array(z.string()).default([]),\n\t\t/** Credential requirements per tool slug (the agent's credential consumer key). */\n\t\ttoolRequirements: z.record(z.string(), z.array(CredentialRequirementSummarySchema)).optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"action\"),\n\t\tslug: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema,\n\t\tmoduleFile: z.string(),\n\t\t/** App slug for actions imported from an integration package (`@keystrokehq/<app>/actions`). */\n\t\tappSlug: z.string().optional(),\n\t\tinputSchema: z.record(z.string(), z.unknown()),\n\t\toutputSchema: z.record(z.string(), z.unknown()),\n\t\t/** Credentials this action requires (for the canvas credential overlay). */\n\t\trequirements: z.array(CredentialRequirementSummarySchema).optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"workflow\"),\n\t\tslug: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema,\n\t\tsubscribable: z.boolean(),\n\t\tmoduleFile: z.string(),\n\t\trequestSchema: z.record(z.string(), z.unknown()),\n\t\tresponseSchema: z.record(z.string(), z.unknown()).optional(),\n\t\t/** Deterministic AST control-flow skeleton (deploy-time producer). */\n\t\tflowGraph: WorkflowCanvasGraphSchema.optional(),\n\t\t/** sha256 of the workflow source the `flowGraph` was produced from (staleness). */\n\t\tflowGraphSourceHash: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-webhook\"),\n\t\tendpoint: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\t/** sha256 of the trigger source file, baked at build time for overview change-detection. */\n\t\tsourceHash: z.string().optional(),\n\t\tattachmentSchemas: attachmentSchemasSchema,\n\t\tattachmentMeta: attachmentMetaSchema.optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll\"),\n\t\tattachmentId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tsourceHash: z.string().optional(),\n\t\tschedule: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll-group\"),\n\t\tpollId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tschedule: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"cron-schedule\"),\n\t\tattachmentId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tsourceHash: z.string().optional(),\n\t\tschedule: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema\n\t})\n]);\nconst storedRouteManifestV2Schema = z.object({\n\tversion: z.literal(2),\n\tentries: z.array(storedRouteManifestEntryV2Schema),\n\tskills: z.array(StoredRouteManifestSkillSchema).default([]),\n\tintegrations: z.array(z.string()).optional()\n});\nconst StoredRouteManifestSchema = storedRouteManifestV2Schema;\n/**\n* Parse a stored route manifest. Only the strict v2 schema is supported: the\n* builder always emits v2 and every deploy regenerates the manifest, so there is\n* no legacy upcasting. (The pre-v2 `normalizeEntryToV2` path was removed once the\n* data tables were truncated and all artifacts redeployed.)\n*/\nfunction parseStoredRouteManifest(value) {\n\treturn storedRouteManifestV2Schema.parse(value);\n}\n//#endregion\n//#region src/schemas/channels.ts\n/** Messaging platforms that support agent gateway bindings. */\nconst ChannelPlatformKeySchema = z.enum([\"slack\"]);\nconst ChannelReactionSupportSchema = z.enum([\n\t\"full\",\n\t\"read-only\",\n\t\"none\"\n]);\nconst ChannelCardSupportSchema = z.enum([\n\t\"full\",\n\t\"partial\",\n\t\"none\"\n]);\nconst ChannelStreamingSupportSchema = z.enum([\n\t\"native\",\n\t\"post-edit\",\n\t\"buffered\",\n\t\"drafts\",\n\t\"none\"\n]);\nconst ChannelCapabilitiesSchema = z.object({\n\tmentions: z.boolean(),\n\treactions: ChannelReactionSupportSchema,\n\tcards: ChannelCardSupportSchema,\n\tmodals: z.boolean(),\n\tstreaming: ChannelStreamingSupportSchema,\n\tdms: z.boolean()\n});\nconst ChannelListenModeSchema = z.enum([\n\t\"mention\",\n\t\"all\",\n\t\"dm\"\n]);\nconst ChannelBindingKindSchema = z.enum([\n\t\"public\",\n\t\"private\",\n\t\"dm\",\n\t\"group\",\n\t\"space\"\n]);\nconst AppGatewaySchema = z.object({\n\tcapabilities: ChannelCapabilitiesSchema,\n\tsupportedModes: z.array(ChannelListenModeSchema).min(1),\n\tresourceNoun: z.object({\n\t\tsingular: z.string().min(1),\n\t\tplural: z.string().min(1)\n\t}),\n\tsupportsChannelDirectory: z.boolean(),\n\twebhookPathHint: z.string().min(1),\n\t/** Composio/keystroke app slug for Connect when it differs from the gateway platform key (e.g. slack → slackbot). */\n\tconnectAppId: z.string().min(1).optional(),\n\tdocsUrl: z.string().url().optional(),\n\ttagline: z.string().min(1).optional()\n});\n/** Projected catalog row for the agent channels panel (derived from apps with `gateway`). */\nconst ChannelPlatformSchema = z.object({\n\tkey: ChannelPlatformKeySchema,\n\tname: z.string().min(1),\n\tappLogoId: z.string().min(1),\n\tfallbackDomain: z.string().min(1),\n\tdescription: z.string().min(1),\n\ttagline: z.string().min(1),\n\tauthKind: z.enum([\n\t\t\"oauth\",\n\t\t\"api_key\",\n\t\t\"keystroke\"\n\t]),\n\tcredentialFields: z.array(z.object({\n\t\tkey: z.string().min(1),\n\t\tlabel: z.string().min(1),\n\t\tplaceholder: z.string().optional(),\n\t\thelpText: z.string().optional(),\n\t\ttype: z.enum([\n\t\t\t\"text\",\n\t\t\t\"password\",\n\t\t\t\"textarea\"\n\t\t]),\n\t\trequired: z.boolean(),\n\t\tprefix: z.string().optional()\n\t})),\n\tcapabilities: ChannelCapabilitiesSchema,\n\tsupportedModes: z.array(ChannelListenModeSchema).min(1),\n\tresourceNoun: z.object({\n\t\tsingular: z.string().min(1),\n\t\tplural: z.string().min(1)\n\t}),\n\twebhookPathHint: z.string().min(1),\n\tsupportsChannelDirectory: z.boolean(),\n\tconnectAppId: z.string().min(1).optional(),\n\tdocsUrl: z.string().url().optional()\n});\nconst ChannelBindingSchema = z.object({\n\tid: z.string().min(1),\n\tchannelId: z.string().min(1),\n\tchannelName: z.string().min(1),\n\tchannelKind: ChannelBindingKindSchema,\n\tmode: ChannelListenModeSchema,\n\tsubscribeOnMention: z.boolean(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst ChannelConnectionSchema = z.object({\n\tid: z.string().min(1),\n\tplatform: ChannelPlatformKeySchema,\n\tagentId: z.string().min(1),\n\taccountLabel: z.string().min(1),\n\taccountId: z.string().min(1),\n\tconnectedAt: z.string(),\n\tbindings: z.array(ChannelBindingSchema)\n});\nconst ChannelDirectoryEntrySchema = z.object({\n\tid: z.string().min(1),\n\tname: z.string().min(1),\n\tkind: ChannelBindingKindSchema,\n\tmemberCount: z.number().int().nonnegative().optional(),\n\tisArchived: z.boolean().optional()\n});\nconst ChannelConnectionListResponseSchema = z.array(ChannelConnectionSchema);\nconst ChannelDirectoryListResponseSchema = z.array(ChannelDirectoryEntrySchema);\n/** Channel-relevant fields parsed from an OAuth connection's metadata blob. */\nconst ChannelAccountMetadataSchema = z.object({ teamName: z.string().min(1).optional() });\n/** OAuth workspace available for channel bindings (e.g. Slack team). */\nconst ChannelAccountSchema = z.object({\n\tid: z.string().min(1),\n\tplatform: ChannelPlatformKeySchema,\n\tlabel: z.string().min(1),\n\tconnectedAt: z.string()\n});\nconst ChannelAccountListResponseSchema = z.array(ChannelAccountSchema);\nconst NewChannelBindingInputSchema = z.object({\n\tchannelId: z.string().min(1),\n\tchannelName: z.string().min(1),\n\tchannelKind: ChannelBindingKindSchema.optional(),\n\tmode: ChannelListenModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n});\nconst BindChannelBodySchema = z.object({\n\tplatform: ChannelPlatformKeySchema,\n\taccountId: z.string().min(1),\n\tbinding: NewChannelBindingInputSchema\n});\nconst UpdateChannelBindingBodySchema = z.object({ patch: z.object({\n\tmode: ChannelListenModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n}) });\n//#endregion\n//#region src/schemas/mcp-credentials.ts\n/**\n* Where a manual MCP API key is injected on each request. MCP servers don't\n* advertise API-key support in a discoverable way, so the user picks the\n* placement: a request header (optionally prefixed, e.g. `Bearer `) or a query\n* param (e.g. Exa's `exaApiKey`).\n*/\nconst McpApiKeyPlacementSchema = z.discriminatedUnion(\"kind\", [z.object({\n\tkind: z.literal(\"header\"),\n\tname: z.string().trim().min(1),\n\t/** Prepended to the token, e.g. `\"Bearer \"` for `Authorization: Bearer <token>`. */\n\tprefix: z.string().optional()\n}), z.object({\n\tkind: z.literal(\"query\"),\n\tname: z.string().trim().min(1)\n})]);\nconst DEFAULT_MCP_API_KEY_PLACEMENT = {\n\tkind: \"header\",\n\tname: \"Authorization\",\n\tprefix: \"Bearer \"\n};\nconst McpApiKeyCredentialValueSchema = z.object({\n\ttoken: z.string().trim().min(1),\n\tplacement: McpApiKeyPlacementSchema.default(DEFAULT_MCP_API_KEY_PLACEMENT)\n});\n/** Turn a stored MCP API-key credential into request headers or query params. */\nfunction mcpApiKeyAuthInjection(value) {\n\treturn mcpCredentialAuthInjection({ token: { placement: value.placement } }, { token: value.token });\n}\n/** Apply all credential fields (each with optional placement) to outgoing MCP requests. */\nfunction mcpCredentialAuthInjection(fields, values) {\n\tconst headers = {};\n\tconst searchParams = {};\n\tfor (const [key, field] of Object.entries(fields)) {\n\t\tconst value = values[key]?.trim();\n\t\tif (!value) continue;\n\t\tconst placement = field.placement ?? DEFAULT_MCP_API_KEY_PLACEMENT;\n\t\tif (placement.kind === \"query\") searchParams[placement.name] = value;\n\t\telse headers[placement.name] = `${placement.prefix ?? \"\"}${value}`;\n\t}\n\treturn {\n\t\t...Object.keys(headers).length > 0 ? { headers } : {},\n\t\t...Object.keys(searchParams).length > 0 ? { searchParams } : {}\n\t};\n}\n//#endregion\n//#region src/schemas/app-credential-fields.ts\n/** Metadata for one vault field on a custom api_key app. */\nconst AppCredentialFieldSchema = z.object({\n\tlabel: z.string().trim().min(1).optional(),\n\tsecret: z.boolean().optional(),\n\toptional: z.boolean().optional(),\n\tdescription: z.string().trim().min(1).optional(),\n\tdefault: z.string().optional(),\n\t/** For direct MCP api-key apps: where this field's value is injected on the request. */\n\tplacement: McpApiKeyPlacementSchema.optional()\n});\n/** Credential template keyed by vault field name. */\nconst AppCredentialFieldsSchema = z.record(z.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema).refine((fields) => Object.keys(fields).length > 0, { message: \"At least one credential field is required\" }).refine((fields) => Object.values(fields).some((field) => field.optional !== true), { message: \"At least one credential field must be required\" });\nfunction validateCredentialValueAgainstFields(fields, value) {\n\tfor (const [key, field] of Object.entries(fields)) {\n\t\tif (field.optional === true) continue;\n\t\tconst raw = value[key];\n\t\tif (typeof raw !== \"string\" || raw.trim().length === 0) return {\n\t\t\tok: false,\n\t\t\tmessage: `Missing required credential field \"${key}\"`\n\t\t};\n\t}\n\tfor (const key of Object.keys(value)) if (!(key in fields)) return {\n\t\tok: false,\n\t\tmessage: `Unknown credential field \"${key}\"`\n\t};\n\treturn { ok: true };\n}\n//#endregion\n//#region src/schemas/apps.ts\n/** A single OAuth scope an app can request, with human copy for connect UI. */\nconst OAuthScopeOptionSchema = z.object({\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tdefaultSelected: z.boolean().optional(),\n\trequired: z.boolean().optional()\n});\n/** How an app authenticates when connecting credentials. */\nconst AppAuthKindSchema = z.enum([\n\t\"oauth\",\n\t\"api_key\",\n\t\"keystroke\"\n]);\n/** Composio auth scheme for API-key style connections. */\nconst AppCredentialSchemeSchema = z.enum([\n\t\"API_KEY\",\n\t\"BEARER_TOKEN\",\n\t\"BASIC\",\n\t\"BASIC_WITH_JWT\"\n]);\n/**\n* Where app metadata and execution are sourced (e.g. native, composio, pipedream, custom).\n* Opaque string — cloud/hosted entrypoints choose values; keystroke stays provider-agnostic.\n*/\nconst AppSourceSchema = z.string().trim().min(1);\n/** Integration metadata generated alongside an app package (source assigned at seed time). */\nconst AppCatalogMetadataSchema = z.object({\n\tslug: z.string().trim().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tlogo: z.string().url().optional(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema)\n});\n/** Row used to seed official apps into the platform registry. */\nconst AppSeedEntrySchema = AppCatalogMetadataSchema.extend({\n\tsource: AppSourceSchema,\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional()\n});\nconst customAppNameSchema = z.string().trim().min(1, \"Name is required\");\nconst AppSlugAvailabilityReasonSchema = ProjectSlugAvailabilityReasonSchema;\nconst AppSlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: AppSlugAvailabilityReasonSchema.optional(),\n\tsuggestion: AppSlugSchema.optional()\n});\nconst AppSlugAvailabilityQuerySchema = z.object({ slug: z.string().trim().min(1) });\n/** Request body for creating an org custom app (api_key or direct MCP). */\nconst optionalCredentialFieldsSchema = z.record(z.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema);\nconst CreateCustomAppRequestSchema = z.object({\n\tname: customAppNameSchema,\n\tslug: AppSlugSchema,\n\tdescription: z.string().trim().min(1),\n\tsource: z.enum([\n\t\t\"custom\",\n\t\t\"mcp\",\n\t\t\"openapi\",\n\t\t\"graphql\"\n\t]).default(\"custom\"),\n\turl: z.string().url().optional(),\n\tauthKind: AppAuthKindSchema.optional(),\n\tfields: optionalCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\toauthScopes: z.array(OAuthScopeOptionSchema).optional()\n}).superRefine((data, ctx) => {\n\tif ((data.source === \"mcp\" || data.source === \"openapi\" || data.source === \"graphql\") && !data.url) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"url is required for this app source\",\n\t\tpath: [\"url\"]\n\t});\n\tif (!(data.authKind ?? (data.source === \"custom\" ? \"api_key\" : void 0))) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"authKind is required\",\n\t\t\tpath: [\"authKind\"]\n\t\t});\n\t\treturn;\n\t}\n\tif (data.source === \"custom\") {\n\t\tconst parsed = AppCredentialFieldsSchema.safeParse(data.fields ?? {});\n\t\tif (!parsed.success) for (const issue of parsed.error.issues) ctx.addIssue({\n\t\t\t...issue,\n\t\t\tpath: [\"fields\", ...issue.path]\n\t\t});\n\t}\n});\n/** Full custom app detail returned by GET (includes credential template for sync). */\nconst CustomAppDetailSchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tauthKind: AppAuthKindSchema,\n\tsource: AppSourceSchema,\n\turl: z.string().url().nullable().optional(),\n\tcredentialFields: optionalCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\toauthScopes: z.array(OAuthScopeOptionSchema).optional(),\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\nconst CreateCustomAppResponseSchema = CustomAppDetailSchema;\nconst GetCustomAppResponseSchema = CustomAppDetailSchema;\n/** Platform `apps` table row. */\nconst AppRecordSchema = z.object({\n\tid: z.string().min(1),\n\torganizationId: z.string().min(1).nullable(),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tlogo: z.string().url().nullable(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema),\n\tsource: AppSourceSchema,\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\turl: z.string().url().nullable().optional(),\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\n/**\n* A connectable integration shown in the \"Connect an app\" picker. An \"app\" is\n* an integration / credential set — connected state is whether a credential exists.\n*/\nconst AppCatalogEntrySchema = z.object({\n\tid: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tintegrationDescription: z.string().min(1),\n\tlogo: z.string().url().nullable().optional(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t/** Where app metadata and execution are sourced (e.g. composio, custom). */\n\tsource: AppSourceSchema,\n\t/** Custom api_key apps — vault field template for connect UI and sync. */\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\t/** Composio auth scheme when credentialFields are present. */\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t/** Endpoint URL for MCP, OpenAPI, or GraphQL custom apps. */\n\turl: z.string().url().nullable().optional(),\n\t/** When present, the app supports agent gateway bindings (external channels). */\n\tgateway: AppGatewaySchema.optional()\n});\nconst ListAppsResponseSchema = z.array(AppCatalogEntrySchema);\n//#endregion\n//#region src/schemas/mcp-app-discovery.ts\nconst McpAuthProbeModeSchema = z.enum([\n\t\"none\",\n\t\"token\",\n\t\"oauth\"\n]);\nconst McpAuthProbeOAuthSchema = z.object({\n\tissuer: z.string().optional(),\n\tauthorizationEndpoint: z.string().url(),\n\ttokenEndpoint: z.string().url(),\n\tregistrationEndpoint: z.string().url().optional(),\n\tscopes: z.array(z.string()),\n\tresource: z.string().optional(),\n\t/** Human-readable label from OAuth protected-resource metadata (RFC 9728). */\n\tresourceName: z.string().optional()\n});\nconst McpAuthProbeResultSchema = z.object({\n\turl: z.string().url(),\n\tmode: McpAuthProbeModeSchema,\n\tunauthenticatedStatus: z.number().int().optional(),\n\tscheme: AppCredentialSchemeSchema.optional(),\n\toauth: McpAuthProbeOAuthSchema.optional()\n});\nconst McpDiscoverRequestSchema = z.object({ url: z.string().url() });\nconst McpDiscoverResponseSchema = z.object({\n\tdetected: z.boolean(),\n\ttemplate: z.object({\n\t\tauthKind: AppAuthKindSchema,\n\t\tcredentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),\n\t\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t\turl: z.string().url(),\n\t\toauth: McpAuthProbeOAuthSchema.optional(),\n\t\tserverName: z.string().optional(),\n\t\tserverDescription: z.string().optional()\n\t})\n});\nconst StartMcpOAuthConnectionInputSchema = z.object({\n\tappSlug: z.string().trim().min(1),\n\tprojects: z.array(z.string().trim().min(1)).optional(),\n\tcreateOrganizationCredential: z.boolean().optional(),\n\tcreateUserProvidedCredential: z.boolean().optional(),\n\tlabel: z.string().trim().min(1).optional(),\n\tcredentialInstanceId: z.string().trim().min(1).optional(),\n\tscopes: z.array(z.string()).optional()\n});\nconst StartMcpOAuthConnectionResultSchema = z.object({ authorizeUrl: z.string().url() });\n//#endregion\n//#region src/mappers/mcp-probe.ts\nfunction mcpProbeToAppTemplate(probe) {\n\tconst url = probe.url;\n\tif (probe.mode === \"oauth\" && probe.oauth) return {\n\t\tauthKind: \"oauth\",\n\t\toauthScopes: probe.oauth.scopes.map((name) => ({\n\t\t\tname,\n\t\t\tdescription: name,\n\t\t\tdefaultSelected: true\n\t\t})),\n\t\turl,\n\t\toauth: probe.oauth\n\t};\n\tif (probe.mode === \"token\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: probe.scheme ?? \"BEARER_TOKEN\",\n\t\tcredentialFields: { token: {\n\t\t\tsecret: true,\n\t\t\tlabel: \"Token\"\n\t\t} },\n\t\toauthScopes: [],\n\t\turl\n\t};\n\treturn {\n\t\tauthKind: \"api_key\",\n\t\tcredentialFields: {},\n\t\toauthScopes: [],\n\t\turl\n\t};\n}\n//#endregion\n//#region src/mappers/custom-app.ts\nfunction displayNameFromUrl$1(url) {\n\tlet hostname;\n\ttry {\n\t\thostname = new URL(url.trim()).hostname.replace(/^www\\./, \"\");\n\t} catch {\n\t\treturn;\n\t}\n\tconst parts = hostname.split(\".\").filter(Boolean);\n\tlet label = parts[0] ?? hostname;\n\tif (label === \"mcp\" && parts.length > 1) label = parts[1] ?? label;\n\tif (!label) return;\n\treturn label.charAt(0).toUpperCase() + label.slice(1);\n}\n/** Default name and description for a custom app from a discover template. */\nfunction deriveCustomAppDisplay(template, opts) {\n\tconst name = template.serverName?.trim() || template.name?.trim() || displayNameFromUrl$1(opts.url) || opts.url;\n\treturn {\n\t\tname,\n\t\tdescription: template.serverDescription?.trim() || template.description?.trim() || (opts.mcp ? `Connect to ${name} via MCP.` : `Connect to ${name}.`)\n\t};\n}\n//#endregion\n//#region src/mcp/tool-result-content.ts\nfunction isRecord$2(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsedJsonRecord(value) {\n\ttry {\n\t\tconst parsed = JSON.parse(value);\n\t\treturn isRecord$2(parsed) ? parsed : null;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction mimeTypeFromBlock(part) {\n\tif (typeof part.mimeType === \"string\" && part.mimeType.length > 0) return part.mimeType;\n\tif (typeof part.mediaType === \"string\" && part.mediaType.length > 0) return part.mediaType;\n}\nfunction mediaDataUrl(data, mediaType) {\n\treturn data.startsWith(\"data:\") ? data : `data:${mediaType};base64,${data}`;\n}\nfunction filenameFromUri(uri) {\n\tconst segment = uri.split(\"/\").at(-1)?.split(\"?\")[0]?.trim();\n\treturn segment && segment.length > 0 ? segment : void 0;\n}\nfunction looksLikeBase64ImageData(data) {\n\tif (data.startsWith(\"data:image/\")) return true;\n\treturn data.startsWith(\"iVBORw0KGgo\") || data.startsWith(\"/9j/\") || data.startsWith(\"R0lGOD\") || data.startsWith(\"UklGR\");\n}\nfunction imageMediaTypeFromData(data, explicit) {\n\tif (explicit?.startsWith(\"image/\")) return explicit;\n\tif (data.startsWith(\"data:image/\")) return /^data:(image\\/[^;]+);/i.exec(data)?.[1] ?? \"image/png\";\n\tif (data.startsWith(\"/9j/\")) return \"image/jpeg\";\n\tif (data.startsWith(\"R0lGOD\")) return \"image/gif\";\n\tif (data.startsWith(\"UklGR\")) return \"image/webp\";\n\treturn \"image/png\";\n}\nfunction isProbablyBase64Payload(value) {\n\treturn value.length > 64 && /^[A-Za-z0-9+/=\\r\\n]+$/.test(value.slice(0, 256));\n}\nfunction isMcpImageBlock(part) {\n\tconst blockType = typeof part.type === \"string\" ? part.type : void 0;\n\tif (blockType === \"text\" || blockType === \"resource\" || blockType === \"resource_link\" || blockType === \"audio\") return false;\n\tif (typeof part.data !== \"string\" || part.data.length === 0) return false;\n\tif (blockType === \"image\" || blockType === \"image-data\") return true;\n\tconst mimeType = mimeTypeFromBlock(part);\n\tif (mimeType?.startsWith(\"image/\")) return true;\n\tif (looksLikeBase64ImageData(part.data)) return true;\n\tif (!blockType && !mimeType && isProbablyBase64Payload(part.data)) return true;\n\treturn false;\n}\nfunction imageFromBlock(part) {\n\tif (!isMcpImageBlock(part) || typeof part.data !== \"string\" || part.data.length === 0) return null;\n\tconst mediaType = imageMediaTypeFromData(part.data, mimeTypeFromBlock(part));\n\treturn {\n\t\tdataUrl: mediaDataUrl(part.data, mediaType),\n\t\tmediaType\n\t};\n}\nfunction fileFromBlock(part) {\n\tconst blockType = typeof part.type === \"string\" ? part.type : void 0;\n\tif (blockType === \"file-data\" && typeof part.data === \"string\" && part.data.length > 0) {\n\t\tconst mediaType = mimeTypeFromBlock(part);\n\t\tif (!mediaType || mediaType.startsWith(\"image/\")) return null;\n\t\treturn {\n\t\t\tdataUrl: mediaDataUrl(part.data, mediaType),\n\t\t\tmediaType,\n\t\t\t...typeof part.filename === \"string\" ? { filename: part.filename } : {}\n\t\t};\n\t}\n\tif (blockType !== \"resource\" || !isRecord$2(part.resource)) return null;\n\tconst resource = part.resource;\n\tconst blob = typeof resource.blob === \"string\" ? resource.blob : void 0;\n\tconst mediaType = mimeTypeFromBlock(resource);\n\tif (!blob || !mediaType || mediaType.startsWith(\"image/\")) return null;\n\tconst uri = typeof resource.uri === \"string\" ? resource.uri : void 0;\n\treturn {\n\t\tdataUrl: mediaDataUrl(blob, mediaType),\n\t\tmediaType,\n\t\t...uri ? {\n\t\t\turi,\n\t\t\tfilename: filenameFromUri(uri)\n\t\t} : {}\n\t};\n}\nfunction imageFromEmbeddedResource(part) {\n\tif (part.type !== \"resource\" || !isRecord$2(part.resource)) return null;\n\tconst resource = part.resource;\n\tconst blob = typeof resource.blob === \"string\" ? resource.blob : void 0;\n\tconst mediaType = mimeTypeFromBlock(resource);\n\tif (!blob || !mediaType?.startsWith(\"image/\")) return null;\n\treturn {\n\t\tdataUrl: mediaDataUrl(blob, mediaType),\n\t\tmediaType\n\t};\n}\n/** Extract MCP `content` blocks from persisted tool output envelopes. */\nfunction mcpContentBlocksFromToolOutput(output) {\n\tif (typeof output === \"string\") {\n\t\tconst parsed = parsedJsonRecord(output.trim());\n\t\treturn parsed ? mcpContentBlocksFromRecord(parsed) : [];\n\t}\n\tif (!isRecord$2(output)) return [];\n\tif (output.type === \"text\" && typeof output.value === \"string\") return mcpContentBlocksFromToolOutput(output.value);\n\treturn mcpContentBlocksFromRecord(output);\n}\nfunction mcpContentBlocksFromRecord(record) {\n\tif (record.type === \"content\" && Array.isArray(record.value)) return record.value;\n\tif (record.type === \"json\" && isRecord$2(record.value) && Array.isArray(record.value.content)) return record.value.content;\n\tif (isRecord$2(record.details) && Array.isArray(record.details.content)) return record.details.content;\n\tif (Array.isArray(record.content)) return record.content;\n\treturn [];\n}\nfunction textFromBlocks(blocks) {\n\tconst texts = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord$2(block)) continue;\n\t\tif (block.type === \"text\" && typeof block.text === \"string\") {\n\t\t\tconst text = block.text.trim();\n\t\t\tif (text.length > 0) texts.push(text);\n\t\t}\n\t}\n\treturn texts.join(\"\\n\");\n}\nfunction imagesFromBlocks(blocks) {\n\tconst images = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord$2(block)) continue;\n\t\tconst image = imageFromBlock(block) ?? imageFromEmbeddedResource(block);\n\t\tif (image) images.push(image);\n\t}\n\treturn images;\n}\nfunction filesFromBlocks(blocks) {\n\tconst files = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord$2(block)) continue;\n\t\tconst file = fileFromBlock(block);\n\t\tif (file) files.push(file);\n\t}\n\treturn files;\n}\nfunction imageFromRawData(data) {\n\tconst trimmed = data.trim();\n\tif (!looksLikeBase64ImageData(trimmed) && !isProbablyBase64Payload(trimmed)) return null;\n\tconst mediaType = imageMediaTypeFromData(trimmed);\n\treturn {\n\t\tdataUrl: mediaDataUrl(trimmed, mediaType),\n\t\tmediaType\n\t};\n}\nfunction hasMcpContentEnvelope(output) {\n\tif (!isRecord$2(output)) return false;\n\tif (Array.isArray(output.content)) return true;\n\treturn isRecord$2(output.details) && Array.isArray(output.details.content);\n}\n/** Parse MCP content blocks for chat/history display. */\nfunction parseMcpToolResultDisplay(output) {\n\tconst blocks = mcpContentBlocksFromToolOutput(output);\n\tconst text = textFromBlocks(blocks);\n\tconst images = imagesFromBlocks(blocks);\n\tconst files = filesFromBlocks(blocks);\n\tif (images.length > 0 || files.length > 0) return {\n\t\ttext,\n\t\timages,\n\t\tfiles\n\t};\n\tif (typeof output === \"string\") {\n\t\tconst trimmed = output.trim();\n\t\tconst parsed = parsedJsonRecord(trimmed);\n\t\tif (parsed) {\n\t\t\tconst parsedDisplay = parseMcpToolResultDisplay(parsed);\n\t\t\tif (parsedDisplay.images.length > 0 || parsedDisplay.files.length > 0) return parsedDisplay;\n\t\t}\n\t\tconst image = imageFromRawData(trimmed);\n\t\tif (image) return {\n\t\t\ttext: \"\",\n\t\t\timages: [image],\n\t\t\tfiles: []\n\t\t};\n\t\treturn {\n\t\t\ttext: trimmed,\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t}\n\tif (!isRecord$2(output)) return {\n\t\ttext: \"\",\n\t\timages: [],\n\t\tfiles: []\n\t};\n\tconst stdout = output.stdout;\n\tif (typeof stdout === \"string\" && stdout.trim().length > 0) return {\n\t\ttext: stdout.trim(),\n\t\timages: [],\n\t\tfiles: []\n\t};\n\tif (output.type === \"text\" && typeof output.value === \"string\") {\n\t\tconst value = output.value.trim();\n\t\tconst image = imageFromRawData(value);\n\t\tif (image) return {\n\t\t\ttext: \"\",\n\t\t\timages: [image],\n\t\t\tfiles: []\n\t\t};\n\t\treturn {\n\t\t\ttext: value,\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t}\n\tif (text.length > 0) return {\n\t\ttext,\n\t\timages,\n\t\tfiles\n\t};\n\tif (blocks.length > 0 || hasMcpContentEnvelope(output)) return {\n\t\ttext: \"\",\n\t\timages: [],\n\t\tfiles: []\n\t};\n\ttry {\n\t\treturn {\n\t\t\ttext: JSON.stringify(output),\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t} catch {\n\t\treturn {\n\t\t\ttext: \"\",\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t}\n}\n/** Map MCP content blocks to AI SDK tool result parts for model consumption. */\nfunction mcpContentBlocksToAiSdkParts(blocks) {\n\tconst parts = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord$2(block)) continue;\n\t\tif (block.type === \"text\" && typeof block.text === \"string\") {\n\t\t\tparts.push({\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: block.text\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isMcpImageBlock(block) && typeof block.data === \"string\") {\n\t\t\tparts.push({\n\t\t\t\ttype: \"image-data\",\n\t\t\t\tdata: block.data,\n\t\t\t\tmediaType: imageMediaTypeFromData(block.data, mimeTypeFromBlock(block))\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (block.type === \"resource\" && isRecord$2(block.resource)) {\n\t\t\tconst resource = block.resource;\n\t\t\tconst blob = typeof resource.blob === \"string\" ? resource.blob : void 0;\n\t\t\tconst mediaType = mimeTypeFromBlock(resource);\n\t\t\tif (!blob || !mediaType) continue;\n\t\t\tconst uri = typeof resource.uri === \"string\" ? resource.uri : void 0;\n\t\t\tif (mediaType.startsWith(\"image/\")) parts.push({\n\t\t\t\ttype: \"image-data\",\n\t\t\t\tdata: blob,\n\t\t\t\tmediaType\n\t\t\t});\n\t\t\telse parts.push({\n\t\t\t\ttype: \"file-data\",\n\t\t\t\tdata: blob,\n\t\t\t\tmediaType,\n\t\t\t\t...uri ? { filename: filenameFromUri(uri) } : {}\n\t\t\t});\n\t\t}\n\t}\n\treturn parts;\n}\nfunction isRedundantMcpJsonText(text, details) {\n\tif (text.length === 0 || details == null) return false;\n\ttry {\n\t\treturn text === JSON.stringify(details);\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/mappers/openapi-spec.ts\nfunction isRecord$1(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction trimString$1(value) {\n\tif (typeof value !== \"string\") return;\n\tconst trimmed = value.trim();\n\treturn trimmed.length > 0 ? trimmed : void 0;\n}\nfunction securitySchemesFromSpec(spec) {\n\tif (isRecord$1(spec.components) && isRecord$1(spec.components.securitySchemes)) return spec.components.securitySchemes;\n\tif (isRecord$1(spec.securityDefinitions)) return spec.securityDefinitions;\n}\nfunction primarySecuritySchemeName(spec) {\n\tconst security = spec.security;\n\tif (Array.isArray(security) && security.length > 0) {\n\t\tconst first = security[0];\n\t\tif (isRecord$1(first)) {\n\t\t\tconst keys = Object.keys(first);\n\t\t\tif (keys.length > 0) return keys[0];\n\t\t}\n\t}\n\tconst schemes = securitySchemesFromSpec(spec);\n\tif (schemes) {\n\t\tconst keys = Object.keys(schemes);\n\t\tif (keys.length > 0) return keys[0];\n\t}\n}\nfunction homepageUrlFromSpec(spec) {\n\tconst servers = spec.servers;\n\tif (Array.isArray(servers) && servers.length > 0) {\n\t\tconst first = servers[0];\n\t\tif (isRecord$1(first)) {\n\t\t\tconst url = trimString$1(first.url);\n\t\t\tif (url) return url.replace(/\\/+$/, \"\");\n\t\t}\n\t}\n\tif (typeof spec.swagger === \"string\") {\n\t\tconst schemes = spec.schemes;\n\t\tconst scheme = Array.isArray(schemes) && typeof schemes[0] === \"string\" ? schemes[0] : \"https\";\n\t\tconst host = trimString$1(spec.host);\n\t\tconst basePath = typeof spec.basePath === \"string\" ? spec.basePath : \"\";\n\t\tif (host) return `${scheme}://${host}${basePath}`.replace(/\\/+$/, \"\");\n\t}\n}\nfunction oauthScopesFromOas3Scheme(scheme) {\n\tconst flows = scheme.flows;\n\tif (!isRecord$1(flows)) return [];\n\tconst scopes = [];\n\tfor (const flow of Object.values(flows)) if (isRecord$1(flow) && isRecord$1(flow.scopes)) scopes.push(...Object.keys(flow.scopes));\n\treturn scopes;\n}\nfunction oauthScopesFromSwagger2Scheme(scheme) {\n\tif (!isRecord$1(scheme.scopes)) return [];\n\treturn Object.keys(scheme.scopes);\n}\nfunction oauthScopeOptions(scopeNames) {\n\treturn scopeNames.map((name) => ({\n\t\tname,\n\t\tdescription: name,\n\t\tdefaultSelected: true\n\t}));\n}\nfunction apiKeyPlacement(scheme) {\n\tconst name = trimString$1(scheme.name) ?? \"api_key\";\n\tif ((typeof scheme.in === \"string\" ? scheme.in.toLowerCase() : \"header\") === \"query\") return {\n\t\tkind: \"query\",\n\t\tname\n\t};\n\treturn {\n\t\tkind: \"header\",\n\t\tname\n\t};\n}\nfunction mapSecurityScheme(scheme) {\n\tconst type = typeof scheme.type === \"string\" ? scheme.type : \"\";\n\tif (type === \"http\") {\n\t\tconst httpScheme = typeof scheme.scheme === \"string\" ? scheme.scheme.toLowerCase() : \"\";\n\t\tif (httpScheme === \"bearer\") return {\n\t\t\tauthKind: \"api_key\",\n\t\t\tcredentialScheme: \"BEARER_TOKEN\",\n\t\t\tcredentialFields: { token: {\n\t\t\t\tsecret: true,\n\t\t\t\tlabel: \"Token\",\n\t\t\t\tplacement: DEFAULT_MCP_API_KEY_PLACEMENT\n\t\t\t} },\n\t\t\toauthScopes: []\n\t\t};\n\t\tif (httpScheme === \"basic\") return {\n\t\t\tauthKind: \"api_key\",\n\t\t\tcredentialScheme: \"BASIC\",\n\t\t\tcredentialFields: {\n\t\t\t\tusername: { label: \"Username\" },\n\t\t\t\tpassword: {\n\t\t\t\t\tsecret: true,\n\t\t\t\t\tlabel: \"Password\"\n\t\t\t\t}\n\t\t\t},\n\t\t\toauthScopes: []\n\t\t};\n\t}\n\tif (type === \"apiKey\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"API_KEY\",\n\t\tcredentialFields: { token: {\n\t\t\tsecret: true,\n\t\t\tlabel: trimString$1(scheme.name) ?? \"API Key\",\n\t\t\tplacement: apiKeyPlacement(scheme)\n\t\t} },\n\t\toauthScopes: []\n\t};\n\tif (type === \"oauth2\") return {\n\t\tauthKind: \"oauth\",\n\t\toauthScopes: oauthScopeOptions(oauthScopesFromOas3Scheme(scheme).length > 0 ? oauthScopesFromOas3Scheme(scheme) : oauthScopesFromSwagger2Scheme(scheme))\n\t};\n\tif (type === \"openIdConnect\") return {\n\t\tauthKind: \"oauth\",\n\t\toauthScopes: []\n\t};\n\tif (type === \"basic\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"BASIC\",\n\t\tcredentialFields: {\n\t\t\tusername: { label: \"Username\" },\n\t\t\tpassword: {\n\t\t\t\tsecret: true,\n\t\t\t\tlabel: \"Password\"\n\t\t\t}\n\t\t},\n\t\toauthScopes: []\n\t};\n\treturn {\n\t\tauthKind: \"api_key\",\n\t\tcredentialFields: {},\n\t\toauthScopes: []\n\t};\n}\n/** Map a parsed OpenAPI/Swagger document to a custom app template. */\nfunction openApiSpecToAppTemplate(spec, url) {\n\tif (!isRecord$1(spec)) throw new Error(\"Invalid OpenAPI spec\");\n\tconst info = isRecord$1(spec.info) ? spec.info : {};\n\tconst name = trimString$1(info.title);\n\tconst description = trimString$1(info.description);\n\tconst homepageUrl = homepageUrlFromSpec(spec);\n\tconst schemes = securitySchemesFromSpec(spec);\n\tconst schemeName = primarySecuritySchemeName(spec);\n\tlet authPart = mapSecurityScheme({ type: \"none\" });\n\tif (schemeName && schemes && isRecord$1(schemes[schemeName])) authPart = mapSecurityScheme(schemes[schemeName]);\n\treturn {\n\t\turl,\n\t\tname,\n\t\tdescription,\n\t\thomepageUrl,\n\t\tauthKind: authPart.authKind,\n\t\tcredentialFields: authPart.credentialFields,\n\t\tcredentialScheme: authPart.credentialScheme,\n\t\toauthScopes: authPart.oauthScopes\n\t};\n}\n//#endregion\n//#region src/schemas/openapi-app-discovery.ts\nconst OpenApiDiscoverRequestSchema = z.object({ url: z.string().url() });\nconst OpenApiDiscoverResponseSchema = z.object({\n\tdetected: z.boolean(),\n\ttemplate: z.object({\n\t\tauthKind: AppAuthKindSchema,\n\t\tcredentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),\n\t\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t\turl: z.string().url(),\n\t\tname: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\thomepageUrl: z.string().optional()\n\t})\n});\n//#endregion\n//#region src/mappers/graphql-introspection.ts\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction trimString(value) {\n\tif (typeof value !== \"string\") return;\n\tconst trimmed = value.trim();\n\treturn trimmed.length > 0 ? trimmed : void 0;\n}\nfunction displayNameFromUrl(value) {\n\ttry {\n\t\tconst hostname = new URL(value).hostname.replace(/^www\\./, \"\");\n\t\tconst parts = hostname.split(\".\").filter(Boolean);\n\t\tlet label = parts[0] ?? hostname;\n\t\tif ((label === \"mcp\" || label === \"api\" || label === \"graphql\") && parts.length > 1) label = parts[1] ?? label;\n\t\tif (!label) return;\n\t\treturn label.charAt(0).toUpperCase() + label.slice(1);\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction homepageUrlFromEndpoint(endpointUrl) {\n\ttry {\n\t\treturn new URL(endpointUrl).origin;\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction typeDescription(schema) {\n\tif (!schema) return;\n\treturn trimString(schema.description);\n}\nfunction authFromProbe(authProbe) {\n\tif (authProbe === \"basic\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"BASIC\",\n\t\tcredentialFields: {\n\t\t\tusername: { label: \"Username\" },\n\t\t\tpassword: {\n\t\t\t\tsecret: true,\n\t\t\t\tlabel: \"Password\"\n\t\t\t}\n\t\t},\n\t\toauthScopes: []\n\t};\n\tif (authProbe === \"none\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialFields: {},\n\t\toauthScopes: []\n\t};\n\treturn {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"BEARER_TOKEN\",\n\t\tcredentialFields: { token: {\n\t\t\tsecret: true,\n\t\t\tlabel: \"Token\",\n\t\t\tplacement: DEFAULT_MCP_API_KEY_PLACEMENT\n\t\t} },\n\t\toauthScopes: []\n\t};\n}\n/** Infer auth requirements from an unauthenticated probe response. */\nfunction inferGraphqlAuthFromProbe(status, wwwAuthenticate, body) {\n\tif (status === 401) {\n\t\tif ((wwwAuthenticate?.toLowerCase() ?? \"\").includes(\"basic\")) return \"basic\";\n\t\treturn \"bearer\";\n\t}\n\tif (status === 403) return \"bearer\";\n\tif (isGraphqlAuthError(body)) return \"bearer\";\n\treturn \"none\";\n}\nconst AUTH_ERROR_PATTERN = /auth|unauthorized|unauthenticated|access token|credentials|not authenticated/i;\nfunction isGraphqlAuthError(body) {\n\tif (!isRecord(body) || !Array.isArray(body.errors)) return false;\n\treturn body.errors.some((error) => {\n\t\tif (!isRecord(error)) return false;\n\t\tconst message = typeof error.message === \"string\" ? error.message : \"\";\n\t\tconst extensions = isRecord(error.extensions) ? error.extensions : void 0;\n\t\tconst extensionHint = extensions ? `${extensions.code ?? \"\"} ${extensions.type ?? \"\"}` : \"\";\n\t\treturn AUTH_ERROR_PATTERN.test(message) || /AUTH/i.test(extensionHint);\n\t});\n}\n/** Map a GraphQL introspection result to a custom app template. */\nfunction graphqlIntrospectionToAppTemplate(introspection, endpointUrl, authProbe = \"bearer\") {\n\tconst root = isRecord(introspection) ? introspection : {};\n\tconst data = isRecord(root.data) ? root.data : root;\n\tconst schema = isRecord(data.__schema) ? data.__schema : void 0;\n\tconst queryType = schema && isRecord(schema.queryType) ? schema.queryType : void 0;\n\tconst mutationType = schema && isRecord(schema.mutationType) ? schema.mutationType : void 0;\n\tconst queryName = trimString(queryType?.name);\n\tconst name = queryName === \"Query\" ? displayNameFromUrl(endpointUrl) : queryName;\n\tconst description = typeDescription(queryType) || typeDescription(mutationType) || (name ? `GraphQL API for ${name}.` : void 0);\n\tconst homepageUrl = homepageUrlFromEndpoint(endpointUrl);\n\tconst authPart = authFromProbe(authProbe);\n\treturn {\n\t\turl: endpointUrl,\n\t\tname,\n\t\tdescription,\n\t\thomepageUrl,\n\t\tauthKind: authPart.authKind,\n\t\tcredentialFields: authPart.credentialFields,\n\t\tcredentialScheme: authPart.credentialScheme,\n\t\toauthScopes: authPart.oauthScopes\n\t};\n}\n//#endregion\n//#region src/schemas/graphql-app-discovery.ts\nconst GraphqlDiscoverRequestSchema = z.object({ url: z.string().url() });\nconst GraphqlDiscoverResponseSchema = z.object({\n\tdetected: z.boolean(),\n\ttemplate: z.object({\n\t\tauthKind: AppAuthKindSchema,\n\t\tcredentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),\n\t\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t\turl: z.string().url(),\n\t\tname: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\thomepageUrl: z.string().optional()\n\t})\n});\n//#endregion\n//#region src/schemas/catalog.ts\nconst CatalogAppSummarySchema = z.object({\n\tname: z.string(),\n\tdescription: z.string(),\n\tpackage: z.string()\n});\nconst CatalogAppsPageSchema = z.object({\n\titems: z.array(CatalogAppSummarySchema),\n\tnextCursor: z.string().optional()\n});\nconst CatalogAppDetailSchema = z.object({\n\tname: z.string(),\n\tdescription: z.string(),\n\tpackage: z.string(),\n\tversion: z.string().optional()\n});\nconst CatalogActionSummarySchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional()\n});\nconst CatalogActionsPageSchema = z.object({\n\ttoolkit: z.string().optional(),\n\titems: z.array(CatalogActionSummarySchema),\n\tnextCursor: z.string().optional()\n});\nconst CatalogActionDetailSchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional(),\n\tinputParameters: z.record(z.string(), z.unknown()).optional(),\n\toutputParameters: z.record(z.string(), z.unknown()).optional(),\n\tversion: z.string().optional()\n});\nconst CatalogAppsPageResponseSchema = CatalogAppsPageSchema;\nconst CatalogAppDetailResponseSchema = CatalogAppDetailSchema;\nconst CatalogActionsPageResponseSchema = CatalogActionsPageSchema;\nconst CatalogActionDetailResponseSchema = CatalogActionDetailSchema;\n//#endregion\n//#region src/apps/slug.ts\nconst ORG_SLUG_SEPARATOR = \"/\";\n/** Official apps use a bare slug with no namespace separator. */\nfunction isOfficialSlug(slug) {\n\treturn slug.trim().length > 0 && !slug.includes(ORG_SLUG_SEPARATOR);\n}\n/** Qualify an org-custom app slug as `{orgSlug}/{name}`. */\nfunction qualifyOrgSlug(orgSlug, name) {\n\tconst trimmedOrgSlug = orgSlug.trim();\n\tconst trimmedName = name.trim();\n\tif (!trimmedOrgSlug || !trimmedName) throw new Error(\"qualifyOrgSlug requires non-empty orgSlug and name\");\n\tif (trimmedOrgSlug.includes(ORG_SLUG_SEPARATOR) || trimmedName.includes(ORG_SLUG_SEPARATOR)) throw new Error(\"orgSlug and name must not contain '/'\");\n\treturn `${trimmedOrgSlug}${ORG_SLUG_SEPARATOR}${trimmedName}`;\n}\n/** Parse a stored app slug into official vs org-custom parts. */\nfunction parseAppSlug(slug) {\n\tconst trimmed = slug.trim();\n\tif (!trimmed) throw new Error(\"parseAppSlug requires a non-empty slug\");\n\tconst separatorIndex = trimmed.indexOf(ORG_SLUG_SEPARATOR);\n\tif (separatorIndex === -1) return {\n\t\tkind: \"official\",\n\t\tslug: trimmed\n\t};\n\tconst orgSlug = trimmed.slice(0, separatorIndex);\n\tconst name = trimmed.slice(separatorIndex + 1);\n\tif (!orgSlug || !name || trimmed.indexOf(ORG_SLUG_SEPARATOR, separatorIndex + 1) !== -1) throw new Error(`Invalid org app slug: ${slug}`);\n\treturn {\n\t\tkind: \"org\",\n\t\torgSlug,\n\t\tname,\n\t\tslug: trimmed\n\t};\n}\n//#endregion\n//#region src/apps/connect-deeplink.ts\n/** Web URL that opens the org apps page with a connect dialog for the given app. */\nfunction buildConnectDeeplink(options) {\n\tconst base = options.webUrl.replace(/\\/+$/, \"\");\n\tconst params = new URLSearchParams({ connect: options.appSlug });\n\treturn `${base}/${options.orgSlug}/apps?${params.toString()}`;\n}\n//#endregion\n//#region src/apps/resolve-connect-app.ts\nfunction resolveConnectAppSlug(slug, apps) {\n\tconst trimmed = slug.trim();\n\tif (!trimmed) throw new Error(\"App slug is required\");\n\ttry {\n\t\tparseAppSlug(trimmed);\n\t} catch {\n\t\tthrow new Error(`Invalid app slug: ${slug}`);\n\t}\n\tconst match = apps.find((app) => app.id === trimmed);\n\tif (!match) {\n\t\tconst available = apps.map((app) => app.id).join(\", \") || \"(none)\";\n\t\tthrow new Error(`Unknown app \"${trimmed}\". Available: ${available}`);\n\t}\n\treturn match;\n}\n//#endregion\n//#region src/package-manager/detect-project-package-manager.ts\nconst LOCKFILE_MANAGERS = [\n\t[\"pnpm-lock.yaml\", \"pnpm\"],\n\t[\"yarn.lock\", \"yarn\"],\n\t[\"bun.lockb\", \"bun\"],\n\t[\"package-lock.json\", \"npm\"]\n];\nfunction parsePackageManagerField(raw) {\n\tconst manager = raw.split(\"@\")[0]?.trim().toLowerCase();\n\tif (manager === \"npm\" || manager === \"pnpm\" || manager === \"yarn\" || manager === \"bun\") return manager;\n}\nfunction detectFromPackageJsonContents(packageJson) {\n\tif (!packageJson) return;\n\ttry {\n\t\tconst parsed = JSON.parse(packageJson);\n\t\tif (typeof parsed.packageManager === \"string\") return parsePackageManagerField(parsed.packageManager);\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction detectFromLockfileNames(paths) {\n\tfor (const [lockfile, manager] of LOCKFILE_MANAGERS) if (paths.has(lockfile)) return manager;\n}\n/**\n* Infer the package manager from an in-memory set of project files (e.g. a\n* deploy source snapshot). Pure and browser-safe — no filesystem access, so it\n* is safe to expose from `@keystrokehq/shared` (bundled by the web app).\n* Prefers `package.json`'s `packageManager`, then a lockfile; defaults to npm.\n*/\nfunction detectProjectPackageManagerFromSnapshot(files) {\n\tconst paths = new Set(files.map((file) => file.path));\n\tconst packageJson = files.find((file) => file.path === \"package.json\")?.contents;\n\tconst fromField = detectFromPackageJsonContents(packageJson);\n\tif (fromField) return fromField;\n\treturn detectFromLockfileNames(paths) ?? \"npm\";\n}\n//#endregion\n//#region src/package-manager/install-result.ts\n/**\n* Whether a package-manager install exit should be treated as success.\n*\n* pnpm 10+ exits non-zero with `ERR_PNPM_IGNORED_BUILDS` when a dependency's\n* build script is not approved (e.g. native modules like better-sqlite3). The\n* dependencies are still fully installed — only the optional build script was\n* skipped — so this is not a real install failure for our purposes.\n*/\nfunction isAcceptableInstallExit(manager, exitCode, output) {\n\tif (exitCode === 0) return true;\n\tif (manager === \"pnpm\" && output.includes(\"ERR_PNPM_IGNORED_BUILDS\")) return true;\n\treturn false;\n}\n//#endregion\n//#region src/credential-instance-label.ts\n/** Human-readable app name from a credential slug (e.g. `google-drive` → `Google Drive`). */\nfunction displayCredentialAppName(appId) {\n\treturn appId.split(/[-_]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(\" \");\n}\nfunction buildCredentialInstanceLabel(options) {\n\tconst appName = options.appName.trim();\n\tswitch (options.scopeType) {\n\t\tcase \"organization\": return `Organization ${appName}`;\n\t\tcase \"user\": return `Personal ${appName}`;\n\t\tcase \"project\": return `${appName} (${options.projectName?.trim() || \"Project\"})`;\n\t\tdefault: return options.scopeType;\n\t}\n}\n/** Pick a friendly slug unused within a credential scope bucket. */\nfunction deriveCredentialInstanceSlug(options) {\n\tconst taken = new Set(options.takenSlugs);\n\tconst explicit = options.explicitSlug?.trim();\n\tif (explicit) return explicit;\n\tconst fromName = options.name?.trim();\n\tif (fromName) {\n\t\tconst base = normalizeOrganizationNameToSlugBase(fromName) || options.appSlug;\n\t\tif (!taken.has(base)) return base;\n\t\tlet suffix = 1;\n\t\twhile (taken.has(`${base}-${suffix}`)) suffix += 1;\n\t\treturn `${base}-${suffix}`;\n\t}\n\tif (!taken.has(options.appSlug)) return options.appSlug;\n\tlet suffix = 1;\n\twhile (taken.has(`${options.appSlug}-${suffix}`)) suffix += 1;\n\treturn `${options.appSlug}-${suffix}`;\n}\n/** Pick a label that is unused within a credential scope, suffixing when needed. */\nfunction resolveUniqueCredentialInstanceLabel(options) {\n\tconst taken = new Set([...options.takenLabels].map((label) => label ?? null));\n\tif (!taken.has(options.baseLabel)) return options.baseLabel;\n\tconst disambiguator = options.disambiguator?.trim();\n\tif (disambiguator) {\n\t\tconst withDisambiguator = `${options.baseLabel} (${disambiguator})`;\n\t\tif (!taken.has(withDisambiguator)) return withDisambiguator;\n\t}\n\tlet suffix = 2;\n\twhile (taken.has(`${options.baseLabel} (${suffix})`)) suffix += 1;\n\treturn `${options.baseLabel} (${suffix})`;\n}\n//#endregion\n//#region src/schemas/app-credentials.ts\n/** Scope of a platform app credential (maps to `credential_instances.scope_type`). */\nconst AppCredentialScopeSchema = z.enum([\n\t\"user\",\n\t\"project\",\n\t\"organization\"\n]);\n/** How the credential was connected (OAuth vs manual api-key entry). */\nconst AppCredentialConnectionKindSchema = z.enum([\"oauth\", \"manual\"]);\n/** Connect-dialog permission preset for OAuth scope selection. */\nconst OAuthPermissionModeSchema = z.enum([\"default\", \"restricted\"]);\nconst optionalTimestamp$1 = z.string().optional();\nconst nullableOptionalTimestamp = z.string().nullable().optional();\n/**\n* Summary row for the apps/credentials table and credential detail page.\n* Plaintext secrets are never returned — only masked `keyPreviews`.\n*/\nconst AppCredentialSummarySchema = z.object({\n\tid: z.string().min(1),\n\tappId: z.string().min(1),\n\t/** Stable per-scope identifier; pass to `--credential` to pin a specific instance. */\n\tslug: z.string().min(1),\n\tlabel: z.string().min(1),\n\tscope: AppCredentialScopeSchema,\n\tlastRefreshedAt: z.string().nullable(),\n\tappName: z.string().min(1).optional(),\n\tprojectId: z.string().min(1).optional(),\n\tprojectName: z.string().min(1).optional(),\n\tstatus: z.string().optional(),\n\tcreatedAt: optionalTimestamp$1,\n\tlastUsedAt: nullableOptionalTimestamp,\n\tisDefault: z.boolean().optional(),\n\tconnectionKind: AppCredentialConnectionKindSchema.optional(),\n\townerUserId: z.string().min(1).optional(),\n\townerName: z.string().min(1).optional(),\n\townerAvatarUrl: z.string().url().optional(),\n\tgrantedScopes: z.array(z.string().min(1)).optional(),\n\tcredentialKeys: z.array(z.string().min(1)).optional(),\n\tkeyPreviews: z.record(z.string(), z.string()).optional(),\n\texpiresAt: optionalTimestamp$1\n});\nconst credentialSecretValueSchema = z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" });\nfunction hasCredentialTarget(input) {\n\treturn input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential || Boolean(input.credentialInstanceId?.trim());\n}\nfunction addMissingCredentialTargetIssue(ctx, path = [\"projects\"]) {\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"At least one credential target is required\",\n\t\tpath\n\t});\n}\n/** Target fields shared by create and OAuth start flows. */\nconst CredentialTargetsFieldsSchema = z.object({\n\tprojects: z.array(z.string().min(1)).default([]),\n\tcreateOrganizationCredential: z.boolean().default(false),\n\tcreateUserProvidedCredential: z.boolean().default(false),\n\t/** Display label for created credential instances (apps table / detail page). */\n\tlabel: z.string().trim().min(1).optional(),\n\t/** When set, update this credential instance in place (reconnect) instead of creating a new row. */\n\tcredentialInstanceId: z.string().trim().min(1).optional()\n});\n/** Input for starting an OAuth connection (connect dialog / CLI connect). */\nconst StartOAuthConnectionInputSchema = CredentialTargetsFieldsSchema.extend({\n\tappId: z.string().min(1),\n\tscopes: z.array(z.string().min(1)),\n\tpermissionMode: OAuthPermissionModeSchema\n});\n/** Result of starting an OAuth connection. */\nconst StartOAuthConnectionResultSchema = z.object({\n\tstatus: z.enum([\"connected\", \"redirecting\"]),\n\tauthorizeUrl: z.string().url().nullable()\n});\n/** Input for starting a keystroke connection (connect dialog). */\nconst StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({\n\tapp: z.string().trim().min(1),\n\tvalue: credentialSecretValueSchema.optional()\n}).superRefine((input, ctx) => {\n\tif (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);\n});\nconst connectedKeystrokeConnectionResultSchema = z.object({\n\tstatus: z.literal(\"connected\"),\n\tconnectionId: z.string().min(1)\n});\nconst redirectingKeystrokeConnectionResultSchema = z.object({\n\tstatus: z.literal(\"redirecting\"),\n\tauthorizeUrl: z.string().url(),\n\tconnectionId: z.string().min(1)\n});\n/** Result of starting a keystroke connection. */\nconst StartKeystrokeConnectionResultSchema = z.discriminatedUnion(\"status\", [connectedKeystrokeConnectionResultSchema, redirectingKeystrokeConnectionResultSchema]);\n/** Request body for `POST /api/credentials` (manual api-key fan-out). */\nconst CreateCredentialsRequestSchema = CredentialTargetsFieldsSchema.extend({\n\tappId: z.string().min(1),\n\tconnectionKind: AppCredentialConnectionKindSchema,\n\tvalue: credentialSecretValueSchema.optional(),\n\tscopes: z.array(z.string().min(1)).optional()\n}).superRefine((input, ctx) => {\n\tif (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);\n\tif (input.connectionKind === \"manual\" && !input.value) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"value is required for manual connections\",\n\t\tpath: [\"value\"]\n\t});\n\tif (input.connectionKind === \"oauth\") ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"OAuth credentials are created via the OAuth callback\",\n\t\tpath: [\"connectionKind\"]\n\t});\n});\n/** Request body for `PATCH /api/credentials/:id`. */\nconst UpdateCredentialRequestSchema = z.object({\n\tlabel: z.string().trim().min(1).optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: credentialSecretValueSchema.optional()\n}).refine((input) => input.label !== void 0 || input.isDefault !== void 0 || input.value !== void 0, { message: \"At least one field is required\" });\nconst ListCredentialsResponseSchema = z.array(AppCredentialSummarySchema);\nconst GetCredentialResponseSchema = AppCredentialSummarySchema;\nconst CreateCredentialsResponseSchema = z.array(AppCredentialSummarySchema);\n//#endregion\n//#region src/schemas/credential-assignments.ts\nconst CREDENTIAL_ASSIGNMENT_WILDCARD = \"*\";\nconst CredentialAssignmentTargetTypeSchema = z.enum([\"workflow\", \"agent\"]);\nconst CredentialAssignmentRecordSchema = z.object({\n\tid: z.string(),\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string(),\n\tconsumerId: z.string(),\n\tcredentialSlug: z.string(),\n\tinstanceId: z.string(),\n\tcredential: z.string().optional(),\n\tscopeType: z.enum([\n\t\t\"organization\",\n\t\t\"project\",\n\t\t\"user\"\n\t]).optional(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst CredentialAssignmentListResponseSchema = z.object({ assignments: z.array(CredentialAssignmentRecordSchema) });\nconst AssignCredentialBodySchema = z.object({\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string().min(1),\n\t/** Omit or '*' for wildcard assignment. */\n\tconsumerId: z.string().optional(),\n\tcredential: z.string().min(1)\n});\nconst CredentialAssignmentListQuerySchema = z.object({\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string().min(1)\n});\nconst CredentialConsumerListQuerySchema = z.object({\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string().min(1)\n});\nconst CredentialConsumerSummarySchema = z.object({\n\tconsumerId: z.string(),\n\tlabel: z.string(),\n\tappSlugs: z.array(z.string())\n});\nconst CredentialConsumerListResponseSchema = z.object({ consumers: z.array(CredentialConsumerSummarySchema) });\n//#endregion\n//#region src/schemas/mcp.ts\nconst McpConnectionStatusSchema = z.enum([\n\t\"INITIATED\",\n\t\"ACTIVE\",\n\t\"EXPIRED\",\n\t\"FAILED\",\n\t\"INACTIVE\",\n\t\"REVOKED\"\n]);\nconst McpAppSchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tconnected: z.boolean(),\n\tconnectionId: z.string().optional(),\n\tstatus: McpConnectionStatusSchema.optional()\n});\nconst ListMcpAppsResponseSchema = z.array(McpAppSchema);\nconst MCP_ENTITY_PREFIX = {\n\tuser: \"user\",\n\torganization: \"org\",\n\tproject: \"proj\"\n};\n/** MCP provider entity id for a credential scope subject (`user_<id>` / `org_<id>` / `proj_<id>`). */\nfunction mcpEntityId(scopeType, scopeId) {\n\treturn `${MCP_ENTITY_PREFIX[scopeType]}_${scopeId}`;\n}\nconst MCP_ENTITY_SCOPE_BY_PREFIX = {\n\tuser: \"user\",\n\torg: \"organization\",\n\tproj: \"project\"\n};\n/** Parse an MCP entity id back into Keystroke scope type + id. */\nfunction parseMcpEntityId(entityId) {\n\tconst trimmed = entityId.trim();\n\tconst separator = trimmed.indexOf(\"_\");\n\tif (separator <= 0) return;\n\tconst prefix = trimmed.slice(0, separator);\n\tconst scopeId = trimmed.slice(separator + 1);\n\tconst scopeType = MCP_ENTITY_SCOPE_BY_PREFIX[prefix];\n\tif (!scopeType || !scopeId) return;\n\treturn {\n\t\tscopeType,\n\t\tscopeId\n\t};\n}\nconst KeystrokeCredentialSchema = z.object({\n\tconnectionId: z.string(),\n\tentityId: z.string(),\n\tinstanceId: z.string()\n});\nconst McpCredentialAssignmentTargetSchema = z.object({\n\ttype: CredentialAssignmentTargetTypeSchema,\n\tkey: z.string().trim().min(1)\n});\nconst ExecuteKeystrokeToolRequestSchema = z.object({\n\tapp: z.string().trim().min(1),\n\ttool: z.string().trim().min(1),\n\targuments: z.record(z.string(), z.unknown()).default({}),\n\t/** Pinned provider toolkit version, sourced from the app definition; forwarded to the provider. */\n\tversion: z.string().trim().min(1),\n\t/** When set, platform MCP resolve checks credential assignments before scope defaults. */\n\tassignmentTarget: McpCredentialAssignmentTargetSchema.optional(),\n\t/** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */\n\tconsumerId: z.string().trim().min(1).optional(),\n\t/** Explicit credential instance slug; overrides default resolution to pick that instance. */\n\tcredentialSlug: z.string().trim().min(1).optional(),\n\t/** Project slug (CLI --project); the platform resolves it to a project and binds that scope. */\n\tprojectSlug: z.string().trim().min(1).optional()\n});\nconst ExecuteKeystrokeToolErrorCodeSchema = z.enum([\n\t\"not_found\",\n\t\"forbidden\",\n\t\"mcp_execute_failed\"\n]);\n/** Platform MCP execute error body (422 for upstream tool failures, 404/403 for resolve/access). */\nconst ExecuteKeystrokeToolErrorResponseSchema = z.object({\n\terror: ExecuteKeystrokeToolErrorCodeSchema,\n\tmessage: z.string()\n});\n/** HTTP status for upstream provider / tool argument failures (not platform bugs). */\nconst MCP_TOOL_EXECUTE_FAILED_STATUS = 422;\n/** Turn upstream provider JSON error strings into LLM-readable text. */\nfunction formatMcpToolErrorMessage(raw) {\n\tconst trimmed = raw.trim();\n\tif (!trimmed) return trimmed;\n\ttry {\n\t\tconst parsed = JSON.parse(trimmed);\n\t\tif (typeof parsed.detail === \"string\" && parsed.detail.trim()) return typeof parsed.code === \"string\" && parsed.code.trim() ? `${parsed.code}: ${parsed.detail.trim()}` : parsed.detail.trim();\n\t\tif (typeof parsed.message === \"string\" && parsed.message.trim()) return parsed.message.trim();\n\t} catch {}\n\treturn trimmed;\n}\n//#endregion\n//#region src/schemas/team-requests.ts\nconst TeamRequestTypeSchema = z.enum([\n\t\"org-deletion\",\n\t\"contact\",\n\t\"enterprise-upgrade\",\n\t\"verification\"\n]);\nconst SubmitTeamRequestRequestSchema = z.object({\n\ttype: TeamRequestTypeSchema,\n\tmessage: z.string().trim().max(5e3).optional()\n});\nconst SubmitTeamRequestResponseSchema = z.object({ ok: z.literal(true) });\n//#endregion\n//#region src/schemas/marketing-contact.ts\nconst MarketingContactCompanySizeSchema = z.enum([\n\t\"1-10\",\n\t\"11-50\",\n\t\"51-200\",\n\t\"201-500\",\n\t\"500+\"\n]);\nconst SubmitMarketingContactRequestSchema = z.object({\n\tfullName: z.string().trim().min(1, \"Full name is required\").max(200),\n\tworkEmail: z.string().trim().email(\"Enter a valid email address\").max(320),\n\tcompanySize: MarketingContactCompanySizeSchema,\n\tmessage: z.string().trim().min(1, \"Message is required\").max(5e3),\n\t/** Honeypot — must stay empty; bots that fill it are ignored silently. */\n\tcompanyWebsite: z.string().optional()\n});\nconst SubmitMarketingContactResponseSchema = SubmitTeamRequestResponseSchema;\n//#endregion\n//#region src/schemas/public-models.ts\nconst PublicModelsResponseSchema = z.object({ models: z.array(z.string()) });\n//#endregion\n//#region src/schemas/credential-spec.ts\nfunction isCredentialInput(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\treturn typeof candidate.key === \"string\" && CredentialAuthKindSchema.safeParse(candidate.kind).success && candidate.schema instanceof z.ZodType;\n}\nconst credentialInputSchema = z.custom((value) => isCredentialInput(value), \"must be a credential requirement\");\nfunction createRef(kind, key, schema, options) {\n\tconst tokenField = options?.tokenField;\n\treturn {\n\t\tkind,\n\t\tkey,\n\t\tschema,\n\t\t...tokenField !== void 0 ? { tokenField } : {},\n\t\tscope(scope) {\n\t\t\treturn {\n\t\t\t\tkey,\n\t\t\t\tkind,\n\t\t\t\tschema,\n\t\t\t\tscope,\n\t\t\t\t...tokenField !== void 0 ? { tokenField } : {}\n\t\t\t};\n\t\t}\n\t};\n}\nfunction staticCredential(key, schema) {\n\treturn createRef(\"api_key\", key, schema instanceof z.ZodType ? schema : z.object(schema));\n}\nfunction oauthCredential(key, options) {\n\tconst tokenField = options?.tokenField ?? \"accessToken\";\n\treturn createRef(\"oauth_managed\", key, tokenField === \"accessToken\" ? z.object({ accessToken: z.string() }) : z.object({ [tokenField]: z.string() }), { tokenField });\n}\nfunction keystrokeCredential(key) {\n\treturn createRef(\"keystroke\", key, KeystrokeCredentialSchema);\n}\nconst credential = {\n\tstatic: staticCredential,\n\toauth: oauthCredential,\n\tkeystroke: keystrokeCredential\n};\nfunction defineCredential(input) {\n\tif (input.kind === \"oauth\") return input.tokenField !== void 0 ? credential.oauth(input.key, { tokenField: input.tokenField }) : credential.oauth(input.key);\n\tif (input.kind === \"keystroke\") return credential.keystroke(input.key);\n\tif (\"schema\" in input) return credential.static(input.key, input.schema);\n\treturn credential.static(input.key, input.fields);\n}\nfunction normalizeCredentialList(list) {\n\treturn list.map((item) => toCredentialRequirement(item));\n}\nfunction isCredentialRequirement(item) {\n\treturn typeof item.scope !== \"function\";\n}\nfunction toCredentialRequirement(item) {\n\tif (isCredentialRequirement(item)) return item;\n\treturn {\n\t\tkey: item.key,\n\t\tkind: item.kind,\n\t\tschema: item.schema,\n\t\t...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}\n\t};\n}\n//#endregion\n//#region src/schemas/errors/schema.ts\nconst ValidationErrorDetailSchema = z.object({\n\tpath: z.string(),\n\tmessage: z.string()\n});\n/** Machine-readable codes returned in standard API error bodies. */\nconst ErrorResponseCodeSchema = OrganizationSlugErrorCodeSchema.or(z.enum([\"needs_org_selection\", \"org_unverified\"]));\n/** Standard JSON error body returned by the HTTP API. */\nconst ErrorResponseSchema = z.object({\n\terror: z.string(),\n\tcode: ErrorResponseCodeSchema.optional(),\n\tmessage: z.string().optional(),\n\tdetails: z.array(ValidationErrorDetailSchema).optional()\n});\n//#endregion\n//#region src/schemas/errors/from-zod.ts\n/** Build the JSON body for HTTP 400 validation failures. */\nfunction validationErrorResponse(error, summary) {\n\treturn {\n\t\terror: summary,\n\t\tdetails: error.issues.map((issue) => ({\n\t\t\tpath: issue.path.join(\".\"),\n\t\t\tmessage: issue.message\n\t\t}))\n\t};\n}\n//#endregion\n//#region src/schemas/errors/parse.ts\nconst MessageOnlyErrorBodySchema = z.object({ message: z.string() });\n/** Parse a JSON error body from the API. */\nfunction parseErrorResponse(body) {\n\tconst parsed = ErrorResponseSchema.safeParse(body);\n\tif (parsed.success) return parsed.data;\n\tconst messageOnly = MessageOnlyErrorBodySchema.safeParse(body);\n\tif (messageOnly.success) return {\n\t\terror: messageOnly.data.message,\n\t\tmessage: messageOnly.data.message\n\t};\n}\n//#endregion\n//#region src/schemas/chat-attachments.ts\nconst CHAT_ATTACHMENT_MAX_COUNT = 5;\nconst CHAT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;\n/** Single source of truth for supported chat attachment types and their file extension. */\nconst CHAT_ATTACHMENT_TYPES = [\n\t{\n\t\tmediaType: \"image/png\",\n\t\text: \"png\"\n\t},\n\t{\n\t\tmediaType: \"image/jpeg\",\n\t\text: \"jpg\"\n\t},\n\t{\n\t\tmediaType: \"image/webp\",\n\t\text: \"webp\"\n\t},\n\t{\n\t\tmediaType: \"image/gif\",\n\t\text: \"gif\"\n\t},\n\t{\n\t\tmediaType: \"application/pdf\",\n\t\text: \"pdf\"\n\t}\n];\nconst CHAT_ATTACHMENT_ALLOWED_MEDIA_TYPES = CHAT_ATTACHMENT_TYPES.map((type) => type.mediaType);\n/** Canonical file extension for an allowed attachment media type. */\nfunction chatAttachmentExtension(mediaType) {\n\treturn CHAT_ATTACHMENT_TYPES.find((type) => type.mediaType === mediaType)?.ext;\n}\nconst ChatAttachmentInputSchema = z.object({\n\tstorageKey: z.string().min(1),\n\tmediaType: z.string().min(1),\n\tfilename: z.string().optional()\n});\nconst PresignChatAttachmentRequestSchema = z.object({\n\tcontentType: z.string().min(1),\n\tfilename: z.string().min(1),\n\tsize: z.number().int().positive().max(CHAT_ATTACHMENT_MAX_BYTES)\n});\nconst PresignChatAttachmentResponseSchema = z.object({\n\tuploadUrl: z.string().url(),\n\tstorageKey: z.string().min(1)\n});\nfunction isAllowedChatAttachmentMediaType(mediaType) {\n\treturn chatAttachmentExtension(mediaType) !== void 0;\n}\nfunction modelSupportsMediaType(capabilities, mediaType) {\n\tif (mediaType.startsWith(\"image/\")) return capabilities.images;\n\treturn capabilities.files;\n}\n/** Canonical serve path for a chat attachment (stored in `FileUIPart.url`). */\nfunction chatAttachmentServePath(projectId, agentSlug, storageKey) {\n\tconst encodedKey = storageKey.split(\"/\").map((segment) => encodeURIComponent(segment)).join(\"/\");\n\treturn `/api/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentSlug)}/attachments/${encodedKey}`;\n}\n/** Parse a serve URL or path back to project, agent slug, and storage key. */\nfunction parseChatAttachmentServePath(url) {\n\tlet pathname;\n\ttry {\n\t\tpathname = url instanceof URL ? url.pathname : new URL(url, \"http://local\").pathname;\n\t} catch {\n\t\treturn null;\n\t}\n\tif (!pathname.startsWith(\"/api/projects/\")) return null;\n\tconst match = pathname.slice(14).match(/^([^/]+)\\/agents\\/([^/]+)\\/attachments\\/(.+)$/);\n\tif (!match) return null;\n\tconst [, projectId, agentSlug, encodedKey] = match;\n\tif (!projectId || !agentSlug || !encodedKey) return null;\n\ttry {\n\t\tconst storageKey = encodedKey.split(\"/\").map((segment) => decodeURIComponent(segment)).join(\"/\");\n\t\treturn {\n\t\t\tprojectId: decodeURIComponent(projectId),\n\t\t\tagentSlug: decodeURIComponent(agentSlug),\n\t\t\tstorageKey\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n//#endregion\n//#region src/schemas/http.ts\nconst CredentialRunContextSchema = z.object({\n\torgId: z.string().min(1).optional(),\n\tprojectId: z.string().min(1).optional(),\n\tuserId: z.string().min(1).optional(),\n\tuserIds: z.record(z.string(), z.string()).optional(),\n\tselection: z.record(z.string(), z.string()).optional()\n});\nconst ThinkingLevelSchema = z.enum([\n\t\"provider-default\",\n\t\"none\",\n\t\"minimal\",\n\t\"low\",\n\t\"medium\",\n\t\"high\",\n\t\"xhigh\"\n]);\nconst PromptInputSchema = z.object({\n\tmessage: z.string(),\n\tsessionId: z.string().min(1).optional(),\n\tsubscriptionId: z.string().min(1).optional(),\n\tcontext: CredentialRunContextSchema.optional(),\n\tthinkingLevel: ThinkingLevelSchema.optional(),\n\tfiles: z.array(ChatAttachmentInputSchema).max(5).optional()\n}).refine((data) => data.message.trim().length > 0 || (data.files?.length ?? 0) > 0, { message: \"message or files is required\" });\nconst PromptResponseSchema = z.object({\n\tsessionId: z.string(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\ttext: z.string(),\n\terror: z.string().nullable()\n});\nconst SkipResponseSchema = z.object({\n\tok: z.literal(true),\n\tskipped: z.literal(true)\n});\nconst HealthResponseSchema = z.object({ ok: z.literal(true) });\nconst PlatformInfoResponseSchema = z.object({ service: z.string() });\nconst ConnectProviderSchema = z.object({\n\tkey: z.string(),\n\tmode: z.enum([\"authorize-url\", \"browser-redirect\"]),\n\tpath: z.string(),\n\trequiresAuth: z.boolean()\n});\nconst ConnectProvidersResponseSchema = z.object({ providers: z.array(ConnectProviderSchema) });\nconst ConnectAuthorizeUrlResponseSchema = z.object({ url: z.string() });\nconst QueuedRunResponseSchema = z.object({ runId: z.string() });\nconst QueuedAgentPromptResponseSchema = z.object({\n\tsessionId: z.string(),\n\trunId: z.string()\n});\nfunction parsePromptInput(input) {\n\treturn PromptInputSchema.parse(input);\n}\nconst PollRunRequestSchema = z.object({\n\tworkflows: z.array(z.string().min(1)).optional(),\n\tattachments: z.array(z.string().min(1)).optional()\n});\nconst PollAttachmentResultSchema = z.object({\n\tattachmentSlug: z.string(),\n\tworkflowKey: z.string(),\n\trunId: z.string().optional(),\n\tbody: z.unknown().optional(),\n\tqueued: z.boolean(),\n\tskipped: z.boolean().optional()\n});\nconst PollRunMultiResponseSchema = z.object({ results: z.array(PollAttachmentResultSchema) });\nconst PollRunResponseSchema = z.union([\n\tz.record(z.string(), z.unknown()),\n\tPollRunMultiResponseSchema,\n\tSkipResponseSchema,\n\tz.object({ runId: z.string() })\n]);\nfunction parsePollRunRequest(body) {\n\tif (body === void 0 || body === null) return {};\n\treturn PollRunRequestSchema.parse(body);\n}\n//#endregion\n//#region src/schemas/runs.ts\nconst RunSourceKindSchema = z.enum([\n\t\"api\",\n\t\"trigger\",\n\t\"gateway\",\n\t\"workflow\",\n\t\"agent\"\n]);\nconst RunSourceSchema = z.object({\n\tkind: RunSourceKindSchema,\n\tid: z.string().nullable()\n});\n//#endregion\n//#region src/schemas/agent-triggers.ts\nconst AgentTriggerOriginSchema = z.enum([\"project\", \"ephemeral\"]);\nconst AgentTriggerStatusSchema = z.enum([\n\t\"active\",\n\t\"disabled\",\n\t\"completed\"\n]);\nconst AgentTriggerTypeSchema = z.enum([\n\t\"webhook\",\n\t\"cron\",\n\t\"poll\"\n]);\nconst AgentTriggerSummarySchema = z.object({\n\tid: z.string(),\n\tlabel: z.string(),\n\tname: z.string().nullable().optional(),\n\tdescription: z.string().nullable().optional(),\n\ttype: AgentTriggerTypeSchema,\n\tschedule: z.string().nullable(),\n\tendpoint: z.string().nullable(),\n\torigin: AgentTriggerOriginSchema,\n\tprompt: z.string().nullable(),\n\tstatus: AgentTriggerStatusSchema,\n\texecutionCount: z.number().int().nonnegative(),\n\tuntil: z.string().nullable(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string()\n});\nconst AgentTriggerSummaryListResponseSchema = z.array(AgentTriggerSummarySchema);\n//#endregion\n//#region src/schemas/workflow-runs.ts\nconst WorkflowRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"sleeping\",\n\t\"waiting_hook\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst WorkflowRunTriggerSchema = z.enum([\n\t\"api\",\n\t\"cron\",\n\t\"webhook\",\n\t\"poll\",\n\t\"retry\"\n]);\n/**\n* Durable workflow event-log entry types. Shared so the persistence layer\n* (`@keystrokehq/database` schema) and the runtime-agnostic replay engine\n* (`@keystrokehq/workflow`) reference one definition instead of duplicating it.\n*/\nconst WorkflowEventTypeSchema = z.enum([\n\t\"run_started\",\n\t\"step_completed\",\n\t\"step_failed\",\n\t\"step_retrying\",\n\t\"sleep_scheduled\",\n\t\"sleep_completed\",\n\t\"hook_created\",\n\t\"hook_resumed\",\n\t\"run_completed\",\n\t\"run_failed\",\n\t\"run_canceled\"\n]);\nconst WorkflowRunSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\ttrigger: WorkflowRunTriggerSchema,\n\ttriggeredAt: z.string(),\n\tstartedAt: z.string().nullable(),\n\tfinishedAt: z.string().nullable(),\n\tsourceKind: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttriggerRunId: z.string().nullable(),\n\tattachmentId: z.string().nullable()\n});\nconst WorkflowRunRecordSchema = z.object({\n\tid: z.string(),\n\tworkflowSlug: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\ttrigger: WorkflowRunTriggerSchema,\n\ttriggeredAt: z.string(),\n\tstartedAt: z.string().nullable(),\n\tfinishedAt: z.string().nullable(),\n\tsourceKind: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttriggerRunId: z.string().nullable(),\n\tattachmentId: z.string().nullable(),\n\tparentWorkflowRunId: z.string().nullable(),\n\tparentSpanId: z.string().nullable(),\n\tinput: z.unknown().nullable(),\n\toutput: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst WorkflowRunListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\tstatus: WorkflowRunStatusSchema.optional(),\n\ttrigger: WorkflowRunTriggerSchema.optional()\n});\nconst WorkflowRunListResponseSchema = z.object({\n\titems: z.array(WorkflowRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst WorkflowRunDetailIncludeSchema = z.enum([\n\t\"trigger\",\n\t\"steps\",\n\t\"trace\"\n]);\nconst WorkflowRunDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE$2 = [\n\t\"trigger\",\n\t\"steps\",\n\t\"trace\"\n];\nfunction parseWorkflowRunDetailInclude(include) {\n\tif (!include?.trim()) return [...DEFAULT_DETAIL_INCLUDE$2];\n\tconst parsed = include.split(\",\").map((part) => part.trim()).filter((part) => WorkflowRunDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE$2];\n}\nconst TriggerRunDetailSchema = z.object({\n\tid: z.string(),\n\ttriggerId: z.string(),\n\tattachmentSlug: z.string().nullable(),\n\ttriggerType: z.enum([\n\t\t\"cron\",\n\t\t\"webhook\",\n\t\t\"poll\"\n\t]),\n\tsourcePath: z.string().nullable(),\n\tpayload: z.unknown().nullable(),\n\ttriggeredAt: z.string()\n});\nconst WorkflowStepRunSchema = z.object({\n\tid: z.string(),\n\tactionKey: z.string(),\n\toutput: z.unknown(),\n\tcompletedAt: z.string()\n});\nconst TraceTriggerSummarySchema = z.object({\n\ttriggerType: z.string(),\n\ttriggerRunId: z.string(),\n\tworkflowSlug: z.string().optional(),\n\tagentSlug: z.string().optional(),\n\tattachmentId: z.string().nullable().optional(),\n\tattachmentSlug: z.string().nullable().optional(),\n\troute: z.string().optional(),\n\tsourcePath: z.string().nullable().optional()\n}).nullable();\nconst TraceGatewaySummarySchema = z.object({\n\tgatewayAttachmentId: z.string(),\n\tgatewayAttachmentKey: z.string(),\n\tthreadId: z.string().optional(),\n\tchannelId: z.string().optional(),\n\tmode: z.string().optional()\n}).nullable();\nconst TraceSpanSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tkind: z.string(),\n\trefId: z.string(),\n\tname: z.string(),\n\tstatus: z.string(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tmetadata: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst TraceLogSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tspanId: z.string(),\n\tseq: z.number(),\n\tlevel: z.string(),\n\tmessage: z.string(),\n\tdata: z.unknown().nullable(),\n\tsource: z.string(),\n\tcreatedAt: z.string()\n});\nconst TraceResponseSchema = z.object({\n\ttraceId: z.string(),\n\ttrigger: TraceTriggerSummarySchema,\n\tgateway: TraceGatewaySummarySchema,\n\tspans: z.array(TraceSpanSchema),\n\tlogs: z.array(TraceLogSchema)\n});\nconst WorkflowRunDetailResponseSchema = z.object({\n\trun: WorkflowRunRecordSchema,\n\ttrigger: TriggerRunDetailSchema.nullable(),\n\tsteps: z.array(WorkflowStepRunSchema),\n\ttrace: TraceResponseSchema.nullable()\n});\nconst WorkflowHookStatusSchema = z.enum([\"waiting\", \"resumed\"]);\nconst WorkflowHookSummarySchema = z.object({\n\ttoken: z.string(),\n\tcorrelationId: z.string(),\n\tstatus: WorkflowHookStatusSchema,\n\tcreatedAt: z.string(),\n\tresumeUrl: z.string().nullable()\n});\nconst WorkflowRunHooksResponseSchema = z.object({ items: z.array(WorkflowHookSummarySchema) });\n//#endregion\n//#region src/schemas/agent-sessions.ts\nconst AgentSessionStatusSchema = z.enum([\n\t\"running\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst AgentSessionSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: AgentSessionStatusSchema,\n\tsource: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttitle: z.string().nullable(),\n\tranByUserName: z.string().nullable(),\n\tgatewayPlatform: z.string().nullable(),\n\ttriggerType: AgentTriggerTypeSchema.nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tmessageCount: z.number()\n});\nconst AgentSessionRecordSchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string(),\n\tstatus: AgentSessionStatusSchema,\n\tsource: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tmessageCount: z.number(),\n\terror: z.unknown().nullable()\n});\nconst AgentSessionListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\tstatus: AgentSessionStatusSchema.optional(),\n\tsource: RunSourceKindSchema.optional()\n});\nconst AgentSessionListResponseSchema = z.object({\n\titems: z.array(AgentSessionSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst AgentSessionDetailIncludeSchema = z.enum([\n\t\"gateway\",\n\t\"messages\",\n\t\"events\",\n\t\"trace\"\n]);\nconst AgentSessionDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE$1 = [\n\t\"gateway\",\n\t\"messages\",\n\t\"trace\"\n];\nfunction parseAgentSessionDetailInclude(include) {\n\tif (!include?.trim()) return [...DEFAULT_DETAIL_INCLUDE$1];\n\tconst parsed = include.split(\",\").map((part) => part.trim()).filter((part) => AgentSessionDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE$1];\n}\nconst GatewaySessionDetailSchema = z.object({\n\tthreadId: z.string(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string().nullable()\n});\nconst AgentEventSchema = z.object({\n\tid: z.string(),\n\tsessionId: z.string(),\n\tseq: z.number(),\n\teventType: z.string(),\n\tpayload: z.unknown(),\n\tcreatedAt: z.string()\n});\nconst AgentSessionDetailResponseSchema = z.object({\n\tsession: AgentSessionRecordSchema,\n\tgateway: GatewaySessionDetailSchema.nullable(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\tevents: z.array(AgentEventSchema),\n\ttrace: TraceResponseSchema.nullable()\n});\nconst AgentSessionChatStateQuerySchema = z.object({ sinceSeq: z.coerce.number().int().min(0).optional() });\nconst AgentSessionChatStateResponseSchema = z.object({\n\tstatus: AgentSessionStatusSchema,\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\tlive: z.record(z.string(), z.unknown()).nullable()\n});\n//#endregion\n//#region src/schemas/gateway-attachments.ts\nconst SlackGatewayModeSchema = z.enum([\n\t\"mention\",\n\t\"channel\",\n\t\"dm\"\n]);\nconst GatewayAttachmentSourceSchema = z.object({\n\tkind: z.literal(\"slack\"),\n\tmode: SlackGatewayModeSchema,\n\tcredentialKey: z.string(),\n\tchannelIds: z.array(z.string()).optional(),\n\tsubscribeOnMention: z.boolean()\n});\nconst GatewayAttachmentRecordSchema = z.object({\n\tid: z.string(),\n\tkey: z.string(),\n\tagentKey: z.string(),\n\tchannelId: z.string(),\n\tteamId: z.string().nullable().optional(),\n\tplatform: z.string(),\n\tsource: GatewayAttachmentSourceSchema,\n\tregisteredAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst GatewayAttachmentListResponseSchema = z.object({ attachments: z.array(GatewayAttachmentRecordSchema) });\nconst UpsertGatewayAttachmentBodySchema = z.object({\n\tagentKey: z.string().min(1),\n\tteamId: z.string().min(1).optional(),\n\tmode: SlackGatewayModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n});\nconst AgentListItemSchema = z.object({\n\tkey: z.string(),\n\tname: z.string().optional(),\n\troute: z.string()\n});\nconst AgentListResponseSchema = z.object({ agents: z.array(AgentListItemSchema) });\n//#endregion\n//#region src/schemas/history.ts\nconst HistoryRunKindSchema = z.enum([\"workflow\", \"agent\"]);\nconst HistoryRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"sleeping\",\n\t\"waiting_hook\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst HistoryRunActorSchema = z.object({\n\tuserId: z.string(),\n\tname: z.string(),\n\tavatarUrl: z.string().nullable().optional()\n});\nconst HistoryRunUsageLineItemSchema = z.object({\n\tid: z.string(),\n\tlabel: z.string(),\n\tamountUsd: z.number()\n});\nconst HistoryRunUsageSchema = z.object({\n\trunDurationMs: z.number().nullable(),\n\tlineItems: z.array(HistoryRunUsageLineItemSchema),\n\ttotalExcludingDurationUsd: z.number().nullable()\n});\nconst HistoryRunSchema = z.object({\n\tid: z.string(),\n\tkind: HistoryRunKindSchema,\n\ttraceId: z.string().nullable(),\n\tprojectId: z.string(),\n\tprojectName: z.string(),\n\tresourceKey: z.string(),\n\tresourceId: z.string(),\n\tresourceName: z.string(),\n\tstatus: HistoryRunStatusSchema,\n\ttriggeredAt: z.string(),\n\ttimeInQueueMs: z.number().nullable(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tdurationMs: z.number().nullable(),\n\ttriggerLabel: z.string(),\n\ttriggerRaw: z.string(),\n\tranAs: HistoryRunActorSchema.nullable(),\n\tmodelsUsed: z.array(z.string()),\n\totherServicesUsed: z.array(z.string()),\n\ttotalCostUsd: z.number().nullable(),\n\tmessageCount: z.number().optional(),\n\tstepCount: z.number().optional()\n});\nconst HistoryTraceSpanSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tkind: z.string(),\n\trefId: z.string(),\n\tname: z.string(),\n\tstatus: z.string(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tmetadata: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst HistoryTraceLogSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tspanId: z.string(),\n\tseq: z.number(),\n\tlevel: z.string(),\n\tmessage: z.string(),\n\tdata: z.unknown().nullable(),\n\tsource: z.string(),\n\tcreatedAt: z.string()\n});\nconst HistoryTraceTriggerSchema = z.object({\n\ttriggerType: z.string(),\n\ttriggerRunId: z.string(),\n\tworkflowKey: z.string().optional(),\n\tagentKey: z.string().optional(),\n\tattachmentId: z.string().nullable().optional(),\n\tattachmentSlug: z.string().nullable().optional(),\n\troute: z.string().optional(),\n\tsourcePath: z.string().nullable().optional()\n}).nullable();\nconst HistoryTraceGatewaySchema = z.object({\n\tgatewayAttachmentId: z.string(),\n\tgatewayAttachmentKey: z.string(),\n\tthreadId: z.string().optional(),\n\tchannelId: z.string().optional(),\n\tmode: z.string().optional()\n}).nullable();\nconst HistoryTraceSchema = z.object({\n\ttraceId: z.string(),\n\ttrigger: HistoryTraceTriggerSchema,\n\tgateway: HistoryTraceGatewaySchema,\n\tspans: z.array(HistoryTraceSpanSchema),\n\tlogs: z.array(HistoryTraceLogSchema)\n});\nconst HistoryWorkflowStepSchema = z.object({\n\tid: z.string(),\n\tactionKey: z.string(),\n\toutput: z.unknown(),\n\tcompletedAt: z.string()\n});\nconst HistoryWorkflowRunDetailSchema = z.object({\n\tkind: z.literal(\"workflow\"),\n\trun: z.object({\n\t\tid: z.string(),\n\t\tworkflowKey: z.string(),\n\t\tstatus: HistoryRunStatusSchema,\n\t\ttrigger: z.string(),\n\t\ttriggeredAt: z.string(),\n\t\tstartedAt: z.string().nullable(),\n\t\tfinishedAt: z.string().nullable(),\n\t\tinput: z.unknown().nullable(),\n\t\toutput: z.unknown().nullable(),\n\t\terror: z.unknown().nullable()\n\t}),\n\ttrigger: z.object({\n\t\tid: z.string(),\n\t\tattachmentSlug: z.string().nullable(),\n\t\ttriggerType: z.string(),\n\t\tsourcePath: z.string().nullable(),\n\t\tpayload: z.unknown().nullable(),\n\t\ttriggeredAt: z.string()\n\t}).nullable(),\n\tsteps: z.array(HistoryWorkflowStepSchema),\n\ttrace: HistoryTraceSchema.nullable(),\n\tranAs: HistoryRunActorSchema.nullable().optional(),\n\tusage: HistoryRunUsageSchema.nullable().optional()\n});\nconst HistoryAgentSessionDetailSchema = z.object({\n\tkind: z.literal(\"agent\"),\n\trunId: z.string(),\n\tsession: z.object({\n\t\tid: z.string(),\n\t\tagentKey: z.string(),\n\t\tstatus: HistoryRunStatusSchema,\n\t\tsource: z.enum([\n\t\t\t\"api\",\n\t\t\t\"gateway\",\n\t\t\t\"trigger\",\n\t\t\t\"workflow\",\n\t\t\t\"agent\"\n\t\t]),\n\t\tsourceId: z.string().nullable(),\n\t\tcreatedAt: z.string(),\n\t\tupdatedAt: z.string(),\n\t\tmessageCount: z.number(),\n\t\terror: z.unknown().nullable()\n\t}),\n\tgateway: z.object({\n\t\tthreadId: z.string(),\n\t\tattachmentSlug: z.string().nullable()\n\t}).nullable(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\ttrace: HistoryTraceSchema.nullable(),\n\tranAs: HistoryRunActorSchema.nullable().optional(),\n\tusage: HistoryRunUsageSchema.nullable().optional()\n});\nconst HistoryRunDetailSchema = z.discriminatedUnion(\"kind\", [HistoryWorkflowRunDetailSchema, HistoryAgentSessionDetailSchema]);\nconst HistoryRunListQuerySchema = z.object({\n\tproject: z.string().min(1).optional(),\n\tstatus: HistoryRunStatusSchema.optional(),\n\tkind: HistoryRunKindSchema.optional()\n});\nconst HistoryRunListResponseSchema = z.array(HistoryRunSchema);\nconst HistoryRunDetailResponseSchema = HistoryRunDetailSchema.nullable();\nconst HistoryRunCancelResponseSchema = HistoryRunSchema.nullable();\n//#endregion\n//#region src/schemas/workflow-deployments.ts\nconst WorkflowSubscriptionRecordSchema = z.object({\n\tid: z.string(),\n\tworkflowKey: z.string(),\n\tuserId: z.string(),\n\tenabled: z.boolean(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst WorkflowSubscriptionListResponseSchema = z.object({ subscriptions: z.array(WorkflowSubscriptionRecordSchema) });\nconst UpsertWorkflowSubscriptionBodySchema = z.object({\n\tuserId: z.string().min(1).optional(),\n\tenabled: z.boolean().optional()\n});\nconst CredentialInstanceRecordSchema = z.object({\n\tid: z.string(),\n\tappSlug: z.string(),\n\tslug: z.string(),\n\tname: z.string().nullable(),\n\tscopeType: CredentialScopeTypeSchema,\n\tscopeId: z.string().nullable(),\n\tlabel: z.string().nullable(),\n\tisDefault: z.boolean(),\n\tauthKind: CredentialAuthKindSchema\n});\nconst CredentialInstanceListResponseSchema = z.object({ instances: z.array(CredentialInstanceRecordSchema) });\nconst CreateCredentialInstanceBodySchema = z.object({\n\tkey: z.string().min(1),\n\tslug: z.string().min(1).optional(),\n\tname: z.string().nullable().optional(),\n\tscopeType: CredentialScopeTypeSchema,\n\tscopeId: z.string().nullable().optional(),\n\tlabel: z.string().nullable().optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" })\n});\nconst UpdateCredentialInstanceBodySchema = z.object({\n\tslug: z.string().min(1).optional(),\n\tname: z.string().nullable().optional(),\n\tlabel: z.string().nullable().optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" }).optional()\n});\n//#endregion\n//#region src/schemas/trigger-runs.ts\nconst TriggerRunTypeSchema = z.enum([\n\t\"cron\",\n\t\"webhook\",\n\t\"poll\"\n]);\nconst TriggerRunOutcomeSchema = z.enum([\n\t\"dispatched\",\n\t\"skipped\",\n\t\"failed\"\n]);\nconst TriggerRunReasonSchema = z.enum([\n\t\"filter_rejected\",\n\t\"transform_undefined\",\n\t\"invalid_payload\",\n\t\"source_error\",\n\t\"handler_error\"\n]);\nconst TriggerRunWorkflowSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\tworkflowSlug: z.string()\n});\nconst TriggerRunAgentSessionSummarySchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string()\n});\nconst TriggerRunSummarySchema = z.object({\n\tid: z.string(),\n\ttriggerType: TriggerRunTypeSchema,\n\ttriggeredAt: z.string(),\n\tsourcePath: z.string().nullable(),\n\toutcome: TriggerRunOutcomeSchema,\n\treason: TriggerRunReasonSchema.nullable(),\n\tdetail: z.string().nullable(),\n\t/** Workflow runs dispatched by this fire (fan-out → one per matched workflow attachment). */\n\tworkflowRuns: z.array(TriggerRunWorkflowSummarySchema),\n\t/** Agent sessions dispatched by this fire (fan-out → one per matched agent attachment). */\n\tagentSessions: z.array(TriggerRunAgentSessionSummarySchema)\n});\nconst TriggerRunRecordSchema = z.object({\n\tid: z.string(),\n\ttriggerId: z.string(),\n\tattachmentSlug: z.string(),\n\ttriggerType: TriggerRunTypeSchema,\n\tsourcePath: z.string().nullable(),\n\toutcome: TriggerRunOutcomeSchema,\n\treason: TriggerRunReasonSchema.nullable(),\n\tdetail: z.string().nullable(),\n\tpayload: z.unknown().nullable(),\n\ttriggeredAt: z.string()\n});\nconst TriggerRunListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\ttriggerType: TriggerRunTypeSchema.optional()\n});\nconst TriggerRunListResponseSchema = z.object({\n\titems: z.array(TriggerRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst TriggerRunDetailIncludeSchema = z.enum([\n\t\"workflows\",\n\t\"agents\",\n\t\"trace\"\n]);\nconst TriggerRunDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE = [\n\t\"workflows\",\n\t\"agents\",\n\t\"trace\"\n];\nfunction parseTriggerRunDetailInclude(include) {\n\tif (!include?.trim()) return [...DEFAULT_DETAIL_INCLUDE];\n\tconst parsed = include.split(\",\").map((part) => part.trim()).filter((part) => TriggerRunDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE];\n}\nconst TriggerRunAgentSessionDetailSchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string()\n});\nconst TriggerRunDetailResponseSchema = z.object({\n\trun: TriggerRunRecordSchema,\n\tworkflowRuns: z.array(WorkflowRunSummarySchema),\n\tagentSessions: z.array(TriggerRunAgentSessionDetailSchema),\n\ttrace: TraceResponseSchema.nullable()\n});\n//#endregion\n//#region src/schemas/triggers.ts\nconst TriggerTypeSchema = z.enum([\n\t\"webhook\",\n\t\"poll\",\n\t\"cron\"\n]);\nconst TriggerTargetKindSchema = z.enum([\"workflow\", \"agent\"]);\nconst TriggerStatusSchema = z.enum([\"active\", \"disabled\"]);\nconst TriggerAttachmentStatusSchema = z.enum([\"active\", \"disabled\"]);\nconst TriggerListItemSchema = z.object({\n\tslug: z.string(),\n\tname: z.string().optional(),\n\tdescription: z.string().optional(),\n\ttype: TriggerTypeSchema,\n\tstatus: TriggerStatusSchema.optional(),\n\tschedule: z.string().nullable().optional(),\n\tsourcePath: z.string().optional(),\n\troute: z.string().optional(),\n\twebhookUrl: z.string().url().optional(),\n\ttargetKind: TriggerTargetKindSchema,\n\tworkflowKey: z.string().optional(),\n\tagentKey: z.string().optional()\n});\nconst TriggerListResponseSchema = z.object({ triggers: z.array(TriggerListItemSchema) });\nconst TriggerListQuerySchema = z.object({ endpoint: z.string().min(1).optional() });\nconst TriggerDetailResponseSchema = TriggerListItemSchema;\nconst TriggerAssignmentSchema = z.object({\n\tkind: TriggerTargetKindSchema,\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string(),\n\tstatus: TriggerAttachmentStatusSchema,\n\tdisabledAt: z.string().nullable()\n});\n//#endregion\n//#region src/schemas/workspace-triggers.ts\n/** Status of the downstream run/session a dispatched fire produced. */\nconst WorkspaceTriggerRunStatusSchema = z.enum([\n\t\"completed\",\n\t\"running\",\n\t\"failed\"\n]);\n/**\n* Categorical reason a fire was recorded but produced no downstream run. These map\n* from the persisted `trigger_runs.reason` enum onto the labels the UI renders.\n*/\nconst WorkspaceTriggerSkipReasonSchema = z.enum([\n\t\"filtered\",\n\t\"no_new_data\",\n\t\"transform_undefined\"\n]);\n/**\n* A single downstream run/session a dispatched fire produced. A fan-out fire can\n* dispatch several of these (multiple workflows and/or agents off one source event).\n*/\nconst WorkspaceTriggerRunTargetSchema = z.discriminatedUnion(\"kind\", [z.object({\n\tkind: z.literal(\"workflow\"),\n\trunId: z.string(),\n\tworkflowId: z.string(),\n\tstatus: WorkspaceTriggerRunStatusSchema,\n\tname: z.string()\n}), z.object({\n\tkind: z.literal(\"agent\"),\n\tsessionId: z.string(),\n\tagentId: z.string(),\n\tstatus: WorkspaceTriggerRunStatusSchema,\n\tname: z.string()\n})]);\n/**\n* Outcome of a single trigger fire — drives the run-history row presentation. Every\n* recorded fire either dispatched one or more workflow/agent targets, was skipped by\n* trigger logic, or failed before any target ran.\n*/\nconst WorkspaceTriggerRunOutcomeSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"dispatched\"),\n\t\ttargets: z.array(WorkspaceTriggerRunTargetSchema)\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"skipped\"),\n\t\treason: WorkspaceTriggerSkipReasonSchema\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"failed\"),\n\t\terror: z.string()\n\t})\n]);\nconst WorkspaceTriggerSummarySchema = z.object({\n\t/** `triggers.id` UUID for the trigger row. */\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().min(1),\n\ttype: TriggerTypeSchema,\n\tstatus: TriggerStatusSchema,\n\tprojectId: z.string(),\n\tprojectName: z.string(),\n\t/** Webhook ingress URL (webhook triggers only). */\n\twebhookUrl: z.string().nullable(),\n\t/** Cron expression or poll cadence label (cron/poll triggers only). */\n\tschedule: z.string().nullable(),\n\t/** Workflows + agents currently bound to this source. */\n\tassignments: z.array(TriggerAssignmentSchema),\n\tlastFiredAt: z.string().nullable(),\n\tfireCount: z.number().int().nonnegative(),\n\tcreatedAt: z.string()\n});\nconst WorkspaceTriggerDetailSchema = WorkspaceTriggerSummarySchema.extend({ \n/** Source module file path, relative to the project root. */\nsourcePath: z.string() });\nconst WorkspaceTriggerListResponseSchema = z.array(WorkspaceTriggerSummarySchema);\nconst WorkspaceTriggerRunSummarySchema = z.object({\n\tid: z.string(),\n\ttriggerType: TriggerTypeSchema,\n\ttriggeredAt: z.string(),\n\t/** Poll/webhook source path or endpoint that produced the fire. */\n\tsourcePath: z.string().nullable(),\n\toutcome: WorkspaceTriggerRunOutcomeSchema\n});\nconst WorkspaceTriggerRunListResponseSchema = z.object({\n\titems: z.array(WorkspaceTriggerRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst WorkspaceTriggerFileSchema = z.object({\n\tpath: z.string(),\n\tcontents: z.string()\n});\n/** Default gateway model for trigger overviews — a cheap model, same as session-title generation. */\nconst DEFAULT_TRIGGER_OVERVIEW_MODEL = \"deepseek/deepseek-v4-flash\";\n/** Whether the LLM overview is still being produced, finished, or errored. */\nconst WorkspaceTriggerOverviewStatusSchema = z.enum([\n\t\"generating\",\n\t\"ready\",\n\t\"failed\"\n]);\n/** LLM-generated markdown overview envelope served to the web dashboard. */\nconst WorkspaceTriggerOverviewSchema = z.object({\n\tstatus: WorkspaceTriggerOverviewStatusSchema,\n\tmarkdown: z.string(),\n\thash: z.string(),\n\tgeneratedAt: z.string().nullable(),\n\tmodel: z.string()\n});\n/** Inputs the worker feeds the LLM to generate a trigger overview. */\nconst TriggerOverviewInputSchema = z.object({\n\tname: z.string(),\n\tdescription: z.string().nullable(),\n\ttype: TriggerTypeSchema,\n\tschedule: z.string().nullable(),\n\tsourcePath: z.string(),\n\tsourceContents: z.string(),\n\tassignments: z.array(TriggerAssignmentSchema)\n});\n/** Queue payload the platform enqueues for the worker `trigger-overview` job. */\nconst TriggerOverviewJobPayloadSchema = z.object({\n\ttriggerId: z.string(),\n\tprojectId: z.string(),\n\ttriggerHash: z.string(),\n\tmodel: z.string(),\n\tinput: TriggerOverviewInputSchema\n});\nconst TriggerAttachmentUpdateRequestSchema = z.object({ enabled: z.boolean() });\nconst TriggerAttachmentUpdateResponseSchema = WorkspaceTriggerDetailSchema;\n//#endregion\n//#region src/schemas/members.ts\nconst OrganizationMemberRoleSchema = z.enum([\n\t\"owner\",\n\t\"admin\",\n\t\"builder\"\n]);\nconst OrganizationMemberStatusSchema = z.enum([\n\t\"invited\",\n\t\"active\",\n\t\"rejected\",\n\t\"suspended\"\n]);\nconst InvitableOrganizationMemberRoleSchema = z.enum([\"admin\", \"builder\"]);\nconst isoDateTime$4 = z.string().datetime();\nconst OrganizationMemberSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\temail: z.string().email(),\n\trole: OrganizationMemberRoleSchema,\n\tstatus: OrganizationMemberStatusSchema,\n\tavatarUrl: z.string().optional(),\n\tjoinedAt: isoDateTime$4.optional(),\n\tlastActiveAt: isoDateTime$4.nullable().optional()\n});\nconst ListOrganizationMembersResponseSchema = z.array(OrganizationMemberSchema);\nconst InviteOrganizationMembersRequestSchema = z.object({\n\temails: z.array(z.string().trim().email()).min(1),\n\trole: InvitableOrganizationMemberRoleSchema\n});\nconst InviteOrganizationMemberResultStatusSchema = z.enum([\n\t\"sent\",\n\t\"already_member\",\n\t\"pending\",\n\t\"invalid\"\n]);\nconst InviteOrganizationMemberResultSchema = z.object({\n\temail: z.string(),\n\tstatus: InviteOrganizationMemberResultStatusSchema,\n\tinvitationId: z.string().optional()\n});\nconst InviteOrganizationMembersResponseSchema = z.array(InviteOrganizationMemberResultSchema);\nconst UpdateOrganizationMemberRequestSchema = z.object({ role: InvitableOrganizationMemberRoleSchema });\nconst UpdateOrganizationMemberResponseSchema = OrganizationMemberSchema;\nconst OrganizationInvitationSchema = z.object({\n\tid: z.string(),\n\torganizationName: z.string(),\n\torganizationSlug: OrganizationSlugSchema,\n\tinvitedByName: z.string().optional(),\n\tinvitedByEmail: z.string().email().optional(),\n\trole: OrganizationMemberRoleSchema\n});\nconst ListOrganizationInvitationsResponseSchema = z.array(OrganizationInvitationSchema);\nconst AcceptOrganizationInvitationResponseSchema = UserOrganizationSchema;\nconst DeclineOrganizationInvitationResponseSchema = z.object({ success: z.literal(true) });\n/** Web path to auto-accept an invitation after sign-in (used in invite emails). */\nfunction organizationInvitationAcceptPath(invitationId) {\n\treturn `/organization/invitations?${new URLSearchParams({ accept: invitationId }).toString()}`;\n}\n//#endregion\n//#region src/schemas/api-keys.ts\nconst isoDateTime$3 = z.string().datetime();\nconst ApiKeyCreatorSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\temail: z.string().email().optional(),\n\tavatarUrl: z.string().optional(),\n\t/** True when the creator user row no longer exists. */\n\tdeleted: z.boolean().optional()\n});\nconst ApiKeySummarySchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tkeyPreview: z.string(),\n\tcreatedAt: isoDateTime$3,\n\tcreatedBy: ApiKeyCreatorSchema,\n\tisCreatedByCurrentUser: z.boolean()\n});\nconst ListApiKeysResponseSchema = z.array(ApiKeySummarySchema);\nconst CreateApiKeyRequestSchema = z.object({ name: z.string().trim().min(1).max(128) });\nconst CreateApiKeyResponseSchema = ApiKeySummarySchema.extend({ secret: z.string() });\n//#endregion\n//#region src/schemas/project-members.ts\nconst ProjectUserRoleSchema = z.enum([\"admin\", \"builder\"]);\nconst ProjectInvitePermissionSchema = z.enum([\"admin\", \"all\"]);\nconst ProjectMemberStatusSchema = z.enum([\"active\", \"invited\"]);\nconst isoDateTime$2 = z.string().datetime();\nconst ProjectMemberSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tname: z.string(),\n\temail: z.string().email(),\n\trole: ProjectUserRoleSchema,\n\tstatus: ProjectMemberStatusSchema,\n\timage: z.string().nullable(),\n\tcreatedAt: isoDateTime$2,\n\tisCurrentUser: z.boolean().optional()\n});\nconst ListProjectMembersResponseSchema = z.array(ProjectMemberSchema);\nconst InviteProjectMembersRequestSchema = z.object({\n\temails: z.array(z.string().trim().email()).min(1),\n\trole: ProjectUserRoleSchema\n});\nconst InviteProjectMemberResultStatusSchema = z.enum([\n\t\"added\",\n\t\"already_member\",\n\t\"not_org_member\",\n\t\"invalid\"\n]);\nconst InviteProjectMemberResultSchema = z.object({\n\temail: z.string(),\n\tstatus: InviteProjectMemberResultStatusSchema\n});\nconst InviteProjectMembersResponseSchema = z.array(InviteProjectMemberResultSchema);\nconst UpdateProjectMemberRequestSchema = z.object({ role: ProjectUserRoleSchema });\nconst UpdateProjectMemberResponseSchema = ProjectMemberSchema;\nconst ProjectSettingsSchema = z.object({\n\tdescription: z.string(),\n\tdefaultRole: ProjectUserRoleSchema,\n\tinvitePermission: ProjectInvitePermissionSchema\n});\nconst UpdateProjectSettingsRequestSchema = z.object({\n\tdescription: z.string().optional(),\n\tdefaultRole: ProjectUserRoleSchema.optional(),\n\tinvitePermission: ProjectInvitePermissionSchema.optional()\n}).refine((data) => data.description !== void 0 || data.defaultRole !== void 0 || data.invitePermission !== void 0, { message: \"At least one field is required\" });\nconst ProjectSettingsResponseSchema = ProjectSettingsSchema;\n//#endregion\n//#region src/schemas/user-avatar.ts\n/** Custom avatar override; null means fall back to OAuth `users.image`. */\nconst UserAvatarSchema = z.object({ url: z.url().nullable() });\nconst UserAvatarPatchSchema = z.object({ \n/** Storage key returned from presign; null removes the custom override. */\nstorageKey: z.string().min(1).nullable() });\nconst PresignUserAvatarRequestSchema = z.object({ contentType: z.string().trim().min(1) });\nconst PresignUserAvatarResponseSchema = z.object({\n\tuploadUrl: z.url(),\n\tstorageKey: z.string().min(1)\n});\n//#endregion\n//#region src/schemas/user-preferences.ts\nconst UserInterfaceThemeSchema = z.enum([\n\t\"system\",\n\t\"light\",\n\t\"dark\"\n]);\nconst UserSurfaceContrastSchema = z.enum([\"off\", \"on\"]);\nconst UserWorkspaceLayoutModeSchema = z.enum([\"default\", \"linear\"]);\nconst UserWorkspaceFontSizeSchema = z.enum([\"default\", \"large\"]);\nconst UserSidebarNavIconVisibilitySchema = z.enum([\"hidden\", \"visible\"]);\nconst UserSidebarFooterChatRowVisibilitySchema = z.enum([\"hidden\", \"visible\"]);\nconst UserWorkspaceFavoriteKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"skill\",\n\t\"run\"\n]);\nconst UserWorkspaceFavoriteSchema = z.object({\n\tkind: UserWorkspaceFavoriteKindSchema,\n\tresourceId: z.string().min(1)\n});\nconst UserSidebarPreferencesSchema = z.object({\n\tnavIconVisibility: UserSidebarNavIconVisibilitySchema,\n\tfooterChatRowVisibility: UserSidebarFooterChatRowVisibilitySchema,\n\thiddenNavItemIds: z.array(z.string()),\n\ttopNavItemOrderIds: z.array(z.string()),\n\tworkspaceNavItemOrderIds: z.array(z.string())\n});\nconst UserPreferencesSchema = z.object({\n\tinterfaceTheme: UserInterfaceThemeSchema,\n\tsurfaceContrast: UserSurfaceContrastSchema,\n\tlayoutMode: UserWorkspaceLayoutModeSchema,\n\tfontSize: UserWorkspaceFontSizeSchema,\n\tsidebar: UserSidebarPreferencesSchema,\n\tfavorites: z.array(UserWorkspaceFavoriteSchema),\n\tprojectOrderIds: z.array(z.string()),\n\tprojectDotColors: z.record(z.string(), z.string()),\n\tonboardingTabVisible: z.boolean()\n});\nconst UserSidebarPreferencesPatchSchema = z.object({\n\tnavIconVisibility: UserSidebarNavIconVisibilitySchema.optional(),\n\tfooterChatRowVisibility: UserSidebarFooterChatRowVisibilitySchema.optional(),\n\thiddenNavItemIds: z.array(z.string()).optional(),\n\ttopNavItemOrderIds: z.array(z.string()).optional(),\n\tworkspaceNavItemOrderIds: z.array(z.string()).optional()\n});\nconst UserPreferencesPatchSchema = z.object({\n\tinterfaceTheme: UserInterfaceThemeSchema.optional(),\n\tsurfaceContrast: UserSurfaceContrastSchema.optional(),\n\tlayoutMode: UserWorkspaceLayoutModeSchema.optional(),\n\tfontSize: UserWorkspaceFontSizeSchema.optional(),\n\tsidebar: UserSidebarPreferencesPatchSchema.optional(),\n\tfavorites: z.array(UserWorkspaceFavoriteSchema).optional(),\n\tprojectOrderIds: z.array(z.string()).optional(),\n\tprojectDotColors: z.record(z.string(), z.string()).optional(),\n\tonboardingTabVisible: z.boolean().optional()\n}).refine((value) => value.interfaceTheme !== void 0 || value.surfaceContrast !== void 0 || value.layoutMode !== void 0 || value.fontSize !== void 0 || value.sidebar !== void 0 || value.favorites !== void 0 || value.projectOrderIds !== void 0 || value.projectDotColors !== void 0 || value.onboardingTabVisible !== void 0, { message: \"At least one preference field is required\" });\nconst DEFAULT_USER_SIDEBAR_PREFERENCES = {\n\tnavIconVisibility: \"visible\",\n\tfooterChatRowVisibility: \"visible\",\n\thiddenNavItemIds: [\"registry\"],\n\ttopNavItemOrderIds: [],\n\tworkspaceNavItemOrderIds: []\n};\nconst DEFAULT_USER_PREFERENCES = {\n\tinterfaceTheme: \"system\",\n\tsurfaceContrast: \"on\",\n\tlayoutMode: \"linear\",\n\tfontSize: \"default\",\n\tsidebar: DEFAULT_USER_SIDEBAR_PREFERENCES,\n\tfavorites: [],\n\tprojectOrderIds: [],\n\tprojectDotColors: {},\n\tonboardingTabVisible: true\n};\nfunction normalizeInterfaceTheme(value) {\n\tif (value === \"light\" || value === \"dark\") return value;\n\treturn \"system\";\n}\nfunction normalizeSurfaceContrast(value) {\n\treturn value === \"off\" ? \"off\" : \"on\";\n}\nfunction normalizeLayoutMode(value) {\n\treturn value === \"default\" ? \"default\" : \"linear\";\n}\nfunction normalizeFontSize(value) {\n\treturn value === \"large\" ? \"large\" : \"default\";\n}\nfunction normalizeStringList(value) {\n\tif (!Array.isArray(value)) return [];\n\treturn Array.from(new Set(value.filter((item) => typeof item === \"string\")));\n}\nfunction normalizeHiddenNavItemIds(value) {\n\tif (!Array.isArray(value)) return DEFAULT_USER_SIDEBAR_PREFERENCES.hiddenNavItemIds;\n\treturn normalizeStringList(value);\n}\nfunction normalizeSidebarPreferences(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_USER_SIDEBAR_PREFERENCES;\n\tconst sidebar = value;\n\treturn {\n\t\tnavIconVisibility: sidebar.navIconVisibility === \"visible\" ? \"visible\" : \"hidden\",\n\t\tfooterChatRowVisibility: sidebar.footerChatRowVisibility === \"hidden\" ? \"hidden\" : \"visible\",\n\t\thiddenNavItemIds: normalizeHiddenNavItemIds(sidebar.hiddenNavItemIds),\n\t\ttopNavItemOrderIds: normalizeStringList(sidebar.topNavItemOrderIds),\n\t\tworkspaceNavItemOrderIds: normalizeStringList(sidebar.workspaceNavItemOrderIds)\n\t};\n}\nfunction isWorkspaceFavoriteKind(value) {\n\treturn value === \"agent\" || value === \"workflow\" || value === \"skill\" || value === \"run\";\n}\nfunction normalizeFavorites(value) {\n\tif (!Array.isArray(value)) return [];\n\tconst seenKeys = /* @__PURE__ */ new Set();\n\tconst favorites = [];\n\tfor (const item of value) {\n\t\tif (!item || typeof item !== \"object\") continue;\n\t\tconst favorite = item;\n\t\tif (typeof favorite.kind !== \"string\" || !isWorkspaceFavoriteKind(favorite.kind) || typeof favorite.resourceId !== \"string\" || favorite.resourceId.length === 0) continue;\n\t\tconst key = `${favorite.kind}:${favorite.resourceId}`;\n\t\tif (seenKeys.has(key)) continue;\n\t\tseenKeys.add(key);\n\t\tfavorites.push({\n\t\t\tkind: favorite.kind,\n\t\t\tresourceId: favorite.resourceId\n\t\t});\n\t}\n\treturn favorites;\n}\nfunction normalizeProjectDotColors(value) {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) return {};\n\treturn Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[0] === \"string\" && typeof entry[1] === \"string\"));\n}\nfunction normalizeOnboardingTabVisible(value) {\n\treturn typeof value === \"boolean\" ? value : DEFAULT_USER_PREFERENCES.onboardingTabVisible;\n}\nfunction normalizeUserPreferences(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_USER_PREFERENCES;\n\tconst preferences = value;\n\treturn UserPreferencesSchema.parse({\n\t\tinterfaceTheme: normalizeInterfaceTheme(preferences.interfaceTheme),\n\t\tsurfaceContrast: normalizeSurfaceContrast(preferences.surfaceContrast),\n\t\tlayoutMode: normalizeLayoutMode(preferences.layoutMode),\n\t\tfontSize: normalizeFontSize(preferences.fontSize),\n\t\tsidebar: normalizeSidebarPreferences(preferences.sidebar),\n\t\tfavorites: normalizeFavorites(preferences.favorites),\n\t\tprojectOrderIds: normalizeStringList(preferences.projectOrderIds),\n\t\tprojectDotColors: normalizeProjectDotColors(preferences.projectDotColors),\n\t\tonboardingTabVisible: normalizeOnboardingTabVisible(preferences.onboardingTabVisible)\n\t});\n}\nfunction mergeUserPreferences(current, patch) {\n\treturn normalizeUserPreferences({\n\t\t...current,\n\t\t...patch,\n\t\tsidebar: patch.sidebar ? {\n\t\t\t...current.sidebar,\n\t\t\t...patch.sidebar\n\t\t} : current.sidebar\n\t});\n}\n//#endregion\n//#region src/schemas/organization-branding.ts\nconst OrganizationLogoVariantSchema = z.enum([\"light\", \"dark\"]);\nconst DEFAULT_LOGO_HEIGHT_PX = 20;\nconst MIN_LOGO_HEIGHT_PX = 14;\nconst MAX_LOGO_HEIGHT_PX = 32;\nconst OrganizationSidebarBrandingSchema = z.object({\n\tcustomLogoEnabled: z.boolean(),\n\tcustomLogoExplicitlyDisabled: z.boolean(),\n\tlogoLightUrl: z.url().nullable(),\n\tlogoDarkUrl: z.url().nullable(),\n\tlogoHeightPx: z.number().int().min(14).max(32)\n});\nconst OrganizationSidebarBrandingPatchSchema = z.object({\n\tcustomLogoEnabled: z.boolean().optional(),\n\tcustomLogoExplicitlyDisabled: z.boolean().optional(),\n\tlogoLightStorageKey: z.string().min(1).nullable().optional(),\n\tlogoDarkStorageKey: z.string().min(1).nullable().optional(),\n\tlogoHeightPx: z.number().int().min(14).max(32).optional()\n}).refine((value) => value.customLogoEnabled !== void 0 || value.customLogoExplicitlyDisabled !== void 0 || value.logoLightStorageKey !== void 0 || value.logoDarkStorageKey !== void 0 || value.logoHeightPx !== void 0, { message: \"At least one branding field is required\" });\nconst PresignOrgLogoRequestSchema = z.object({\n\tvariant: OrganizationLogoVariantSchema,\n\tcontentType: z.string().trim().min(1)\n});\nconst PresignOrgLogoResponseSchema = z.object({\n\tuploadUrl: z.url(),\n\tstorageKey: z.string().min(1)\n});\nconst DEFAULT_ORGANIZATION_SIDEBAR_BRANDING = {\n\tcustomLogoEnabled: false,\n\tcustomLogoExplicitlyDisabled: false,\n\tlogoLightUrl: null,\n\tlogoDarkUrl: null,\n\tlogoHeightPx: 20\n};\nfunction normalizeLogoUrl(value) {\n\tif (typeof value !== \"string\") return null;\n\ttry {\n\t\tconst url = new URL(value);\n\t\tif (url.protocol !== \"http:\" && url.protocol !== \"https:\") return null;\n\t\treturn url.toString();\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction normalizeCustomLogoEnabled(value, branding) {\n\tconst hasCustomLogo = Boolean(normalizeLogoUrl(branding.logoLightUrl) || normalizeLogoUrl(branding.logoDarkUrl));\n\tif (branding.customLogoExplicitlyDisabled === true) return false;\n\tif (typeof value === \"boolean\") return value || hasCustomLogo;\n\treturn hasCustomLogo;\n}\nfunction normalizeLogoHeightPx(value) {\n\tif (typeof value !== \"number\" || !Number.isFinite(value)) return DEFAULT_ORGANIZATION_SIDEBAR_BRANDING.logoHeightPx;\n\treturn Math.min(32, Math.max(14, Math.round(value)));\n}\nfunction normalizeOrganizationSidebarBranding(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_ORGANIZATION_SIDEBAR_BRANDING;\n\tconst branding = value;\n\treturn OrganizationSidebarBrandingSchema.parse({\n\t\tcustomLogoEnabled: normalizeCustomLogoEnabled(branding.customLogoEnabled, branding),\n\t\tcustomLogoExplicitlyDisabled: branding.customLogoExplicitlyDisabled === true,\n\t\tlogoLightUrl: normalizeLogoUrl(branding.logoLightUrl),\n\t\tlogoDarkUrl: normalizeLogoUrl(branding.logoDarkUrl),\n\t\tlogoHeightPx: normalizeLogoHeightPx(branding.logoHeightPx)\n\t});\n}\nfunction mergeOrganizationSidebarBranding(current, patch) {\n\treturn normalizeOrganizationSidebarBranding({\n\t\t...current,\n\t\t...patch\n\t});\n}\n//#endregion\n//#region src/schemas/project-artifacts.ts\nconst ProjectArtifactStatusSchema = z.enum([\"pending\", \"ready\"]);\nconst isoDateTime$1 = z.string().datetime();\nconst ProjectArtifactSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tstorageKey: z.string(),\n\tstatus: ProjectArtifactStatusSchema,\n\tcreatedAt: isoDateTime$1,\n\tupdatedAt: isoDateTime$1\n});\nconst CreateProjectArtifactResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\tuploadUrl: z.string().url(),\n\texpiresInSeconds: z.number().int().positive()\n});\nconst CompleteProjectArtifactResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\tproject: ProjectSchema\n});\nconst DownloadActiveProjectArtifactResponseSchema = z.object({\n\tartifactId: z.string(),\n\tdownloadUrl: z.string().url(),\n\texpiresInSeconds: z.number().int().positive()\n});\nconst ProjectDeploymentSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tversion: z.number().int().positive(),\n\tdeployedBy: z.string().nullable(),\n\tdeployedByEmail: z.string().optional(),\n\tdeployedByAvatarUrl: z.string().optional(),\n\tcreatedAt: isoDateTime$1,\n\tactive: z.boolean()\n});\nconst ListProjectDeploymentsResponseSchema = z.array(ProjectDeploymentSchema);\n//#endregion\n//#region src/schemas/platform-resources.ts\nconst PLATFORM_RESOURCE_UNSUPPORTED_TEXT = \"Not Supported\";\nconst PLATFORM_RESOURCE_UNSUPPORTED_TIMESTAMP = \"0000\";\nconst PLATFORM_RESOURCE_UNSUPPORTED_COUNT = 0;\nconst optionalCount = z.number().int().nonnegative().nullable().optional();\nconst optionalTimestamp = z.string().nullable().optional();\nconst AgentSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().min(1),\n\tsourcePath: z.string().min(1).optional(),\n\tmodel: z.string().optional(),\n\tcapabilities: z.object({\n\t\timages: z.boolean(),\n\t\tfiles: z.boolean()\n\t}).optional(),\n\tsystemPrompt: z.string().optional(),\n\ttoolCount: optionalCount,\n\tcredentialCount: optionalCount,\n\tapps: z.array(z.object({\n\t\tid: z.string(),\n\t\tlabel: z.string()\n\t})).optional(),\n\tlastRunAt: optionalTimestamp\n});\nconst WorkflowSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().min(1),\n\tsourcePath: z.string().min(1).optional(),\n\tlastRunAt: optionalTimestamp\n});\nconst SkillSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().min(1),\n\tsourcePath: z.string().min(1).optional()\n});\nconst AgentSummaryListResponseSchema = z.array(AgentSummarySchema);\nconst AgentSummaryDetailResponseSchema = AgentSummarySchema.nullable();\nconst WorkflowSummaryListResponseSchema = z.array(WorkflowSummarySchema);\nconst WorkflowSummaryDetailResponseSchema = WorkflowSummarySchema.nullable();\nconst SkillSummaryListResponseSchema = z.array(SkillSummarySchema);\nconst SkillSummaryDetailResponseSchema = SkillSummarySchema.nullable();\nconst RecentResourceKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"skill\"\n]);\nconst RecentResourceSourceSchema = z.enum([\"owned\", \"shared\"]);\nconst RecentResourceSchema = z.object({\n\tid: z.string().min(1),\n\tresourceKind: RecentResourceKindSchema,\n\tresourceId: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().optional(),\n\tprojectId: z.string().min(1),\n\tprojectName: z.string().min(1),\n\tsourcePath: z.string().min(1).optional(),\n\tsource: RecentResourceSourceSchema,\n\tlastOpenedAt: z.string().min(1),\n\tlastModifiedAt: z.string().min(1)\n});\nconst RecentResourceListResponseSchema = z.array(RecentResourceSchema);\n//#endregion\n//#region src/schemas/project-files.ts\nconst isoDateTime = z.string().datetime();\nconst sha256Hex = z.string().regex(/^[a-f0-9]{64}$/, \"Expected a lowercase hex sha256 digest\");\n/**\n* A single entry in a deploy's file tree, as served to the dashboard. Carries\n* no contents: `id` is a stable, path-derived handle used for selection and\n* `?file=` deep links; `hash` is the content address used to fetch the bytes\n* lazily and to cache them immutably in the browser.\n*/\nconst ProjectFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** Maps a runtime resource slug (agent/workflow/skill) to its source file path. */\nconst ProjectSourceResourceRefSchema = z.object({\n\tslug: z.string().min(1),\n\tpath: z.string().min(1)\n});\nconst ProjectSourceResourcesSchema = z.object({\n\tagents: z.array(ProjectSourceResourceRefSchema).default([]),\n\tworkflows: z.array(ProjectSourceResourceRefSchema).default([]),\n\tskills: z.array(ProjectSourceResourceRefSchema).default([])\n});\nconst emptyResources = () => ({\n\tagents: [],\n\tworkflows: [],\n\tskills: []\n});\n/** Response for the file-tree listing of a project's active deploy. */\nconst ListProjectFilesResponseSchema = z.object({\n\tartifactId: z.string().nullable(),\n\tfiles: z.array(ProjectFileSummarySchema),\n\tresources: ProjectSourceResourcesSchema.default(emptyResources())\n});\n/**\n* Raw source file as collected by the CLI at deploy time. `hash` is the content\n* address (sha256 of `contents`) used for dedup and immutable storage.\n*/\nconst ProjectSourceFileSchema = z.object({\n\tpath: z.string().min(1),\n\tcontents: z.string(),\n\thash: sha256Hex\n});\n/** A blob the CLI may need to upload, keyed by content hash. */\nconst SourceBlobRefSchema = z.object({\n\thash: sha256Hex,\n\tsize: z.number().int().nonnegative()\n});\n/** Request: ask the platform which blobs are missing and get presigned PUTs. */\nconst PresignProjectSourceRequestSchema = z.object({ blobs: z.array(SourceBlobRefSchema) });\nconst PresignedBlobUploadSchema = z.object({\n\thash: sha256Hex,\n\turl: z.string().url()\n});\n/** Response: presigned PUTs for the subset of blobs not already stored. */\nconst PresignProjectSourceResponseSchema = z.object({ uploads: z.array(PresignedBlobUploadSchema) });\n/** A file reference in a manifest upload: where the path's content lives. */\nconst ManifestFileRefSchema = z.object({\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** Request body the CLI sends to finalize a deploy's source manifest. */\nconst UploadProjectSourceManifestRequestSchema = z.object({ files: z.array(ManifestFileRefSchema) });\nconst UploadProjectSourceResponseSchema = z.object({\n\tok: z.literal(true),\n\tfileCount: z.number().int().nonnegative()\n});\n/** A file entry as persisted in the stored manifest (path-derived id added). */\nconst StoredManifestFileSchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** The immutable per-deploy manifest persisted to object storage. */\nconst StoredProjectSourceManifestSchema = z.object({\n\tfiles: z.array(StoredManifestFileSchema),\n\tgeneratedAt: isoDateTime\n});\n/** A single source file returned by the bulk active-source download endpoint. */\nconst DownloadActiveProjectSourceFileSchema = z.object({\n\tpath: z.string().min(1),\n\tcontents: z.string()\n});\n/** Response for downloading all source files from a project's active deploy. */\nconst DownloadActiveProjectSourceResponseSchema = z.object({\n\tartifactId: z.string(),\n\tfiles: z.array(DownloadActiveProjectSourceFileSchema)\n});\nconst LANGUAGE_BY_EXTENSION = {\n\tts: \"typescript\",\n\tmts: \"typescript\",\n\tcts: \"typescript\",\n\ttsx: \"tsx\",\n\tjs: \"javascript\",\n\tmjs: \"javascript\",\n\tcjs: \"javascript\",\n\tjsx: \"jsx\",\n\tjson: \"json\",\n\tmd: \"markdown\",\n\tmdx: \"markdown\",\n\tcss: \"css\",\n\thtml: \"html\",\n\tyml: \"yaml\",\n\tyaml: \"yaml\",\n\ttoml: \"toml\",\n\ttxt: \"text\",\n\tsh: \"shell\",\n\tenv: \"shell\"\n};\n/** Best-effort syntax-highlight hint derived from a file path's extension. */\nfunction projectFileLanguage(path) {\n\tconst base = path.split(\"/\").at(-1) ?? path;\n\treturn LANGUAGE_BY_EXTENSION[base.includes(\".\") ? (base.split(\".\").at(-1) ?? \"\").toLowerCase() : \"\"];\n}\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction projectFileId(path) {\n\treturn `file-${path.trim().replace(/^\\.?\\/+/, \"\").replace(/[^a-zA-Z0-9]+/g, \"-\").replace(/^-+|-+$/g, \"\").toLowerCase()}`;\n}\n//#endregion\n//#region src/schemas/project-pull-state.ts\n/** Relative path written after a local pull or MCP workspace hydration. */\nconst PROJECT_PULL_STATE_RELATIVE_PATH = \".keystroke/pull-state.json\";\nconst ProjectPullStateSchema = z.object({\n\tprojectId: z.string(),\n\tartifactId: z.string(),\n\tpulledAt: z.string().datetime()\n});\n//#endregion\n//#region src/schemas/agent-memory-files.ts\n/** A single memory file exposed to the dashboard (no contents in list responses). */\nconst AgentMemoryFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1)\n});\nconst ListAgentMemoryFilesResponseSchema = z.object({ files: z.array(AgentMemoryFileSummarySchema) });\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction agentMemoryFileId(path) {\n\treturn projectFileId(path);\n}\n//#endregion\n//#region src/schemas/agent-workspace-files.ts\n/** A single workspace file exposed to the dashboard (no contents in list responses). */\nconst AgentWorkspaceFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1)\n});\nconst ListAgentWorkspaceFilesResponseSchema = z.object({ files: z.array(AgentWorkspaceFileSummarySchema) });\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction agentWorkspaceFileId(path) {\n\treturn projectFileId(path);\n}\n//#endregion\n//#region src/schemas/workflow-canvas-envelope.ts\n/** Whether the overview is still being produced or finished. */\nconst WorkflowOverviewStatusSchema = z.enum([\"generating\", \"ready\"]);\n/** One phase of the guided-tour overview. */\nconst WorkflowPhaseSchema = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\tcopy: z.string(),\n\tnodeIds: z.array(z.string())\n});\n/** LLM-generated overview envelope. */\nconst WorkspaceWorkflowOverviewSchema = z.object({\n\tstatus: WorkflowOverviewStatusSchema,\n\tsummary: z.string(),\n\tphases: z.array(WorkflowPhaseSchema),\n\thash: z.string(),\n\tgeneratedAt: z.string().nullable(),\n\tmodel: z.string()\n});\n/** Subset of JSON-Schema field types the dashboard form renders inline. */\nconst WorkflowInputFieldTypeSchema = z.enum([\n\t\"string\",\n\t\"number\",\n\t\"boolean\",\n\t\"enum\",\n\t\"object\",\n\t\"array\"\n]);\nconst WorkflowInputFieldSchema = z.lazy(() => z.object({\n\tkey: z.string(),\n\tlabel: z.string(),\n\ttype: WorkflowInputFieldTypeSchema,\n\trequired: z.boolean(),\n\tdescription: z.string().optional(),\n\tplaceholder: z.string().optional(),\n\toptions: z.array(z.string()).optional(),\n\tdefault: z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean()\n\t]).optional(),\n\tchildren: z.array(WorkflowInputFieldSchema).optional(),\n\tformat: z.string().optional()\n}));\n/** Flat, render-ready view of a workflow's input schema. */\nconst WorkflowInputSchemaSchema = z.object({ fields: z.array(WorkflowInputFieldSchema) });\n/** A workflow's run-input contract plus its persisted values. */\nconst WorkflowRunInputsSchema = z.object({\n\tschema: WorkflowInputSchemaSchema,\n\tvalues: z.record(z.string(), z.unknown()).nullable()\n});\n/** Response of the manual workflow-run route (`POST /workflows/:id/run`). */\nconst WorkflowRunResponseSchema = z.object({ runId: z.string() });\n/** Annotation lifecycle: \"generating\" while the LLM pass streams in, then \"ready\". */\nconst WorkflowCanvasStatusSchema = z.enum([\"generating\", \"ready\"]);\n/** LLM-produced enrichment for a single skeleton node. */\nconst WorkflowCanvasAnnotationSchema = z.object({\n\tlabel: z.string().optional(),\n\tdescription: z.string().optional()\n});\n/**\n* One token of a configured input value (inspector form). Mirrors the producer's\n* raw token kinds, with display fields filled by the platform join: `reference`\n* gains a human `sourceLabel`; `variable` may gain a `resolvedValue` when the name\n* matches a known top-level constant.\n*/\nconst WorkflowNodeValueTokenSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"text\"),\n\t\ttext: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"reference\"),\n\t\tsourceNodeId: z.string().optional(),\n\t\tsourceLabel: z.string(),\n\t\tfield: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"variable\"),\n\t\ttext: z.string(),\n\t\t/** Concrete value when `text` resolves to a top-level literal constant. */\n\t\tresolvedValue: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"call\"),\n\t\tname: z.string()\n\t})\n]);\n/** The configured value of one input at this call site. */\nconst WorkflowNodeInputBindingSchema = z.object({\n\ttokens: z.array(WorkflowNodeValueTokenSchema),\n\tmultiline: z.boolean().optional()\n});\n/** An inspector input with optional call-site binding. */\nconst WorkflowCanvasNodeInputSchema = WorkflowInputFieldSchema.and(z.object({\n\tbinding: WorkflowNodeInputBindingSchema.optional(),\n\tadditional: z.boolean().optional()\n}));\n/** Authored, deterministic metadata for a single node. */\nconst WorkflowCanvasNodeMetaSchema = z.object({\n\tkind: z.enum([\n\t\t\"action\",\n\t\t\"agent\",\n\t\t\"workflow\",\n\t\t\"llm\",\n\t\t\"trigger\",\n\t\t\"boundary\"\n\t]),\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional(),\n\tappSlug: z.string().optional(),\n\tinputs: z.array(WorkflowCanvasNodeInputSchema),\n\toutputs: z.array(WorkflowInputFieldSchema),\n\trequiredApps: z.array(z.string()).optional(),\n\tmodel: z.string().optional(),\n\ttoolCount: z.number().int().nonnegative().optional()\n});\n/** The workflow canvas envelope. */\nconst WorkflowCanvasSchema = z.object({\n\tgraph: WorkflowCanvasGraphSchema,\n\tnodeMetadata: z.record(z.string(), WorkflowCanvasNodeMetaSchema),\n\tannotations: z.record(z.string(), WorkflowCanvasAnnotationSchema),\n\tstatus: WorkflowCanvasStatusSchema,\n\thash: z.string(),\n\tgeneratedAt: z.string().nullable(),\n\tmodel: z.string()\n});\n/** Per-node execution state for a single run. */\nconst WorkflowCanvasNodeRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"succeeded\",\n\t\"failed\",\n\t\"skipped\"\n]);\nconst WorkflowCanvasNodeRunStateSchema = z.object({\n\tstatus: WorkflowCanvasNodeRunStatusSchema,\n\titeration: z.object({\n\t\tindex: z.number().int().nonnegative(),\n\t\ttotal: z.number().int().nonnegative()\n\t}).optional()\n});\n/** Overall lifecycle of a run as the canvas animates it. */\nconst WorkflowCanvasRunStatusSchema = z.enum([\n\t\"running\",\n\t\"succeeded\",\n\t\"failed\",\n\t\"canceled\"\n]);\n/** A run projected onto the canvas. */\nconst WorkflowCanvasRunSchema = z.object({\n\trunId: z.string(),\n\tstatus: WorkflowCanvasRunStatusSchema,\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tnodeStates: z.record(z.string(), WorkflowCanvasNodeRunStateSchema)\n});\n/** Scope a credential instance lives in. */\nconst WorkflowCredentialScopeSchema = z.enum([\n\t\"organization\",\n\t\"project\",\n\t\"user\"\n]);\n/** The concrete credential instance a binding currently resolves to. */\nconst WorkflowResolvedCredentialSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tscope: WorkflowCredentialScopeSchema,\n\tappSlug: z.string().optional(),\n\tisDefault: z.boolean().optional(),\n\tprojectId: z.string().optional(),\n\tprojectName: z.string().optional()\n});\n/** Default model for the gated code-block annotation pass — cheap, same as trigger overviews. */\nconst DEFAULT_WORKFLOW_CANVAS_MODEL = \"deepseek/deepseek-v4-flash\";\n/** Map of canvas node id → LLM annotation. v1 only ever annotates `code-block` nodes. */\nconst WorkflowCanvasAnnotationsSchema = z.record(z.string(), WorkflowCanvasAnnotationSchema);\n/** One opaque code-block the annotation pass should label, keyed by its canvas node id. */\nconst WorkflowCanvasAnnotationCodeBlockSchema = z.object({\n\tnodeId: z.string(),\n\t/** The raw source snippet (the node's label) the LLM turns into human copy. */\n\tsource: z.string()\n});\n/** Inputs the worker feeds the LLM for the gated code-block annotation pass. */\nconst WorkflowCanvasAnnotationsInputSchema = z.object({\n\tworkflowName: z.string(),\n\tworkflowDescription: z.string().nullable(),\n\tcodeBlocks: z.array(WorkflowCanvasAnnotationCodeBlockSchema)\n});\n/** Queue payload the platform enqueues for the worker `workflow-canvas-annotations` job. */\nconst WorkflowCanvasAnnotationsJobPayloadSchema = z.object({\n\tworkflowId: z.string(),\n\tprojectId: z.string(),\n\thash: z.string(),\n\tmodel: z.string(),\n\tinput: WorkflowCanvasAnnotationsInputSchema\n});\n/** Default model for the workflow overview pass — cheap, same as the annotation/trigger passes. */\nconst DEFAULT_WORKFLOW_OVERVIEW_MODEL = \"deepseek/deepseek-v4-flash\";\n/** One node as the overview LLM sees it (derived from the canvas node metadata + graph). */\nconst WorkflowOverviewNodeSchema = z.object({\n\tnodeId: z.string(),\n\tlabel: z.string(),\n\tkind: z.string(),\n\tdescription: z.string().optional(),\n\t/** App/integration slug for steps imported from a `@keystrokehq/<app>` package. */\n\tappSlug: z.string().optional(),\n\t/** Authored input field keys (from the action/agent/workflow definition). */\n\tinputs: z.array(z.string()).optional(),\n\t/** Authored output field keys. */\n\toutputs: z.array(z.string()).optional(),\n\t/** Agent-only: the model the agent runs on. */\n\tmodel: z.string().optional(),\n\t/** Agent-only: number of tools available to the agent. */\n\ttoolCount: z.number().int().nonnegative().optional()\n});\n/** Inputs the worker feeds the LLM to produce the workflow overview (summary + phases). */\nconst WorkflowOverviewInputSchema = z.object({\n\tworkflowName: z.string(),\n\tworkflowDescription: z.string().nullable(),\n\t/** Display labels of the trigger sources upstream of the workflow (read-only context). */\n\ttriggers: z.array(z.string()),\n\tnodes: z.array(WorkflowOverviewNodeSchema),\n\t/** The workflow's TypeScript source (best-effort; null when the deploy has no source snapshot). */\n\tsource: z.string().nullable()\n});\n/** Queue payload the platform enqueues for the worker `workflow-overview` job. */\nconst WorkflowOverviewJobPayloadSchema = z.object({\n\tworkflowId: z.string(),\n\tprojectId: z.string(),\n\thash: z.string(),\n\tmodel: z.string(),\n\tinput: WorkflowOverviewInputSchema\n});\nconst WorkflowCanvasCredentialBindingBaseSchema = z.object({\n\tcredentialKey: z.string(),\n\tlabel: z.string(),\n\tappSlug: z.string().optional()\n});\n/** How one credential requirement on a step currently resolves. */\nconst WorkflowCanvasCredentialBindingSchema = z.union([\n\tWorkflowCanvasCredentialBindingBaseSchema.extend({\n\t\tpolicy: z.enum([\n\t\t\t\"project-default\",\n\t\t\t\"org-default\",\n\t\t\t\"assigned\"\n\t\t]),\n\t\tinstance: WorkflowResolvedCredentialSchema\n\t}),\n\tWorkflowCanvasCredentialBindingBaseSchema.extend({\n\t\tpolicy: z.literal(\"scope-pinned\"),\n\t\tpinnedScope: WorkflowCredentialScopeSchema,\n\t\tinstance: WorkflowResolvedCredentialSchema\n\t}),\n\tWorkflowCanvasCredentialBindingBaseSchema.extend({\n\t\tpolicy: z.literal(\"unresolved\"),\n\t\treason: z.enum([\"needs-selection\", \"missing\"]),\n\t\tpinnedScope: WorkflowCredentialScopeSchema.optional()\n\t})\n]);\n/** Live credential overlay: canvas node id → its step's credential bindings. */\nconst WorkflowCanvasCredentialBindingsSchema = z.record(z.string(), z.array(WorkflowCanvasCredentialBindingSchema));\n//#endregion\n//#region src/schemas/workflow-input-schema-from-json.ts\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction titleCaseKey(key) {\n\treturn key.replace(/([a-z0-9])([A-Z])/g, \"$1 $2\").split(/[-_/]+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(\" \");\n}\nfunction normalizeFieldType(schema) {\n\tconst rawType = schema.type;\n\tif (Array.isArray(rawType)) {\n\t\tconst primary = rawType.find((entry) => entry !== \"null\");\n\t\tif (typeof primary === \"string\") return normalizeFieldType({\n\t\t\t...schema,\n\t\t\ttype: primary\n\t\t});\n\t\treturn null;\n\t}\n\tif (typeof rawType !== \"string\") return null;\n\tif (Array.isArray(schema.enum) && schema.enum.every((entry) => typeof entry === \"string\")) return \"enum\";\n\tswitch (rawType) {\n\t\tcase \"string\":\n\t\tcase \"number\":\n\t\tcase \"integer\": return rawType === \"integer\" ? \"number\" : rawType;\n\t\tcase \"boolean\": return \"boolean\";\n\t\tcase \"object\": return \"object\";\n\t\tcase \"array\": return \"array\";\n\t\tdefault: return null;\n\t}\n}\nfunction normalizeField(key, schema, required) {\n\tconst type = normalizeFieldType(schema);\n\tif (!type) return null;\n\tconst field = {\n\t\tkey,\n\t\tlabel: typeof schema.title === \"string\" ? schema.title : titleCaseKey(key),\n\t\ttype,\n\t\trequired,\n\t\t...typeof schema.description === \"string\" ? { description: schema.description } : {},\n\t\t...typeof schema.format === \"string\" ? { format: schema.format } : {}\n\t};\n\tif (type === \"enum\" && Array.isArray(schema.enum)) field.options = schema.enum.filter((entry) => typeof entry === \"string\");\n\tif (schema.default !== void 0 && (typeof schema.default === \"string\" || typeof schema.default === \"number\" || typeof schema.default === \"boolean\")) field.default = schema.default;\n\tif (type === \"object\" && isObject(schema.properties)) {\n\t\tconst childRequired = Array.isArray(schema.required) ? schema.required.filter((entry) => typeof entry === \"string\") : [];\n\t\tfield.children = Object.entries(schema.properties).flatMap(([childKey, childSchema]) => {\n\t\t\tif (!isObject(childSchema)) return [];\n\t\t\tconst child = normalizeField(childKey, childSchema, childRequired.includes(childKey));\n\t\t\treturn child ? [child] : [];\n\t\t});\n\t}\n\tif (type === \"array\" && isObject(schema.items)) {\n\t\tconst item = normalizeField(\"item\", schema.items, false);\n\t\tif (item) field.children = [item];\n\t}\n\treturn field;\n}\n/** Normalize a workflow manifest JSON Schema into the dashboard run-input form shape. */\nfunction jsonSchemaToWorkflowInputSchema(requestSchema) {\n\tif (!isObject(requestSchema)) return { fields: [] };\n\tconst properties = isObject(requestSchema.properties) ? requestSchema.properties : {};\n\tconst required = Array.isArray(requestSchema.required) ? requestSchema.required.filter((entry) => typeof entry === \"string\") : [];\n\treturn { fields: Object.entries(properties).flatMap(([key, propertySchema]) => {\n\t\tif (!isObject(propertySchema)) return [];\n\t\tconst field = normalizeField(key, propertySchema, required.includes(key));\n\t\treturn field ? [field] : [];\n\t}) };\n}\nfunction isEmpty(value) {\n\treturn value === void 0 || value === null || value === \"\";\n}\nfunction validateFieldValue(field, value) {\n\tif (field.required && isEmpty(value)) return \"Required\";\n\tif (isEmpty(value)) return null;\n\tswitch (field.type) {\n\t\tcase \"number\":\n\t\t\tif (typeof value !== \"number\" && Number.isNaN(Number(value))) return \"Must be a number\";\n\t\t\treturn null;\n\t\tcase \"boolean\":\n\t\t\tif (typeof value !== \"boolean\") return \"Must be a boolean\";\n\t\t\treturn null;\n\t\tcase \"enum\":\n\t\t\tif (typeof value !== \"string\" || field.options && !field.options.includes(value)) return \"Invalid option\";\n\t\t\treturn null;\n\t\tdefault: return null;\n\t}\n}\n/** Validate a run-input payload against the normalized schema (authoritative on save). */\nfunction validateWorkflowRunInputValues(schema, values) {\n\tconst allowedKeys = new Set(schema.fields.map((field) => field.key));\n\tfor (const key of Object.keys(values)) if (!allowedKeys.has(key)) return {\n\t\tok: false,\n\t\terror: `Unknown field \"${key}\"`\n\t};\n\tfor (const field of schema.fields) {\n\t\tconst message = validateFieldValue(field, values[field.key]);\n\t\tif (message) return {\n\t\t\tok: false,\n\t\t\terror: `${field.key}: ${message}`\n\t\t};\n\t}\n\treturn { ok: true };\n}\n//#endregion\n//#region src/schemas/workflow-run-inputs.ts\nconst WorkflowRunInputsPutBodySchema = z.record(z.string(), z.unknown());\n//#endregion\n//#region src/mappers/organizations.ts\nfunction mapOrganization(row) {\n\treturn OrganizationSchema.parse({\n\t\tid: row.id,\n\t\tname: row.name,\n\t\tslug: row.slug,\n\t\tverified: row.verifiedAt != null,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\nfunction mapProject(row) {\n\treturn ProjectSchema.parse({\n\t\tid: row.id,\n\t\torganizationId: row.organizationId,\n\t\tname: row.name,\n\t\tslug: row.slug,\n\t\tdescription: row.description,\n\t\tstatus: row.status,\n\t\tbaseUrl: row.baseUrl,\n\t\truntimeId: row.runtimeId,\n\t\tlastError: row.lastError,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\nfunction mapUserOrganization(row) {\n\treturn UserOrganizationSchema.parse({\n\t\torganization: mapOrganization(row.organization),\n\t\trole: row.role\n\t});\n}\n//#endregion\n//#region src/mappers/members.ts\nfunction mapOrganizationMember(row) {\n\treturn OrganizationMemberSchema.parse({\n\t\tid: row.id,\n\t\tname: row.name,\n\t\temail: row.email,\n\t\trole: row.role,\n\t\tstatus: row.status,\n\t\t...row.image ? { avatarUrl: row.image } : {},\n\t\tjoinedAt: row.createdAt.toISOString(),\n\t\tlastActiveAt: null\n\t});\n}\nfunction mapOrganizationInvitation(row) {\n\treturn OrganizationInvitationSchema.parse({\n\t\tid: row.id,\n\t\torganizationName: row.organizationName,\n\t\torganizationSlug: row.organizationSlug,\n\t\trole: row.role,\n\t\t...row.invitedByName ? { invitedByName: row.invitedByName } : {},\n\t\t...row.invitedByEmail ? { invitedByEmail: row.invitedByEmail } : {}\n\t});\n}\n//#endregion\n//#region src/mappers/project-members.ts\nfunction mapProjectMember(row, options) {\n\treturn ProjectMemberSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tname: row.name,\n\t\temail: row.email,\n\t\trole: row.role,\n\t\tstatus: row.status,\n\t\timage: row.image,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tisCurrentUser: options?.isCurrentUser\n\t});\n}\nfunction mapProjectSettings(row) {\n\treturn {\n\t\tdescription: row.description ?? \"\",\n\t\tdefaultRole: row.defaultMemberRole,\n\t\tinvitePermission: row.invitePermission\n\t};\n}\n//#endregion\n//#region src/mappers/project-artifacts.ts\nfunction mapProjectArtifact(row) {\n\treturn ProjectArtifactSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tstorageKey: row.storageKey,\n\t\tstatus: row.status,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\n//#endregion\n//#region src/mappers/project-deployments.ts\nfunction mapProjectDeployment(row) {\n\treturn ProjectDeploymentSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tversion: row.version,\n\t\tdeployedBy: row.deployedByName,\n\t\t...row.deployedByEmail ? { deployedByEmail: row.deployedByEmail } : {},\n\t\t...row.deployedByAvatarUrl ? { deployedByAvatarUrl: row.deployedByAvatarUrl } : {},\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tactive: row.active\n\t});\n}\n//#endregion\nexport { ACTIVE_ORG_COOKIE, ACTIVE_ORG_HEADER, AGENT_CONTEXT_CLOSE, AGENT_CONTEXT_OPEN, AGENT_TOOL_INPUT, APP_SLUG_TAKEN_MESSAGE, AcceptOrganizationInvitationResponseSchema, ActiveOrganizationResponseSchema, AgentListResponseSchema, AgentMemoryFileSummarySchema, AgentSessionChatStateQuerySchema, AgentSessionChatStateResponseSchema, AgentSessionDetailQuerySchema, AgentSessionDetailResponseSchema, AgentSessionListQuerySchema, AgentSessionListResponseSchema, AgentSummaryDetailResponseSchema, AgentSummaryListResponseSchema, AgentSummarySchema, AgentTriggerOriginSchema, AgentTriggerStatusSchema, AgentTriggerSummaryListResponseSchema, AgentTriggerSummarySchema, AgentTriggerTypeSchema, AgentWorkspaceFileSummarySchema, ApiKeyCreatorSchema, ApiKeySummarySchema, AppAuthKindSchema, AppCatalogEntrySchema, AppCatalogMetadataSchema, AppCredentialConnectionKindSchema, AppCredentialFieldSchema, AppCredentialFieldsSchema, AppCredentialSchemeSchema, AppCredentialScopeSchema, AppCredentialSummarySchema, AppGatewaySchema, AppRecordSchema, AppSeedEntrySchema, AppSlugAvailabilityQuerySchema, AppSlugAvailabilityResponseSchema, AppSlugSchema, AppSourceSchema, AssignCredentialBodySchema, BindChannelBodySchema, CHAT_ATTACHMENT_ALLOWED_MEDIA_TYPES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENT_MAX_COUNT, CHAT_ATTACHMENT_TYPES, CREDENTIAL_ASSIGNMENT_WILDCARD, CREDENTIAL_AUTH_KINDS, CREDENTIAL_SCOPE_TYPES, CatalogActionDetailResponseSchema, CatalogActionDetailSchema, CatalogActionSummarySchema, CatalogActionsPageResponseSchema, CatalogActionsPageSchema, CatalogAppDetailResponseSchema, CatalogAppDetailSchema, CatalogAppSummarySchema, CatalogAppsPageResponseSchema, CatalogAppsPageSchema, ChannelAccountListResponseSchema, ChannelAccountMetadataSchema, ChannelAccountSchema, ChannelBindingKindSchema, ChannelBindingSchema, ChannelCapabilitiesSchema, ChannelCardSupportSchema, ChannelConnectionListResponseSchema, ChannelConnectionSchema, ChannelDirectoryEntrySchema, ChannelDirectoryListResponseSchema, ChannelListenModeSchema, ChannelPlatformKeySchema, ChannelPlatformSchema, ChannelReactionSupportSchema, ChannelStreamingSupportSchema, ChatAttachmentInputSchema, ClaimableOrganizationSlugSchema, CompleteProjectArtifactResponseSchema, ConnectAuthorizeUrlResponseSchema, ConnectProvidersResponseSchema, CreateApiKeyRequestSchema, CreateApiKeyResponseSchema, CreateCredentialInstanceBodySchema, CreateCredentialsRequestSchema, CreateCredentialsResponseSchema, CreateCustomAppRequestSchema, CreateCustomAppResponseSchema, CreateOrganizationRequestSchema, CreateOrganizationResponseSchema, CreateProjectArtifactResponseSchema, CreateProjectRequestSchema, CreateProjectResponseSchema, CredentialAssignmentListQuerySchema, CredentialAssignmentListResponseSchema, CredentialAssignmentRecordSchema, CredentialAssignmentTargetTypeSchema, CredentialAuthKindSchema, CredentialConsumerListQuerySchema, CredentialConsumerListResponseSchema, CredentialConsumerSummarySchema, CredentialInstanceListResponseSchema, CredentialInstanceRecordSchema, CredentialRequirementSummarySchema, CredentialScopeTypeSchema, CredentialTargetsFieldsSchema, CurrentOrganizationResponseSchema, CustomAppDetailSchema, DEFAULT_CLOUD_PLATFORM_ORIGIN, DEFAULT_LOGO_HEIGHT_PX, DEFAULT_MCP_API_KEY_PLACEMENT, DEFAULT_ORGANIZATION_SIDEBAR_BRANDING, DEFAULT_TRIGGER_OVERVIEW_MODEL, DEFAULT_USER_PREFERENCES, DEFAULT_WORKFLOW_CANVAS_MODEL, DEFAULT_WORKFLOW_OVERVIEW_MODEL, DISCOVERY_CONVENTIONS, DOCS_MCP_PATH, DOCS_QUERY_TOOL, DOCS_SEARCH_TOOL, DeclineOrganizationInvitationResponseSchema, DownloadActiveProjectArtifactResponseSchema, DownloadActiveProjectSourceFileSchema, DownloadActiveProjectSourceResponseSchema, ErrorResponseCodeSchema, ErrorResponseSchema, ExecuteKeystrokeToolErrorCodeSchema, ExecuteKeystrokeToolErrorResponseSchema, ExecuteKeystrokeToolRequestSchema, GatewayAttachmentListResponseSchema, GatewayAttachmentRecordSchema, GetCredentialResponseSchema, GetCustomAppResponseSchema, GraphqlDiscoverRequestSchema, GraphqlDiscoverResponseSchema, HealthResponseSchema, HistoryAgentSessionDetailSchema, HistoryRunCancelResponseSchema, HistoryRunDetailResponseSchema, HistoryRunDetailSchema, HistoryRunKindSchema, HistoryRunListQuerySchema, HistoryRunListResponseSchema, HistoryRunSchema, HistoryRunStatusSchema, HistoryTraceSchema, HistoryWorkflowRunDetailSchema, InvitableOrganizationMemberRoleSchema, InviteOrganizationMembersRequestSchema, InviteOrganizationMembersResponseSchema, InviteProjectMembersRequestSchema, InviteProjectMembersResponseSchema, KeystrokeCredentialSchema, LOCAL_PLATFORM_ORIGIN, ListAgentMemoryFilesResponseSchema, ListAgentWorkspaceFilesResponseSchema, ListApiKeysResponseSchema, ListAppsResponseSchema, ListCredentialsResponseSchema, ListMcpAppsResponseSchema, ListOrganizationInvitationsResponseSchema, ListOrganizationMembersResponseSchema, ListOrganizationsResponseSchema, ListProjectDeploymentsResponseSchema, ListProjectFilesResponseSchema, ListProjectMembersResponseSchema, ListProjectMetricsResponseSchema, ListProjectsResponseSchema, MAX_LOGO_HEIGHT_PX, MCP_TOOL_EXECUTE_FAILED_STATUS, MIN_LOGO_HEIGHT_PX, ManifestFileRefSchema, MarketingContactCompanySizeSchema, McpApiKeyCredentialValueSchema, McpApiKeyPlacementSchema, McpAppSchema, McpAuthProbeModeSchema, McpAuthProbeOAuthSchema, McpAuthProbeResultSchema, McpConnectionStatusSchema, McpCredentialAssignmentTargetSchema, McpDiscoverRequestSchema, McpDiscoverResponseSchema, NewChannelBindingInputSchema, OAuthPermissionModeSchema, OAuthScopeOptionSchema, ORGANIZATION_SLUG_TAKEN_MESSAGE, OpenApiDiscoverRequestSchema, OpenApiDiscoverResponseSchema, OrganizationInvitationSchema, OrganizationLogoVariantSchema, OrganizationMemberRoleSchema, OrganizationMemberSchema, OrganizationMemberStatusSchema, OrganizationSchema, OrganizationSidebarBrandingPatchSchema, OrganizationSidebarBrandingSchema, OrganizationSlugErrorCodeSchema, OrganizationSlugSchema, OrganizationUserRoleSchema, PLATFORM_RESOURCE_UNSUPPORTED_COUNT, PLATFORM_RESOURCE_UNSUPPORTED_TEXT, PLATFORM_RESOURCE_UNSUPPORTED_TIMESTAMP, PROJECT_PING_TIMEOUT_MS, PROJECT_PULL_STATE_RELATIVE_PATH, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, PROJECT_REACHABILITY_RETRY_MS, PROJECT_SLUG_TAKEN_MESSAGE, PlatformInfoResponseSchema, PollRunRequestSchema, PollRunResponseSchema, PresignChatAttachmentRequestSchema, PresignChatAttachmentResponseSchema, PresignOrgLogoRequestSchema, PresignOrgLogoResponseSchema, PresignProjectSourceRequestSchema, PresignProjectSourceResponseSchema, PresignUserAvatarRequestSchema, PresignUserAvatarResponseSchema, PresignedBlobUploadSchema, ProjectArtifactSchema, ProjectArtifactStatusSchema, ProjectDeploymentSchema, ProjectFileSummarySchema, ProjectInvitePermissionSchema, ProjectListMetricsSchema, ProjectMemberSchema, ProjectMemberStatusSchema, ProjectPullStateSchema, ProjectReachabilityResponseSchema, ProjectResponseSchema, ProjectSchema, ProjectSettingsResponseSchema, ProjectSettingsSchema, ProjectSlugAvailabilityQuerySchema, ProjectSlugAvailabilityReasonSchema, ProjectSlugAvailabilityResponseSchema, ProjectSlugSchema, ProjectSourceFileSchema, ProjectSourceResourceRefSchema, ProjectSourceResourcesSchema, ProjectStatusSchema, ProjectUserRoleSchema, PromptInputSchema, PromptResponseSchema, PublicModelsResponseSchema, QueuedAgentPromptResponseSchema, QueuedRunResponseSchema, RESERVED_ORGANIZATION_SLUGS, ROUTE_MANIFEST_REL_PATH, RecentResourceKindSchema, RecentResourceListResponseSchema, RecentResourceSchema, RecentResourceSourceSchema, RunSourceKindSchema, RunSourceSchema, SkillSummaryDetailResponseSchema, SkillSummaryListResponseSchema, SkillSummarySchema, SkipResponseSchema, SlugAvailabilityQuerySchema, SlugAvailabilityReasonSchema, SlugAvailabilityResponseSchema, SourceBlobRefSchema, StartKeystrokeConnectionInputSchema, StartKeystrokeConnectionResultSchema, StartMcpOAuthConnectionInputSchema, StartMcpOAuthConnectionResultSchema, StartOAuthConnectionInputSchema, StartOAuthConnectionResultSchema, StoredManifestFileSchema, StoredProjectSourceManifestSchema, StoredRouteManifestSchema, StoredRouteManifestSkillSchema, SubmitMarketingContactRequestSchema, SubmitMarketingContactResponseSchema, SubmitTeamRequestRequestSchema, SubmitTeamRequestResponseSchema, TeamRequestTypeSchema, TriggerAssignmentSchema, TriggerAttachmentStatusSchema, TriggerAttachmentUpdateRequestSchema, TriggerAttachmentUpdateResponseSchema, TriggerDetailResponseSchema, TriggerListItemSchema, TriggerListQuerySchema, TriggerListResponseSchema, TriggerOverviewInputSchema, TriggerOverviewJobPayloadSchema, TriggerRunDetailQuerySchema, TriggerRunDetailResponseSchema, TriggerRunListQuerySchema, TriggerRunListResponseSchema, TriggerRunOutcomeSchema, TriggerRunReasonSchema, TriggerStatusSchema, TriggerTypeSchema, UpdateChannelBindingBodySchema, UpdateCredentialInstanceBodySchema, UpdateCredentialRequestSchema, UpdateOrganizationMemberRequestSchema, UpdateOrganizationMemberResponseSchema, UpdateOrganizationRequestSchema, UpdateProjectMemberRequestSchema, UpdateProjectMemberResponseSchema, UpdateProjectRequestSchema, UpdateProjectSettingsRequestSchema, UploadProjectSourceManifestRequestSchema, UploadProjectSourceResponseSchema, UpsertGatewayAttachmentBodySchema, UpsertWorkflowSubscriptionBodySchema, UserAvatarPatchSchema, UserAvatarSchema, UserInterfaceThemeSchema, UserOrganizationSchema, UserPreferencesPatchSchema, UserPreferencesSchema, UserSidebarFooterChatRowVisibilitySchema, UserSidebarNavIconVisibilitySchema, UserSidebarPreferencesPatchSchema, UserSidebarPreferencesSchema, UserSurfaceContrastSchema, UserWorkspaceFavoriteKindSchema, UserWorkspaceFavoriteSchema, UserWorkspaceFontSizeSchema, UserWorkspaceLayoutModeSchema, ValidationErrorDetailSchema, WorkflowCanvasAnnotationCodeBlockSchema, WorkflowCanvasAnnotationSchema, WorkflowCanvasAnnotationsInputSchema, WorkflowCanvasAnnotationsJobPayloadSchema, WorkflowCanvasAnnotationsSchema, WorkflowCanvasCallKindSchema, WorkflowCanvasConstantValueSchema, WorkflowCanvasConstantsSchema, WorkflowCanvasCredentialBindingSchema, WorkflowCanvasCredentialBindingsSchema, WorkflowCanvasEdgeSchema, WorkflowCanvasGraphNodeSchema, WorkflowCanvasGraphSchema, WorkflowCanvasLlmOptionsSchema, WorkflowCanvasNodeDataSchema, WorkflowCanvasNodeInputSchema, WorkflowCanvasNodeMetaSchema, WorkflowCanvasNodeOutputSchema, WorkflowCanvasNodeRunStateSchema, WorkflowCanvasNodeRunStatusSchema, WorkflowCanvasNodeTypeSchema, WorkflowCanvasRawBindingSchema, WorkflowCanvasRawValueTokenSchema, WorkflowCanvasRunSchema, WorkflowCanvasRunStatusSchema, WorkflowCanvasSchema, WorkflowCanvasStatusSchema, WorkflowCredentialScopeSchema, WorkflowEventTypeSchema, WorkflowHookStatusSchema, WorkflowHookSummarySchema, WorkflowInputFieldSchema, WorkflowInputFieldTypeSchema, WorkflowInputSchemaSchema, WorkflowNodeInputBindingSchema, WorkflowNodeValueTokenSchema, WorkflowOverviewInputSchema, WorkflowOverviewJobPayloadSchema, WorkflowOverviewNodeSchema, WorkflowOverviewStatusSchema, WorkflowPhaseSchema, WorkflowResolvedCredentialSchema, WorkflowRunDetailQuerySchema, WorkflowRunDetailResponseSchema, WorkflowRunHooksResponseSchema, WorkflowRunInputsPutBodySchema, WorkflowRunInputsSchema, WorkflowRunListQuerySchema, WorkflowRunListResponseSchema, WorkflowRunResponseSchema, WorkflowSubscriptionListResponseSchema, WorkflowSubscriptionRecordSchema, WorkflowSummaryDetailResponseSchema, WorkflowSummaryListResponseSchema, WorkflowSummarySchema, WorkspaceTriggerDetailSchema, WorkspaceTriggerFileSchema, WorkspaceTriggerListResponseSchema, WorkspaceTriggerOverviewSchema, WorkspaceTriggerOverviewStatusSchema, WorkspaceTriggerRunListResponseSchema, WorkspaceTriggerRunOutcomeSchema, WorkspaceTriggerRunStatusSchema, WorkspaceTriggerRunSummarySchema, WorkspaceTriggerRunTargetSchema, WorkspaceTriggerSkipReasonSchema, WorkspaceTriggerSummarySchema, WorkspaceWorkflowOverviewSchema, agentMemoryFileId, agentWorkspaceFileId, buildConnectDeeplink, buildCredentialInstanceLabel, chatAttachmentExtension, chatAttachmentServePath, credential, credentialInputSchema, defineCredential, defineTool, deriveCredentialInstanceSlug, deriveCustomAppDisplay, detectProjectPackageManagerFromSnapshot, displayCredentialAppName, formatMcpToolErrorMessage, getAgentToolInputSchema, graphqlIntrospectionToAppTemplate, inferGraphqlAuthFromProbe, isAcceptableInstallExit, isAllowedChatAttachmentMediaType, isCredentialInput, isOfficialSlug, isRecord, isRedundantMcpJsonText, jsonSchemaToWorkflowInputSchema, listenPortFromPublicUrl, listenPortFromUrl, mapOrganization, mapOrganizationInvitation, mapOrganizationMember, mapProject, mapProjectArtifact, mapProjectDeployment, mapProjectMember, mapProjectSettings, mapUserOrganization, mcpApiKeyAuthInjection, mcpContentBlocksFromToolOutput, mcpContentBlocksToAiSdkParts, mcpCredentialAuthInjection, mcpEntityId, mcpProbeToAppTemplate, mediaDataUrl, mergeOrganizationSidebarBranding, mergeUserPreferences, modelSupportsMediaType, normalizeCredentialList, normalizeLogoUrl, normalizeOrganizationSidebarBranding, normalizeUserPreferences, openApiSpecToAppTemplate, organizationInvitationAcceptPath, organizationSlugErrorCodeFromMessage, originFromPublicUrl, parseAgentSessionDetailInclude, parseAppSlug, parseChatAttachmentServePath, parseCreateOrganizationRequest, parseErrorResponse, parseMcpEntityId, parseMcpToolResultDisplay, parseOrganizationSlug, parsePollRunRequest, parseProjectSlug, parsePromptInput, parseStoredRouteManifest, parseTriggerRunDetailInclude, parseWorkflowRunDetailInclude, previewOrganizationSlugFromName, projectFileId, projectFileLanguage, qualifyOrgSlug, requiredDisplayTextSchema, resolveConnectAppSlug, resolveDocsMcpUrl, resolveExplicitPublicPlatformOrigin, resolveExternalPlatformOrigin, resolveMcpPlatformUrl, resolvePlatformWebhookOrigin, resolvePublicPlatformApiOrigin, resolvePublicPlatformOrigin, resolveUniqueCredentialInstanceLabel, sanitizePromptContextContent, slugifyAppName, slugifyOrganizationName, slugifyProjectName, stripPromptContext, toCredentialRequirement, toolParameters, validateAppSlug, validateClaimableOrganizationSlug, validateCredentialValueAgainstFields, validateProjectSlug, validateWorkflowRunInputValues, validationErrorResponse, wrapPromptContext };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;AA4BA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,gBAAgB;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,0BAA0B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;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