@keystrokehq/cli 0.0.19 → 0.0.21

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.
Files changed (142) hide show
  1. package/dist/{accept.handler-BVmNNAgL.mjs → accept.handler-C6KBLKmW.mjs} +1 -1
  2. package/dist/{admin-DQlHFuXn.mjs → admin-D2CQoZAN.mjs} +9 -9
  3. package/dist/{agents-Dd7UeQCw.mjs → agents-Bn0g5o0o.mjs} +7 -7
  4. package/dist/{api-nR61stdq.mjs → api-J9UL8pqZ.mjs} +1 -1
  5. package/dist/{api-keys-BsMBFiD_.mjs → api-keys-BixCnZJW.mjs} +5 -5
  6. package/dist/{auth-ZTuuEoD6.mjs → auth-yCNMT8sJ.mjs} +14 -7
  7. package/dist/{auth.handler-C1dZBdaG.mjs → auth.handler-BedGpKh1.mjs} +7 -12
  8. package/dist/{build-agents-DseUtzd4-CthuIecx.mjs → build-agents-DseUtzd4-DFh2e5Cn.mjs} +5 -5
  9. package/dist/{build-metadata-C8Ra_Gi--L3l8w0rh.mjs → build-metadata-BB_L45ZS-BtGGjHIV.mjs} +9 -9
  10. package/dist/{build-progress-AR8xow4_.mjs → build-progress-nYa14iBP.mjs} +1 -1
  11. package/dist/{build-tasks-GVuMLS0h-BaPhhGXO.mjs → build-tasks-C09SdfjC-B0F7BZZG.mjs} +4 -4
  12. package/dist/{build-workflows-CV4tBo6S-szwrAGWT.mjs → build-workflows-BZ_m97Pr-DKANy85L.mjs} +9 -9
  13. package/dist/{build.handler-DJrEMCBw.mjs → build.handler-CyDc8jiZ.mjs} +5 -5
  14. package/dist/{clear-cache.handler-CTLQ1PIN.mjs → clear-cache.handler-FmJPHdWG.mjs} +1 -1
  15. package/dist/{clear.handler-BgeAg2de.mjs → clear.handler-Cvb9chs4.mjs} +27 -13
  16. package/dist/{commander-C5qcOo8m.mjs → commander-9Kro0Dl3.mjs} +4 -7
  17. package/dist/{connect-BtBKoXpi.mjs → connect-DzVxjeYr.mjs} +2 -2
  18. package/dist/{connect.handler-E8CmLRSF.mjs → connect.handler-DFQdxkWZ.mjs} +3 -3
  19. package/dist/{context-BydAGTiB.mjs → context-B2cQ-Nt3.mjs} +29 -3
  20. package/dist/{create.handler-CBxIPC3r.mjs → create.handler-v9B0Z9Yf.mjs} +1 -1
  21. package/dist/{credential-env-map-BA4LNI7x.mjs → credential-env-map-Dvp00a4M.mjs} +1 -1
  22. package/dist/credential-requirements-D0mavK8j-CFMf0Xwu.mjs +619 -0
  23. package/dist/{credentials-jRiXEr6P.mjs → credentials-DQW8xxof.mjs} +1 -1
  24. package/dist/{credentials-BGaRMclS.mjs → credentials-Dr5lD7Hm.mjs} +6 -6
  25. package/dist/{current-deployment-workflow-BVliROAz.mjs → current-deployment-workflow-qMfOrRIu.mjs} +4 -4
  26. package/dist/{current.handler-DBl9S67d.mjs → current.handler-Cm_-JLyZ.mjs} +1 -1
  27. package/dist/{delete.handler-Buu7Ip0D.mjs → delete.handler-DtP_zUaq.mjs} +1 -1
  28. package/dist/{deploy-BPDUTKZD.mjs → deploy-BURTx92e.mjs} +1 -1
  29. package/dist/{deploy-CzTlgAFj.mjs → deploy-CB6pfCuB.mjs} +2 -2
  30. package/dist/{deploy-progress-DK87VKJ-.mjs → deploy-progress-Dlp9aBDW.mjs} +1 -1
  31. package/dist/{deploy.handler-CCcJ7y3A.mjs → deploy.handler-Bg0dpSTj.mjs} +28 -16
  32. package/dist/{detect-env-access-CwkOYeYM-CNTyUzme.mjs → detect-env-access-CwkOYeYM-D4aTZv4R.mjs} +1 -1
  33. package/dist/{diff.handler-DUVFixeG.mjs → diff.handler-CJPrszL1.mjs} +4 -4
  34. package/dist/{dist-Cx0RV8s7.mjs → dist-Br4m3sFZ.mjs} +30 -33
  35. package/dist/{dist-CIInPRGh.mjs → dist-DuJjDZIf.mjs} +25 -2
  36. package/dist/{env.handler-C8kNFz2U.mjs → env.handler-6TrLd3fo.mjs} +7 -7
  37. package/dist/{error-boundary-B8cmSwJH.mjs → error-boundary-DVZipk-A.mjs} +1 -1
  38. package/dist/{file-metadata-lrX05iRt.mjs → file-metadata-DQVDjr7M.mjs} +2 -7
  39. package/dist/{import-module--8x5SLum-DjPUZr4i.mjs → import-module-y0glInUe-DxX0-BRO.mjs} +74 -620
  40. package/dist/{init-DeeOVc9m.mjs → init-DBMtY3eO.mjs} +3 -3
  41. package/dist/{init.handler-BMdhpusQ.mjs → init.handler-BoYbE-6H.mjs} +3 -3
  42. package/dist/{inspect.handler-QyTo8rWO.mjs → inspect.handler-Juu2vGbB.mjs} +4 -4
  43. package/dist/{integration-catalog-CmvYPvI6.mjs → integration-catalog-cYlTmOSb.mjs} +1 -1
  44. package/dist/{integrations-tXZM-84g.mjs → integrations-cwRfplNG.mjs} +5 -5
  45. package/dist/{invites-ClyAatBW.mjs → invites-DHyHZOY_.mjs} +4 -4
  46. package/dist/{invites.list.handler-CPkK_tPM.mjs → invites.list.handler-C-QpsG2J.mjs} +1 -1
  47. package/dist/{invites.resend.handler-DIRI7tS2.mjs → invites.resend.handler-KFKbSPzR.mjs} +1 -1
  48. package/dist/{invites.revoke.handler-CcXcDBlU.mjs → invites.revoke.handler-Cuz7jrGC.mjs} +1 -1
  49. package/dist/keystroke.mjs +21 -21
  50. package/dist/{list-enrichment-B9238wom.mjs → list-enrichment-CCRHYslm.mjs} +1 -1
  51. package/dist/{list.handler-Xl_F89kq.mjs → list.handler-6x3GVumu.mjs} +1 -1
  52. package/dist/{list.handler-tnsRn-Rj.mjs → list.handler-BWsl4iYw.mjs} +4 -4
  53. package/dist/{list.handler-DdFGHkqt.mjs → list.handler-CLGQDuo5.mjs} +5 -5
  54. package/dist/{list.handler-BLkQKiV1.mjs → list.handler-Cc-V1TNz.mjs} +1 -1
  55. package/dist/{list.handler-ClPAPSWm.mjs → list.handler-DRe38pAj.mjs} +2 -2
  56. package/dist/{list.handler-BB-Dcm5B.mjs → list.handler-Do2tVOnu.mjs} +1 -1
  57. package/dist/{list.handler-Cbc9rlBx.mjs → list.handler-RtHhrTZ3.mjs} +1 -1
  58. package/dist/{listen-ksMVpdNa.mjs → listen-DZdSevsB.mjs} +2 -2
  59. package/dist/{listen.handler-DEJSBg8y.mjs → listen.handler-BccHe1jh.mjs} +2 -2
  60. package/dist/{logs-C-JxXsgc.mjs → logs-Bh_PBnu6.mjs} +3 -3
  61. package/dist/{logs.handler-BIegqc2p.mjs → logs.handler-DItDS1zw.mjs} +2 -2
  62. package/dist/{members.add.handler-D4ggN2Xi.mjs → members.add.handler-D3nQ_Ln6.mjs} +1 -1
  63. package/dist/{members.invite.handler-BYIt6Oib.mjs → members.invite.handler-rKhg5n_C.mjs} +1 -1
  64. package/dist/{members.list.handler-CvpeYKC4.mjs → members.list.handler-C9Yh469k.mjs} +1 -1
  65. package/dist/{members.remove.handler-C4GBUVYE.mjs → members.remove.handler-Dnrck-E6.mjs} +1 -1
  66. package/dist/{members.update.handler-TpM1oi0L.mjs → members.update.handler-qo5r6arJ.mjs} +1 -1
  67. package/dist/{normalize-path-CojS-CgQ-D4wSBHgG.mjs → normalize-path-CojS-CgQ-aOM0agxS.mjs} +1 -1
  68. package/dist/{org-DIGyb7XZ.mjs → org-DnES84sS.mjs} +15 -15
  69. package/dist/{orgs.create.handler-RIYhse_Q.mjs → orgs.create.handler-DF4eEL-2.mjs} +1 -1
  70. package/dist/{orgs.get.handler-BfOpbSom.mjs → orgs.get.handler-BmJnseQa.mjs} +1 -1
  71. package/dist/{orgs.list.handler-BMgj9yTD.mjs → orgs.list.handler-DDVvSbsT.mjs} +1 -1
  72. package/dist/{paused.handler-DAZ1EaLN.mjs → paused.handler-BLUchSMD.mjs} +1 -1
  73. package/dist/{projects-Cy6CH3fI.mjs → projects-Cv14bBGy.mjs} +4 -4
  74. package/dist/{projects-BndElPAx.mjs → projects-ZNcKwds2.mjs} +1 -1
  75. package/dist/{requirements.handler-C5vobjdJ.mjs → requirements.handler-BKFocUof.mjs} +5 -5
  76. package/dist/{resolve-cli-credentials-DytxgMwn.mjs → resolve-cli-credentials-DaMDaamj.mjs} +1 -1
  77. package/dist/{resolve-project-CNQtOWE4.mjs → resolve-project-Cj3MFnU0.mjs} +1 -1
  78. package/dist/{run-polling-BhOdFyh3.mjs → run-polling-3XOGl4hh.mjs} +3 -3
  79. package/dist/{run.handler-BpLmwF_a.mjs → run.handler-DZuUx0fi.mjs} +5 -5
  80. package/dist/{runs-DaSd4eXn.mjs → runs-BOo3j297.mjs} +2 -2
  81. package/dist/{cron-parser-Dw_cWzFu.mjs → schemas-D2zfmyC-.mjs} +279 -1
  82. package/dist/{skills-sync.handler-DOxudKmV.mjs → skills-sync.handler-09mDbx5q.mjs} +1 -1
  83. package/dist/{skills.command-DQc_qGAF.mjs → skills.command-B-MhRN3J.mjs} +4 -4
  84. package/dist/{source-analysis-BBg2E_6G-Ut7kYHOz.mjs → source-analysis-BBg2E_6G-wPP9mjQx.mjs} +3 -3
  85. package/dist/{src-0XVwHXNp.mjs → src-DNhUmpSl.mjs} +1 -1
  86. package/dist/{switch.handler-CCjMrRZN.mjs → switch.handler-BFGvj5c6.mjs} +2 -2
  87. package/dist/{sync-BdTQDZjP.mjs → sync-CZ3iUPTA.mjs} +2 -2
  88. package/dist/{sync.handler-DjY8nqbB.mjs → sync.handler-B1L8I9lF.mjs} +7 -7
  89. package/dist/{task-BRmL2lmw.mjs → task-BWuIKWh4.mjs} +103 -34
  90. package/dist/{task-target-build-DCV0UDaz.mjs → task-target-build-CTgl4L42.mjs} +42 -56
  91. package/dist/task-target-deploy-DeUyfi9H.mjs +4 -0
  92. package/dist/{task-target-deploy-CZBGNC0H-I-tvkGCC.mjs → task-target-deploy-dQYnMO8n-d2vdeqXH.mjs} +14 -16
  93. package/dist/task-target-deploy-runner.mjs +6 -6
  94. package/dist/{test-TTQXrhHm.mjs → test-Byq4hG3C.mjs} +2 -2
  95. package/dist/{test.handler-B7Ahe9ta.mjs → test.handler-BsrMMj5O.mjs} +9 -9
  96. package/dist/{test.handler-CkkplyX6.mjs → test.handler-CAsVgOpT.mjs} +1 -1
  97. package/dist/{tool.handler-DMfFZCRg.mjs → tool.handler-BHS5Z4J_.mjs} +8 -8
  98. package/dist/{trigger-artifacts-RizI57RC-DjhOsdOm.mjs → trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs} +53 -119
  99. package/dist/trigger-manifest-C07EM-b2.mjs +43 -0
  100. package/dist/{upgrade-Cx-bUWUc.mjs → upgrade-bZVjVXnu.mjs} +2 -2
  101. package/dist/{upload.handler-_d2WZwxd.mjs → upload.handler-DXVx2u3A.mjs} +7 -7
  102. package/dist/{users.get.handler-DIooG7Wy.mjs → users.get.handler-DqD2ELK2.mjs} +1 -1
  103. package/dist/{users.list.handler-DdGW-DSg.mjs → users.list.handler-DZSPvpGF.mjs} +1 -1
  104. package/dist/{users.set-role.handler-Ek-kntLp.mjs → users.set-role.handler-73smNUVF.mjs} +1 -1
  105. package/dist/{utils-BMUWnz1P.mjs → utils-BaxDlCsW.mjs} +1 -1
  106. package/dist/{validate.handler-Cq2uJjXY.mjs → validate.handler-CmfcMX0t.mjs} +5 -5
  107. package/dist/{workflow-build-C8AiYxqp.mjs → workflow-build-Bi1Aacc5.mjs} +22 -22
  108. package/dist/{workflow-build-manifest-BKKW9D05.mjs → workflow-build-manifest-1sC52TIG.mjs} +4 -4
  109. package/dist/{workflow-bundler-BzHk73PM-WI31RJjH.mjs → workflow-bundler-BzHk73PM-xQwAF08W.mjs} +2 -2
  110. package/dist/{workflows-K6zetcqI.mjs → workflows-C_C13Zr0.mjs} +19 -19
  111. package/dist/{writer-B-SpZ0G2-CLh7sXRd.mjs → writer-byNNUjRm-B-on1n6c.mjs} +23 -32
  112. package/package.json +12 -12
  113. package/dist/credential-requirements-Ob-7H-0F.mjs +0 -250
  114. package/dist/schemas-BxFPUGWT.mjs +0 -281
  115. package/dist/task-target-deploy-DmpCWE3u.mjs +0 -4
  116. package/dist/trigger-manifest-DxdCjGz_.mjs +0 -29
  117. /package/dist/{agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs → agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs} +0 -0
  118. /package/dist/{agent-manifest-tIsqF2OP.mjs → agent-manifest-Pg0aURo7.mjs} +0 -0
  119. /package/dist/{browser-BpJ8ut9z.mjs → browser-Dvv5OQrt.mjs} +0 -0
  120. /package/dist/{clear.handler-C_pXAeBG.mjs → clear.handler-BdR56Cok.mjs} +0 -0
  121. /package/dist/{concurrency-gXn9Rw8x-BTlfau8D.mjs → concurrency-gXn9Rw8x-CnBnF2cg.mjs} +0 -0
  122. /package/dist/{credential-schema-mismatch-z74ud-YZ.mjs → credential-schema-mismatch-kfGeiSB1.mjs} +0 -0
  123. /package/dist/{declared-credential-requirements-D6KT-r-e.mjs → declared-credential-requirements-B6h4WRv4.mjs} +0 -0
  124. /package/dist/{diff-utils-B0ED-Igv.mjs → diff-utils-CXKNQUXO.mjs} +0 -0
  125. /package/dist/{layout-P1v-Gssz.mjs → layout-B95Tku8F.mjs} +0 -0
  126. /package/dist/{logs.handler-DyRoevtO.mjs → logs.handler-Bs1DVMaO.mjs} +0 -0
  127. /package/dist/{metadata-layout-Bv-B0nHj-B1c5giJ7.mjs → metadata-layout-Bv-B0nHj-CO8mjjSl.mjs} +0 -0
  128. /package/dist/{oxc-B3KI3rf_-Cvx4Z-4H.mjs → oxc-B3KI3rf_-B9omBIuN.mjs} +0 -0
  129. /package/dist/{read-credential-keys-77a91T8M-B0eiobOd.mjs → read-credential-keys-77a91T8M-aLuQvlIq.mjs} +0 -0
  130. /package/dist/{register.handler-BXeh5mdb.mjs → register.handler-C_NqMLir.mjs} +0 -0
  131. /package/dist/{rolldown-runtime-twds-ZHy-8uqgIurC.mjs → rolldown-runtime-twds-ZHy-RuJszab7.mjs} +0 -0
  132. /package/dist/{run-polling-DARidqo-.mjs → run-polling-DKWPGLyF.mjs} +0 -0
  133. /package/dist/{schema-BjH_e4Fo.mjs → schema-DFJiNWyd.mjs} +0 -0
  134. /package/dist/{schema-display-NVEl_DFY.mjs → schema-display-XrRCdFL0.mjs} +0 -0
  135. /package/dist/{skill-installer-BBgN2tzW.mjs → skill-installer-Cm9hF6OB.mjs} +0 -0
  136. /package/dist/{skills.handler-Do9I3dQS.mjs → skills.handler-KEUkV5NH.mjs} +0 -0
  137. /package/dist/{source-analysis-Cs0CTBQk.mjs → source-analysis-z2RSZw6X.mjs} +0 -0
  138. /package/dist/{spinner-progress-Bx-fYItP.mjs → spinner-progress-BtEIJRX4.mjs} +0 -0
  139. /package/dist/{status.handler-BsVtDW_V.mjs → status.handler-CW-EFhy3.mjs} +0 -0
  140. /package/dist/{types-BMBuhHhW.mjs → types-D1cVpE7_.mjs} +0 -0
  141. /package/dist/{upgrade.handler-5qSzPC7D.mjs → upgrade.handler-C7KvNL0x.mjs} +0 -0
  142. /package/dist/{upload-BbcMkyVl.mjs → upload-CE4H5R1h.mjs} +0 -0
@@ -1,11 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as findProjectRoot } from "./project-config-DudGRFPO.mjs";
4
- import { c as optionalDescriptionString$1, i as createStructuralSchema$1, l as optionalTrimmedNonEmptyString$1, o as idNoSpacesString, r as anyZodSchemaSchema$1, s as jsonSchemaObject$1, t as CredentialSetManifestSchema$1, u as trimmedNonEmptyString$1 } from "./schemas-BxFPUGWT.mjs";
5
- import { n as DeclaredCredentialRequirementSchema } from "./credential-requirements-Ob-7H-0F.mjs";
6
- import { a as FlowGraphSchema, i as WorkflowCoreManifestSchema, n as WORKFLOW_MANIFEST_SCHEMA_VERSION } from "./workflow-build-manifest-BKKW9D05.mjs";
7
- import { t as parseCronExpression } from "./cron-parser-Dw_cWzFu.mjs";
8
- import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-BTlfau8D.mjs";
4
+ import { _ as descriptionString, b as trimmedNonEmptyString, g as createStructuralSchema, h as anyZodSchemaSchema, l as TriggerTypeSchema, m as CredentialSetManifestSchema, n as DeclaredCredentialRequirementSchema, r as ExecutionIdentityPolicySchema, v as jsonSchemaObject, y as jsonValueSchema } from "./credential-requirements-D0mavK8j-CFMf0Xwu.mjs";
5
+ import { a as FlowGraphSchema, i as WorkflowCoreManifestSchema, n as WORKFLOW_MANIFEST_SCHEMA_VERSION } from "./workflow-build-manifest-1sC52TIG.mjs";
6
+ import { c as optionalDescriptionString, f as parseCronExpression, i as createStructuralSchema$1, l as optionalTrimmedNonEmptyString, o as idNoSpacesString, r as anyZodSchemaSchema$1, s as jsonSchemaObject$1, t as CredentialSetManifestSchema$1, u as trimmedNonEmptyString$1 } from "./schemas-D2zfmyC-.mjs";
7
+ import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-CnBnF2cg.mjs";
9
8
  import { createRequire } from "node:module";
10
9
  import * as os from "node:os";
11
10
  import * as path$1 from "node:path";
@@ -15,7 +14,7 @@ import { execFile } from "node:child_process";
15
14
  import { randomUUID } from "node:crypto";
16
15
  import { promisify } from "node:util";
17
16
  //#region ../../packages/core/src/mcp-server/schemas.ts
18
- const credentialSetInstanceSchema$3 = createStructuralSchema$1([
17
+ const credentialSetInstanceSchema$2 = createStructuralSchema$1([
19
18
  "id",
20
19
  "auth",
21
20
  "connections"
@@ -40,10 +39,10 @@ const McpTransportSchema = z.discriminatedUnion("type", [
40
39
  ]);
41
40
  z.object({
42
41
  id: trimmedNonEmptyString$1("MCP server ID"),
43
- name: optionalTrimmedNonEmptyString$1("MCP server name"),
44
- description: optionalDescriptionString$1("MCP server description"),
42
+ name: optionalTrimmedNonEmptyString("MCP server name"),
43
+ description: optionalDescriptionString("MCP server description"),
45
44
  transport: McpTransportSchema,
46
- credentialSets: z.array(credentialSetInstanceSchema$3).optional(),
45
+ credentialSets: z.array(credentialSetInstanceSchema$2).optional(),
47
46
  credentials: z.function().optional()
48
47
  });
49
48
  const McpServerManifestSchema = z.object({
@@ -67,7 +66,7 @@ const McpServerManifestSchema = z.object({
67
66
  });
68
67
  //#endregion
69
68
  //#region ../../packages/core/src/messaging-gateway/schemas.ts
70
- const credentialSetInstanceSchema$2 = createStructuralSchema$1([
69
+ const credentialSetInstanceSchema$1 = createStructuralSchema$1([
71
70
  "id",
72
71
  "auth",
73
72
  "connections"
@@ -76,11 +75,11 @@ const MessagingGatewayModeSchema = z.enum(["platform", "custom"]);
76
75
  const MessagingGatewayCredentialScopeSchema = z.enum(["organization", "project"]);
77
76
  z.object({
78
77
  id: idNoSpacesString("MessagingGateway id"),
79
- name: optionalDescriptionString$1("MessagingGateway name"),
80
- description: optionalDescriptionString$1("MessagingGateway description"),
78
+ name: optionalDescriptionString("MessagingGateway name"),
79
+ description: optionalDescriptionString("MessagingGateway description"),
81
80
  provider: z.string().min(1, "MessagingGateway provider is required"),
82
81
  mode: MessagingGatewayModeSchema,
83
- credentialSet: credentialSetInstanceSchema$2,
82
+ credentialSet: credentialSetInstanceSchema$1,
84
83
  credentialScope: MessagingGatewayCredentialScopeSchema.optional(),
85
84
  appRef: z.string().min(1).optional()
86
85
  });
@@ -139,9 +138,9 @@ const SandboxFileSourceSchema = z.discriminatedUnion("type", [z.object({
139
138
  target: z.string().optional()
140
139
  })]);
141
140
  z.object({
142
- id: optionalTrimmedNonEmptyString$1("Sandbox ID"),
143
- name: optionalTrimmedNonEmptyString$1("Sandbox name"),
144
- description: optionalDescriptionString$1("Sandbox description"),
141
+ id: optionalTrimmedNonEmptyString("Sandbox ID"),
142
+ name: optionalTrimmedNonEmptyString("Sandbox name"),
143
+ description: optionalDescriptionString("Sandbox description"),
145
144
  runtime: SandboxRuntimeSchema.optional(),
146
145
  fileSources: z.array(SandboxFileSourceSchema).optional(),
147
146
  setupCommands: z.array(z.string()).optional()
@@ -201,7 +200,7 @@ const AgentToolCredentialSetReferenceSchema = z.object({
201
200
  z.object({
202
201
  id: trimmedNonEmptyString$1("Agent ID"),
203
202
  name: trimmedNonEmptyString$1("Agent name"),
204
- description: optionalDescriptionString$1("Agent description"),
203
+ description: optionalDescriptionString("Agent description"),
205
204
  systemPrompt: z.string().min(1, { error: "System prompt is required" }),
206
205
  model: trimmedNonEmptyString$1("Model"),
207
206
  thinkingLevel: AgentThinkingLevelSchema.optional(),
@@ -253,21 +252,6 @@ const AgentManifestSchema = z.object({
253
252
  sandbox: SandboxManifestSchema.optional(),
254
253
  messaging: z.array(MessagingGatewayManifestSchema).optional()
255
254
  });
256
- z.string().length(64, "Must be 64 characters").regex(/^[a-f0-9]{64}$/i, "Must be hexadecimal").transform((value) => value);
257
- const JsonSchemaSchema = z.record(z.string(), z.unknown());
258
- z.object({
259
- constant: z.object({
260
- attempts: z.number().int().min(1).max(10),
261
- seconds: z.number().positive()
262
- }).optional(),
263
- exponential: z.object({
264
- attempts: z.number().int().min(1).max(10),
265
- base: z.number().min(1).optional(),
266
- multiplier: z.number().positive().optional()
267
- }).optional()
268
- }).refine((data) => {
269
- return data.constant !== void 0 !== (data.exponential !== void 0);
270
- }, { error: "Retry config must specify exactly one of constant or exponential strategy" });
271
255
  z.union([z.number().int().positive().finite(), z.string().regex(/^[1-9]\d*[smhdwy]$/)]);
272
256
  const DurationStringSchema = z.string().refine((val) => /^\d+[smhdwy]$/.test(val), { message: "Invalid duration format. Must be a positive integer followed by s, m, h, d, w, or y (e.g., \"5m\", \"1h\")" }).refine((val) => {
273
257
  const match = val.match(/^(\d+)[smhdwy]$/);
@@ -347,539 +331,54 @@ const IANATimezoneSchema = z.enum([
347
331
  "Asia/Doha"
348
332
  ]);
349
333
  //#endregion
350
- //#region ../../packages/core/dist/chunks/schema-RilQR7M-.mjs
351
- const MAX_JSON_DEPTH = 20;
352
- function buildJsonValueSchema(depth) {
353
- const primitives = z.union([
354
- z.string(),
355
- z.number(),
356
- z.boolean(),
357
- z.null()
358
- ]);
359
- if (depth <= 0) return primitives;
360
- const nested = buildJsonValueSchema(depth - 1);
361
- return z.union([
362
- primitives,
363
- z.array(nested),
364
- z.record(z.string(), nested)
365
- ]);
366
- }
367
- const jsonValueSchema = buildJsonValueSchema(MAX_JSON_DEPTH);
368
- const jsonSchemaObject = z.record(z.string(), jsonValueSchema);
369
- const anyZodSchemaSchema = z.custom((value) => value instanceof z.ZodType, "Expected a Zod schema");
370
- const zodObjectSchema = z.custom((value) => value instanceof z.ZodObject, "Expected a Zod object schema");
371
- /**
372
- * Creates a Zod schema that validates an object structurally by checking
373
- * for required properties. This avoids `instanceof` checks which fail
374
- * when class definitions are duplicated across bundle boundaries.
375
- */
376
- function createStructuralSchema(requiredKeys, label) {
377
- return z.custom((value) => value != null && (typeof value === "object" || typeof value === "function") && requiredKeys.every((key) => key in value), `Expected ${label}`);
378
- }
379
- function trimmedNonEmptyString(fieldName) {
380
- return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(255, { error: `${fieldName} cannot exceed 255 characters` });
381
- }
382
- /**
383
- * Non-empty trimmed string for credential definition ids.
384
- * Allows namespaced ids such as `keystroke:slack` plus letters, numbers,
385
- * hyphens, and underscores.
386
- */
387
- function credentialSetIdString(fieldName) {
388
- return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(255, { error: `${fieldName} cannot exceed 255 characters` }).refine((s) => /^[a-zA-Z0-9_:-]+$/.test(s), { error: `${fieldName} must only contain letters, numbers, hyphens, underscores, and colons` });
389
- }
390
- function optionalTrimmedNonEmptyString(fieldName) {
391
- return trimmedNonEmptyString(fieldName).optional();
392
- }
393
- function descriptionString(fieldName) {
394
- return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(1024, { error: `${fieldName} cannot exceed 1024 characters` });
395
- }
396
- function optionalDescriptionString(fieldName) {
397
- return descriptionString(fieldName).optional();
398
- }
399
- //#endregion
400
- //#region ../../packages/core/dist/chunks/schemas-CUxIyWrr.mjs
401
- /**
402
- * Shared constants for the credential/connection system.
403
- * Defined in core (bottom of dependency chain) so all packages can import them.
404
- */
405
- const CREDENTIAL_EXPOSURES = {
406
- "user-runtime": "user-runtime",
407
- "platform-only": "platform-only"
408
- };
409
- const credentialSetProxyInjectionSchema = z.object({
410
- /** Substitute placeholder in HTTP headers (default: true). */
411
- headers: z.boolean().optional(),
412
- /** Substitute placeholder in the HTTP Basic Auth credential (default: true). */
413
- basicAuth: z.boolean().optional(),
414
- /** Substitute placeholder in URL query params (default: false).
415
- * Use for APIs that authenticate via `?api_key=...` (Google Maps, OWM, etc.). */
416
- queryParams: z.boolean().optional(),
417
- /** Substitute placeholder in the HTTP request body (default: false).
418
- * Use for form-encoded auth payloads (Stripe, AWS SigV4 query, etc.). */
419
- body: z.boolean().optional()
420
- });
421
- const credentialSetProxyConfigSchema = z.object({
422
- /** Exact-match host allowlist (forwarded to SecretBuilder.allowHost). */
423
- hosts: z.array(z.string().min(1)).optional(),
424
- /** Wildcard host allowlist (forwarded to SecretBuilder.allowHostPattern).
425
- * Example: `["*.browserbase.com"]` covers any subdomain. */
426
- hostPatterns: z.array(z.string().min(1)).optional(),
427
- /** Per-scope substitution toggles. Omit to use SDK defaults. */
428
- injection: credentialSetProxyInjectionSchema.optional()
429
- });
430
- const onCredentialRevokedSchema = z.enum(["fail", "retry-once"]);
431
- const credentialExposureSchema = z.enum([CREDENTIAL_EXPOSURES["user-runtime"], CREDENTIAL_EXPOSURES["platform-only"]]);
432
- const connectionMetadataConfigSchema = z.object({
433
- id: credentialSetIdString("Credential connection id").optional(),
434
- label: optionalTrimmedNonEmptyString("Credential connection label"),
435
- description: optionalDescriptionString("Credential connection description"),
436
- recommended: z.boolean().optional(),
437
- advanced: z.boolean().optional(),
438
- needsRawSecret: z.boolean().optional()
439
- });
440
- const connectionMetadataManifestSchema = connectionMetadataConfigSchema;
441
- const registeredDescriptorSchema = z.object({
442
- id: trimmedNonEmptyString("Registered descriptor id"),
443
- config: z.record(z.string(), z.unknown()).optional()
444
- });
445
- const registeredResolverDescriptorSchema = registeredDescriptorSchema.extend({ cacheMs: z.number().int().nonnegative().optional() });
446
- const manualConnectionConfigSchema = connectionMetadataConfigSchema.extend({
447
- kind: z.literal("manual"),
448
- input: zodObjectSchema.optional(),
449
- instructions: z.string().min(1).optional(),
450
- validate: z.function().optional()
451
- });
452
- const manualConnectionFieldManifestSchema = z.object({
453
- key: z.string().min(1),
454
- label: z.string().min(1),
455
- description: z.string().min(1).optional(),
456
- optional: z.boolean(),
457
- secret: z.literal(true)
458
- });
459
- const manualConnectionConfigManifestSchema = connectionMetadataManifestSchema.extend({
460
- kind: z.literal("manual"),
461
- input: jsonSchemaObject.optional(),
462
- fields: z.array(manualConnectionFieldManifestSchema).optional(),
463
- generated: z.boolean().optional(),
464
- instructions: z.string().min(1).optional()
465
- });
466
- /** Declarative form of `Vault` — strings typed against the credential set's
467
- * stored/auth schema keys at the {@link CredentialSetConfig} boundary; the Zod
468
- * schema here enforces non-empty strings only. `CredentialSet` itself performs
469
- * the schema-key membership check at construction time. */
470
- const vaultMappingSchema = z.object({
471
- accessToken: z.string().min(1),
472
- refreshToken: z.string().min(1).optional(),
473
- instanceUrl: z.string().min(1).optional(),
474
- raw: z.record(z.string().min(1), z.string().min(1)).optional()
475
- });
476
- /** Function form of `Vault` — an object pairing the access-token vault key
477
- * (`accessTokenKey`) with the `build` function that computes the full vault
478
- * write map. The explicit key keeps the disconnect path's revocation read
479
- * reliable even when `build` transforms the access token. */
480
- const vaultMappingFnSchema = z.object({
481
- accessTokenKey: z.string().min(1),
482
- build: z.custom((val) => typeof val === "function", { message: "vault.build must be a function." })
483
- });
484
- /** Runtime shape of `Vault`. Accepts either the declarative mapping or the
485
- * function-form object `{ accessTokenKey, build }`. */
486
- const vaultConfigSchema = z.union([vaultMappingSchema, vaultMappingFnSchema], { error: "vault must be a declarative mapping object or a `{ accessTokenKey, build }` object." });
487
- /** Manifest projection of `Vault` — declarative mappings serialize verbatim;
488
- * function-form mappings serialize as `{ kind: 'function', accessTokenKey }`
489
- * since closures are not manifest-safe but the access-token key is. */
490
- const vaultManifestSchema = z.discriminatedUnion("kind", [z.object({
491
- kind: z.literal("declarative"),
492
- accessToken: z.string().min(1),
493
- refreshToken: z.string().min(1).optional(),
494
- instanceUrl: z.string().min(1).optional(),
495
- raw: z.record(z.string().min(1), z.string().min(1)).optional()
496
- }), z.object({
497
- kind: z.literal("function"),
498
- accessTokenKey: z.string().min(1)
499
- })]);
500
- const oauthConnectionConfigBaseSchema = z.object({
501
- kind: z.literal("oauth"),
502
- authUrl: z.string().url(),
503
- tokenUrl: z.string().url(),
504
- scopes: z.array(z.string()).readonly(),
505
- revokeUrl: z.string().url().nullable().optional(),
506
- tokenType: z.enum(["long-lived", "refreshable"]),
507
- pkce: z.boolean().optional(),
508
- /** Fallback token lifetime when the provider omits `expires_in`. Positive
509
- * integer seconds. Shared between config + manifest schemas (both extend
510
- * this base). */
511
- defaultExpiresInSeconds: z.number().int().positive().optional()
512
- });
513
- const oauthConnectionConfigSchema = oauthConnectionConfigBaseSchema.extend({
514
- ...connectionMetadataConfigSchema.shape,
515
- vault: vaultConfigSchema,
516
- oauth: registeredDescriptorSchema.optional(),
517
- buildAuthUrl: z.function().optional(),
518
- exchangeCode: z.function().optional(),
519
- refreshToken: z.function().optional(),
520
- extractInstallationInfo: z.function().optional(),
521
- validate: z.function().optional()
522
- });
523
- const oauthConnectionConfigManifestSchema = oauthConnectionConfigBaseSchema.extend({
524
- ...connectionMetadataManifestSchema.shape,
525
- vault: vaultManifestSchema,
526
- oauth: registeredDescriptorSchema.optional()
527
- });
528
- const credentialsExchangeConnectionConfigSchema = connectionMetadataConfigSchema.extend({
529
- kind: z.literal("credentials-exchange"),
530
- instructions: z.string().min(1).optional(),
531
- input: zodObjectSchema
532
- }).extend({
533
- exchange: z.function(),
534
- rotate: z.function().optional(),
535
- validate: z.function().optional()
536
- });
537
- /** Manifest projection of `CredentialsExchangeConnectionConfig` — only the
538
- * declarative `input` schema (rendered as JSON Schema) and `instructions`
539
- * copy survive serialization. The three hooks (`exchange`, `rotate`,
540
- * `validate`) are runtime closures and are stripped. */
541
- const credentialsExchangeConnectionConfigManifestSchema = z.object({
542
- kind: z.literal("credentials-exchange"),
543
- ...connectionMetadataManifestSchema.shape,
544
- instructions: z.string().min(1).optional(),
545
- input: jsonSchemaObject
546
- });
547
- const exchangeCredentialConnectionConfigSchema = connectionMetadataConfigSchema.extend({
548
- kind: z.literal("exchange"),
549
- input: zodObjectSchema,
550
- exchange: registeredDescriptorSchema
551
- });
552
- const exchangeCredentialConnectionManifestSchema = connectionMetadataManifestSchema.extend({
553
- kind: z.literal("exchange"),
554
- input: jsonSchemaObject,
555
- exchange: registeredDescriptorSchema
556
- });
557
- const dynamicCredentialConnectionConfigSchema = connectionMetadataConfigSchema.extend({
558
- kind: z.literal("dynamic"),
559
- input: zodObjectSchema.optional(),
560
- resolver: registeredResolverDescriptorSchema
561
- });
562
- const dynamicCredentialConnectionManifestSchema = connectionMetadataManifestSchema.extend({
563
- kind: z.literal("dynamic"),
564
- input: jsonSchemaObject.optional(),
565
- resolver: registeredResolverDescriptorSchema
566
- });
567
- const platformCredentialConnectionConfigSchema = connectionMetadataConfigSchema.extend({ kind: z.literal("platform") });
568
- const platformCredentialConnectionManifestSchema = connectionMetadataManifestSchema.extend({ kind: z.literal("platform") });
569
- const connectionConfigSchema = z.discriminatedUnion("kind", [
570
- manualConnectionConfigSchema,
571
- oauthConnectionConfigSchema,
572
- credentialsExchangeConnectionConfigSchema,
573
- exchangeCredentialConnectionConfigSchema,
574
- dynamicCredentialConnectionConfigSchema,
575
- platformCredentialConnectionConfigSchema
576
- ]);
577
- /** Manifest projection of `ConnectionConfig` — declarative metadata only. */
578
- const connectionConfigManifestSchema = z.discriminatedUnion("kind", [
579
- manualConnectionConfigManifestSchema,
580
- oauthConnectionConfigManifestSchema,
581
- credentialsExchangeConnectionConfigManifestSchema,
582
- exchangeCredentialConnectionManifestSchema,
583
- dynamicCredentialConnectionManifestSchema,
584
- platformCredentialConnectionManifestSchema
585
- ]);
586
- const CredentialSetManifestSchema = z.object({
587
- manifestVersion: z.literal(1),
588
- type: z.literal("credentialSet"),
589
- id: credentialSetIdString("Credential set id"),
590
- name: trimmedNonEmptyString("Credential set name"),
591
- description: optionalDescriptionString("Credential set description"),
592
- auth: jsonSchemaObject,
593
- exposure: credentialExposureSchema.optional(),
594
- proxy: credentialSetProxyConfigSchema.optional(),
595
- /** When true, resolved values are passed into execution as raw secrets (no ref-token proxy). */
596
- needsRawSecret: z.boolean().optional(),
597
- /** Policy when a step throws `CredentialRevokedError` against this credential set. */
598
- onCredentialRevoked: onCredentialRevokedSchema.optional(),
599
- connections: z.array(connectionConfigManifestSchema).optional()
600
- });
601
- z.object({
602
- id: credentialSetIdString("Credential set id"),
603
- name: optionalTrimmedNonEmptyString("Credential set name"),
604
- description: optionalDescriptionString("Credential set description"),
605
- auth: zodObjectSchema,
606
- exposure: credentialExposureSchema.optional(),
607
- proxy: credentialSetProxyConfigSchema.optional(),
608
- /** When true, resolved values are passed into execution as raw secrets (no ref-token proxy). */
609
- needsRawSecret: z.boolean().optional(),
610
- onCredentialRevoked: onCredentialRevokedSchema.optional(),
611
- connections: z.array(connectionConfigSchema).readonly().optional()
612
- });
613
- //#endregion
614
- //#region ../../packages/core/dist/chunks/schemas-B8U1MF_0.mjs
615
- const SourceLocationSchema = z.object({
616
- filePath: z.string().min(1),
617
- absoluteFilePath: z.string().min(1).optional(),
618
- line: z.number().int().positive(),
619
- column: z.number().int().positive(),
620
- position: z.number().int().nonnegative().optional(),
621
- endLine: z.number().int().positive(),
622
- endColumn: z.number().int().positive(),
623
- endPosition: z.number().int().nonnegative().optional(),
624
- synthetic: z.boolean().optional()
625
- });
626
- z.string().min(1);
627
- const ImportSourceSchema = z.object({
628
- kind: z.enum([
629
- "local",
630
- "module-import",
631
- "namespace-import",
632
- "dynamic"
633
- ]),
634
- moduleSpecifier: z.string().min(1).optional(),
635
- importName: z.string().min(1).optional(),
636
- localName: z.string().min(1).optional(),
637
- resolvedPath: z.string().min(1).optional()
638
- });
639
- const CallKindSchema = z.enum([
640
- "workflow-step",
641
- "agent",
642
- "tool",
643
- "hook",
644
- "child-workflow",
645
- "function-call",
646
- "method-call",
647
- "dynamic-call",
648
- "parallel-call",
649
- "process-exit",
650
- "iife",
651
- "expression"
652
- ]);
653
- const CapturedVariableSourceKindSchema = z.enum([
654
- "local-const",
655
- "relative-import",
656
- "package-import"
657
- ]);
658
- const CapturedVariableValueTypeSchema = z.enum([
659
- "string",
660
- "number",
661
- "boolean",
662
- "object",
663
- "array",
664
- "function",
665
- "unknown"
666
- ]);
667
- z.object({
668
- name: z.string().min(1),
669
- value: z.union([
670
- z.string(),
671
- z.number(),
672
- z.boolean()
673
- ]).optional(),
674
- sourceText: z.string().optional(),
675
- valueType: CapturedVariableValueTypeSchema,
676
- resolvable: z.boolean(),
677
- source: CapturedVariableSourceKindSchema,
678
- importPath: z.string().optional(),
679
- declaration: z.object({
680
- filePath: z.string().min(1),
681
- line: z.number().int().positive()
682
- })
683
- });
684
- const IntegrationScopeSchema = z.enum([
685
- "organization",
686
- "project",
687
- "user_provided_credential"
688
- ]);
689
- const IntegrationCredentialRefSchema = z.discriminatedUnion("type", [z.object({
690
- type: z.literal("id"),
691
- id: z.string().startsWith("cset_")
692
- }), z.object({
693
- type: z.literal("name"),
694
- name: z.string().trim().min(1)
695
- })]);
696
- function hasProjectOrOrganizationScope(scope) {
697
- return scope === "organization" || scope === "project";
698
- }
699
- const CredentialRefTokenKeyNameSchema = z.string().regex(/^[A-Za-z0-9_]+$/, "Credential key must contain only letters, digits, and underscores (required for ref-token proxying)");
700
- /** Shared enum for top-level credential-set `onCredentialRevoked` policy. */
701
- const OnCredentialRevokedSchema = z.enum(["fail", "retry-once"]);
702
- /** A credential set after resolution in a built manifest. Contains definition id, scope, alias, and credential keys.*/
703
- const ResolvedCredentialSetSchema = z.object({
704
- resolvedId: z.string(),
705
- scope: IntegrationScopeSchema.optional(),
706
- alias: z.string().optional(),
707
- credentialRef: IntegrationCredentialRefSchema.optional(),
708
- /** Auth-shape keys expected post-resolve. */
709
- credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
710
- /** Subset of `credentialKeys` that are optional in the auth shape. */
711
- optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
712
- /** Auth-shaped vault keys required for vault reads and upload flows. */
713
- storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
714
- /** Subset of auth-shaped vault keys that may be absent from the vault without
715
- * failing resolution. Derived from the credential set's `auth` schema. */
716
- optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
717
- proxy: credentialSetProxyConfigSchema.optional(),
718
- /** When true, resolved values are passed raw (no ref-token proxy) for this set. */
719
- needsRawSecret: z.boolean().optional(),
720
- /** Policy when a step throws `CredentialRevokedError` against this credential set. */
721
- onCredentialRevoked: OnCredentialRevokedSchema.optional(),
722
- /** Persistence-layer schema fingerprint stamped at build time. The
723
- * resolver's phase 2 compares this against the vault row's stored
724
- * fingerprint and raises `CredentialSchemaMismatchError` on drift.
725
- * Optional here so pre-fingerprint artifacts still parse; the
726
- * workflow builder populates it for every authored credential set
727
- * that has a resolvable fingerprint. */
728
- schemaFingerprint: z.string().optional()
729
- }).superRefine((value, ctx) => {
730
- if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
731
- code: z.ZodIssueCode.custom,
732
- path: ["credentialRef"],
733
- message: "credentialRef requires scope to be \"project\" or \"organization\""
734
- });
735
- });
736
- z.object({
737
- credentialSetId: z.string(),
738
- /** Auth-shape keys expected post-resolve. */
739
- credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
740
- /** Optional subset of the auth-shape keys. */
741
- optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
742
- /** Stored-shape keys required for vault reads. */
743
- storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
744
- /** Optional subset of the stored-shape keys. */
745
- optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
746
- schemaFingerprint: z.string().optional(),
747
- /** Policy when a step throws `CredentialRevokedError` against this credential set. */
748
- onCredentialRevoked: OnCredentialRevokedSchema.optional(),
749
- proxy: credentialSetProxyConfigSchema.optional(),
750
- needsRawSecret: z.boolean().optional(),
751
- requiredOAuthScopes: z.array(z.string()).optional()
752
- });
753
- const CredentialRequirementEntrySchema = z.object({
754
- credentialSetId: z.string(),
755
- scope: IntegrationScopeSchema.optional(),
756
- alias: z.string().optional(),
757
- credentialRef: IntegrationCredentialRefSchema.optional(),
758
- /** Auth-shape keys expected post-resolve. */
759
- credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
760
- /** Optional subset of the auth-shape keys. */
761
- optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
762
- /** Auth-shaped vault keys required for vault reads. */
763
- storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
764
- /** Optional subset of the stored-shape keys. */
765
- optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
766
- schemaFingerprint: z.string().optional(),
767
- proxy: credentialSetProxyConfigSchema.optional(),
768
- needsRawSecret: z.boolean().optional(),
769
- /** Policy when a step throws `CredentialRevokedError` against this credential set. */
770
- onCredentialRevoked: OnCredentialRevokedSchema.optional(),
771
- requiredOAuthScopes: z.array(z.string()).optional()
772
- }).superRefine((value, ctx) => {
773
- if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
774
- code: z.ZodIssueCode.custom,
775
- path: ["credentialRef"],
776
- message: "credentialRef requires scope to be \"project\" or \"organization\""
777
- });
778
- });
779
- z.object({
780
- required: z.array(z.string()),
781
- byStep: z.record(z.string(), z.array(CredentialRequirementEntrySchema))
782
- });
783
- const TriggerCallbackNameSchema = z.enum([
784
- "filter",
785
- "idempotencyKey",
786
- "verify",
787
- "callback"
788
- ]);
789
- const TriggerCredentialRequirementEntrySchema = CredentialRequirementEntrySchema;
790
- const TriggerCredentialRequirementsSchema = z.object({
791
- required: z.array(z.string()),
792
- byCallback: z.partialRecord(TriggerCallbackNameSchema, z.array(TriggerCredentialRequirementEntrySchema))
793
- });
794
- const ExecutionIdentityPolicySchema = z.object({ subjectMode: z.enum(["never", "requiredWhenUserProvidedCredential"]) });
795
- z.object({
796
- nodeId: z.string().min(1),
797
- stepName: z.string().min(1),
798
- label: z.string().min(1),
799
- callKind: CallKindSchema,
800
- stepId: z.string().min(1).optional(),
801
- source: SourceLocationSchema.optional(),
802
- astKind: z.string().min(1).optional(),
803
- importSource: ImportSourceSchema.optional(),
804
- outputBinding: z.string().min(1).optional(),
805
- scopeOverride: IntegrationScopeSchema.optional(),
806
- description: z.string().optional(),
807
- sourceCode: z.string().optional(),
808
- exportName: z.string().optional(),
809
- inputSchema: JsonSchemaSchema.optional(),
810
- outputSchema: JsonSchemaSchema.optional(),
811
- credentialSets: z.array(ResolvedCredentialSetSchema).optional()
812
- });
813
- const TriggerTypeSchema = z.enum([
814
- "webhook",
815
- "cron",
816
- "polling"
334
+ //#region ../../packages/core/dist/chunks/schemas-CRXLuZkZ.mjs
335
+ const trimmedString = z.string().trim().min(1);
336
+ const payloadHashSchema = z.object({
337
+ from: z.literal("payload"),
338
+ strategy: z.literal("hash")
339
+ });
340
+ const payloadPathSchema = z.object({
341
+ from: z.literal("payload"),
342
+ path: trimmedString
343
+ });
344
+ const headerHashSchema = z.object({
345
+ from: z.literal("header"),
346
+ strategy: z.literal("hash")
347
+ });
348
+ const headerNameSchema = z.object({
349
+ from: z.literal("header"),
350
+ name: trimmedString
351
+ });
352
+ const idempotencyKeyConfigSchema = z.union([
353
+ payloadHashSchema,
354
+ payloadPathSchema,
355
+ headerHashSchema,
356
+ headerNameSchema
817
357
  ]);
818
- /**
819
- * Persisted on `deployment_triggers.trigger_source`. Mirrors the
820
- * `webhookTrigger({ source: { type } })` discriminator so the server
821
- * can index-filter app-source rows during provider-webhook fanout.
822
- */
823
- const TriggerSourceSchema = z.enum(["custom", "app"]);
824
- const WebhookMethodSchema$1 = z.enum([
825
- "GET",
826
- "POST",
827
- "PUT",
828
- "PATCH"
829
- ]);
830
- const TriggerCallbackBundleUploadSchema = z.object({
831
- code: z.string(),
832
- hash: z.string(),
833
- size: z.number()
834
- });
835
- const TriggerCallbackExportsSchema = z.object({
836
- verify: z.string().min(1).optional(),
837
- filter: z.string().min(1).optional(),
838
- idempotencyKey: z.string().min(1).optional(),
839
- callback: z.string().min(1).optional()
840
- });
841
- const TransformCallbackExportsSchema = z.object({ transform: z.string().min(1).optional() });
842
- z.object({
843
- id: z.string(),
844
- type: TriggerTypeSchema,
845
- /**
846
- * Source-of-truth discriminator for webhook triggers. `'custom'` means
847
- * the trigger owns its own HTTP path; `'app'` means it is fanned out by
848
- * a Keystroke-managed provider app. Undefined for non-webhook triggers.
849
- */
850
- triggerSource: TriggerSourceSchema.optional(),
851
- enabled: z.boolean(),
852
- path: z.string().optional(),
853
- method: WebhookMethodSchema$1.optional(),
854
- schedule: z.string().optional(),
855
- timezone: z.string().optional(),
856
- config: z.record(z.string(), z.unknown()).optional(),
857
- requiredCredentials: TriggerCredentialRequirementsSchema.optional(),
858
- storagePath: z.string().min(1).optional(),
859
- callbackBundle: TriggerCallbackBundleUploadSchema.optional(),
860
- callbackExports: TriggerCallbackExportsSchema.optional(),
861
- transformCallbackBundle: TriggerCallbackBundleUploadSchema.optional(),
862
- transformCallbackExports: TransformCallbackExportsSchema.optional()
863
- });
864
- const credentialSetInstanceSchema$1 = createStructuralSchema([
358
+ const credentialSetInstanceSchema = createStructuralSchema([
865
359
  "id",
866
360
  "auth",
867
361
  "connections"
868
362
  ], "a CredentialSet instance");
869
363
  const TriggerModeDefaultSchema = z.enum(["managed", "subscribable"]);
870
- const TriggerCallbackPresenceSchema = z.object({
871
- filter: z.boolean(),
872
- idempotencyKey: z.boolean(),
364
+ const TriggerRuntimeDescriptorSchema = z.object({
365
+ /**
366
+ * True when this trigger bundles a `poll` export executed inside a
367
+ * microsandbox VM at trigger time. Polling-only — webhook/cron always
368
+ * leave this undefined. Replaces the legacy `callbacks: { poll, ... }`
369
+ * descriptor (the other callbacks are gone now that filter/idempotency/
370
+ * verify/transform are declarative or run in the workflow VM).
371
+ */
873
372
  poll: z.boolean().optional(),
874
- transformAllowed: z.boolean(),
875
- verify: z.boolean().optional()
373
+ filterSchema: jsonSchemaObject.optional(),
374
+ /** Webhook-only declarative idempotency-key resolver. */
375
+ idempotencyConfig: idempotencyKeyConfigSchema.optional()
876
376
  });
877
- const TriggerRuntimeDescriptorSchema = z.object({ callbacks: TriggerCallbackPresenceSchema });
878
377
  z.object({
879
378
  manifestVersion: z.literal(1),
880
379
  type: z.literal("trigger"),
881
380
  triggerType: TriggerTypeSchema,
882
- name: trimmedNonEmptyString("Trigger name"),
381
+ id: trimmedNonEmptyString("Trigger id"),
883
382
  description: descriptionString("Trigger description"),
884
383
  enabled: z.boolean(),
885
384
  modeDefault: TriggerModeDefaultSchema,
@@ -888,12 +387,12 @@ z.object({
888
387
  runtime: TriggerRuntimeDescriptorSchema
889
388
  });
890
389
  const triggerBaseConfigSchema = z.object({
891
- credentialSets: z.array(credentialSetInstanceSchema$1).optional(),
390
+ credentialSets: z.array(credentialSetInstanceSchema).optional(),
892
391
  description: descriptionString("Trigger description"),
893
392
  enabled: z.boolean().default(true),
894
393
  executionIdentityPolicy: ExecutionIdentityPolicySchema.optional(),
895
394
  modeDefault: TriggerModeDefaultSchema.default("managed"),
896
- name: trimmedNonEmptyString("Trigger name")
395
+ id: trimmedNonEmptyString("Trigger id")
897
396
  });
898
397
  triggerBaseConfigSchema.extend({
899
398
  input: anyZodSchemaSchema,
@@ -913,7 +412,7 @@ const cronTriggerManifestSchema = z.object({
913
412
  manifestVersion: z.literal(1),
914
413
  type: z.literal("trigger"),
915
414
  triggerType: z.literal("cron"),
916
- name: trimmedNonEmptyString("Trigger name"),
415
+ id: trimmedNonEmptyString("Trigger id"),
917
416
  description: descriptionString("Trigger description"),
918
417
  enabled: z.boolean(),
919
418
  modeDefault: z.enum(["managed", "subscribable"]),
@@ -929,8 +428,7 @@ z.object({
929
428
  });
930
429
  triggerBaseConfigSchema.extend({
931
430
  poll: z.function(),
932
- filter: z.function().optional(),
933
- idempotencyKey: z.function().optional(),
431
+ filter: anyZodSchemaSchema.optional(),
934
432
  response: anyZodSchemaSchema,
935
433
  schedule: ScheduleSchema
936
434
  });
@@ -946,7 +444,7 @@ const pollingTriggerManifestSchema = z.object({
946
444
  manifestVersion: z.literal(1),
947
445
  type: z.literal("trigger"),
948
446
  triggerType: z.literal("polling"),
949
- name: trimmedNonEmptyString("Trigger name"),
447
+ id: trimmedNonEmptyString("Trigger id"),
950
448
  description: descriptionString("Trigger description"),
951
449
  enabled: z.boolean(),
952
450
  modeDefault: z.enum(["managed", "subscribable"]),
@@ -954,11 +452,6 @@ const pollingTriggerManifestSchema = z.object({
954
452
  credentialSets: z.array(CredentialSetManifestSchema).optional(),
955
453
  runtime: pollingTriggerRuntimeSchema
956
454
  });
957
- const WebhookMethodSchema = z.enum([
958
- "PATCH",
959
- "POST",
960
- "PUT"
961
- ]);
962
455
  z.object({
963
456
  method: z.string(),
964
457
  path: z.string(),
@@ -970,45 +463,13 @@ z.object({
970
463
  headers: z.record(z.string(), z.string().optional()),
971
464
  rawBody: z.string()
972
465
  });
973
- const WebhookResponseConfigSchema = z.object({
974
- ignoredBody: jsonValueSchema.optional(),
975
- ignoredStatus: z.number().int().positive().optional(),
976
- successBody: jsonValueSchema.optional(),
977
- successStatus: z.number().int().positive().optional()
978
- });
979
- /**
980
- * Custom webhook trigger paths describe the suffix that a request URL has
981
- * after the organization id. The router serves these triggers at
982
- * `/api/v1/webhooks/{orgId}{path}` (e.g. `path: '/orders'` → request
983
- * `/api/v1/webhooks/{orgId}/orders`). Authors must therefore supply only the
984
- * trailing path segment, not the `/webhooks/` prefix that the route already
985
- * provides.
986
- */
987
- const webhookPathSchema = z.string().trim().min(1, { error: "Webhook path cannot be empty" }).max(50, { error: "Webhook path cannot exceed 50 characters" }).refine((s) => !/\s/.test(s), { error: "Webhook path cannot contain spaces or whitespace" }).refine((s) => s.startsWith("/"), { error: "Webhook path must start with /" }).refine((s) => s.length > 1, { error: "Webhook path must include a path segment after the leading \"/\"" }).refine((s) => !/^\/webhooks(\/|$)/i.test(s), { error: "Webhook path must not start with \"/webhooks\". Provide just the suffix that follows the organization id in the URL — e.g. use \"/orders\" for a webhook served at \"/api/v1/webhooks/{orgId}/orders\"." });
988
- const credentialSetInstanceSchema = createStructuralSchema([
989
- "id",
990
- "auth",
991
- "connections"
992
- ], "a CredentialSet instance");
993
- const webhookCustomSourceConfigSchema = z.object({
994
- type: z.literal("custom"),
995
- method: WebhookMethodSchema,
996
- path: webhookPathSchema,
997
- verify: z.function().optional(),
998
- response: WebhookResponseConfigSchema.optional(),
999
- credentialSets: z.array(credentialSetInstanceSchema).optional()
1000
- });
466
+ const webhookCustomSourceConfigSchema = z.object({ type: z.literal("custom") });
1001
467
  const webhookAppSourceConfigSchema = z.object({
1002
468
  type: z.literal("app"),
1003
469
  appRef: trimmedNonEmptyString("appRef")
1004
470
  });
1005
471
  const webhookSourceConfigSchema = z.discriminatedUnion("type", [webhookCustomSourceConfigSchema, webhookAppSourceConfigSchema]);
1006
- const webhookCustomSourceManifestSchema = z.object({
1007
- type: z.literal("custom"),
1008
- method: WebhookMethodSchema,
1009
- path: z.string().min(1).max(1024),
1010
- response: WebhookResponseConfigSchema.optional()
1011
- });
472
+ const webhookCustomSourceManifestSchema = z.object({ type: z.literal("custom") });
1012
473
  const webhookAppSourceManifestSchema = z.object({
1013
474
  type: z.literal("app"),
1014
475
  appRef: trimmedNonEmptyString("appRef")
@@ -1017,8 +478,8 @@ const WebhookSourceManifestSchema = z.discriminatedUnion("type", [webhookCustomS
1017
478
  triggerBaseConfigSchema.omit({ credentialSets: true }).extend({
1018
479
  source: webhookSourceConfigSchema,
1019
480
  payload: anyZodSchemaSchema.optional(),
1020
- filter: z.function().optional(),
1021
- idempotencyKey: z.function().optional()
481
+ filter: anyZodSchemaSchema.optional(),
482
+ idempotencyKey: idempotencyKeyConfigSchema.optional()
1022
483
  });
1023
484
  const webhookTriggerRuntimeSchema = TriggerRuntimeDescriptorSchema.extend({
1024
485
  source: WebhookSourceManifestSchema,
@@ -1028,7 +489,7 @@ const webhookTriggerManifestSchema = z.object({
1028
489
  manifestVersion: z.literal(1),
1029
490
  type: z.literal("trigger"),
1030
491
  triggerType: z.literal("webhook"),
1031
- name: trimmedNonEmptyString("Trigger name"),
492
+ id: trimmedNonEmptyString("Trigger id"),
1032
493
  description: descriptionString("Trigger description"),
1033
494
  enabled: z.boolean(),
1034
495
  modeDefault: z.enum(["managed", "subscribable"]),
@@ -1038,7 +499,7 @@ const webhookTriggerManifestSchema = z.object({
1038
499
  });
1039
500
  z.unknown();
1040
501
  //#endregion
1041
- //#region ../../packages/workflow-builder/dist/import-module--8x5SLum.mjs
502
+ //#region ../../packages/workflow-builder/dist/import-module-y0glInUe.mjs
1042
503
  var DiscoveryError = class extends Error {
1043
504
  code;
1044
505
  filePath;
@@ -2178,7 +1639,7 @@ function isTriggerLike(value) {
2178
1639
  value != null &&
2179
1640
  (typeof value === 'object' || typeof value === 'function') &&
2180
1641
  typeof value.toManifest === 'function' &&
2181
- typeof value.name === 'string'
1642
+ typeof value.id === 'string'
2182
1643
  );
2183
1644
  }
2184
1645
 
@@ -2189,7 +1650,7 @@ function isBoundTriggerLike(value) {
2189
1650
  value.isBoundTrigger === true &&
2190
1651
  value.trigger != null &&
2191
1652
  typeof value.trigger.toManifest === 'function' &&
2192
- typeof value.trigger.name === 'string'
1653
+ typeof value.trigger.id === 'string'
2193
1654
  );
2194
1655
  }
2195
1656
 
@@ -2206,18 +1667,17 @@ function getTriggerCandidate(value) {
2206
1667
  function describeTriggerEntry(entry) {
2207
1668
  if (entry && typeof entry === 'object') {
2208
1669
  if ('isBoundTrigger' in entry && entry.isBoundTrigger === true && entry.trigger) {
2209
- return entry.trigger.name ?? '<unknown trigger>';
1670
+ return entry.trigger.id ?? '<unknown trigger>';
2210
1671
  }
2211
- if ('name' in entry && typeof entry.name === 'string') {
2212
- return entry.name;
1672
+ if ('id' in entry && typeof entry.id === 'string') {
1673
+ return entry.id;
2213
1674
  }
2214
1675
  }
2215
1676
  return '<unknown trigger>';
2216
1677
  }
2217
1678
 
2218
1679
  function findTriggerSource(entry, trigger, workflowMod, workflowFilePath, siblingModules) {
2219
- const triggerName = trigger.name;
2220
- // First, check if the trigger is re-exported from the workflow module (identity check)
1680
+ const triggerId = trigger.id;
2221
1681
  for (const [name, exp] of Object.entries(workflowMod)) {
2222
1682
  const candidate = getTriggerCandidate(exp);
2223
1683
  if (exp === entry || exp === trigger || candidate === trigger) {
@@ -2233,13 +1693,13 @@ function findTriggerSource(entry, trigger, workflowMod, workflowFilePath, siblin
2233
1693
  exp === entry ||
2234
1694
  exp === trigger ||
2235
1695
  candidate === trigger ||
2236
- candidate?.name === triggerName
1696
+ candidate?.id === triggerId
2237
1697
  ) {
2238
1698
  siblingMatches.push({ triggerExportName: name, sourceFilePath: filePath });
2239
1699
  continue;
2240
1700
  }
2241
1701
 
2242
- if (isBoundTriggerLike(exp) && exp.trigger.name === triggerName) {
1702
+ if (isBoundTriggerLike(exp) && exp.trigger.id === triggerId) {
2243
1703
  siblingMatches.push({ triggerExportName: name, sourceFilePath: filePath });
2244
1704
  }
2245
1705
  }
@@ -2251,7 +1711,7 @@ function findTriggerSource(entry, trigger, workflowMod, workflowFilePath, siblin
2251
1711
  .join(', ');
2252
1712
  throw new Error(
2253
1713
  'Ambiguous trigger source for "' +
2254
- triggerName +
1714
+ triggerId +
2255
1715
  '" in ' +
2256
1716
  workflowFilePath +
2257
1717
  '. Matching sibling exports: ' +
@@ -2280,9 +1740,6 @@ async function discoverTriggers(workflow, mod, workflowFilePath) {
2280
1740
  const trigger = isBound ? entry.trigger : entry;
2281
1741
  const triggerManifest = trigger.toManifest();
2282
1742
  const hasTransform = isBound && typeof entry.transform === 'function';
2283
- const hasFilter = isBound
2284
- ? typeof entry.filter === 'function'
2285
- : typeof trigger.filter === 'function';
2286
1743
  const { triggerExportName, sourceFilePath } = findTriggerSource(
2287
1744
  entry,
2288
1745
  trigger,
@@ -2290,7 +1747,6 @@ async function discoverTriggers(workflow, mod, workflowFilePath) {
2290
1747
  workflowFilePath,
2291
1748
  siblingModules
2292
1749
  );
2293
- // For cron triggers, capture the static payload for runtime use
2294
1750
  const staticPayload =
2295
1751
  triggerManifest.triggerType === 'cron' && 'payload' in trigger
2296
1752
  ? trigger.payload
@@ -2300,16 +1756,15 @@ async function discoverTriggers(workflow, mod, workflowFilePath) {
2300
1756
  triggerExportName,
2301
1757
  sourceFilePath,
2302
1758
  hasTransform,
2303
- hasFilter,
2304
1759
  staticPayload,
2305
1760
  triggerIndex,
2306
1761
  });
2307
1762
  } catch (error) {
2308
- const triggerName = describeTriggerEntry(entry);
1763
+ const triggerLabel = describeTriggerEntry(entry);
2309
1764
  const message = serializeError(error);
2310
1765
  throw new Error(
2311
1766
  'Failed to discover trigger "' +
2312
- triggerName +
1767
+ triggerLabel +
2313
1768
  '" for workflow "' +
2314
1769
  workflow.name +
2315
1770
  '": ' +
@@ -2508,7 +1963,6 @@ const LoadedWorkflowTriggerSchema = z.object({
2508
1963
  triggerExportName: z.string().optional(),
2509
1964
  sourceFilePath: z.string().optional(),
2510
1965
  hasTransform: z.boolean(),
2511
- hasFilter: z.boolean(),
2512
1966
  staticPayload: z.unknown().optional(),
2513
1967
  triggerIndex: z.number()
2514
1968
  });