@keystrokehq/cli 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/{accept.handler-CiqqUxKN.mjs → accept.handler-C6KBLKmW.mjs} +1 -1
  2. package/dist/{admin-B0U2Aghv.mjs → admin-D2CQoZAN.mjs} +9 -9
  3. package/dist/{agent-bundle-package-DWV6B_5q-BsbCEeMw.mjs → agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs} +1 -1
  4. package/dist/{agents-DBebUEwk.mjs → agents-Bn0g5o0o.mjs} +7 -7
  5. package/dist/{api-BjBpWWlm.mjs → api-J9UL8pqZ.mjs} +1 -1
  6. package/dist/{api-keys-BHAgmC4E.mjs → api-keys-BixCnZJW.mjs} +5 -5
  7. package/dist/{auth-D-PZAjdd.mjs → auth-yCNMT8sJ.mjs} +14 -7
  8. package/dist/{auth.handler-CxTDSO6O.mjs → auth.handler-BedGpKh1.mjs} +7 -12
  9. package/dist/{build-agents-DseUtzd4-BNtZrqoY.mjs → build-agents-DseUtzd4-DFh2e5Cn.mjs} +5 -5
  10. package/dist/{build-metadata-BB_L45ZS-d5-QLDZ5.mjs → build-metadata-BB_L45ZS-BtGGjHIV.mjs} +7 -7
  11. package/dist/{build-progress-BVwDg6lC.mjs → build-progress-nYa14iBP.mjs} +1 -1
  12. package/dist/{build-tasks-C09SdfjC-DxKcmENc.mjs → build-tasks-C09SdfjC-B0F7BZZG.mjs} +3 -3
  13. package/dist/{build-workflows-BZ_m97Pr-DwcnRlyh.mjs → build-workflows-BZ_m97Pr-DKANy85L.mjs} +9 -8
  14. package/dist/{build.handler-CTX80S1K.mjs → build.handler-CyDc8jiZ.mjs} +5 -5
  15. package/dist/{chunk-DYxdGL9S.mjs → chunk-CH6r78ws.mjs} +1 -2
  16. package/dist/{clear-cache.handler-8RFmjHoo.mjs → clear-cache.handler-FmJPHdWG.mjs} +1 -1
  17. package/dist/{clear.handler-Bksm2HI4.mjs → clear.handler-Cvb9chs4.mjs} +27 -13
  18. package/dist/{commander-DQLrBSIW.mjs → commander-9Kro0Dl3.mjs} +4 -7
  19. package/dist/common-AK0q0Oz0.mjs +20 -0
  20. package/dist/{connect-DV_EztVs.mjs → connect-DzVxjeYr.mjs} +2 -2
  21. package/dist/{connect.handler-DbuGt3Xb.mjs → connect.handler-DFQdxkWZ.mjs} +3 -3
  22. package/dist/{context-BUzxM3QI.mjs → context-B2cQ-Nt3.mjs} +30 -4
  23. package/dist/{create.handler-CQCRk-Na.mjs → create.handler-v9B0Z9Yf.mjs} +1 -1
  24. package/dist/{credential-env-map-qLCR_QbO.mjs → credential-env-map-Dvp00a4M.mjs} +1 -1
  25. package/dist/credential-requirements-D0mavK8j-CFMf0Xwu.mjs +619 -0
  26. package/dist/{credentials-xPtLFTjW.mjs → credentials-DQW8xxof.mjs} +2 -2
  27. package/dist/{credentials-m18a1_hw.mjs → credentials-Dr5lD7Hm.mjs} +6 -6
  28. package/dist/{current-deployment-workflow-pyBoobIm.mjs → current-deployment-workflow-qMfOrRIu.mjs} +4 -4
  29. package/dist/{current.handler-BJGJgdGP.mjs → current.handler-Cm_-JLyZ.mjs} +1 -1
  30. package/dist/declared-credential-requirements-B6h4WRv4.mjs +103 -0
  31. package/dist/{delete.handler-DNoehdOH.mjs → delete.handler-DtP_zUaq.mjs} +1 -1
  32. package/dist/{deploy-BKjcO_sm.mjs → deploy-BURTx92e.mjs} +1 -1
  33. package/dist/{deploy-3tHCBGky.mjs → deploy-CB6pfCuB.mjs} +2 -2
  34. package/dist/{deploy-progress-CyolzjRB.mjs → deploy-progress-Dlp9aBDW.mjs} +1 -1
  35. package/dist/{deploy.handler-TnPNBYXZ.mjs → deploy.handler-Bg0dpSTj.mjs} +16 -16
  36. package/dist/{detect-env-access-CwkOYeYM-D8-hxij0.mjs → detect-env-access-CwkOYeYM-D4aTZv4R.mjs} +2 -2
  37. package/dist/{diff.handler-DO2WzdGB.mjs → diff.handler-CJPrszL1.mjs} +4 -4
  38. package/dist/{dist-BGrWr5fp.mjs → dist-Br4m3sFZ.mjs} +14 -12
  39. package/dist/{dist-CIInPRGh.mjs → dist-DuJjDZIf.mjs} +25 -2
  40. package/dist/{env.handler-C5GNyiJt.mjs → env.handler-6TrLd3fo.mjs} +7 -7
  41. package/dist/{error-boundary-GtRvP2oP.mjs → error-boundary-DVZipk-A.mjs} +1 -1
  42. package/dist/{file-metadata-B8c7Y5yg.mjs → file-metadata-DQVDjr7M.mjs} +1 -1
  43. package/dist/{import-module-y0glInUe-CfNsQNia.mjs → import-module-y0glInUe-DxX0-BRO.mjs} +274 -28
  44. package/dist/{init-D9RIT2CY.mjs → init-DBMtY3eO.mjs} +3 -3
  45. package/dist/{init.handler-0TJY1YNy.mjs → init.handler-BoYbE-6H.mjs} +3 -3
  46. package/dist/{inspect.handler-BrYFfN4H.mjs → inspect.handler-Juu2vGbB.mjs} +4 -4
  47. package/dist/{integration-catalog-BrJsBkfx.mjs → integration-catalog-cYlTmOSb.mjs} +1 -1
  48. package/dist/{integrations-vSyAQ6HA.mjs → integrations-cwRfplNG.mjs} +5 -5
  49. package/dist/{invites-BASM4PJr.mjs → invites-DHyHZOY_.mjs} +4 -4
  50. package/dist/{invites.list.handler-c-aw6g5o.mjs → invites.list.handler-C-QpsG2J.mjs} +1 -1
  51. package/dist/{invites.resend.handler-MnMEjP_Z.mjs → invites.resend.handler-KFKbSPzR.mjs} +1 -1
  52. package/dist/{invites.revoke.handler-CHX6Z8kj.mjs → invites.revoke.handler-Cuz7jrGC.mjs} +1 -1
  53. package/dist/keystroke.mjs +21 -21
  54. package/dist/{list-enrichment-DcplcioC.mjs → list-enrichment-CCRHYslm.mjs} +1 -1
  55. package/dist/{list.handler-DJNtXw7C.mjs → list.handler-6x3GVumu.mjs} +1 -1
  56. package/dist/{list2.handler-BdE1k2kl.mjs → list.handler-BWsl4iYw.mjs} +4 -4
  57. package/dist/{list.handler-BsgCd1oF.mjs → list.handler-CLGQDuo5.mjs} +5 -5
  58. package/dist/{list.handler-CynN-ezD.mjs → list.handler-Cc-V1TNz.mjs} +1 -1
  59. package/dist/{list.handler-DXwKdfIv.mjs → list.handler-DRe38pAj.mjs} +2 -2
  60. package/dist/{list.handler-CDtjm-6d.mjs → list.handler-Do2tVOnu.mjs} +1 -1
  61. package/dist/{list.handler-BBzB1_1l.mjs → list.handler-RtHhrTZ3.mjs} +1 -1
  62. package/dist/{listen-Ca9KdiB2.mjs → listen-DZdSevsB.mjs} +2 -2
  63. package/dist/{listen.handler-KWPN03S8.mjs → listen.handler-BccHe1jh.mjs} +2 -2
  64. package/dist/{logs-BEDf7hZ0.mjs → logs-Bh_PBnu6.mjs} +3 -3
  65. package/dist/{logs.handler-mk1lcZbU.mjs → logs.handler-DItDS1zw.mjs} +2 -2
  66. package/dist/{members.add.handler-CTvlxBZU.mjs → members.add.handler-D3nQ_Ln6.mjs} +1 -1
  67. package/dist/{members.invite.handler-wFO0r7Pi.mjs → members.invite.handler-rKhg5n_C.mjs} +1 -1
  68. package/dist/{members.list.handler-PPdqs4nI.mjs → members.list.handler-C9Yh469k.mjs} +1 -1
  69. package/dist/{members.remove.handler-a5WI6zE4.mjs → members.remove.handler-Dnrck-E6.mjs} +1 -1
  70. package/dist/{members.update.handler-3xblTzmz.mjs → members.update.handler-qo5r6arJ.mjs} +1 -1
  71. package/dist/{metadata-layout-Bv-B0nHj-DtMWZ7Cc.mjs → metadata-layout-Bv-B0nHj-CO8mjjSl.mjs} +1 -1
  72. package/dist/{normalize-path-CojS-CgQ-CRqBc6D6.mjs → normalize-path-CojS-CgQ-aOM0agxS.mjs} +1 -1
  73. package/dist/{org-CzLw3neZ.mjs → org-DnES84sS.mjs} +15 -15
  74. package/dist/{orgs.create.handler-CcPpDweZ.mjs → orgs.create.handler-DF4eEL-2.mjs} +1 -1
  75. package/dist/{orgs.get.handler-BACPg7vR.mjs → orgs.get.handler-BmJnseQa.mjs} +1 -1
  76. package/dist/{orgs.list.handler-DEF8OyvM.mjs → orgs.list.handler-DDVvSbsT.mjs} +1 -1
  77. package/dist/{paused.handler-D4j8_Za4.mjs → paused.handler-BLUchSMD.mjs} +1 -1
  78. package/dist/{projects-CJCKxG2u.mjs → projects-Cv14bBGy.mjs} +4 -4
  79. package/dist/{projects-s5ehKLil.mjs → projects-ZNcKwds2.mjs} +2 -2
  80. package/dist/{requirements.handler-Bk-sAE9C.mjs → requirements.handler-BKFocUof.mjs} +5 -5
  81. package/dist/{resolve-cli-credentials-DytxgMwn.mjs → resolve-cli-credentials-DaMDaamj.mjs} +1 -1
  82. package/dist/{resolve-project-CWP2fji3.mjs → resolve-project-Cj3MFnU0.mjs} +1 -1
  83. package/dist/{run-polling-DKclfet-.mjs → run-polling-3XOGl4hh.mjs} +3 -3
  84. package/dist/{run.handler-x0B-CjNF.mjs → run.handler-DZuUx0fi.mjs} +5 -5
  85. package/dist/{runs-DoMVOCNj.mjs → runs-BOo3j297.mjs} +2 -2
  86. package/dist/schemas-D2zfmyC-.mjs +671 -0
  87. package/dist/{skills-sync.handler-CYkCeuQn.mjs → skills-sync.handler-09mDbx5q.mjs} +1 -1
  88. package/dist/{skills.command-DeAgMGGw.mjs → skills.command-B-MhRN3J.mjs} +4 -4
  89. package/dist/{source-analysis-BBg2E_6G-BJTRqWrQ.mjs → source-analysis-BBg2E_6G-wPP9mjQx.mjs} +3 -3
  90. package/dist/{source-analysis-BMMPIHN9.mjs → source-analysis-z2RSZw6X.mjs} +1 -1
  91. package/dist/{src-BYQwp8Ig.mjs → src-DNhUmpSl.mjs} +1 -1
  92. package/dist/{switch.handler-CV4ZBXAu.mjs → switch.handler-BFGvj5c6.mjs} +2 -2
  93. package/dist/{sync-KCVM02IY.mjs → sync-CZ3iUPTA.mjs} +2 -2
  94. package/dist/{sync.handler-Cuw89341.mjs → sync.handler-B1L8I9lF.mjs} +7 -7
  95. package/dist/{task-BSCN9cU4.mjs → task-BWuIKWh4.mjs} +2 -392
  96. package/dist/{task-target-build-B0HF2_At.mjs → task-target-build-CTgl4L42.mjs} +5 -5
  97. package/dist/{task-target-deploy-ClbwKJ8K.mjs → task-target-deploy-DeUyfi9H.mjs} +1 -1
  98. package/dist/{task-target-deploy-dQYnMO8n-CeTmRcDw.mjs → task-target-deploy-dQYnMO8n-d2vdeqXH.mjs} +1 -1
  99. package/dist/task-target-deploy-runner.mjs +6 -6
  100. package/dist/{test-Rm3thni3.mjs → test-Byq4hG3C.mjs} +2 -2
  101. package/dist/{test.handler-CTd-heRS.mjs → test.handler-BsrMMj5O.mjs} +9 -9
  102. package/dist/{test.handler-DhhcsvHN.mjs → test.handler-CAsVgOpT.mjs} +1 -1
  103. package/dist/{tool.handler-C3LNyQbc.mjs → tool.handler-BHS5Z4J_.mjs} +63 -9
  104. package/dist/{trigger-artifacts-BcRScRSp-DqFgzl_B.mjs → trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs} +4 -4
  105. package/dist/{trigger-manifest-DTni4NaZ.mjs → trigger-manifest-C07EM-b2.mjs} +6 -5
  106. package/dist/{upgrade-Cf7y38xR.mjs → upgrade-bZVjVXnu.mjs} +2 -2
  107. package/dist/{upload-CJWApEgz.mjs → upload-CE4H5R1h.mjs} +1 -1
  108. package/dist/{upload.handler-BHIWYPph.mjs → upload.handler-DXVx2u3A.mjs} +7 -7
  109. package/dist/{users.get.handler-spWaHG8h.mjs → users.get.handler-DqD2ELK2.mjs} +1 -1
  110. package/dist/{users.list.handler-DLuU7cd_.mjs → users.list.handler-DZSPvpGF.mjs} +1 -1
  111. package/dist/{users.set-role.handler-CojFmpcD.mjs → users.set-role.handler-73smNUVF.mjs} +1 -1
  112. package/dist/{utils-Ddltm1sR.mjs → utils-BaxDlCsW.mjs} +1 -1
  113. package/dist/{validate.handler-DIJBuX1P.mjs → validate.handler-CmfcMX0t.mjs} +4 -4
  114. package/dist/{workflow-build-IGYhEC8Y.mjs → workflow-build-Bi1Aacc5.mjs} +20 -20
  115. package/dist/workflow-build-manifest-1sC52TIG.mjs +259 -0
  116. package/dist/{workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs → workflow-bundler-BzHk73PM-xQwAF08W.mjs} +2 -2
  117. package/dist/{workflows-MANdvLft.mjs → workflows-C_C13Zr0.mjs} +16 -14
  118. package/dist/{writer-byNNUjRm-w5O7-VT_.mjs → writer-byNNUjRm-B-on1n6c.mjs} +6 -6
  119. package/package.json +7 -7
  120. package/dist/schemas-U2OzP9gP.mjs +0 -281
  121. package/dist/src-BHTjsZ9V.mjs +0 -456
  122. /package/dist/{agent-manifest-CZ7BeUSG.mjs → agent-manifest-Pg0aURo7.mjs} +0 -0
  123. /package/dist/{browser-Cu4k-wT_.mjs → browser-Dvv5OQrt.mjs} +0 -0
  124. /package/dist/{clear.handler-mfNmIUYP.mjs → clear.handler-BdR56Cok.mjs} +0 -0
  125. /package/dist/{concurrency-gXn9Rw8x-BSBbRfVp.mjs → concurrency-gXn9Rw8x-CnBnF2cg.mjs} +0 -0
  126. /package/dist/{credential-schema-mismatch-BHI_B-U-.mjs → credential-schema-mismatch-kfGeiSB1.mjs} +0 -0
  127. /package/dist/{diff-utils-x5pi8SrL.mjs → diff-utils-CXKNQUXO.mjs} +0 -0
  128. /package/dist/{layout-DRf9qUf8.mjs → layout-B95Tku8F.mjs} +0 -0
  129. /package/dist/{logs.handler-CcA1UzJm.mjs → logs.handler-Bs1DVMaO.mjs} +0 -0
  130. /package/dist/{oxc-B3KI3rf_-Cnk0L10M.mjs → oxc-B3KI3rf_-B9omBIuN.mjs} +0 -0
  131. /package/dist/{read-credential-keys-77a91T8M-CzXPGxdU.mjs → read-credential-keys-77a91T8M-aLuQvlIq.mjs} +0 -0
  132. /package/dist/{register.handler-CSvlOMF6.mjs → register.handler-C_NqMLir.mjs} +0 -0
  133. /package/dist/{rolldown-runtime-twds-ZHy-BoF7MLzP.mjs → rolldown-runtime-twds-ZHy-RuJszab7.mjs} +0 -0
  134. /package/dist/{run-polling-CzyVv7Ba.mjs → run-polling-DKWPGLyF.mjs} +0 -0
  135. /package/dist/{schema-CvSZqa3t.mjs → schema-DFJiNWyd.mjs} +0 -0
  136. /package/dist/{schema-display-DxLA3j5H.mjs → schema-display-XrRCdFL0.mjs} +0 -0
  137. /package/dist/{skill-installer-CYFshTBy.mjs → skill-installer-Cm9hF6OB.mjs} +0 -0
  138. /package/dist/{skills.handler-Bma-MJX-.mjs → skills.handler-KEUkV5NH.mjs} +0 -0
  139. /package/dist/{spinner-progress-DV28G4tP.mjs → spinner-progress-BtEIJRX4.mjs} +0 -0
  140. /package/dist/{status.handler-BOV0eX3J.mjs → status.handler-CW-EFhy3.mjs} +0 -0
  141. /package/dist/{types-DamInJD6.mjs → types-D1cVpE7_.mjs} +0 -0
  142. /package/dist/{upgrade.handler-Bz_oQcAw.mjs → upgrade.handler-C7KvNL0x.mjs} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { a as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-BUzxM3QI.mjs";
5
+ import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
6
6
  import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/invites/accept.handler.ts
8
8
  async function handleInvitesAccept(options, ctx) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
4
- import { t as createTypedCommand } from "./commander-DQLrBSIW.mjs";
4
+ import { t as createTypedCommand } from "./commander-9Kro0Dl3.mjs";
5
5
  import { t as OrgRoleSchema } from "./schema-Lbp5lGJu.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/commands/admin/orgs.command.ts
@@ -28,21 +28,21 @@ function createAdminOrgsCommand() {
28
28
  description: "Manage organizations as a platform admin",
29
29
  schema: AdminOrgsListOptionsSchema,
30
30
  optionsConfig: { ...JSON_OPTION_CONFIG },
31
- loadHandler: async () => (await import("./orgs.list.handler-DEF8OyvM.mjs")).handleAdminOrgsList,
31
+ loadHandler: async () => (await import("./orgs.list.handler-DDVvSbsT.mjs")).handleAdminOrgsList,
32
32
  subcommands: [
33
33
  createTypedCommand({
34
34
  name: "create",
35
35
  description: "Create an organization (requires system.create_org)",
36
36
  schema: AdminOrgsCreateOptionsSchema,
37
37
  optionsConfig: CREATE_OPTIONS_CONFIG,
38
- loadHandler: async () => (await import("./orgs.create.handler-CcPpDweZ.mjs")).handleAdminOrgsCreate
38
+ loadHandler: async () => (await import("./orgs.create.handler-DF4eEL-2.mjs")).handleAdminOrgsCreate
39
39
  }),
40
40
  createTypedCommand({
41
41
  name: "list",
42
42
  description: "List organizations (requires system.view_orgs)",
43
43
  schema: AdminOrgsListOptionsSchema,
44
44
  optionsConfig: { ...JSON_OPTION_CONFIG },
45
- loadHandler: async () => (await import("./orgs.list.handler-DEF8OyvM.mjs")).handleAdminOrgsList
45
+ loadHandler: async () => (await import("./orgs.list.handler-DDVvSbsT.mjs")).handleAdminOrgsList
46
46
  }),
47
47
  createTypedCommand({
48
48
  name: "get",
@@ -54,7 +54,7 @@ function createAdminOrgsCommand() {
54
54
  description: "Organization ID",
55
55
  key: "orgId"
56
56
  },
57
- loadHandler: async () => (await import("./orgs.get.handler-BACPg7vR.mjs")).handleAdminOrgsGet
57
+ loadHandler: async () => (await import("./orgs.get.handler-BmJnseQa.mjs")).handleAdminOrgsGet
58
58
  })
59
59
  ]
60
60
  });
@@ -157,14 +157,14 @@ function createAdminUsersCommand() {
157
157
  description: "Manage platform users",
158
158
  schema: AdminUsersListOptionsSchema,
159
159
  optionsConfig: { ...JSON_OPTION_CONFIG },
160
- loadHandler: async () => (await import("./users.list.handler-DLuU7cd_.mjs")).handleAdminUsersList,
160
+ loadHandler: async () => (await import("./users.list.handler-DZSPvpGF.mjs")).handleAdminUsersList,
161
161
  subcommands: [
162
162
  createTypedCommand({
163
163
  name: "list",
164
164
  description: "List platform users",
165
165
  schema: AdminUsersListOptionsSchema,
166
166
  optionsConfig: { ...JSON_OPTION_CONFIG },
167
- loadHandler: async () => (await import("./users.list.handler-DLuU7cd_.mjs")).handleAdminUsersList
167
+ loadHandler: async () => (await import("./users.list.handler-DZSPvpGF.mjs")).handleAdminUsersList
168
168
  }),
169
169
  createTypedCommand({
170
170
  name: "get",
@@ -176,7 +176,7 @@ function createAdminUsersCommand() {
176
176
  description: "User ID",
177
177
  key: "userId"
178
178
  },
179
- loadHandler: async () => (await import("./users.get.handler-spWaHG8h.mjs")).handleAdminUsersGet
179
+ loadHandler: async () => (await import("./users.get.handler-DqD2ELK2.mjs")).handleAdminUsersGet
180
180
  }),
181
181
  createTypedCommand({
182
182
  name: "set-role",
@@ -188,7 +188,7 @@ function createAdminUsersCommand() {
188
188
  description: "User ID",
189
189
  key: "userId"
190
190
  },
191
- loadHandler: async () => (await import("./users.set-role.handler-CojFmpcD.mjs")).handleAdminUsersSetRole
191
+ loadHandler: async () => (await import("./users.set-role.handler-73smNUVF.mjs")).handleAdminUsersSetRole
192
192
  })
193
193
  ]
194
194
  });
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as __toESM, i as __require, t as __commonJSMin } from "./chunk-DYxdGL9S.mjs";
3
+ import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-CH6r78ws.mjs";
4
4
  import { z } from "zod";
5
5
  import { Readable } from "node:stream";
6
6
  import { createGunzip, createGzip } from "node:zlib";
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
- import { i as projects } from "./dist-CIInPRGh.mjs";
4
+ import { i as projects } from "./dist-DuJjDZIf.mjs";
5
5
  import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
6
- import { t as createTypedCommand } from "./commander-DQLrBSIW.mjs";
7
- import { i as readAgentManifestsFromOutDir } from "./dist-BGrWr5fp.mjs";
8
- import { t as requireWorkflowsDir } from "./resolve-project-CWP2fji3.mjs";
9
- import { t as createSpinnerProgress } from "./spinner-progress-DV28G4tP.mjs";
10
- import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-IGYhEC8Y.mjs";
11
- import { i as resolveTypeHint } from "./schema-display-DxLA3j5H.mjs";
6
+ import { t as createTypedCommand } from "./commander-9Kro0Dl3.mjs";
7
+ import { i as readAgentManifestsFromOutDir } from "./dist-Br4m3sFZ.mjs";
8
+ import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
9
+ import { t as createSpinnerProgress } from "./spinner-progress-BtEIJRX4.mjs";
10
+ import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Bi1Aacc5.mjs";
11
+ import { i as resolveTypeHint } from "./schema-display-XrRCdFL0.mjs";
12
12
  import { z } from "zod";
13
13
  //#region src/commands/agents/inspect-display.ts
14
14
  function renderAgentManifestInspect(manifest, options = {}) {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-CvSZqa3t.mjs";
3
+ import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-DFJiNWyd.mjs";
4
4
  import { z } from "zod";
5
5
  //#region ../../packages/shared-types/src/connections/api.ts
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
4
- import { t as createTypedCommand } from "./commander-DQLrBSIW.mjs";
4
+ import { t as createTypedCommand } from "./commander-9Kro0Dl3.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/api-keys/api-keys.command.ts
7
7
  const ApiKeysCreateOptionsSchema = JsonOptionSchema.extend({ name: z.string().optional() });
@@ -23,21 +23,21 @@ function createApiKeysCommand() {
23
23
  description: "Manage API keys for your organization",
24
24
  schema: JsonOptionSchema,
25
25
  optionsConfig: { ...JSON_OPTION_CONFIG },
26
- loadHandler: async () => (await import("./list.handler-CDtjm-6d.mjs")).handleApiKeysList,
26
+ loadHandler: async () => (await import("./list.handler-Do2tVOnu.mjs")).handleApiKeysList,
27
27
  subcommands: [
28
28
  createTypedCommand({
29
29
  name: "list",
30
30
  description: "List all API keys for your organization",
31
31
  schema: JsonOptionSchema,
32
32
  optionsConfig: { ...JSON_OPTION_CONFIG },
33
- loadHandler: async () => (await import("./list.handler-CDtjm-6d.mjs")).handleApiKeysList
33
+ loadHandler: async () => (await import("./list.handler-Do2tVOnu.mjs")).handleApiKeysList
34
34
  }),
35
35
  createTypedCommand({
36
36
  name: "create",
37
37
  description: "Create a new API key (raw key shown once)",
38
38
  schema: ApiKeysCreateOptionsSchema,
39
39
  optionsConfig: CREATE_OPTIONS_CONFIG,
40
- loadHandler: async () => (await import("./create.handler-CQCRk-Na.mjs")).handleApiKeysCreate
40
+ loadHandler: async () => (await import("./create.handler-v9B0Z9Yf.mjs")).handleApiKeysCreate
41
41
  }),
42
42
  createTypedCommand({
43
43
  name: "delete",
@@ -49,7 +49,7 @@ function createApiKeysCommand() {
49
49
  description: "API key ID to delete",
50
50
  key: "apiKeyId"
51
51
  },
52
- loadHandler: async () => (await import("./delete.handler-DNoehdOH.mjs")).handleApiKeysDelete
52
+ loadHandler: async () => (await import("./delete.handler-DtP_zUaq.mjs")).handleApiKeysDelete
53
53
  })
54
54
  ]
55
55
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { n as DEFAULT_CLI_WEB_URL } from "./default-urls-BoSm4s9C.mjs";
4
4
  import { b as AUTH_TIMEOUT_SECONDS } from "./keystroke.mjs";
5
- import { t as createTypedCommand } from "./commander-DQLrBSIW.mjs";
5
+ import { t as createTypedCommand } from "./commander-9Kro0Dl3.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/commands/auth/auth.command.ts
8
8
  const AuthOptionsSchema = z.object({
@@ -10,6 +10,7 @@ const AuthOptionsSchema = z.object({
10
10
  insecureStorage: z.boolean().default(false).describe("Store API keys in plaintext file storage instead of the OS credential store"),
11
11
  timeout: z.coerce.number().int().min(AUTH_TIMEOUT_SECONDS.min).max(AUTH_TIMEOUT_SECONDS.max).default(AUTH_TIMEOUT_SECONDS.default).describe("Timeout in seconds")
12
12
  });
13
+ const AuthClearOptionsSchema = z.object({ localOnly: z.boolean().default(false).describe("Remove local credentials without reading the OS credential store for server revocation") });
13
14
  const AUTH_OPTIONS_CONFIG = {
14
15
  webUrl: {
15
16
  flag: "--web-url <url>",
@@ -24,34 +25,40 @@ const AUTH_OPTIONS_CONFIG = {
24
25
  description: `Authentication timeout in seconds (default: ${AUTH_TIMEOUT_SECONDS.default})`
25
26
  }
26
27
  };
28
+ const AUTH_CLEAR_OPTIONS_CONFIG = { localOnly: {
29
+ flag: "--local-only",
30
+ description: "Remove local credentials without revoking the API key on the server"
31
+ } };
27
32
  function createAuthCommand() {
28
33
  return createTypedCommand({
29
34
  name: "auth",
30
35
  description: "Authenticate Keystroke CLI via device flow",
31
36
  schema: AuthOptionsSchema,
32
37
  optionsConfig: AUTH_OPTIONS_CONFIG,
33
- loadHandler: async () => (await import("./auth.handler-CxTDSO6O.mjs")).handleAuth,
38
+ contextMode: "auth-metadata",
39
+ loadHandler: async () => (await import("./auth.handler-BedGpKh1.mjs")).handleAuth,
34
40
  subcommands: [
35
41
  createTypedCommand({
36
42
  name: "clear",
37
43
  description: "Revoke the saved API key and remove local credentials",
38
- schema: z.object({}),
39
- optionsConfig: {},
40
- loadHandler: async () => (await import("./clear.handler-Bksm2HI4.mjs")).handleAuthClear
44
+ schema: AuthClearOptionsSchema,
45
+ optionsConfig: AUTH_CLEAR_OPTIONS_CONFIG,
46
+ contextMode: "auth-metadata",
47
+ loadHandler: async () => (await import("./clear.handler-Cvb9chs4.mjs")).handleAuthClear
41
48
  }),
42
49
  createTypedCommand({
43
50
  name: "test",
44
51
  description: "Verify that the saved API key is valid",
45
52
  schema: z.object({}),
46
53
  optionsConfig: {},
47
- loadHandler: async () => (await import("./test.handler-DhhcsvHN.mjs")).handleAuthTest
54
+ loadHandler: async () => (await import("./test.handler-CAsVgOpT.mjs")).handleAuthTest
48
55
  }),
49
56
  createTypedCommand({
50
57
  name: "status",
51
58
  description: "Show the current signed-in identity and organization context",
52
59
  schema: z.object({}),
53
60
  optionsConfig: {},
54
- loadHandler: async () => (await import("./status.handler-BOV0eX3J.mjs")).handleAuthStatus
61
+ loadHandler: async () => (await import("./status.handler-CW-EFhy3.mjs")).handleAuthStatus
55
62
  })
56
63
  ]
57
64
  });
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { n as DEFAULT_CLI_WEB_URL, t as DEFAULT_CLI_SERVER_URL } from "./default-urls-BoSm4s9C.mjs";
4
4
  import { C as CALLBACK_LOOPBACK_ORIGIN, D as CliExitError, P as logger, S as CALLBACK_LOOPBACK_HOST, T as CLI_AUTH_COMMAND, a as ui, d as resolveCliWebUrl, u as resolveCliServerUrl, w as CALLBACK_PATH, x as AUTH_URL_PATH, y as toErrorMessage } from "./keystroke.mjs";
5
- import { n as credentials } from "./dist-CIInPRGh.mjs";
6
- import { t as openBrowser } from "./browser-Cu4k-wT_.mjs";
5
+ import { n as credentials } from "./dist-DuJjDZIf.mjs";
6
+ import { t as openBrowser } from "./browser-Dvv5OQrt.mjs";
7
7
  import { hostname } from "node:os";
8
8
  import { z } from "zod";
9
9
  import { confirm, isCancel } from "@clack/prompts";
@@ -347,23 +347,18 @@ function exitCredentialStoreSaveFailed(error) {
347
347
  reported: true
348
348
  });
349
349
  }
350
- async function warnIfAlreadyAuthenticated(ctx) {
351
- if (!ctx.client) return;
352
- try {
353
- await ctx.client.public.auth.validate();
354
- } catch {
355
- return;
356
- }
350
+ function warnIfSavedCredentialsExist(ctx) {
351
+ if (ctx.storedOrgs.length === 0) return;
357
352
  const identity = ctx.storedUser?.email ?? "unknown user";
358
353
  const activeOrg = ctx.storedOrgs.find((o) => o.organizationId === ctx.storedActiveOrgId);
359
354
  ui.br();
360
- ui.warn("Already authenticated");
361
- ui.hint(`Signed in as ${identity}${activeOrg ? ` (${activeOrg.organizationName})` : ""}`);
355
+ ui.warn("Saved credentials found");
356
+ ui.hint(`Saved as ${identity}${activeOrg ? ` (${activeOrg.organizationName})` : ""}`);
362
357
  ui.hint("Continuing will add or replace credentials for the selected organization.");
363
358
  ui.br();
364
359
  }
365
360
  async function handleAuth(options, ctx, overrides) {
366
- await warnIfAlreadyAuthenticated(ctx);
361
+ warnIfSavedCredentialsExist(ctx);
367
362
  const hosts = resolveAuthHosts(options, ctx);
368
363
  printResolvedHosts(hosts);
369
364
  if (options.insecureStorage) {
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { c as readOptionalJsonSchemaKeys, s as manifestToDeclaredCredentialRequirement } from "./src-BHTjsZ9V.mjs";
4
- import { t as AgentVersionManifestSchema } from "./agent-manifest-CZ7BeUSG.mjs";
5
- import { i as createAgentSandboxPackage, n as AGENT_VM_PI_SKILLS_ROOT, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH, t as AGENT_VM_HOST_CALL_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-BsbCEeMw.mjs";
6
- import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-CzXPGxdU.mjs";
7
- import { t as bundleSandboxAgentTarget } from "./workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs";
3
+ import { n as readOptionalJsonSchemaKeys, t as manifestToDeclaredCredentialRequirement } from "./declared-credential-requirements-B6h4WRv4.mjs";
4
+ import { t as AgentVersionManifestSchema } from "./agent-manifest-Pg0aURo7.mjs";
5
+ import { i as createAgentSandboxPackage, n as AGENT_VM_PI_SKILLS_ROOT, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH, t as AGENT_VM_HOST_CALL_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs";
6
+ import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-aLuQvlIq.mjs";
7
+ import { t as bundleSandboxAgentTarget } from "./workflow-bundler-BzHk73PM-xQwAF08W.mjs";
8
8
  import { builtinModules } from "node:module";
9
9
  import path from "node:path";
10
10
  import { lstat, readFile, readdir, realpath } from "node:fs/promises";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as __toESM } from "./chunk-DYxdGL9S.mjs";
4
- import { n as FileMetadataSchema, t as FILE_METADATA_SCHEMA_VERSION } from "./file-metadata-B8c7Y5yg.mjs";
5
- import { d as getMetadataRoot, l as createMetadataOutputFile, n as BUILD_OUTPUT_DIR_NAME, u as getFileMetadataPath } from "./layout-DRf9qUf8.mjs";
6
- import { l as require_out, s as sha256String, t as BASE_IGNORE_PATTERNS } from "./metadata-layout-Bv-B0nHj-DtMWZ7Cc.mjs";
7
- import { a as literalString, c as readStringProperty, i as literalNumber, l as unwrapExpression, n as identifierName, o as parseSourceFile, r as isNode, s as readPropertyValue, t as getFirstObjectArgument, u as visitNode } from "./oxc-B3KI3rf_-Cnk0L10M.mjs";
8
- import { a as getLocalModuleSpecifier, f as resolveLocalModulePath, l as removeEmptyMetadataDirectories, o as getVariableDeclarators, s as isExportedVariableStatement } from "./source-analysis-BBg2E_6G-BJTRqWrQ.mjs";
9
- import { n as parseRelativeFilePath, r as toRelativeFilePath, t as normalizeRelativeFilePath } from "./normalize-path-CojS-CgQ-CRqBc6D6.mjs";
3
+ import { i as __toESM } from "./chunk-CH6r78ws.mjs";
4
+ import { n as FileMetadataSchema, t as FILE_METADATA_SCHEMA_VERSION } from "./file-metadata-DQVDjr7M.mjs";
5
+ import { d as getMetadataRoot, l as createMetadataOutputFile, n as BUILD_OUTPUT_DIR_NAME, u as getFileMetadataPath } from "./layout-B95Tku8F.mjs";
6
+ import { l as require_out, s as sha256String, t as BASE_IGNORE_PATTERNS } from "./metadata-layout-Bv-B0nHj-CO8mjjSl.mjs";
7
+ import { a as literalString, c as readStringProperty, i as literalNumber, l as unwrapExpression, n as identifierName, o as parseSourceFile, r as isNode, s as readPropertyValue, t as getFirstObjectArgument, u as visitNode } from "./oxc-B3KI3rf_-B9omBIuN.mjs";
8
+ import { a as getLocalModuleSpecifier, f as resolveLocalModulePath, l as removeEmptyMetadataDirectories, o as getVariableDeclarators, s as isExportedVariableStatement } from "./source-analysis-BBg2E_6G-wPP9mjQx.mjs";
9
+ import { n as parseRelativeFilePath, r as toRelativeFilePath, t as normalizeRelativeFilePath } from "./normalize-path-CojS-CgQ-aOM0agxS.mjs";
10
10
  import path from "node:path";
11
11
  import { mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
12
12
  import { performance } from "node:perf_hooks";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { P as logger } from "./keystroke.mjs";
4
- import { n as formatProgressDuration, t as createSpinnerProgress } from "./spinner-progress-DV28G4tP.mjs";
4
+ import { n as formatProgressDuration, t as createSpinnerProgress } from "./spinner-progress-BtEIJRX4.mjs";
5
5
  //#region src/lib/build-progress.ts
6
6
  const NEW_STAGE_LABELS = {
7
7
  start: "Starting build",
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as TaskBuildManifestSchema } from "./task-BSCN9cU4.mjs";
4
- import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs";
5
- import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-DqFgzl_B.mjs";
3
+ import { n as TaskBuildManifestSchema } from "./task-BWuIKWh4.mjs";
4
+ import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-xQwAF08W.mjs";
5
+ import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs";
6
6
  import { performance } from "node:perf_hooks";
7
7
  //#region ../../packages/workflow-builder/dist/build-tasks-C09SdfjC.mjs
8
8
  async function buildTaskArtifact(options) {
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { i as WorkflowBuildManifestSchema, n as WORKFLOW_MANIFEST_GENERATOR, t as src_exports } from "./src-BHTjsZ9V.mjs";
4
- import { a as MANIFEST_FILE_NAME, i as FLOW_FILE_NAME, r as BUNDLE_FILE_NAME, s as SOURCE_MAP_FILE_NAME, t as BUILD_DIR_NAME } from "./layout-DRf9qUf8.mjs";
5
- import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-BSBbRfVp.mjs";
6
- import { n as WorkflowLoaderProtocolError, r as WorkflowMetadataLoadError, s as createLoaderProtocolFailure } from "./import-module-y0glInUe-CfNsQNia.mjs";
7
- import { r as toRelativeFilePath } from "./normalize-path-CojS-CgQ-CRqBc6D6.mjs";
8
- import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs";
9
- import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-DqFgzl_B.mjs";
3
+ import { p as deduplicateCredentialRequirementEntries } from "./credential-requirements-D0mavK8j-CFMf0Xwu.mjs";
4
+ import { r as WorkflowBuildManifestSchema, t as WORKFLOW_MANIFEST_GENERATOR } from "./workflow-build-manifest-1sC52TIG.mjs";
5
+ import { a as MANIFEST_FILE_NAME, i as FLOW_FILE_NAME, r as BUNDLE_FILE_NAME, s as SOURCE_MAP_FILE_NAME, t as BUILD_DIR_NAME } from "./layout-B95Tku8F.mjs";
6
+ import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-CnBnF2cg.mjs";
7
+ import { n as WorkflowLoaderProtocolError, r as WorkflowMetadataLoadError, s as createLoaderProtocolFailure } from "./import-module-y0glInUe-DxX0-BRO.mjs";
8
+ import { r as toRelativeFilePath } from "./normalize-path-CojS-CgQ-aOM0agxS.mjs";
9
+ import { n as bundleWorkflowTarget } from "./workflow-bundler-BzHk73PM-xQwAF08W.mjs";
10
+ import { t as buildTriggerArtifacts } from "./trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs";
10
11
  import * as path$1 from "node:path";
11
12
  import { readFile } from "node:fs/promises";
12
13
  import { realpathSync } from "node:fs";
@@ -264,7 +265,7 @@ function buildCredentialRequirements(flowGraph, credentialsByCallsiteFingerprint
264
265
  ...operationScopes ? { requiredOAuthScopes: [...operationScopes] } : {}
265
266
  })) ?? [];
266
267
  const callsiteEntries = node.data.callsiteFingerprint ? toCredentialRequirementEntries(credentialsByCallsiteFingerprint[node.data.callsiteFingerprint] ?? []) : [];
267
- const entries = (0, src_exports.deduplicateCredentialRequirementEntries)([...nodeEntries, ...callsiteEntries]);
268
+ const entries = deduplicateCredentialRequirementEntries([...nodeEntries, ...callsiteEntries]);
268
269
  if (entries.length === 0) continue;
269
270
  byStep[node.id] = entries;
270
271
  for (const entry of entries) allCredentialSetIds.add(entry.credentialSetId);
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { D as CliExitError } from "./keystroke.mjs";
4
- import { i as projects } from "./dist-CIInPRGh.mjs";
5
- import { t as requireWorkflowsDir } from "./resolve-project-CWP2fji3.mjs";
6
- import { a as runWorkflowBuild, i as renderBuildSummary, n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-IGYhEC8Y.mjs";
7
- import { t as createBuildProgress } from "./build-progress-BVwDg6lC.mjs";
8
- import { t as withErrorBoundary } from "./error-boundary-GtRvP2oP.mjs";
4
+ import { i as projects } from "./dist-DuJjDZIf.mjs";
5
+ import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
6
+ import { a as runWorkflowBuild, i as renderBuildSummary, n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-Bi1Aacc5.mjs";
7
+ import { t as createBuildProgress } from "./build-progress-nYa14iBP.mjs";
8
+ import { t as withErrorBoundary } from "./error-boundary-DVZipk-A.mjs";
9
9
  //#region src/commands/workflows/build.handler.ts
10
10
  async function handleWorkflowsBuild(options, _ctx) {
11
11
  return withErrorBoundary("Build", async () => {
@@ -28,11 +28,10 @@ var __copyProps = (to, from, except, desc) => {
28
28
  }
29
29
  return to;
30
30
  };
31
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
32
31
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
33
32
  value: mod,
34
33
  enumerable: true
35
34
  }) : target, mod));
36
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
37
36
  //#endregion
38
- export { __toESM as a, __require as i, __exportAll as n, __reExport as r, __commonJSMin as t };
37
+ export { __toESM as i, __exportAll as n, __require as r, __commonJSMin as t };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { a as ui } from "./keystroke.mjs";
4
- import { i as projects } from "./dist-CIInPRGh.mjs";
4
+ import { i as projects } from "./dist-DuJjDZIf.mjs";
5
5
  //#region src/commands/projects/clear-cache.handler.ts
6
6
  async function handleProjectsClearCache(_options, _ctx) {
7
7
  if (await projects.clear()) ui.success("Projects cache cleared.");
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { P as logger, a as ui, p as AUTH_HINT, y as toErrorMessage } from "./keystroke.mjs";
4
- import { n as credentials } from "./dist-CIInPRGh.mjs";
5
- import { createClient } from "./src-BYQwp8Ig.mjs";
4
+ import { n as credentials } from "./dist-DuJjDZIf.mjs";
5
+ import { createClient } from "./src-DNhUmpSl.mjs";
6
6
  //#region src/commands/auth/clear.handler.ts
7
7
  async function tryRevokeKey(apiKey, apiKeyId, baseUrl, organizationId) {
8
8
  try {
@@ -29,7 +29,7 @@ async function readApiKeyForRevocation(organizationId) {
29
29
  return null;
30
30
  }
31
31
  }
32
- async function handleAuthClear(_options, ctx) {
32
+ async function handleAuthClear(options, ctx) {
33
33
  const storedOrgs = ctx.storedOrgs;
34
34
  const serverUrl = ctx.storedServerUrls?.serverUrl;
35
35
  if (storedOrgs.length === 0) {
@@ -40,25 +40,39 @@ async function handleAuthClear(_options, ctx) {
40
40
  return;
41
41
  }
42
42
  if (ctx.organizationId && ctx.orgSource === "flag") {
43
- const apiKey = await readApiKeyForRevocation(ctx.organizationId);
43
+ if (!storedOrgs.find((org) => org.organizationId === ctx.organizationId)) {
44
+ ui.warn(`No stored credentials for organization ${ctx.organizationId}.`);
45
+ return;
46
+ }
47
+ let apiKey = null;
48
+ if (!options.localOnly && serverUrl) {
49
+ ui.hint("Your OS credential store may ask for permission to read the saved API key.");
50
+ apiKey = await readApiKeyForRevocation(ctx.organizationId);
51
+ }
44
52
  const removed = await credentials.removeOrg(ctx.organizationId);
45
53
  if (!removed) {
46
54
  ui.warn(`No stored credentials for organization ${ctx.organizationId}.`);
47
55
  return;
48
56
  }
49
- if (removed.apiKeyId && serverUrl && apiKey) await tryRevokeKey(apiKey, removed.apiKeyId, serverUrl, removed.organizationId);
57
+ if (options.localOnly) ui.hint("Skipped server revocation because --local-only was provided.");
58
+ else if (removed.apiKeyId && serverUrl && apiKey) await tryRevokeKey(apiKey, removed.apiKeyId, serverUrl, removed.organizationId);
50
59
  ui.success(`Credentials removed for ${removed.organizationName}.`);
51
60
  return;
52
61
  }
53
62
  const revokeInputs = [];
54
- for (const org of storedOrgs) if (org.apiKeyId && serverUrl) {
55
- const apiKey = await readApiKeyForRevocation(org.organizationId);
56
- if (apiKey) revokeInputs.push({
57
- apiKey,
58
- apiKeyId: org.apiKeyId,
59
- baseUrl: serverUrl,
60
- organizationId: org.organizationId
61
- });
63
+ if (options.localOnly) ui.hint("Skipped server revocation because --local-only was provided.");
64
+ else {
65
+ const revocableOrgs = storedOrgs.filter((org) => org.apiKeyId && serverUrl);
66
+ if (revocableOrgs.length > 0) ui.hint("Your OS credential store may ask for permission to read saved API keys.");
67
+ for (const org of revocableOrgs) if (org.apiKeyId && serverUrl) {
68
+ const apiKey = await readApiKeyForRevocation(org.organizationId);
69
+ if (apiKey) revokeInputs.push({
70
+ apiKey,
71
+ apiKeyId: org.apiKeyId,
72
+ baseUrl: serverUrl,
73
+ organizationId: org.organizationId
74
+ });
75
+ }
62
76
  }
63
77
  await credentials.clear();
64
78
  for (const revokeInput of revokeInputs) await tryRevokeKey(revokeInput.apiKey, revokeInput.apiKeyId, revokeInput.baseUrl, revokeInput.organizationId);
@@ -78,16 +78,13 @@ function createTypedCommand(params) {
78
78
  const globalOpts = cmd.optsWithGlobals();
79
79
  if (globalOpts.debug) setDebug(true);
80
80
  const contextMode = params.contextMode ?? "full";
81
- const contextModule = await import("./context-BUzxM3QI.mjs").then((n) => n.n);
82
- const base = contextMode === "auth" ? await contextModule.resolveAuthContext({
81
+ const contextModule = await import("./context-B2cQ-Nt3.mjs").then((n) => n.n);
82
+ const contextOptions = {
83
83
  apiKey: globalOpts.apiKey,
84
84
  serverUrl: globalOpts.serverUrl,
85
85
  org: globalOpts.org
86
- }) : await contextModule.resolveBaseContext({
87
- apiKey: globalOpts.apiKey,
88
- serverUrl: globalOpts.serverUrl,
89
- org: globalOpts.org
90
- });
86
+ };
87
+ const base = contextMode === "auth" ? await contextModule.resolveAuthContext(contextOptions) : contextMode === "auth-metadata" ? await contextModule.resolveAuthMetadataContext(contextOptions) : await contextModule.resolveBaseContext(contextOptions);
91
88
  captureCliTelemetryResolvedContext(base);
92
89
  base.jsonMode = jsonMode;
93
90
  const typedBase = base;
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { z } from "zod";
4
+ const SHA256HashSchema = z.string().length(64, "Must be 64 characters").regex(/^[a-f0-9]{64}$/i, "Must be hexadecimal").transform((value) => value);
5
+ const JsonSchemaSchema = z.record(z.string(), z.unknown());
6
+ z.object({
7
+ constant: z.object({
8
+ attempts: z.number().int().min(1).max(10),
9
+ seconds: z.number().positive()
10
+ }).optional(),
11
+ exponential: z.object({
12
+ attempts: z.number().int().min(1).max(10),
13
+ base: z.number().min(1).optional(),
14
+ multiplier: z.number().positive().optional()
15
+ }).optional()
16
+ }).refine((data) => {
17
+ return data.constant !== void 0 !== (data.exponential !== void 0);
18
+ }, { error: "Retry config must specify exactly one of constant or exponential strategy" });
19
+ //#endregion
20
+ export { SHA256HashSchema as n, JsonSchemaSchema as t };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
4
- import { t as createTypedCommand } from "./commander-DQLrBSIW.mjs";
4
+ import { t as createTypedCommand } from "./commander-9Kro0Dl3.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/connect/connect.command.ts
7
7
  const ConnectOptionsSchema = JsonOptionSchema.extend({
@@ -37,7 +37,7 @@ function createConnectCommand() {
37
37
  description: "Connect an official integration via OAuth (e.g., keystroke connect slack)",
38
38
  schema: ConnectOptionsSchema,
39
39
  optionsConfig: CONNECT_OPTIONS_CONFIG,
40
- loadHandler: async () => (await import("./connect.handler-DbuGt3Xb.mjs")).handleConnect,
40
+ loadHandler: async () => (await import("./connect.handler-DFQdxkWZ.mjs")).handleConnect,
41
41
  argument: {
42
42
  name: "integrationId",
43
43
  description: "Integration to connect (e.g., slack, linear)",
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { a as ui, j as throwReportedCliExit, p as AUTH_HINT, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { t as openBrowser } from "./browser-Cu4k-wT_.mjs";
6
- import { i as InitiateConnectionResponseSchema, n as ConnectionStatusResponseSchema, r as InitiateConnectionRequestSchema } from "./api-BjBpWWlm.mjs";
7
- import { t as getIntegrationCatalog } from "./integration-catalog-BrJsBkfx.mjs";
5
+ import { t as openBrowser } from "./browser-Dvv5OQrt.mjs";
6
+ import { i as InitiateConnectionResponseSchema, n as ConnectionStatusResponseSchema, r as InitiateConnectionRequestSchema } from "./api-J9UL8pqZ.mjs";
7
+ import { t as getIntegrationCatalog } from "./integration-catalog-cYlTmOSb.mjs";
8
8
  //#region src/commands/connect/connect.handler.ts
9
9
  function formatIntegrationLabel(catalog, integrationId) {
10
10
  return catalog.lookupByPublicId(integrationId)?.name ?? integrationId;
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as __exportAll } from "./chunk-DYxdGL9S.mjs";
3
+ import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
4
4
  import { D as CliExitError, E as AuthenticationError, P as logger, _ as isAuthError, a as ui, c as getProcessEnv, m as REAUTH_HINT, p as AUTH_HINT, s as getEnv, y as toErrorMessage } from "./keystroke.mjs";
5
- import { n as credentials } from "./dist-CIInPRGh.mjs";
6
- import { t as resolveCliCredentials } from "./resolve-cli-credentials-DytxgMwn.mjs";
5
+ import { n as credentials } from "./dist-DuJjDZIf.mjs";
6
+ import { t as resolveCliCredentials } from "./resolve-cli-credentials-DaMDaamj.mjs";
7
7
  import { a as writeJsonError } from "./output-BWcVRt-T.mjs";
8
8
  //#region src/lib/context.ts
9
9
  var context_exports = /* @__PURE__ */ __exportAll({
@@ -11,6 +11,7 @@ var context_exports = /* @__PURE__ */ __exportAll({
11
11
  requireAuthOptions: () => requireAuthOptions,
12
12
  requireClient: () => requireClient,
13
13
  resolveAuthContext: () => resolveAuthContext,
14
+ resolveAuthMetadataContext: () => resolveAuthMetadataContext,
14
15
  resolveBaseContext: () => resolveBaseContext,
15
16
  validateApiKey: () => validateApiKey
16
17
  });
@@ -37,7 +38,7 @@ async function resolveBaseContext(overrides = {}) {
37
38
  const authContext = await resolveAuthContext(overrides);
38
39
  let client = null;
39
40
  if (authContext.apiKey && authContext.baseUrl) try {
40
- const { createClient } = await import("./src-BYQwp8Ig.mjs");
41
+ const { createClient } = await import("./src-DNhUmpSl.mjs");
41
42
  client = createClient({
42
43
  apiKey: authContext.apiKey,
43
44
  baseUrl: authContext.baseUrl,
@@ -112,6 +113,31 @@ async function resolveAuthContext(overrides = {}) {
112
113
  metadataFilePath: auth.metadataFilePath
113
114
  };
114
115
  }
116
+ async function resolveAuthMetadataContext(overrides = {}) {
117
+ const env = getEnv();
118
+ const processEnv = getProcessEnv();
119
+ const storedOrgs = await credentials.listOrgs();
120
+ const storedUser = await credentials.getUser();
121
+ const storedActiveOrgId = await credentials.getActiveOrgId();
122
+ const storedServerUrls = await credentials.getServerUrls();
123
+ const credentialStorageInfo = await resolveCredentialStorageInfo();
124
+ const orgRaw = overrides.org ?? env.KEYSTROKE_ORG_ID ?? storedActiveOrgId;
125
+ const orgSource = overrides.org ? "flag" : env.KEYSTROKE_ORG_ID ? "env" : storedActiveOrgId ? "credentials" : void 0;
126
+ return {
127
+ apiKey: overrides.apiKey ?? env.KEYSTROKE_API_KEY,
128
+ baseUrl: overrides.serverUrl ?? processEnv.SERVER_URL ?? storedServerUrls?.serverUrl ?? env.SERVER_URL,
129
+ jsonMode: false,
130
+ organizationId: orgRaw,
131
+ orgSource,
132
+ storedOrgs,
133
+ storedUser,
134
+ storedActiveOrgId,
135
+ storedServerUrls,
136
+ credentialStorageInfo,
137
+ credentialReadError: void 0,
138
+ metadataFilePath: credentials.metadataFilePath
139
+ };
140
+ }
115
141
  async function resolveCredentialStorageInfo() {
116
142
  try {
117
143
  return await credentials.getStorageInfo();