@keystrokehq/cli 0.0.28 → 0.0.30

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 (125) hide show
  1. package/dist/{accept.handler-tvT9pleH.mjs → accept.handler-DNfIXPSP.mjs} +1 -1
  2. package/dist/{admin-DsAQ0WWj.mjs → admin-CJp8XksD.mjs} +9 -9
  3. package/dist/{agents-Bc3B9_ms.mjs → agents-G37PM35Z.mjs} +5 -5
  4. package/dist/{api-O5tdGdzc.mjs → api-BK3EhPvs.mjs} +77 -3
  5. package/dist/{api-keys-tle_m3kk.mjs → api-keys-4igNHJ_W.mjs} +5 -5
  6. package/dist/{auth-DLaY5yCZ.mjs → auth-CIOmmV4x.mjs} +4 -4
  7. package/dist/{auth.handler-Dq2fXO3S.mjs → auth.handler-CznN_vfz.mjs} +1 -1
  8. package/dist/{build-agents-DseUtzd4-Cmd-kNNO.mjs → build-agents-DseUtzd4-CSGpNXur.mjs} +2 -2
  9. package/dist/{build-tasks-C09SdfjC-B0F7BZZG.mjs → build-tasks-C09SdfjC-BmAVLTtQ.mjs} +2 -2
  10. package/dist/{build-workflows-BZ_m97Pr-HQZY4xBV.mjs → build-workflows-BZ_m97Pr-BiyptCrn.mjs} +3 -3
  11. package/dist/{build.handler-5CpbMuHx.mjs → build.handler-zHimoO7c.mjs} +5 -5
  12. package/dist/{clear-cache.handler-DpP1VlbR.mjs → clear-cache.handler-BP0K1-uN.mjs} +1 -1
  13. package/dist/{clear.handler-FzohTmpU.mjs → clear.handler-PsA5QKHx.mjs} +2 -2
  14. package/dist/{commander-BTMzBiLq.mjs → commander-BlrSdFcu.mjs} +1 -1
  15. package/dist/{connect-BUu2ojK7.mjs → connect-BbLJhlIA.mjs} +2 -2
  16. package/dist/{connect.handler-D7oO_5WS.mjs → connect.handler-BthE-7Wg.mjs} +4 -4
  17. package/dist/{context-DHOTSgPb.mjs → context-sgKhRc5v.mjs} +3 -3
  18. package/dist/{create.handler-BuxP18uj.mjs → create.handler-BovbO_g0.mjs} +1 -1
  19. package/dist/{credential-env-map-CtmzNkwU.mjs → credential-env-map-CRs0llf0.mjs} +2 -2
  20. package/dist/{credentials-DQW8xxof.mjs → credentials-DKrSaaLw.mjs} +1 -1
  21. package/dist/credentials-LmhgE-Co.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-DzDtYyqj.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-BfeKNPg6.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-CCRHYslm.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-DxT7YHW7.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-wXS1s3du.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-Cje-GJ8H.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-B2vPQp8w.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-DYwiYttT.mjs → workflows-DjMlxuBX.mjs} +13 -45
  106. package/package.json +12 -12
  107. package/dist/credentials-C-MN9q-b.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/{deploy-BURTx92e.mjs → deploy-DhCbYFc7.mjs} +0 -0
  113. package/dist/{deploy-progress-C1Y73QVM.mjs → deploy-progress-BsUH7fGE.mjs} +0 -0
  114. package/dist/{detect-env-access-CwkOYeYM-D4aTZv4R.mjs → detect-env-access-CwkOYeYM-COq4U-4Y.mjs} +0 -0
  115. package/dist/{diff-utils-CXKNQUXO.mjs → diff-utils-Bs--xmoV.mjs} +0 -0
  116. package/dist/{import-module-y0glInUe-BwuOxEY3.mjs → import-module-y0glInUe-DV_3dsU0.mjs} +1 -1
  117. /package/dist/{logs.handler-Bs1DVMaO.mjs → logs.handler-DGGVPMOX.mjs} +0 -0
  118. /package/dist/{read-credential-keys-77a91T8M-aLuQvlIq.mjs → read-credential-keys-77a91T8M-DGK5XTQp.mjs} +0 -0
  119. /package/dist/{register.handler-C_NqMLir.mjs → register.handler-CePNU3sP.mjs} +0 -0
  120. /package/dist/{run-polling-DKWPGLyF.mjs → run-polling-fBouPjJ2.mjs} +0 -0
  121. /package/dist/{skill-installer-AX0X-u1J.mjs → skill-installer-D6j9IA3Z.mjs} +0 -0
  122. /package/dist/{skills.handler-KEUkV5NH.mjs → skills.handler-DYIQK0Vu.mjs} +0 -0
  123. /package/dist/{task-target-deploy-DeUyfi9H.mjs → task-target-deploy-B_3HPSo2.mjs} +0 -0
  124. /package/dist/{types-D1cVpE7_.mjs → types-AlA-ifK9.mjs} +0 -0
  125. /package/dist/{upgrade.handler-C7KvNL0x.mjs → upgrade.handler-DSZuw7-9.mjs} +0 -0
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { a as ui } from "./keystroke.mjs";
4
+ import { n as formatPackageInstallCommand } from "./package-manager-DT1EhOkS.mjs";
5
+ //#region src/lib/render-operation.ts
6
+ function isFull(op) {
7
+ return "inputSchemaJson" in op;
8
+ }
9
+ function renderOperation(op, options = {}) {
10
+ const { showSchemas = false, packageManager } = options;
11
+ ui.br();
12
+ ui.text(op.id);
13
+ ui.text(` ${op.name}`);
14
+ ui.text(` ${op.description}`);
15
+ if (op.tags.length > 0) ui.text(` tags: ${op.tags.join(", ")}`);
16
+ if (op.score !== void 0) ui.text(` score: ${op.score.toFixed(2)}`);
17
+ if (isFull(op)) {
18
+ if (op.needsApproval) ui.warn(" needs approval");
19
+ if (op.deprecatedAt) ui.warn(` deprecated since ${op.deprecatedAt}`);
20
+ if (op.requiredOauthScopes && op.requiredOauthScopes.length > 0) ui.text(` oauth scopes: ${op.requiredOauthScopes.join(", ")}`);
21
+ if (showSchemas) {
22
+ ui.text(` input fields: ${describeSchemaFields(op.inputSchemaJson)}`);
23
+ ui.text(` output fields: ${describeSchemaFields(op.outputSchemaJson)}`);
24
+ }
25
+ }
26
+ const npmPackageName = op.npmPackageName ?? `@keystrokehq/${op.integrationId}`;
27
+ ui.text(` install: ${formatPackageInstallCommand(npmPackageName, { packageManager })}`);
28
+ }
29
+ function describeSchemaFields(schema) {
30
+ if (!schema || typeof schema !== "object") return "(none)";
31
+ const props = schema.properties ?? {};
32
+ const names = Object.keys(props);
33
+ return names.length === 0 ? "(none)" : names.join(", ");
34
+ }
35
+ //#endregion
36
+ export { renderOperation as t };
@@ -3,10 +3,10 @@
3
3
  import { a as ui, c as getProcessEnv, n as style, t as ANSI } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
5
  import { a as readManifestsFromOutDir } from "./dist-CTEtWDW4.mjs";
6
- import { t as requireWorkflowsDir } from "./resolve-project-DJJZIOmu.mjs";
7
- import { t as readCredentialEnvMap } from "./credential-env-map-CtmzNkwU.mjs";
8
- import { a as loadProjectDotenvFile, c as getTerminalContentWidth, o as manifestGroupKey, s as normalizeManifestScopeToServer, t as buildCredentialWorkflowConsumersByGroup, u as truncateWithEllipsis } from "./list-enrichment-CCRHYslm.mjs";
9
- import { t as groupCredentialRequirements } from "./credentials-DQW8xxof.mjs";
6
+ import { t as requireWorkflowsDir } from "./resolve-project-E9mrh_el.mjs";
7
+ import { t as readCredentialEnvMap } from "./credential-env-map-CRs0llf0.mjs";
8
+ import { a as loadProjectDotenvFile, c as getTerminalContentWidth, o as manifestGroupKey, s as normalizeManifestScopeToServer, t as buildCredentialWorkflowConsumersByGroup, u as truncateWithEllipsis } from "./list-enrichment-DP1wEyBZ.mjs";
9
+ import { t as groupCredentialRequirements } from "./credentials-DKrSaaLw.mjs";
10
10
  //#region src/commands/credentials/requirements/requirements-display.ts
11
11
  function dimLabel(label, width = 10) {
12
12
  return style(label.padEnd(width), ANSI.dim);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as credentials } from "./dist-D_KgdxW5.mjs";
3
+ import { n as credentials } from "./dist-Dw7gCE7y.mjs";
4
4
  //#region src/lib/resolve-cli-credentials.ts
5
5
  /**
6
6
  * Resolves CLI credential inputs using explicit overrides first, then stored
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { a as ui, k as ProjectNotFoundError } 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 { n as findProjectRoot } from "./project-config-DudGRFPO.mjs";
6
6
  import path from "node:path";
7
7
  //#region src/lib/resolve-project.ts
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { O as InputValidationError, a as ui, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { a as readManifestsFromOutDir } from "./dist-CTEtWDW4.mjs";
5
- import { a as validateRequiredFields, n as formatValidationError, t as formatMissingInputError } from "./schema-display-XrRCdFL0.mjs";
6
- import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-DKWPGLyF.mjs";
5
+ import { n as formatValidationError, o as validateRequiredFields, t as formatMissingInputError } from "./schema-display-FvI8QjOQ.mjs";
6
+ import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-fBouPjJ2.mjs";
7
7
  import * as path$1 from "node:path";
8
8
  import * as fs from "node:fs/promises";
9
9
  import { z } from "zod";
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { D as CliExitError, a as ui, j as throwReportedCliExit, y as toErrorMessage } 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 { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
6
6
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
7
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-DHOTSgPb.mjs";
8
- import { n as resolveWorkflowsDir } from "./resolve-project-DJJZIOmu.mjs";
9
- import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-Cm_aU9rQ.mjs";
10
- import { i as resolveWorkflowGlobals, o as validateInputOrExit, r as resolveRunInput, s as validateWorkflowGlobalsOrExit, t as pollForCompletion } from "./run-polling-cylAR4FL.mjs";
7
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-sgKhRc5v.mjs";
8
+ import { n as resolveWorkflowsDir } from "./resolve-project-E9mrh_el.mjs";
9
+ import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-B1VQCYC-.mjs";
10
+ import { i as resolveWorkflowGlobals, o as validateInputOrExit, r as resolveRunInput, s as validateWorkflowGlobalsOrExit, t as pollForCompletion } from "./run-polling-DawiBus-.mjs";
11
11
  //#region src/commands/workflows/run.handler.ts
12
12
  async function handleWorkflowsRun(options, ctx) {
13
13
  const client = requireClient(ctx);
@@ -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, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
5
- import { t as createTypedCommand } from "./commander-BTMzBiLq.mjs";
6
- import { i as requireClient } from "./context-DHOTSgPb.mjs";
5
+ import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
6
+ import { i as requireClient } from "./context-sgKhRc5v.mjs";
7
7
  import { z } from "zod";
8
8
  //#region src/commands/runs/inspect-display.ts
9
9
  function renderRunInspect(input) {
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { a as ui } from "./keystroke.mjs";
3
4
  //#region src/lib/schema-display.ts
4
5
  /**
5
6
  * Returns true when the schema is the fallback "unknown" sentinel emitted
@@ -67,6 +68,32 @@ function validateRequiredFields(input, schema) {
67
68
  * { type: ["string", "null"] } → "string | null"
68
69
  * { $ref: "..." } → "object"
69
70
  */
71
+ /**
72
+ * Renders a JSON Schema object's top-level properties for human-readable CLI output.
73
+ */
74
+ function renderJsonSchema(schema) {
75
+ const formatted = formatSchemaPropertyLines(schema);
76
+ if (formatted.length === 0) {
77
+ ui.text(" (none)");
78
+ return;
79
+ }
80
+ for (const line of formatted) ui.text(line);
81
+ }
82
+ function formatSchemaPropertyLines(schema) {
83
+ if (!schema || typeof schema !== "object") return [];
84
+ const props = schema.properties;
85
+ if (!props || Object.keys(props).length === 0) return [];
86
+ const required = schema.required ?? [];
87
+ const requiredSet = new Set(required);
88
+ const lines = [];
89
+ for (const [name, fieldSchema] of Object.entries(props)) {
90
+ const typeHint = resolveTypeHint(fieldSchema);
91
+ const req = requiredSet.has(name) ? " required" : "";
92
+ const desc = typeof fieldSchema.description === "string" ? `\n ${fieldSchema.description}` : "";
93
+ lines.push(` ${name} ${typeHint}${req}${desc}`);
94
+ }
95
+ return lines;
96
+ }
70
97
  function resolveTypeHint(fieldSchema) {
71
98
  if (!fieldSchema) return "any";
72
99
  if (Array.isArray(fieldSchema.enum) && fieldSchema.enum.length > 0) return `${typeof fieldSchema.type === "string" ? `${fieldSchema.type}: ` : ""}${fieldSchema.enum.map(String).join(" | ")}`;
@@ -127,4 +154,4 @@ function formatValidationError(workflowName, issues, inputSchema) {
127
154
  return lines.join("\n");
128
155
  }
129
156
  //#endregion
130
- export { validateRequiredFields as a, resolveTypeHint as i, formatValidationError as n, isUnknownSchema as r, formatMissingInputError as t };
157
+ export { resolveTypeHint as a, renderJsonSchema as i, formatValidationError as n, validateRequiredFields as o, isUnknownSchema as r, formatMissingInputError as t };
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { z } from "zod";
4
+ const CatalogDefinitionSourceSchema = z.enum(["official", "custom"]);
5
+ z.object({
6
+ limit: z.number(),
7
+ offset: z.number(),
8
+ total: z.number()
9
+ });
10
+ /**
11
+ * Pagination query parameters for list endpoints.
12
+ * Uses consistent validation across all endpoints:
13
+ * - limit: 1-100 (default: 20)
14
+ * - offset: >= 0 (default: 0)
15
+ */
16
+ const PaginationQuerySchema = z.object({
17
+ limit: z.coerce.number().min(1).max(100).optional().default(20),
18
+ offset: z.coerce.number().min(0).optional().default(0)
19
+ });
20
+ z.object({
21
+ error: z.string(),
22
+ message: z.string().optional(),
23
+ code: z.string().optional()
24
+ });
25
+ z.object({
26
+ error: z.literal("Not found"),
27
+ resource: z.string(),
28
+ id: z.string()
29
+ });
30
+ z.object({
31
+ error: z.literal("Validation failed"),
32
+ message: z.string(),
33
+ fields: z.record(z.string(), z.array(z.string())).optional()
34
+ });
35
+ /** Matches UUID v1-v5 format. Used to distinguish UUIDs from slugs at runtime. */
36
+ const UUID_FORMAT = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
37
+ z.string().min(1).max(255).regex(/^[a-z0-9-]+$/, "Slug must be alphanumeric and can contain hyphens").refine((val) => !UUID_FORMAT.test(val), "Slug must not be in UUID format");
38
+ //#endregion
39
+ export { PaginationQuerySchema as n, CatalogDefinitionSourceSchema as t };
@@ -0,0 +1,53 @@
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/search/search.command.ts
7
+ const SearchTypeValues = [
8
+ "operations",
9
+ "integrations",
10
+ "credentials"
11
+ ];
12
+ const SearchOptionsSchema = JsonOptionSchema.extend({
13
+ query: z.string().min(1),
14
+ type: z.enum(SearchTypeValues).optional().default("operations"),
15
+ integration: z.string().optional(),
16
+ limit: z.coerce.number().int().positive().max(50).optional(),
17
+ full: z.boolean().optional()
18
+ });
19
+ const SEARCH_OPTIONS_CONFIG = {
20
+ ...JSON_OPTION_CONFIG,
21
+ type: {
22
+ flag: "--type <resource>",
23
+ description: `Resource to search: ${SearchTypeValues.join(" | ")} (default: operations)`
24
+ },
25
+ integration: {
26
+ flag: "--integration <id>",
27
+ description: "Restrict to one integration (operations and credentials only)"
28
+ },
29
+ limit: {
30
+ flag: "--limit <n>",
31
+ description: "Max results (1–50, default: 10)"
32
+ },
33
+ full: {
34
+ flag: "--full",
35
+ description: "Include extended fields (schemas, safety flags, nested operations) without a follow-up show"
36
+ }
37
+ };
38
+ function createSearchCommand() {
39
+ return createTypedCommand({
40
+ name: "search",
41
+ description: "Ranked discovery search across operations, integrations, or credential definitions",
42
+ schema: SearchOptionsSchema,
43
+ optionsConfig: SEARCH_OPTIONS_CONFIG,
44
+ argument: {
45
+ name: "query",
46
+ description: "Search query (matches name and related fields per --type)",
47
+ key: "query"
48
+ },
49
+ loadHandler: async () => (await import("./search.handler-V7ObLGjN.mjs")).handleSearch
50
+ });
51
+ }
52
+ //#endregion
53
+ export { createSearchCommand };
@@ -0,0 +1,79 @@
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
+ import { n as formatPackageInstallCommand, t as detectPackageManager } from "./package-manager-DT1EhOkS.mjs";
8
+ import { t as renderOperation } from "./render-operation-Bc7Wu1sP.mjs";
9
+ //#region src/lib/render-integration.ts
10
+ function renderIntegration(i, { full = false, packageManager } = {}) {
11
+ ui.br();
12
+ ui.text(i.publicId);
13
+ ui.text(` ${i.name}`);
14
+ if (i.description) ui.text(` ${i.description}`);
15
+ if (i.score !== void 0) ui.text(` score: ${i.score.toFixed(2)}`);
16
+ const npmPackageName = i.npmPackageName ?? `@keystrokehq/${i.publicId}`;
17
+ ui.text(` install: ${formatPackageInstallCommand(npmPackageName, { packageManager })}`);
18
+ if (full) {
19
+ const withOps = i;
20
+ if (Array.isArray(withOps.operations) && withOps.operations.length > 0) {
21
+ ui.text(` operations (${withOps.operations.length}):`);
22
+ for (const op of withOps.operations) ui.text(` ${op.id} — ${op.name}`);
23
+ }
24
+ }
25
+ }
26
+ //#endregion
27
+ //#region src/commands/search/search.handler.ts
28
+ async function handleSearch(options, ctx) {
29
+ const type = options.type ?? "operations";
30
+ const result = await dispatchSearch(requireClient(ctx), type, {
31
+ q: options.query,
32
+ integrationId: options.integration,
33
+ limit: options.limit,
34
+ ...options.full ? { include: "full" } : {}
35
+ });
36
+ if (ctx.jsonMode) {
37
+ writeJson(result);
38
+ return;
39
+ }
40
+ if (result.results.length === 0) {
41
+ ui.hint(`No ${type} matched "${options.query}".`);
42
+ ui.hint(`Try a different query, or run \`keystroke ${browseCommand(type)}\` to browse.`);
43
+ return;
44
+ }
45
+ const packageManager = detectPackageManager();
46
+ for (const hit of result.results) renderHit(type, hit, {
47
+ full: Boolean(options.full),
48
+ packageManager
49
+ });
50
+ }
51
+ function browseCommand(type) {
52
+ if (type === "operations") return "operations list";
53
+ if (type === "integrations") return "integrations list";
54
+ return "credentials definitions list";
55
+ }
56
+ function dispatchSearch(client, type, params) {
57
+ if (type === "operations") return client.search.operations(params);
58
+ if (type === "integrations") return client.search.integrations(params);
59
+ return client.search.credentials(params);
60
+ }
61
+ function renderHit(type, hit, { full, packageManager }) {
62
+ if (type === "operations") {
63
+ renderOperation(hit, {
64
+ showSchemas: full,
65
+ packageManager
66
+ });
67
+ return;
68
+ }
69
+ if (type === "integrations") {
70
+ renderIntegration(hit, {
71
+ full,
72
+ packageManager
73
+ });
74
+ return;
75
+ }
76
+ renderCredential(hit, { full });
77
+ }
78
+ //#endregion
79
+ export { handleSearch };
@@ -0,0 +1,31 @@
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 { n as formatPackageInstallCommand, t as detectPackageManager } from "./package-manager-DT1EhOkS.mjs";
7
+ //#region src/commands/integrations/show.handler.ts
8
+ async function handleIntegrationShow(options, ctx) {
9
+ const client = requireClient(ctx);
10
+ const [integration, operations] = await Promise.all([client.integrations.get(options.id), client.integrations.listOperations(options.id)]);
11
+ if (ctx.jsonMode) {
12
+ writeJson({
13
+ integration: integration.integration,
14
+ operations: operations.operations
15
+ });
16
+ return;
17
+ }
18
+ const entry = integration.integration;
19
+ const packageManager = detectPackageManager();
20
+ const npmPackageName = entry.npmPackageName ?? `@keystrokehq/${entry.publicId}`;
21
+ ui.text(entry.publicId);
22
+ ui.text(` ${entry.name}`);
23
+ if (entry.description) ui.text(` ${entry.description}`);
24
+ ui.text(` install: ${formatPackageInstallCommand(npmPackageName, { packageManager })}`);
25
+ ui.text(` operations (${operations.operations.length}):`);
26
+ for (const op of operations.operations) ui.text(` ${op.id} — ${op.name}`);
27
+ ui.br();
28
+ ui.hint(`Usage examples are in ${entry.npmPackageName ?? `@keystrokehq/${entry.publicId}`}'s TSDoc — open in your IDE for hover docs.`);
29
+ }
30
+ //#endregion
31
+ export { handleIntegrationShow };
@@ -0,0 +1,21 @@
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 { i as renderJsonSchema } from "./schema-display-FvI8QjOQ.mjs";
7
+ import { t as renderCredential } from "./render-credential-Bn15FEUC.mjs";
8
+ //#region src/commands/credentials/definitions/show.handler.ts
9
+ async function handleCredentialDefinitionShow(options, ctx) {
10
+ const { credential } = await requireClient(ctx).credentials.definitions.get(options.id);
11
+ if (ctx.jsonMode) {
12
+ writeJson(credential);
13
+ return;
14
+ }
15
+ renderCredential(credential, { full: true });
16
+ ui.br();
17
+ ui.text("Auth schema:");
18
+ renderJsonSchema(credential.authSchemaJson);
19
+ }
20
+ //#endregion
21
+ export { handleCredentialDefinitionShow };
@@ -0,0 +1,35 @@
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 { i as renderJsonSchema } from "./schema-display-FvI8QjOQ.mjs";
7
+ import { t as detectPackageManager } from "./package-manager-DT1EhOkS.mjs";
8
+ import { t as renderOperation } from "./render-operation-Bc7Wu1sP.mjs";
9
+ //#region src/commands/operations/show.handler.ts
10
+ async function handleOperationShow(options, ctx) {
11
+ const { operation } = await requireClient(ctx).operations.get(options.id);
12
+ if (options.schema) {
13
+ writeJson({
14
+ input: operation.inputSchemaJson,
15
+ output: operation.outputSchemaJson
16
+ });
17
+ return;
18
+ }
19
+ if (ctx.jsonMode) {
20
+ writeJson(operation);
21
+ return;
22
+ }
23
+ renderOperation(operation, {
24
+ showSchemas: true,
25
+ packageManager: detectPackageManager()
26
+ });
27
+ ui.br();
28
+ ui.text("Input schema:");
29
+ renderJsonSchema(operation.inputSchemaJson);
30
+ ui.br();
31
+ ui.text("Output schema:");
32
+ renderJsonSchema(operation.outputSchemaJson);
33
+ }
34
+ //#endregion
35
+ export { handleOperationShow };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { D as CliExitError, a as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson, r as isJsonMode } from "./output-BWcVRt-T.mjs";
5
- import { i as UnknownSkillAgentError, n as resolveSkillInstallChoices, r as installKeystrokeAgentSkills, t as summarizeSkillInstall } from "./skill-installer-AX0X-u1J.mjs";
5
+ import { i as UnknownSkillAgentError, n as resolveSkillInstallChoices, r as installKeystrokeAgentSkills, t as summarizeSkillInstall } from "./skill-installer-D6j9IA3Z.mjs";
6
6
  import path from "node:path";
7
7
  //#region src/commands/skills/skills-sync.handler.ts
8
8
  async function handleSkillsSync(options, _ctx) {
@@ -1,8 +1,8 @@
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";
5
- import { t as SKILL_INSTALL_METHODS } from "./types-D1cVpE7_.mjs";
4
+ import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
5
+ import { t as SKILL_INSTALL_METHODS } from "./types-AlA-ifK9.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/commands/skills/skills.command.ts
8
8
  const SkillsCommandOptionsSchema = JsonOptionSchema.extend({
@@ -32,13 +32,13 @@ function createSkillsCommand() {
32
32
  description: "Sync Keystroke agent skills (SKILL.md) from @keystrokehq/skills",
33
33
  schema: SkillsCommandOptionsSchema,
34
34
  optionsConfig: SKILLS_OPTIONS_CONFIG,
35
- loadHandler: async () => (await import("./skills.handler-KEUkV5NH.mjs")).handleSkillsParent,
35
+ loadHandler: async () => (await import("./skills.handler-DYIQK0Vu.mjs")).handleSkillsParent,
36
36
  subcommands: [createTypedCommand({
37
37
  name: "sync",
38
38
  description: "Install bundled Keystroke skills into selected agent skill directories",
39
39
  schema: SkillsCommandOptionsSchema,
40
40
  optionsConfig: SKILLS_OPTIONS_CONFIG,
41
- loadHandler: async () => (await import("./skills-sync.handler-DsJP_-XZ.mjs")).handleSkillsSync
41
+ loadHandler: async () => (await import("./skills-sync.handler-BAATdT6N.mjs")).handleSkillsSync
42
42
  })]
43
43
  });
44
44
  cmd.enablePositionalOptions();