@keystrokehq/cli 0.0.1 → 0.0.3

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 (151) hide show
  1. package/AGENTS-blurb.md +1 -1
  2. package/LICENSE +0 -21
  3. package/README.md +14 -6
  4. package/dist/accept.handler-DFtM0IuO.mjs +22 -0
  5. package/dist/admin-D_7tenRC.mjs +208 -0
  6. package/dist/{agent-manifest-CDnbkR2f.mjs → agent-manifest-Bfa3DBgc.mjs} +4 -4
  7. package/dist/{agents-CZJGxVqV.mjs → agents-DMEo-6QB.mjs} +8 -8
  8. package/dist/api-keys-BThGvtdn.mjs +58 -0
  9. package/dist/{auth-DN2VusyU.mjs → auth-CY0Gg9sN.mjs} +7 -11
  10. package/dist/{auth.handler-CT1BQUvu.mjs → auth.handler-CbhiLOG1.mjs} +83 -8
  11. package/dist/{build-agents-BmM_AsSd-BGi9wtzt.mjs → build-agents-DfbiMZ_e-CRnzruSu.mjs} +7 -7
  12. package/dist/{build-metadata-BWS7uhd_-DR8gJjTX.mjs → build-metadata-zidV9Cai-RgG4ndIH.mjs} +11 -11
  13. package/dist/{build-progress-DgYKb4hB.mjs → build-progress-Cn2j1LqF.mjs} +1 -1
  14. package/dist/{build-tasks-CdihpudT-D5r5HUHe.mjs → build-tasks-O1jYtlv1-Y65uGWuz.mjs} +4 -5
  15. package/dist/{build-workflows-CfxBnIWh-CdYPv8w2.mjs → build-workflows-3fdvdHHf-DJ_lH1NH.mjs} +9 -9
  16. package/dist/{build.handler-4799CjWH.mjs → build.handler-Tb3IpABI.mjs} +5 -5
  17. package/dist/{clear-cache.handler-B9tqSoSM.mjs → clear-cache.handler-BEbPz5Ej.mjs} +1 -1
  18. package/dist/{clear.handler-BydlX-zE.mjs → clear.handler-CtOZ4aRn.mjs} +1 -1
  19. package/dist/{clear.handler-BTIXXPTJ.mjs → clear.handler-YS8gPriq.mjs} +2 -2
  20. package/dist/{commander-DfTVqQ-3.mjs → commander-DZ3F3CVq.mjs} +6 -5
  21. package/dist/common-BrVAdUyD.mjs +20 -0
  22. package/dist/{connect-BUXkeH0F.mjs → connect-DpQgYg8z.mjs} +3 -3
  23. package/dist/{connect.handler-CYel9cy6.mjs → connect.handler-DuRr_yyN.mjs} +5 -5
  24. package/dist/{context-T7HZuB97.mjs → context-Y1f1hGYy.mjs} +7 -7
  25. package/dist/create.handler-uNG3I4wS.mjs +24 -0
  26. package/dist/credential-requirements-DjDFthio.mjs +480 -0
  27. package/dist/{credential-schema-mismatch-BKo5PjcQ.mjs → credential-schema-mismatch-B-wwbCvw.mjs} +2 -2
  28. package/dist/{credentials-OfVHOtG3.mjs → credentials-DHlK_O4L.mjs} +823 -14
  29. package/dist/{credentials-CvmjU0lK.mjs → credentials-UpgEcaub.mjs} +7 -7
  30. package/dist/{current-deployment-workflow-poHt27i3.mjs → current-deployment-workflow-M8GEIHxv.mjs} +5 -5
  31. package/dist/{current.handler-B8zKzfPp.mjs → current.handler-BqPUKCvn.mjs} +1 -1
  32. package/dist/declared-credential-requirements-Bwlb-KZE.mjs +132 -0
  33. package/dist/default-urls-BS4twrsS.mjs +7 -0
  34. package/dist/{delete.handler-bAu1iXVQ.mjs → delete.handler-CJTHVZaz.mjs} +1 -1
  35. package/dist/{deploy-7Jjls436.mjs → deploy-CdnaZY3s.mjs} +1 -1
  36. package/dist/{deploy-BOPIpRWm.mjs → deploy-Gw0KPrkf.mjs} +2 -2
  37. package/dist/{deploy-progress-BmGUNFKg.mjs → deploy-progress-CZ2rPlOj.mjs} +1 -1
  38. package/dist/{deploy.handler-BAzgiNhd.mjs → deploy.handler-zzFAt7pp.mjs} +18 -18
  39. package/dist/{detect-env-access-CwkOYeYM-D_BCZqV6.mjs → detect-env-access-CwkOYeYM-h2W05D_Q.mjs} +1 -1
  40. package/dist/{diff.handler-Du7SY8K4.mjs → diff.handler--zdSkUnK.mjs} +5 -5
  41. package/dist/{dist-CUK7yBM0.mjs → dist-BF6r1hfv.mjs} +3 -3
  42. package/dist/{dist-BkJUoBiG.mjs → dist-C2Dq_nx3.mjs} +12 -12
  43. package/dist/{env-91KwMKov.mjs → env-YTZGKGIu.mjs} +9 -10
  44. package/dist/{env.handler-BAzBuMzQ.mjs → env.handler-d4sJ706C.mjs} +8 -8
  45. package/dist/{error-boundary-VL-JLfIa.mjs → error-boundary-B9PgBkv8.mjs} +2 -2
  46. package/dist/{file-metadata-D1vm-XY2.mjs → file-metadata-CdFXMMIw.mjs} +1 -1
  47. package/dist/hosted-action-dispatcher-registry-TOVzMhUR.mjs +126 -0
  48. package/dist/iam-command-utils-CNC8JfZ5.mjs +72 -0
  49. package/dist/{import-module-CV84H5fZ-B_CBCmb4.mjs → import-module-DDPnzlJ1-CYJD2n2b.mjs} +395 -10
  50. package/dist/{init-DpMCotSK.mjs → init-C0sps8R7.mjs} +2 -2
  51. package/dist/{init.handler-CPRnif52.mjs → init.handler-DSW6XFZn.mjs} +17 -17
  52. package/dist/{inspect.handler-DT_cD036.mjs → inspect.handler-DbN0ZVTh.mjs} +5 -5
  53. package/dist/{integration-catalog-Bt-L3GjF.mjs → integration-catalog-DFlytKJS.mjs} +2 -2
  54. package/dist/{integrations-DlatPK4W.mjs → integrations-Dcadds2b.mjs} +5 -5
  55. package/dist/invites-DvsxTRAb.mjs +44 -0
  56. package/dist/invites.list.handler-B5quln3m.mjs +43 -0
  57. package/dist/invites.resend.handler-CSpj7bQ5.mjs +23 -0
  58. package/dist/invites.revoke.handler-_hdEkBdO.mjs +28 -0
  59. package/dist/keystroke.mjs +31 -22
  60. package/dist/{list-enrichment-y-cwizLr.mjs → list-enrichment-CTqx0Rk_.mjs} +1 -1
  61. package/dist/{list.handler-CWF_Dj15.mjs → list.handler-08GY-wnx.mjs} +1 -1
  62. package/dist/{list.handler-DWaQkJaR.mjs → list.handler-20v4uRMk.mjs} +2 -2
  63. package/dist/{list.handler-BTWvCyjA.mjs → list.handler-BRq-nScx.mjs} +5 -5
  64. package/dist/{list.handler-lq3ZGAn4.mjs → list.handler-CWO6DExh.mjs} +3 -3
  65. package/dist/{list.handler-CZ6G2x_G.mjs → list.handler-DAiJtW20.mjs} +3 -3
  66. package/dist/list.handler-DLl8ca6F.mjs +42 -0
  67. package/dist/{list.handler-DqbFcBW7.mjs → list.handler-DSPr0OxS.mjs} +7 -7
  68. package/dist/{logs-BEg9L5l8.mjs → logs-D_48skmi.mjs} +3 -3
  69. package/dist/{logs.handler-BD_dXiL1.mjs → logs.handler-4ctMVYMj.mjs} +3 -3
  70. package/dist/{logs.handler-6hoMBzqw.mjs → logs.handler-C3QnSCaH.mjs} +1 -1
  71. package/dist/members.add.handler-Dq_giQ8g.mjs +31 -0
  72. package/dist/members.invite.handler-v404bUsq.mjs +32 -0
  73. package/dist/members.list.handler-D6TE0yp8.mjs +43 -0
  74. package/dist/members.remove.handler-BhQ3cyeR.mjs +28 -0
  75. package/dist/members.update.handler-BVy2cv1K.mjs +28 -0
  76. package/dist/{metadata-layout-GUYIUo0i-_aG2zjue.mjs → metadata-layout-C6ed-9dl-aBmqqvD5.mjs} +2 -2
  77. package/dist/{normalize-path-CojS-CgQ-DLCOvnD1.mjs → normalize-path-CojS-CgQ-BKRFUzWW.mjs} +1 -1
  78. package/dist/org-CkRr-f3S.mjs +234 -0
  79. package/dist/orgs.create.handler-swGnT2ce.mjs +26 -0
  80. package/dist/orgs.get.handler-ClAqYTH0.mjs +28 -0
  81. package/dist/orgs.list.handler-D-ptz8It.mjs +41 -0
  82. package/dist/{paused.handler-BMFm9Cff.mjs → paused.handler-B3aVqw-m.mjs} +2 -2
  83. package/dist/{project-config-D1qsQlO7.mjs → project-config-opj6DsPF.mjs} +2 -2
  84. package/dist/{projects-CHkRE9rS.mjs → projects-Bdl6-Z8l.mjs} +2 -2
  85. package/dist/{projects-Cjb7sovS.mjs → projects-yA9AAaDM.mjs} +5 -5
  86. package/dist/{register.handler-BPCdor1_.mjs → register.handler-WzpvVXHx.mjs} +1 -1
  87. package/dist/{requirements.handler-DPXdSks3.mjs → requirements.handler-coArDE8x.mjs} +7 -7
  88. package/dist/{resolve-project-DDJ29sCF.mjs → resolve-project-DgfftdPm.mjs} +2 -2
  89. package/dist/{runs-D9hNLb9A.mjs → runs-B8mW4PqP.mjs} +3 -3
  90. package/dist/schedule-BRN4hzQM.mjs +505 -0
  91. package/dist/schema-_FQrHcIS.mjs +17 -0
  92. package/dist/schema-kbMHVnhm.mjs +81 -0
  93. package/dist/schemas-DsvCZfF0.mjs +42 -0
  94. package/dist/{skills-sync.handler-DIy8GR16.mjs → skills-sync.handler-C2faeat-.mjs} +2 -2
  95. package/dist/{skills.command-CrjI2dN9.mjs → skills.command-DWxcc3Ui.mjs} +4 -4
  96. package/dist/source-analysis-BspLa3E5.mjs +75 -0
  97. package/dist/{source-analysis-Cj-ADyu--BJQcFPCG.mjs → source-analysis-DEEChuND-eixwPnPP.mjs} +5 -5
  98. package/dist/{src-eHwu-Gfw.mjs → src-J09NGJ6Z.mjs} +42 -6
  99. package/dist/{switch.handler-D_9213Vf.mjs → switch.handler-C4hgbhcH.mjs} +2 -2
  100. package/dist/{sync-BL_Mo5st.mjs → sync-CL6zXiiA.mjs} +2 -2
  101. package/dist/{sync.handler-BUFPdzWz.mjs → sync.handler-D1uF8E8I.mjs} +8 -8
  102. package/dist/{schemas-CDib1RhE.mjs → task-DsrXI6XH.mjs} +10 -39
  103. package/dist/{task-target-build-CBeCKbu2.mjs → task-target-build-DTzz4fpG.mjs} +4 -4
  104. package/dist/task-target-deploy-BPLlP__P.mjs +4 -0
  105. package/dist/{task-target-deploy-CA6elFpF-BEr4gkol.mjs → task-target-deploy-Bf5i3ox1-BU16VPsE.mjs} +2 -3
  106. package/dist/task-target-deploy-runner.mjs +15 -14
  107. package/dist/{test-BHTgR3UA.mjs → test-BsTLXIPB.mjs} +31 -31
  108. package/dist/{test.handler-BcPQ8b74.mjs → test.handler-D25kziPi.mjs} +1 -1
  109. package/dist/{trigger-artifacts-DQPbQNqC-B4yeeFBY.mjs → trigger-artifacts-B3OCTX9K-DG-FGGJT.mjs} +5 -5
  110. package/dist/{trigger-manifest-CY7brZeg.mjs → trigger-manifest-CXD9I7Rb.mjs} +1 -2
  111. package/dist/{try-deploy.handler-DqybNhXx.mjs → try-deploy.handler-2aX5TmLk.mjs} +11 -11
  112. package/dist/{upload.handler-DCtiznQp.mjs → upload.handler-CqProKVJ.mjs} +10 -10
  113. package/dist/users.get.handler-C_d2GWKX.mjs +24 -0
  114. package/dist/users.list.handler-DXAsO8Yk.mjs +36 -0
  115. package/dist/users.set-role.handler-Bn_yV4RI.mjs +27 -0
  116. package/dist/{utils-CywxCDM7.mjs → utils-DlYHjGg9.mjs} +2 -2
  117. package/dist/{validate.handler-DOcTaJL0.mjs → validate.handler-CGD6GttR.mjs} +5 -5
  118. package/dist/{workflow-build-DBQaBfnn.mjs → workflow-build-BcaIdRR6.mjs} +22 -45
  119. package/dist/{workflow-bundler-BPiqVscj-X1PFFAuP.mjs → workflow-bundler-BzHk73PM-Cde7cKiU.mjs} +4 -4
  120. package/dist/{_manifest-JSRE3H8k.mjs → workflow-manifest-CAW5FlX0.mjs} +7 -131
  121. package/dist/{workflows-g9z87AJJ.mjs → workflows-S-gbfw8f.mjs} +16 -15
  122. package/dist/{writer-BG8poUm3-BbXlU2kI.mjs → writer-CtvttJdP-DrJruQgR.mjs} +8 -8
  123. package/package.json +9 -11
  124. package/THIRD_PARTY_NOTICES.md +0 -16
  125. package/dist/api-keys-D2lgguuY.mjs +0 -40
  126. package/dist/org-xLzBtt2_.mjs +0 -41
  127. package/dist/schedule-BXx3uXwr.mjs +0 -1142
  128. package/dist/src-C0X6u_Mw.mjs +0 -1340
  129. package/dist/task-B2sZMaZu.mjs +0 -8
  130. package/dist/task-target-deploy-C5X-USeR.mjs +0 -4
  131. /package/dist/{agent-bundle-package-DWV6B_5q-BtV7Xycc.mjs → agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs} +0 -0
  132. /package/dist/{browser-qwFrUH82.mjs → browser-gddMccBQ.mjs} +0 -0
  133. /package/dist/{concurrency-gXn9Rw8x-DNl2YtrS.mjs → concurrency-gXn9Rw8x-BTlfau8D.mjs} +0 -0
  134. /package/dist/{constants-CPpPdSNg.mjs → constants-DHdiT5hc.mjs} +0 -0
  135. /package/dist/{credential-env-map-CI8yWHVy.mjs → credential-env-map-C8P7uTD-.mjs} +0 -0
  136. /package/dist/{diff-utils-NEfcjqxt.mjs → diff-utils-DWNcRA8g.mjs} +0 -0
  137. /package/dist/{get-intrinsic-zLxwtrLK.mjs → get-intrinsic-ZMBBjBEr.mjs} +0 -0
  138. /package/dist/{layout-CbMtQ2tm.mjs → layout-B95Tku8F.mjs} +0 -0
  139. /package/dist/{options-CeaTcFxP.mjs → options-Dn9t3K4a.mjs} +0 -0
  140. /package/dist/{output-DM4b7KgY.mjs → output-q4KljAhu.mjs} +0 -0
  141. /package/dist/{oxc-B3KI3rf_-n9d1hKNq.mjs → oxc-B3KI3rf_-BeimiQ2U.mjs} +0 -0
  142. /package/dist/{read-credential-keys-77a91T8M-KA0Iw0Z1.mjs → read-credential-keys-77a91T8M-CAJLnMRi.mjs} +0 -0
  143. /package/dist/{rolldown-runtime-twds-ZHy-BWWzu8VG.mjs → rolldown-runtime-twds-ZHy-8uqgIurC.mjs} +0 -0
  144. /package/dist/{run-polling-CAgFRdK3.mjs → run-polling-CTzhTgyN.mjs} +0 -0
  145. /package/dist/{schema-17qMfNyI.mjs → schema-Di90TXoX.mjs} +0 -0
  146. /package/dist/{schema-display-CgmeKigW.mjs → schema-display-D4A1gQEM.mjs} +0 -0
  147. /package/dist/{skills.handler-Bz8bJKql.mjs → skills.handler-8KCSF7wp.mjs} +0 -0
  148. /package/dist/{spinner-progress-DMVwgqO9.mjs → spinner-progress-bvKd1jXc.mjs} +0 -0
  149. /package/dist/{status.handler-BO4nwvWn.mjs → status.handler-D9GBEmao.mjs} +0 -0
  150. /package/dist/{sync-keystroke-agent-skills-Kx_H7UTd.mjs → sync-keystroke-agent-skills-CY9h25_5.mjs} +0 -0
  151. /package/dist/{upload-CkU--iDC.mjs → upload-B8fiWveA.mjs} +0 -0
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as readOptionalJsonSchemaKeys } from "./_manifest-JSRE3H8k.mjs";
4
- import { t as __exportAll } from "./rolldown-runtime-twds-ZHy-BWWzu8VG.mjs";
5
- import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-KA0Iw0Z1.mjs";
6
- import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-D_BCZqV6.mjs";
3
+ import { n as readOptionalJsonSchemaKeys } from "./declared-credential-requirements-Bwlb-KZE.mjs";
4
+ import { t as __exportAll } from "./rolldown-runtime-twds-ZHy-8uqgIurC.mjs";
5
+ import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-CAJLnMRi.mjs";
6
+ import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-h2W05D_Q.mjs";
7
7
  import { createHash } from "node:crypto";
8
8
  import { rolldown } from "rolldown";
9
- //#region ../../packages/workflow-builder/dist/trigger-artifacts-DQPbQNqC.mjs
9
+ //#region ../../packages/workflow-builder/dist/trigger-artifacts-B3OCTX9K.mjs
10
10
  async function bundleTriggerCallbacks(options) {
11
11
  return bundleCallbacks(options.filePath, options.projectRoot, options.exportNames, options.triggerExportName, options.workflowExtraction);
12
12
  }
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { d as TriggerSourceSchema, f as TriggerTypeSchema, m as WebhookMethodSchema, u as TriggerCredentialRequirementsSchema } from "./schedule-BXx3uXwr.mjs";
4
- import "./_manifest-JSRE3H8k.mjs";
3
+ import { c as TriggerTypeSchema, o as TriggerCredentialRequirementsSchema, s as TriggerSourceSchema, u as WebhookMethodSchema } from "./credential-requirements-DjDFthio.mjs";
5
4
  import { z } from "zod";
6
5
  //#region ../../packages/shared-types/src/workflows/build-output/trigger-manifest.ts
7
6
  const TriggerBuildFunctionSchema = z.object({
@@ -2,17 +2,17 @@
2
2
 
3
3
  import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
4
4
  import { C as CliExitError, h as toErrorMessage, t as ui, w as InputValidationError } from "./keystroke.mjs";
5
- import { d as trackProject } from "./dist-CUK7yBM0.mjs";
6
- import { t as assertWorkflowProjectRoot } from "./project-config-D1qsQlO7.mjs";
7
- import { a as readManifestsFromOutDir, o as readWorkflowsFromDisk, s as uploadTestBundle } from "./dist-BkJUoBiG.mjs";
8
- import { t as requireWorkflowsDir } from "./resolve-project-DDJ29sCF.mjs";
9
- import { a as runWorkflowBuild, t as WorkflowNotFoundError } from "./workflow-build-DBQaBfnn.mjs";
10
- import { a as validateRequiredFields, n as formatValidationError, r as isUnknownSchema, t as formatMissingInputError } from "./schema-display-CgmeKigW.mjs";
11
- import { r as isLocalMode } from "./env-91KwMKov.mjs";
12
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-T7HZuB97.mjs";
13
- import { t as createBuildProgress } from "./build-progress-DgYKb4hB.mjs";
14
- import { t as withErrorBoundary } from "./error-boundary-VL-JLfIa.mjs";
15
- import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-CAgFRdK3.mjs";
5
+ import { d as trackProject } from "./dist-BF6r1hfv.mjs";
6
+ import { t as assertWorkflowProjectRoot } from "./project-config-opj6DsPF.mjs";
7
+ import { r as isLocalMode } from "./env-YTZGKGIu.mjs";
8
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-Y1f1hGYy.mjs";
9
+ import { a as readManifestsFromOutDir, o as readWorkflowsFromDisk, s as uploadTestBundle } from "./dist-C2Dq_nx3.mjs";
10
+ import { t as requireWorkflowsDir } from "./resolve-project-DgfftdPm.mjs";
11
+ import { a as runWorkflowBuild, t as WorkflowNotFoundError } from "./workflow-build-BcaIdRR6.mjs";
12
+ import { a as validateRequiredFields, n as formatValidationError, r as isUnknownSchema, t as formatMissingInputError } from "./schema-display-D4A1gQEM.mjs";
13
+ import { t as createBuildProgress } from "./build-progress-Cn2j1LqF.mjs";
14
+ import { t as withErrorBoundary } from "./error-boundary-B9PgBkv8.mjs";
15
+ import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-CTzhTgyN.mjs";
16
16
  import * as fs from "node:fs/promises";
17
17
  import * as path$1 from "node:path";
18
18
  import { z } from "zod";
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { D as throwReportedCliExit, h as toErrorMessage, t as ui } from "./keystroke.mjs";
4
- import { t as assertWorkflowProjectRoot } from "./project-config-D1qsQlO7.mjs";
5
- import { a as writeJsonError, i as writeJson } from "./output-DM4b7KgY.mjs";
6
- import { a as readManifestsFromOutDir, t as collectCredentialFingerprintMapFromProjectDist } from "./dist-BkJUoBiG.mjs";
7
- import { t as requireWorkflowsDir } from "./resolve-project-DDJ29sCF.mjs";
8
- import { n as getProcessEnv } from "./env-91KwMKov.mjs";
9
- import { i as requireClient } from "./context-T7HZuB97.mjs";
10
- import { t as getIntegrationCatalog } from "./integration-catalog-Bt-L3GjF.mjs";
11
- import { t as readCredentialEnvMap } from "./credential-env-map-CI8yWHVy.mjs";
12
- import { a as verifyCredentialResolvable, i as validateManualCredentialWithHook, n as resolveCredentialValuesFromEnv, r as uploadCredential, t as groupCredentialRequirements } from "./credentials-OfVHOtG3.mjs";
13
- import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-BKo5PjcQ.mjs";
4
+ import { t as assertWorkflowProjectRoot } from "./project-config-opj6DsPF.mjs";
5
+ import { a as writeJsonError, i as writeJson } from "./output-q4KljAhu.mjs";
6
+ import { n as getProcessEnv } from "./env-YTZGKGIu.mjs";
7
+ import { i as requireClient } from "./context-Y1f1hGYy.mjs";
8
+ import { a as readManifestsFromOutDir, t as collectCredentialFingerprintMapFromProjectDist } from "./dist-C2Dq_nx3.mjs";
9
+ import { t as requireWorkflowsDir } from "./resolve-project-DgfftdPm.mjs";
10
+ import { a as verifyCredentialResolvable, i as validateManualCredentialWithHook, n as resolveCredentialValuesFromEnv, r as uploadCredential, t as groupCredentialRequirements } from "./credentials-DHlK_O4L.mjs";
11
+ import { t as getIntegrationCatalog } from "./integration-catalog-DFlytKJS.mjs";
12
+ import { t as readCredentialEnvMap } from "./credential-env-map-C8P7uTD-.mjs";
13
+ import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-B-wwbCvw.mjs";
14
14
  import * as path$1 from "node:path";
15
15
  import { confirm, isCancel } from "@clack/prompts";
16
16
  //#region src/commands/credentials/upload/upload.handler.ts
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { t as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-q4KljAhu.mjs";
5
+ import { i as requireClient } from "./context-Y1f1hGYy.mjs";
6
+ import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CNC8JfZ5.mjs";
7
+ //#region src/commands/admin/users.get.handler.ts
8
+ async function handleAdminUsersGet(options, ctx) {
9
+ const client = requireClient(ctx);
10
+ try {
11
+ const result = await client.admin.users.get(options.userId);
12
+ if (isIamJsonMode(options, ctx)) {
13
+ writeJson(result);
14
+ return;
15
+ }
16
+ ui.text(`User: ${result.user.email}`);
17
+ ui.text(`ID: ${result.user.id}`);
18
+ ui.text(`System role: ${result.user.role}`);
19
+ } catch (error) {
20
+ await handleIamError(error, ctx, "Failed to get platform user");
21
+ }
22
+ }
23
+ //#endregion
24
+ export { handleAdminUsersGet };
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { t as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-q4KljAhu.mjs";
5
+ import { i as requireClient } from "./context-Y1f1hGYy.mjs";
6
+ import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CNC8JfZ5.mjs";
7
+ import Table from "cli-table3";
8
+ //#region src/commands/admin/users.list.handler.ts
9
+ async function handleAdminUsersList(options, ctx) {
10
+ const client = requireClient(ctx);
11
+ try {
12
+ const result = await client.admin.users.list();
13
+ if (isIamJsonMode(options, ctx)) {
14
+ writeJson(result);
15
+ return;
16
+ }
17
+ const table = new Table({
18
+ head: [
19
+ "Email",
20
+ "ID",
21
+ "System role"
22
+ ],
23
+ style: { head: [] }
24
+ });
25
+ for (const user of result.users) table.push([
26
+ user.email,
27
+ user.id,
28
+ user.role
29
+ ]);
30
+ ui.text(table.toString());
31
+ } catch (error) {
32
+ await handleIamError(error, ctx, "Failed to list platform users");
33
+ }
34
+ }
35
+ //#endregion
36
+ export { handleAdminUsersList };
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { t as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-q4KljAhu.mjs";
5
+ import { i as requireClient } from "./context-Y1f1hGYy.mjs";
6
+ import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CNC8JfZ5.mjs";
7
+ //#region src/commands/admin/users.set-role.handler.ts
8
+ async function handleAdminUsersSetRole(options, ctx) {
9
+ const client = requireClient(ctx);
10
+ requireConfirmation({
11
+ confirmed: options.confirm,
12
+ message: "Changing a system role changes platform-level access.",
13
+ ctx
14
+ });
15
+ try {
16
+ const result = await client.admin.users.setRole(options.userId, { role: options.role });
17
+ if (isIamJsonMode(options, ctx)) {
18
+ writeJson(result);
19
+ return;
20
+ }
21
+ ui.success(`Updated ${result.user.email} to system role ${result.user.role}`);
22
+ } catch (error) {
23
+ await handleIamError(error, ctx, "Failed to update platform user role");
24
+ }
25
+ }
26
+ //#endregion
27
+ export { handleAdminUsersSetRole };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { i as readProjectConfig } from "./project-config-D1qsQlO7.mjs";
4
- import { h as resolveBuildOutputDir } from "./layout-CbMtQ2tm.mjs";
3
+ import { i as readProjectConfig } from "./project-config-opj6DsPF.mjs";
4
+ import { h as resolveBuildOutputDir } from "./layout-B95Tku8F.mjs";
5
5
  import path from "node:path";
6
6
  //#region ../../packages/project-config/src/utils.ts
7
7
  function resolveConfiguredBuildOutputDir(projectRoot, buildConfig) {
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { D as throwReportedCliExit, h as toErrorMessage, t as ui } from "./keystroke.mjs";
4
- import { d as trackProject } from "./dist-CUK7yBM0.mjs";
5
- import { i as writeJson } from "./output-DM4b7KgY.mjs";
6
- import { t as requireWorkflowsDir } from "./resolve-project-DDJ29sCF.mjs";
7
- import { s as build, t as WorkflowNotFoundError } from "./workflow-build-DBQaBfnn.mjs";
8
- import { t as createBuildProgress } from "./build-progress-DgYKb4hB.mjs";
4
+ import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
+ import { i as writeJson } from "./output-q4KljAhu.mjs";
6
+ import { t as requireWorkflowsDir } from "./resolve-project-DgfftdPm.mjs";
7
+ import { s as build, t as WorkflowNotFoundError } from "./workflow-build-BcaIdRR6.mjs";
8
+ import { t as createBuildProgress } from "./build-progress-Cn2j1LqF.mjs";
9
9
  import { mkdtemp, rm } from "node:fs/promises";
10
10
  import * as os from "node:os";
11
11
  import * as path$1 from "node:path";
@@ -2,20 +2,20 @@
2
2
 
3
3
  import { i as __toESM, n as __exportAll } from "./chunk-CH6r78ws.mjs";
4
4
  import { a as originalConsole, h as toErrorMessage, i as logger, o as ANSI, s as style, t as ui } from "./keystroke.mjs";
5
- import { a as getKeystrokeTmpDir } from "./dist-CUK7yBM0.mjs";
6
- import { t as assertWorkflowProjectRoot } from "./project-config-D1qsQlO7.mjs";
7
- import { c as FlowGraphSchema, s as WorkflowManifestSchema } from "./_manifest-JSRE3H8k.mjs";
8
- import { t as AgentVersionManifestSchema } from "./agent-manifest-CDnbkR2f.mjs";
9
- import { r as RelativeFilePathSchema } from "./file-metadata-D1vm-XY2.mjs";
10
- import { c as createArtifactOutputFiles, l as createMetadataOutputFile, o as METADATA_ROOT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-CbMtQ2tm.mjs";
11
- import { t as resolveConfiguredBuildOutputDir } from "./utils-CywxCDM7.mjs";
12
- import { a as readAgentSandboxPackage, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-BtV7Xycc.mjs";
13
- import { a as prewarmFileContentCache, c as typedEntries, i as createFileContentCache, l as require_out, n as computeBuilderFingerprint, o as resetFileContentCache, r as computeWorkflowFingerprint, s as sha256String } from "./metadata-layout-GUYIUo0i-_aG2zjue.mjs";
14
- import { a as getAgentArtifactPaths, c as hashWorkflowManifestForDisk, d as resolveOutputDir, i as createAgentOutputFiles, l as removeAgentArtifacts, n as BUILD_CACHE_FILE_NAME, o as hashAgentManifestForDisk, r as allOutputFilesExist, s as hashWorkflowFlowForDisk, t as AGENT_ARTIFACT_DIR_PREFIX, u as removeWorkflowArtifacts } from "./writer-BG8poUm3-BbXlU2kI.mjs";
15
- import { a as createDiscoveryFailure, c as createNamespaceStarExportDiscoveryError, d as isWorkflowLoadResult, f as loadWorkflowMetadataBatch, i as createAmbiguousExportDiscoveryError, l as isAgentLoadResult, o as createDuplicateWorkflowIdFailure, t as DuplicateWorkflowIdError, u as isTaskLoadResult } from "./import-module-CV84H5fZ-B_CBCmb4.mjs";
16
- import { a as literalString, n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-n9d1hKNq.mjs";
17
- import { a as getLocalModuleSpecifier, c as removeAllMetadataArtifacts, d as resolveDefaultExportAssignment, f as resolveLocalModulePath, i as collectWorkflowImportNames, n as DISCOVERY_IGNORE, o as getVariableDeclarators, r as collectLocalWorkflowBindings, s as isExportedVariableStatement, t as DISCOVERY_GLOB, u as removeMetadataArtifacts } from "./source-analysis-Cj-ADyu--BJQcFPCG.mjs";
18
- import { n as parseRelativeFilePath } from "./normalize-path-CojS-CgQ-DLCOvnD1.mjs";
5
+ import { a as getKeystrokeTmpDir } from "./dist-BF6r1hfv.mjs";
6
+ import { t as assertWorkflowProjectRoot } from "./project-config-opj6DsPF.mjs";
7
+ import { a as FlowGraphSchema, i as WorkflowManifestSchema } from "./workflow-manifest-CAW5FlX0.mjs";
8
+ import { t as AgentVersionManifestSchema } from "./agent-manifest-Bfa3DBgc.mjs";
9
+ import { r as RelativeFilePathSchema } from "./file-metadata-CdFXMMIw.mjs";
10
+ import { c as createArtifactOutputFiles, l as createMetadataOutputFile, o as METADATA_ROOT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-B95Tku8F.mjs";
11
+ import { t as resolveConfiguredBuildOutputDir } from "./utils-DlYHjGg9.mjs";
12
+ import { a as readAgentSandboxPackage, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs";
13
+ import { a as prewarmFileContentCache, c as typedEntries, i as createFileContentCache, l as require_out, n as computeBuilderFingerprint, o as resetFileContentCache, r as computeWorkflowFingerprint, s as sha256String } from "./metadata-layout-C6ed-9dl-aBmqqvD5.mjs";
14
+ import { a as getAgentArtifactPaths, c as hashWorkflowManifestForDisk, d as resolveOutputDir, i as createAgentOutputFiles, l as removeAgentArtifacts, n as BUILD_CACHE_FILE_NAME, o as hashAgentManifestForDisk, r as allOutputFilesExist, s as hashWorkflowFlowForDisk, t as AGENT_ARTIFACT_DIR_PREFIX, u as removeWorkflowArtifacts } from "./writer-CtvttJdP-DrJruQgR.mjs";
15
+ import { a as createDiscoveryFailure, c as createNamespaceStarExportDiscoveryError, d as isWorkflowLoadResult, f as loadWorkflowMetadataBatch, i as createAmbiguousExportDiscoveryError, l as isAgentLoadResult, o as createDuplicateWorkflowIdFailure, t as DuplicateWorkflowIdError, u as isTaskLoadResult } from "./import-module-DDPnzlJ1-CYJD2n2b.mjs";
16
+ import { a as literalString, n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-BeimiQ2U.mjs";
17
+ import { a as getLocalModuleSpecifier, c as removeAllMetadataArtifacts, d as resolveDefaultExportAssignment, f as resolveLocalModulePath, i as collectWorkflowImportNames, n as DISCOVERY_IGNORE, o as getVariableDeclarators, r as collectLocalWorkflowBindings, s as isExportedVariableStatement, t as DISCOVERY_GLOB, u as removeMetadataArtifacts } from "./source-analysis-DEEChuND-eixwPnPP.mjs";
18
+ import { n as parseRelativeFilePath } from "./normalize-path-CojS-CgQ-BKRFUzWW.mjs";
19
19
  import * as fs from "node:fs/promises";
20
20
  import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
21
21
  import * as path$1 from "node:path";
@@ -23,32 +23,9 @@ import path from "node:path";
23
23
  import { z } from "zod";
24
24
  import { fileURLToPath } from "node:url";
25
25
  import { createHash } from "node:crypto";
26
- import "oxc-parser";
27
26
  import { performance } from "node:perf_hooks";
28
- //#region ../../packages/workflow-core/dist/chunks/schema-DnT5yizJ.mjs
27
+ //#region ../../packages/core/dist/flow-graph-toolkit/index.mjs
29
28
  var import_out = /* @__PURE__ */ __toESM(require_out(), 1);
30
- const MAX_JSON_DEPTH = 20;
31
- function buildJsonValueSchema(depth) {
32
- const primitives = z.union([
33
- z.string(),
34
- z.number(),
35
- z.boolean(),
36
- z.null()
37
- ]);
38
- if (depth <= 0) return primitives;
39
- const nested = buildJsonValueSchema(depth - 1);
40
- return z.union([
41
- primitives,
42
- z.array(nested),
43
- z.record(z.string(), nested)
44
- ]);
45
- }
46
- const jsonValueSchema = buildJsonValueSchema(MAX_JSON_DEPTH);
47
- z.record(z.string(), jsonValueSchema);
48
- z.custom((value) => value instanceof z.ZodType, "Expected a Zod schema");
49
- z.custom((value) => value instanceof z.ZodObject, "Expected a Zod object schema");
50
- //#endregion
51
- //#region ../../packages/workflow-core/dist/flow-graph-toolkit/index.mjs
52
29
  function detectAgentInPathCycles(input) {
53
30
  const nodes = /* @__PURE__ */ new Map();
54
31
  const edges = /* @__PURE__ */ new Map();
@@ -94,7 +71,7 @@ function toCycleNode(node) {
94
71
  };
95
72
  }
96
73
  //#endregion
97
- //#region ../../packages/workflow-builder/dist/build-9Sd6SkIz.mjs
74
+ //#region ../../packages/workflow-builder/dist/build-CQCgOqoE.mjs
98
75
  const DiscoveredWorkflowSchema = z.object({
99
76
  exportFilePath: z.string(),
100
77
  resolvedFilePath: z.string(),
@@ -1001,7 +978,7 @@ async function buildDiscoveredWorkflows(options) {
1001
978
  const failures = [...buildPlan.failures];
1002
979
  const warnings = [];
1003
980
  if (buildPlan.workflows.length > 0) {
1004
- const { buildWorkflowArtifacts } = await import("./build-workflows-CfxBnIWh-CdYPv8w2.mjs");
981
+ const { buildWorkflowArtifacts } = await import("./build-workflows-3fdvdHHf-DJ_lH1NH.mjs");
1005
982
  const result = await buildWorkflowArtifacts({
1006
983
  entries: buildPlan.workflows,
1007
984
  workflowsByKey,
@@ -1016,7 +993,7 @@ async function buildDiscoveredWorkflows(options) {
1016
993
  warnings.push(...result.warnings);
1017
994
  }
1018
995
  if (buildPlan.agents.length > 0) {
1019
- const { buildAgentArtifacts } = await import("./build-agents-BmM_AsSd-BGi9wtzt.mjs");
996
+ const { buildAgentArtifacts } = await import("./build-agents-DfbiMZ_e-CRnzruSu.mjs");
1020
997
  const result = await buildAgentArtifacts({
1021
998
  entries: buildPlan.agents,
1022
999
  projectRoot: options.projectRoot
@@ -1025,7 +1002,7 @@ async function buildDiscoveredWorkflows(options) {
1025
1002
  failures.push(...result.failures);
1026
1003
  }
1027
1004
  if (buildPlan.tasks.length > 0) {
1028
- const { buildTaskArtifacts } = await import("./build-tasks-CdihpudT-D5r5HUHe.mjs");
1005
+ const { buildTaskArtifacts } = await import("./build-tasks-O1jYtlv1-Y65uGWuz.mjs");
1029
1006
  const result = await buildTaskArtifacts({
1030
1007
  entries: buildPlan.tasks,
1031
1008
  projectRoot: options.projectRoot,
@@ -1133,7 +1110,7 @@ async function createBuildPlan(options) {
1133
1110
  const currentWorkflowIndex = workflowProgressIndex;
1134
1111
  workflowProgressIndex += 1;
1135
1112
  if (!loadResult?.ok) {
1136
- const { createWorkflowMetadataFailure } = await import("./build-workflows-CfxBnIWh-CdYPv8w2.mjs");
1113
+ const { createWorkflowMetadataFailure } = await import("./build-workflows-3fdvdHHf-DJ_lH1NH.mjs");
1137
1114
  plan.failures.push(createWorkflowMetadataFailure(discoveredWorkflow, loadResult?.error));
1138
1115
  continue;
1139
1116
  }
@@ -1331,7 +1308,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
1331
1308
  cacheResolvedBindingKeys,
1332
1309
  releaseBundleMemory: config.releaseBundleMemory
1333
1310
  };
1334
- const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-BG8poUm3-BbXlU2kI.mjs").then((n) => n.f).then((n) => n.t);
1311
+ const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-CtvttJdP-DrJruQgR.mjs").then((n) => n.f).then((n) => n.t);
1335
1312
  const writeResult = targetBindingKeys ? await writeTargetedBuildOutput({
1336
1313
  artifacts: finalizedScopedArtifacts,
1337
1314
  agentArtifacts,
@@ -1356,7 +1333,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
1356
1333
  elapsedMs: performance.now() - writeStartedAt,
1357
1334
  ...writeResult.skippedWriteCount !== void 0 && writeResult.skippedWriteCount > 0 ? { skippedWriteCount: writeResult.skippedWriteCount } : {}
1358
1335
  });
1359
- const { buildMetadataArtifacts } = await import("./build-metadata-BWS7uhd_-DR8gJjTX.mjs");
1336
+ const { buildMetadataArtifacts } = await import("./build-metadata-zidV9Cai-RgG4ndIH.mjs");
1360
1337
  const metadata = await buildMetadataArtifacts({
1361
1338
  projectRoot: config.projectRoot,
1362
1339
  outputDir,
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-n9d1hKNq.mjs";
4
- import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-D_BCZqV6.mjs";
3
+ import { n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-BeimiQ2U.mjs";
4
+ import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-h2W05D_Q.mjs";
5
5
  import { existsSync, readFileSync, realpathSync } from "node:fs";
6
6
  import * as path$1 from "node:path";
7
7
  import { createHash } from "node:crypto";
8
8
  import { rolldown } from "rolldown";
9
- //#region ../../packages/workflow-builder/dist/workflow-bundler-BPiqVscj.mjs
9
+ //#region ../../packages/workflow-builder/dist/workflow-bundler-BzHk73PM.mjs
10
10
  function getDefaultExternal() {
11
11
  return [
12
12
  /^node:/,
@@ -69,7 +69,7 @@ function collectRuntimeExportNames(resolvedFilePath) {
69
69
  }
70
70
  function createDelegateStubModule(exports, resolvedFilePath) {
71
71
  const lines = [
72
- `import { Agent, Workflow } from '@keystroke/workflow-core';`,
72
+ `import { Agent, Workflow } from '@keystrokehq/core';`,
73
73
  `import { z } from 'zod';`,
74
74
  ""
75
75
  ];
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { F as schemaToJsonSchema, S as SourceLocationSchema, V as SHA256HashSchema, a as CredentialRequirementsSchema, c as IntegrationScopeSchema, f as TriggerTypeSchema, h as WorkflowStepEntrySchema, l as ResolvedCredentialSetSchema, p as TriggerUploadDataSchema, t as DurationSchema, v as CallKindSchema, x as ImportSourceSchema, y as CallsiteFingerprintSchema, z as JsonSchemaSchema } from "./schedule-BXx3uXwr.mjs";
3
+ import { r as SHA256HashSchema, t as JsonSchemaSchema } from "./common-BrVAdUyD.mjs";
4
+ import { a as ResolvedCredentialSetSchema, c as TriggerTypeSchema, d as WorkflowStepEntrySchema, i as IntegrationScopeSchema, l as TriggerUploadDataSchema, t as CredentialRequirementsSchema } from "./credential-requirements-DjDFthio.mjs";
5
+ import { a as SourceLocationSchema, i as ImportSourceSchema, n as CallsiteFingerprintSchema, t as CallKindSchema } from "./source-analysis-BspLa3E5.mjs";
6
+ import { t as DurationSchema } from "./schedule-BRN4hzQM.mjs";
4
7
  import { z } from "zod";
5
- import { createHash } from "node:crypto";
6
- //#region ../../packages/workflow-core/src/artifacts/flow-graph-schema.ts
8
+ //#region ../../packages/core/src/artifacts/flow-graph-schema.ts
7
9
  const DecisionKindSchema = z.enum([
8
10
  "if",
9
11
  "switch",
@@ -169,66 +171,7 @@ const FlowGraphSchema = z.object({
169
171
  diagnostics: z.array(z.string())
170
172
  });
171
173
  //#endregion
172
- //#region ../../packages/workflow-core/src/artifacts/schema-fingerprint.ts
173
- /**
174
- * schema-fingerprint.ts
175
- *
176
- * Computes a deterministic fingerprint (hash) of a credential set's schema.
177
- * Used as a persistence-layer identity stamp: the workflow-builder stamps each
178
- * credential requirement with its fingerprint at build time, the server stamps
179
- * each vault row with the fingerprint at upload time, and the executor's
180
- * credential resolver compares the two at read time so schema drift surfaces
181
- * as a `CredentialSchemaMismatchError` rather than a silent decode into a
182
- * stale shape.
183
- *
184
- * The fingerprint is deterministic: identical JSON schemas always produce the
185
- * same hash regardless of property ordering, timestamps, or other
186
- * non-structural differences.
187
- *
188
- * @remarks
189
- * This is the *persistence* fingerprint. The construction-time registry in
190
- * `credential-set/registry.ts` uses a different (Zod-structural) fingerprint
191
- * purely for in-process identity collision detection; the two fingerprints
192
- * serve different purposes and do not need to match.
193
- */
194
- /**
195
- * Compute a deterministic fingerprint for a JSON schema object.
196
- *
197
- * The schema is the output of `schemaToJsonSchema(zodSchema)` — a plain JSON
198
- * object describing the shape of the Zod schema.
199
- *
200
- * Properties are sorted recursively before hashing to ensure deterministic
201
- * output regardless of insertion order.
202
- *
203
- * @example
204
- * ```ts
205
- * const auth = schemaToJsonSchema(credentialSet.auth);
206
- * const stored = credentialSet.stored ? schemaToJsonSchema(credentialSet.stored) : undefined;
207
- * const fingerprint = computeSchemaFingerprint(auth, stored);
208
- * ```
209
- *
210
- * @see CredentialSchemaMismatchError
211
- */
212
- function computeSchemaFingerprint(authSchema, storedSchema) {
213
- const normalized = sortDeep({
214
- auth: authSchema,
215
- ...storedSchema ? { stored: storedSchema } : {}
216
- });
217
- const json = JSON.stringify(normalized);
218
- return createHash("sha256").update(json).digest("hex").substring(0, 16);
219
- }
220
- function sortDeep(value) {
221
- if (value === null || value === void 0) return value;
222
- if (Array.isArray(value)) return value.map(sortDeep);
223
- if (typeof value === "object") {
224
- const sorted = {};
225
- for (const key of Object.keys(value).sort()) sorted[key] = sortDeep(value[key]);
226
- return sorted;
227
- }
228
- return value;
229
- }
230
- //#endregion
231
- //#region ../../packages/workflow-core/src/artifacts/workflow-manifest.ts
174
+ //#region ../../packages/core/src/artifacts/workflow-manifest.ts
232
175
  const WORKFLOW_MANIFEST_GENERATOR = "local-build";
233
176
  const WORKFLOW_MANIFEST_SCHEMA_VERSION = "1.0.0";
234
177
  /** Shared identity fields for a workflow. Single source of truth for name/description/tags validation. */
@@ -315,71 +258,4 @@ z.object({
315
258
  deploymentSnapshotOnly: z.boolean().optional()
316
259
  });
317
260
  //#endregion
318
- //#region ../../packages/workflow-core/src/shared/declared-credential-requirements.ts
319
- function readSchemaKeys(schema, propertyKey) {
320
- if (schema === null || typeof schema !== "object") return [];
321
- const candidate = schema[propertyKey];
322
- if (candidate === null || typeof candidate !== "object" || Array.isArray(candidate)) return [];
323
- return Object.keys(candidate).sort();
324
- }
325
- /**
326
- * Returns sorted keys that are NOT listed in the JSON Schema `required` array.
327
- */
328
- function readOptionalJsonSchemaKeys(schema) {
329
- if (schema === null || typeof schema !== "object") return [];
330
- const record = schema;
331
- const properties = record.properties;
332
- if (properties === null || typeof properties !== "object" || Array.isArray(properties)) return [];
333
- const requiredSet = new Set(Array.isArray(record.required) ? record.required : []);
334
- return Object.keys(properties).filter((key) => !requiredSet.has(key)).sort();
335
- }
336
- function toDeclaredCredentialRequirement(credentialSet) {
337
- const optionalAuthKeys = credentialSet.optionalCredentialKeys;
338
- const optionalStoredKeys = credentialSet.optionalStoredCredentialKeys;
339
- const schemaFingerprint = computeSchemaFingerprint(schemaToJsonSchema(credentialSet.auth), credentialSet.stored ? schemaToJsonSchema(credentialSet.stored) : void 0);
340
- const onCredentialRevoked = credentialSet.onCredentialRevoked;
341
- return {
342
- credentialSetId: credentialSet.id,
343
- ...credentialSet.namespace ? { namespace: credentialSet.namespace } : {},
344
- resolvedCredentialSetId: credentialSet.resolvedCredentialSetId,
345
- credentialKeys: [...credentialSet.credentialKeys],
346
- ...optionalAuthKeys.length > 0 ? { optionalCredentialKeys: [...optionalAuthKeys] } : {},
347
- storedCredentialKeys: [...credentialSet.storedCredentialKeys],
348
- ...optionalStoredKeys.length > 0 ? { optionalStoredCredentialKeys: [...optionalStoredKeys] } : {},
349
- schemaFingerprint,
350
- ...credentialSet.needsResolve ? { needsResolve: true } : {},
351
- ...credentialSet.resolveCacheMs > 0 ? { resolveCacheMs: credentialSet.resolveCacheMs } : {},
352
- ...onCredentialRevoked ? { onCredentialRevoked } : {},
353
- ...credentialSet.proxy ? { proxy: credentialSet.proxy } : {},
354
- ...credentialSet.needsRawSecret === true ? { needsRawSecret: true } : {}
355
- };
356
- }
357
- function toDeclaredCredentialRequirements(credentialSets) {
358
- return credentialSets.map(toDeclaredCredentialRequirement);
359
- }
360
- function manifestToDeclaredCredentialRequirement(credentialSet) {
361
- const authKeys = readSchemaKeys(credentialSet.auth, "properties");
362
- const optionalAuthKeys = readOptionalJsonSchemaKeys(credentialSet.auth);
363
- const storedSchema = credentialSet.stored ?? credentialSet.auth;
364
- const storedKeys = readSchemaKeys(storedSchema, "properties");
365
- const optionalStoredKeys = readOptionalJsonSchemaKeys(storedSchema);
366
- const schemaFingerprint = credentialSet.auth ? computeSchemaFingerprint(credentialSet.auth, credentialSet.stored) : void 0;
367
- const onCredentialRevoked = credentialSet.onCredentialRevoked;
368
- return {
369
- credentialSetId: credentialSet.id,
370
- ...credentialSet.namespace ? { namespace: credentialSet.namespace } : {},
371
- resolvedCredentialSetId: credentialSet.resolvedCredentialSetId,
372
- credentialKeys: authKeys,
373
- ...optionalAuthKeys.length > 0 ? { optionalCredentialKeys: optionalAuthKeys } : {},
374
- storedCredentialKeys: storedKeys,
375
- ...optionalStoredKeys.length > 0 ? { optionalStoredCredentialKeys: optionalStoredKeys } : {},
376
- ...schemaFingerprint ? { schemaFingerprint } : {},
377
- ...credentialSet.needsResolve ? { needsResolve: true } : {},
378
- ...typeof credentialSet.resolveCacheMs === "number" && credentialSet.resolveCacheMs > 0 ? { resolveCacheMs: credentialSet.resolveCacheMs } : {},
379
- ...onCredentialRevoked ? { onCredentialRevoked } : {},
380
- ...credentialSet.proxy ? { proxy: credentialSet.proxy } : {},
381
- ...credentialSet.needsRawSecret === true ? { needsRawSecret: true } : {}
382
- };
383
- }
384
- //#endregion
385
- export { WORKFLOW_MANIFEST_SCHEMA_VERSION as a, FlowGraphSchema as c, WORKFLOW_MANIFEST_GENERATOR as i, readOptionalJsonSchemaKeys as n, WorkflowCoreManifestSchema as o, toDeclaredCredentialRequirements as r, WorkflowManifestSchema as s, manifestToDeclaredCredentialRequirement as t };
261
+ export { FlowGraphSchema as a, WorkflowManifestSchema as i, WORKFLOW_MANIFEST_SCHEMA_VERSION as n, WorkflowCoreManifestSchema as r, WORKFLOW_MANIFEST_GENERATOR as t };
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DM4b7KgY.mjs";
4
- import { t as createTypedCommand } from "./commander-DfTVqQ-3.mjs";
5
- import { V as SHA256HashSchema, p as TriggerUploadDataSchema, z as JsonSchemaSchema } from "./schedule-BXx3uXwr.mjs";
6
- import { c as FlowGraphSchema, s as WorkflowManifestSchema } from "./_manifest-JSRE3H8k.mjs";
7
- import { n as WorkflowsRunOptionsSchema, t as RUN_OPTIONS_CONFIG } from "./options-CeaTcFxP.mjs";
3
+ import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-q4KljAhu.mjs";
4
+ import { t as createTypedCommand } from "./commander-DZ3F3CVq.mjs";
5
+ import { r as SHA256HashSchema, t as JsonSchemaSchema } from "./common-BrVAdUyD.mjs";
6
+ import { l as TriggerUploadDataSchema } from "./credential-requirements-DjDFthio.mjs";
7
+ import { a as FlowGraphSchema, i as WorkflowManifestSchema } from "./workflow-manifest-CAW5FlX0.mjs";
8
+ import { n as WorkflowsRunOptionsSchema, t as RUN_OPTIONS_CONFIG } from "./options-Dn9t3K4a.mjs";
8
9
  import { z } from "zod";
9
10
  const GitProviderSchema = z.enum(["codestorage", "github"]);
10
11
  const GitTreeEntryTypeSchema = z.enum(["file", "directory"]);
@@ -320,7 +321,7 @@ function createWorkflowsBuildCommand() {
320
321
  description: "Build workflows locally",
321
322
  schema: WorkflowsBuildOptionsSchema,
322
323
  optionsConfig: BUILD_OPTIONS_CONFIG,
323
- loadHandler: async () => (await import("./build.handler-4799CjWH.mjs")).handleWorkflowsBuild
324
+ loadHandler: async () => (await import("./build.handler-Tb3IpABI.mjs")).handleWorkflowsBuild
324
325
  });
325
326
  }
326
327
  //#endregion
@@ -347,7 +348,7 @@ function createWorkflowsDiffCommand() {
347
348
  description: "Authored workflow id (preferred) or workflow name",
348
349
  key: "workflow"
349
350
  },
350
- loadHandler: async () => (await import("./diff.handler-Du7SY8K4.mjs")).handleWorkflowsDiff
351
+ loadHandler: async () => (await import("./diff.handler--zdSkUnK.mjs")).handleWorkflowsDiff
351
352
  });
352
353
  }
353
354
  //#endregion
@@ -380,7 +381,7 @@ function createWorkflowsEnvCommand() {
380
381
  key: "workflow",
381
382
  required: false
382
383
  },
383
- loadHandler: async () => (await import("./env.handler-BAzBuMzQ.mjs")).handleWorkflowsEnv
384
+ loadHandler: async () => (await import("./env.handler-d4sJ706C.mjs")).handleWorkflowsEnv
384
385
  });
385
386
  }
386
387
  //#endregion
@@ -412,7 +413,7 @@ function createWorkflowsInspectCommand() {
412
413
  description: "Authored workflow id (preferred) or workflow name",
413
414
  key: "workflow"
414
415
  },
415
- loadHandler: async () => (await import("./inspect.handler-DT_cD036.mjs")).handleWorkflowsInspect
416
+ loadHandler: async () => (await import("./inspect.handler-DbN0ZVTh.mjs")).handleWorkflowsInspect
416
417
  });
417
418
  }
418
419
  //#endregion
@@ -508,7 +509,7 @@ function createWorkflowsLogsCommand() {
508
509
  key: "workflow",
509
510
  required: false
510
511
  },
511
- loadHandler: async () => (await import("./logs.handler-BD_dXiL1.mjs")).handleWorkflowsLogs
512
+ loadHandler: async () => (await import("./logs.handler-4ctMVYMj.mjs")).handleWorkflowsLogs
512
513
  });
513
514
  }
514
515
  //#endregion
@@ -699,7 +700,7 @@ function createWorkflowsPausedCommand() {
699
700
  key: "workflow",
700
701
  required: false
701
702
  },
702
- loadHandler: async () => (await import("./paused.handler-BMFm9Cff.mjs")).handleWorkflowsPaused
703
+ loadHandler: async () => (await import("./paused.handler-B3aVqw-m.mjs")).handleWorkflowsPaused
703
704
  });
704
705
  }
705
706
  //#endregion
@@ -715,7 +716,7 @@ function createWorkflowsTryDeployCommand() {
715
716
  description: "Authored workflow id (preferred) or workflow name. Multiple workflows with the same name run sequentially.",
716
717
  key: "workflow"
717
718
  },
718
- loadHandler: async () => (await import("./try-deploy.handler-DqybNhXx.mjs").then((n) => n.n)).handleWorkflowsTryDeploy
719
+ loadHandler: async () => (await import("./try-deploy.handler-2aX5TmLk.mjs").then((n) => n.n)).handleWorkflowsTryDeploy
719
720
  });
720
721
  }
721
722
  //#endregion
@@ -753,7 +754,7 @@ function createWorkflowsValidateCommand() {
753
754
  key: "workflow",
754
755
  required: false
755
756
  },
756
- loadHandler: async () => (await import("./validate.handler-DOcTaJL0.mjs")).handleWorkflowsValidate
757
+ loadHandler: async () => (await import("./validate.handler-CGD6GttR.mjs")).handleWorkflowsValidate
757
758
  });
758
759
  }
759
760
  //#endregion
@@ -772,14 +773,14 @@ function createWorkflowsCommand() {
772
773
  description: "Manage, run, inspect, and debug workflows",
773
774
  schema: WorkflowsOptionsSchema,
774
775
  optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
775
- loadHandler: async () => (await import("./list.handler-BTWvCyjA.mjs")).handleWorkflowsList,
776
+ loadHandler: async () => (await import("./list.handler-BRq-nScx.mjs")).handleWorkflowsList,
776
777
  subcommands: [
777
778
  createTypedCommand({
778
779
  name: "list",
779
780
  description: "List all workflows in the project",
780
781
  schema: WorkflowsOptionsSchema,
781
782
  optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
782
- loadHandler: async () => (await import("./list.handler-BTWvCyjA.mjs")).handleWorkflowsList
783
+ loadHandler: async () => (await import("./list.handler-BRq-nScx.mjs")).handleWorkflowsList
783
784
  }),
784
785
  createWorkflowsBuildCommand(),
785
786
  createWorkflowsTryDeployCommand(),