@keystrokehq/cli 0.0.18 → 0.0.19

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 (95) hide show
  1. package/README.md +1 -1
  2. package/dist/{accept.handler-B7QzdKCh.mjs → accept.handler-BVmNNAgL.mjs} +1 -1
  3. package/dist/{admin-CYpulx_A.mjs → admin-DQlHFuXn.mjs} +9 -9
  4. package/dist/{agents-Co6Jy_N8.mjs → agents-Dd7UeQCw.mjs} +3 -3
  5. package/dist/{api-keys-BUCLzRv_.mjs → api-keys-BsMBFiD_.mjs} +5 -5
  6. package/dist/{api-DsK8M-ZH.mjs → api-nR61stdq.mjs} +3 -4
  7. package/dist/{auth-niNm-yNT.mjs → auth-ZTuuEoD6.mjs} +5 -5
  8. package/dist/{auth.handler-BTH-Qb00.mjs → auth.handler-C1dZBdaG.mjs} +2 -2
  9. package/dist/{build-tasks-GVuMLS0h-CCxCqd02.mjs → build-tasks-GVuMLS0h-BaPhhGXO.mjs} +1 -1
  10. package/dist/{build-workflows-CV4tBo6S-DhFBlp6m.mjs → build-workflows-CV4tBo6S-szwrAGWT.mjs} +3 -3
  11. package/dist/{build.handler-BmlXPhed.mjs → build.handler-DJrEMCBw.mjs} +1 -1
  12. package/dist/{clear.handler-BDlwBzX4.mjs → clear.handler-BgeAg2de.mjs} +1 -1
  13. package/dist/{commander-BE37hxR3.mjs → commander-C5qcOo8m.mjs} +1 -1
  14. package/dist/{connect-C9NMD8Ky.mjs → connect-BtBKoXpi.mjs} +2 -2
  15. package/dist/{connect.handler-C7kysvhz.mjs → connect.handler-E8CmLRSF.mjs} +2 -2
  16. package/dist/{context-Bid-Rqj7.mjs → context-BydAGTiB.mjs} +1 -1
  17. package/dist/{create.handler-Cp9CV6SN.mjs → create.handler-CBxIPC3r.mjs} +1 -1
  18. package/dist/{credential-requirements-DrrQ9x9P.mjs → credential-requirements-Ob-7H-0F.mjs} +1 -1
  19. package/dist/{credentials-fMfKVlEn.mjs → credentials-BGaRMclS.mjs} +5 -5
  20. package/dist/{credentials-DUkVbhvj.mjs → credentials-jRiXEr6P.mjs} +1 -1
  21. package/dist/{current-deployment-workflow-DiwUcKoB.mjs → current-deployment-workflow-BVliROAz.mjs} +2 -2
  22. package/dist/{current.handler-eCR4nClu.mjs → current.handler-DBl9S67d.mjs} +1 -1
  23. package/dist/{default-urls-CTQqM1_A.mjs → default-urls-BoSm4s9C.mjs} +1 -1
  24. package/dist/{delete.handler-D4ElSAcr.mjs → delete.handler-Buu7Ip0D.mjs} +1 -1
  25. package/dist/{deploy-DyZh--f7.mjs → deploy-BPDUTKZD.mjs} +1 -1
  26. package/dist/{deploy-B7LRWcp6.mjs → deploy-CzTlgAFj.mjs} +2 -2
  27. package/dist/{deploy.handler-DVnH-Niv.mjs → deploy.handler-CCcJ7y3A.mjs} +9 -9
  28. package/dist/{diff.handler-lIA2pRBX.mjs → diff.handler-DUVFixeG.mjs} +2 -2
  29. package/dist/{dist-WFPTDQB3.mjs → dist-Cx0RV8s7.mjs} +4 -4
  30. package/dist/{env.handler-BIzQLlmo.mjs → env.handler-C8kNFz2U.mjs} +4 -4
  31. package/dist/{import-module--8x5SLum-D7EiPjwl.mjs → import-module--8x5SLum-DjPUZr4i.mjs} +9 -8
  32. package/dist/{init-jaqNLGmB.mjs → init-DeeOVc9m.mjs} +2 -2
  33. package/dist/{init.handler-DamvbPEw.mjs → init.handler-BMdhpusQ.mjs} +1 -1
  34. package/dist/{inspect.handler-_UcN7dxE.mjs → inspect.handler-QyTo8rWO.mjs} +2 -2
  35. package/dist/{integration-catalog-m8tj_XlD.mjs → integration-catalog-CmvYPvI6.mjs} +1 -1
  36. package/dist/integrations-tXZM-84g.mjs +185 -0
  37. package/dist/{invites-VntHNMYk.mjs → invites-ClyAatBW.mjs} +4 -4
  38. package/dist/{invites.list.handler-CPl4QHfc.mjs → invites.list.handler-CPkK_tPM.mjs} +1 -1
  39. package/dist/{invites.resend.handler-BAtb3AX4.mjs → invites.resend.handler-DIRI7tS2.mjs} +1 -1
  40. package/dist/{invites.revoke.handler-qXOF1Vgx.mjs → invites.revoke.handler-CcXcDBlU.mjs} +1 -1
  41. package/dist/keystroke.mjs +25 -24
  42. package/dist/{list-enrichment-DYvr3XDb.mjs → list-enrichment-B9238wom.mjs} +1 -1
  43. package/dist/{list.handler-BdRsjRlf.mjs → list.handler-BB-Dcm5B.mjs} +1 -1
  44. package/dist/{list.handler-C_iBLBmS.mjs → list.handler-Cbc9rlBx.mjs} +1 -1
  45. package/dist/{list.handler-CEjKSezx.mjs → list.handler-ClPAPSWm.mjs} +2 -2
  46. package/dist/{list.handler-pHnPFep8.mjs → list.handler-DdFGHkqt.mjs} +3 -3
  47. package/dist/{list.handler-DUz1bJ4x.mjs → list.handler-Xl_F89kq.mjs} +1 -1
  48. package/dist/{list.handler-CJUFdmaU.mjs → list.handler-tnsRn-Rj.mjs} +1 -1
  49. package/dist/{listen-DLGZEQRL.mjs → listen-ksMVpdNa.mjs} +2 -2
  50. package/dist/{listen.handler-kaAvYk-B.mjs → listen.handler-DEJSBg8y.mjs} +1 -1
  51. package/dist/{logs-CcYqFKRU.mjs → logs-C-JxXsgc.mjs} +1 -1
  52. package/dist/{logs.handler-lboRKNoE.mjs → logs.handler-BIegqc2p.mjs} +1 -1
  53. package/dist/{members.add.handler-DBydP0SR.mjs → members.add.handler-D4ggN2Xi.mjs} +1 -1
  54. package/dist/{members.invite.handler-D4-7fiYC.mjs → members.invite.handler-BYIt6Oib.mjs} +1 -1
  55. package/dist/{members.list.handler-Z4cIbcNg.mjs → members.list.handler-CvpeYKC4.mjs} +1 -1
  56. package/dist/{members.remove.handler-J56D83O7.mjs → members.remove.handler-C4GBUVYE.mjs} +1 -1
  57. package/dist/{members.update.handler-B5rBv6dt.mjs → members.update.handler-TpM1oi0L.mjs} +1 -1
  58. package/dist/{org-DGS91uc-.mjs → org-DIGyb7XZ.mjs} +15 -15
  59. package/dist/{orgs.create.handler-B4naNUSN.mjs → orgs.create.handler-RIYhse_Q.mjs} +1 -1
  60. package/dist/{orgs.get.handler-Ci_JrT08.mjs → orgs.get.handler-BfOpbSom.mjs} +1 -1
  61. package/dist/{orgs.list.handler-CJ2byIEj.mjs → orgs.list.handler-BMgj9yTD.mjs} +1 -1
  62. package/dist/{paused.handler-BQSQvQhB.mjs → paused.handler-DAZ1EaLN.mjs} +1 -1
  63. package/dist/{projects-fWvIJQ80.mjs → projects-BndElPAx.mjs} +4 -2
  64. package/dist/{projects-D90_uEC2.mjs → projects-Cy6CH3fI.mjs} +1 -1
  65. package/dist/{register.handler-CleQJhtQ.mjs → register.handler-BXeh5mdb.mjs} +18 -9
  66. package/dist/{requirements.handler-B51sxQSy.mjs → requirements.handler-C5vobjdJ.mjs} +3 -3
  67. package/dist/{run-polling-CC6y2XXI.mjs → run-polling-BhOdFyh3.mjs} +1 -1
  68. package/dist/{run.handler-B31BpZJP.mjs → run.handler-BpLmwF_a.mjs} +3 -3
  69. package/dist/{runs-Bg_qDeQi.mjs → runs-DaSd4eXn.mjs} +2 -2
  70. package/dist/{schemas-B8c7Z5Iy.mjs → schemas-BxFPUGWT.mjs} +3 -2
  71. package/dist/{skills.command-JwKWpGvU.mjs → skills.command-DQc_qGAF.mjs} +1 -1
  72. package/dist/{src-B0tNjKMg.mjs → src-0XVwHXNp.mjs} +1 -1
  73. package/dist/{switch.handler-Cu81T2HY.mjs → switch.handler-CCjMrRZN.mjs} +1 -1
  74. package/dist/{sync-CXNveL61.mjs → sync-BdTQDZjP.mjs} +2 -2
  75. package/dist/{sync.handler-7g1yDt0H.mjs → sync.handler-DjY8nqbB.mjs} +3 -3
  76. package/dist/{task-BguWXIiH.mjs → task-BRmL2lmw.mjs} +1 -1
  77. package/dist/{task-target-build-BaMtXnN7.mjs → task-target-build-DCV0UDaz.mjs} +1 -1
  78. package/dist/task-target-deploy-runner.mjs +5 -5
  79. package/dist/{test-A5hz3c7j.mjs → test-TTQXrhHm.mjs} +2 -2
  80. package/dist/{test.handler-CJtaMZVy.mjs → test.handler-B7Ahe9ta.mjs} +4 -4
  81. package/dist/{test.handler-Cq2l7SAr.mjs → test.handler-CkkplyX6.mjs} +1 -1
  82. package/dist/{tool.handler-B-mOL128.mjs → tool.handler-DMfFZCRg.mjs} +5 -5
  83. package/dist/{trigger-manifest-Bq2zRbkV.mjs → trigger-manifest-DxdCjGz_.mjs} +1 -1
  84. package/dist/{upgrade-DhfpoyRV.mjs → upgrade-Cx-bUWUc.mjs} +1 -1
  85. package/dist/{upload.handler-D3-W_1kq.mjs → upload.handler-_d2WZwxd.mjs} +4 -4
  86. package/dist/{users.get.handler-Bd0OBI-E.mjs → users.get.handler-DIooG7Wy.mjs} +1 -1
  87. package/dist/{users.list.handler-CacJz6eC.mjs → users.list.handler-DdGW-DSg.mjs} +1 -1
  88. package/dist/{users.set-role.handler-bZMQtUR0.mjs → users.set-role.handler-Ek-kntLp.mjs} +1 -1
  89. package/dist/{validate.handler-Ccq66ki4.mjs → validate.handler-Cq2uJjXY.mjs} +1 -1
  90. package/dist/{workflow-build-_WNsLKwW.mjs → workflow-build-C8AiYxqp.mjs} +7 -7
  91. package/dist/{workflow-build-manifest-B2GqHyWE.mjs → workflow-build-manifest-BKKW9D05.mjs} +1 -1
  92. package/dist/{workflows-Dy2M9bEr.mjs → workflows-K6zetcqI.mjs} +14 -14
  93. package/dist/{writer-B-SpZ0G2-tq1MFgid.mjs → writer-B-SpZ0G2-CLh7sXRd.mjs} +1 -1
  94. package/package.json +3 -3
  95. package/dist/integrations-DRL3JmC8.mjs +0 -85
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as findProjectRoot } from "./project-config-DudGRFPO.mjs";
4
- import { c as optionalDescriptionString$1, i as createStructuralSchema$1, l as optionalTrimmedNonEmptyString$1, o as idNoSpacesString, r as anyZodSchemaSchema$1, s as jsonSchemaObject$1, t as CredentialSetManifestSchema$1, u as trimmedNonEmptyString$1 } from "./schemas-B8c7Z5Iy.mjs";
5
- import { n as DeclaredCredentialRequirementSchema } from "./credential-requirements-DrrQ9x9P.mjs";
6
- import { a as FlowGraphSchema, i as WorkflowCoreManifestSchema, n as WORKFLOW_MANIFEST_SCHEMA_VERSION } from "./workflow-build-manifest-B2GqHyWE.mjs";
4
+ import { c as optionalDescriptionString$1, i as createStructuralSchema$1, l as optionalTrimmedNonEmptyString$1, o as idNoSpacesString, r as anyZodSchemaSchema$1, s as jsonSchemaObject$1, t as CredentialSetManifestSchema$1, u as trimmedNonEmptyString$1 } from "./schemas-BxFPUGWT.mjs";
5
+ import { n as DeclaredCredentialRequirementSchema } from "./credential-requirements-Ob-7H-0F.mjs";
6
+ import { a as FlowGraphSchema, i as WorkflowCoreManifestSchema, n as WORKFLOW_MANIFEST_SCHEMA_VERSION } from "./workflow-build-manifest-BKKW9D05.mjs";
7
7
  import { t as parseCronExpression } from "./cron-parser-Dw_cWzFu.mjs";
8
8
  import { t as runWithConcurrency } from "./concurrency-gXn9Rw8x-BTlfau8D.mjs";
9
9
  import { createRequire } from "node:module";
@@ -347,7 +347,7 @@ const IANATimezoneSchema = z.enum([
347
347
  "Asia/Doha"
348
348
  ]);
349
349
  //#endregion
350
- //#region ../../packages/core/dist/chunks/schema-DTrryPH_.mjs
350
+ //#region ../../packages/core/dist/chunks/schema-RilQR7M-.mjs
351
351
  const MAX_JSON_DEPTH = 20;
352
352
  function buildJsonValueSchema(depth) {
353
353
  const primitives = z.union([
@@ -381,10 +381,11 @@ function trimmedNonEmptyString(fieldName) {
381
381
  }
382
382
  /**
383
383
  * Non-empty trimmed string for credential definition ids.
384
- * Only allows letters, numbers, hyphens, and underscores.
384
+ * Allows namespaced ids such as `keystroke:slack` plus letters, numbers,
385
+ * hyphens, and underscores.
385
386
  */
386
387
  function credentialSetIdString(fieldName) {
387
- 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` });
388
+ 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` });
388
389
  }
389
390
  function optionalTrimmedNonEmptyString(fieldName) {
390
391
  return trimmedNonEmptyString(fieldName).optional();
@@ -396,7 +397,7 @@ function optionalDescriptionString(fieldName) {
396
397
  return descriptionString(fieldName).optional();
397
398
  }
398
399
  //#endregion
399
- //#region ../../packages/core/dist/chunks/schemas-DcgZIQvs.mjs
400
+ //#region ../../packages/core/dist/chunks/schemas-CUxIyWrr.mjs
400
401
  /**
401
402
  * Shared constants for the credential/connection system.
402
403
  * Defined in core (bottom of dependency chain) so all packages can import them.
@@ -610,7 +611,7 @@ z.object({
610
611
  connections: z.array(connectionConfigSchema).readonly().optional()
611
612
  });
612
613
  //#endregion
613
- //#region ../../packages/core/dist/chunks/schemas-Dehm2ijP.mjs
614
+ //#region ../../packages/core/dist/chunks/schemas-B8U1MF_0.mjs
614
615
  const SourceLocationSchema = z.object({
615
616
  filePath: z.string().min(1),
616
617
  absoluteFilePath: z.string().min(1).optional(),
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { t as createTypedCommand } from "./commander-BE37hxR3.mjs";
3
+ import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
4
4
  import { t as SKILL_INSTALL_METHODS } from "./types-BMBuhHhW.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/init/init.command.ts
@@ -45,7 +45,7 @@ function createInitCommand() {
45
45
  description: "Initialize a Keystroke project (creates keystroke.config.ts)",
46
46
  schema: InitOptionsSchema,
47
47
  optionsConfig: INIT_OPTIONS_CONFIG,
48
- loadHandler: async () => (await import("./init.handler-DamvbPEw.mjs")).handleInit
48
+ loadHandler: async () => (await import("./init.handler-BMdhpusQ.mjs")).handleInit
49
49
  });
50
50
  }
51
51
  //#endregion
@@ -3,7 +3,7 @@
3
3
  import { D as CliExitError, a as ui, i as fetchLatestNpmPackageVersion } from "./keystroke.mjs";
4
4
  import { i as projects } from "./dist-CIInPRGh.mjs";
5
5
  import { a as writeProjectConfig, i as readProjectConfig, r as getProjectConfigPath } from "./project-config-DudGRFPO.mjs";
6
- import { i as requireClient } from "./context-Bid-Rqj7.mjs";
6
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
7
7
  import { i as UnknownSkillAgentError, n as resolveSkillInstallChoices, r as installKeystrokeAgentSkills, t as summarizeSkillInstall } from "./skill-installer-BBgN2tzW.mjs";
8
8
  import { createRequire } from "node:module";
9
9
  import path from "node:path";
@@ -3,9 +3,9 @@
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 projects } from "./dist-CIInPRGh.mjs";
5
5
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
6
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-Bid-Rqj7.mjs";
6
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-BydAGTiB.mjs";
7
7
  import { i as resolveTypeHint } from "./schema-display-NVEl_DFY.mjs";
8
- import { n as resolveLocalWorkflowManifest, r as resolveProjectContext, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-DiwUcKoB.mjs";
8
+ import { n as resolveLocalWorkflowManifest, r as resolveProjectContext, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-BVliROAz.mjs";
9
9
  import dayjs from "dayjs";
10
10
  //#region src/commands/workflows/inspect/inspect-display.ts
11
11
  function formatBuildTimestamp(iso) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { D as CliExitError, _ as isAuthError, a as ui, j as throwReportedCliExit, m as REAUTH_HINT, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
4
4
  import { a as writeJsonError } from "./output-BWcVRt-T.mjs";
5
- import { i as requireClient } from "./context-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
6
  //#region src/lib/integration-catalog.ts
7
7
  const catalogCache = /* @__PURE__ */ new WeakMap();
8
8
  function buildView(entries) {
@@ -0,0 +1,185 @@
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-C5qcOo8m.mjs";
5
+ import { t as ConnectionKindValues } from "./api-nR61stdq.mjs";
6
+ import { z } from "zod";
7
+ //#region ../../packages/shared-types/src/platform-providers/index.ts
8
+ const platformProviderRegistry = {
9
+ airtable: {
10
+ supportsMessagingGateway: false,
11
+ messagingAdapterType: null
12
+ },
13
+ slack: {
14
+ supportsMessagingGateway: true,
15
+ messagingAdapterType: "slack"
16
+ },
17
+ linear: {
18
+ supportsMessagingGateway: true,
19
+ messagingAdapterType: "linear"
20
+ },
21
+ github: {
22
+ supportsMessagingGateway: true,
23
+ messagingAdapterType: "github"
24
+ },
25
+ google: {
26
+ supportsMessagingGateway: true,
27
+ messagingAdapterType: null
28
+ },
29
+ notion: {
30
+ supportsMessagingGateway: false,
31
+ messagingAdapterType: null
32
+ },
33
+ salesforce: {
34
+ supportsMessagingGateway: false,
35
+ messagingAdapterType: null
36
+ },
37
+ shopify: {
38
+ supportsMessagingGateway: false,
39
+ messagingAdapterType: null
40
+ },
41
+ spotify: {
42
+ supportsMessagingGateway: false,
43
+ messagingAdapterType: null
44
+ },
45
+ strava: {
46
+ supportsMessagingGateway: false,
47
+ messagingAdapterType: null
48
+ },
49
+ zoom: {
50
+ supportsMessagingGateway: false,
51
+ messagingAdapterType: null
52
+ },
53
+ calendly: {
54
+ supportsMessagingGateway: false,
55
+ messagingAdapterType: null
56
+ },
57
+ docusign: {
58
+ supportsMessagingGateway: false,
59
+ messagingAdapterType: null
60
+ },
61
+ ramp: {
62
+ supportsMessagingGateway: false,
63
+ messagingAdapterType: null
64
+ },
65
+ zendesk: {
66
+ supportsMessagingGateway: false,
67
+ messagingAdapterType: null
68
+ },
69
+ supabase: {
70
+ supportsMessagingGateway: false,
71
+ messagingAdapterType: null
72
+ },
73
+ gusto: {
74
+ supportsMessagingGateway: false,
75
+ messagingAdapterType: null
76
+ },
77
+ sentry: {
78
+ supportsMessagingGateway: false,
79
+ messagingAdapterType: null
80
+ },
81
+ typeform: {
82
+ supportsMessagingGateway: false,
83
+ messagingAdapterType: null
84
+ }
85
+ };
86
+ function toNonEmptyTuple(values) {
87
+ if (values.length === 0) throw new Error("Expected at least one provider value");
88
+ return values;
89
+ }
90
+ const PlatformProviderValues = toNonEmptyTuple(Object.freeze(Object.keys(platformProviderRegistry)));
91
+ const MessagingGatewayProviderValues = toNonEmptyTuple(Object.freeze(PlatformProviderValues.filter((provider) => platformProviderRegistry[provider].supportsMessagingGateway)));
92
+ const PlatformProviderSchema = z.enum(PlatformProviderValues);
93
+ z.enum(MessagingGatewayProviderValues);
94
+ //#endregion
95
+ //#region src/commands/integrations/integrations.command.ts
96
+ const IntegrationsListOptionsSchema = JsonOptionSchema.extend({
97
+ kind: z.enum(ConnectionKindValues).optional(),
98
+ search: z.string().optional(),
99
+ connected: z.boolean().optional(),
100
+ details: z.boolean().optional()
101
+ });
102
+ const INTEGRATIONS_LIST_OPTIONS_CONFIG = {
103
+ ...JSON_OPTION_CONFIG,
104
+ kind: {
105
+ flag: "--kind <kind>",
106
+ description: `Filter by connection kind: ${ConnectionKindValues.join(" | ")}`
107
+ },
108
+ search: {
109
+ flag: "--search <query>",
110
+ description: "Case-insensitive substring match against publicId, name, and aliases"
111
+ },
112
+ connected: {
113
+ flag: "--connected",
114
+ description: "Only show integrations with at least one configured connection in the current org"
115
+ },
116
+ details: {
117
+ flag: "--details",
118
+ description: "Show connection names, IDs, scope, status, and default selection"
119
+ }
120
+ };
121
+ const IntegrationsRegisterOptionsSchema = JsonOptionSchema.extend({
122
+ integrationId: z.string().optional(),
123
+ clientApp: z.string().optional().describe("Internal credential set id holding clientId + clientSecret"),
124
+ provider: PlatformProviderSchema.optional().describe("Provider id for the provider app"),
125
+ externalAppId: z.string().optional().describe("External provider app id"),
126
+ displayName: z.string().optional().describe("Human-readable display name for the workspace integration")
127
+ });
128
+ const INTEGRATIONS_REGISTER_OPTIONS_CONFIG = {
129
+ ...JSON_OPTION_CONFIG,
130
+ clientApp: {
131
+ flag: "--client-app <credentialSetId>",
132
+ description: "Internal credential set id holding clientId + clientSecret (required)"
133
+ },
134
+ provider: {
135
+ flag: "--provider <provider>",
136
+ description: `Provider app provider: ${PlatformProviderValues.join(" | ")} (required)`
137
+ },
138
+ externalAppId: {
139
+ flag: "--external-app-id <id>",
140
+ description: "External provider app id from the provider (required)"
141
+ },
142
+ displayName: {
143
+ flag: "--display-name <name>",
144
+ description: "Human-readable display name for the workspace integration"
145
+ }
146
+ };
147
+ function createIntegrationsCommand() {
148
+ return createTypedCommand({
149
+ name: "integrations",
150
+ description: "List Keystroke integrations available to your organization",
151
+ schema: IntegrationsListOptionsSchema,
152
+ optionsConfig: INTEGRATIONS_LIST_OPTIONS_CONFIG,
153
+ loadHandler: async () => (await import("./list.handler-ClPAPSWm.mjs")).handleIntegrationsList,
154
+ subcommands: [createTypedCommand({
155
+ name: "list",
156
+ description: "List Keystroke integrations available to your organization",
157
+ schema: IntegrationsListOptionsSchema,
158
+ optionsConfig: INTEGRATIONS_LIST_OPTIONS_CONFIG,
159
+ loadHandler: async () => (await import("./list.handler-ClPAPSWm.mjs")).handleIntegrationsList
160
+ }), createTypedCommand({
161
+ name: "register",
162
+ description: "Register an org-scoped custom provider app for workspace-authored OAuth support",
163
+ schema: IntegrationsRegisterOptionsSchema,
164
+ optionsConfig: INTEGRATIONS_REGISTER_OPTIONS_CONFIG,
165
+ handler: async (opts, ctx) => {
166
+ const { handleIntegrationsRegister } = await import("./register.handler-BXeh5mdb.mjs");
167
+ await handleIntegrationsRegister({
168
+ integrationId: opts.integrationId,
169
+ clientAppCredentialSetId: opts.clientApp,
170
+ provider: opts.provider,
171
+ externalAppId: opts.externalAppId,
172
+ displayName: opts.displayName,
173
+ json: opts.json
174
+ }, ctx);
175
+ },
176
+ argument: {
177
+ name: "integrationId",
178
+ description: "Workspace integration id to register (e.g., acmeCrm)",
179
+ key: "integrationId"
180
+ }
181
+ })]
182
+ });
183
+ }
184
+ //#endregion
185
+ export { createIntegrationsCommand };
@@ -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-BE37hxR3.mjs";
4
+ import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/invites/invites.command.ts
7
7
  const InvitesListOptionsSchema = JsonOptionSchema;
@@ -19,13 +19,13 @@ function createInvitesCommand() {
19
19
  description: "Manage invitations for the current user",
20
20
  schema: InvitesListOptionsSchema,
21
21
  optionsConfig: { ...JSON_OPTION_CONFIG },
22
- loadHandler: async () => (await import("./list.handler-DUz1bJ4x.mjs")).handleInvitesList,
22
+ loadHandler: async () => (await import("./list.handler-Xl_F89kq.mjs")).handleInvitesList,
23
23
  subcommands: [createTypedCommand({
24
24
  name: "list",
25
25
  description: "List pending invites for the current user",
26
26
  schema: InvitesListOptionsSchema,
27
27
  optionsConfig: { ...JSON_OPTION_CONFIG },
28
- loadHandler: async () => (await import("./list.handler-DUz1bJ4x.mjs")).handleInvitesList
28
+ loadHandler: async () => (await import("./list.handler-Xl_F89kq.mjs")).handleInvitesList
29
29
  }), createTypedCommand({
30
30
  name: "accept",
31
31
  description: "Accept a pending invite",
@@ -36,7 +36,7 @@ function createInvitesCommand() {
36
36
  description: "Invite ID to accept",
37
37
  key: "inviteId"
38
38
  },
39
- loadHandler: async () => (await import("./accept.handler-B7QzdKCh.mjs")).handleInvitesAccept
39
+ loadHandler: async () => (await import("./accept.handler-BVmNNAgL.mjs")).handleInvitesAccept
40
40
  })]
41
41
  });
42
42
  }
@@ -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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.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/invites.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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
7
7
  //#region src/commands/org/invites.resend.handler.ts
8
8
  async function handleOrgInvitesResend(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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.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/invites.revoke.handler.ts
8
8
  async function handleOrgInvitesRevoke(options, ctx) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as getKeystrokeBaseDir } from "./paths-JzzFkXQA-CEipIeVl.mjs";
4
- import { n as DEFAULT_CLI_WEB_URL, t as DEFAULT_CLI_SERVER_URL } from "./default-urls-CTQqM1_A.mjs";
4
+ import { n as DEFAULT_CLI_WEB_URL, t as DEFAULT_CLI_SERVER_URL } from "./default-urls-BoSm4s9C.mjs";
5
5
  import * as os from "node:os";
6
6
  import * as path$1 from "node:path";
7
7
  import path from "node:path";
@@ -521,7 +521,7 @@ const logger = {
521
521
  };
522
522
  //#endregion
523
523
  //#region package.json
524
- var version = "0.0.18";
524
+ var version = "0.0.19";
525
525
  //#endregion
526
526
  //#region src/command-registry.ts
527
527
  const ROOT_OPTIONS_WITH_VALUES$1 = new Set([
@@ -533,84 +533,84 @@ const ROOT_VERSION_FLAGS = new Set(["-V", "--version"]);
533
533
  const lazyCommandDefinitions = [
534
534
  {
535
535
  name: "agents",
536
- loadCommand: async () => (await import("./agents-Co6Jy_N8.mjs")).createAgentsCommand()
536
+ loadCommand: async () => (await import("./agents-Dd7UeQCw.mjs")).createAgentsCommand()
537
537
  },
538
538
  {
539
539
  name: "admin",
540
- loadCommand: async () => (await import("./admin-CYpulx_A.mjs")).createAdminCommand()
540
+ loadCommand: async () => (await import("./admin-DQlHFuXn.mjs")).createAdminCommand()
541
541
  },
542
542
  {
543
543
  name: "api-keys",
544
- loadCommand: async () => (await import("./api-keys-BUCLzRv_.mjs")).createApiKeysCommand()
544
+ loadCommand: async () => (await import("./api-keys-BsMBFiD_.mjs")).createApiKeysCommand()
545
545
  },
546
546
  {
547
547
  name: "auth",
548
- loadCommand: async () => (await import("./auth-niNm-yNT.mjs")).createAuthCommand()
548
+ loadCommand: async () => (await import("./auth-ZTuuEoD6.mjs")).createAuthCommand()
549
549
  },
550
550
  {
551
551
  name: "connect",
552
- loadCommand: async () => (await import("./connect-C9NMD8Ky.mjs")).createConnectCommand()
552
+ loadCommand: async () => (await import("./connect-BtBKoXpi.mjs")).createConnectCommand()
553
553
  },
554
554
  {
555
555
  name: "credentials",
556
- loadCommand: async () => (await import("./credentials-fMfKVlEn.mjs")).createCredentialsCommand(),
556
+ loadCommand: async () => (await import("./credentials-BGaRMclS.mjs")).createCredentialsCommand(),
557
557
  copyInheritedSettings: true
558
558
  },
559
559
  {
560
560
  name: "org",
561
- loadCommand: async () => (await import("./org-DGS91uc-.mjs")).createOrgCommand()
561
+ loadCommand: async () => (await import("./org-DIGyb7XZ.mjs")).createOrgCommand()
562
562
  },
563
563
  {
564
564
  name: "deploy",
565
- loadCommand: async () => (await import("./deploy-B7LRWcp6.mjs")).createDeployCommand()
565
+ loadCommand: async () => (await import("./deploy-CzTlgAFj.mjs")).createDeployCommand()
566
566
  },
567
567
  {
568
568
  name: "init",
569
- loadCommand: async () => (await import("./init-jaqNLGmB.mjs")).createInitCommand()
569
+ loadCommand: async () => (await import("./init-DeeOVc9m.mjs")).createInitCommand()
570
570
  },
571
571
  {
572
572
  name: "integrations",
573
- loadCommand: async () => (await import("./integrations-DRL3JmC8.mjs")).createIntegrationsCommand()
573
+ loadCommand: async () => (await import("./integrations-tXZM-84g.mjs")).createIntegrationsCommand()
574
574
  },
575
575
  {
576
576
  name: "invites",
577
- loadCommand: async () => (await import("./invites-VntHNMYk.mjs")).createInvitesCommand()
577
+ loadCommand: async () => (await import("./invites-ClyAatBW.mjs")).createInvitesCommand()
578
578
  },
579
579
  {
580
580
  name: "logs",
581
- loadCommand: async () => (await import("./logs-CcYqFKRU.mjs")).createLogsCommand()
581
+ loadCommand: async () => (await import("./logs-C-JxXsgc.mjs")).createLogsCommand()
582
582
  },
583
583
  {
584
584
  name: "listen",
585
- loadCommand: async () => (await import("./listen-DLGZEQRL.mjs")).createListenCommand()
585
+ loadCommand: async () => (await import("./listen-ksMVpdNa.mjs")).createListenCommand()
586
586
  },
587
587
  {
588
588
  name: "projects",
589
- loadCommand: async () => (await import("./projects-D90_uEC2.mjs")).createProjectsCommand()
589
+ loadCommand: async () => (await import("./projects-Cy6CH3fI.mjs")).createProjectsCommand()
590
590
  },
591
591
  {
592
592
  name: "runs",
593
- loadCommand: async () => (await import("./runs-Bg_qDeQi.mjs")).createRunsCommand()
593
+ loadCommand: async () => (await import("./runs-DaSd4eXn.mjs")).createRunsCommand()
594
594
  },
595
595
  {
596
596
  name: "skills",
597
- loadCommand: async () => (await import("./skills.command-JwKWpGvU.mjs")).createSkillsCommand()
597
+ loadCommand: async () => (await import("./skills.command-DQc_qGAF.mjs")).createSkillsCommand()
598
598
  },
599
599
  {
600
600
  name: "sync",
601
- loadCommand: async () => (await import("./sync-CXNveL61.mjs")).createSyncCommand()
601
+ loadCommand: async () => (await import("./sync-BdTQDZjP.mjs")).createSyncCommand()
602
602
  },
603
603
  {
604
604
  name: "test",
605
- loadCommand: async () => (await import("./test-A5hz3c7j.mjs")).createTestCommand()
605
+ loadCommand: async () => (await import("./test-TTQXrhHm.mjs")).createTestCommand()
606
606
  },
607
607
  {
608
608
  name: "upgrade",
609
- loadCommand: async () => (await import("./upgrade-DhfpoyRV.mjs")).createUpgradeCommand()
609
+ loadCommand: async () => (await import("./upgrade-Cx-bUWUc.mjs")).createUpgradeCommand()
610
610
  },
611
611
  {
612
612
  name: "workflows",
613
- loadCommand: async () => (await import("./workflows-Dy2M9bEr.mjs")).createWorkflowsCommand()
613
+ loadCommand: async () => (await import("./workflows-K6zetcqI.mjs")).createWorkflowsCommand()
614
614
  }
615
615
  ];
616
616
  function selectCommandRegistration(argv, commandNames = new Set(lazyCommandDefinitions.map((definition) => definition.name))) {
@@ -1015,11 +1015,12 @@ z.enum([
1015
1015
  //#endregion
1016
1016
  //#region src/lib/env.ts
1017
1017
  loadRootEnv();
1018
+ const optionalNonEmptyString = z.preprocess((value) => value === "" ? void 0 : value, z.string().min(1).optional());
1018
1019
  const cliEnvSchema = z.object({
1019
1020
  WEB_URL: z.url().optional().default(DEFAULT_CLI_WEB_URL),
1020
1021
  SERVER_URL: z.url().optional().default(DEFAULT_CLI_SERVER_URL),
1021
- KEYSTROKE_API_KEY: z.string().min(1).optional(),
1022
- KEYSTROKE_ORG_ID: z.string().min(1).optional(),
1022
+ KEYSTROKE_API_KEY: optionalNonEmptyString,
1023
+ KEYSTROKE_ORG_ID: optionalNonEmptyString,
1023
1024
  ENVIRONMENT: EnvironmentSchema.optional().default("production")
1024
1025
  });
1025
1026
  let cachedEnv;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { a as ui, n as style, t as ANSI } from "./keystroke.mjs";
4
- import { n as resolveCredentialValuesFromEnv, t as groupCredentialRequirements } from "./credentials-DUkVbhvj.mjs";
4
+ import { n as resolveCredentialValuesFromEnv, t as groupCredentialRequirements } from "./credentials-jRiXEr6P.mjs";
5
5
  import path from "node:path";
6
6
  import { readFile } from "node:fs/promises";
7
7
  import { parse } from "dotenv";
@@ -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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.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,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-Bid-Rqj7.mjs";
4
+ import { i as requireClient } from "./context-BydAGTiB.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();
@@ -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-Bid-Rqj7.mjs";
6
- import { t as getIntegrationCatalog } from "./integration-catalog-m8tj_XlD.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
+ import { t as getIntegrationCatalog } from "./integration-catalog-CmvYPvI6.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/integrations/list.handler.ts
9
9
  function summarizeConnections(entry, connections) {
@@ -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-Bid-Rqj7.mjs";
6
- import { a as readManifestsFromOutDir } from "./dist-WFPTDQB3.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
+ import { a as readManifestsFromOutDir } from "./dist-Cx0RV8s7.mjs";
7
7
  import { n as resolveWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
8
8
  import { t as readCredentialEnvMap } from "./credential-env-map-BA4LNI7x.mjs";
9
- import { a as loadProjectDotenvFile, i as enrichServerCredentialRow, l as renderCredentialListBlocks, n as buildSyntheticNotOnServerRows, r as collectMergedManifestGroups, t as buildCredentialWorkflowConsumersByGroup } from "./list-enrichment-DYvr3XDb.mjs";
9
+ import { a as loadProjectDotenvFile, i as enrichServerCredentialRow, l as renderCredentialListBlocks, n as buildSyntheticNotOnServerRows, r as collectMergedManifestGroups, t as buildCredentialWorkflowConsumersByGroup } from "./list-enrichment-B9238wom.mjs";
10
10
  import dayjs from "dayjs";
11
11
  //#region src/commands/credentials/list/fetch-all-credential-sets.ts
12
12
  /**
@@ -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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.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
@@ -5,7 +5,7 @@ import { i as projects } from "./dist-CIInPRGh.mjs";
5
5
  import { i as writeJson } from "./output-BWcVRt-T.mjs";
6
6
  import { t as requireWorkflowsDir } from "./resolve-project-CNQtOWE4.mjs";
7
7
  import { t as createSpinnerProgress } from "./spinner-progress-Bx-fYItP.mjs";
8
- import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-_WNsLKwW.mjs";
8
+ import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-C8AiYxqp.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}`);
@@ -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-BE37hxR3.mjs";
4
+ import { t as createTypedCommand } from "./commander-C5qcOo8m.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-kaAvYk-B.mjs")).handleListen
21
+ loadHandler: async () => (await import("./listen.handler-DEJSBg8y.mjs")).handleListen
22
22
  });
23
23
  }
24
24
  //#endregion
@@ -2,7 +2,7 @@
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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
6
  import { n as sleep } from "./run-polling-DARidqo-.mjs";
7
7
  import { spawn } from "node:child_process";
8
8
  //#region src/lib/clipboard.ts
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { t as createTypedCommand } from "./commander-BE37hxR3.mjs";
3
+ import { t as createTypedCommand } from "./commander-C5qcOo8m.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/commands/logs/logs.command.ts
6
6
  const LogsOptionsSchema = z.object({
@@ -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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.mjs";
6
6
  import { n as sleep, t as TERMINAL_STATUSES } from "./run-polling-DARidqo-.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/workflows/_shared/run-query.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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.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-Bid-Rqj7.mjs";
5
+ import { i as requireClient } from "./context-BydAGTiB.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) {