@keystrokehq/cli 0.0.32 → 0.0.37

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 (147) hide show
  1. package/README.md +25 -4
  2. package/dist/{accept.handler-DNfIXPSP.mjs → accept.handler-DCsud1s5.mjs} +4 -4
  3. package/dist/{admin-CJp8XksD.mjs → admin-BaOtHeZ2.mjs} +10 -10
  4. package/dist/{agent-manifest-De5TCxZq.mjs → agent-manifest-DfWD5tvv.mjs} +17 -27
  5. package/dist/{agents-G37PM35Z.mjs → agents-BVAVfMR_.mjs} +9 -9
  6. package/dist/{api-keys-4igNHJ_W.mjs → api-keys-BhEEsHUh.mjs} +6 -6
  7. package/dist/{api-BK3EhPvs.mjs → api-sWkB_Wta.mjs} +1 -1
  8. package/dist/{auth-CIOmmV4x.mjs → auth-BnsitjzT.mjs} +6 -6
  9. package/dist/{auth.handler-CznN_vfz.mjs → auth.handler-W_xk14TL.mjs} +3 -3
  10. package/dist/authored-workflow-ref-fkHEEVnd.mjs +113 -0
  11. package/dist/{build-agents-DseUtzd4-CSGpNXur.mjs → build-agents-CUzBnlAG-3ePFZiJ6.mjs} +12 -11
  12. package/dist/{build-progress-DLM1Bt4T.mjs → build-progress-CM-b6Bby.mjs} +2 -2
  13. package/dist/{build-tasks-C09SdfjC-BmAVLTtQ.mjs → build-tasks-5eOvI19S-tbN6CRx9.mjs} +4 -4
  14. package/dist/{build-workflows-BZ_m97Pr-BiyptCrn.mjs → build-workflows-C-gQM3l5-_zcBHE3M.mjs} +14 -9
  15. package/dist/{build.handler-zHimoO7c.mjs → build.handler-CpAsAsBc.mjs} +12 -9
  16. package/dist/{clear-cache.handler-BP0K1-uN.mjs → clear-cache.handler-gJpwslkK.mjs} +2 -2
  17. package/dist/{clear.handler-T27GpgSu.mjs → clear.handler-CDyG6-dk.mjs} +1 -1
  18. package/dist/{clear.handler-PsA5QKHx.mjs → clear.handler-_sR33Hp8.mjs} +2 -2
  19. package/dist/{commander-BlrSdFcu.mjs → commander-C6SSTQJ2.mjs} +22 -3
  20. package/dist/{connect-BbLJhlIA.mjs → connect-27EgnljZ.mjs} +3 -3
  21. package/dist/{connect.handler-BthE-7Wg.mjs → connect.handler-COM1LnNg.mjs} +5 -5
  22. package/dist/{context-sgKhRc5v.mjs → context-ebZssGCY.mjs} +4 -4
  23. package/dist/{create.handler-BovbO_g0.mjs → create.handler-CAWJAGzQ.mjs} +3 -3
  24. package/dist/{credential-env-map-CRs0llf0.mjs → credential-env-map-5a41jLwM.mjs} +1 -1
  25. package/dist/{credential-requirements-D0mavK8j-CFMf0Xwu.mjs → credential-requirements-B5Alhu1v-DanlSKnT.mjs} +3 -3
  26. package/dist/{credential-schema-mismatch-ClQgEVtO.mjs → credential-schema-mismatch-c17ktoNU.mjs} +1 -1
  27. package/dist/{credentials-CsncZ52a.mjs → credentials-C0ssbMlp.mjs} +10 -10
  28. package/dist/{credentials-DKrSaaLw.mjs → credentials-DtwLbee6.mjs} +1 -1
  29. package/dist/current-deployment-workflow-C6x65imE.mjs +20 -0
  30. package/dist/current.handler-DP1L_hm3.mjs +19 -0
  31. package/dist/{delete.handler-DkAK396w.mjs → delete.handler-C-5XFkgN.mjs} +2 -2
  32. package/dist/{deploy-DvPfR9fC.mjs → deploy-BcVQJza8.mjs} +2 -2
  33. package/dist/{deploy-progress-BsUH7fGE.mjs → deploy-progress-Bt86Yc1r.mjs} +2 -2
  34. package/dist/{deploy.handler-BW3f2N2G.mjs → deploy.handler-GPS9lxGk.mjs} +16 -16
  35. package/dist/{diff-utils-Bs--xmoV.mjs → diff-utils-YEUYtSRs.mjs} +1 -1
  36. package/dist/{diff.handler-BwhsoAg0.mjs → diff.handler-DkM5dhaN.mjs} +15 -9
  37. package/dist/{dist-Dw7gCE7y.mjs → dist-B5jy238v.mjs} +37 -11
  38. package/dist/{dist-CTEtWDW4.mjs → dist-BmbFJq8U.mjs} +8 -27
  39. package/dist/{env.handler-Dks6ZQh-.mjs → env.handler-V_isbSi2.mjs} +52 -29
  40. package/dist/{error-boundary-0veZ_RDS.mjs → error-boundary-BRxUsPi7.mjs} +3 -3
  41. package/dist/{iam-command-utils-CSZj4XlH.mjs → iam-command-utils-DNDN0wT6.mjs} +3 -13
  42. package/dist/{import-module-y0glInUe-DV_3dsU0.mjs → import-module-y0glInUe-EuAWaw9g.mjs} +506 -128
  43. package/dist/{init-BOCDwqKR.mjs → init-D1OmmclX.mjs} +3 -3
  44. package/dist/{init.handler-B3T4J6u_.mjs → init.handler-CUbYlUgP.mjs} +5 -5
  45. package/dist/{inspect.handler-v9snxDLi.mjs → inspect.handler-BE6coOuW.mjs} +24 -13
  46. package/dist/{integration-catalog-CiZ62hb_.mjs → integration-catalog-pSmWHFLQ.mjs} +3 -3
  47. package/dist/{integrations-m7_tb3GV.mjs → integrations-DZD5t8n2.mjs} +7 -7
  48. package/dist/{invites-BuatfJmN.mjs → invites-BuR1H-tA.mjs} +5 -5
  49. package/dist/{invites.list.handler-CK6mL10z.mjs → invites.list.handler-Dj4a6XOg.mjs} +6 -5
  50. package/dist/{invites.resend.handler-CKZouK1Z.mjs → invites.resend.handler-DEGF4vlB.mjs} +6 -5
  51. package/dist/{invites.revoke.handler-H0VI-3sp.mjs → invites.revoke.handler-Dg4ZvlFS.mjs} +6 -5
  52. package/dist/keystroke.mjs +122 -77
  53. package/dist/{list-enrichment-DP1wEyBZ.mjs → list-enrichment-dqbkXJzy.mjs} +2 -2
  54. package/dist/{list.handler-LxZInip2.mjs → list.handler-2g1CZAvB.mjs} +4 -4
  55. package/dist/{list.handler-DbYUk6ko.mjs → list.handler-7MkJfkak.mjs} +5 -5
  56. package/dist/list.handler-BTYVIn6z.mjs +39 -0
  57. package/dist/{list.handler-BiY5NFWd.mjs → list.handler-Bchcr3-e.mjs} +3 -3
  58. package/dist/list.handler-Choc4SZz.mjs +64 -0
  59. package/dist/{list.handler-CMRQKH4b.mjs → list.handler-D47C1z3m.mjs} +4 -4
  60. package/dist/{list.handler-DVnFrlis.mjs → list.handler-DYE48apa.mjs} +7 -7
  61. package/dist/{list.handler-DIMWZx78.mjs → list.handler-KcCaG3PZ.mjs} +4 -4
  62. package/dist/list2.handler-BIaIyrQf.mjs +99 -0
  63. package/dist/{listen-C_7Rgwkb.mjs → listen-CVY-_F29.mjs} +3 -3
  64. package/dist/{listen.handler-dJgorIzr.mjs → listen.handler-D_nEvXRn.mjs} +4 -4
  65. package/dist/{logs-B9YMhUGt.mjs → logs-CZ2qnsSH.mjs} +3 -3
  66. package/dist/{logs.handler-BfjCsAyq.mjs → logs.handler-BRUzZC9Z.mjs} +26 -29
  67. package/dist/{logs.handler-DGGVPMOX.mjs → logs.handler-Wk6mYyAZ.mjs} +1 -1
  68. package/dist/{members.add.handler-DSRCRxsI.mjs → members.add.handler-BJ0wr6rP.mjs} +6 -5
  69. package/dist/{members.invite.handler-BNpHn1dY.mjs → members.invite.handler-DyveDMuq.mjs} +6 -5
  70. package/dist/{members.list.handler-Bn9LJEPG.mjs → members.list.handler-CyQxH_zS.mjs} +6 -5
  71. package/dist/{members.remove.handler-Dkr2t_tX.mjs → members.remove.handler-Dtv9PooY.mjs} +6 -5
  72. package/dist/{members.update.handler-DBtUYuAY.mjs → members.update.handler-CeK-tCjT.mjs} +6 -5
  73. package/dist/{operations-CF2nUiBs.mjs → operations-CxQlt0S0.mjs} +5 -5
  74. package/dist/{org-DOH7YHk2.mjs → org-B8MPHJJu.mjs} +35 -28
  75. package/dist/org-context-BI9OSpbb.mjs +112 -0
  76. package/dist/org-output-DffU7DKn.mjs +64 -0
  77. package/dist/{orgs.create.handler-BO70zIdp.mjs → orgs.create.handler-BKvSmkU3.mjs} +4 -4
  78. package/dist/{orgs.get.handler-BuGg5bc9.mjs → orgs.get.handler-BA-CexIY.mjs} +4 -4
  79. package/dist/{orgs.list.handler--5HutMkl.mjs → orgs.list.handler-eCEg5kC1.mjs} +4 -4
  80. package/dist/{output-BWcVRt-T.mjs → output-DnIFEmi5.mjs} +1 -1
  81. package/dist/{package-manager-CvY4IW7X.mjs → package-manager-BP3-q8hh.mjs} +27 -2
  82. package/dist/{paused.handler-DHvxz-cC.mjs → paused.handler-4wKMTKZ-.mjs} +20 -33
  83. package/dist/{projects-C5GZ5Jrf.mjs → projects-Wu_2fB_x.mjs} +11 -9
  84. package/dist/{register.handler-CKMZ2WmD.mjs → register.handler-BvAkXCwE.mjs} +2 -2
  85. package/dist/{render-credential-Bn15FEUC.mjs → render-credential-D-H1ECDt.mjs} +1 -1
  86. package/dist/{render-operation-DWbMwhfc.mjs → render-operation-VdEPhoII.mjs} +2 -2
  87. package/dist/{requirements.handler-B5rqCjMu.mjs → requirements.handler-Bab4kBtw.mjs} +7 -7
  88. package/dist/{resolve-cli-credentials-CAOSVMJP.mjs → resolve-cli-credentials-GVOOedoQ.mjs} +1 -1
  89. package/dist/{resolve-project-E9mrh_el.mjs → resolve-project-DLKlAy0z.mjs} +24 -8
  90. package/dist/{run-polling-DawiBus-.mjs → run-polling-C5fI7xTp.mjs} +97 -14
  91. package/dist/{run.handler-BG7xitEK.mjs → run.handler-BKD5Xu0A.mjs} +42 -30
  92. package/dist/{runs-swYYBT6C.mjs → runs-CT31dczt.mjs} +4 -4
  93. package/dist/{schema-display-FvI8QjOQ.mjs → schema-display-sZ6ConJd.mjs} +33 -26
  94. package/dist/schemas-ClAIoIrX.mjs +281 -0
  95. package/dist/{search-CA0J5NOY.mjs → search-BeQW_pf4.mjs} +3 -3
  96. package/dist/{search.handler-BVDsYZlJ.mjs → search.handler-BJ-ZlDL4.mjs} +6 -6
  97. package/dist/{show.handler-nkK6Erbb.mjs → show.handler-BrIHUH28.mjs} +4 -4
  98. package/dist/{show.handler-CsidInW8.mjs → show.handler-Cqe_hCqU.mjs} +5 -5
  99. package/dist/{show.handler-CwwnCmbp.mjs → show.handler-DB8xl5FU.mjs} +6 -6
  100. package/dist/{skill-installer-DG8kTaQR.mjs → skill-installer-DuMhavmM.mjs} +3 -1
  101. package/dist/{skills-sync.handler-yRmi3OgP.mjs → skills-sync.handler-BGs-_YD9.mjs} +13 -7
  102. package/dist/{skills.command-COYd3k4Z.mjs → skills.command-DUWn6FbL.mjs} +5 -5
  103. package/dist/skills.handler-DqLXJepA.mjs +9 -0
  104. package/dist/{spinner-progress-lrKDs4YF.mjs → spinner-progress-BYxlr3lY.mjs} +1 -1
  105. package/dist/status.handler-DAId4bVU.mjs +72 -0
  106. package/dist/{switch.handler-BwYndsP-.mjs → switch.handler-Cd4Yg2n8.mjs} +17 -4
  107. package/dist/{sync-6fZkIUtn.mjs → sync-DgC4lcxh.mjs} +2 -2
  108. package/dist/{sync.handler-Ctr-cN9X.mjs → sync.handler-Cm_WtGmH.mjs} +8 -8
  109. package/dist/{task-BWuIKWh4.mjs → task-DTvLzUkA.mjs} +2 -88
  110. package/dist/{task-target-build-QllcCfoN.mjs → task-target-build-CtvRyVjH.mjs} +5 -5
  111. package/dist/task-target-deploy-runner.mjs +6 -6
  112. package/dist/{test-C8VIZe9V.mjs → test-4V7nh67i.mjs} +5 -5
  113. package/dist/{test.handler-BCW0YBPd.mjs → test.handler-BdCYcwR4.mjs} +2 -2
  114. package/dist/{test.handler-DLaxrJ9V.mjs → test.handler-Bo4YTs2Z.mjs} +19 -16
  115. package/dist/{tool.handler-8qNmgdRe.mjs → tool.handler-CPCrSDq2.mjs} +12 -12
  116. package/dist/{trigger-artifacts-BcRScRSp-BiD2h6do.mjs → trigger-artifacts-BcRScRSp-BRpU-He5.mjs} +2 -2
  117. package/dist/{trigger-manifest-C07EM-b2.mjs → trigger-manifest-BVqjDhxU.mjs} +1 -1
  118. package/dist/{upgrade-DgOcc8IT.mjs → upgrade-2qUOcjxb.mjs} +4 -8
  119. package/dist/upgrade.handler-PqlKSuUE.mjs +99 -0
  120. package/dist/{upload.handler-B7xle1oX.mjs → upload.handler-CS-vLpzC.mjs} +9 -9
  121. package/dist/{users.get.handler-C4t1vXwi.mjs → users.get.handler-CH1c6Lnj.mjs} +4 -4
  122. package/dist/{users.list.handler-Dvl90grq.mjs → users.list.handler-CxbZFgjO.mjs} +4 -4
  123. package/dist/{users.set-role.handler-Djw1_VGf.mjs → users.set-role.handler-CBRE-Ws6.mjs} +4 -4
  124. package/dist/{validate.handler-Drf_lssw.mjs → validate.handler-1d-UmtXB.mjs} +171 -26
  125. package/dist/{workflow-build-Begvjfq8.mjs → workflow-build-Bm8JoVv4.mjs} +234 -32
  126. package/dist/{workflow-build-manifest-1sC52TIG.mjs → workflow-build-manifest-CV6bBmDO.mjs} +1 -1
  127. package/dist/{workflow-bundler-BzHk73PM-muPv1yGG.mjs → workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs} +15 -4
  128. package/dist/{workflows-DjMlxuBX.mjs → workflows-ny7rOdeH.mjs} +34 -37
  129. package/dist/{writer-byNNUjRm-B-on1n6c.mjs → writer-BLg0RuZa-Y6ExdYH9.mjs} +6 -4
  130. package/package.json +10 -10
  131. package/dist/current-deployment-workflow-B1VQCYC-.mjs +0 -94
  132. package/dist/current.handler-BaGaCLzB.mjs +0 -21
  133. package/dist/list.handler-BEMj3FyH.mjs +0 -76
  134. package/dist/list.handler-Cq_oQY5B.mjs +0 -52
  135. package/dist/list.handler-htR9TeiS.mjs +0 -24
  136. package/dist/schemas-D2zfmyC-.mjs +0 -671
  137. package/dist/skills.handler-DYIQK0Vu.mjs +0 -9
  138. package/dist/status.handler-Ch_DtyBp.mjs +0 -109
  139. package/dist/upgrade.handler-DSZuw7-9.mjs +0 -80
  140. /package/dist/{build-metadata-BB_L45ZS-DSJL7dTy.mjs → build-metadata-BB_L45ZS-DRQsV6JK.mjs} +0 -0
  141. /package/dist/{deploy-DhCbYFc7.mjs → deploy-BiKBH25R.mjs} +0 -0
  142. /package/dist/{detect-env-access-CwkOYeYM-COq4U-4Y.mjs → detect-env-access-CwkOYeYM-r4aynBU0.mjs} +0 -0
  143. /package/dist/{read-credential-keys-77a91T8M-DGK5XTQp.mjs → read-credential-keys-77a91T8M-I07NYwfH.mjs} +0 -0
  144. /package/dist/{run-polling-fBouPjJ2.mjs → run-polling-1c0ckC1A.mjs} +0 -0
  145. /package/dist/{schemas-4Mq_bxob.mjs → schemas-8nhXlXWh.mjs} +0 -0
  146. /package/dist/{task-target-deploy-B_3HPSo2.mjs → task-target-deploy-m9LfE488.mjs} +0 -0
  147. /package/dist/{types-AlA-ifK9.mjs → types-Cb0eWmUU.mjs} +0 -0
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
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-sgKhRc5v.mjs";
6
- import { n as detectPackageManager } from "./package-manager-CvY4IW7X.mjs";
7
- import { t as renderOperation } from "./render-operation-DWbMwhfc.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { r as detectPackageManager } from "./package-manager-BP3-q8hh.mjs";
7
+ import { t as renderOperation } from "./render-operation-VdEPhoII.mjs";
8
8
  //#region src/commands/operations/list.handler.ts
9
9
  async function handleOperationsList(options, ctx) {
10
10
  const result = await requireClient(ctx).operations.list({
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
5
+ import { c as resolveEffectiveOrganization, l as resolveListActiveOrganizationId, o as requireEffectiveOrganization, r as buildOrgListRows, u as warnUnknownOrganizationOverride } from "./org-context-BI9OSpbb.mjs";
6
+ import { i as renderOrgListJson, r as renderOrgListHuman } from "./org-output-DffU7DKn.mjs";
7
+ //#region src/commands/org/list.handler.ts
8
+ async function handleOrgList(_options, ctx) {
9
+ const { user } = await requireClient(ctx).users.getMe();
10
+ const memberships = user.organizations ?? [];
11
+ const storedOrgIds = new Set(ctx.storedOrgs.map((org) => org.organizationId));
12
+ if (!ctx.jsonMode && ctx.organizationId && (ctx.orgSource === "flag" || ctx.orgSource === "env")) warnUnknownOrganizationOverride({
13
+ organizationId: ctx.organizationId,
14
+ orgSource: ctx.orgSource,
15
+ memberships
16
+ });
17
+ const effective = await resolveEffectiveOrganization(ctx, memberships);
18
+ if (ctx.jsonMode && effective && !effective.isMembershipKnown) requireEffectiveOrganization(effective, ctx);
19
+ const activeOrganizationId = resolveListActiveOrganizationId(effective);
20
+ const rows = buildOrgListRows({
21
+ memberships,
22
+ activeOrganizationId,
23
+ storedOrgIds
24
+ });
25
+ if (ctx.jsonMode) {
26
+ renderOrgListJson({
27
+ rows,
28
+ activeOrganizationId: activeOrganizationId ?? null
29
+ });
30
+ return;
31
+ }
32
+ if (memberships.length === 0) {
33
+ ui.warn("You do not belong to any organization.");
34
+ return;
35
+ }
36
+ renderOrgListHuman(rows);
37
+ }
38
+ //#endregion
39
+ export { handleOrgList };
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
3
+ import { N as throwReportedCliExit, n as style, p as ui, t as ANSI, x as toErrorMessage } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
6
  import Table from "cli-table3";
7
7
  //#region src/commands/api-keys/list.handler.ts
8
8
  async function handleApiKeysList(_options, ctx) {
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { N as throwReportedCliExit, n as style, p as ui, t as ANSI } from "./keystroke.mjs";
4
+ import { i as projects } from "./dist-B5jy238v.mjs";
5
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
6
+ import { t as requireWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
7
+ import { t as createSpinnerProgress } from "./spinner-progress-BYxlr3lY.mjs";
8
+ import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Bm8JoVv4.mjs";
9
+ import { i as formatWorkflowInputFlag, t as formatExampleInputJson } from "./schema-display-sZ6ConJd.mjs";
10
+ //#region src/commands/workflows/list.handler.ts
11
+ function workflowListJsonEntry(artifact) {
12
+ const authoredWorkflowId = artifact.manifest.id;
13
+ return {
14
+ name: artifact.manifest.name,
15
+ id: authoredWorkflowId ?? null,
16
+ filePath: artifact.workflow.resolvedFilePath,
17
+ description: artifact.manifest.description ?? null,
18
+ exportName: artifact.workflow.exportName,
19
+ exampleInput: authoredWorkflowId ? formatExampleInputJson(artifact.manifest.workflowSchemas?.input) : null
20
+ };
21
+ }
22
+ function formatWorkflow(artifact) {
23
+ const name = style(artifact.manifest.name, `${ANSI.bold}${ANSI.cyan}`);
24
+ const filePath = style(artifact.workflow.resolvedFilePath, ANSI.dim);
25
+ const lines = [` ${name}`, ` ${filePath}`];
26
+ if (artifact.manifest.id) lines.push(` ${style(`id: ${artifact.manifest.id}`, ANSI.dim)}`);
27
+ if (artifact.manifest.description) lines.push(` ${artifact.manifest.description}`);
28
+ if (artifact.manifest.id) {
29
+ const inputFlag = formatWorkflowInputFlag(artifact.manifest.workflowSchemas?.input);
30
+ lines.push(` ${style(`$ keystroke workflows test ${artifact.manifest.id} ${inputFlag}`, ANSI.dim)}`);
31
+ lines.push(` ${style(`$ keystroke workflows run ${artifact.manifest.id} ${inputFlag}`, ANSI.dim)}`);
32
+ }
33
+ return lines.join("\n");
34
+ }
35
+ async function handleWorkflowsList(options, ctx) {
36
+ const workflowsDir = await requireWorkflowsDir(options.path);
37
+ await projects.track(workflowsDir);
38
+ const spinner = !ctx.jsonMode ? createSpinnerProgress("[list]") : void 0;
39
+ spinner?.start("Loading workflows...");
40
+ try {
41
+ const { result } = await runWorkflowBuild({
42
+ workflowsDir,
43
+ verbose: false
44
+ });
45
+ spinner?.stop();
46
+ if (ctx.jsonMode) {
47
+ writeJson(result.artifacts.map(workflowListJsonEntry));
48
+ return;
49
+ }
50
+ if (result.artifacts.length === 0) {
51
+ ui.hint(`No workflows found in ${workflowsDir}`);
52
+ return;
53
+ }
54
+ ui.text(result.artifacts.map(formatWorkflow).join("\n\n"));
55
+ ui.br();
56
+ ui.hint(`${result.artifacts.length} workflow(s) found`);
57
+ } catch (error) {
58
+ spinner?.stop();
59
+ renderBuildFailure(error);
60
+ throwReportedCliExit("Failed to list workflows.", { cause: error });
61
+ }
62
+ }
63
+ //#endregion
64
+ export { handleWorkflowsList };
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui, n as style, t as ANSI, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { t as getIntegrationCatalog } from "./integration-catalog-CiZ62hb_.mjs";
3
+ import { b as isNetworkError, n as style, p as ui, t as ANSI, x as toErrorMessage } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { t as getIntegrationCatalog } from "./integration-catalog-pSmWHFLQ.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/integrations/list.handler.ts
9
9
  function summarizeConnections(entry, connections) {
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui, c as getProcessEnv, j as throwReportedCliExit } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { a as readManifestsFromOutDir } from "./dist-CTEtWDW4.mjs";
7
- import { n as resolveWorkflowsDir } from "./resolve-project-E9mrh_el.mjs";
8
- import { t as readCredentialEnvMap } from "./credential-env-map-CRs0llf0.mjs";
9
- import { a as loadProjectDotenvFile, i as enrichServerCredentialRow, l as renderCredentialListBlocks, n as buildSyntheticNotOnServerRows, r as collectMergedManifestGroups, t as buildCredentialWorkflowConsumersByGroup } from "./list-enrichment-DP1wEyBZ.mjs";
3
+ import { N as throwReportedCliExit, c as getProcessEnv, p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { a as readManifestsFromOutDir } from "./dist-BmbFJq8U.mjs";
7
+ import { n as resolveWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
8
+ import { t as readCredentialEnvMap } from "./credential-env-map-5a41jLwM.mjs";
9
+ import { a as loadProjectDotenvFile, i as enrichServerCredentialRow, l as renderCredentialListBlocks, n as buildSyntheticNotOnServerRows, r as collectMergedManifestGroups, t as buildCredentialWorkflowConsumersByGroup } from "./list-enrichment-dqbkXJzy.mjs";
10
10
  import dayjs from "dayjs";
11
11
  //#region src/commands/credentials/list/fetch-all-credential-sets.ts
12
12
  /**
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
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-sgKhRc5v.mjs";
6
- import { t as renderCredential } from "./render-credential-Bn15FEUC.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { t as renderCredential } from "./render-credential-D-H1ECDt.mjs";
7
7
  //#region src/commands/credentials/definitions/list.handler.ts
8
8
  async function handleCredentialDefinitionsList(options, ctx) {
9
9
  const result = await requireClient(ctx).credentials.definitions.list({
@@ -0,0 +1,99 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { n as style, p as ui, t as ANSI } from "./keystroke.mjs";
4
+ import { i as projects } from "./dist-B5jy238v.mjs";
5
+ import { i as readProjectConfig } from "./project-config-DudGRFPO.mjs";
6
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
7
+ import { access } from "node:fs/promises";
8
+ import Table from "cli-table3";
9
+ //#region src/commands/projects/projects-list.ts
10
+ const EMPTY_PROJECTS_HINT = "No tracked projects. Run `keystroke init` to get started.";
11
+ async function pathExists(projectPath) {
12
+ try {
13
+ await access(projectPath);
14
+ return true;
15
+ } catch {
16
+ return false;
17
+ }
18
+ }
19
+ async function resolveProjectName(entry, exists) {
20
+ if (entry.name) return entry.name;
21
+ if (!exists) return null;
22
+ return (await readProjectConfig(entry.path))?.name ?? null;
23
+ }
24
+ function relativeTime(isoDate) {
25
+ const diff = Date.now() - new Date(isoDate).getTime();
26
+ const seconds = Math.floor(diff / 1e3);
27
+ if (seconds < 60) return `${seconds}s ago`;
28
+ const minutes = Math.floor(seconds / 60);
29
+ if (minutes < 60) return `${minutes}m ago`;
30
+ const hours = Math.floor(minutes / 60);
31
+ if (hours < 24) return `${hours}h ago`;
32
+ return `${Math.floor(hours / 24)}d ago`;
33
+ }
34
+ function sortByLastAccessed(entries) {
35
+ return [...entries].sort((a, b) => new Date(b.lastAccessed).getTime() - new Date(a.lastAccessed).getTime());
36
+ }
37
+ async function buildResolvedProjectList(entries, lastProject) {
38
+ return Promise.all(sortByLastAccessed(entries).map(async (entry) => {
39
+ const exists = await pathExists(entry.path);
40
+ return {
41
+ name: await resolveProjectName(entry, exists),
42
+ path: entry.path,
43
+ lastAccessed: entry.lastAccessed,
44
+ exists,
45
+ isRecent: lastProject === entry.path
46
+ };
47
+ }));
48
+ }
49
+ function toProjectsListJson(entries) {
50
+ return entries.map(({ name, path, lastAccessed, isRecent }) => ({
51
+ name,
52
+ path,
53
+ lastAccessed,
54
+ isRecent
55
+ }));
56
+ }
57
+ function formatProjectsTable(entries) {
58
+ const table = new Table({
59
+ head: [
60
+ "Name",
61
+ "Path",
62
+ "Last Accessed"
63
+ ],
64
+ style: { head: [] }
65
+ });
66
+ for (const entry of entries) {
67
+ const nameCol = entry.name ?? style("(unnamed)", ANSI.dim);
68
+ const pathCol = entry.exists ? entry.path : `${entry.path} ${style("(missing)", ANSI.yellow)}`;
69
+ const indicator = entry.isRecent ? ` ${style("(recent)", ANSI.cyan)}` : "";
70
+ table.push([
71
+ nameCol,
72
+ `${pathCol}${indicator}`,
73
+ relativeTime(entry.lastAccessed)
74
+ ]);
75
+ }
76
+ return table.toString();
77
+ }
78
+ //#endregion
79
+ //#region src/commands/projects/list.handler.ts
80
+ async function handleProjectsList(_options, ctx) {
81
+ const [tracked, lastProject] = await Promise.all([projects.list(), projects.getLast()]);
82
+ if (tracked.length === 0) {
83
+ if (ctx.jsonMode) {
84
+ writeJson([]);
85
+ return;
86
+ }
87
+ ui.hint(EMPTY_PROJECTS_HINT);
88
+ return;
89
+ }
90
+ const resolved = await buildResolvedProjectList(tracked, lastProject);
91
+ if (ctx.jsonMode) {
92
+ writeJson(toProjectsListJson(resolved));
93
+ return;
94
+ }
95
+ ui.text(formatProjectsTable(resolved));
96
+ ui.hint(`\n${resolved.length} project(s) tracked`);
97
+ }
98
+ //#endregion
99
+ export { handleProjectsList };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
4
- import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
3
+ import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DnIFEmi5.mjs";
4
+ import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/listen/listen.command.ts
7
7
  const ListenOptionsSchema = JsonOptionSchema.extend({ timeout: z.coerce.number().int().min(1).default(300) });
@@ -18,7 +18,7 @@ function createListenCommand() {
18
18
  description: "Listen for one incoming request and print its body",
19
19
  schema: ListenOptionsSchema,
20
20
  optionsConfig: LISTEN_OPTIONS_CONFIG,
21
- loadHandler: async () => (await import("./listen.handler-dJgorIzr.mjs")).handleListen
21
+ loadHandler: async () => (await import("./listen.handler-D_nEvXRn.mjs")).handleListen
22
22
  });
23
23
  }
24
24
  //#endregion
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { D as CliExitError, a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
- import { a as writeJsonError, i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { n as sleep } from "./run-polling-fBouPjJ2.mjs";
3
+ import { N as throwReportedCliExit, k as CliExitError, n as style, p as ui, t as ANSI, x as toErrorMessage } from "./keystroke.mjs";
4
+ import { a as writeJsonError, i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { n as sleep } from "./run-polling-1c0ckC1A.mjs";
7
7
  import { spawn } from "node:child_process";
8
8
  //#region src/lib/clipboard.ts
9
9
  function getClipboardCommands() {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
3
+ import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/commands/logs/logs.command.ts
6
6
  const LogsOptionsSchema = z.object({
@@ -44,13 +44,13 @@ function createLogsCommand() {
44
44
  description: "Display recent CLI log entries",
45
45
  schema: LogsOptionsSchema,
46
46
  optionsConfig: LOGS_OPTIONS_CONFIG,
47
- loadHandler: async () => (await import("./logs.handler-DGGVPMOX.mjs")).handleLogs,
47
+ loadHandler: async () => (await import("./logs.handler-Wk6mYyAZ.mjs")).handleLogs,
48
48
  subcommands: [createTypedCommand({
49
49
  name: "clear",
50
50
  description: "Clear the CLI log file",
51
51
  schema: z.object({}),
52
52
  optionsConfig: {},
53
- loadHandler: async () => (await import("./clear.handler-T27GpgSu.mjs")).handleLogsClear
53
+ loadHandler: async () => (await import("./clear.handler-CDyG6-dk.mjs")).handleLogsClear
54
54
  })]
55
55
  });
56
56
  }
@@ -1,29 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-fBouPjJ2.mjs";
3
+ import { N as throwReportedCliExit, k as CliExitError, n as style, p as ui, t as ANSI, x as toErrorMessage } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { n as resolveWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
7
+ import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-1c0ckC1A.mjs";
8
+ import { n as assertAuthoredWorkflowId, t as WORKFLOW_ID_COMMANDS } from "./authored-workflow-ref-fkHEEVnd.mjs";
7
9
  import Table from "cli-table3";
8
10
  //#region src/commands/workflows/_shared/run-query.ts
9
- async function listRunsByWorkflowRef(client, options) {
10
- const byAuthoredId = await client.runs.listRuns({
11
- authoredWorkflowId: options.workflowRef,
11
+ async function listRunsByAuthoredWorkflowId(client, options) {
12
+ return (await client.runs.listRuns({
13
+ authoredWorkflowId: options.authoredWorkflowId,
12
14
  status: options.status,
13
15
  limit: options.limit
14
- });
15
- if (byAuthoredId.runs.length > 0) return {
16
- kind: "authoredId",
17
- runs: byAuthoredId.runs
18
- };
19
- return {
20
- kind: "name",
21
- runs: (await client.runs.listRuns({
22
- workflowName: options.workflowRef,
23
- status: options.status,
24
- limit: options.limit
25
- })).runs
26
- };
16
+ })).runs;
27
17
  }
28
18
  //#endregion
29
19
  //#region src/commands/workflows/logs/run-log-display.ts
@@ -88,12 +78,12 @@ async function handleWorkflowsLogs(options, ctx) {
88
78
  }
89
79
  async function listRecentRuns(client, options, jsonMode) {
90
80
  try {
91
- const result = await listRunsByWorkflowRef(client, {
92
- workflowRef: options.workflow,
81
+ await assertWorkflowIdWhenLocal(options.workflow);
82
+ const runs = await listRunsByAuthoredWorkflowId(client, {
83
+ authoredWorkflowId: options.workflow,
93
84
  status: options.status,
94
85
  limit: options.limit
95
86
  });
96
- const { runs } = result;
97
87
  if (jsonMode) {
98
88
  writeJson(runs.map((run) => ({
99
89
  id: run.id,
@@ -130,8 +120,9 @@ async function listRecentRuns(client, options, jsonMode) {
130
120
  formatDuration(run.createdAt, run.completedAt)
131
121
  ]);
132
122
  ui.text(table.toString());
133
- ui.hint(result.kind === "authoredId" ? `${runs.length} run(s) matched workflow id "${options.workflow}". Use --latest to view the newest run's logs, or --run-id <id> to pin a specific run.` : `${runs.length} run(s) matched workflow name "${options.workflow}". Use --latest to view the newest run's logs, or --run-id <id> to pin a specific run.`);
123
+ ui.hint(`${runs.length} run(s) matched workflow id "${options.workflow}". Use --latest to view the newest run's logs, or --run-id <id> to pin a specific run.`);
134
124
  } catch (error) {
125
+ if (error instanceof CliExitError && error.reported) throw error;
135
126
  const message = toErrorMessage(error);
136
127
  ui.error(`Failed to list runs: ${message}`);
137
128
  throwReportedCliExit(`Failed to list runs: ${message}`, { cause: error });
@@ -139,18 +130,19 @@ async function listRecentRuns(client, options, jsonMode) {
139
130
  }
140
131
  async function showLatestRunLogs(client, options, jsonMode) {
141
132
  try {
142
- const result = await listRunsByWorkflowRef(client, {
143
- workflowRef: options.workflow,
133
+ await assertWorkflowIdWhenLocal(options.workflow);
134
+ const latestRun = (await listRunsByAuthoredWorkflowId(client, {
135
+ authoredWorkflowId: options.workflow,
144
136
  limit: 1
145
- });
146
- const latestRun = result.runs[0];
137
+ }))[0];
147
138
  if (!latestRun) {
148
139
  ui.hint(`No runs found for workflow "${options.workflow}".`);
149
140
  return;
150
141
  }
151
- if (!jsonMode) ui.hint(result.kind === "authoredId" ? `Showing logs for the latest run of workflow id "${options.workflow}". Use --run-id ${latestRun.id} to pin this run.` : `Showing logs for the latest run of workflow name "${options.workflow}". Use --run-id ${latestRun.id} to pin this run.`);
142
+ if (!jsonMode) ui.hint(`Showing logs for the latest run of workflow id "${options.workflow}". Use --run-id ${latestRun.id} to pin this run.`);
152
143
  await showRunLogs(client, latestRun.id, options, jsonMode);
153
144
  } catch (error) {
145
+ if (error instanceof CliExitError && error.reported) throw error;
154
146
  const message = toErrorMessage(error);
155
147
  ui.error(`Failed to resolve latest run: ${message}`);
156
148
  throwReportedCliExit(`Failed to resolve latest run: ${message}`, { cause: error });
@@ -227,5 +219,10 @@ async function showRunLogs(client, runId, options, jsonMode) {
227
219
  throwReportedCliExit(`Failed to get run logs: ${message}`, { cause: error });
228
220
  }
229
221
  }
222
+ async function assertWorkflowIdWhenLocal(authoredWorkflowId) {
223
+ const workflowsDir = await resolveWorkflowsDir(void 0);
224
+ if (!workflowsDir) return;
225
+ await assertAuthoredWorkflowId(authoredWorkflowId, workflowsDir, WORKFLOW_ID_COMMANDS.logs);
226
+ }
230
227
  //#endregion
231
228
  export { handleWorkflowsLogs };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { F as originalConsole, I as readLogEntries, O as InputValidationError, a as ui, n as style, t as ANSI } from "./keystroke.mjs";
3
+ import { A as InputValidationError, L as originalConsole, R as readLogEntries, n as style, p as ui, t as ANSI } from "./keystroke.mjs";
4
4
  //#region src/commands/logs/logs.handler.ts
5
5
  const LEVEL_STYLES = {
6
6
  debug: ANSI.dim,
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
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-sgKhRc5v.mjs";
6
- import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-DNDN0wT6.mjs";
7
+ import { s as requireOrganizationId } from "./org-context-BI9OSpbb.mjs";
7
8
  //#region src/commands/org/members.add.handler.ts
8
9
  async function handleMembersAdd(options, ctx) {
9
10
  const client = requireClient(ctx);
10
- const organizationId = requireOrganizationId(ctx);
11
+ const organizationId = await requireOrganizationId(ctx);
11
12
  if (options.role === "owner") requireConfirmation({
12
13
  confirmed: options.confirm,
13
14
  message: "Adding an owner grants full organization control.",
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
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-sgKhRc5v.mjs";
6
- import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-DNDN0wT6.mjs";
7
+ import { s as requireOrganizationId } from "./org-context-BI9OSpbb.mjs";
7
8
  //#region src/commands/org/members.invite.handler.ts
8
9
  async function handleMembersInvite(options, ctx) {
9
10
  const client = requireClient(ctx);
10
- const organizationId = requireOrganizationId(ctx);
11
+ const organizationId = await requireOrganizationId(ctx);
11
12
  if (options.role === "owner") requireConfirmation({
12
13
  confirmed: options.confirm,
13
14
  message: "Inviting an owner grants full organization control.",
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
 
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-sgKhRc5v.mjs";
6
- import { i as requireOrganizationId, n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-DNDN0wT6.mjs";
7
+ import { s as requireOrganizationId } from "./org-context-BI9OSpbb.mjs";
7
8
  import Table from "cli-table3";
8
9
  //#region src/commands/org/members.list.handler.ts
9
10
  async function handleMembersList(_options, ctx) {
10
11
  const client = requireClient(ctx);
11
- const organizationId = requireOrganizationId(ctx);
12
+ const organizationId = await requireOrganizationId(ctx);
12
13
  try {
13
14
  const result = await client.organizations.members.list(organizationId);
14
15
  if (isIamJsonMode(_options, ctx)) {
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
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-sgKhRc5v.mjs";
6
- import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-DNDN0wT6.mjs";
7
+ import { s as requireOrganizationId } from "./org-context-BI9OSpbb.mjs";
7
8
  //#region src/commands/org/members.remove.handler.ts
8
9
  async function handleMembersRemove(options, ctx) {
9
10
  const client = requireClient(ctx);
10
- const organizationId = requireOrganizationId(ctx);
11
+ const organizationId = await requireOrganizationId(ctx);
11
12
  requireConfirmation({
12
13
  confirmed: options.confirm,
13
14
  message: "Removing a member revokes organization access.",
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
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-sgKhRc5v.mjs";
6
- import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-DNDN0wT6.mjs";
7
+ import { s as requireOrganizationId } from "./org-context-BI9OSpbb.mjs";
7
8
  //#region src/commands/org/members.update.handler.ts
8
9
  async function handleMembersUpdate(options, ctx) {
9
10
  const client = requireClient(ctx);
10
- const organizationId = requireOrganizationId(ctx);
11
+ const organizationId = await requireOrganizationId(ctx);
11
12
  if (options.role === "owner") requireConfirmation({
12
13
  confirmed: options.confirm,
13
14
  message: "Promoting a member to owner grants full organization control.",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
4
- import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
3
+ import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DnIFEmi5.mjs";
4
+ import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/operations/operations.command.ts
7
7
  const OperationsListOptionsSchema = JsonOptionSchema.extend({
@@ -56,13 +56,13 @@ function createOperationsCommand() {
56
56
  description: "Browse and inspect operations across all integrations",
57
57
  schema: OperationsListOptionsSchema,
58
58
  optionsConfig: OPERATIONS_LIST_OPTIONS_CONFIG,
59
- loadHandler: async () => (await import("./list.handler-DbYUk6ko.mjs")).handleOperationsList,
59
+ loadHandler: async () => (await import("./list.handler-7MkJfkak.mjs")).handleOperationsList,
60
60
  subcommands: [createTypedCommand({
61
61
  name: "list",
62
62
  description: "List operations, optionally scoped to one integration",
63
63
  schema: OperationsListOptionsSchema,
64
64
  optionsConfig: OPERATIONS_LIST_OPTIONS_CONFIG,
65
- loadHandler: async () => (await import("./list.handler-DbYUk6ko.mjs")).handleOperationsList
65
+ loadHandler: async () => (await import("./list.handler-7MkJfkak.mjs")).handleOperationsList
66
66
  }), createTypedCommand({
67
67
  name: "show",
68
68
  description: "Show full details for one operation, including input/output schemas",
@@ -73,7 +73,7 @@ function createOperationsCommand() {
73
73
  description: "Operation id, e.g. aws-s3.put-object",
74
74
  key: "id"
75
75
  },
76
- loadHandler: async () => (await import("./show.handler-CwwnCmbp.mjs")).handleOperationShow
76
+ loadHandler: async () => (await import("./show.handler-DB8xl5FU.mjs")).handleOperationShow
77
77
  })]
78
78
  });
79
79
  }