@keystrokehq/cli 0.0.17 → 0.0.19

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 (152) hide show
  1. package/README.md +1 -1
  2. package/dist/{accept.handler-BPwp_UAE.mjs → accept.handler-BVmNNAgL.mjs} +4 -4
  3. package/dist/{admin-Bb9Hx-gO.mjs → admin-DQlHFuXn.mjs} +11 -11
  4. package/dist/{agents-CbmvvOAx.mjs → agents-Dd7UeQCw.mjs} +10 -10
  5. package/dist/{api-keys-DJlyIf10.mjs → api-keys-BsMBFiD_.mjs} +6 -6
  6. package/dist/{api-jkf0TTgD.mjs → api-nR61stdq.mjs} +4 -5
  7. package/dist/{auth-DpDEkJz7.mjs → auth-ZTuuEoD6.mjs} +12 -7
  8. package/dist/{auth.handler-u3qmoUX0.mjs → auth.handler-C1dZBdaG.mjs} +60 -27
  9. package/dist/{build-agents-DseUtzd4-VYWtIZy9.mjs → build-agents-DseUtzd4-CthuIecx.mjs} +6 -6
  10. package/dist/{build-metadata-C8Ra_Gi--BdoyLQMl.mjs → build-metadata-C8Ra_Gi--L3l8w0rh.mjs} +7 -7
  11. package/dist/{build-progress-BZivcVz4.mjs → build-progress-AR8xow4_.mjs} +2 -2
  12. package/dist/{build-tasks-GVuMLS0h-p08mMOyK.mjs → build-tasks-GVuMLS0h-BaPhhGXO.mjs} +3 -3
  13. package/dist/{build-workflows-CV4tBo6S-knCnBKTc.mjs → build-workflows-CV4tBo6S-szwrAGWT.mjs} +10 -10
  14. package/dist/{build.handler-BNSC_zhQ.mjs → build.handler-DJrEMCBw.mjs} +7 -7
  15. package/dist/{clear-cache.handler-gr5VmEYB.mjs → clear-cache.handler-CTLQ1PIN.mjs} +3 -3
  16. package/dist/clear.handler-BgeAg2de.mjs +68 -0
  17. package/dist/{clear.handler-CtOZ4aRn.mjs → clear.handler-C_pXAeBG.mjs} +3 -2
  18. package/dist/{commander-D15UZVjp.mjs → commander-C5qcOo8m.mjs} +4 -4
  19. package/dist/{connect-DzSNDSmI.mjs → connect-BtBKoXpi.mjs} +3 -3
  20. package/dist/{connect.handler-DRO05ak3.mjs → connect.handler-E8CmLRSF.mjs} +5 -5
  21. package/dist/{context-B1L8pZsH.mjs → context-BydAGTiB.mjs} +49 -17
  22. package/dist/{create.handler-DF1Ye4nr.mjs → create.handler-CBxIPC3r.mjs} +3 -3
  23. package/dist/{credential-env-map-B2nVJXPn.mjs → credential-env-map-BA4LNI7x.mjs} +6 -5
  24. package/dist/{credential-requirements-FtBk5JVB.mjs → credential-requirements-Ob-7H-0F.mjs} +3 -3
  25. package/dist/{credential-schema-mismatch-CfyBUMPS.mjs → credential-schema-mismatch-z74ud-YZ.mjs} +1 -1
  26. package/dist/{credentials-VidBoOd7.mjs → credentials-BGaRMclS.mjs} +7 -7
  27. package/dist/{credentials-CiOwDS5y.mjs → credentials-jRiXEr6P.mjs} +1 -1
  28. package/dist/{current-deployment-workflow-BRUEdPrN.mjs → current-deployment-workflow-BVliROAz.mjs} +6 -6
  29. package/dist/{current.handler-QZQ-l84v.mjs → current.handler-DBl9S67d.mjs} +3 -3
  30. package/dist/{default-urls-BS4twrsS.mjs → default-urls-BoSm4s9C.mjs} +1 -1
  31. package/dist/{delete.handler-Bude0SVP.mjs → delete.handler-Buu7Ip0D.mjs} +2 -2
  32. package/dist/{deploy-CJbVB7e2.mjs → deploy-BPDUTKZD.mjs} +1 -1
  33. package/dist/{deploy-eshEEiP-.mjs → deploy-CzTlgAFj.mjs} +2 -2
  34. package/dist/{deploy-progress-DJHph1Fz.mjs → deploy-progress-DK87VKJ-.mjs} +2 -2
  35. package/dist/{deploy.handler-BxxWI7nV.mjs → deploy.handler-CCcJ7y3A.mjs} +20 -20
  36. package/dist/{detect-env-access-CwkOYeYM-CZIixHeR.mjs → detect-env-access-CwkOYeYM-CNTyUzme.mjs} +1 -1
  37. package/dist/{diff-utils-4OQTpP5s.mjs → diff-utils-B0ED-Igv.mjs} +1 -1
  38. package/dist/{diff.handler-CzrKCj7N.mjs → diff.handler-DUVFixeG.mjs} +7 -7
  39. package/dist/dist-CIInPRGh.mjs +1071 -0
  40. package/dist/{dist-FQYQ2FLm.mjs → dist-Cx0RV8s7.mjs} +15 -15
  41. package/dist/{env.handler-B3YDQIVE.mjs → env.handler-C8kNFz2U.mjs} +10 -10
  42. package/dist/{error-boundary-CyLcinp1.mjs → error-boundary-B8cmSwJH.mjs} +3 -3
  43. package/dist/{file-metadata-DaPPpiTh.mjs → file-metadata-lrX05iRt.mjs} +1 -1
  44. package/dist/{iam-command-utils-ByLX0A-V.mjs → iam-command-utils-CSZj4XlH.mjs} +2 -2
  45. package/dist/{import-module--8x5SLum-DaUNACER.mjs → import-module--8x5SLum-DjPUZr4i.mjs} +12 -11
  46. package/dist/{init-CWFJdKNs.mjs → init-DeeOVc9m.mjs} +3 -3
  47. package/dist/{init.handler-BZSoM76V.mjs → init.handler-BMdhpusQ.mjs} +8 -8
  48. package/dist/{inspect.handler-umc7of-r.mjs → inspect.handler-QyTo8rWO.mjs} +8 -8
  49. package/dist/{integration-catalog-BgT4mLzW.mjs → integration-catalog-CmvYPvI6.mjs} +3 -3
  50. package/dist/integrations-tXZM-84g.mjs +185 -0
  51. package/dist/{invites-Cqi7iyIN.mjs → invites-ClyAatBW.mjs} +5 -5
  52. package/dist/{invites.list.handler-CErgY35S.mjs → invites.list.handler-CPkK_tPM.mjs} +4 -4
  53. package/dist/{invites.resend.handler-DRCRIA4F.mjs → invites.resend.handler-DIRI7tS2.mjs} +4 -4
  54. package/dist/{invites.revoke.handler-C0FZdAR0.mjs → invites.revoke.handler-CcXcDBlU.mjs} +4 -4
  55. package/dist/keystroke.mjs +561 -209
  56. package/dist/{list-enrichment-C6u5eI0j.mjs → list-enrichment-B9238wom.mjs} +3 -3
  57. package/dist/{list.handler-CBEXiTAK.mjs → list.handler-BB-Dcm5B.mjs} +3 -3
  58. package/dist/{list.handler-c-8RpgB9.mjs → list.handler-BLkQKiV1.mjs} +17 -16
  59. package/dist/{list.handler-Cr_DFAae.mjs → list.handler-Cbc9rlBx.mjs} +3 -3
  60. package/dist/{list.handler-DYdNWjgk.mjs → list.handler-ClPAPSWm.mjs} +4 -4
  61. package/dist/{list.handler-D-YFoKLU.mjs → list.handler-DdFGHkqt.mjs} +7 -7
  62. package/dist/{list.handler-FlchXrKz.mjs → list.handler-Xl_F89kq.mjs} +4 -4
  63. package/dist/{list2.handler-T5v4EK20.mjs → list.handler-tnsRn-Rj.mjs} +7 -7
  64. package/dist/{listen-rHLiCWbn.mjs → listen-ksMVpdNa.mjs} +3 -3
  65. package/dist/{listen.handler-B9T58yAj.mjs → listen.handler-DEJSBg8y.mjs} +4 -4
  66. package/dist/logs-C-JxXsgc.mjs +58 -0
  67. package/dist/{logs.handler-DGcGN2qb.mjs → logs.handler-BIegqc2p.mjs} +4 -4
  68. package/dist/logs.handler-DyRoevtO.mjs +53 -0
  69. package/dist/{members.add.handler-DmYI43rZ.mjs → members.add.handler-D4ggN2Xi.mjs} +4 -4
  70. package/dist/{members.invite.handler-B_KVxv5m.mjs → members.invite.handler-BYIt6Oib.mjs} +4 -4
  71. package/dist/{members.list.handler-BtuuIgQS.mjs → members.list.handler-CvpeYKC4.mjs} +4 -4
  72. package/dist/{members.remove.handler-Lvg-CqVv.mjs → members.remove.handler-C4GBUVYE.mjs} +4 -4
  73. package/dist/{members.update.handler-D-8izeso.mjs → members.update.handler-TpM1oi0L.mjs} +4 -4
  74. package/dist/{normalize-path-CojS-CgQ-DFTvyA27.mjs → normalize-path-CojS-CgQ-D4wSBHgG.mjs} +1 -1
  75. package/dist/{org-DUCts2MV.mjs → org-DIGyb7XZ.mjs} +17 -17
  76. package/dist/{orgs.create.handler-vXQgDJZ_.mjs → orgs.create.handler-RIYhse_Q.mjs} +4 -4
  77. package/dist/{orgs.get.handler-D_Jfl18x.mjs → orgs.get.handler-BfOpbSom.mjs} +4 -4
  78. package/dist/{orgs.list.handler-BNjoTJvV.mjs → orgs.list.handler-BMgj9yTD.mjs} +4 -4
  79. package/dist/{output-CGdYhH0p.mjs → output-BWcVRt-T.mjs} +1 -1
  80. package/dist/paths-JzzFkXQA-CEipIeVl.mjs +36 -0
  81. package/dist/{paused.handler-ST9dCe8E.mjs → paused.handler-DAZ1EaLN.mjs} +3 -3
  82. package/dist/{projects-DfaG_3WP.mjs → projects-BndElPAx.mjs} +5 -3
  83. package/dist/{projects-CbquwUlm.mjs → projects-Cy6CH3fI.mjs} +5 -5
  84. package/dist/{register.handler-BAx0IC-u.mjs → register.handler-BXeh5mdb.mjs} +20 -11
  85. package/dist/{requirements.handler-D5dFi7XZ.mjs → requirements.handler-C5vobjdJ.mjs} +7 -7
  86. package/dist/resolve-cli-credentials-DytxgMwn.mjs +47 -0
  87. package/dist/{resolve-project-CURYMjex.mjs → resolve-project-CNQtOWE4.mjs} +7 -7
  88. package/dist/{run-polling-BWcLQvm0.mjs → run-polling-BhOdFyh3.mjs} +5 -5
  89. package/dist/{run.handler-BiBDLoeH.mjs → run.handler-BpLmwF_a.mjs} +9 -9
  90. package/dist/{runs-Bc3zjk7V.mjs → runs-DaSd4eXn.mjs} +4 -4
  91. package/dist/{schemas-DodkHgnS.mjs → schemas-BxFPUGWT.mjs} +3 -2
  92. package/dist/{skill-installer-DkRJ6oLi.mjs → skill-installer-BBgN2tzW.mjs} +2 -2
  93. package/dist/{skills-sync.handler-C4ztv1Vu.mjs → skills-sync.handler-DOxudKmV.mjs} +3 -3
  94. package/dist/{skills.command-DuL4kLUi.mjs → skills.command-DQc_qGAF.mjs} +5 -5
  95. package/dist/{skills.handler-R5KAbioE.mjs → skills.handler-Do9I3dQS.mjs} +1 -1
  96. package/dist/{source-analysis-BBg2E_6G-BQqm16RR.mjs → source-analysis-BBg2E_6G-Ut7kYHOz.mjs} +4 -4
  97. package/dist/{spinner-progress-DfkMzwGx.mjs → spinner-progress-Bx-fYItP.mjs} +1 -1
  98. package/dist/{src-BQdOWkyv.mjs → src-0XVwHXNp.mjs} +1 -1
  99. package/dist/{status.handler-DxCJRm1n.mjs → status.handler-BsVtDW_V.mjs} +19 -4
  100. package/dist/{switch.handler-CTwhIcaQ.mjs → switch.handler-CCjMrRZN.mjs} +5 -5
  101. package/dist/{sync-Pssitj6K.mjs → sync-BdTQDZjP.mjs} +2 -2
  102. package/dist/{sync.handler-Be0U3x-n.mjs → sync.handler-DjY8nqbB.mjs} +9 -9
  103. package/dist/{task-BNXDZU71.mjs → task-BRmL2lmw.mjs} +2 -2
  104. package/dist/{task-target-build-BG6cC3bz.mjs → task-target-build-DCV0UDaz.mjs} +8 -7
  105. package/dist/{task-target-deploy-CZBGNC0H-Ck724yF4.mjs → task-target-deploy-CZBGNC0H-I-tvkGCC.mjs} +1 -1
  106. package/dist/{task-target-deploy-gMQC8kXU.mjs → task-target-deploy-DmpCWE3u.mjs} +1 -1
  107. package/dist/task-target-deploy-runner.mjs +22 -17
  108. package/dist/{test-CKBpp1gg.mjs → test-TTQXrhHm.mjs} +4 -4
  109. package/dist/{test.handler-DkizZhVu.mjs → test.handler-B7Ahe9ta.mjs} +12 -12
  110. package/dist/{test.handler-Dk3CmTa7.mjs → test.handler-CkkplyX6.mjs} +2 -2
  111. package/dist/{tool.handler--IzRGelu.mjs → tool.handler-DMfFZCRg.mjs} +34 -14
  112. package/dist/{trigger-artifacts-RizI57RC-CxHwCkQ_.mjs → trigger-artifacts-RizI57RC-DjhOsdOm.mjs} +4 -4
  113. package/dist/{trigger-manifest-PTjVYL1r.mjs → trigger-manifest-DxdCjGz_.mjs} +1 -1
  114. package/dist/{upgrade-cH9I_pZq.mjs → upgrade-Cx-bUWUc.mjs} +2 -2
  115. package/dist/{upgrade.handler-CXEF4ue0.mjs → upgrade.handler-5qSzPC7D.mjs} +1 -1
  116. package/dist/{upload.handler-CpKuAaQ_.mjs → upload.handler-_d2WZwxd.mjs} +10 -10
  117. package/dist/{users.get.handler-D0WO6D1K.mjs → users.get.handler-DIooG7Wy.mjs} +4 -4
  118. package/dist/{users.list.handler-BSTIniF1.mjs → users.list.handler-DdGW-DSg.mjs} +4 -4
  119. package/dist/{users.set-role.handler-DAKdSkbn.mjs → users.set-role.handler-Ek-kntLp.mjs} +4 -4
  120. package/dist/{utils-VC0Vl_pm.mjs → utils-BMUWnz1P.mjs} +2 -2
  121. package/dist/{validate.handler-I8LY-UkG.mjs → validate.handler-Cq2uJjXY.mjs} +8 -8
  122. package/dist/{workflow-build-C9rQQ4qU.mjs → workflow-build-C8AiYxqp.mjs} +23 -23
  123. package/dist/{workflow-build-manifest-OPFqFD6f.mjs → workflow-build-manifest-BKKW9D05.mjs} +3 -3
  124. package/dist/{workflow-bundler-BzHk73PM-AIB4-u4Y.mjs → workflow-bundler-BzHk73PM-WI31RJjH.mjs} +3 -3
  125. package/dist/{workflows-CL1jYSLR.mjs → workflows-K6zetcqI.mjs} +16 -16
  126. package/dist/{writer-B-SpZ0G2-olEAgSLc.mjs → writer-B-SpZ0G2-CLh7sXRd.mjs} +6 -6
  127. package/package.json +5 -5
  128. package/dist/clear.handler-Dpe05eTq.mjs +0 -42
  129. package/dist/dist-BF6r1hfv.mjs +0 -308
  130. package/dist/integrations-DKtl_aES.mjs +0 -85
  131. package/dist/logs-DUwdYZB-.mjs +0 -28
  132. package/dist/logs.handler-dcRq-zoc.mjs +0 -35
  133. package/dist/{agent-bundle-package-DWV6B_5q-rRTPU13L.mjs → agent-bundle-package-DWV6B_5q-FPT0bJaA.mjs} +0 -0
  134. package/dist/{agent-manifest-CZdlCTFs.mjs → agent-manifest-tIsqF2OP.mjs} +0 -0
  135. package/dist/{browser-3cUiPlk2.mjs → browser-BpJ8ut9z.mjs} +0 -0
  136. package/dist/{common-BaGFkj3n.mjs → common-AK0q0Oz0.mjs} +0 -0
  137. package/dist/{concurrency-gXn9Rw8x-BI6HQNfC.mjs → concurrency-gXn9Rw8x-BTlfau8D.mjs} +0 -0
  138. package/dist/{cron-parser-C2eJD0yD.mjs → cron-parser-Dw_cWzFu.mjs} +0 -0
  139. package/dist/{declared-credential-requirements-B6h4WRv4.mjs → declared-credential-requirements-D6KT-r-e.mjs} +0 -0
  140. package/dist/{layout-CXkZEsXI.mjs → layout-P1v-Gssz.mjs} +0 -0
  141. package/dist/{metadata-layout-Bv-B0nHj-CqlcZz_g.mjs → metadata-layout-Bv-B0nHj-B1c5giJ7.mjs} +1 -1
  142. package/dist/{oxc-B3KI3rf_-DdiZWqe2.mjs → oxc-B3KI3rf_-Cvx4Z-4H.mjs} +0 -0
  143. package/dist/{project-config-CsBMT4TL.mjs → project-config-DudGRFPO.mjs} +1 -1
  144. package/dist/{read-credential-keys-77a91T8M-DMmY6oDW.mjs → read-credential-keys-77a91T8M-B0eiobOd.mjs} +0 -0
  145. package/dist/{rolldown-runtime-twds-ZHy-CO5ir_za.mjs → rolldown-runtime-twds-ZHy-8uqgIurC.mjs} +0 -0
  146. package/dist/{run-polling-CwlzB5-9.mjs → run-polling-DARidqo-.mjs} +0 -0
  147. package/dist/{schema-O9xTWad_.mjs → schema-BjH_e4Fo.mjs} +0 -0
  148. package/dist/{schema-_FQrHcIS.mjs → schema-Lbp5lGJu.mjs} +0 -0
  149. package/dist/{schema-display-CNqiYBIb.mjs → schema-display-NVEl_DFY.mjs} +0 -0
  150. package/dist/{source-analysis-CJPymdaA.mjs → source-analysis-Cs0CTBQk.mjs} +0 -0
  151. package/dist/{types-D04ah3uY.mjs → types-BMBuhHhW.mjs} +0 -0
  152. package/dist/{upload-wwSPAC5_.mjs → upload-BbcMkyVl.mjs} +1 -1
@@ -1,8 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-DMmY6oDW.mjs";
4
- import { mkdir, writeFile } from "node:fs/promises";
3
+ import { r as getKeystrokeProjectPath } from "./paths-JzzFkXQA-CEipIeVl.mjs";
4
+ import "./dist-CIInPRGh.mjs";
5
+ import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-B0eiobOd.mjs";
5
6
  import path from "node:path";
7
+ import { mkdir, writeFile } from "node:fs/promises";
6
8
  import { pathToFileURL } from "node:url";
7
9
  import { createHash, randomUUID } from "node:crypto";
8
10
  //#region ../../packages/workflow-builder/dist/builder-options-BT2McCyF.mjs
@@ -109,7 +111,7 @@ async function buildTaskTargetFile(options) {
109
111
  return builtTasks;
110
112
  }
111
113
  async function bundleTaskTargetModule(options) {
112
- const [{ rolldown }, { createEnvAccessPlugin, formatEnvAccessError }] = await Promise.all([import("rolldown"), import("./detect-env-access-CwkOYeYM-CZIixHeR.mjs").then((n) => n.n).then((n) => n.n)]);
114
+ const [{ rolldown }, { createEnvAccessPlugin, formatEnvAccessError }] = await Promise.all([import("rolldown"), import("./detect-env-access-CwkOYeYM-CNTyUzme.mjs").then((n) => n.n).then((n) => n.n)]);
113
115
  const entryId = "\0virtual:task-target-entry";
114
116
  const trackedDependencies = /* @__PURE__ */ new Set();
115
117
  const envViolations = [];
@@ -216,7 +218,7 @@ async function attachTaskTargetTriggers(options) {
216
218
  options.artifact.triggers.push(...buildTaskTriggerArtifactsWithoutBundles(options.entry.taskMetadata.triggers, options.artifact.task.taskId, options.artifact.task.taskName));
217
219
  return [];
218
220
  }
219
- const { buildTriggerArtifacts } = await import("./trigger-artifacts-RizI57RC-CxHwCkQ_.mjs").then((n) => n.n);
221
+ const { buildTriggerArtifacts } = await import("./trigger-artifacts-RizI57RC-DjhOsdOm.mjs").then((n) => n.n);
220
222
  const triggerResult = await buildTriggerArtifacts(options.entry.taskMetadata.triggers, options.artifact.task.taskId, options.artifact.task.taskName, options.projectRoot, {
221
223
  workflowExportName: options.entry.source.localExportName,
222
224
  workflowFilePath: options.entry.runtimeBundlePath
@@ -319,7 +321,7 @@ function createPreparedTaskTarget(artifact, triggers) {
319
321
  };
320
322
  }
321
323
  async function tryParseTaskBuildManifest(manifest) {
322
- const { TaskBuildManifestSchema } = await import("./task-BNXDZU71.mjs").then((n) => n.t);
324
+ const { TaskBuildManifestSchema } = await import("./task-BRmL2lmw.mjs").then((n) => n.t);
323
325
  const result = TaskBuildManifestSchema.safeParse(manifest);
324
326
  return result.success ? result.data : null;
325
327
  }
@@ -330,8 +332,7 @@ function readOptionalJsonSchemaKeysFromSchemaObject(schema) {
330
332
  return properties.filter((key) => !required.has(key));
331
333
  }
332
334
  function getTaskRuntimeBundlePath(projectRoot, target) {
333
- const hash = createHash("sha256").update(target.bindingKey).digest("hex").slice(0, 16);
334
- return path.join(projectRoot, ".keystroke", "task-target-build", `${hash}.mjs`);
335
+ return getKeystrokeProjectPath(projectRoot, "task-target-build", `${createHash("sha256").update(target.bindingKey).digest("hex").slice(0, 16)}.mjs`);
335
336
  }
336
337
  async function writeRuntimeBundle(bundlePath, code) {
337
338
  await mkdir(path.dirname(bundlePath), { recursive: true });
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as SHA256HashSchema } from "./common-BaGFkj3n.mjs";
3
+ import { n as SHA256HashSchema } from "./common-AK0q0Oz0.mjs";
4
4
  import { createHash } from "node:crypto";
5
5
  //#region ../../packages/shared-types/src/deployments/api/snapshot-payload.ts
6
6
  function sortObjectKeysDeep(value) {
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as deployTaskTargets } from "./task-target-deploy-CZBGNC0H-Ck724yF4.mjs";
3
+ import { n as deployTaskTargets } from "./task-target-deploy-CZBGNC0H-I-tvkGCC.mjs";
4
4
  export { deployTaskTargets };
@@ -1,10 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import "./default-urls-BS4twrsS.mjs";
4
- import { l as resolveAuthOptions } from "./dist-BF6r1hfv.mjs";
5
- import { n as findProjectRoot, t as assertWorkflowProjectRoot } from "./project-config-CsBMT4TL.mjs";
6
- import { mkdir, readFile, writeFile } from "node:fs/promises";
3
+ import { r as getKeystrokeProjectPath } from "./paths-JzzFkXQA-CEipIeVl.mjs";
4
+ import "./default-urls-BoSm4s9C.mjs";
5
+ import "./dist-CIInPRGh.mjs";
6
+ import { n as findProjectRoot, t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
7
+ import { t as resolveCliCredentials } from "./resolve-cli-credentials-DytxgMwn.mjs";
7
8
  import path from "node:path";
9
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
8
10
  import { spawnSync } from "node:child_process";
9
11
  //#region src/lib/process-handoff.ts
10
12
  function replaceProcessOrSpawn(options) {
@@ -22,8 +24,9 @@ function replaceProcessOrSpawn(options) {
22
24
  }
23
25
  //#endregion
24
26
  //#region src/task-target-deploy-runner.ts
25
- const TASK_TARGET_DESCRIPTOR_PATH = path.join(".keystroke", "task-target-deploy", "descriptor.json");
26
- const TASK_TARGET_BUILD_DESCRIPTOR_PATH = path.join(".keystroke", "task-target-deploy", "build-descriptor.json");
27
+ const TASK_TARGET_DEPLOY_DIR = "task-target-deploy";
28
+ const TASK_TARGET_DESCRIPTOR_FILE = "descriptor.json";
29
+ const TASK_TARGET_BUILD_DESCRIPTOR_FILE = "build-descriptor.json";
27
30
  function parseArgs(argv) {
28
31
  const options = {
29
32
  targetFiles: [],
@@ -68,10 +71,10 @@ async function resolveProjectRoot(explicitPath) {
68
71
  return discovered;
69
72
  }
70
73
  function descriptorPath(projectRoot) {
71
- return path.join(projectRoot, TASK_TARGET_DESCRIPTOR_PATH);
74
+ return getKeystrokeProjectPath(projectRoot, TASK_TARGET_DEPLOY_DIR, TASK_TARGET_DESCRIPTOR_FILE);
72
75
  }
73
76
  function buildDescriptorPath(projectRoot) {
74
- return path.join(projectRoot, TASK_TARGET_BUILD_DESCRIPTOR_PATH);
77
+ return getKeystrokeProjectPath(projectRoot, TASK_TARGET_DEPLOY_DIR, TASK_TARGET_BUILD_DESCRIPTOR_FILE);
75
78
  }
76
79
  async function writeDescriptor(projectRoot, descriptor) {
77
80
  const filePath = descriptorPath(projectRoot);
@@ -116,7 +119,7 @@ function restartStage(options, projectRoot, stage) {
116
119
  }
117
120
  async function runBuildPhase(options, projectRoot) {
118
121
  const projectConfig = await assertWorkflowProjectRoot(projectRoot);
119
- const { buildTaskTargetEntries } = await import("./task-target-build-BG6cC3bz.mjs");
122
+ const { buildTaskTargetEntries } = await import("./task-target-build-DCV0UDaz.mjs");
120
123
  await writeBuildDescriptor(projectRoot, {
121
124
  projectRoot,
122
125
  projectConfig,
@@ -129,7 +132,7 @@ async function runBuildPhase(options, projectRoot) {
129
132
  }
130
133
  async function runPreparePhase(projectRoot) {
131
134
  const buildDescriptor = await readBuildDescriptor(projectRoot);
132
- const { prepareTaskTargetBuiltTasks } = await import("./task-target-build-BG6cC3bz.mjs");
135
+ const { prepareTaskTargetBuiltTasks } = await import("./task-target-build-DCV0UDaz.mjs");
133
136
  const prepareResult = await prepareTaskTargetBuiltTasks({
134
137
  builtTasks: buildDescriptor.builtTasks,
135
138
  projectRoot
@@ -142,12 +145,14 @@ async function runPreparePhase(projectRoot) {
142
145
  });
143
146
  }
144
147
  async function resolveDeployAuthOptions(options) {
145
- const resolved = await resolveAuthOptions({
146
- apiKey: options.apiKey,
147
- serverUrl: options.serverUrl
148
+ const envApiKey = process.env.KEYSTROKE_API_KEY;
149
+ const envServerUrl = process.env.SERVER_URL;
150
+ const resolved = await resolveCliCredentials({
151
+ apiKey: options.apiKey ?? envApiKey,
152
+ serverUrl: options.serverUrl ?? envServerUrl
148
153
  });
149
- const apiKey = resolved.apiKey ?? process.env.KEYSTROKE_API_KEY;
150
- const serverUrl = resolved.serverUrl ?? process.env.SERVER_URL ?? "https://api.kestroke.ai";
154
+ const apiKey = resolved.apiKey;
155
+ const serverUrl = resolved.serverUrl ?? "https://api.keystroke.ai";
151
156
  const organizationId = options.org ?? process.env.KEYSTROKE_ORG_ID ?? resolved.activeOrg?.organizationId;
152
157
  if (!apiKey || !serverUrl) throw new Error("Not authenticated. Run `keystroke auth` or pass --api-key and --server-url.");
153
158
  return {
@@ -158,11 +163,11 @@ async function resolveDeployAuthOptions(options) {
158
163
  }
159
164
  async function runDeployPhase(options, projectRoot) {
160
165
  const descriptor = await readDescriptor(projectRoot);
161
- const { createDeployClient } = await import("./deploy-CJbVB7e2.mjs");
166
+ const { createDeployClient } = await import("./deploy-BPDUTKZD.mjs");
162
167
  const client = createDeployClient(await resolveDeployAuthOptions(options));
163
168
  const auth = await client.public.auth.validate();
164
169
  if (auth.organizationId !== descriptor.projectConfig.organizationId) throw new Error(`Project organization mismatch: config=${descriptor.projectConfig.organizationId} auth=${auth.organizationId}`);
165
- const { deployTaskTargets } = await import("./task-target-deploy-gMQC8kXU.mjs");
170
+ const { deployTaskTargets } = await import("./task-target-deploy-DmpCWE3u.mjs");
166
171
  const result = await deployTaskTargets({
167
172
  preparedTasks: descriptor.preparedTasks,
168
173
  client,
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as ui } from "./keystroke.mjs";
4
- import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-CGdYhH0p.mjs";
5
- import { t as createTypedCommand } from "./commander-D15UZVjp.mjs";
3
+ import { a as ui } from "./keystroke.mjs";
4
+ import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
5
+ import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/commands/test/test.command.ts
8
8
  const TestOptionsSchema = JsonOptionSchema;
@@ -63,7 +63,7 @@ function createTestCommand() {
63
63
  description: "Agent tool name from the built manifest",
64
64
  key: "toolName"
65
65
  },
66
- loadHandler: async () => (await import("./tool.handler--IzRGelu.mjs")).handleTestTool
66
+ loadHandler: async () => (await import("./tool.handler-DMfFZCRg.mjs")).handleTestTool
67
67
  })]
68
68
  });
69
69
  cmd.enablePositionalOptions();
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { k as CliExitError, n as ui, o as isLocalMode, x as toErrorMessage } from "./keystroke.mjs";
4
- import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
- import { t as assertWorkflowProjectRoot } from "./project-config-CsBMT4TL.mjs";
6
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-B1L8pZsH.mjs";
7
- import { o as readWorkflowsFromDisk, s as uploadTestBundle } from "./dist-FQYQ2FLm.mjs";
8
- import { t as requireWorkflowsDir } from "./resolve-project-CURYMjex.mjs";
9
- import { a as runWorkflowBuild, t as WorkflowNotFoundError } from "./workflow-build-C9rQQ4qU.mjs";
10
- import { r as isUnknownSchema } from "./schema-display-CNqiYBIb.mjs";
11
- import { t as createBuildProgress } from "./build-progress-BZivcVz4.mjs";
12
- import { t as withErrorBoundary } from "./error-boundary-CyLcinp1.mjs";
13
- import { a as tryReadExistingInputSchema, n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-BWcLQvm0.mjs";
3
+ import { D as CliExitError, a as ui, l as isLocalMode, y as toErrorMessage } from "./keystroke.mjs";
4
+ import { i as projects } from "./dist-CIInPRGh.mjs";
5
+ import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
6
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-BydAGTiB.mjs";
7
+ import { o as readWorkflowsFromDisk, s as uploadTestBundle } from "./dist-Cx0RV8s7.mjs";
8
+ import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
9
+ import { a as runWorkflowBuild, t as WorkflowNotFoundError } from "./workflow-build-C8AiYxqp.mjs";
10
+ import { r as isUnknownSchema } from "./schema-display-NVEl_DFY.mjs";
11
+ import { t as createBuildProgress } from "./build-progress-AR8xow4_.mjs";
12
+ import { t as withErrorBoundary } from "./error-boundary-B8cmSwJH.mjs";
13
+ import { a as tryReadExistingInputSchema, n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-BhOdFyh3.mjs";
14
14
  //#region src/lib/format.ts
15
15
  function formatBytes(bytes) {
16
16
  if (bytes < 1024) return `${bytes} B`;
@@ -26,7 +26,7 @@ function formatBytes(bytes) {
26
26
  async function resolveAndValidateInputForRun(options) {
27
27
  const input = await resolveInput(options);
28
28
  const workflowsDir = await requireWorkflowsDir(options.path);
29
- trackProject(workflowsDir);
29
+ projects.track(workflowsDir);
30
30
  const existingSchema = await tryReadExistingInputSchema(workflowsDir, options.workflow);
31
31
  if (existingSchema && !isUnknownSchema(existingSchema)) validateInputOrExit(options.workflow, input, existingSchema);
32
32
  return {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as ui } from "./keystroke.mjs";
4
- import { a as validateApiKey, i as requireClient } from "./context-B1L8pZsH.mjs";
3
+ import { a as ui } from "./keystroke.mjs";
4
+ import { a as validateApiKey, i as requireClient } from "./context-BydAGTiB.mjs";
5
5
  //#region src/commands/auth/test.handler.ts
6
6
  async function handleAuthTest(_options, ctx) {
7
7
  const result = await validateApiKey(requireClient(ctx));
@@ -1,18 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { N as throwReportedCliExit, a as getProcessEnv, k as CliExitError, n as ui, x as toErrorMessage } from "./keystroke.mjs";
4
- import { l as resolveAuthOptions } from "./dist-BF6r1hfv.mjs";
5
- import { t as assertWorkflowProjectRoot } from "./project-config-CsBMT4TL.mjs";
6
- import { i as writeJson } from "./output-CGdYhH0p.mjs";
7
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-B1L8pZsH.mjs";
8
- import { a as readManifestsFromOutDir } from "./dist-FQYQ2FLm.mjs";
9
- import { t as requireWorkflowsDir } from "./resolve-project-CURYMjex.mjs";
10
- import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-C9rQQ4qU.mjs";
11
- import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-BRUEdPrN.mjs";
12
- import { n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-BWcLQvm0.mjs";
13
- import { mkdtemp, rm, writeFile } from "node:fs/promises";
3
+ import { D as CliExitError, a as ui, c as getProcessEnv, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
4
+ import { t as Credentials } from "./dist-CIInPRGh.mjs";
5
+ import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
6
+ import { i as writeJson } from "./output-BWcVRt-T.mjs";
7
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-BydAGTiB.mjs";
8
+ import { a as readManifestsFromOutDir } from "./dist-Cx0RV8s7.mjs";
9
+ import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
10
+ import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-C8AiYxqp.mjs";
11
+ import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-BVliROAz.mjs";
12
+ import { n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-BhOdFyh3.mjs";
13
+ import * as os from "node:os";
14
14
  import { tmpdir } from "node:os";
15
+ import * as path$1 from "node:path";
15
16
  import path from "node:path";
17
+ import { mkdtemp, rm, writeFile } from "node:fs/promises";
16
18
  import { pathToFileURL } from "node:url";
17
19
  //#region ../../packages/testing/src/shared/create-mock-hook.ts
18
20
  /** Creates a Hook that resolves immediately when awaited. */
@@ -142,12 +144,30 @@ function createCredentialCache() {
142
144
  }
143
145
  //#endregion
144
146
  //#region ../../packages/testing/src/test-runtime/credentials/server-resolver.ts
147
+ /**
148
+ * Default `CredentialAuthResolver` that derives a `homeDir` from the supplied
149
+ * `credentialsPath` (when present) and reads from the local-memory
150
+ * `Credentials` controller. Falls back to the singleton on the user's home.
151
+ */
152
+ const defaultResolveAuth = async (input) => {
153
+ const credentials = new Credentials({ homeDir: input.credentialsPath ? path$1.dirname(path$1.dirname(input.credentialsPath)) : os.homedir() });
154
+ let active = null;
155
+ let urls = null;
156
+ try {
157
+ active = await credentials.getActiveOrg();
158
+ urls = await credentials.getServerUrls();
159
+ } catch {}
160
+ return {
161
+ apiKey: input.apiKey ?? active?.apiKey,
162
+ serverUrl: input.serverUrl ?? urls?.serverUrl
163
+ };
164
+ };
145
165
  async function createServerCredentialResolver(options, dependencies = {
146
166
  fetch: globalThis.fetch,
147
- resolveAuthOptions
167
+ resolveAuth: defaultResolveAuth
148
168
  }) {
149
169
  try {
150
- const resolvedAuth = await dependencies.resolveAuthOptions({
170
+ const resolvedAuth = await dependencies.resolveAuth({
151
171
  apiKey: options.apiKey,
152
172
  serverUrl: options.baseUrl,
153
173
  credentialsPath: options.credentialsPath
@@ -394,7 +414,7 @@ async function executeOperationTool(params) {
394
414
  mode: "auto",
395
415
  apiKey: ctx.apiKey,
396
416
  baseUrl: ctx.baseUrl,
397
- credentialsPath: ctx.credentialsPath
417
+ credentialsPath: ctx.metadataFilePath
398
418
  },
399
419
  source: "cli",
400
420
  sourceLabel: "CLI"
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as readOptionalJsonSchemaKeys } from "./declared-credential-requirements-B6h4WRv4.mjs";
4
- import { t as __exportAll } from "./rolldown-runtime-twds-ZHy-CO5ir_za.mjs";
5
- import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-DMmY6oDW.mjs";
6
- import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-CZIixHeR.mjs";
3
+ import { n as readOptionalJsonSchemaKeys } from "./declared-credential-requirements-D6KT-r-e.mjs";
4
+ import { t as __exportAll } from "./rolldown-runtime-twds-ZHy-8uqgIurC.mjs";
5
+ import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-B0eiobOd.mjs";
6
+ import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-CNTyUzme.mjs";
7
7
  import { createHash } from "node:crypto";
8
8
  import { rolldown } from "rolldown";
9
9
  //#region ../../packages/workflow-builder/dist/trigger-artifacts-RizI57RC.mjs
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as TriggerCredentialRequirementsSchema, l as WebhookMethodSchema, o as TriggerSourceSchema, s as TriggerTypeSchema } from "./credential-requirements-FtBk5JVB.mjs";
3
+ import { a as TriggerCredentialRequirementsSchema, l as WebhookMethodSchema, o as TriggerSourceSchema, s as TriggerTypeSchema } from "./credential-requirements-Ob-7H-0F.mjs";
4
4
  import { z } from "zod";
5
5
  //#region ../../packages/shared-types/src/workflows/build-output/trigger-manifest.ts
6
6
  const TriggerBuildFunctionSchema = z.object({
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { t as createTypedCommand } from "./commander-D15UZVjp.mjs";
3
+ import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/commands/upgrade/upgrade.command.ts
6
6
  const PackageManagerSchema = z.enum([
@@ -34,7 +34,7 @@ function createUpgradeCommand() {
34
34
  description: "Upgrade the Keystroke CLI to the latest published version",
35
35
  schema: UpgradeOptionsSchema,
36
36
  optionsConfig: UPGRADE_OPTIONS_CONFIG,
37
- loadHandler: async () => (await import("./upgrade.handler-CXEF4ue0.mjs")).handleUpgrade
37
+ loadHandler: async () => (await import("./upgrade.handler-5qSzPC7D.mjs")).handleUpgrade
38
38
  });
39
39
  }
40
40
  //#endregion
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { N as throwReportedCliExit, n as ui, x as toErrorMessage } from "./keystroke.mjs";
3
+ import { a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { spawn } from "node:child_process";
5
5
  //#region src/commands/upgrade/upgrade.handler.ts
6
6
  const CLI_PACKAGE_NAME = "@keystrokehq/cli";
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { N as throwReportedCliExit, a as getProcessEnv, n as ui, x as toErrorMessage } from "./keystroke.mjs";
4
- import { t as assertWorkflowProjectRoot } from "./project-config-CsBMT4TL.mjs";
5
- import { a as writeJsonError, i as writeJson } from "./output-CGdYhH0p.mjs";
6
- import { i as requireClient } from "./context-B1L8pZsH.mjs";
7
- import { a as readManifestsFromOutDir, t as collectCredentialFingerprintMapFromProjectDist } from "./dist-FQYQ2FLm.mjs";
8
- import { t as requireWorkflowsDir } from "./resolve-project-CURYMjex.mjs";
9
- import { t as getIntegrationCatalog } from "./integration-catalog-BgT4mLzW.mjs";
10
- import { t as readCredentialEnvMap } from "./credential-env-map-B2nVJXPn.mjs";
11
- import { a as verifyCredentialResolvable, i as validateManualCredentialWithHook, n as resolveCredentialValuesFromEnv, r as uploadCredential, t as groupCredentialRequirements } from "./credentials-CiOwDS5y.mjs";
12
- import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-CfyBUMPS.mjs";
3
+ import { a as ui, c as getProcessEnv, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
4
+ import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
5
+ import { a as writeJsonError, i as writeJson } from "./output-BWcVRt-T.mjs";
6
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
7
+ import { a as readManifestsFromOutDir, t as collectCredentialFingerprintMapFromProjectDist } from "./dist-Cx0RV8s7.mjs";
8
+ import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
9
+ import { t as getIntegrationCatalog } from "./integration-catalog-CmvYPvI6.mjs";
10
+ import { t as readCredentialEnvMap } from "./credential-env-map-BA4LNI7x.mjs";
11
+ import { a as verifyCredentialResolvable, i as validateManualCredentialWithHook, n as resolveCredentialValuesFromEnv, r as uploadCredential, t as groupCredentialRequirements } from "./credentials-jRiXEr6P.mjs";
12
+ import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-z74ud-YZ.mjs";
13
13
  import * as path$1 from "node:path";
14
14
  import { confirm, isCancel } from "@clack/prompts";
15
15
  //#region src/commands/credentials/upload/upload.handler.ts
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as ui } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-CGdYhH0p.mjs";
5
- import { i as requireClient } from "./context-B1L8pZsH.mjs";
6
- import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-ByLX0A-V.mjs";
3
+ import { a as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
+ import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/admin/users.get.handler.ts
8
8
  async function handleAdminUsersGet(options, ctx) {
9
9
  const client = requireClient(ctx);
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as ui } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-CGdYhH0p.mjs";
5
- import { i as requireClient } from "./context-B1L8pZsH.mjs";
6
- import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-ByLX0A-V.mjs";
3
+ import { a as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
+ import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/admin/users.list.handler.ts
9
9
  async function handleAdminUsersList(options, ctx) {
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as ui } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-CGdYhH0p.mjs";
5
- import { i as requireClient } from "./context-B1L8pZsH.mjs";
6
- import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-ByLX0A-V.mjs";
3
+ import { a as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
+ import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/admin/users.set-role.handler.ts
8
8
  async function handleAdminUsersSetRole(options, ctx) {
9
9
  const client = requireClient(ctx);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { i as readProjectConfig } from "./project-config-CsBMT4TL.mjs";
4
- import { h as resolveBuildOutputDir } from "./layout-CXkZEsXI.mjs";
3
+ import { i as readProjectConfig } from "./project-config-DudGRFPO.mjs";
4
+ import { h as resolveBuildOutputDir } from "./layout-P1v-Gssz.mjs";
5
5
  import path from "node:path";
6
6
  //#region ../../packages/project-config/src/utils.ts
7
7
  function resolveConfiguredBuildOutputDir(projectRoot, buildConfig) {
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { N as throwReportedCliExit, n as ui, x as toErrorMessage } from "./keystroke.mjs";
4
- import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
- import { i as writeJson } from "./output-CGdYhH0p.mjs";
6
- import { t as requireWorkflowsDir } from "./resolve-project-CURYMjex.mjs";
7
- import { s as build, t as WorkflowNotFoundError } from "./workflow-build-C9rQQ4qU.mjs";
8
- import { t as createBuildProgress } from "./build-progress-BZivcVz4.mjs";
9
- import { mkdtemp, rm } from "node:fs/promises";
3
+ import { a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
4
+ import { i as projects } from "./dist-CIInPRGh.mjs";
5
+ import { i as writeJson } from "./output-BWcVRt-T.mjs";
6
+ import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
7
+ import { s as build, t as WorkflowNotFoundError } from "./workflow-build-C8AiYxqp.mjs";
8
+ import { t as createBuildProgress } from "./build-progress-AR8xow4_.mjs";
10
9
  import * as os from "node:os";
11
10
  import * as path$1 from "node:path";
11
+ import { mkdtemp, rm } from "node:fs/promises";
12
12
  //#region src/commands/workflows/validate/workflow-validate.ts
13
13
  /**
14
14
  * workflow-validate.ts
@@ -256,7 +256,7 @@ function renderValidateFailure(error, asJson) {
256
256
  //#region src/commands/workflows/validate/validate.handler.ts
257
257
  async function handleWorkflowsValidate(options, ctx) {
258
258
  const workflowsDir = await requireWorkflowsDir(options.path);
259
- trackProject(workflowsDir);
259
+ projects.track(workflowsDir);
260
260
  const { jsonMode } = ctx;
261
261
  renderValidateHeader(options.workflow);
262
262
  const progress = createBuildProgress(options.workflow ?? "all workflows");
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { i as __toESM, n as __exportAll } from "./chunk-CH6r78ws.mjs";
4
- import { d as originalConsole, f as ANSI, n as ui, p as style, u as logger, x as toErrorMessage } from "./keystroke.mjs";
5
- import { a as getKeystrokeTmpDir } from "./dist-BF6r1hfv.mjs";
6
- import { t as assertWorkflowProjectRoot } from "./project-config-CsBMT4TL.mjs";
7
- import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-OPFqFD6f.mjs";
8
- import { t as AgentVersionManifestSchema } from "./agent-manifest-CZdlCTFs.mjs";
9
- import { r as RelativeFilePathSchema } from "./file-metadata-DaPPpiTh.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-CXkZEsXI.mjs";
11
- import { t as resolveConfiguredBuildOutputDir } from "./utils-VC0Vl_pm.mjs";
12
- import { a as readAgentSandboxPackage, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-rRTPU13L.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-Bv-B0nHj-CqlcZz_g.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-B-SpZ0G2-olEAgSLc.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--8x5SLum-DaUNACER.mjs";
16
- import { a as literalString, n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-DdiZWqe2.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-BBg2E_6G-BQqm16RR.mjs";
18
- import { n as parseRelativeFilePath } from "./normalize-path-CojS-CgQ-DFTvyA27.mjs";
19
- import * as fs from "node:fs/promises";
20
- import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
4
+ import { F as originalConsole, P as logger, a as ui, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
5
+ import { r as getKeystrokeTmpDir } from "./dist-CIInPRGh.mjs";
6
+ import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
7
+ import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-BKKW9D05.mjs";
8
+ import { t as AgentVersionManifestSchema } from "./agent-manifest-tIsqF2OP.mjs";
9
+ import { r as RelativeFilePathSchema } from "./file-metadata-lrX05iRt.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-P1v-Gssz.mjs";
11
+ import { t as resolveConfiguredBuildOutputDir } from "./utils-BMUWnz1P.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-Bv-B0nHj-B1c5giJ7.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-B-SpZ0G2-CLh7sXRd.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--8x5SLum-DjPUZr4i.mjs";
16
+ import { a as literalString, n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-Cvx4Z-4H.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-BBg2E_6G-Ut7kYHOz.mjs";
18
+ import { n as parseRelativeFilePath } from "./normalize-path-CojS-CgQ-D4wSBHgG.mjs";
21
19
  import * as path$1 from "node:path";
22
20
  import path from "node:path";
21
+ import * as fs from "node:fs/promises";
22
+ import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
23
23
  import { fileURLToPath } from "node:url";
24
24
  import { z } from "zod";
25
25
  import { createHash } from "node:crypto";
@@ -978,7 +978,7 @@ async function buildDiscoveredWorkflows(options) {
978
978
  const failures = [...buildPlan.failures];
979
979
  const warnings = [];
980
980
  if (buildPlan.workflows.length > 0) {
981
- const { buildWorkflowArtifacts } = await import("./build-workflows-CV4tBo6S-knCnBKTc.mjs");
981
+ const { buildWorkflowArtifacts } = await import("./build-workflows-CV4tBo6S-szwrAGWT.mjs");
982
982
  const result = await buildWorkflowArtifacts({
983
983
  entries: buildPlan.workflows,
984
984
  workflowsByKey,
@@ -993,7 +993,7 @@ async function buildDiscoveredWorkflows(options) {
993
993
  warnings.push(...result.warnings);
994
994
  }
995
995
  if (buildPlan.agents.length > 0) {
996
- const { buildAgentArtifacts } = await import("./build-agents-DseUtzd4-VYWtIZy9.mjs");
996
+ const { buildAgentArtifacts } = await import("./build-agents-DseUtzd4-CthuIecx.mjs");
997
997
  const result = await buildAgentArtifacts({
998
998
  entries: buildPlan.agents,
999
999
  projectRoot: options.projectRoot
@@ -1002,7 +1002,7 @@ async function buildDiscoveredWorkflows(options) {
1002
1002
  failures.push(...result.failures);
1003
1003
  }
1004
1004
  if (buildPlan.tasks.length > 0) {
1005
- const { buildTaskArtifacts } = await import("./build-tasks-GVuMLS0h-p08mMOyK.mjs");
1005
+ const { buildTaskArtifacts } = await import("./build-tasks-GVuMLS0h-BaPhhGXO.mjs");
1006
1006
  const result = await buildTaskArtifacts({
1007
1007
  entries: buildPlan.tasks,
1008
1008
  projectRoot: options.projectRoot,
@@ -1110,7 +1110,7 @@ async function createBuildPlan(options) {
1110
1110
  const currentWorkflowIndex = workflowProgressIndex;
1111
1111
  workflowProgressIndex += 1;
1112
1112
  if (!loadResult?.ok) {
1113
- const { createWorkflowMetadataFailure } = await import("./build-workflows-CV4tBo6S-knCnBKTc.mjs");
1113
+ const { createWorkflowMetadataFailure } = await import("./build-workflows-CV4tBo6S-szwrAGWT.mjs");
1114
1114
  plan.failures.push(createWorkflowMetadataFailure(discoveredWorkflow, loadResult?.error));
1115
1115
  continue;
1116
1116
  }
@@ -1308,7 +1308,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
1308
1308
  cacheResolvedBindingKeys,
1309
1309
  releaseBundleMemory: config.releaseBundleMemory
1310
1310
  };
1311
- const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-B-SpZ0G2-olEAgSLc.mjs").then((n) => n.f).then((n) => n.t);
1311
+ const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-B-SpZ0G2-CLh7sXRd.mjs").then((n) => n.f).then((n) => n.t);
1312
1312
  const writeResult = targetBindingKeys ? await writeTargetedBuildOutput({
1313
1313
  artifacts: finalizedScopedArtifacts,
1314
1314
  agentArtifacts,
@@ -1333,7 +1333,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
1333
1333
  elapsedMs: performance.now() - writeStartedAt,
1334
1334
  ...writeResult.skippedWriteCount !== void 0 && writeResult.skippedWriteCount > 0 ? { skippedWriteCount: writeResult.skippedWriteCount } : {}
1335
1335
  });
1336
- const { buildMetadataArtifacts } = await import("./build-metadata-C8Ra_Gi--BdoyLQMl.mjs");
1336
+ const { buildMetadataArtifacts } = await import("./build-metadata-C8Ra_Gi--L3l8w0rh.mjs");
1337
1337
  const metadata = await buildMetadataArtifacts({
1338
1338
  projectRoot: config.projectRoot,
1339
1339
  outputDir,
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as SHA256HashSchema, t as JsonSchemaSchema } from "./common-BaGFkj3n.mjs";
4
- import { a as SourceLocationSchema, i as ImportSourceSchema, n as CallsiteFingerprintSchema, t as CallKindSchema } from "./source-analysis-CJPymdaA.mjs";
5
- import { c as TriggerUploadDataSchema, i as ResolvedCredentialSetSchema, r as IntegrationScopeSchema, t as CredentialRequirementsSchema, u as WorkflowStepEntrySchema } from "./credential-requirements-FtBk5JVB.mjs";
3
+ import { n as SHA256HashSchema, t as JsonSchemaSchema } from "./common-AK0q0Oz0.mjs";
4
+ import { a as SourceLocationSchema, i as ImportSourceSchema, n as CallsiteFingerprintSchema, t as CallKindSchema } from "./source-analysis-Cs0CTBQk.mjs";
5
+ import { c as TriggerUploadDataSchema, i as ResolvedCredentialSetSchema, r as IntegrationScopeSchema, t as CredentialRequirementsSchema, u as WorkflowStepEntrySchema } from "./credential-requirements-Ob-7H-0F.mjs";
6
6
  import { z } from "zod";
7
7
  //#region ../../packages/workflow-build-contracts/src/flow-graph-schema.ts
8
8
  const DecisionKindSchema = z.enum([
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-DdiZWqe2.mjs";
4
- import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-CZIixHeR.mjs";
5
- import { existsSync, readFileSync, realpathSync } from "node:fs";
3
+ import { n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-Cvx4Z-4H.mjs";
4
+ import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-CNTyUzme.mjs";
6
5
  import * as path$1 from "node:path";
6
+ import { existsSync, readFileSync, realpathSync } from "node:fs";
7
7
  import { createHash } from "node:crypto";
8
8
  import { rolldown } from "rolldown";
9
9
  //#region ../../packages/workflow-builder/dist/workflow-bundler-BzHk73PM.mjs