@keystrokehq/cli 0.0.29 → 0.0.31

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 (126) hide show
  1. package/README.md +36 -2
  2. package/dist/{accept.handler-tvT9pleH.mjs → accept.handler-DNfIXPSP.mjs} +1 -1
  3. package/dist/{admin-DsAQ0WWj.mjs → admin-CJp8XksD.mjs} +9 -9
  4. package/dist/{agents-Bc3B9_ms.mjs → agents-G37PM35Z.mjs} +5 -5
  5. package/dist/{api-O5tdGdzc.mjs → api-BK3EhPvs.mjs} +77 -3
  6. package/dist/{api-keys-tle_m3kk.mjs → api-keys-4igNHJ_W.mjs} +5 -5
  7. package/dist/{auth-DLaY5yCZ.mjs → auth-CIOmmV4x.mjs} +4 -4
  8. package/dist/{auth.handler-Dq2fXO3S.mjs → auth.handler-CznN_vfz.mjs} +1 -1
  9. package/dist/{build-agents-DseUtzd4-Cmd-kNNO.mjs → build-agents-DseUtzd4-CSGpNXur.mjs} +2 -2
  10. package/dist/{build-tasks-C09SdfjC-B0F7BZZG.mjs → build-tasks-C09SdfjC-BmAVLTtQ.mjs} +2 -2
  11. package/dist/{build-workflows-BZ_m97Pr-HQZY4xBV.mjs → build-workflows-BZ_m97Pr-BiyptCrn.mjs} +3 -3
  12. package/dist/{build.handler-5CpbMuHx.mjs → build.handler-zHimoO7c.mjs} +5 -5
  13. package/dist/{clear-cache.handler-DpP1VlbR.mjs → clear-cache.handler-BP0K1-uN.mjs} +1 -1
  14. package/dist/{clear.handler-FzohTmpU.mjs → clear.handler-PsA5QKHx.mjs} +2 -2
  15. package/dist/{commander-BTMzBiLq.mjs → commander-BlrSdFcu.mjs} +1 -1
  16. package/dist/{connect-zNUiEjbR.mjs → connect-BbLJhlIA.mjs} +2 -2
  17. package/dist/{connect.handler-D1orna55.mjs → connect.handler-BthE-7Wg.mjs} +3 -3
  18. package/dist/{context-DHOTSgPb.mjs → context-sgKhRc5v.mjs} +3 -3
  19. package/dist/{create.handler-BuxP18uj.mjs → create.handler-BovbO_g0.mjs} +1 -1
  20. package/dist/{credential-env-map-CtmzNkwU.mjs → credential-env-map-CRs0llf0.mjs} +2 -2
  21. package/dist/credentials-CsncZ52a.mjs +460 -0
  22. package/dist/{current-deployment-workflow-Cm_aU9rQ.mjs → current-deployment-workflow-B1VQCYC-.mjs} +2 -2
  23. package/dist/{current.handler-BXec-Bhy.mjs → current.handler-BaGaCLzB.mjs} +1 -1
  24. package/dist/{delete.handler-CpYOMtsv.mjs → delete.handler-DkAK396w.mjs} +1 -1
  25. package/dist/{deploy-CDY7Qo5L.mjs → deploy-DvPfR9fC.mjs} +2 -2
  26. package/dist/{deploy.handler-CLoYxHOr.mjs → deploy.handler-BW3f2N2G.mjs} +14 -14
  27. package/dist/{diff.handler-Dcli35A1.mjs → diff.handler-BwhsoAg0.mjs} +4 -4
  28. package/dist/{dist-D_KgdxW5.mjs → dist-Dw7gCE7y.mjs} +132 -15
  29. package/dist/{env.handler-DYOsMM-G.mjs → env.handler-Dks6ZQh-.mjs} +5 -5
  30. package/dist/{error-boundary-DVZipk-A.mjs → error-boundary-0veZ_RDS.mjs} +1 -1
  31. package/dist/{init-DonAqdBg.mjs → init-DX08T87c.mjs} +3 -3
  32. package/dist/{init.handler-C60qFTIV.mjs → init.handler-CzlmkNXi.mjs} +3 -3
  33. package/dist/{inspect.handler-Bd4imZI8.mjs → inspect.handler-v9snxDLi.mjs} +4 -4
  34. package/dist/{integration-catalog-Cub_7xCw.mjs → integration-catalog-CiZ62hb_.mjs} +1 -1
  35. package/dist/{integrations-CMg20Q9z.mjs → integrations-MEExmqcg.mjs} +54 -31
  36. package/dist/{invites-RO4Dy-m6.mjs → invites-BuatfJmN.mjs} +4 -4
  37. package/dist/{invites.list.handler-B2RoiFCu.mjs → invites.list.handler-CK6mL10z.mjs} +1 -1
  38. package/dist/{invites.resend.handler-C4rzRkqX.mjs → invites.resend.handler-CKZouK1Z.mjs} +1 -1
  39. package/dist/{invites.revoke.handler-CMf6PpeL.mjs → invites.revoke.handler-H0VI-3sp.mjs} +1 -1
  40. package/dist/keystroke.mjs +31 -23
  41. package/dist/{list-enrichment-6zUKzSyL.mjs → list-enrichment-DP1wEyBZ.mjs} +1 -1
  42. package/dist/{list.handler-DpdVFRYl.mjs → list.handler-BEMj3FyH.mjs} +1 -1
  43. package/dist/list.handler-BKfGLkFu.mjs +30 -0
  44. package/dist/{list.handler-DrY5bgm1.mjs → list.handler-BiY5NFWd.mjs} +1 -1
  45. package/dist/{list.handler-C78XjR-o.mjs → list.handler-Cq_oQY5B.mjs} +3 -3
  46. package/dist/list.handler-DIMWZx78.mjs +24 -0
  47. package/dist/{list.handler-CYChUdMF.mjs → list.handler-DVnFrlis.mjs} +4 -4
  48. package/dist/{list.handler-BjKZ9-QO.mjs → list.handler-Jk_vK66s.mjs} +2 -2
  49. package/dist/{list.handler-ijBH6Ow_.mjs → list.handler-LxZInip2.mjs} +1 -1
  50. package/dist/{list.handler-wYGZhl1g.mjs → list.handler-htR9TeiS.mjs} +1 -1
  51. package/dist/{listen-CEn4PucV.mjs → listen-C_7Rgwkb.mjs} +2 -2
  52. package/dist/{listen.handler-B7s6mz82.mjs → listen.handler-dJgorIzr.mjs} +2 -2
  53. package/dist/{logs-DiH8JXn1.mjs → logs-B9YMhUGt.mjs} +3 -3
  54. package/dist/{logs.handler-D0sNlOz4.mjs → logs.handler-BfjCsAyq.mjs} +2 -2
  55. package/dist/{members.add.handler-Dr9SCjrS.mjs → members.add.handler-DSRCRxsI.mjs} +1 -1
  56. package/dist/{members.invite.handler-8-pTOtw_.mjs → members.invite.handler-BNpHn1dY.mjs} +1 -1
  57. package/dist/{members.list.handler-CUZGd-3B.mjs → members.list.handler-Bn9LJEPG.mjs} +1 -1
  58. package/dist/{members.remove.handler-BCiLt3pa.mjs → members.remove.handler-Dkr2t_tX.mjs} +1 -1
  59. package/dist/{members.update.handler-BAbB9ssa.mjs → members.update.handler-DBtUYuAY.mjs} +1 -1
  60. package/dist/operations-AWMLs6mE.mjs +81 -0
  61. package/dist/{org-BD4fj8Yh.mjs → org-DOH7YHk2.mjs} +15 -15
  62. package/dist/{orgs.create.handler-B_7WjV3s.mjs → orgs.create.handler-BO70zIdp.mjs} +1 -1
  63. package/dist/{orgs.get.handler-BgjeDmfl.mjs → orgs.get.handler-BuGg5bc9.mjs} +1 -1
  64. package/dist/{orgs.list.handler-ZRdb-yu5.mjs → orgs.list.handler--5HutMkl.mjs} +1 -1
  65. package/dist/package-manager-DT1EhOkS.mjs +61 -0
  66. package/dist/{paths-JzzFkXQA-CEipIeVl.mjs → paths-DpHfoaXN-CdPimpky.mjs} +2 -2
  67. package/dist/{paused.handler-CzQkBKS6.mjs → paused.handler-DHvxz-cC.mjs} +1 -1
  68. package/dist/{projects-CgtfPFGu.mjs → projects-C5GZ5Jrf.mjs} +4 -4
  69. package/dist/render-credential-Bn15FEUC.mjs +23 -0
  70. package/dist/render-operation-Bc7Wu1sP.mjs +36 -0
  71. package/dist/{requirements.handler-C-5PIRvy.mjs → requirements.handler-B5rqCjMu.mjs} +4 -4
  72. package/dist/{resolve-cli-credentials-B4crOe_y.mjs → resolve-cli-credentials-CAOSVMJP.mjs} +1 -1
  73. package/dist/{resolve-project-DJJZIOmu.mjs → resolve-project-E9mrh_el.mjs} +1 -1
  74. package/dist/{run-polling-cylAR4FL.mjs → run-polling-DawiBus-.mjs} +2 -2
  75. package/dist/{run.handler-CUgLQrsQ.mjs → run.handler-BG7xitEK.mjs} +5 -5
  76. package/dist/{runs-CZRwB58H.mjs → runs-swYYBT6C.mjs} +2 -2
  77. package/dist/{schema-display-XrRCdFL0.mjs → schema-display-FvI8QjOQ.mjs} +28 -1
  78. package/dist/schemas-4Mq_bxob.mjs +39 -0
  79. package/dist/search-BEfy2fG9.mjs +53 -0
  80. package/dist/search.handler-V7ObLGjN.mjs +79 -0
  81. package/dist/show.handler-C_VDYU91.mjs +31 -0
  82. package/dist/show.handler-CsidInW8.mjs +21 -0
  83. package/dist/show.handler-Wmv0tkxx.mjs +35 -0
  84. package/dist/{skills-sync.handler-DsJP_-XZ.mjs → skills-sync.handler-BAATdT6N.mjs} +1 -1
  85. package/dist/{skills.command-B6jly3ew.mjs → skills.command-0-E8mcYE.mjs} +4 -4
  86. package/dist/{src-DNhUmpSl.mjs → src-DI-ybNjR.mjs} +166 -25
  87. package/dist/{switch.handler-B3QBoSSl.mjs → switch.handler-BwYndsP-.mjs} +2 -2
  88. package/dist/{sync-BssJv3Fd.mjs → sync-6fZkIUtn.mjs} +2 -2
  89. package/dist/{sync.handler-Ia7cO3xj.mjs → sync.handler-Ctr-cN9X.mjs} +6 -6
  90. package/dist/{task-target-build-CrPLSXnu.mjs → task-target-build-QllcCfoN.mjs} +5 -5
  91. package/dist/task-target-deploy-runner.mjs +7 -7
  92. package/dist/{test-RFvyK7rK.mjs → test-C8VIZe9V.mjs} +2 -2
  93. package/dist/{test.handler-CLqnDqY6.mjs → test.handler-BCW0YBPd.mjs} +1 -1
  94. package/dist/{test.handler-DBXBhJ59.mjs → test.handler-DLaxrJ9V.mjs} +8 -8
  95. package/dist/{tool.handler-BzyxzKK8.mjs → tool.handler-8qNmgdRe.mjs} +8 -8
  96. package/dist/{trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs → trigger-artifacts-BcRScRSp-BiD2h6do.mjs} +2 -2
  97. package/dist/{upgrade-B6Prb1K-.mjs → upgrade-DgOcc8IT.mjs} +2 -2
  98. package/dist/{upload.handler-Capc50yH.mjs → upload.handler-B7xle1oX.mjs} +6 -6
  99. package/dist/{users.get.handler-DoajzImx.mjs → users.get.handler-C4t1vXwi.mjs} +1 -1
  100. package/dist/{users.list.handler-CRk2J8mi.mjs → users.list.handler-Dvl90grq.mjs} +1 -1
  101. package/dist/{users.set-role.handler-CHYjbx5M.mjs → users.set-role.handler-Djw1_VGf.mjs} +1 -1
  102. package/dist/{validate.handler-DmiJmNA0.mjs → validate.handler-Drf_lssw.mjs} +5 -5
  103. package/dist/{workflow-build-DPqt_edf.mjs → workflow-build-Begvjfq8.mjs} +7 -7
  104. package/dist/{workflow-bundler-BzHk73PM-xQwAF08W.mjs → workflow-bundler-BzHk73PM-muPv1yGG.mjs} +1 -1
  105. package/dist/{workflows-Lz8M15i7.mjs → workflows-DjMlxuBX.mjs} +13 -45
  106. package/package.json +12 -12
  107. package/dist/credentials-DzmutsMa.mjs +0 -176
  108. package/dist/{build-metadata-BB_L45ZS-BtGGjHIV.mjs → build-metadata-BB_L45ZS-DSJL7dTy.mjs} +0 -0
  109. package/dist/{build-progress-O9f-4Z4D.mjs → build-progress-DLM1Bt4T.mjs} +0 -0
  110. package/dist/{clear.handler-BdR56Cok.mjs → clear.handler-T27GpgSu.mjs} +0 -0
  111. package/dist/{credential-schema-mismatch-kfGeiSB1.mjs → credential-schema-mismatch-ClQgEVtO.mjs} +0 -0
  112. package/dist/{credentials-N4L3Vaib.mjs → credentials-DKrSaaLw.mjs} +0 -0
  113. package/dist/{deploy-BURTx92e.mjs → deploy-DhCbYFc7.mjs} +0 -0
  114. package/dist/{deploy-progress-C1Y73QVM.mjs → deploy-progress-BsUH7fGE.mjs} +0 -0
  115. package/dist/{detect-env-access-CwkOYeYM-D4aTZv4R.mjs → detect-env-access-CwkOYeYM-COq4U-4Y.mjs} +0 -0
  116. package/dist/{diff-utils-CXKNQUXO.mjs → diff-utils-Bs--xmoV.mjs} +0 -0
  117. package/dist/{import-module-y0glInUe-BwuOxEY3.mjs → import-module-y0glInUe-DV_3dsU0.mjs} +1 -1
  118. /package/dist/{logs.handler-Bs1DVMaO.mjs → logs.handler-DGGVPMOX.mjs} +0 -0
  119. /package/dist/{read-credential-keys-77a91T8M-aLuQvlIq.mjs → read-credential-keys-77a91T8M-DGK5XTQp.mjs} +0 -0
  120. /package/dist/{register.handler-C_NqMLir.mjs → register.handler-CePNU3sP.mjs} +0 -0
  121. /package/dist/{run-polling-DKWPGLyF.mjs → run-polling-fBouPjJ2.mjs} +0 -0
  122. /package/dist/{skill-installer-AX0X-u1J.mjs → skill-installer-D6j9IA3Z.mjs} +0 -0
  123. /package/dist/{skills.handler-KEUkV5NH.mjs → skills.handler-DYIQK0Vu.mjs} +0 -0
  124. /package/dist/{task-target-deploy-DeUyfi9H.mjs → task-target-deploy-B_3HPSo2.mjs} +0 -0
  125. /package/dist/{types-D1cVpE7_.mjs → types-AlA-ifK9.mjs} +0 -0
  126. /package/dist/{upgrade.handler-C7KvNL0x.mjs → upgrade.handler-DSZuw7-9.mjs} +0 -0
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
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 detectPackageManager } from "./package-manager-DT1EhOkS.mjs";
7
+ import { t as renderOperation } from "./render-operation-Bc7Wu1sP.mjs";
8
+ //#region src/commands/operations/list.handler.ts
9
+ async function handleOperationsList(options, ctx) {
10
+ const result = await requireClient(ctx).operations.list({
11
+ integrationId: options.integration,
12
+ tags: options.tags?.split(",").filter(Boolean),
13
+ needsApproval: options.needsApproval,
14
+ includeDeprecated: options.includeDeprecated,
15
+ limit: options.limit,
16
+ ...options.full ? { include: "full" } : {}
17
+ });
18
+ if (ctx.jsonMode) {
19
+ writeJson(result);
20
+ return;
21
+ }
22
+ const packageManager = detectPackageManager();
23
+ for (const op of result.items) renderOperation(op, {
24
+ showSchemas: Boolean(options.full),
25
+ packageManager
26
+ });
27
+ if (result.nextCursor) ui.hint("\n…more results available. Re-run with --json to paginate programmatically.");
28
+ }
29
+ //#endregion
30
+ export { handleOperationsList };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.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) {
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { a as ui, j as throwReportedCliExit, n as style, t as ANSI } from "./keystroke.mjs";
4
- import { i as projects } from "./dist-D_KgdxW5.mjs";
4
+ import { i as projects } from "./dist-Dw7gCE7y.mjs";
5
5
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
6
- import { t as requireWorkflowsDir } from "./resolve-project-DJJZIOmu.mjs";
6
+ import { t as requireWorkflowsDir } from "./resolve-project-E9mrh_el.mjs";
7
7
  import { t as createSpinnerProgress } from "./spinner-progress-lrKDs4YF.mjs";
8
- import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-DPqt_edf.mjs";
8
+ import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Begvjfq8.mjs";
9
9
  //#region src/commands/workflows/list.handler.ts
10
10
  function formatWorkflow(artifact) {
11
11
  const name = style(artifact.manifest.name, `${ANSI.bold}${ANSI.cyan}`);
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
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";
7
+ //#region src/commands/credentials/definitions/list.handler.ts
8
+ async function handleCredentialDefinitionsList(options, ctx) {
9
+ const result = await requireClient(ctx).credentials.definitions.list({
10
+ integrationId: options.integration,
11
+ role: options.role,
12
+ connectionKind: options.connectionKind,
13
+ limit: options.limit,
14
+ ...options.full ? { include: "full" } : {}
15
+ });
16
+ if (ctx.jsonMode) {
17
+ writeJson(result);
18
+ return;
19
+ }
20
+ for (const credential of result.items) renderCredential(credential, { full: Boolean(options.full) });
21
+ if (result.nextCursor) ui.hint("\n…more results available. Re-run with --json to paginate programmatically.");
22
+ }
23
+ //#endregion
24
+ export { handleCredentialDefinitionsList };
@@ -2,11 +2,11 @@
2
2
 
3
3
  import { a as ui, c as getProcessEnv, j as throwReportedCliExit } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { a as readManifestsFromOutDir } from "./dist-CTEtWDW4.mjs";
7
- import { n as resolveWorkflowsDir } from "./resolve-project-DJJZIOmu.mjs";
8
- import { t as readCredentialEnvMap } from "./credential-env-map-CtmzNkwU.mjs";
9
- import { a as loadProjectDotenvFile, i as enrichServerCredentialRow, l as renderCredentialListBlocks, n as buildSyntheticNotOnServerRows, r as collectMergedManifestGroups, t as buildCredentialWorkflowConsumersByGroup } from "./list-enrichment-6zUKzSyL.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";
10
10
  import dayjs from "dayjs";
11
11
  //#region src/commands/credentials/list/fetch-all-credential-sets.ts
12
12
  /**
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { a as ui, n as style, t as ANSI, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-DHOTSgPb.mjs";
6
- import { t as getIntegrationCatalog } from "./integration-catalog-Cub_7xCw.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
+ import { t as getIntegrationCatalog } from "./integration-catalog-CiZ62hb_.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/integrations/list.handler.ts
9
9
  function summarizeConnections(entry, connections) {
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
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/invites/list.handler.ts
@@ -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 requireClient } from "./context-DHOTSgPb.mjs";
4
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
5
5
  //#region src/commands/org/list.handler.ts
6
6
  async function handleOrgList(_options, ctx) {
7
7
  const { user } = await requireClient(ctx).users.getMe();
@@ -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-BTMzBiLq.mjs";
4
+ import { t as createTypedCommand } from "./commander-BlrSdFcu.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-B7s6mz82.mjs")).handleListen
21
+ loadHandler: async () => (await import("./listen.handler-dJgorIzr.mjs")).handleListen
22
22
  });
23
23
  }
24
24
  //#endregion
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { D as CliExitError, a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { a as writeJsonError, i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-DHOTSgPb.mjs";
6
- import { n as sleep } from "./run-polling-DKWPGLyF.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
+ import { n as sleep } from "./run-polling-fBouPjJ2.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-BTMzBiLq.mjs";
3
+ import { t as createTypedCommand } from "./commander-BlrSdFcu.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-Bs1DVMaO.mjs")).handleLogs,
47
+ loadHandler: async () => (await import("./logs.handler-DGGVPMOX.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-BdR56Cok.mjs")).handleLogsClear
53
+ loadHandler: async () => (await import("./clear.handler-T27GpgSu.mjs")).handleLogsClear
54
54
  })]
55
55
  });
56
56
  }
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-DHOTSgPb.mjs";
6
- import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-DKWPGLyF.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
+ import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-fBouPjJ2.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/workflows/_shared/run-query.ts
9
9
  async function listRunsByWorkflowRef(client, options) {
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/org/members.add.handler.ts
8
8
  async function handleMembersAdd(options, ctx) {
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/org/members.invite.handler.ts
8
8
  async function handleMembersInvite(options, ctx) {
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/org/members.list.handler.ts
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/org/members.remove.handler.ts
8
8
  async function handleMembersRemove(options, ctx) {
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/org/members.update.handler.ts
8
8
  async function handleMembersUpdate(options, ctx) {
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
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";
5
+ import { z } from "zod";
6
+ //#region src/commands/operations/operations.command.ts
7
+ const OperationsListOptionsSchema = JsonOptionSchema.extend({
8
+ integration: z.string().optional(),
9
+ tags: z.string().optional(),
10
+ needsApproval: z.boolean().optional(),
11
+ includeDeprecated: z.boolean().optional(),
12
+ full: z.boolean().optional(),
13
+ limit: z.coerce.number().int().positive().max(200).optional()
14
+ });
15
+ const OPERATIONS_LIST_OPTIONS_CONFIG = {
16
+ ...JSON_OPTION_CONFIG,
17
+ integration: {
18
+ flag: "--integration <id>",
19
+ description: "Restrict to operations from a specific integration"
20
+ },
21
+ tags: {
22
+ flag: "--tags <csv>",
23
+ description: "Comma-separated tag filter"
24
+ },
25
+ needsApproval: {
26
+ flag: "--needs-approval",
27
+ description: "Only operations that require approval"
28
+ },
29
+ includeDeprecated: {
30
+ flag: "--include-deprecated",
31
+ description: "Include deprecated operations"
32
+ },
33
+ full: {
34
+ flag: "--full",
35
+ description: "Include input/output JSON schemas and safety flags for every result"
36
+ },
37
+ limit: {
38
+ flag: "--limit <n>",
39
+ description: "Page size (1–200)"
40
+ }
41
+ };
42
+ const OperationShowOptionsSchema = JsonOptionSchema.extend({
43
+ id: z.string().min(1),
44
+ schema: z.boolean().optional()
45
+ });
46
+ const OPERATION_SHOW_OPTIONS_CONFIG = {
47
+ ...JSON_OPTION_CONFIG,
48
+ schema: {
49
+ flag: "--schema",
50
+ description: "Print only the input/output JSON schemas as JSON"
51
+ }
52
+ };
53
+ function createOperationsCommand() {
54
+ return createTypedCommand({
55
+ name: "operations",
56
+ description: "Browse and inspect operations across all integrations",
57
+ schema: OperationsListOptionsSchema,
58
+ optionsConfig: OPERATIONS_LIST_OPTIONS_CONFIG,
59
+ loadHandler: async () => (await import("./list.handler-BKfGLkFu.mjs")).handleOperationsList,
60
+ subcommands: [createTypedCommand({
61
+ name: "list",
62
+ description: "List operations, optionally scoped to one integration",
63
+ schema: OperationsListOptionsSchema,
64
+ optionsConfig: OPERATIONS_LIST_OPTIONS_CONFIG,
65
+ loadHandler: async () => (await import("./list.handler-BKfGLkFu.mjs")).handleOperationsList
66
+ }), createTypedCommand({
67
+ name: "show",
68
+ description: "Show full details for one operation, including input/output schemas",
69
+ schema: OperationShowOptionsSchema,
70
+ optionsConfig: OPERATION_SHOW_OPTIONS_CONFIG,
71
+ argument: {
72
+ name: "id",
73
+ description: "Operation id, e.g. aws-s3.put-object",
74
+ key: "id"
75
+ },
76
+ loadHandler: async () => (await import("./show.handler-Wmv0tkxx.mjs")).handleOperationShow
77
+ })]
78
+ });
79
+ }
80
+ //#endregion
81
+ export { createOperationsCommand };
@@ -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-BTMzBiLq.mjs";
4
+ import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
5
5
  import { t as OrgRoleSchema } from "./schema-Lbp5lGJu.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/commands/org/invites.command.ts
@@ -36,14 +36,14 @@ function createOrgInvitesCommand() {
36
36
  description: "Manage organization invitations",
37
37
  schema: OrgInvitesListOptionsSchema,
38
38
  optionsConfig: { ...JSON_OPTION_CONFIG },
39
- loadHandler: async () => (await import("./invites.list.handler-B2RoiFCu.mjs")).handleOrgInvitesList,
39
+ loadHandler: async () => (await import("./invites.list.handler-CK6mL10z.mjs")).handleOrgInvitesList,
40
40
  subcommands: [
41
41
  createTypedCommand({
42
42
  name: "list",
43
43
  description: "List organization invites",
44
44
  schema: OrgInvitesListOptionsSchema,
45
45
  optionsConfig: { ...JSON_OPTION_CONFIG },
46
- loadHandler: async () => (await import("./invites.list.handler-B2RoiFCu.mjs")).handleOrgInvitesList
46
+ loadHandler: async () => (await import("./invites.list.handler-CK6mL10z.mjs")).handleOrgInvitesList
47
47
  }),
48
48
  createTypedCommand({
49
49
  name: "resend",
@@ -55,7 +55,7 @@ function createOrgInvitesCommand() {
55
55
  description: "Invite ID to resend",
56
56
  key: "inviteId"
57
57
  },
58
- loadHandler: async () => (await import("./invites.resend.handler-C4rzRkqX.mjs")).handleOrgInvitesResend
58
+ loadHandler: async () => (await import("./invites.resend.handler-CKZouK1Z.mjs")).handleOrgInvitesResend
59
59
  }),
60
60
  createTypedCommand({
61
61
  name: "revoke",
@@ -67,7 +67,7 @@ function createOrgInvitesCommand() {
67
67
  description: "Invite ID to revoke",
68
68
  key: "inviteId"
69
69
  },
70
- loadHandler: async () => (await import("./invites.revoke.handler-CMf6PpeL.mjs")).handleOrgInvitesRevoke
70
+ loadHandler: async () => (await import("./invites.revoke.handler-H0VI-3sp.mjs")).handleOrgInvitesRevoke
71
71
  })
72
72
  ]
73
73
  });
@@ -142,28 +142,28 @@ function createOrgMembersCommand() {
142
142
  description: "Manage organization members",
143
143
  schema: MembersListOptionsSchema,
144
144
  optionsConfig: { ...JSON_OPTION_CONFIG },
145
- loadHandler: async () => (await import("./members.list.handler-CUZGd-3B.mjs")).handleMembersList,
145
+ loadHandler: async () => (await import("./members.list.handler-Bn9LJEPG.mjs")).handleMembersList,
146
146
  subcommands: [
147
147
  createTypedCommand({
148
148
  name: "list",
149
149
  description: "List organization members",
150
150
  schema: MembersListOptionsSchema,
151
151
  optionsConfig: { ...JSON_OPTION_CONFIG },
152
- loadHandler: async () => (await import("./members.list.handler-CUZGd-3B.mjs")).handleMembersList
152
+ loadHandler: async () => (await import("./members.list.handler-Bn9LJEPG.mjs")).handleMembersList
153
153
  }),
154
154
  createTypedCommand({
155
155
  name: "invite",
156
156
  description: "Invite a user to the current organization",
157
157
  schema: MembersInviteOptionsSchema,
158
158
  optionsConfig: INVITE_OPTIONS_CONFIG,
159
- loadHandler: async () => (await import("./members.invite.handler-8-pTOtw_.mjs")).handleMembersInvite
159
+ loadHandler: async () => (await import("./members.invite.handler-BNpHn1dY.mjs")).handleMembersInvite
160
160
  }),
161
161
  createTypedCommand({
162
162
  name: "add",
163
163
  description: "Add an existing user to the current organization",
164
164
  schema: MembersAddOptionsSchema,
165
165
  optionsConfig: ADD_OPTIONS_CONFIG,
166
- loadHandler: async () => (await import("./members.add.handler-Dr9SCjrS.mjs")).handleMembersAdd
166
+ loadHandler: async () => (await import("./members.add.handler-DSRCRxsI.mjs")).handleMembersAdd
167
167
  }),
168
168
  createTypedCommand({
169
169
  name: "update",
@@ -175,7 +175,7 @@ function createOrgMembersCommand() {
175
175
  description: "User ID to update",
176
176
  key: "userId"
177
177
  },
178
- loadHandler: async () => (await import("./members.update.handler-BAbB9ssa.mjs")).handleMembersUpdate
178
+ loadHandler: async () => (await import("./members.update.handler-DBtUYuAY.mjs")).handleMembersUpdate
179
179
  }),
180
180
  createTypedCommand({
181
181
  name: "remove",
@@ -187,7 +187,7 @@ function createOrgMembersCommand() {
187
187
  description: "User ID to remove",
188
188
  key: "userId"
189
189
  },
190
- loadHandler: async () => (await import("./members.remove.handler-BCiLt3pa.mjs")).handleMembersRemove
190
+ loadHandler: async () => (await import("./members.remove.handler-Dkr2t_tX.mjs")).handleMembersRemove
191
191
  })
192
192
  ]
193
193
  });
@@ -202,28 +202,28 @@ function createOrgCommand() {
202
202
  description: "Manage organization context",
203
203
  schema: OrgOptionsSchema,
204
204
  optionsConfig: ORG_OPTIONS_CONFIG,
205
- loadHandler: async () => (await import("./list.handler-wYGZhl1g.mjs")).handleOrgList,
205
+ loadHandler: async () => (await import("./list.handler-htR9TeiS.mjs")).handleOrgList,
206
206
  subcommands: [
207
207
  createTypedCommand({
208
208
  name: "list",
209
209
  description: "List your organizations",
210
210
  schema: OrgOptionsSchema,
211
211
  optionsConfig: ORG_OPTIONS_CONFIG,
212
- loadHandler: async () => (await import("./list.handler-wYGZhl1g.mjs")).handleOrgList
212
+ loadHandler: async () => (await import("./list.handler-htR9TeiS.mjs")).handleOrgList
213
213
  }),
214
214
  createTypedCommand({
215
215
  name: "current",
216
216
  description: "Show the current organization",
217
217
  schema: OrgOptionsSchema,
218
218
  optionsConfig: ORG_OPTIONS_CONFIG,
219
- loadHandler: async () => (await import("./current.handler-BXec-Bhy.mjs")).handleOrgCurrent
219
+ loadHandler: async () => (await import("./current.handler-BaGaCLzB.mjs")).handleOrgCurrent
220
220
  }),
221
221
  createTypedCommand({
222
222
  name: "switch",
223
223
  description: "Switch to a different organization",
224
224
  schema: OrgOptionsSchema,
225
225
  optionsConfig: ORG_OPTIONS_CONFIG,
226
- loadHandler: async () => (await import("./switch.handler-B3QBoSSl.mjs")).handleOrgSwitch
226
+ loadHandler: async () => (await import("./switch.handler-BwYndsP-.mjs")).handleOrgSwitch
227
227
  }),
228
228
  createOrgMembersCommand(),
229
229
  createOrgInvitesCommand()
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/admin/orgs.create.handler.ts
8
8
  async function handleAdminOrgsCreate(options, ctx) {
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/admin/orgs.get.handler.ts
8
8
  async function handleAdminOrgsGet(options, ctx) {
@@ -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-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
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/orgs.list.handler.ts
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { dirname, join } from "node:path";
4
+ import { existsSync, readFileSync } from "node:fs";
5
+ //#region src/lib/package-manager.ts
6
+ const PackageManagerValues = [
7
+ "npm",
8
+ "pnpm",
9
+ "yarn",
10
+ "bun"
11
+ ];
12
+ function parsePackageManagerField(value) {
13
+ if (typeof value !== "string" || value.length === 0) return null;
14
+ const name = value.split("@")[0]?.trim();
15
+ if (name && PackageManagerValues.includes(name)) return name;
16
+ return null;
17
+ }
18
+ function detectFromLockfiles(directory) {
19
+ if (existsSync(join(directory, "bun.lockb")) || existsSync(join(directory, "bun.lock"))) return "bun";
20
+ if (existsSync(join(directory, "pnpm-lock.yaml"))) return "pnpm";
21
+ if (existsSync(join(directory, "yarn.lock"))) return "yarn";
22
+ if (existsSync(join(directory, "package-lock.json")) || existsSync(join(directory, "npm-shrinkwrap.json"))) return "npm";
23
+ return null;
24
+ }
25
+ function readPackageManagerField(directory) {
26
+ const packageJsonPath = join(directory, "package.json");
27
+ if (!existsSync(packageJsonPath)) return null;
28
+ try {
29
+ return parsePackageManagerField(JSON.parse(readFileSync(packageJsonPath, "utf8")).packageManager);
30
+ } catch {
31
+ return null;
32
+ }
33
+ }
34
+ /**
35
+ * Infers the package manager for the current working directory by walking up
36
+ * from `cwd` and preferring lockfiles (monorepo roots) over nested package.json
37
+ * files without lockfiles.
38
+ */
39
+ function detectPackageManager(options = {}) {
40
+ let directory = options.cwd ?? process.cwd();
41
+ let packageManagerFromField = null;
42
+ while (true) {
43
+ const fromLockfiles = detectFromLockfiles(directory);
44
+ if (fromLockfiles) return fromLockfiles;
45
+ const fromField = readPackageManagerField(directory);
46
+ if (fromField && !packageManagerFromField) packageManagerFromField = fromField;
47
+ const parent = dirname(directory);
48
+ if (parent === directory) break;
49
+ directory = parent;
50
+ }
51
+ return packageManagerFromField ?? "npm";
52
+ }
53
+ function formatPackageInstallCommand(packageName, options = {}) {
54
+ const packageManager = options.packageManager ?? detectPackageManager({ cwd: options.cwd });
55
+ if (packageManager === "npm") return `npm install ${packageName}`;
56
+ if (packageManager === "pnpm") return `pnpm add ${packageName}`;
57
+ if (packageManager === "yarn") return `yarn add ${packageName}`;
58
+ return `bun add ${packageName}`;
59
+ }
60
+ //#endregion
61
+ export { formatPackageInstallCommand as n, detectPackageManager as t };
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import * as os from "node:os";
4
3
  import * as path$1 from "node:path";
5
- //#region ../../packages/local-memory/dist/paths-JzzFkXQA.mjs
4
+ import * as os from "node:os";
5
+ //#region ../../packages/local-memory/dist/paths-DpHfoaXN.mjs
6
6
  /**
7
7
  * Single source of truth for the Keystroke local-memory directory name.
8
8
  * Every path under ~/.keystroke (and projectRoot/.keystroke) must derive
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-DHOTSgPb.mjs";
5
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
6
  //#region src/commands/workflows/paused/paused.handler.ts
7
7
  async function handleWorkflowsPaused(options, ctx) {
8
8
  const client = requireClient(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-BTMzBiLq.mjs";
4
+ import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/projects/projects.command.ts
7
7
  function createProjectsCommand() {
@@ -10,19 +10,19 @@ function createProjectsCommand() {
10
10
  description: "List tracked Keystroke projects",
11
11
  schema: JsonOptionSchema,
12
12
  optionsConfig: { ...JSON_OPTION_CONFIG },
13
- loadHandler: async () => (await import("./list.handler-DpdVFRYl.mjs")).handleProjectsList,
13
+ loadHandler: async () => (await import("./list.handler-BEMj3FyH.mjs")).handleProjectsList,
14
14
  subcommands: [createTypedCommand({
15
15
  name: "list",
16
16
  description: "List all tracked Keystroke projects",
17
17
  schema: JsonOptionSchema,
18
18
  optionsConfig: { ...JSON_OPTION_CONFIG },
19
- loadHandler: async () => (await import("./list.handler-DpdVFRYl.mjs")).handleProjectsList
19
+ loadHandler: async () => (await import("./list.handler-BEMj3FyH.mjs")).handleProjectsList
20
20
  }), createTypedCommand({
21
21
  name: "clear-cache",
22
22
  description: "Clear the stored projects cache (projects.json)",
23
23
  schema: z.object({}),
24
24
  optionsConfig: {},
25
- loadHandler: async () => (await import("./clear-cache.handler-DpP1VlbR.mjs")).handleProjectsClearCache
25
+ loadHandler: async () => (await import("./clear-cache.handler-BP0K1-uN.mjs")).handleProjectsClearCache
26
26
  })]
27
27
  });
28
28
  }
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { a as ui } from "./keystroke.mjs";
4
+ //#region src/lib/render-credential.ts
5
+ function renderCredential(c, { full = false } = {}) {
6
+ ui.br();
7
+ ui.text(c.id);
8
+ ui.text(` ${c.displayName}`);
9
+ if (c.description) ui.text(` ${c.description}`);
10
+ ui.text(` role: ${c.role} · exposure: ${c.exposure}`);
11
+ if (c.connectionKind) ui.text(` connection: ${c.connectionKind}`);
12
+ if (c.integrationId) ui.text(` integration: ${c.integrationId}`);
13
+ if (c.score !== void 0) ui.text(` score: ${c.score.toFixed(2)}`);
14
+ if (full && "authSchemaJson" in c) ui.text(` auth fields: ${describeFields(c.authSchemaJson)}`);
15
+ }
16
+ function describeFields(schema) {
17
+ if (!schema || typeof schema !== "object") return "(none)";
18
+ const props = schema.properties ?? {};
19
+ const names = Object.keys(props);
20
+ return names.length === 0 ? "(none)" : names.join(", ");
21
+ }
22
+ //#endregion
23
+ export { renderCredential as t };