@keystrokehq/cli 0.1.143 → 0.1.145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4793,17 +4793,410 @@ var ZodFirstPartyTypeKind;
4793
4793
  function number(params) {
4794
4794
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
4795
4795
  }
4796
- new Set([
4797
- "hello",
4798
- "greeting",
4799
- "greet"
4796
+ //#endregion
4797
+ //#region ../../packages/shared/dist/billing-BL8kgXs-.mjs
4798
+ const isoDateTime$7 = string().datetime();
4799
+ const subscriptionStatusSchema = _enum([
4800
+ "none",
4801
+ "trialing",
4802
+ "active",
4803
+ "past_due",
4804
+ "canceled"
4800
4805
  ]);
4806
+ const CreditPackSchema = object({
4807
+ id: string(),
4808
+ usd: number$1(),
4809
+ microCredits: number$1(),
4810
+ label: string()
4811
+ });
4812
+ const AutoTopupSummarySchema = object({
4813
+ enabled: boolean(),
4814
+ thresholdMicroCredits: number$1().nullable(),
4815
+ amountMicroCredits: number$1().nullable(),
4816
+ /** A saved payment method exists to charge off-session. */
4817
+ hasPaymentMethod: boolean(),
4818
+ /** A top-up invoice payment is in flight. */
4819
+ pending: boolean()
4820
+ });
4821
+ /**
4822
+ * The plan's resolved limits. Storage overage is billed from the wallet's
4823
+ * pushed-down `includedStorageGb`; concurrency, per-pass run timeouts, and
4824
+ * API/MCP rate limits are enforced from the wallet (timeouts/concurrency) or
4825
+ * plan preset (rate limits). Log retention is configured but not pruned yet.
4826
+ */
4827
+ const PlanLimitsSchema = object({
4828
+ includedStorageGb: number$1(),
4829
+ concurrencyLimit: number$1(),
4830
+ /** Max non-deleted projects; enforced on create only. */
4831
+ maxProjects: number$1(),
4832
+ agentTimeoutMs: number$1(),
4833
+ workflowTimeoutMs: number$1(),
4834
+ pollTimeoutMs: number$1(),
4835
+ /** Configured retention window; pruning not implemented yet. */
4836
+ logRetentionDays: number$1(),
4837
+ apiRateLimitCapacity: number$1(),
4838
+ apiRateLimitRefillPerSec: number$1(),
4839
+ mcpRateLimitCapacity: number$1(),
4840
+ mcpRateLimitRefillPerSec: number$1()
4841
+ });
4842
+ const BillingSummaryResponseSchema = object({
4843
+ planKey: string(),
4844
+ subscriptionStatus: subscriptionStatusSchema,
4845
+ /** Remaining plan-bucket balance this period (µc). */
4846
+ planCreditMicroCredits: number$1(),
4847
+ /** Remaining prepaid balance (µc). Never expires. */
4848
+ prepaidCreditMicroCredits: number$1(),
4849
+ /**
4850
+ * Resolved monthly plan allotment (µc) — override ?? preset. Powers the
4851
+ * credit-usage progress denominator (`used = allotment − remaining`).
4852
+ */
4853
+ monthlyCreditMicroCredits: number$1(),
4854
+ periodStart: isoDateTime$7.nullable(),
4855
+ periodEnd: isoDateTime$7.nullable(),
4856
+ autoTopup: AutoTopupSummarySchema,
4857
+ creditPacks: array(CreditPackSchema),
4858
+ limits: PlanLimitsSchema
4859
+ });
4860
+ const BillingUsageMeterSchema = object({
4861
+ /** Meter key (`llm`, `vm_second`, …); null groups uncategorized rows. */
4862
+ meterKey: string().nullable(),
4863
+ /** Charged this period, µc. */
4864
+ microCredits: number$1(),
4865
+ /** Tracked-but-not-charged usage (e.g. BYOK LLM calls), display USD. */
4866
+ unchargedUsd: number$1()
4867
+ });
4868
+ const BillingUsageResponseSchema = object({
4869
+ periodStart: isoDateTime$7.nullable(),
4870
+ periodEnd: isoDateTime$7.nullable(),
4871
+ totalMicroCredits: number$1(),
4872
+ byMeter: array(BillingUsageMeterSchema)
4873
+ });
4874
+ const billingLedgerEntryTypeSchema = _enum([
4875
+ "grant_plan",
4876
+ "grant_prepaid",
4877
+ "expire_plan",
4878
+ "adjustment"
4879
+ ]);
4880
+ const BillingActivityResponseSchema = object({
4881
+ entries: array(object({
4882
+ id: string(),
4883
+ entryType: billingLedgerEntryTypeSchema,
4884
+ label: string(),
4885
+ /** Signed: positive grants, negative expirations/adjustments. */
4886
+ microCredits: number$1(),
4887
+ bucket: _enum(["plan", "prepaid"]).nullable(),
4888
+ /** Stripe invoice behind the entry, when there is one — powers "View invoice". */
4889
+ stripeInvoiceId: string().nullable(),
4890
+ createdAt: isoDateTime$7
4891
+ })),
4892
+ /** Set only when the latest payment failure is newer than the latest successful payment. */
4893
+ lastPaymentFailureAt: isoDateTime$7.nullable()
4894
+ });
4895
+ const CreateSubscriptionCheckoutRequestSchema = object({
4896
+ /** Web-app path to land on after Checkout (must be a path, not a URL). */
4897
+ returnPath: string().startsWith("/").max(512).optional() });
4898
+ const CreateCreditsCheckoutRequestSchema = object({
4899
+ packId: string(),
4900
+ returnPath: string().startsWith("/").max(512).optional()
4901
+ });
4902
+ const CreateBillingPortalRequestSchema = object({ returnPath: string().startsWith("/").max(512).optional() });
4903
+ /** Checkout + Portal both respond with a Stripe-hosted URL to redirect to. */
4904
+ const BillingRedirectResponseSchema = object({ url: string().url() });
4905
+ /** Fresh Stripe-hosted links for one invoice, resolved on click (never stored). */
4906
+ const BillingInvoiceUrlResponseSchema = object({
4907
+ /** Hosted invoice page (view, download, receipt). */
4908
+ url: string().url(),
4909
+ /** Direct PDF download when Stripe provides one. */
4910
+ pdf: string().url().nullable()
4911
+ });
4912
+ const ConfirmCheckoutRequestSchema = object({
4913
+ /** Stripe Checkout Session id from the `session_id` success-URL param. */
4914
+ sessionId: string().min(1).max(255) });
4915
+ const ConfirmCheckoutResponseSchema = object({
4916
+ /**
4917
+ * `granted` — credits are in the wallet now; `processing` — payment not
4918
+ * complete yet, the webhook will finish it; `ignored` — not a confirmable
4919
+ * session for this org.
4920
+ */
4921
+ status: _enum([
4922
+ "granted",
4923
+ "processing",
4924
+ "ignored"
4925
+ ]),
4926
+ reason: string().optional()
4927
+ });
4928
+ const UpdateAutoTopupRequestSchema = object({
4929
+ enabled: boolean(),
4930
+ thresholdMicroCredits: number$1().int().positive().optional(),
4931
+ packId: string().optional()
4932
+ });
4933
+ const BillingUsageEventSourceSchema = _enum([
4934
+ "ai_gateway",
4935
+ "sandbox",
4936
+ "web_proxy",
4937
+ "storage",
4938
+ "dispatch",
4939
+ "poll"
4940
+ ]);
4941
+ const BillingUsageMeterKeySchema = _enum([
4942
+ "llm",
4943
+ "vm_second",
4944
+ "web_search",
4945
+ "web_fetch",
4946
+ "workflow_run",
4947
+ "agent_run",
4948
+ "poll_trigger",
4949
+ "tigris_storage"
4950
+ ]);
4951
+ const BillingUsageKeySourceSchema = _enum(["platform", "byok"]);
4952
+ const BillingUsageRunKindSchema = _enum(["agent", "workflow"]);
4953
+ object({ events: array(object({
4954
+ projectId: string().min(1).max(255).nullable().optional(),
4955
+ runId: string().min(1).max(255).nullable().optional(),
4956
+ runKind: BillingUsageRunKindSchema.nullable().optional(),
4957
+ source: BillingUsageEventSourceSchema,
4958
+ sourceEventId: string().min(1).max(512),
4959
+ meterKey: BillingUsageMeterKeySchema,
4960
+ quantity: number$1().finite().nonnegative(),
4961
+ unit: string().min(1).max(64),
4962
+ providerCostUsd: number$1().finite().nonnegative().nullable().optional(),
4963
+ keySource: BillingUsageKeySourceSchema.nullable().optional(),
4964
+ occurredAt: isoDateTime$7,
4965
+ metadata: record(string(), unknown()).nullable().optional()
4966
+ }).strict()).min(1).max(100) }).strict();
4967
+ object({
4968
+ accepted: number$1().int().nonnegative(),
4969
+ inserted: number$1().int().nonnegative(),
4970
+ duplicate: number$1().int().nonnegative(),
4971
+ settledLedgerId: string().nullable(),
4972
+ chargeMicroCredits: number$1().int().nonnegative()
4973
+ });
4974
+ //#endregion
4975
+ //#region ../../packages/shared/dist/credential-runtime-PPZh5Cbn.mjs
4801
4976
  const ACTIVE_ORG_HEADER = "x-keystroke-org-id";
4802
4977
  /**
4803
4978
  * Client surface that originated the request. The hosted web app and CLI set this
4804
4979
  * explicitly; missing values are treated as `api` (programmatic / unknown).
4805
4980
  */
4806
4981
  const CLIENT_CHANNEL_HEADER = "x-keystroke-client";
4982
+ function isValidIanaTimezone(value) {
4983
+ try {
4984
+ Intl.DateTimeFormat(void 0, { timeZone: value });
4985
+ return true;
4986
+ } catch {
4987
+ return false;
4988
+ }
4989
+ }
4990
+ const PublicModelsResponseSchema = object({ models: array(string()) });
4991
+ const CHAT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
4992
+ [
4993
+ {
4994
+ mediaType: "image/png",
4995
+ ext: "png"
4996
+ },
4997
+ {
4998
+ mediaType: "image/jpeg",
4999
+ ext: "jpg"
5000
+ },
5001
+ {
5002
+ mediaType: "image/webp",
5003
+ ext: "webp"
5004
+ },
5005
+ {
5006
+ mediaType: "image/gif",
5007
+ ext: "gif"
5008
+ },
5009
+ {
5010
+ mediaType: "application/pdf",
5011
+ ext: "pdf"
5012
+ }
5013
+ ].map((type) => type.mediaType);
5014
+ const ChatAttachmentInputSchema = object({
5015
+ storageKey: string().min(1),
5016
+ mediaType: string().min(1),
5017
+ filename: string().optional()
5018
+ });
5019
+ /** JSON-safe file ref for workflow inputs, step outputs, and `agent.prompt({ files })`. */
5020
+ const FilePartSchema = object({
5021
+ type: literal("file"),
5022
+ mediaType: string().min(1),
5023
+ url: string().min(1),
5024
+ filename: string().optional()
5025
+ });
5026
+ const PresignChatAttachmentRequestSchema = object({
5027
+ contentType: string().min(1),
5028
+ filename: string().min(1),
5029
+ size: number$1().int().positive().max(CHAT_ATTACHMENT_MAX_BYTES)
5030
+ });
5031
+ const PresignChatAttachmentResponseSchema = object({
5032
+ uploadUrl: string().url(),
5033
+ storageKey: string().min(1)
5034
+ });
5035
+ //#endregion
5036
+ //#region ../../packages/shared/dist/platform-origin.mjs
5037
+ const LOCAL_PLATFORM_ORIGIN = "http://localhost:3002";
5038
+ /** Default production platform origin when no env override is set. */
5039
+ const DEFAULT_CLOUD_PLATFORM_ORIGIN = "https://api.keystroke.ai";
5040
+ /** Reads `PUBLIC_PLATFORM_URL` when explicitly set. */
5041
+ function resolveExplicitPublicPlatformOrigin(env = process.env) {
5042
+ return env.PUBLIC_PLATFORM_URL?.replace(/\/$/, "") || void 0;
5043
+ }
5044
+ /** `PUBLIC_PLATFORM_URL` origin; falls back to {@link LOCAL_PLATFORM_ORIGIN} when unset. */
5045
+ function resolvePublicPlatformOrigin(env = process.env) {
5046
+ return resolveExplicitPublicPlatformOrigin(env) ?? "http://localhost:3002";
5047
+ }
5048
+ //#endregion
5049
+ //#region ../../packages/shared/dist/credential-spec-B-iwg8Oc.mjs
5050
+ /** OpenAPI 3.0 JSON Schema for manifests and route discovery. */
5051
+ const OPENAPI_JSON_SCHEMA = Symbol.for("keystroke.openapiJsonSchema");
5052
+ /** Read OpenAPI 3.0 JSON stored on a {@link schemaFromJson} result. */
5053
+ function getOpenApiJsonSchema(schema) {
5054
+ return schema[OPENAPI_JSON_SCHEMA];
5055
+ }
5056
+ /** How a credential instance is stored (`credential_instances.auth_kind`). */
5057
+ const CredentialAuthKindSchema = _enum([
5058
+ "api_key",
5059
+ "oauth_managed",
5060
+ "keystroke"
5061
+ ]);
5062
+ /**
5063
+ * Where a credential instance is stored (`credential_instances.scope_type`), and the only thing an
5064
+ * action/tool can pin via `.scope(...)`. There is no resolution chain: when no scope is pinned, the
5065
+ * resolver tries the project default, then the org default, then throws.
5066
+ */
5067
+ const CredentialScopeTypeSchema = _enum([
5068
+ "organization",
5069
+ "project",
5070
+ "user"
5071
+ ]);
5072
+ CredentialAuthKindSchema.options;
5073
+ CredentialScopeTypeSchema.options;
5074
+ /** Non-empty human-readable label or description (trimmed). */
5075
+ const requiredDisplayTextSchema = string().trim().min(1);
5076
+ const CredentialAssignmentTargetTypeSchema = _enum([
5077
+ "workflow",
5078
+ "agent",
5079
+ "poll"
5080
+ ]);
5081
+ const CredentialAssignmentRecordSchema = object({
5082
+ id: string(),
5083
+ targetType: CredentialAssignmentTargetTypeSchema,
5084
+ targetKey: string(),
5085
+ consumerId: string(),
5086
+ credentialSlug: string(),
5087
+ instanceId: string(),
5088
+ credential: string().optional(),
5089
+ scopeType: _enum([
5090
+ "organization",
5091
+ "project",
5092
+ "user"
5093
+ ]).optional(),
5094
+ createdAt: string(),
5095
+ updatedAt: string()
5096
+ });
5097
+ const CredentialAssignmentListResponseSchema = object({ assignments: array(CredentialAssignmentRecordSchema) });
5098
+ const AssignCredentialBodySchema = object({
5099
+ targetType: CredentialAssignmentTargetTypeSchema,
5100
+ targetKey: string().min(1),
5101
+ /** Omit or '*' for wildcard assignment. */
5102
+ consumerId: string().optional(),
5103
+ credential: string().min(1)
5104
+ });
5105
+ const CredentialAssignmentListQuerySchema = object({
5106
+ targetType: CredentialAssignmentTargetTypeSchema,
5107
+ targetKey: string().min(1)
5108
+ });
5109
+ const CredentialConsumerListQuerySchema = object({
5110
+ targetType: CredentialAssignmentTargetTypeSchema,
5111
+ targetKey: string().min(1)
5112
+ });
5113
+ const CredentialConsumerListResponseSchema = object({ consumers: array(object({
5114
+ consumerId: string(),
5115
+ label: string(),
5116
+ appSlugs: array(string())
5117
+ })) });
5118
+ const McpConnectionStatusSchema = _enum([
5119
+ "INITIATED",
5120
+ "ACTIVE",
5121
+ "EXPIRED",
5122
+ "FAILED",
5123
+ "INACTIVE",
5124
+ "REVOKED"
5125
+ ]);
5126
+ object({
5127
+ slug: string(),
5128
+ name: string(),
5129
+ connected: boolean(),
5130
+ connectionId: string().optional(),
5131
+ status: McpConnectionStatusSchema.optional()
5132
+ });
5133
+ object({
5134
+ connectionId: string(),
5135
+ entityId: string(),
5136
+ instanceId: string()
5137
+ });
5138
+ const McpCredentialAssignmentTargetSchema = object({
5139
+ type: CredentialAssignmentTargetTypeSchema,
5140
+ key: string().trim().min(1)
5141
+ });
5142
+ const ExecuteKeystrokeToolRequestSchema = object({
5143
+ app: string().trim().min(1),
5144
+ tool: string().trim().min(1),
5145
+ arguments: record(string(), unknown()).default({}),
5146
+ /** Pinned provider toolkit version, sourced from the app definition; forwarded to the provider. */
5147
+ version: string().trim().min(1),
5148
+ /** When set, platform MCP resolve checks credential assignments before scope defaults. */
5149
+ assignmentTarget: McpCredentialAssignmentTargetSchema.optional(),
5150
+ /** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */
5151
+ consumerId: string().trim().min(1).optional(),
5152
+ /** Explicit credential instance slug; overrides default resolution to pick that instance. */
5153
+ credentialSlug: string().trim().min(1).optional(),
5154
+ /** Project slug (CLI --project); the platform resolves it to a project and binds that scope. */
5155
+ projectSlug: string().trim().min(1).optional()
5156
+ });
5157
+ object({
5158
+ error: _enum([
5159
+ "not_found",
5160
+ "forbidden",
5161
+ "mcp_execute_failed"
5162
+ ]),
5163
+ message: string()
5164
+ });
5165
+ object({ accessToken: string() });
5166
+ function isCredentialInput(value) {
5167
+ if (typeof value !== "object" || value === null) return false;
5168
+ const candidate = value;
5169
+ return typeof candidate.key === "string" && CredentialAuthKindSchema.safeParse(candidate.kind).success && candidate.schema instanceof ZodType && (candidate.materializedSchema === void 0 || candidate.materializedSchema instanceof ZodType);
5170
+ }
5171
+ const credentialInputSchema = custom((value) => isCredentialInput(value), "must be a credential requirement");
5172
+ function normalizeCredentialList(list) {
5173
+ return list.map((item) => toCredentialRequirement(item));
5174
+ }
5175
+ function isCredentialRequirement(item) {
5176
+ return typeof item.scope !== "function";
5177
+ }
5178
+ function toCredentialRequirement(item) {
5179
+ if (isCredentialRequirement(item)) return {
5180
+ key: item.key,
5181
+ kind: item.kind,
5182
+ schema: item.schema,
5183
+ materializedSchema: item.materializedSchema ?? item.schema,
5184
+ ...item.scope !== void 0 ? { scope: item.scope } : {},
5185
+ ...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}
5186
+ };
5187
+ return {
5188
+ key: item.key,
5189
+ kind: item.kind,
5190
+ schema: item.schema,
5191
+ materializedSchema: item.materializedSchema,
5192
+ ...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}
5193
+ };
5194
+ }
5195
+ new Set([
5196
+ "hello",
5197
+ "greeting",
5198
+ "greet"
5199
+ ]);
4807
5200
  /** Auth, session, and account-entry URL segments. */
4808
5201
  const AUTH_ACCOUNT_SLUGS = [
4809
5202
  "2fa",
@@ -5416,14 +5809,14 @@ const OrganizationUserRoleSchema = _enum([
5416
5809
  "admin",
5417
5810
  "builder"
5418
5811
  ]);
5419
- const isoDateTime$7 = string().datetime();
5812
+ const isoDateTime$6 = string().datetime();
5420
5813
  const OrganizationSchema = object({
5421
5814
  id: string(),
5422
5815
  name: string(),
5423
5816
  slug: OrganizationSlugSchema,
5424
5817
  verified: boolean(),
5425
- createdAt: isoDateTime$7,
5426
- updatedAt: isoDateTime$7
5818
+ createdAt: isoDateTime$6,
5819
+ updatedAt: isoDateTime$6
5427
5820
  });
5428
5821
  const ProjectSchema = object({
5429
5822
  id: string(),
@@ -5435,8 +5828,8 @@ const ProjectSchema = object({
5435
5828
  baseUrl: string().nullable(),
5436
5829
  runtimeId: string().nullable(),
5437
5830
  lastError: string().nullable(),
5438
- createdAt: isoDateTime$7,
5439
- updatedAt: isoDateTime$7
5831
+ createdAt: isoDateTime$6,
5832
+ updatedAt: isoDateTime$6
5440
5833
  });
5441
5834
  const UserOrganizationSchema = object({
5442
5835
  organization: OrganizationSchema,
@@ -5460,7 +5853,7 @@ const ProjectListMetricsSchema = object({
5460
5853
  workflowCount: number$1(),
5461
5854
  skillCount: number$1(),
5462
5855
  credentialCount: number$1(),
5463
- lastDeploymentAt: isoDateTime$7.nullable()
5856
+ lastDeploymentAt: isoDateTime$6.nullable()
5464
5857
  });
5465
5858
  const ListProjectMetricsResponseSchema = record(string(), ProjectListMetricsSchema);
5466
5859
  const CreateProjectRequestSchema = object({
@@ -5531,59 +5924,41 @@ function listenPortFromUrl(url, fallback) {
5531
5924
  }
5532
5925
  if (parsed.protocol === "https:") return 443;
5533
5926
  if (parsed.protocol === "http:") return 80;
5534
- return fallback;
5535
- }
5536
- /** Shorthand: listen port from `PUBLIC_*_URL` or fallback. */
5537
- function listenPortFromPublicUrl(value, fallback) {
5538
- const trimmed = value?.trim();
5539
- if (!trimmed) return fallback;
5540
- try {
5541
- return listenPortFromUrl(trimmed, fallback);
5542
- } catch {
5543
- return fallback;
5544
- }
5545
- }
5546
- const LOCAL_PLATFORM_ORIGIN = "http://localhost:3002";
5547
- /** Default production platform origin when no env override is set. */
5548
- const DEFAULT_CLOUD_PLATFORM_ORIGIN = "https://api.keystroke.ai";
5549
- /** Reads `PUBLIC_PLATFORM_URL` when explicitly set. */
5550
- function resolveExplicitPublicPlatformOrigin(env = process.env) {
5551
- return env.PUBLIC_PLATFORM_URL?.replace(/\/$/, "") || void 0;
5552
- }
5553
- /** `PUBLIC_PLATFORM_URL` origin; falls back to {@link LOCAL_PLATFORM_ORIGIN} when unset. */
5554
- function resolvePublicPlatformOrigin(env = process.env) {
5555
- return resolveExplicitPublicPlatformOrigin(env) ?? "http://localhost:3002";
5927
+ return fallback;
5556
5928
  }
5557
- function isValidIanaTimezone(value) {
5929
+ /** Shorthand: listen port from `PUBLIC_*_URL` or fallback. */
5930
+ function listenPortFromPublicUrl(value, fallback) {
5931
+ const trimmed = value?.trim();
5932
+ if (!trimmed) return fallback;
5558
5933
  try {
5559
- Intl.DateTimeFormat(void 0, { timeZone: value });
5560
- return true;
5934
+ return listenPortFromUrl(trimmed, fallback);
5561
5935
  } catch {
5562
- return false;
5936
+ return fallback;
5563
5937
  }
5564
5938
  }
5565
- /** On-disk path under the project root (packed in deploy artifacts when present). */
5566
- const ROUTE_MANIFEST_REL_PATH = "dist/.keystroke/route-manifest.json";
5567
- /** How a credential instance is stored (`credential_instances.auth_kind`). */
5568
- const CredentialAuthKindSchema = _enum([
5569
- "api_key",
5570
- "oauth_managed",
5571
- "keystroke"
5572
- ]);
5573
5939
  /**
5574
- * Where a credential instance is stored (`credential_instances.scope_type`), and the only thing an
5575
- * action/tool can pin via `.scope(...)`. There is no resolution chain: when no scope is pinned, the
5576
- * resolver tries the project default, then the org default, then throws.
5940
+ * Target for Zod JSON Schema round-trips of persisted Keystroke schemas
5941
+ * (workflow inputs, webhook payloads, hook resume schemas, agent output schemas).
5942
+ *
5943
+ * OpenAPI 3.0 emits `#/definitions/...` refs without a `$schema` field. Zod's
5944
+ * `fromJSONSchema` defaults to draft-2020-12 (`#/$defs/...`) when `$schema` is
5945
+ * absent, so callers must pass this same target on the way back.
5946
+ *
5947
+ * LLM tool parameters use draft-2020-12 via {@link toolParameters} instead —
5948
+ * those are not round-tripped through `jsonSchemaToZod`.
5577
5949
  */
5578
- const CredentialScopeTypeSchema = _enum([
5579
- "organization",
5580
- "project",
5581
- "user"
5582
- ]);
5583
- CredentialAuthKindSchema.options;
5584
- CredentialScopeTypeSchema.options;
5585
- /** Non-empty human-readable label or description (trimmed). */
5586
- const requiredDisplayTextSchema = string().trim().min(1);
5950
+ const STORED_JSON_SCHEMA_TARGET = "openapi-3.0";
5951
+ /** Serialize a Zod schema for persistence / later {@link jsonSchemaToZod}. */
5952
+ function zodToStoredJsonSchema(schema, options = {}) {
5953
+ return toJSONSchema(schema, {
5954
+ target: STORED_JSON_SCHEMA_TARGET,
5955
+ ...options.allowAdditionalProperties ? { override(ctx) {
5956
+ if (ctx.jsonSchema.type === "object") ctx.jsonSchema.additionalProperties = true;
5957
+ } } : {}
5958
+ });
5959
+ }
5960
+ /** On-disk path under the project root (packed in deploy artifacts when present). */
5961
+ const ROUTE_MANIFEST_REL_PATH = "dist/.keystroke/route-manifest.json";
5587
5962
  /**
5588
5963
  * Structural workflow-canvas graph contract.
5589
5964
  *
@@ -5849,255 +6224,79 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
5849
6224
  kind: literal("workflow"),
5850
6225
  slug: string(),
5851
6226
  name: requiredDisplayTextSchema,
5852
- description: requiredDisplayTextSchema,
5853
- subscribable: boolean(),
5854
- moduleFile: string(),
5855
- requestSchema: record(string(), unknown()),
5856
- responseSchema: record(string(), unknown()).optional(),
5857
- /** Deterministic AST control-flow skeleton (deploy-time producer). */
5858
- flowGraph: WorkflowCanvasGraphSchema.optional(),
5859
- /** sha256 of the workflow source the `flowGraph` was produced from (staleness). */
5860
- flowGraphSourceHash: string().optional(),
5861
- /** sha256 of `JSON.stringify(flowGraph)` — baked at build so canvas polls skip re-hashing. */
5862
- flowGraphHash: string().optional()
5863
- }),
5864
- object({
5865
- kind: literal("trigger-webhook"),
5866
- endpoint: string(),
5867
- attachmentIds: array(string()),
5868
- moduleFile: string(),
5869
- /** sha256 of the trigger source file, baked at build time for overview change-detection. */
5870
- sourceHash: string().optional(),
5871
- attachmentSchemas: attachmentSchemasSchema,
5872
- attachmentMeta: attachmentMetaSchema.optional()
5873
- }),
5874
- object({
5875
- kind: literal("trigger-poll"),
5876
- attachmentId: string(),
5877
- attachmentIds: array(string()),
5878
- moduleFile: string(),
5879
- sourceHash: string().optional(),
5880
- schedule: string(),
5881
- /** IANA timezone for schedule wall-clock fields. When omitted, UTC. */
5882
- timezone: string().optional(),
5883
- name: requiredDisplayTextSchema,
5884
- description: requiredDisplayTextSchema
5885
- }),
5886
- object({
5887
- kind: literal("trigger-poll-group"),
5888
- pollId: string(),
5889
- attachmentIds: array(string()),
5890
- moduleFile: string(),
5891
- schedule: string(),
5892
- /** IANA timezone for schedule wall-clock fields. When omitted, UTC. */
5893
- timezone: string().optional()
5894
- }),
5895
- object({
5896
- kind: literal("cron-schedule"),
5897
- attachmentId: string(),
5898
- attachmentIds: array(string()),
5899
- moduleFile: string(),
5900
- sourceHash: string().optional(),
5901
- schedule: string(),
5902
- /** IANA timezone for schedule wall-clock fields. When omitted, UTC. */
5903
- timezone: string().optional(),
5904
- /** Static cron payload from `defineCronSource({ payload })` — omitted when the source has none. */
5905
- payload: unknown().optional(),
5906
- name: requiredDisplayTextSchema,
5907
- description: requiredDisplayTextSchema
5908
- })
5909
- ]);
5910
- const storedRouteManifestV2Schema = object({
5911
- version: literal(2),
5912
- entries: array(storedRouteManifestEntryV2Schema),
5913
- skills: array(StoredRouteManifestSkillSchema).default([]),
5914
- integrations: array(string()).optional()
5915
- });
5916
- /**
5917
- * Parse a stored route manifest. Only the strict v2 schema is supported: the
5918
- * builder always emits v2 and every deploy regenerates the manifest, so there is
5919
- * no legacy upcasting. (The pre-v2 `normalizeEntryToV2` path was removed once the
5920
- * data tables were truncated and all artifacts redeployed.)
5921
- */
5922
- function parseStoredRouteManifest(value) {
5923
- return storedRouteManifestV2Schema.parse(value);
5924
- }
5925
- const isoDateTime$6 = string().datetime();
5926
- const subscriptionStatusSchema = _enum([
5927
- "none",
5928
- "trialing",
5929
- "active",
5930
- "past_due",
5931
- "canceled"
5932
- ]);
5933
- const CreditPackSchema = object({
5934
- id: string(),
5935
- usd: number$1(),
5936
- microCredits: number$1(),
5937
- label: string()
5938
- });
5939
- const AutoTopupSummarySchema = object({
5940
- enabled: boolean(),
5941
- thresholdMicroCredits: number$1().nullable(),
5942
- amountMicroCredits: number$1().nullable(),
5943
- /** A saved payment method exists to charge off-session. */
5944
- hasPaymentMethod: boolean(),
5945
- /** A top-up invoice payment is in flight. */
5946
- pending: boolean()
5947
- });
5948
- /**
5949
- * The plan's resolved limits. Storage overage is billed from the wallet's
5950
- * pushed-down `includedStorageGb`; concurrency, per-pass run timeouts, and
5951
- * API/MCP rate limits are enforced from the wallet (timeouts/concurrency) or
5952
- * plan preset (rate limits). Log retention is configured but not pruned yet.
5953
- */
5954
- const PlanLimitsSchema = object({
5955
- includedStorageGb: number$1(),
5956
- concurrencyLimit: number$1(),
5957
- /** Max non-deleted projects; enforced on create only. */
5958
- maxProjects: number$1(),
5959
- agentTimeoutMs: number$1(),
5960
- workflowTimeoutMs: number$1(),
5961
- pollTimeoutMs: number$1(),
5962
- /** Configured retention window; pruning not implemented yet. */
5963
- logRetentionDays: number$1(),
5964
- apiRateLimitCapacity: number$1(),
5965
- apiRateLimitRefillPerSec: number$1(),
5966
- mcpRateLimitCapacity: number$1(),
5967
- mcpRateLimitRefillPerSec: number$1()
5968
- });
5969
- const BillingSummaryResponseSchema = object({
5970
- planKey: string(),
5971
- subscriptionStatus: subscriptionStatusSchema,
5972
- /** Remaining plan-bucket balance this period (µc). */
5973
- planCreditMicroCredits: number$1(),
5974
- /** Remaining prepaid balance (µc). Never expires. */
5975
- prepaidCreditMicroCredits: number$1(),
5976
- /**
5977
- * Resolved monthly plan allotment (µc) — override ?? preset. Powers the
5978
- * credit-usage progress denominator (`used = allotment − remaining`).
5979
- */
5980
- monthlyCreditMicroCredits: number$1(),
5981
- periodStart: isoDateTime$6.nullable(),
5982
- periodEnd: isoDateTime$6.nullable(),
5983
- autoTopup: AutoTopupSummarySchema,
5984
- creditPacks: array(CreditPackSchema),
5985
- limits: PlanLimitsSchema
5986
- });
5987
- const BillingUsageMeterSchema = object({
5988
- /** Meter key (`llm`, `vm_second`, …); null groups uncategorized rows. */
5989
- meterKey: string().nullable(),
5990
- /** Charged this period, µc. */
5991
- microCredits: number$1(),
5992
- /** Tracked-but-not-charged usage (e.g. BYOK LLM calls), display USD. */
5993
- unchargedUsd: number$1()
5994
- });
5995
- const BillingUsageResponseSchema = object({
5996
- periodStart: isoDateTime$6.nullable(),
5997
- periodEnd: isoDateTime$6.nullable(),
5998
- totalMicroCredits: number$1(),
5999
- byMeter: array(BillingUsageMeterSchema)
6000
- });
6001
- const billingLedgerEntryTypeSchema = _enum([
6002
- "grant_plan",
6003
- "grant_prepaid",
6004
- "expire_plan",
6005
- "adjustment"
6006
- ]);
6007
- const BillingActivityResponseSchema = object({
6008
- entries: array(object({
6009
- id: string(),
6010
- entryType: billingLedgerEntryTypeSchema,
6011
- label: string(),
6012
- /** Signed: positive grants, negative expirations/adjustments. */
6013
- microCredits: number$1(),
6014
- bucket: _enum(["plan", "prepaid"]).nullable(),
6015
- /** Stripe invoice behind the entry, when there is one — powers "View invoice". */
6016
- stripeInvoiceId: string().nullable(),
6017
- createdAt: isoDateTime$6
6018
- })),
6019
- /** Set only when the latest payment failure is newer than the latest successful payment. */
6020
- lastPaymentFailureAt: isoDateTime$6.nullable()
6021
- });
6022
- const CreateSubscriptionCheckoutRequestSchema = object({
6023
- /** Web-app path to land on after Checkout (must be a path, not a URL). */
6024
- returnPath: string().startsWith("/").max(512).optional() });
6025
- const CreateCreditsCheckoutRequestSchema = object({
6026
- packId: string(),
6027
- returnPath: string().startsWith("/").max(512).optional()
6028
- });
6029
- const CreateBillingPortalRequestSchema = object({ returnPath: string().startsWith("/").max(512).optional() });
6030
- /** Checkout + Portal both respond with a Stripe-hosted URL to redirect to. */
6031
- const BillingRedirectResponseSchema = object({ url: string().url() });
6032
- /** Fresh Stripe-hosted links for one invoice, resolved on click (never stored). */
6033
- const BillingInvoiceUrlResponseSchema = object({
6034
- /** Hosted invoice page (view, download, receipt). */
6035
- url: string().url(),
6036
- /** Direct PDF download when Stripe provides one. */
6037
- pdf: string().url().nullable()
6038
- });
6039
- const ConfirmCheckoutRequestSchema = object({
6040
- /** Stripe Checkout Session id from the `session_id` success-URL param. */
6041
- sessionId: string().min(1).max(255) });
6042
- const ConfirmCheckoutResponseSchema = object({
6043
- /**
6044
- * `granted` — credits are in the wallet now; `processing` — payment not
6045
- * complete yet, the webhook will finish it; `ignored` — not a confirmable
6046
- * session for this org.
6047
- */
6048
- status: _enum([
6049
- "granted",
6050
- "processing",
6051
- "ignored"
6052
- ]),
6053
- reason: string().optional()
6054
- });
6055
- const UpdateAutoTopupRequestSchema = object({
6056
- enabled: boolean(),
6057
- thresholdMicroCredits: number$1().int().positive().optional(),
6058
- packId: string().optional()
6059
- });
6060
- const BillingUsageEventSourceSchema = _enum([
6061
- "ai_gateway",
6062
- "sandbox",
6063
- "web_proxy",
6064
- "storage",
6065
- "dispatch",
6066
- "poll"
6067
- ]);
6068
- const BillingUsageMeterKeySchema = _enum([
6069
- "llm",
6070
- "vm_second",
6071
- "web_search",
6072
- "web_fetch",
6073
- "workflow_run",
6074
- "agent_run",
6075
- "poll_trigger",
6076
- "tigris_storage"
6227
+ description: requiredDisplayTextSchema,
6228
+ subscribable: boolean(),
6229
+ moduleFile: string(),
6230
+ requestSchema: record(string(), unknown()),
6231
+ responseSchema: record(string(), unknown()).optional(),
6232
+ /** Deterministic AST control-flow skeleton (deploy-time producer). */
6233
+ flowGraph: WorkflowCanvasGraphSchema.optional(),
6234
+ /** sha256 of the workflow source the `flowGraph` was produced from (staleness). */
6235
+ flowGraphSourceHash: string().optional(),
6236
+ /** sha256 of `JSON.stringify(flowGraph)` — baked at build so canvas polls skip re-hashing. */
6237
+ flowGraphHash: string().optional()
6238
+ }),
6239
+ object({
6240
+ kind: literal("trigger-webhook"),
6241
+ endpoint: string(),
6242
+ attachmentIds: array(string()),
6243
+ moduleFile: string(),
6244
+ /** sha256 of the trigger source file, baked at build time for overview change-detection. */
6245
+ sourceHash: string().optional(),
6246
+ attachmentSchemas: attachmentSchemasSchema,
6247
+ attachmentMeta: attachmentMetaSchema.optional()
6248
+ }),
6249
+ object({
6250
+ kind: literal("trigger-poll"),
6251
+ attachmentId: string(),
6252
+ attachmentIds: array(string()),
6253
+ moduleFile: string(),
6254
+ sourceHash: string().optional(),
6255
+ schedule: string(),
6256
+ /** IANA timezone for schedule wall-clock fields. When omitted, UTC. */
6257
+ timezone: string().optional(),
6258
+ name: requiredDisplayTextSchema,
6259
+ description: requiredDisplayTextSchema
6260
+ }),
6261
+ object({
6262
+ kind: literal("trigger-poll-group"),
6263
+ pollId: string(),
6264
+ attachmentIds: array(string()),
6265
+ moduleFile: string(),
6266
+ schedule: string(),
6267
+ /** IANA timezone for schedule wall-clock fields. When omitted, UTC. */
6268
+ timezone: string().optional()
6269
+ }),
6270
+ object({
6271
+ kind: literal("cron-schedule"),
6272
+ attachmentId: string(),
6273
+ attachmentIds: array(string()),
6274
+ moduleFile: string(),
6275
+ sourceHash: string().optional(),
6276
+ schedule: string(),
6277
+ /** IANA timezone for schedule wall-clock fields. When omitted, UTC. */
6278
+ timezone: string().optional(),
6279
+ /** Static cron payload from `defineCronSource({ payload })` — omitted when the source has none. */
6280
+ payload: unknown().optional(),
6281
+ name: requiredDisplayTextSchema,
6282
+ description: requiredDisplayTextSchema
6283
+ })
6077
6284
  ]);
6078
- const BillingUsageKeySourceSchema = _enum(["platform", "byok"]);
6079
- const BillingUsageRunKindSchema = _enum(["agent", "workflow"]);
6080
- object({ events: array(object({
6081
- projectId: string().min(1).max(255).nullable().optional(),
6082
- runId: string().min(1).max(255).nullable().optional(),
6083
- runKind: BillingUsageRunKindSchema.nullable().optional(),
6084
- source: BillingUsageEventSourceSchema,
6085
- sourceEventId: string().min(1).max(512),
6086
- meterKey: BillingUsageMeterKeySchema,
6087
- quantity: number$1().finite().nonnegative(),
6088
- unit: string().min(1).max(64),
6089
- providerCostUsd: number$1().finite().nonnegative().nullable().optional(),
6090
- keySource: BillingUsageKeySourceSchema.nullable().optional(),
6091
- occurredAt: isoDateTime$6,
6092
- metadata: record(string(), unknown()).nullable().optional()
6093
- }).strict()).min(1).max(100) }).strict();
6094
- object({
6095
- accepted: number$1().int().nonnegative(),
6096
- inserted: number$1().int().nonnegative(),
6097
- duplicate: number$1().int().nonnegative(),
6098
- settledLedgerId: string().nullable(),
6099
- chargeMicroCredits: number$1().int().nonnegative()
6285
+ const storedRouteManifestV2Schema = object({
6286
+ version: literal(2),
6287
+ entries: array(storedRouteManifestEntryV2Schema),
6288
+ skills: array(StoredRouteManifestSkillSchema).default([]),
6289
+ integrations: array(string()).optional()
6100
6290
  });
6291
+ /**
6292
+ * Parse a stored route manifest. Only the strict v2 schema is supported: the
6293
+ * builder always emits v2 and every deploy regenerates the manifest, so there is
6294
+ * no legacy upcasting. (The pre-v2 `normalizeEntryToV2` path was removed once the
6295
+ * data tables were truncated and all artifacts redeployed.)
6296
+ */
6297
+ function parseStoredRouteManifest(value) {
6298
+ return storedRouteManifestV2Schema.parse(value);
6299
+ }
6101
6300
  /** Messaging platforms that support agent gateway bindings. */
6102
6301
  const ChannelPlatformKeySchema = _enum(["slack"]);
6103
6302
  const ChannelReactionSupportSchema = _enum([
@@ -6824,95 +7023,6 @@ const ListCredentialsPageResponseSchema = object({
6824
7023
  const GetCredentialResponseSchema = AppCredentialSummarySchema;
6825
7024
  const CreateCredentialsResponseSchema = array(AppCredentialSummarySchema);
6826
7025
  const DuplicateCredentialsResponseSchema = CreateCredentialsResponseSchema;
6827
- const CredentialAssignmentTargetTypeSchema = _enum([
6828
- "workflow",
6829
- "agent",
6830
- "poll"
6831
- ]);
6832
- const CredentialAssignmentRecordSchema = object({
6833
- id: string(),
6834
- targetType: CredentialAssignmentTargetTypeSchema,
6835
- targetKey: string(),
6836
- consumerId: string(),
6837
- credentialSlug: string(),
6838
- instanceId: string(),
6839
- credential: string().optional(),
6840
- scopeType: _enum([
6841
- "organization",
6842
- "project",
6843
- "user"
6844
- ]).optional(),
6845
- createdAt: string(),
6846
- updatedAt: string()
6847
- });
6848
- const CredentialAssignmentListResponseSchema = object({ assignments: array(CredentialAssignmentRecordSchema) });
6849
- const AssignCredentialBodySchema = object({
6850
- targetType: CredentialAssignmentTargetTypeSchema,
6851
- targetKey: string().min(1),
6852
- /** Omit or '*' for wildcard assignment. */
6853
- consumerId: string().optional(),
6854
- credential: string().min(1)
6855
- });
6856
- const CredentialAssignmentListQuerySchema = object({
6857
- targetType: CredentialAssignmentTargetTypeSchema,
6858
- targetKey: string().min(1)
6859
- });
6860
- const CredentialConsumerListQuerySchema = object({
6861
- targetType: CredentialAssignmentTargetTypeSchema,
6862
- targetKey: string().min(1)
6863
- });
6864
- const CredentialConsumerListResponseSchema = object({ consumers: array(object({
6865
- consumerId: string(),
6866
- label: string(),
6867
- appSlugs: array(string())
6868
- })) });
6869
- const McpConnectionStatusSchema = _enum([
6870
- "INITIATED",
6871
- "ACTIVE",
6872
- "EXPIRED",
6873
- "FAILED",
6874
- "INACTIVE",
6875
- "REVOKED"
6876
- ]);
6877
- object({
6878
- slug: string(),
6879
- name: string(),
6880
- connected: boolean(),
6881
- connectionId: string().optional(),
6882
- status: McpConnectionStatusSchema.optional()
6883
- });
6884
- object({
6885
- connectionId: string(),
6886
- entityId: string(),
6887
- instanceId: string()
6888
- });
6889
- const McpCredentialAssignmentTargetSchema = object({
6890
- type: CredentialAssignmentTargetTypeSchema,
6891
- key: string().trim().min(1)
6892
- });
6893
- const ExecuteKeystrokeToolRequestSchema = object({
6894
- app: string().trim().min(1),
6895
- tool: string().trim().min(1),
6896
- arguments: record(string(), unknown()).default({}),
6897
- /** Pinned provider toolkit version, sourced from the app definition; forwarded to the provider. */
6898
- version: string().trim().min(1),
6899
- /** When set, platform MCP resolve checks credential assignments before scope defaults. */
6900
- assignmentTarget: McpCredentialAssignmentTargetSchema.optional(),
6901
- /** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */
6902
- consumerId: string().trim().min(1).optional(),
6903
- /** Explicit credential instance slug; overrides default resolution to pick that instance. */
6904
- credentialSlug: string().trim().min(1).optional(),
6905
- /** Project slug (CLI --project); the platform resolves it to a project and binds that scope. */
6906
- projectSlug: string().trim().min(1).optional()
6907
- });
6908
- object({
6909
- error: _enum([
6910
- "not_found",
6911
- "forbidden",
6912
- "mcp_execute_failed"
6913
- ]),
6914
- message: string()
6915
- });
6916
7026
  const SubmitTeamRequestRequestSchema = object({
6917
7027
  type: _enum([
6918
7028
  "org-deletion",
@@ -6993,37 +7103,6 @@ const SubmitMarketingContactRequestSchema = object({
6993
7103
  /** Honeypot — must stay empty; bots that fill it are ignored silently. */
6994
7104
  companyWebsite: string().optional()
6995
7105
  });
6996
- const PublicModelsResponseSchema = object({ models: array(string()) });
6997
- object({ accessToken: string() });
6998
- function isCredentialInput(value) {
6999
- if (typeof value !== "object" || value === null) return false;
7000
- const candidate = value;
7001
- return typeof candidate.key === "string" && CredentialAuthKindSchema.safeParse(candidate.kind).success && candidate.schema instanceof ZodType && (candidate.materializedSchema === void 0 || candidate.materializedSchema instanceof ZodType);
7002
- }
7003
- const credentialInputSchema = custom((value) => isCredentialInput(value), "must be a credential requirement");
7004
- function normalizeCredentialList(list) {
7005
- return list.map((item) => toCredentialRequirement(item));
7006
- }
7007
- function isCredentialRequirement(item) {
7008
- return typeof item.scope !== "function";
7009
- }
7010
- function toCredentialRequirement(item) {
7011
- if (isCredentialRequirement(item)) return {
7012
- key: item.key,
7013
- kind: item.kind,
7014
- schema: item.schema,
7015
- materializedSchema: item.materializedSchema ?? item.schema,
7016
- ...item.scope !== void 0 ? { scope: item.scope } : {},
7017
- ...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}
7018
- };
7019
- return {
7020
- key: item.key,
7021
- kind: item.kind,
7022
- schema: item.schema,
7023
- materializedSchema: item.materializedSchema,
7024
- ...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}
7025
- };
7026
- }
7027
7106
  const CredentialAccessUnavailableReasonSchema = _enum(["request_access", "reconnect_required"]);
7028
7107
  object({
7029
7108
  error: literal("credential_access_unavailable"),
@@ -7098,50 +7177,6 @@ function parseErrorResponse(body) {
7098
7177
  message: messageOnly.data.message
7099
7178
  };
7100
7179
  }
7101
- const CHAT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
7102
- [
7103
- {
7104
- mediaType: "image/png",
7105
- ext: "png"
7106
- },
7107
- {
7108
- mediaType: "image/jpeg",
7109
- ext: "jpg"
7110
- },
7111
- {
7112
- mediaType: "image/webp",
7113
- ext: "webp"
7114
- },
7115
- {
7116
- mediaType: "image/gif",
7117
- ext: "gif"
7118
- },
7119
- {
7120
- mediaType: "application/pdf",
7121
- ext: "pdf"
7122
- }
7123
- ].map((type) => type.mediaType);
7124
- const ChatAttachmentInputSchema = object({
7125
- storageKey: string().min(1),
7126
- mediaType: string().min(1),
7127
- filename: string().optional()
7128
- });
7129
- /** JSON-safe file ref for workflow inputs, step outputs, and `agent.prompt({ files })`. */
7130
- const FilePartSchema = object({
7131
- type: literal("file"),
7132
- mediaType: string().min(1),
7133
- url: string().min(1),
7134
- filename: string().optional()
7135
- });
7136
- const PresignChatAttachmentRequestSchema = object({
7137
- contentType: string().min(1),
7138
- filename: string().min(1),
7139
- size: number$1().int().positive().max(CHAT_ATTACHMENT_MAX_BYTES)
7140
- });
7141
- const PresignChatAttachmentResponseSchema = object({
7142
- uploadUrl: string().url(),
7143
- storageKey: string().min(1)
7144
- });
7145
7180
  const CredentialRunContextSchema = object({
7146
7181
  orgId: string().min(1).optional(),
7147
7182
  projectId: string().min(1).optional(),
@@ -8803,6 +8838,6 @@ const ListAgentWorkspaceFilesResponseSchema = object({ files: array(object({
8803
8838
  })) });
8804
8839
  const WorkflowRunInputsPutBodySchema = record(string(), unknown());
8805
8840
  //#endregion
8806
- export { CredentialInstanceListResponseSchema as $, UpdateOrganizationMemberRequestSchema as $n, _function as $r, OrganizationSidebarBrandingSchema as $t, ConnectAuthorizeUrlResponseSchema as A, SkillSummaryListResponseSchema as An, WorkspaceTriggerRunListResponseSchema as Ar, ListAgentMemoryFilesResponseSchema as At, CreateCustomAppRequestSchema as B, SubmitTeamRequestRequestSchema as Bn, originFromPublicUrl as Br, ListOrganizationMembersPageResponseSchema as Bt, ChannelAccountListResponseSchema as C, PublishedFormListResponseSchema as Cn, WorkflowRunResponseSchema as Cr, HistoryRunListQuerySchema as Ct, CompleteProjectArtifactResponseSchema as D, ROUTE_MANIFEST_REL_PATH as Dn, WorkspaceTriggerFileSchema as Dr, InviteProjectMembersRequestSchema as Dt, ChannelDirectoryListResponseSchema as E, QueuedRunResponseSchema as En, WorkspaceTriggerDetailSchema as Er, InviteOrganizationMembersResponseSchema as Et, CreateBillingPortalRequestSchema as F, StartMcpOAuthConnectionResultSchema as Fn, detectProjectPackageManagerFromSnapshot as Fr, ListCredentialsPageQuerySchema as Ft, CreateProjectRequestSchema as G, TriggerListResponseSchema as Gn, resolveConnectAppSlug as Gr, ListProjectMetricsResponseSchema as Gt, CreateOrganizationRequestSchema as H, TriggerDetailResponseSchema as Hn, parseErrorResponse as Hr, ListProjectDeploymentsResponseSchema as Ht, CreateCredentialInstanceBodySchema as I, StartOAuthConnectionInputSchema as In, isAcceptableInstallExit as Ir, ListCredentialsPageResponseSchema as It, CredentialAssignmentListQuerySchema as J, UpdateAutoTopupRequestSchema as Jn, slugifyAppName as Jr, ManagedServiceCredentialSchema as Jt, CreateProjectResponseSchema as K, TriggerRunDetailResponseSchema as Kn, resolveDocsMcpUrl as Kr, ListProjectsResponseSchema as Kt, CreateCredentialsRequestSchema as L, StartOAuthConnectionResultSchema as Ln, listenPortFromPublicUrl as Lr, ListManagedServiceCredentialsResponseSchema as Lt, ConnectProvidersResponseSchema as M, StartKeystrokeConnectionInputSchema as Mn, buildConnectDeeplink as Mr, ListApiKeysResponseSchema as Mt, CreateApiKeyRequestSchema as N, StartKeystrokeConnectionResultSchema as Nn, credentialInputSchema as Nr, ListAppsResponseSchema as Nt, ConfirmCheckoutRequestSchema as O, RecentResourceListResponseSchema as On, WorkspaceTriggerListResponseSchema as Or, InviteProjectMembersResponseSchema as Ot, CreateApiKeyResponseSchema as P, StartMcpOAuthConnectionInputSchema as Pn, deriveCustomAppDisplay as Pr, ListChannelPlatformsResponseSchema as Pt, CredentialConsumerListResponseSchema as Q, UpdateManagedServiceCredentialRequestSchema as Qn, _enum as Qr, OrganizationSidebarBrandingPatchSchema as Qt, CreateCredentialsResponseSchema as R, SubmitAgentFeedbackRequestSchema as Rn, normalizeCredentialList as Rr, ListOrganizationInvitationsResponseSchema as Rt, CatalogAppsPageResponseSchema as S, NEVER as Si, PublicModelsResponseSchema as Sn, WorkflowRunListResponseSchema as Sr, HistoryRunDetailResponseSchema as St, ChannelConnectionSchema as T, QueuedAgentPromptResponseSchema as Tn, WorkflowSummaryListResponseSchema as Tr, InviteOrganizationMembersRequestSchema as Tt, CreateOrganizationResponseSchema as U, TriggerInvokeInputsSchema as Un, parseStoredRouteManifest as Ur, ListProjectFilesResponseSchema as Ut, CreateCustomAppResponseSchema as V, TemplateFilesResponseSchema as Vn, parseAppSlug as Vr, ListOrganizationsResponseSchema as Vt, CreateProjectArtifactResponseSchema as W, TriggerInvokeResponseSchema as Wn, requiredDisplayTextSchema as Wr, ListProjectMembersResponseSchema as Wt, CredentialAssignmentRecordSchema as X, UpdateCredentialInstanceBodySchema as Xn, ZodIssueCode as Xr, McpDiscoverResponseSchema as Xt, CredentialAssignmentListResponseSchema as Y, UpdateChannelBindingBodySchema as Yn, number as Yr, ManagedServiceKindSchema as Yt, CredentialConsumerListQuerySchema as Z, UpdateCredentialRequestSchema as Zn, ZodType as Zr, OpenApiDiscoverResponseSchema as Zt, BindChannelBodySchema as _, unknown as _i, PromptInputSchema as _n, WorkflowFormUpsertBodySchema as _r, GetCustomAppResponseSchema as _t, AgentSessionListResponseSchema as a, discriminatedUnion as ai, PresignCustomAppLogoResponseSchema as an, UpdateProjectSettingsRequestSchema as ar, DownloadActiveProjectArtifactResponseSchema as at, CatalogActionsPageResponseSchema as b, toJSONSchema as bi, PublicFormSubmitBodySchema as bn, WorkflowRunInputsPutBodySchema as br, HealthResponseSchema as bt, AgentTriggerSummaryListResponseSchema as c, literal as ci, PresignProjectSourceRequestSchema as cn, UpsertGatewayAttachmentBodySchema as cr, DuplicateCredentialsResponseSchema as ct, AutoTopupSummarySchema as d, object as di, PresignUserAvatarResponseSchema as dn, UserPreferencesPatchSchema as dr, FinalizeCustomAppLogoRequestSchema as dt, _null as ei, PROJECT_PULL_STATE_RELATIVE_PATH as en, UpdateOrganizationMemberResponseSchema as er, CredentialInstanceRecordSchema as et, BillingActivityResponseSchema as f, optional as fi, ProjectPullStateSchema as fn, UserPreferencesSchema as fr, FinalizeCustomAppLogoResponseSchema as ft, BillingUsageResponseSchema as g, union as gi, ProjectSlugAvailabilityResponseSchema as gn, WorkflowFormResponseSchema as gr, GetCredentialResponseSchema as gt, BillingSummaryResponseSchema as h, string as hi, ProjectSettingsResponseSchema as hn, WorkflowCanvasSchema as hr, GetAppCatalogEntryResponseSchema as ht, AgentSessionDetailResponseSchema as i, custom as ii, PresignCustomAppLogoRequestSchema as in, UpdateProjectRequestSchema as ir, DeclineOrganizationInvitationResponseSchema as it, ConnectManagedServiceCredentialRequestSchema as j, SlugAvailabilityResponseSchema as jn, WorkspaceWorkflowOverviewSchema as jr, ListAgentWorkspaceFilesResponseSchema as jt, ConfirmCheckoutResponseSchema as k, SkillSummaryDetailResponseSchema as kn, WorkspaceTriggerOverviewSchema as kr, LOCAL_PLATFORM_ORIGIN as kt, AppSlugAvailabilityResponseSchema as l, looseObject as li, PresignProjectSourceResponseSchema as ln, UserAvatarPatchSchema as lr, ExecuteKeystrokeToolRequestSchema as lt, BillingRedirectResponseSchema as m, record as mi, ProjectResponseSchema as mn, WorkflowCanvasRunSchema as mr, GatewayAttachmentRecordSchema as mt, AcceptOrganizationInvitationResponseSchema as n, array as ni, PresignChatAttachmentRequestSchema as nn, UpdateProjectMemberRequestSchema as nr, DOCS_QUERY_TOOL as nt, AgentSummaryDetailResponseSchema as o, intersection as oi, PresignOrgLogoRequestSchema as on, UploadProjectSourceManifestRequestSchema as or, DownloadActiveProjectSourceResponseSchema as ot, BillingInvoiceUrlResponseSchema as p, preprocess as pi, ProjectReachabilityResponseSchema as pn, WorkflowCanvasCredentialBindingsSchema as pr, FormFieldConfigSchema as pt, CreateSubscriptionCheckoutRequestSchema as q, TriggerRunListResponseSchema as qn, resolvePublicPlatformOrigin as qr, ListTemplatesResponseSchema as qt, ActiveOrganizationResponseSchema as r, boolean as ri, PresignChatAttachmentResponseSchema as rn, UpdateProjectMemberResponseSchema as rr, DOCS_SEARCH_TOOL as rt, AgentSummaryListResponseSchema as s, lazy as si, PresignOrgLogoResponseSchema as sn, UploadProjectSourceResponseSchema as sr, DuplicateCredentialRequestSchema as st, ACTIVE_ORG_HEADER as t, any as ti, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as tn, UpdateOrganizationRequestSchema as tr, DEFAULT_CLOUD_PLATFORM_ORIGIN as tt, AssignCredentialBodySchema as u, number$1 as ui, PresignUserAvatarRequestSchema as un, UserAvatarSchema as ur, FilePartSchema as ut, CLIENT_CHANNEL_HEADER as v, url as vi, PromptResponseSchema as vn, WorkflowRunDetailResponseSchema as vr, GetTemplateResponseSchema as vt, ChannelConnectionListResponseSchema as w, PublishedFormSchema as wn, WorkflowSummaryDetailResponseSchema as wr, HistoryRunListResponseSchema as wt, CatalogAppDetailResponseSchema as x, safeParse$1 as xi, PublicFormSubmitResponseSchema as xn, WorkflowRunInputsSchema as xr, HistoryRunCancelResponseSchema as xt, CatalogActionDetailResponseSchema as y, datetime as yi, PublicFormMetadataSchema as yn, WorkflowRunHooksResponseSchema as yr, GraphqlDiscoverResponseSchema as yt, CreateCreditsCheckoutRequestSchema as z, SubmitMarketingContactRequestSchema as zn, normalizeDocsSearchPaths as zr, ListOrganizationMembersPageQuerySchema as zt };
8841
+ export { HistoryRunCancelResponseSchema as $, WorkflowSummaryListResponseSchema as $n, ZodIssueCode as $r, QueuedAgentPromptResponseSchema as $t, CreateOrganizationResponseSchema as A, UpdateProjectMemberRequestSchema as An, requiredDisplayTextSchema as Ar, OrganizationSidebarBrandingSchema as At, DownloadActiveProjectSourceResponseSchema as B, UserPreferencesSchema as Bn, AutoTopupSummarySchema as Br, PresignUserAvatarResponseSchema as Bt, CreateApiKeyResponseSchema as C, safeParse$1 as Ci, UpdateChannelBindingBodySchema as Cn, CredentialAssignmentRecordSchema as Cr, ListProjectsResponseSchema as Ct, CreateCustomAppRequestSchema as D, UpdateOrganizationMemberRequestSchema as Dn, credentialInputSchema as Dr, McpDiscoverResponseSchema as Dt, CreateCredentialsResponseSchema as E, UpdateManagedServiceCredentialRequestSchema as En, ExecuteKeystrokeToolRequestSchema as Er, ManagedServiceKindSchema as Et, CredentialInstanceRecordSchema as F, UploadProjectSourceResponseSchema as Fn, CLIENT_CHANNEL_HEADER as Fr, PresignOrgLogoRequestSchema as Ft, FormFieldConfigSchema as G, WorkflowFormUpsertBodySchema as Gn, BillingUsageResponseSchema as Gr, ProjectSlugAvailabilityResponseSchema as Gt, DuplicateCredentialsResponseSchema as H, WorkflowCanvasRunSchema as Hn, BillingInvoiceUrlResponseSchema as Hr, ProjectReachabilityResponseSchema as Ht, DOCS_QUERY_TOOL as I, UpsertGatewayAttachmentBodySchema as In, FilePartSchema as Ir, PresignOrgLogoResponseSchema as It, GetCredentialResponseSchema as J, WorkflowRunInputsPutBodySchema as Jn, CreateBillingPortalRequestSchema as Jr, PublicFormMetadataSchema as Jt, GatewayAttachmentRecordSchema as K, WorkflowRunDetailResponseSchema as Kn, ConfirmCheckoutRequestSchema as Kr, PromptInputSchema as Kt, DOCS_SEARCH_TOOL as L, UserAvatarPatchSchema as Ln, PresignChatAttachmentRequestSchema as Lr, PresignProjectSourceRequestSchema as Lt, CreateProjectRequestSchema as M, UpdateProjectRequestSchema as Mn, LOCAL_PLATFORM_ORIGIN as Mr, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as Mt, CreateProjectResponseSchema as N, UpdateProjectSettingsRequestSchema as Nn, resolvePublicPlatformOrigin as Nr, PresignCustomAppLogoRequestSchema as Nt, CreateCustomAppResponseSchema as O, UpdateOrganizationMemberResponseSchema as On, getOpenApiJsonSchema as Or, OpenApiDiscoverResponseSchema as Ot, CredentialInstanceListResponseSchema as P, UploadProjectSourceManifestRequestSchema as Pn, ACTIVE_ORG_HEADER as Pr, PresignCustomAppLogoResponseSchema as Pt, HealthResponseSchema as Q, WorkflowSummaryDetailResponseSchema as Qn, number as Qr, PublishedFormSchema as Qt, DeclineOrganizationInvitationResponseSchema as R, UserAvatarSchema as Rn, PresignChatAttachmentResponseSchema as Rr, PresignProjectSourceResponseSchema as Rt, CreateApiKeyRequestSchema as S, datetime as Si, TriggerRunListResponseSchema as Sn, CredentialAssignmentListResponseSchema as Sr, ListProjectMetricsResponseSchema as St, CreateCredentialsRequestSchema as T, UpdateCredentialRequestSchema as Tn, CredentialConsumerListResponseSchema as Tr, ManagedServiceCredentialSchema as Tt, FinalizeCustomAppLogoRequestSchema as U, WorkflowCanvasSchema as Un, BillingRedirectResponseSchema as Ur, ProjectResponseSchema as Ut, DuplicateCredentialRequestSchema as V, WorkflowCanvasCredentialBindingsSchema as Vn, BillingActivityResponseSchema as Vr, ProjectPullStateSchema as Vt, FinalizeCustomAppLogoResponseSchema as W, WorkflowFormResponseSchema as Wn, BillingSummaryResponseSchema as Wr, ProjectSettingsResponseSchema as Wt, GetTemplateResponseSchema as X, WorkflowRunListResponseSchema as Xn, CreateSubscriptionCheckoutRequestSchema as Xr, PublicFormSubmitResponseSchema as Xt, GetCustomAppResponseSchema as Y, WorkflowRunInputsSchema as Yn, CreateCreditsCheckoutRequestSchema as Yr, PublicFormSubmitBodySchema as Yt, GraphqlDiscoverResponseSchema as Z, WorkflowRunResponseSchema as Zn, UpdateAutoTopupRequestSchema as Zr, PublishedFormListResponseSchema as Zt, ChannelDirectoryListResponseSchema as _, record as _i, TriggerDetailResponseSchema as _n, resolveDocsMcpUrl as _r, ListOrganizationMembersPageResponseSchema as _t, AgentSummaryDetailResponseSchema as a, array as ai, SkillSummaryListResponseSchema as an, WorkspaceWorkflowOverviewSchema as ar, InviteProjectMembersRequestSchema as at, ConnectManagedServiceCredentialRequestSchema as b, unknown as bi, TriggerListResponseSchema as bn, AssignCredentialBodySchema as br, ListProjectFilesResponseSchema as bt, AppSlugAvailabilityResponseSchema as c, discriminatedUnion as ci, StartKeystrokeConnectionResultSchema as cn, detectProjectPackageManagerFromSnapshot as cr, ListAgentWorkspaceFilesResponseSchema as ct, CatalogActionsPageResponseSchema as d, literal as di, StartOAuthConnectionInputSchema as dn, normalizeDocsSearchPaths as dr, ListChannelPlatformsResponseSchema as dt, ZodType as ei, QueuedRunResponseSchema as en, WorkspaceTriggerDetailSchema as er, HistoryRunDetailResponseSchema as et, CatalogAppDetailResponseSchema as f, looseObject as fi, StartOAuthConnectionResultSchema as fn, originFromPublicUrl as fr, ListCredentialsPageQuerySchema as ft, ChannelConnectionSchema as g, preprocess as gi, TemplateFilesResponseSchema as gn, resolveConnectAppSlug as gr, ListOrganizationMembersPageQuerySchema as gt, ChannelConnectionListResponseSchema as h, optional as hi, SubmitTeamRequestRequestSchema as hn, parseStoredRouteManifest as hr, ListOrganizationInvitationsResponseSchema as ht, AgentSessionListResponseSchema as i, any as ii, SkillSummaryDetailResponseSchema as in, WorkspaceTriggerRunListResponseSchema as ir, InviteOrganizationMembersResponseSchema as it, CreateProjectArtifactResponseSchema as j, UpdateProjectMemberResponseSchema as jn, DEFAULT_CLOUD_PLATFORM_ORIGIN as jr, PROJECT_PULL_STATE_RELATIVE_PATH as jt, CreateOrganizationRequestSchema as k, UpdateOrganizationRequestSchema as kn, normalizeCredentialList as kr, OrganizationSidebarBrandingPatchSchema as kt, BindChannelBodySchema as l, intersection as li, StartMcpOAuthConnectionInputSchema as ln, isAcceptableInstallExit as lr, ListApiKeysResponseSchema as lt, ChannelAccountListResponseSchema as m, object as mi, SubmitMarketingContactRequestSchema as mn, parseErrorResponse as mr, ListManagedServiceCredentialsResponseSchema as mt, ActiveOrganizationResponseSchema as n, _function as ni, RecentResourceListResponseSchema as nn, WorkspaceTriggerListResponseSchema as nr, HistoryRunListResponseSchema as nt, AgentSummaryListResponseSchema as o, boolean as oi, SlugAvailabilityResponseSchema as on, buildConnectDeeplink as or, InviteProjectMembersResponseSchema as ot, CatalogAppsPageResponseSchema as p, number$1 as pi, SubmitAgentFeedbackRequestSchema as pn, parseAppSlug as pr, ListCredentialsPageResponseSchema as pt, GetAppCatalogEntryResponseSchema as q, WorkflowRunHooksResponseSchema as qn, ConfirmCheckoutResponseSchema as qr, PromptResponseSchema as qt, AgentSessionDetailResponseSchema as r, _null as ri, STORED_JSON_SCHEMA_TARGET as rn, WorkspaceTriggerOverviewSchema as rr, InviteOrganizationMembersRequestSchema as rt, AgentTriggerSummaryListResponseSchema as s, custom as si, StartKeystrokeConnectionInputSchema as sn, deriveCustomAppDisplay as sr, ListAgentMemoryFilesResponseSchema as st, AcceptOrganizationInvitationResponseSchema as t, _enum as ti, ROUTE_MANIFEST_REL_PATH as tn, WorkspaceTriggerFileSchema as tr, HistoryRunListQuerySchema as tt, CatalogActionDetailResponseSchema as u, lazy as ui, StartMcpOAuthConnectionResultSchema as un, listenPortFromPublicUrl as ur, ListAppsResponseSchema as ut, CompleteProjectArtifactResponseSchema as v, string as vi, TriggerInvokeInputsSchema as vn, slugifyAppName as vr, ListOrganizationsResponseSchema as vt, CreateCredentialInstanceBodySchema as w, NEVER as wi, UpdateCredentialInstanceBodySchema as wn, CredentialConsumerListQuerySchema as wr, ListTemplatesResponseSchema as wt, ConnectProvidersResponseSchema as x, url as xi, TriggerRunDetailResponseSchema as xn, CredentialAssignmentListQuerySchema as xr, ListProjectMembersResponseSchema as xt, ConnectAuthorizeUrlResponseSchema as y, union as yi, TriggerInvokeResponseSchema as yn, zodToStoredJsonSchema as yr, ListProjectDeploymentsResponseSchema as yt, DownloadActiveProjectArtifactResponseSchema as z, UserPreferencesPatchSchema as zn, PublicModelsResponseSchema as zr, PresignUserAvatarRequestSchema as zt };
8807
8842
 
8808
- //# sourceMappingURL=dist-DcNWYQFI.mjs.map
8843
+ //# sourceMappingURL=dist-E6dh6qXe.mjs.map