@keystrokehq/cli 0.0.31 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +25 -4
  2. package/dist/{accept.handler-DNfIXPSP.mjs → accept.handler-DCsud1s5.mjs} +4 -4
  3. package/dist/{admin-CJp8XksD.mjs → admin-BaOtHeZ2.mjs} +10 -10
  4. package/dist/{agent-manifest-De5TCxZq.mjs → agent-manifest-DfWD5tvv.mjs} +17 -27
  5. package/dist/{agents-G37PM35Z.mjs → agents-BVAVfMR_.mjs} +9 -9
  6. package/dist/{api-keys-4igNHJ_W.mjs → api-keys-BhEEsHUh.mjs} +6 -6
  7. package/dist/{api-BK3EhPvs.mjs → api-sWkB_Wta.mjs} +1 -1
  8. package/dist/{auth-CIOmmV4x.mjs → auth-BnsitjzT.mjs} +6 -6
  9. package/dist/{auth.handler-CznN_vfz.mjs → auth.handler-W_xk14TL.mjs} +3 -3
  10. package/dist/authored-workflow-ref-fkHEEVnd.mjs +113 -0
  11. package/dist/{build-agents-DseUtzd4-CSGpNXur.mjs → build-agents-CUzBnlAG-3ePFZiJ6.mjs} +12 -11
  12. package/dist/{build-progress-DLM1Bt4T.mjs → build-progress-CM-b6Bby.mjs} +2 -2
  13. package/dist/{build-tasks-C09SdfjC-BmAVLTtQ.mjs → build-tasks-5eOvI19S-tbN6CRx9.mjs} +4 -4
  14. package/dist/{build-workflows-BZ_m97Pr-BiyptCrn.mjs → build-workflows-C-gQM3l5-_zcBHE3M.mjs} +14 -9
  15. package/dist/{build.handler-zHimoO7c.mjs → build.handler-CpAsAsBc.mjs} +12 -9
  16. package/dist/{clear-cache.handler-BP0K1-uN.mjs → clear-cache.handler-gJpwslkK.mjs} +2 -2
  17. package/dist/{clear.handler-T27GpgSu.mjs → clear.handler-CDyG6-dk.mjs} +1 -1
  18. package/dist/{clear.handler-PsA5QKHx.mjs → clear.handler-_sR33Hp8.mjs} +2 -2
  19. package/dist/{commander-BlrSdFcu.mjs → commander-C6SSTQJ2.mjs} +22 -3
  20. package/dist/{connect-BbLJhlIA.mjs → connect-27EgnljZ.mjs} +3 -3
  21. package/dist/{connect.handler-BthE-7Wg.mjs → connect.handler-COM1LnNg.mjs} +5 -5
  22. package/dist/{context-sgKhRc5v.mjs → context-ebZssGCY.mjs} +4 -4
  23. package/dist/{create.handler-BovbO_g0.mjs → create.handler-CAWJAGzQ.mjs} +3 -3
  24. package/dist/{credential-env-map-CRs0llf0.mjs → credential-env-map-5a41jLwM.mjs} +1 -1
  25. package/dist/{credential-requirements-D0mavK8j-CFMf0Xwu.mjs → credential-requirements-B5Alhu1v-DanlSKnT.mjs} +3 -3
  26. package/dist/{credential-schema-mismatch-ClQgEVtO.mjs → credential-schema-mismatch-c17ktoNU.mjs} +1 -1
  27. package/dist/{credentials-CsncZ52a.mjs → credentials-C0ssbMlp.mjs} +10 -10
  28. package/dist/{credentials-DKrSaaLw.mjs → credentials-DtwLbee6.mjs} +1 -1
  29. package/dist/current-deployment-workflow-C6x65imE.mjs +20 -0
  30. package/dist/current.handler-DP1L_hm3.mjs +19 -0
  31. package/dist/{delete.handler-DkAK396w.mjs → delete.handler-C-5XFkgN.mjs} +2 -2
  32. package/dist/{deploy-DvPfR9fC.mjs → deploy-BcVQJza8.mjs} +2 -2
  33. package/dist/{deploy-progress-BsUH7fGE.mjs → deploy-progress-Bt86Yc1r.mjs} +2 -2
  34. package/dist/{deploy.handler-BW3f2N2G.mjs → deploy.handler-GPS9lxGk.mjs} +16 -16
  35. package/dist/{diff-utils-Bs--xmoV.mjs → diff-utils-YEUYtSRs.mjs} +1 -1
  36. package/dist/{diff.handler-BwhsoAg0.mjs → diff.handler-DkM5dhaN.mjs} +15 -9
  37. package/dist/{dist-Dw7gCE7y.mjs → dist-B5jy238v.mjs} +37 -11
  38. package/dist/{dist-CTEtWDW4.mjs → dist-BmbFJq8U.mjs} +8 -27
  39. package/dist/{env.handler-Dks6ZQh-.mjs → env.handler-V_isbSi2.mjs} +52 -29
  40. package/dist/{error-boundary-0veZ_RDS.mjs → error-boundary-BRxUsPi7.mjs} +3 -3
  41. package/dist/{iam-command-utils-CSZj4XlH.mjs → iam-command-utils-DNDN0wT6.mjs} +3 -13
  42. package/dist/{import-module-y0glInUe-DV_3dsU0.mjs → import-module-y0glInUe-EuAWaw9g.mjs} +506 -128
  43. package/dist/{init-DX08T87c.mjs → init-D1OmmclX.mjs} +8 -3
  44. package/dist/{init.handler-CzlmkNXi.mjs → init.handler-CUbYlUgP.mjs} +57 -14
  45. package/dist/{inspect.handler-v9snxDLi.mjs → inspect.handler-BE6coOuW.mjs} +24 -13
  46. package/dist/{integration-catalog-CiZ62hb_.mjs → integration-catalog-pSmWHFLQ.mjs} +3 -3
  47. package/dist/{integrations-MEExmqcg.mjs → integrations-DZD5t8n2.mjs} +7 -7
  48. package/dist/{invites-BuatfJmN.mjs → invites-BuR1H-tA.mjs} +5 -5
  49. package/dist/{invites.list.handler-CK6mL10z.mjs → invites.list.handler-Dj4a6XOg.mjs} +6 -5
  50. package/dist/{invites.resend.handler-CKZouK1Z.mjs → invites.resend.handler-DEGF4vlB.mjs} +6 -5
  51. package/dist/{invites.revoke.handler-H0VI-3sp.mjs → invites.revoke.handler-Dg4ZvlFS.mjs} +6 -5
  52. package/dist/keystroke.mjs +122 -77
  53. package/dist/{list-enrichment-DP1wEyBZ.mjs → list-enrichment-dqbkXJzy.mjs} +2 -2
  54. package/dist/{list.handler-LxZInip2.mjs → list.handler-2g1CZAvB.mjs} +4 -4
  55. package/dist/{list.handler-BKfGLkFu.mjs → list.handler-7MkJfkak.mjs} +5 -5
  56. package/dist/list.handler-BTYVIn6z.mjs +39 -0
  57. package/dist/{list.handler-BiY5NFWd.mjs → list.handler-Bchcr3-e.mjs} +3 -3
  58. package/dist/list.handler-Choc4SZz.mjs +64 -0
  59. package/dist/{list.handler-Jk_vK66s.mjs → list.handler-D47C1z3m.mjs} +4 -4
  60. package/dist/{list.handler-DVnFrlis.mjs → list.handler-DYE48apa.mjs} +7 -7
  61. package/dist/{list.handler-DIMWZx78.mjs → list.handler-KcCaG3PZ.mjs} +4 -4
  62. package/dist/list2.handler-BIaIyrQf.mjs +99 -0
  63. package/dist/{listen-C_7Rgwkb.mjs → listen-CVY-_F29.mjs} +3 -3
  64. package/dist/{listen.handler-dJgorIzr.mjs → listen.handler-D_nEvXRn.mjs} +4 -4
  65. package/dist/{logs-B9YMhUGt.mjs → logs-CZ2qnsSH.mjs} +3 -3
  66. package/dist/{logs.handler-BfjCsAyq.mjs → logs.handler-BRUzZC9Z.mjs} +26 -29
  67. package/dist/{logs.handler-DGGVPMOX.mjs → logs.handler-Wk6mYyAZ.mjs} +1 -1
  68. package/dist/{members.add.handler-DSRCRxsI.mjs → members.add.handler-BJ0wr6rP.mjs} +6 -5
  69. package/dist/{members.invite.handler-BNpHn1dY.mjs → members.invite.handler-DyveDMuq.mjs} +6 -5
  70. package/dist/{members.list.handler-Bn9LJEPG.mjs → members.list.handler-CyQxH_zS.mjs} +6 -5
  71. package/dist/{members.remove.handler-Dkr2t_tX.mjs → members.remove.handler-Dtv9PooY.mjs} +6 -5
  72. package/dist/{members.update.handler-DBtUYuAY.mjs → members.update.handler-CeK-tCjT.mjs} +6 -5
  73. package/dist/{operations-AWMLs6mE.mjs → operations-CxQlt0S0.mjs} +5 -5
  74. package/dist/{org-DOH7YHk2.mjs → org-B8MPHJJu.mjs} +35 -28
  75. package/dist/org-context-BI9OSpbb.mjs +112 -0
  76. package/dist/org-output-DffU7DKn.mjs +64 -0
  77. package/dist/{orgs.create.handler-BO70zIdp.mjs → orgs.create.handler-BKvSmkU3.mjs} +4 -4
  78. package/dist/{orgs.get.handler-BuGg5bc9.mjs → orgs.get.handler-BA-CexIY.mjs} +4 -4
  79. package/dist/{orgs.list.handler--5HutMkl.mjs → orgs.list.handler-eCEg5kC1.mjs} +4 -4
  80. package/dist/{output-BWcVRt-T.mjs → output-DnIFEmi5.mjs} +1 -1
  81. package/dist/package-manager-BP3-q8hh.mjs +162 -0
  82. package/dist/{paused.handler-DHvxz-cC.mjs → paused.handler-4wKMTKZ-.mjs} +20 -33
  83. package/dist/{projects-C5GZ5Jrf.mjs → projects-Wu_2fB_x.mjs} +11 -9
  84. package/dist/{register.handler-CePNU3sP.mjs → register.handler-BvAkXCwE.mjs} +2 -2
  85. package/dist/{render-credential-Bn15FEUC.mjs → render-credential-D-H1ECDt.mjs} +1 -1
  86. package/dist/{render-operation-Bc7Wu1sP.mjs → render-operation-VdEPhoII.mjs} +2 -2
  87. package/dist/{requirements.handler-B5rqCjMu.mjs → requirements.handler-Bab4kBtw.mjs} +7 -7
  88. package/dist/{resolve-cli-credentials-CAOSVMJP.mjs → resolve-cli-credentials-GVOOedoQ.mjs} +1 -1
  89. package/dist/{resolve-project-E9mrh_el.mjs → resolve-project-DLKlAy0z.mjs} +24 -8
  90. package/dist/{run-polling-DawiBus-.mjs → run-polling-C5fI7xTp.mjs} +97 -14
  91. package/dist/{run.handler-BG7xitEK.mjs → run.handler-BKD5Xu0A.mjs} +42 -30
  92. package/dist/{runs-swYYBT6C.mjs → runs-CT31dczt.mjs} +4 -4
  93. package/dist/{schema-display-FvI8QjOQ.mjs → schema-display-sZ6ConJd.mjs} +33 -26
  94. package/dist/schemas-ClAIoIrX.mjs +281 -0
  95. package/dist/{search-BEfy2fG9.mjs → search-BeQW_pf4.mjs} +3 -3
  96. package/dist/{search.handler-V7ObLGjN.mjs → search.handler-BJ-ZlDL4.mjs} +6 -6
  97. package/dist/{show.handler-C_VDYU91.mjs → show.handler-BrIHUH28.mjs} +4 -4
  98. package/dist/{show.handler-CsidInW8.mjs → show.handler-Cqe_hCqU.mjs} +5 -5
  99. package/dist/{show.handler-Wmv0tkxx.mjs → show.handler-DB8xl5FU.mjs} +6 -6
  100. package/dist/{skill-installer-D6j9IA3Z.mjs → skill-installer-DuMhavmM.mjs} +3 -1
  101. package/dist/{skills-sync.handler-BAATdT6N.mjs → skills-sync.handler-BGs-_YD9.mjs} +13 -7
  102. package/dist/{skills.command-0-E8mcYE.mjs → skills.command-DUWn6FbL.mjs} +5 -5
  103. package/dist/skills.handler-DqLXJepA.mjs +9 -0
  104. package/dist/{spinner-progress-lrKDs4YF.mjs → spinner-progress-BYxlr3lY.mjs} +1 -1
  105. package/dist/status.handler-DAId4bVU.mjs +72 -0
  106. package/dist/{switch.handler-BwYndsP-.mjs → switch.handler-Cd4Yg2n8.mjs} +17 -4
  107. package/dist/{sync-6fZkIUtn.mjs → sync-DgC4lcxh.mjs} +2 -2
  108. package/dist/{sync.handler-Ctr-cN9X.mjs → sync.handler-Cm_WtGmH.mjs} +8 -8
  109. package/dist/{task-BWuIKWh4.mjs → task-DTvLzUkA.mjs} +2 -88
  110. package/dist/{task-target-build-QllcCfoN.mjs → task-target-build-CtvRyVjH.mjs} +5 -5
  111. package/dist/task-target-deploy-runner.mjs +6 -6
  112. package/dist/{test-C8VIZe9V.mjs → test-4V7nh67i.mjs} +5 -5
  113. package/dist/{test.handler-BCW0YBPd.mjs → test.handler-BdCYcwR4.mjs} +2 -2
  114. package/dist/{test.handler-DLaxrJ9V.mjs → test.handler-Bo4YTs2Z.mjs} +19 -16
  115. package/dist/{tool.handler-8qNmgdRe.mjs → tool.handler-CPCrSDq2.mjs} +12 -12
  116. package/dist/{trigger-artifacts-BcRScRSp-BiD2h6do.mjs → trigger-artifacts-BcRScRSp-BRpU-He5.mjs} +2 -2
  117. package/dist/{trigger-manifest-C07EM-b2.mjs → trigger-manifest-BVqjDhxU.mjs} +1 -1
  118. package/dist/{upgrade-DgOcc8IT.mjs → upgrade-2qUOcjxb.mjs} +4 -8
  119. package/dist/upgrade.handler-PqlKSuUE.mjs +99 -0
  120. package/dist/{upload.handler-B7xle1oX.mjs → upload.handler-CS-vLpzC.mjs} +9 -9
  121. package/dist/{users.get.handler-C4t1vXwi.mjs → users.get.handler-CH1c6Lnj.mjs} +4 -4
  122. package/dist/{users.list.handler-Dvl90grq.mjs → users.list.handler-CxbZFgjO.mjs} +4 -4
  123. package/dist/{users.set-role.handler-Djw1_VGf.mjs → users.set-role.handler-CBRE-Ws6.mjs} +4 -4
  124. package/dist/{validate.handler-Drf_lssw.mjs → validate.handler-1d-UmtXB.mjs} +171 -26
  125. package/dist/{workflow-build-Begvjfq8.mjs → workflow-build-Bm8JoVv4.mjs} +234 -32
  126. package/dist/{workflow-build-manifest-1sC52TIG.mjs → workflow-build-manifest-CV6bBmDO.mjs} +1 -1
  127. package/dist/{workflow-bundler-BzHk73PM-muPv1yGG.mjs → workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs} +15 -4
  128. package/dist/{workflows-DjMlxuBX.mjs → workflows-ny7rOdeH.mjs} +34 -37
  129. package/dist/{writer-byNNUjRm-B-on1n6c.mjs → writer-BLg0RuZa-Y6ExdYH9.mjs} +6 -4
  130. package/package.json +11 -11
  131. package/dist/current-deployment-workflow-B1VQCYC-.mjs +0 -94
  132. package/dist/current.handler-BaGaCLzB.mjs +0 -21
  133. package/dist/list.handler-BEMj3FyH.mjs +0 -76
  134. package/dist/list.handler-Cq_oQY5B.mjs +0 -52
  135. package/dist/list.handler-htR9TeiS.mjs +0 -24
  136. package/dist/package-manager-DT1EhOkS.mjs +0 -61
  137. package/dist/schemas-D2zfmyC-.mjs +0 -671
  138. package/dist/skills.handler-DYIQK0Vu.mjs +0 -9
  139. package/dist/status.handler-Ch_DtyBp.mjs +0 -109
  140. package/dist/upgrade.handler-DSZuw7-9.mjs +0 -80
  141. /package/dist/{build-metadata-BB_L45ZS-DSJL7dTy.mjs → build-metadata-BB_L45ZS-DRQsV6JK.mjs} +0 -0
  142. /package/dist/{deploy-DhCbYFc7.mjs → deploy-BiKBH25R.mjs} +0 -0
  143. /package/dist/{detect-env-access-CwkOYeYM-COq4U-4Y.mjs → detect-env-access-CwkOYeYM-r4aynBU0.mjs} +0 -0
  144. /package/dist/{read-credential-keys-77a91T8M-DGK5XTQp.mjs → read-credential-keys-77a91T8M-I07NYwfH.mjs} +0 -0
  145. /package/dist/{run-polling-fBouPjJ2.mjs → run-polling-1c0ckC1A.mjs} +0 -0
  146. /package/dist/{schemas-4Mq_bxob.mjs → schemas-8nhXlXWh.mjs} +0 -0
  147. /package/dist/{task-target-deploy-B_3HPSo2.mjs → task-target-deploy-m9LfE488.mjs} +0 -0
  148. /package/dist/{types-AlA-ifK9.mjs → types-Cb0eWmUU.mjs} +0 -0
@@ -1,30 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { D as CliExitError, a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
4
- import { i as projects } from "./dist-Dw7gCE7y.mjs";
3
+ import { N as throwReportedCliExit, k as CliExitError, p as ui, x as toErrorMessage } from "./keystroke.mjs";
4
+ import { i as projects } from "./dist-B5jy238v.mjs";
5
5
  import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
6
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
7
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-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";
6
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
7
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-ebZssGCY.mjs";
8
+ import { n as resolveWorkflowsDir } from "./resolve-project-DLKlAy0z.mjs";
9
+ import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-C6x65imE.mjs";
10
+ import { i as resolveWorkflowGlobals, o as validateInputOrExit, r as resolveRunInput, s as validateWorkflowGlobalsOrExit, t as pollForCompletion } from "./run-polling-C5fI7xTp.mjs";
11
+ import { n as assertAuthoredWorkflowId, t as WORKFLOW_ID_COMMANDS } from "./authored-workflow-ref-fkHEEVnd.mjs";
11
12
  //#region src/commands/workflows/run.handler.ts
12
13
  async function handleWorkflowsRun(options, ctx) {
13
14
  const client = requireClient(ctx);
14
- const projectId = await resolveProjectId(options, ctx);
15
+ const { projectId, authoredWorkflowId, workflowsDir } = await resolveRunWorkflowTarget(options, ctx);
15
16
  const input = await resolveRunInput(options);
16
17
  const globals = await resolveWorkflowGlobals(options);
17
- const deploymentLookup = await loadCurrentDeploymentWorkflow(client, {
18
+ const workflow = (await requireDeploymentWorkflowFound(await loadCurrentDeploymentWorkflow(client, {
18
19
  projectId,
19
- authoredWorkflowId: options.workflow
20
- });
21
- assertDeploymentWorkflowFound(deploymentLookup, options.workflow);
22
- const workflow = deploymentLookup.workflow;
20
+ authoredWorkflowId
21
+ }), {
22
+ authoredWorkflowId,
23
+ workflowsDir
24
+ })).workflow;
23
25
  const inputSchema = workflow.manifest.workflowSchemas.input;
24
- const validatedInput = isJsonObjectSchema(inputSchema) && inputSchema.type !== "unknown" ? validateInputOrExit(workflow.workflowName, input, inputSchema) : input;
26
+ const validatedInput = isJsonObjectSchema(inputSchema) && inputSchema.type !== "unknown" ? validateInputOrExit(authoredWorkflowId, input, inputSchema) : input;
25
27
  const globalsSchema = workflow.manifest.workflowGlobals;
26
28
  const validatedGlobals = resolveValidatedWorkflowGlobals({
27
- workflowName: workflow.workflowName,
29
+ authoredWorkflowId,
28
30
  schema: globalsSchema,
29
31
  globals
30
32
  });
@@ -62,18 +64,27 @@ async function handleWorkflowsRun(options, ctx) {
62
64
  }
63
65
  renderWaitResult(runId, snapshot, options.timeout);
64
66
  }
65
- async function resolveProjectId(options, ctx) {
66
- if (options.projectId) return options.projectId;
67
+ async function resolveRunWorkflowTarget(options, ctx) {
68
+ const authoredWorkflowId = options.workflow;
67
69
  const workflowsDir = await resolveWorkflowsDir(options.path);
68
- if (!workflowsDir) {
69
- ui.error("No keystroke.config.ts found in this directory or any parent directory.");
70
- ui.hint("Run inside a Keystroke project or pass --project-id <uuid>.");
71
- throwReportedCliExit("No keystroke.config.ts found");
70
+ if (workflowsDir) {
71
+ await assertAuthoredWorkflowId(authoredWorkflowId, workflowsDir, WORKFLOW_ID_COMMANDS.run);
72
+ const projectConfig = await assertWorkflowProjectRoot(workflowsDir);
73
+ await assertProjectConfigMatchesAuthenticatedOrg(requireClient(ctx), projectConfig);
74
+ projects.track(workflowsDir);
75
+ return {
76
+ projectId: options.projectId ?? projectConfig.projectId,
77
+ authoredWorkflowId,
78
+ workflowsDir
79
+ };
72
80
  }
73
- const projectConfig = await assertWorkflowProjectRoot(workflowsDir);
74
- await assertProjectConfigMatchesAuthenticatedOrg(requireClient(ctx), projectConfig);
75
- projects.track(workflowsDir);
76
- return projectConfig.projectId;
81
+ if (options.projectId) return {
82
+ projectId: options.projectId,
83
+ authoredWorkflowId
84
+ };
85
+ ui.error("No keystroke.config.ts found in this directory or any parent directory.");
86
+ ui.hint("Run inside a Keystroke project or pass --project-id <uuid>.");
87
+ throwReportedCliExit("No keystroke.config.ts found");
77
88
  }
78
89
  async function loadCurrentDeploymentWorkflow(client, params) {
79
90
  try {
@@ -83,17 +94,18 @@ async function loadCurrentDeploymentWorkflow(client, params) {
83
94
  throwReportedCliExit(`Failed to load current deployment workflow: ${toErrorMessage(error)}`, { cause: error });
84
95
  }
85
96
  }
86
- function assertDeploymentWorkflowFound(deploymentLookup, workflowRef) {
87
- if (deploymentLookup.status === "found") return;
97
+ async function requireDeploymentWorkflowFound(deploymentLookup, options) {
98
+ if (deploymentLookup.status === "found") return deploymentLookup;
88
99
  if (deploymentLookup.status === "missingCurrentDeployment") {
89
100
  ui.error("This project has no current deployment.");
90
101
  ui.hint("Run `keystroke deploy` to create the current deployment, then try again.");
91
102
  throwReportedCliExit("This project has no current deployment.");
92
103
  }
93
104
  if (deploymentLookup.status === "missingWorkflow") {
94
- ui.error(`Workflow "${workflowRef}" is not part of the current deployment.`);
105
+ if (options.workflowsDir) await assertAuthoredWorkflowId(options.authoredWorkflowId, options.workflowsDir, WORKFLOW_ID_COMMANDS.run, { refreshManifests: true });
106
+ ui.error(`Workflow "${options.authoredWorkflowId}" is not part of the current deployment.`);
95
107
  ui.hint("Run `keystroke deploy` to include it in the current deployment, then try again.");
96
- throwReportedCliExit(`Workflow "${workflowRef}" is not part of the current deployment.`);
108
+ throwReportedCliExit(`Workflow "${options.authoredWorkflowId}" is not part of the current deployment.`);
97
109
  }
98
110
  throw new Error(`Unhandled deployment lookup status: ${JSON.stringify(deploymentLookup)}`);
99
111
  }
@@ -103,7 +115,7 @@ function resolveValidatedWorkflowGlobals(params) {
103
115
  value: params.globals.value
104
116
  } : { shouldSend: false };
105
117
  const candidate = params.globals.value ?? {};
106
- const validated = validateWorkflowGlobalsOrExit(params.workflowName, candidate, params.schema);
118
+ const validated = validateWorkflowGlobalsOrExit(params.authoredWorkflowId, candidate, params.schema);
107
119
  if (params.globals.provided || Object.keys(validated).length > 0) return {
108
120
  shouldSend: true,
109
121
  value: validated
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui, j as throwReportedCliExit, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
4
- import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
5
- import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
6
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
3
+ import { N as throwReportedCliExit, n as style, p as ui, t as ANSI, x as toErrorMessage } from "./keystroke.mjs";
4
+ import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DnIFEmi5.mjs";
5
+ import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
6
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
7
7
  import { z } from "zod";
8
8
  //#region src/commands/runs/inspect-display.ts
9
9
  function renderRunInspect(input) {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui } from "./keystroke.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
4
  //#region src/lib/schema-display.ts
5
5
  /**
6
6
  * Returns true when the schema is the fallback "unknown" sentinel emitted
@@ -11,8 +11,9 @@ function isUnknownSchema(schema) {
11
11
  }
12
12
  /**
13
13
  * Generates a minimal placeholder JSON object for a given JSON Schema.
14
- * Walks `properties` recursively to produce sensible default values so the
15
- * user has a copy-pasteable `--input` example.
14
+ * Walks `properties` recursively to produce structural `--input` examples
15
+ * (required keys and rough types). Examples are not guaranteed to pass
16
+ * validation (e.g. minLength, format, unions, or const constraints).
16
17
  *
17
18
  * Examples:
18
19
  * { type: "number" } => 0
@@ -26,6 +27,26 @@ function generateExampleJson(schema) {
26
27
  if (schema == null || typeof schema !== "object") return null;
27
28
  return generateValue(schema);
28
29
  }
30
+ /**
31
+ * JSON string for a workflow `--input` value derived from the input schema.
32
+ * See {@link generateExampleJson} for placeholder semantics.
33
+ */
34
+ function formatExampleInputJson(inputSchema) {
35
+ if (inputSchema == null || typeof inputSchema !== "object" || isUnknownSchema(inputSchema)) return "{}";
36
+ const example = generateExampleJson(inputSchema);
37
+ return JSON.stringify(example ?? {});
38
+ }
39
+ /** Wraps a string in single quotes with POSIX-safe `'` escaping for shell snippets. */
40
+ function shellEscapeSingleQuoted(value) {
41
+ return `'${value.replace(/'/g, "'\"'\"'")}'`;
42
+ }
43
+ /** Shell-safe `--input '...'` flag generated from a workflow input JSON Schema. */
44
+ function formatWorkflowInputFlag(inputSchema) {
45
+ return `--input ${shellEscapeSingleQuoted(formatExampleInputJson(inputSchema))}`;
46
+ }
47
+ function formatWorkflowTestExampleCommand(authoredWorkflowId, inputSchema) {
48
+ return `$ keystroke workflows test ${authoredWorkflowId} ${formatWorkflowInputFlag(inputSchema)}`;
49
+ }
29
50
  function generateValue(schema) {
30
51
  if (Array.isArray(schema.enum) && schema.enum.length > 0) return schema.enum[0];
31
52
  switch (Array.isArray(schema.type) ? schema.type[0] : schema.type) {
@@ -105,12 +126,12 @@ function resolveTypeHint(fieldSchema) {
105
126
  /**
106
127
  * Formats a missing-required-fields error into a descriptive CLI message.
107
128
  */
108
- function formatMissingInputError(workflowName, missingFields, inputSchema) {
129
+ function formatMissingInputError(authoredWorkflowId, missingFields, inputSchema) {
109
130
  const lines = [];
110
- lines.push(`Missing required input for workflow "${workflowName}"\n`);
131
+ lines.push(`Missing required input for workflow "${authoredWorkflowId}"\n`);
111
132
  if (inputSchema == null || typeof inputSchema !== "object") {
112
133
  lines.push(" (input schema unavailable)\n");
113
- lines.push(` $ keystroke workflows test "${workflowName}" --input '{}'`);
134
+ lines.push(` ${formatWorkflowTestExampleCommand(authoredWorkflowId)}`);
114
135
  return lines.join("\n");
115
136
  }
116
137
  const properties = inputSchema.properties && typeof inputSchema.properties === "object" ? inputSchema.properties : {};
@@ -120,38 +141,24 @@ function formatMissingInputError(workflowName, missingFields, inputSchema) {
120
141
  lines.push(` ${field} (${typeHint}): Required`);
121
142
  }
122
143
  lines.push("");
123
- const exampleValue = generateExampleJson(inputSchema);
124
- const exampleJson = JSON.stringify(exampleValue);
125
144
  lines.push("Expected input:");
126
- lines.push(` $ keystroke workflows test "${workflowName}" --input '${exampleJson}'`);
145
+ lines.push(` ${formatWorkflowTestExampleCommand(authoredWorkflowId, inputSchema)}`);
127
146
  return lines.join("\n");
128
147
  }
129
148
  /**
130
149
  * Formats validation issues into a descriptive CLI message.
131
- *
132
- * Example output:
133
- *
134
- * Invalid input for workflow "Addition"
135
- *
136
- * num: Required
137
- * num2: Required
138
- *
139
- * Expected input:
140
- * $ keystroke workflows test "Addition" --input '{"num":0,"num2":0}'
141
150
  */
142
- function formatValidationError(workflowName, issues, inputSchema) {
151
+ function formatValidationError(authoredWorkflowId, issues, inputSchema) {
143
152
  const lines = [];
144
- lines.push(`Invalid input for workflow "${workflowName}"\n`);
153
+ lines.push(`Invalid input for workflow "${authoredWorkflowId}"\n`);
145
154
  for (const issue of issues) {
146
155
  const fieldPath = issue.path.length === 0 || issue.path.length === 1 && issue.path[0] === "" ? "(root)" : issue.path.join(".");
147
156
  lines.push(` ${fieldPath}: ${issue.message}`);
148
157
  }
149
158
  lines.push("");
150
- const exampleValue = inputSchema != null && typeof inputSchema === "object" ? generateExampleJson(inputSchema) : null;
151
- const exampleJson = JSON.stringify(exampleValue);
152
- lines.push(`Expected input:`);
153
- lines.push(` $ keystroke workflows test "${workflowName}" --input '${exampleJson}'`);
159
+ lines.push("Expected input:");
160
+ lines.push(` ${formatWorkflowTestExampleCommand(authoredWorkflowId, inputSchema)}`);
154
161
  return lines.join("\n");
155
162
  }
156
163
  //#endregion
157
- export { resolveTypeHint as a, renderJsonSchema as i, formatValidationError as n, validateRequiredFields as o, isUnknownSchema as r, formatMissingInputError as t };
164
+ export { isUnknownSchema as a, validateRequiredFields as c, formatWorkflowInputFlag as i, formatMissingInputError as n, renderJsonSchema as o, formatValidationError as r, resolveTypeHint as s, formatExampleInputJson as t };
@@ -0,0 +1,281 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { z } from "zod";
4
+ //#region ../../packages/core/src/shared/schema.ts
5
+ const MAX_JSON_DEPTH = 20;
6
+ function buildJsonValueSchema(depth) {
7
+ const primitives = z.union([
8
+ z.string(),
9
+ z.number(),
10
+ z.boolean(),
11
+ z.null()
12
+ ]);
13
+ if (depth <= 0) return primitives;
14
+ const nested = buildJsonValueSchema(depth - 1);
15
+ return z.union([
16
+ primitives,
17
+ z.array(nested),
18
+ z.record(z.string(), nested)
19
+ ]);
20
+ }
21
+ const jsonValueSchema = buildJsonValueSchema(MAX_JSON_DEPTH);
22
+ const jsonSchemaObject = z.record(z.string(), jsonValueSchema);
23
+ const anyZodSchemaSchema = z.custom((value) => value instanceof z.ZodType, "Expected a Zod schema");
24
+ const zodObjectSchema = z.custom((value) => value instanceof z.ZodObject, "Expected a Zod object schema");
25
+ /**
26
+ * Creates a Zod schema that validates an object structurally by checking
27
+ * for required properties. This avoids `instanceof` checks which fail
28
+ * when class definitions are duplicated across bundle boundaries.
29
+ */
30
+ function createStructuralSchema(requiredKeys, label) {
31
+ return z.custom((value) => value != null && (typeof value === "object" || typeof value === "function") && requiredKeys.every((key) => key in value), `Expected ${label}`);
32
+ }
33
+ function trimmedNonEmptyString(fieldName) {
34
+ return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(255, { error: `${fieldName} cannot exceed 255 characters` });
35
+ }
36
+ /** Trimmed string with at least one character; no upper length limit. */
37
+ function trimmedNonEmptyStringUnbounded(fieldName) {
38
+ return z.string().trim().min(1, { error: `${fieldName} cannot be empty` });
39
+ }
40
+ /**
41
+ * Non-empty trimmed string restricted to URL-safe characters.
42
+ * Use for IDs (workflow, step, etc.) that must be safe in URLs, env vars, and as object keys.
43
+ */
44
+ function idNoSpacesString(fieldName) {
45
+ return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(255, { error: `${fieldName} cannot exceed 255 characters` }).refine((s) => /^[a-zA-Z0-9_-]+$/.test(s), { error: `${fieldName} must only contain letters, numbers, hyphens, and underscores` });
46
+ }
47
+ /**
48
+ * Non-empty trimmed string for credential definition ids.
49
+ * Allows namespaced ids such as `keystroke:slack` plus letters, numbers,
50
+ * hyphens, and underscores.
51
+ */
52
+ function credentialSetIdString(fieldName) {
53
+ return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(255, { error: `${fieldName} cannot exceed 255 characters` }).refine((s) => /^[a-zA-Z0-9_:-]+$/.test(s), { error: `${fieldName} must only contain letters, numbers, hyphens, underscores, and colons` });
54
+ }
55
+ function optionalTrimmedNonEmptyString(fieldName) {
56
+ return trimmedNonEmptyString(fieldName).optional();
57
+ }
58
+ function descriptionString(fieldName) {
59
+ return z.string().trim().min(1, { error: `${fieldName} cannot be empty` }).max(1024, { error: `${fieldName} cannot exceed 1024 characters` });
60
+ }
61
+ function optionalDescriptionString(fieldName) {
62
+ return descriptionString(fieldName).optional();
63
+ }
64
+ //#endregion
65
+ //#region ../../packages/core/src/credential-set/constants.ts
66
+ /**
67
+ * Shared constants for the credential/connection system.
68
+ * Defined in core (bottom of dependency chain) so all packages can import them.
69
+ */
70
+ const CREDENTIAL_EXPOSURES = {
71
+ "user-runtime": "user-runtime",
72
+ "platform-only": "platform-only"
73
+ };
74
+ //#endregion
75
+ //#region ../../packages/core/src/credential-set/schemas.ts
76
+ const credentialSetProxyInjectionSchema = z.object({
77
+ /** Substitute placeholder in HTTP headers (default: true). */
78
+ headers: z.boolean().optional(),
79
+ /** Substitute placeholder in the HTTP Basic Auth credential (default: true). */
80
+ basicAuth: z.boolean().optional(),
81
+ /** Substitute placeholder in URL query params (default: false).
82
+ * Use for APIs that authenticate via `?api_key=...` (Google Maps, OWM, etc.). */
83
+ queryParams: z.boolean().optional(),
84
+ /** Substitute placeholder in the HTTP request body (default: false).
85
+ * Use for form-encoded auth payloads (Stripe, AWS SigV4 query, etc.). */
86
+ body: z.boolean().optional()
87
+ });
88
+ const credentialSetProxyConfigSchema = z.object({
89
+ /** Exact-match host allowlist (forwarded to SecretBuilder.allowHost). */
90
+ hosts: z.array(z.string().min(1)).optional(),
91
+ /** Wildcard host allowlist (forwarded to SecretBuilder.allowHostPattern).
92
+ * Example: `["*.browserbase.com"]` covers any subdomain. */
93
+ hostPatterns: z.array(z.string().min(1)).optional(),
94
+ /** Per-scope substitution toggles. Omit to use SDK defaults. */
95
+ injection: credentialSetProxyInjectionSchema.optional()
96
+ });
97
+ const onCredentialRevokedSchema = z.enum(["fail", "retry-once"]);
98
+ const credentialExposureSchema = z.enum([CREDENTIAL_EXPOSURES["user-runtime"], CREDENTIAL_EXPOSURES["platform-only"]]);
99
+ const connectionMetadataConfigSchema = z.object({
100
+ id: credentialSetIdString("Credential connection id").optional(),
101
+ label: optionalTrimmedNonEmptyString("Credential connection label"),
102
+ description: optionalDescriptionString("Credential connection description"),
103
+ recommended: z.boolean().optional(),
104
+ advanced: z.boolean().optional(),
105
+ needsRawSecret: z.boolean().optional()
106
+ });
107
+ const connectionMetadataManifestSchema = connectionMetadataConfigSchema;
108
+ const registeredDescriptorSchema = z.object({
109
+ id: trimmedNonEmptyString("Registered descriptor id"),
110
+ config: z.record(z.string(), z.unknown()).optional()
111
+ });
112
+ const registeredResolverDescriptorSchema = registeredDescriptorSchema.extend({ cacheMs: z.number().int().nonnegative().optional() });
113
+ const manualConnectionConfigSchema = connectionMetadataConfigSchema.extend({
114
+ kind: z.literal("manual"),
115
+ input: zodObjectSchema.optional(),
116
+ instructions: z.string().min(1).optional(),
117
+ validate: z.function().optional()
118
+ });
119
+ const manualConnectionFieldManifestSchema = z.object({
120
+ key: z.string().min(1),
121
+ label: z.string().min(1),
122
+ description: z.string().min(1).optional(),
123
+ optional: z.boolean(),
124
+ secret: z.literal(true)
125
+ });
126
+ const manualConnectionConfigManifestSchema = connectionMetadataManifestSchema.extend({
127
+ kind: z.literal("manual"),
128
+ input: jsonSchemaObject.optional(),
129
+ fields: z.array(manualConnectionFieldManifestSchema).optional(),
130
+ generated: z.boolean().optional(),
131
+ instructions: z.string().min(1).optional()
132
+ });
133
+ /** Declarative form of `Vault` — strings typed against the credential set's
134
+ * stored/auth schema keys at the {@link CredentialSetConfig} boundary; the Zod
135
+ * schema here enforces non-empty strings only. `CredentialSet` itself performs
136
+ * the schema-key membership check at construction time. */
137
+ const vaultMappingSchema = z.object({
138
+ accessToken: z.string().min(1),
139
+ refreshToken: z.string().min(1).optional(),
140
+ instanceUrl: z.string().min(1).optional(),
141
+ raw: z.record(z.string().min(1), z.string().min(1)).optional()
142
+ });
143
+ /** Function form of `Vault` — an object pairing the access-token vault key
144
+ * (`accessTokenKey`) with the `build` function that computes the full vault
145
+ * write map. The explicit key keeps the disconnect path's revocation read
146
+ * reliable even when `build` transforms the access token. */
147
+ const vaultMappingFnSchema = z.object({
148
+ accessTokenKey: z.string().min(1),
149
+ build: z.custom((val) => typeof val === "function", { message: "vault.build must be a function." })
150
+ });
151
+ /** Runtime shape of `Vault`. Accepts either the declarative mapping or the
152
+ * function-form object `{ accessTokenKey, build }`. */
153
+ const vaultConfigSchema = z.union([vaultMappingSchema, vaultMappingFnSchema], { error: "vault must be a declarative mapping object or a `{ accessTokenKey, build }` object." });
154
+ /** Manifest projection of `Vault` — declarative mappings serialize verbatim;
155
+ * function-form mappings serialize as `{ kind: 'function', accessTokenKey }`
156
+ * since closures are not manifest-safe but the access-token key is. */
157
+ const vaultManifestSchema = z.discriminatedUnion("kind", [z.object({
158
+ kind: z.literal("declarative"),
159
+ accessToken: z.string().min(1),
160
+ refreshToken: z.string().min(1).optional(),
161
+ instanceUrl: z.string().min(1).optional(),
162
+ raw: z.record(z.string().min(1), z.string().min(1)).optional()
163
+ }), z.object({
164
+ kind: z.literal("function"),
165
+ accessTokenKey: z.string().min(1)
166
+ })]);
167
+ const oauthConnectionConfigBaseSchema = z.object({
168
+ kind: z.literal("oauth"),
169
+ authUrl: z.string().url(),
170
+ tokenUrl: z.string().url(),
171
+ scopes: z.array(z.string()).readonly(),
172
+ revokeUrl: z.string().url().nullable().optional(),
173
+ tokenType: z.enum(["long-lived", "refreshable"]),
174
+ pkce: z.boolean().optional(),
175
+ /** Fallback token lifetime when the provider omits `expires_in`. Positive
176
+ * integer seconds. Shared between config + manifest schemas (both extend
177
+ * this base). */
178
+ defaultExpiresInSeconds: z.number().int().positive().optional()
179
+ });
180
+ const oauthConnectionConfigSchema = oauthConnectionConfigBaseSchema.extend({
181
+ ...connectionMetadataConfigSchema.shape,
182
+ vault: vaultConfigSchema,
183
+ oauth: registeredDescriptorSchema.optional(),
184
+ buildAuthUrl: z.function().optional(),
185
+ exchangeCode: z.function().optional(),
186
+ refreshToken: z.function().optional(),
187
+ extractInstallationInfo: z.function().optional(),
188
+ validate: z.function().optional()
189
+ });
190
+ const oauthConnectionConfigManifestSchema = oauthConnectionConfigBaseSchema.extend({
191
+ ...connectionMetadataManifestSchema.shape,
192
+ vault: vaultManifestSchema,
193
+ oauth: registeredDescriptorSchema.optional()
194
+ });
195
+ const credentialsExchangeConnectionConfigSchema = connectionMetadataConfigSchema.extend({
196
+ kind: z.literal("credentials-exchange"),
197
+ instructions: z.string().min(1).optional(),
198
+ input: zodObjectSchema
199
+ }).extend({
200
+ exchange: z.function(),
201
+ rotate: z.function().optional(),
202
+ validate: z.function().optional()
203
+ });
204
+ /** Manifest projection of `CredentialsExchangeConnectionConfig` — only the
205
+ * declarative `input` schema (rendered as JSON Schema) and `instructions`
206
+ * copy survive serialization. The three hooks (`exchange`, `rotate`,
207
+ * `validate`) are runtime closures and are stripped. */
208
+ const credentialsExchangeConnectionConfigManifestSchema = z.object({
209
+ kind: z.literal("credentials-exchange"),
210
+ ...connectionMetadataManifestSchema.shape,
211
+ instructions: z.string().min(1).optional(),
212
+ input: jsonSchemaObject
213
+ });
214
+ const exchangeCredentialConnectionConfigSchema = connectionMetadataConfigSchema.extend({
215
+ kind: z.literal("exchange"),
216
+ input: zodObjectSchema,
217
+ exchange: registeredDescriptorSchema
218
+ });
219
+ const exchangeCredentialConnectionManifestSchema = connectionMetadataManifestSchema.extend({
220
+ kind: z.literal("exchange"),
221
+ input: jsonSchemaObject,
222
+ exchange: registeredDescriptorSchema
223
+ });
224
+ const dynamicCredentialConnectionConfigSchema = connectionMetadataConfigSchema.extend({
225
+ kind: z.literal("dynamic"),
226
+ input: zodObjectSchema.optional(),
227
+ resolver: registeredResolverDescriptorSchema
228
+ });
229
+ const dynamicCredentialConnectionManifestSchema = connectionMetadataManifestSchema.extend({
230
+ kind: z.literal("dynamic"),
231
+ input: jsonSchemaObject.optional(),
232
+ resolver: registeredResolverDescriptorSchema
233
+ });
234
+ const platformCredentialConnectionConfigSchema = connectionMetadataConfigSchema.extend({ kind: z.literal("platform") });
235
+ const platformCredentialConnectionManifestSchema = connectionMetadataManifestSchema.extend({ kind: z.literal("platform") });
236
+ const connectionConfigSchema = z.discriminatedUnion("kind", [
237
+ manualConnectionConfigSchema,
238
+ oauthConnectionConfigSchema,
239
+ credentialsExchangeConnectionConfigSchema,
240
+ exchangeCredentialConnectionConfigSchema,
241
+ dynamicCredentialConnectionConfigSchema,
242
+ platformCredentialConnectionConfigSchema
243
+ ]);
244
+ /** Manifest projection of `ConnectionConfig` — declarative metadata only. */
245
+ const connectionConfigManifestSchema = z.discriminatedUnion("kind", [
246
+ manualConnectionConfigManifestSchema,
247
+ oauthConnectionConfigManifestSchema,
248
+ credentialsExchangeConnectionConfigManifestSchema,
249
+ exchangeCredentialConnectionManifestSchema,
250
+ dynamicCredentialConnectionManifestSchema,
251
+ platformCredentialConnectionManifestSchema
252
+ ]);
253
+ const CredentialSetManifestSchema = z.object({
254
+ manifestVersion: z.literal(1),
255
+ type: z.literal("credentialSet"),
256
+ id: credentialSetIdString("Credential set id"),
257
+ name: trimmedNonEmptyString("Credential set name"),
258
+ description: optionalDescriptionString("Credential set description"),
259
+ auth: jsonSchemaObject,
260
+ exposure: credentialExposureSchema.optional(),
261
+ proxy: credentialSetProxyConfigSchema.optional(),
262
+ /** When true, resolved values are passed into execution as raw secrets (no ref-token proxy). */
263
+ needsRawSecret: z.boolean().optional(),
264
+ /** Policy when a step throws `CredentialRevokedError` against this credential set. */
265
+ onCredentialRevoked: onCredentialRevokedSchema.optional(),
266
+ connections: z.array(connectionConfigManifestSchema).optional()
267
+ });
268
+ z.object({
269
+ id: credentialSetIdString("Credential set id"),
270
+ name: optionalTrimmedNonEmptyString("Credential set name"),
271
+ description: optionalDescriptionString("Credential set description"),
272
+ auth: zodObjectSchema,
273
+ exposure: credentialExposureSchema.optional(),
274
+ proxy: credentialSetProxyConfigSchema.optional(),
275
+ /** When true, resolved values are passed into execution as raw secrets (no ref-token proxy). */
276
+ needsRawSecret: z.boolean().optional(),
277
+ onCredentialRevoked: onCredentialRevokedSchema.optional(),
278
+ connections: z.array(connectionConfigSchema).readonly().optional()
279
+ });
280
+ //#endregion
281
+ export { descriptionString as a, optionalDescriptionString as c, trimmedNonEmptyStringUnbounded as d, createStructuralSchema as i, optionalTrimmedNonEmptyString as l, credentialSetProxyConfigSchema as n, idNoSpacesString as o, anyZodSchemaSchema as r, jsonSchemaObject as s, CredentialSetManifestSchema as t, trimmedNonEmptyString as u };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-BWcVRt-T.mjs";
4
- import { t as createTypedCommand } from "./commander-BlrSdFcu.mjs";
3
+ import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-DnIFEmi5.mjs";
4
+ import { t as createTypedCommand } from "./commander-C6SSTQJ2.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/search/search.command.ts
7
7
  const SearchTypeValues = [
@@ -46,7 +46,7 @@ function createSearchCommand() {
46
46
  description: "Search query (matches name and related fields per --type)",
47
47
  key: "query"
48
48
  },
49
- loadHandler: async () => (await import("./search.handler-V7ObLGjN.mjs")).handleSearch
49
+ loadHandler: async () => (await import("./search.handler-BJ-ZlDL4.mjs")).handleSearch
50
50
  });
51
51
  }
52
52
  //#endregion
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { t as renderCredential } from "./render-credential-Bn15FEUC.mjs";
7
- import { n as formatPackageInstallCommand, t as detectPackageManager } from "./package-manager-DT1EhOkS.mjs";
8
- import { t as renderOperation } from "./render-operation-Bc7Wu1sP.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { t as renderCredential } from "./render-credential-D-H1ECDt.mjs";
7
+ import { i as formatPackageInstallCommand, r as detectPackageManager } from "./package-manager-BP3-q8hh.mjs";
8
+ import { t as renderOperation } from "./render-operation-VdEPhoII.mjs";
9
9
  //#region src/lib/render-integration.ts
10
10
  function renderIntegration(i, { full = false, packageManager } = {}) {
11
11
  ui.br();
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { n as formatPackageInstallCommand, t as detectPackageManager } from "./package-manager-DT1EhOkS.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { i as formatPackageInstallCommand, r as detectPackageManager } from "./package-manager-BP3-q8hh.mjs";
7
7
  //#region src/commands/integrations/show.handler.ts
8
8
  async function handleIntegrationShow(options, ctx) {
9
9
  const client = requireClient(ctx);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { i as renderJsonSchema } from "./schema-display-FvI8QjOQ.mjs";
7
- import { t as renderCredential } from "./render-credential-Bn15FEUC.mjs";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { o as renderJsonSchema } from "./schema-display-sZ6ConJd.mjs";
7
+ import { t as renderCredential } from "./render-credential-D-H1ECDt.mjs";
8
8
  //#region src/commands/credentials/definitions/show.handler.ts
9
9
  async function handleCredentialDefinitionShow(options, ctx) {
10
10
  const { credential } = await requireClient(ctx).credentials.definitions.get(options.id);
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as ui } from "./keystroke.mjs";
4
- import { i as writeJson } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-sgKhRc5v.mjs";
6
- import { i as 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";
3
+ import { p as ui } from "./keystroke.mjs";
4
+ import { i as writeJson } from "./output-DnIFEmi5.mjs";
5
+ import { i as requireClient } from "./context-ebZssGCY.mjs";
6
+ import { o as renderJsonSchema } from "./schema-display-sZ6ConJd.mjs";
7
+ import { r as detectPackageManager } from "./package-manager-BP3-q8hh.mjs";
8
+ import { t as renderOperation } from "./render-operation-VdEPhoII.mjs";
9
9
  //#region src/commands/operations/show.handler.ts
10
10
  async function handleOperationShow(options, ctx) {
11
11
  const { operation } = await requireClient(ctx).operations.get(options.id);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { D as CliExitError, a as ui } from "./keystroke.mjs";
3
+ import { k as CliExitError, p as ui } from "./keystroke.mjs";
4
4
  import { createRequire } from "node:module";
5
5
  import path from "node:path";
6
6
  import { access, cp, mkdir, readFile, readdir, rm, symlink, writeFile } from "node:fs/promises";
@@ -487,6 +487,8 @@ async function resolveSkillInstallChoices(options) {
487
487
  //#region src/lib/skill-installer/summary.ts
488
488
  function summarizeSkillInstall(result, verb) {
489
489
  ui.success(`${verb} ${result.skills.length} Keystroke skill(s) to ${result.canonicalDir}: ${result.skills.join(", ")}`);
490
+ const universalCanonicalAgents = result.agentTargets.filter((target) => target.slug !== "universal" && target.action === "canonical");
491
+ if (universalCanonicalAgents.length > 0) ui.hint(`${universalCanonicalAgents.map((target) => target.label).join(", ")} read skills from ${result.canonicalDir} (no separate agent skill folder).`);
490
492
  const additionalTargets = result.agentTargets.filter((target) => target.action !== "canonical");
491
493
  if (additionalTargets.length > 0) ui.success(`Provisioned ${additionalTargets.length} agent target(s): ${additionalTargets.map((target) => `${target.label} (${target.path}, ${target.action})`).join(", ")}`);
492
494
  const changedGuidance = result.guidanceFiles.filter((file) => file.action !== "skipped");