@keystrokehq/cli 0.0.18 → 0.0.20

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 (146) hide show
  1. package/README.md +1 -1
  2. package/dist/{accept.handler-B7QzdKCh.mjs → accept.handler-CiqqUxKN.mjs} +1 -1
  3. package/dist/{admin-CYpulx_A.mjs → admin-B0U2Aghv.mjs} +9 -9
  4. package/dist/{agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs → agent-bundle-package-DWV6B_5q-BsbCEeMw.mjs} +1 -1
  5. package/dist/{agents-Co6Jy_N8.mjs → agents-DBebUEwk.mjs} +6 -6
  6. package/dist/{api-DsK8M-ZH.mjs → api-BjBpWWlm.mjs} +4 -5
  7. package/dist/{api-keys-BUCLzRv_.mjs → api-keys-BHAgmC4E.mjs} +5 -5
  8. package/dist/{auth-niNm-yNT.mjs → auth-D-PZAjdd.mjs} +6 -6
  9. package/dist/{auth.handler-BTH-Qb00.mjs → auth.handler-CxTDSO6O.mjs} +3 -3
  10. package/dist/{build-agents-DseUtzd4-CthuIecx.mjs → build-agents-DseUtzd4-BNtZrqoY.mjs} +5 -5
  11. package/dist/{build-metadata-C8Ra_Gi--L3l8w0rh.mjs → build-metadata-BB_L45ZS-d5-QLDZ5.mjs} +10 -10
  12. package/dist/{build-progress-AR8xow4_.mjs → build-progress-BVwDg6lC.mjs} +1 -1
  13. package/dist/{build-tasks-GVuMLS0h-CCxCqd02.mjs → build-tasks-C09SdfjC-DxKcmENc.mjs} +4 -4
  14. package/dist/{build-workflows-CV4tBo6S-DhFBlp6m.mjs → build-workflows-BZ_m97Pr-DwcnRlyh.mjs} +9 -10
  15. package/dist/{build.handler-BmlXPhed.mjs → build.handler-CTX80S1K.mjs} +4 -4
  16. package/dist/{chunk-CH6r78ws.mjs → chunk-DYxdGL9S.mjs} +2 -1
  17. package/dist/{clear.handler-BDlwBzX4.mjs → clear.handler-Bksm2HI4.mjs} +1 -1
  18. package/dist/{commander-BE37hxR3.mjs → commander-DQLrBSIW.mjs} +1 -1
  19. package/dist/{connect-C9NMD8Ky.mjs → connect-DV_EztVs.mjs} +2 -2
  20. package/dist/{connect.handler-C7kysvhz.mjs → connect.handler-DbuGt3Xb.mjs} +3 -3
  21. package/dist/{context-Bid-Rqj7.mjs → context-BUzxM3QI.mjs} +2 -2
  22. package/dist/{create.handler-Cp9CV6SN.mjs → create.handler-CQCRk-Na.mjs} +1 -1
  23. package/dist/{credentials-fMfKVlEn.mjs → credentials-m18a1_hw.mjs} +6 -6
  24. package/dist/{credentials-DUkVbhvj.mjs → credentials-xPtLFTjW.mjs} +2 -2
  25. package/dist/{current-deployment-workflow-DiwUcKoB.mjs → current-deployment-workflow-pyBoobIm.mjs} +4 -4
  26. package/dist/{current.handler-eCR4nClu.mjs → current.handler-BJGJgdGP.mjs} +1 -1
  27. package/dist/{default-urls-CTQqM1_A.mjs → default-urls-BoSm4s9C.mjs} +1 -1
  28. package/dist/{delete.handler-D4ElSAcr.mjs → delete.handler-DNoehdOH.mjs} +1 -1
  29. package/dist/{deploy-B7LRWcp6.mjs → deploy-3tHCBGky.mjs} +2 -2
  30. package/dist/{deploy-DyZh--f7.mjs → deploy-BKjcO_sm.mjs} +1 -1
  31. package/dist/{deploy-progress-DK87VKJ-.mjs → deploy-progress-CyolzjRB.mjs} +1 -1
  32. package/dist/{deploy.handler-DVnH-Niv.mjs → deploy.handler-TnPNBYXZ.mjs} +27 -15
  33. package/dist/{detect-env-access-CwkOYeYM-CNTyUzme.mjs → detect-env-access-CwkOYeYM-D8-hxij0.mjs} +2 -2
  34. package/dist/{diff.handler-lIA2pRBX.mjs → diff.handler-DO2WzdGB.mjs} +3 -3
  35. package/dist/{dist-WFPTDQB3.mjs → dist-BGrWr5fp.mjs} +32 -37
  36. package/dist/{env.handler-BIzQLlmo.mjs → env.handler-C5GNyiJt.mjs} +6 -6
  37. package/dist/{error-boundary-B8cmSwJH.mjs → error-boundary-GtRvP2oP.mjs} +1 -1
  38. package/dist/{file-metadata-lrX05iRt.mjs → file-metadata-B8c7Y5yg.mjs} +2 -7
  39. package/dist/{import-module--8x5SLum-D7EiPjwl.mjs → import-module-y0glInUe-CfNsQNia.mjs} +48 -839
  40. package/dist/{init-jaqNLGmB.mjs → init-D9RIT2CY.mjs} +3 -3
  41. package/dist/{init.handler-DamvbPEw.mjs → init.handler-0TJY1YNy.mjs} +2 -2
  42. package/dist/{inspect.handler-_UcN7dxE.mjs → inspect.handler-BrYFfN4H.mjs} +3 -3
  43. package/dist/{integration-catalog-m8tj_XlD.mjs → integration-catalog-BrJsBkfx.mjs} +1 -1
  44. package/dist/integrations-vSyAQ6HA.mjs +185 -0
  45. package/dist/{invites-VntHNMYk.mjs → invites-BASM4PJr.mjs} +4 -4
  46. package/dist/{invites.list.handler-CPl4QHfc.mjs → invites.list.handler-c-aw6g5o.mjs} +1 -1
  47. package/dist/{invites.resend.handler-BAtb3AX4.mjs → invites.resend.handler-MnMEjP_Z.mjs} +1 -1
  48. package/dist/{invites.revoke.handler-qXOF1Vgx.mjs → invites.revoke.handler-CHX6Z8kj.mjs} +1 -1
  49. package/dist/keystroke.mjs +25 -24
  50. package/dist/{list-enrichment-DYvr3XDb.mjs → list-enrichment-DcplcioC.mjs} +1 -1
  51. package/dist/{list.handler-C_iBLBmS.mjs → list.handler-BBzB1_1l.mjs} +1 -1
  52. package/dist/{list.handler-pHnPFep8.mjs → list.handler-BsgCd1oF.mjs} +5 -5
  53. package/dist/{list.handler-BdRsjRlf.mjs → list.handler-CDtjm-6d.mjs} +1 -1
  54. package/dist/{list.handler-DUz1bJ4x.mjs → list.handler-DJNtXw7C.mjs} +1 -1
  55. package/dist/{list.handler-CEjKSezx.mjs → list.handler-DXwKdfIv.mjs} +2 -2
  56. package/dist/{list.handler-CJUFdmaU.mjs → list2.handler-BdE1k2kl.mjs} +3 -3
  57. package/dist/{listen-DLGZEQRL.mjs → listen-Ca9KdiB2.mjs} +2 -2
  58. package/dist/{listen.handler-kaAvYk-B.mjs → listen.handler-KWPN03S8.mjs} +2 -2
  59. package/dist/{logs-CcYqFKRU.mjs → logs-BEDf7hZ0.mjs} +3 -3
  60. package/dist/{logs.handler-lboRKNoE.mjs → logs.handler-mk1lcZbU.mjs} +2 -2
  61. package/dist/{members.add.handler-DBydP0SR.mjs → members.add.handler-CTvlxBZU.mjs} +1 -1
  62. package/dist/{members.invite.handler-D4-7fiYC.mjs → members.invite.handler-wFO0r7Pi.mjs} +1 -1
  63. package/dist/{members.list.handler-Z4cIbcNg.mjs → members.list.handler-PPdqs4nI.mjs} +1 -1
  64. package/dist/{members.remove.handler-J56D83O7.mjs → members.remove.handler-a5WI6zE4.mjs} +1 -1
  65. package/dist/{members.update.handler-B5rBv6dt.mjs → members.update.handler-3xblTzmz.mjs} +1 -1
  66. package/dist/{metadata-layout-Bv-B0nHj-B1c5giJ7.mjs → metadata-layout-Bv-B0nHj-DtMWZ7Cc.mjs} +1 -1
  67. package/dist/{normalize-path-CojS-CgQ-D4wSBHgG.mjs → normalize-path-CojS-CgQ-CRqBc6D6.mjs} +1 -1
  68. package/dist/{org-DGS91uc-.mjs → org-CzLw3neZ.mjs} +15 -15
  69. package/dist/{orgs.create.handler-B4naNUSN.mjs → orgs.create.handler-CcPpDweZ.mjs} +1 -1
  70. package/dist/{orgs.get.handler-Ci_JrT08.mjs → orgs.get.handler-BACPg7vR.mjs} +1 -1
  71. package/dist/{orgs.list.handler-CJ2byIEj.mjs → orgs.list.handler-DEF8OyvM.mjs} +1 -1
  72. package/dist/{paused.handler-BQSQvQhB.mjs → paused.handler-D4j8_Za4.mjs} +1 -1
  73. package/dist/{projects-D90_uEC2.mjs → projects-CJCKxG2u.mjs} +4 -4
  74. package/dist/{projects-fWvIJQ80.mjs → projects-s5ehKLil.mjs} +6 -4
  75. package/dist/{register.handler-CleQJhtQ.mjs → register.handler-CSvlOMF6.mjs} +18 -9
  76. package/dist/{requirements.handler-B51sxQSy.mjs → requirements.handler-Bk-sAE9C.mjs} +5 -5
  77. package/dist/{run-polling-CC6y2XXI.mjs → run-polling-DKclfet-.mjs} +3 -3
  78. package/dist/{run.handler-B31BpZJP.mjs → run.handler-x0B-CjNF.mjs} +4 -4
  79. package/dist/{runs-Bg_qDeQi.mjs → runs-DoMVOCNj.mjs} +2 -2
  80. package/dist/{schemas-B8c7Z5Iy.mjs → schemas-U2OzP9gP.mjs} +3 -2
  81. package/dist/{skills-sync.handler-DOxudKmV.mjs → skills-sync.handler-CYkCeuQn.mjs} +1 -1
  82. package/dist/{skills.command-JwKWpGvU.mjs → skills.command-DeAgMGGw.mjs} +4 -4
  83. package/dist/{source-analysis-BBg2E_6G-Ut7kYHOz.mjs → source-analysis-BBg2E_6G-BJTRqWrQ.mjs} +3 -3
  84. package/dist/{source-analysis-Cs0CTBQk.mjs → source-analysis-BMMPIHN9.mjs} +1 -1
  85. package/dist/src-BHTjsZ9V.mjs +456 -0
  86. package/dist/{src-B0tNjKMg.mjs → src-BYQwp8Ig.mjs} +1 -1
  87. package/dist/{switch.handler-Cu81T2HY.mjs → switch.handler-CV4ZBXAu.mjs} +1 -1
  88. package/dist/{sync-CXNveL61.mjs → sync-KCVM02IY.mjs} +2 -2
  89. package/dist/{sync.handler-7g1yDt0H.mjs → sync.handler-Cuw89341.mjs} +6 -6
  90. package/dist/task-BSCN9cU4.mjs +945 -0
  91. package/dist/{task-target-build-BaMtXnN7.mjs → task-target-build-B0HF2_At.mjs} +41 -55
  92. package/dist/task-target-deploy-ClbwKJ8K.mjs +4 -0
  93. package/dist/{task-target-deploy-CZBGNC0H-I-tvkGCC.mjs → task-target-deploy-dQYnMO8n-CeTmRcDw.mjs} +15 -17
  94. package/dist/task-target-deploy-runner.mjs +6 -6
  95. package/dist/{test-A5hz3c7j.mjs → test-Rm3thni3.mjs} +2 -2
  96. package/dist/{test.handler-CJtaMZVy.mjs → test.handler-CTd-heRS.mjs} +8 -8
  97. package/dist/{test.handler-Cq2l7SAr.mjs → test.handler-DhhcsvHN.mjs} +1 -1
  98. package/dist/{tool.handler-B-mOL128.mjs → tool.handler-C3LNyQbc.mjs} +9 -63
  99. package/dist/{trigger-artifacts-RizI57RC-DjhOsdOm.mjs → trigger-artifacts-BcRScRSp-DqFgzl_B.mjs} +53 -119
  100. package/dist/trigger-manifest-DTni4NaZ.mjs +42 -0
  101. package/dist/{upgrade-DhfpoyRV.mjs → upgrade-Cf7y38xR.mjs} +2 -2
  102. package/dist/{upload-BbcMkyVl.mjs → upload-CJWApEgz.mjs} +1 -1
  103. package/dist/{upload.handler-D3-W_1kq.mjs → upload.handler-BHIWYPph.mjs} +7 -7
  104. package/dist/{users.get.handler-Bd0OBI-E.mjs → users.get.handler-spWaHG8h.mjs} +1 -1
  105. package/dist/{users.list.handler-CacJz6eC.mjs → users.list.handler-DLuU7cd_.mjs} +1 -1
  106. package/dist/{users.set-role.handler-bZMQtUR0.mjs → users.set-role.handler-CojFmpcD.mjs} +1 -1
  107. package/dist/{utils-BMUWnz1P.mjs → utils-Ddltm1sR.mjs} +1 -1
  108. package/dist/{validate.handler-Ccq66ki4.mjs → validate.handler-DIJBuX1P.mjs} +4 -4
  109. package/dist/{workflow-build-_WNsLKwW.mjs → workflow-build-IGYhEC8Y.mjs} +22 -22
  110. package/dist/{workflow-bundler-BzHk73PM-WI31RJjH.mjs → workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs} +2 -2
  111. package/dist/{workflows-Dy2M9bEr.mjs → workflows-MANdvLft.mjs} +19 -21
  112. package/dist/{writer-B-SpZ0G2-tq1MFgid.mjs → writer-byNNUjRm-w5O7-VT_.mjs} +24 -33
  113. package/package.json +11 -11
  114. package/dist/common-AK0q0Oz0.mjs +0 -20
  115. package/dist/credential-requirements-DrrQ9x9P.mjs +0 -250
  116. package/dist/cron-parser-Dw_cWzFu.mjs +0 -393
  117. package/dist/declared-credential-requirements-D6KT-r-e.mjs +0 -103
  118. package/dist/integrations-DRL3JmC8.mjs +0 -85
  119. package/dist/task-BguWXIiH.mjs +0 -486
  120. package/dist/task-target-deploy-DmpCWE3u.mjs +0 -4
  121. package/dist/trigger-manifest-Bq2zRbkV.mjs +0 -29
  122. package/dist/workflow-build-manifest-B2GqHyWE.mjs +0 -259
  123. /package/dist/{agent-manifest-tIsqF2OP.mjs → agent-manifest-CZ7BeUSG.mjs} +0 -0
  124. /package/dist/{browser-BpJ8ut9z.mjs → browser-Cu4k-wT_.mjs} +0 -0
  125. /package/dist/{clear-cache.handler-CTLQ1PIN.mjs → clear-cache.handler-8RFmjHoo.mjs} +0 -0
  126. /package/dist/{clear.handler-C_pXAeBG.mjs → clear.handler-mfNmIUYP.mjs} +0 -0
  127. /package/dist/{concurrency-gXn9Rw8x-BTlfau8D.mjs → concurrency-gXn9Rw8x-BSBbRfVp.mjs} +0 -0
  128. /package/dist/{credential-env-map-BA4LNI7x.mjs → credential-env-map-qLCR_QbO.mjs} +0 -0
  129. /package/dist/{credential-schema-mismatch-z74ud-YZ.mjs → credential-schema-mismatch-BHI_B-U-.mjs} +0 -0
  130. /package/dist/{diff-utils-B0ED-Igv.mjs → diff-utils-x5pi8SrL.mjs} +0 -0
  131. /package/dist/{layout-P1v-Gssz.mjs → layout-DRf9qUf8.mjs} +0 -0
  132. /package/dist/{list.handler-BLkQKiV1.mjs → list.handler-CynN-ezD.mjs} +0 -0
  133. /package/dist/{logs.handler-DyRoevtO.mjs → logs.handler-CcA1UzJm.mjs} +0 -0
  134. /package/dist/{oxc-B3KI3rf_-Cvx4Z-4H.mjs → oxc-B3KI3rf_-Cnk0L10M.mjs} +0 -0
  135. /package/dist/{read-credential-keys-77a91T8M-B0eiobOd.mjs → read-credential-keys-77a91T8M-CzXPGxdU.mjs} +0 -0
  136. /package/dist/{resolve-project-CNQtOWE4.mjs → resolve-project-CWP2fji3.mjs} +0 -0
  137. /package/dist/{rolldown-runtime-twds-ZHy-8uqgIurC.mjs → rolldown-runtime-twds-ZHy-BoF7MLzP.mjs} +0 -0
  138. /package/dist/{run-polling-DARidqo-.mjs → run-polling-CzyVv7Ba.mjs} +0 -0
  139. /package/dist/{schema-BjH_e4Fo.mjs → schema-CvSZqa3t.mjs} +0 -0
  140. /package/dist/{schema-display-NVEl_DFY.mjs → schema-display-DxLA3j5H.mjs} +0 -0
  141. /package/dist/{skill-installer-BBgN2tzW.mjs → skill-installer-CYFshTBy.mjs} +0 -0
  142. /package/dist/{skills.handler-Do9I3dQS.mjs → skills.handler-Bma-MJX-.mjs} +0 -0
  143. /package/dist/{spinner-progress-Bx-fYItP.mjs → spinner-progress-DV28G4tP.mjs} +0 -0
  144. /package/dist/{status.handler-BsVtDW_V.mjs → status.handler-BOV0eX3J.mjs} +0 -0
  145. /package/dist/{types-BMBuhHhW.mjs → types-DamInJD6.mjs} +0 -0
  146. /package/dist/{upgrade.handler-5qSzPC7D.mjs → upgrade.handler-Bz_oQcAw.mjs} +0 -0
@@ -1,486 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
4
- import { a as descriptionString, c as optionalDescriptionString, d as trimmedNonEmptyStringUnbounded, i as createStructuralSchema, n as credentialSetProxyConfigSchema, o as idNoSpacesString, s as jsonSchemaObject, t as CredentialSetManifestSchema, u as trimmedNonEmptyString } from "./schemas-B8c7Z5Iy.mjs";
5
- import { t as parseCronExpression } from "./cron-parser-Dw_cWzFu.mjs";
6
- import { z } from "zod";
7
- const SHA256HashSchema = z.string().length(64, "Must be 64 characters").regex(/^[a-f0-9]{64}$/i, "Must be hexadecimal").transform((value) => value);
8
- const JsonSchemaSchema = z.record(z.string(), z.unknown());
9
- z.object({
10
- constant: z.object({
11
- attempts: z.number().int().min(1).max(10),
12
- seconds: z.number().positive()
13
- }).optional(),
14
- exponential: z.object({
15
- attempts: z.number().int().min(1).max(10),
16
- base: z.number().min(1).optional(),
17
- multiplier: z.number().positive().optional()
18
- }).optional()
19
- }).refine((data) => {
20
- return data.constant !== void 0 !== (data.exponential !== void 0);
21
- }, { error: "Retry config must specify exactly one of constant or exponential strategy" });
22
- //#endregion
23
- //#region ../../packages/core/src/shared/schedule.ts
24
- /**
25
- * shared/schedule.ts
26
- *
27
- * Unified schedule type that supports both simple intervals and cron expressions.
28
- * Can be used in both cron and polling triggers for maximum flexibility.
29
- *
30
- * Template literal types provide compile-time type safety.
31
- * Zod schemas with refinements provide runtime validation.
32
- */
33
- const DurationSchema = z.union([z.number().int().positive().finite(), z.string().regex(/^[1-9]\d*[smhdwy]$/)]);
34
- 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) => {
35
- const match = val.match(/^(\d+)[smhdwy]$/);
36
- if (!match?.[1]) return false;
37
- const num = Number.parseInt(match[1], 10);
38
- return num > 0 && Number.isFinite(num);
39
- }, { message: "Duration value must be a positive integer greater than 0" });
40
- const CronExpressionSchema = z.string().superRefine((val, ctx) => {
41
- try {
42
- parseCronExpression(val);
43
- } catch (error) {
44
- const errorMessage = error instanceof Error ? error.message : "Invalid cron expression format";
45
- ctx.addIssue({
46
- code: "custom",
47
- message: `Invalid cron expression: ${errorMessage}. Must be a valid 5-field cron: minute hour day month weekday (e.g., "0 9 * * *", "*/15 * * * *")`
48
- });
49
- }
50
- });
51
- z.union([
52
- z.number().refine((val) => val > 0, { message: "Duration in milliseconds must be positive" }).refine(Number.isFinite, { message: "Duration in milliseconds must be finite" }).refine(Number.isInteger, { message: "Duration in milliseconds must be an integer" }),
53
- DurationStringSchema,
54
- CronExpressionSchema
55
- ]);
56
- z.enum([
57
- "UTC",
58
- "GMT",
59
- "Etc/UTC",
60
- "Etc/GMT",
61
- "America/New_York",
62
- "America/Chicago",
63
- "America/Denver",
64
- "America/Los_Angeles",
65
- "America/Phoenix",
66
- "America/Anchorage",
67
- "America/Toronto",
68
- "America/Vancouver",
69
- "America/Mexico_City",
70
- "America/Sao_Paulo",
71
- "America/Buenos_Aires",
72
- "Europe/London",
73
- "Europe/Paris",
74
- "Europe/Berlin",
75
- "Europe/Rome",
76
- "Europe/Madrid",
77
- "Europe/Amsterdam",
78
- "Europe/Stockholm",
79
- "Europe/Vienna",
80
- "Europe/Zurich",
81
- "Europe/Moscow",
82
- "Europe/Athens",
83
- "Europe/Dublin",
84
- "Asia/Tokyo",
85
- "Asia/Shanghai",
86
- "Asia/Hong_Kong",
87
- "Asia/Singapore",
88
- "Asia/Seoul",
89
- "Asia/Dubai",
90
- "Asia/Kolkata",
91
- "Asia/Bangkok",
92
- "Asia/Jakarta",
93
- "Asia/Manila",
94
- "Asia/Taipei",
95
- "Australia/Sydney",
96
- "Australia/Melbourne",
97
- "Australia/Brisbane",
98
- "Australia/Perth",
99
- "Australia/Adelaide",
100
- "Pacific/Auckland",
101
- "Pacific/Honolulu",
102
- "Africa/Cairo",
103
- "Africa/Johannesburg",
104
- "Africa/Lagos",
105
- "Africa/Nairobi",
106
- "Asia/Riyadh",
107
- "Asia/Tehran",
108
- "Asia/Jerusalem",
109
- "Asia/Doha"
110
- ]);
111
- //#endregion
112
- //#region ../../packages/core/src/artifacts/source-analysis.ts
113
- const SourceLocationSchema = z.object({
114
- filePath: z.string().min(1),
115
- absoluteFilePath: z.string().min(1).optional(),
116
- line: z.number().int().positive(),
117
- column: z.number().int().positive(),
118
- position: z.number().int().nonnegative().optional(),
119
- endLine: z.number().int().positive(),
120
- endColumn: z.number().int().positive(),
121
- endPosition: z.number().int().nonnegative().optional(),
122
- synthetic: z.boolean().optional()
123
- });
124
- z.string().min(1);
125
- const ImportSourceSchema = z.object({
126
- kind: z.enum([
127
- "local",
128
- "module-import",
129
- "namespace-import",
130
- "dynamic"
131
- ]),
132
- moduleSpecifier: z.string().min(1).optional(),
133
- importName: z.string().min(1).optional(),
134
- localName: z.string().min(1).optional(),
135
- resolvedPath: z.string().min(1).optional()
136
- });
137
- const CallKindSchema = z.enum([
138
- "workflow-step",
139
- "agent",
140
- "tool",
141
- "hook",
142
- "child-workflow",
143
- "function-call",
144
- "method-call",
145
- "dynamic-call",
146
- "parallel-call",
147
- "process-exit",
148
- "iife",
149
- "expression"
150
- ]);
151
- const CapturedVariableSourceKindSchema = z.enum([
152
- "local-const",
153
- "relative-import",
154
- "package-import"
155
- ]);
156
- const CapturedVariableValueTypeSchema = z.enum([
157
- "string",
158
- "number",
159
- "boolean",
160
- "object",
161
- "array",
162
- "function",
163
- "unknown"
164
- ]);
165
- z.object({
166
- name: z.string().min(1),
167
- value: z.union([
168
- z.string(),
169
- z.number(),
170
- z.boolean()
171
- ]).optional(),
172
- sourceText: z.string().optional(),
173
- valueType: CapturedVariableValueTypeSchema,
174
- resolvable: z.boolean(),
175
- source: CapturedVariableSourceKindSchema,
176
- importPath: z.string().optional(),
177
- declaration: z.object({
178
- filePath: z.string().min(1),
179
- line: z.number().int().positive()
180
- })
181
- });
182
- const IntegrationScopeSchema = z.enum([
183
- "organization",
184
- "project",
185
- "user_provided_credential"
186
- ]);
187
- const IntegrationCredentialRefSchema = z.discriminatedUnion("type", [z.object({
188
- type: z.literal("id"),
189
- id: z.string().startsWith("cset_")
190
- }), z.object({
191
- type: z.literal("name"),
192
- name: z.string().trim().min(1)
193
- })]);
194
- function hasProjectOrOrganizationScope(scope) {
195
- return scope === "organization" || scope === "project";
196
- }
197
- const CredentialRefTokenKeyNameSchema = z.string().regex(/^[A-Za-z0-9_]+$/, "Credential key must contain only letters, digits, and underscores (required for ref-token proxying)");
198
- /** Shared enum for top-level credential-set `onCredentialRevoked` policy. */
199
- const OnCredentialRevokedSchema = z.enum(["fail", "retry-once"]);
200
- /** A credential set after resolution in a built manifest. Contains definition id, scope, alias, and credential keys.*/
201
- const ResolvedCredentialSetSchema = z.object({
202
- resolvedId: z.string(),
203
- scope: IntegrationScopeSchema.optional(),
204
- alias: z.string().optional(),
205
- credentialRef: IntegrationCredentialRefSchema.optional(),
206
- /** Auth-shape keys expected post-resolve. */
207
- credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
208
- /** Subset of `credentialKeys` that are optional in the auth shape. */
209
- optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
210
- /** Auth-shaped vault keys required for vault reads and upload flows. */
211
- storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
212
- /** Subset of auth-shaped vault keys that may be absent from the vault without
213
- * failing resolution. Derived from the credential set's `auth` schema. */
214
- optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
215
- proxy: credentialSetProxyConfigSchema.optional(),
216
- /** When true, resolved values are passed raw (no ref-token proxy) for this set. */
217
- needsRawSecret: z.boolean().optional(),
218
- /** Policy when a step throws `CredentialRevokedError` against this credential set. */
219
- onCredentialRevoked: OnCredentialRevokedSchema.optional(),
220
- /** Persistence-layer schema fingerprint stamped at build time. The
221
- * resolver's phase 2 compares this against the vault row's stored
222
- * fingerprint and raises `CredentialSchemaMismatchError` on drift.
223
- * Optional here so pre-fingerprint artifacts still parse; the
224
- * workflow builder populates it for every authored credential set
225
- * that has a resolvable fingerprint. */
226
- schemaFingerprint: z.string().optional()
227
- }).superRefine((value, ctx) => {
228
- if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
229
- code: z.ZodIssueCode.custom,
230
- path: ["credentialRef"],
231
- message: "credentialRef requires scope to be \"project\" or \"organization\""
232
- });
233
- });
234
- z.object({
235
- credentialSetId: z.string(),
236
- /** Auth-shape keys expected post-resolve. */
237
- credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
238
- /** Optional subset of the auth-shape keys. */
239
- optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
240
- /** Stored-shape keys required for vault reads. */
241
- storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
242
- /** Optional subset of the stored-shape keys. */
243
- optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
244
- schemaFingerprint: z.string().optional(),
245
- /** Policy when a step throws `CredentialRevokedError` against this credential set. */
246
- onCredentialRevoked: OnCredentialRevokedSchema.optional(),
247
- proxy: credentialSetProxyConfigSchema.optional(),
248
- needsRawSecret: z.boolean().optional(),
249
- requiredOAuthScopes: z.array(z.string()).optional()
250
- });
251
- const CredentialRequirementEntrySchema = z.object({
252
- credentialSetId: z.string(),
253
- scope: IntegrationScopeSchema.optional(),
254
- alias: z.string().optional(),
255
- credentialRef: IntegrationCredentialRefSchema.optional(),
256
- /** Auth-shape keys expected post-resolve. */
257
- credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
258
- /** Optional subset of the auth-shape keys. */
259
- optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
260
- /** Auth-shaped vault keys required for vault reads. */
261
- storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
262
- /** Optional subset of the stored-shape keys. */
263
- optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
264
- schemaFingerprint: z.string().optional(),
265
- proxy: credentialSetProxyConfigSchema.optional(),
266
- needsRawSecret: z.boolean().optional(),
267
- /** Policy when a step throws `CredentialRevokedError` against this credential set. */
268
- onCredentialRevoked: OnCredentialRevokedSchema.optional(),
269
- requiredOAuthScopes: z.array(z.string()).optional()
270
- }).superRefine((value, ctx) => {
271
- if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
272
- code: z.ZodIssueCode.custom,
273
- path: ["credentialRef"],
274
- message: "credentialRef requires scope to be \"project\" or \"organization\""
275
- });
276
- });
277
- z.object({
278
- required: z.array(z.string()),
279
- byStep: z.record(z.string(), z.array(CredentialRequirementEntrySchema))
280
- });
281
- const TriggerCallbackNameSchema = z.enum([
282
- "filter",
283
- "idempotencyKey",
284
- "verify",
285
- "callback"
286
- ]);
287
- const TriggerCredentialRequirementEntrySchema = CredentialRequirementEntrySchema;
288
- const TriggerCredentialRequirementsSchema = z.object({
289
- required: z.array(z.string()),
290
- byCallback: z.partialRecord(TriggerCallbackNameSchema, z.array(TriggerCredentialRequirementEntrySchema))
291
- });
292
- const ExecutionIdentityPolicySchema = z.object({ subjectMode: z.enum(["never", "requiredWhenUserProvidedCredential"]) });
293
- z.object({
294
- nodeId: z.string().min(1),
295
- stepName: z.string().min(1),
296
- label: z.string().min(1),
297
- callKind: CallKindSchema,
298
- stepId: z.string().min(1).optional(),
299
- source: SourceLocationSchema.optional(),
300
- astKind: z.string().min(1).optional(),
301
- importSource: ImportSourceSchema.optional(),
302
- outputBinding: z.string().min(1).optional(),
303
- scopeOverride: IntegrationScopeSchema.optional(),
304
- description: z.string().optional(),
305
- sourceCode: z.string().optional(),
306
- exportName: z.string().optional(),
307
- inputSchema: JsonSchemaSchema.optional(),
308
- outputSchema: JsonSchemaSchema.optional(),
309
- credentialSets: z.array(ResolvedCredentialSetSchema).optional()
310
- });
311
- const TriggerTypeSchema = z.enum([
312
- "webhook",
313
- "cron",
314
- "polling"
315
- ]);
316
- /**
317
- * Persisted on `deployment_triggers.trigger_source`. Mirrors the
318
- * `webhookTrigger({ source: { type } })` discriminator so the server
319
- * can index-filter app-source rows during provider-webhook fanout.
320
- */
321
- const TriggerSourceSchema = z.enum(["custom", "app"]);
322
- const WebhookMethodSchema = z.enum([
323
- "GET",
324
- "POST",
325
- "PUT",
326
- "PATCH"
327
- ]);
328
- const TriggerCallbackBundleUploadSchema = z.object({
329
- code: z.string(),
330
- hash: z.string(),
331
- size: z.number()
332
- });
333
- const TriggerCallbackExportsSchema = z.object({
334
- verify: z.string().min(1).optional(),
335
- filter: z.string().min(1).optional(),
336
- idempotencyKey: z.string().min(1).optional(),
337
- callback: z.string().min(1).optional()
338
- });
339
- const TransformCallbackExportsSchema = z.object({ transform: z.string().min(1).optional() });
340
- z.object({
341
- id: z.string(),
342
- type: TriggerTypeSchema,
343
- /**
344
- * Source-of-truth discriminator for webhook triggers. `'custom'` means
345
- * the trigger owns its own HTTP path; `'app'` means it is fanned out by
346
- * a Keystroke-managed provider app. Undefined for non-webhook triggers.
347
- */
348
- triggerSource: TriggerSourceSchema.optional(),
349
- enabled: z.boolean(),
350
- path: z.string().optional(),
351
- method: WebhookMethodSchema.optional(),
352
- schedule: z.string().optional(),
353
- timezone: z.string().optional(),
354
- config: z.record(z.string(), z.unknown()).optional(),
355
- requiredCredentials: TriggerCredentialRequirementsSchema.optional(),
356
- storagePath: z.string().min(1).optional(),
357
- callbackBundle: TriggerCallbackBundleUploadSchema.optional(),
358
- callbackExports: TriggerCallbackExportsSchema.optional(),
359
- transformCallbackBundle: TriggerCallbackBundleUploadSchema.optional(),
360
- transformCallbackExports: TransformCallbackExportsSchema.optional()
361
- });
362
- //#endregion
363
- //#region ../../packages/core/src/trigger/schemas.ts
364
- const credentialSetInstanceSchema = createStructuralSchema([
365
- "id",
366
- "auth",
367
- "connections"
368
- ], "a CredentialSet instance");
369
- const TriggerModeDefaultSchema = z.enum(["managed", "subscribable"]);
370
- const TriggerCallbackPresenceSchema = z.object({
371
- filter: z.boolean(),
372
- idempotencyKey: z.boolean(),
373
- poll: z.boolean().optional(),
374
- transformAllowed: z.boolean(),
375
- verify: z.boolean().optional()
376
- });
377
- const TriggerRuntimeDescriptorSchema = z.object({ callbacks: TriggerCallbackPresenceSchema });
378
- const TriggerManifestSchema = z.object({
379
- manifestVersion: z.literal(1),
380
- type: z.literal("trigger"),
381
- triggerType: TriggerTypeSchema,
382
- name: trimmedNonEmptyString("Trigger name"),
383
- description: descriptionString("Trigger description"),
384
- enabled: z.boolean(),
385
- modeDefault: TriggerModeDefaultSchema,
386
- executionIdentityPolicy: ExecutionIdentityPolicySchema.optional(),
387
- credentialSets: z.array(CredentialSetManifestSchema).optional(),
388
- runtime: TriggerRuntimeDescriptorSchema
389
- });
390
- z.object({
391
- credentialSets: z.array(credentialSetInstanceSchema).optional(),
392
- description: descriptionString("Trigger description"),
393
- enabled: z.boolean().default(true),
394
- executionIdentityPolicy: ExecutionIdentityPolicySchema.optional(),
395
- modeDefault: TriggerModeDefaultSchema.default("managed"),
396
- name: trimmedNonEmptyString("Trigger name")
397
- });
398
- //#endregion
399
- //#region ../../packages/core/src/task/schemas.ts
400
- const agentInstanceSchema = createStructuralSchema([
401
- "id",
402
- "name",
403
- "systemPrompt",
404
- "model",
405
- "input",
406
- "output",
407
- "workflowSafeReference"
408
- ], "an Agent instance");
409
- const triggerInstanceSchema = createStructuralSchema([
410
- "isTrigger",
411
- "name",
412
- "description",
413
- "enabled"
414
- ], "a trigger instance (use cronTrigger(), pollingTrigger(), or webhookTrigger())");
415
- const taskLifecycleSchema = z.object({
416
- maxExecutions: z.number().int().positive().optional(),
417
- expiresAt: z.union([z.date(), z.string().datetime()]).optional(),
418
- expiresAfter: DurationSchema.optional()
419
- }).strict();
420
- z.object({
421
- id: idNoSpacesString("Task ID"),
422
- name: trimmedNonEmptyString("Task name"),
423
- description: optionalDescriptionString("Task description"),
424
- agent: agentInstanceSchema,
425
- prompt: trimmedNonEmptyStringUnbounded("Task prompt"),
426
- triggers: z.array(triggerInstanceSchema).min(1, { message: "At least one trigger is required" }),
427
- lifecycle: taskLifecycleSchema.optional(),
428
- tags: z.array(z.string()).optional()
429
- }).strict();
430
- const WorkflowSafeAgentReferenceSchema = z.object({
431
- kind: z.literal("agent"),
432
- authoredAgentId: z.string(),
433
- displayName: z.string(),
434
- runtimeKind: z.enum(["declarative", "runnable"]),
435
- inputSchema: jsonSchemaObject.optional(),
436
- outputSchema: jsonSchemaObject.optional(),
437
- authoredExport: z.object({
438
- exportName: z.string().optional(),
439
- filePath: z.string().optional()
440
- }).optional(),
441
- metadata: jsonSchemaObject.optional()
442
- }).strict();
443
- const TaskBuildInfoStubSchema = z.object({
444
- hash: SHA256HashSchema.optional(),
445
- size: z.number().optional(),
446
- metadata: jsonSchemaObject.optional()
447
- }).strict();
448
- /**
449
- * Extended trigger manifest schema for tasks.
450
- * Preserves runtime fields (schedule, timezone, path, method) that the base
451
- * TriggerManifestSchema strips. Tasks need these for trigger evaluation at runtime.
452
- */
453
- const TaskTriggerManifestSchema = TriggerManifestSchema.extend({
454
- runtime: TriggerRuntimeDescriptorSchema.extend({
455
- schedule: z.string().optional(),
456
- timezone: z.string().optional(),
457
- path: z.string().optional(),
458
- method: z.string().optional(),
459
- input: z.unknown().optional(),
460
- payloadMode: z.string().optional()
461
- }),
462
- /** Static payload for cron triggers */
463
- payload: z.unknown().optional()
464
- });
465
- const TaskBuildManifestSchema = z.object({
466
- manifestVersion: z.literal(1),
467
- type: z.literal("task"),
468
- id: z.string().min(1),
469
- name: z.string().min(1),
470
- description: z.string().optional(),
471
- agentRef: WorkflowSafeAgentReferenceSchema,
472
- prompt: z.string().min(1),
473
- triggers: z.array(TaskTriggerManifestSchema),
474
- lifecycle: z.object({
475
- maxExecutions: z.number().int().positive().optional(),
476
- expiresAt: z.string().optional(),
477
- expiresAfter: z.string().optional()
478
- }).strict().optional(),
479
- tags: z.array(z.string()).optional(),
480
- buildInfo: TaskBuildInfoStubSchema
481
- }).strict();
482
- //#endregion
483
- //#region ../../packages/core/src/task/index.ts
484
- var task_exports = /* @__PURE__ */ __exportAll({ TaskBuildManifestSchema: () => TaskBuildManifestSchema });
485
- //#endregion
486
- export { TaskBuildManifestSchema as n, task_exports as t };
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { n as deployTaskTargets } from "./task-target-deploy-CZBGNC0H-I-tvkGCC.mjs";
4
- export { deployTaskTargets };
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { a as TriggerCredentialRequirementsSchema, l as WebhookMethodSchema, o as TriggerSourceSchema, s as TriggerTypeSchema } from "./credential-requirements-DrrQ9x9P.mjs";
4
- import { z } from "zod";
5
- //#region ../../packages/shared-types/src/workflows/build-output/trigger-manifest.ts
6
- const TriggerBuildFunctionSchema = z.object({
7
- js: z.string().min(1),
8
- export: z.string().min(1)
9
- });
10
- const TriggerBuildManifestSchema = z.object({
11
- id: z.string().min(1),
12
- type: TriggerTypeSchema,
13
- /**
14
- * Webhook source discriminator (`'custom' | 'app'`). Undefined for
15
- * non-webhook triggers.
16
- */
17
- triggerSource: TriggerSourceSchema.optional(),
18
- enabled: z.boolean().default(true),
19
- path: z.string().optional(),
20
- method: WebhookMethodSchema.optional(),
21
- schedule: z.string().optional(),
22
- timezone: z.string().optional(),
23
- config: z.record(z.string(), z.unknown()).optional(),
24
- requiredCredentials: TriggerCredentialRequirementsSchema.optional(),
25
- functions: z.record(z.string(), TriggerBuildFunctionSchema).optional(),
26
- attachmentFunctions: z.record(z.string(), TriggerBuildFunctionSchema).optional()
27
- });
28
- //#endregion
29
- export { TriggerBuildManifestSchema as t };