@keystrokehq/cli 0.0.11 → 0.0.13

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 (146) hide show
  1. package/dist/{accept.handler-DWuxmMuY.mjs → accept.handler-BU6kg8ET.mjs} +1 -1
  2. package/dist/{admin-BK4bFTTd.mjs → admin-B4GNbCl5.mjs} +9 -9
  3. package/dist/{agent-manifest-sJFbH5H8.mjs → agent-manifest-CZdlCTFs.mjs} +5 -5
  4. package/dist/{agents-DYnw2VPX.mjs → agents-LtoIcJGY.mjs} +6 -6
  5. package/dist/api-DuKKdCpF.mjs +246 -0
  6. package/dist/{api-keys-Dizx3YqE.mjs → api-keys-BE_hLonn.mjs} +5 -5
  7. package/dist/{auth-BqsKd4IA.mjs → auth-DNK5MYm4.mjs} +5 -5
  8. package/dist/{auth.handler-BsoWeCFD.mjs → auth.handler-DrjDODhZ.mjs} +1 -1
  9. package/dist/{build-agents-DfbiMZ_e-CgnKa9A6.mjs → build-agents-DseUtzd4-DIDGsZWL.mjs} +12 -13
  10. package/dist/{build-metadata-zidV9Cai-Bq37kBOM.mjs → build-metadata-qebrtraZ-D4SQNsBw.mjs} +19 -35
  11. package/dist/{build-progress-DigAP-BN.mjs → build-progress-CITED2tv.mjs} +1 -1
  12. package/dist/{build-tasks-O1jYtlv1-Bkw0w1r3.mjs → build-tasks-GVuMLS0h-DnS9QWzf.mjs} +4 -4
  13. package/dist/{build-workflows-3fdvdHHf-BDTy9QgT.mjs → build-workflows-Dmzay1vP-DKVuBAjD.mjs} +17 -18
  14. package/dist/{build.handler-B2UDhh72.mjs → build.handler-BZnLQt0_.mjs} +4 -4
  15. package/dist/{clear.handler-BR97yudD.mjs → clear.handler-B1c17nAi.mjs} +1 -1
  16. package/dist/{commander-DcftG6dX.mjs → commander-BwtBoukr.mjs} +2 -2
  17. package/dist/{common-B3bLe3Mk.mjs → common-BaGFkj3n.mjs} +2 -2
  18. package/dist/{connect-DQ4xIcyE.mjs → connect-IPcL37np.mjs} +12 -6
  19. package/dist/{connect.handler-CWSLgf87.mjs → connect.handler-ToY6qmMz.mjs} +74 -224
  20. package/dist/{context-1VgRbzr-.mjs → context-DQ4IA0yO.mjs} +1 -1
  21. package/dist/{create.handler-C2CkPWsy.mjs → create.handler-BAyG0PmG.mjs} +1 -1
  22. package/dist/credential-requirements-FtBk5JVB.mjs +250 -0
  23. package/dist/credentials-Bu1MBiCL.mjs +182 -0
  24. package/dist/{credentials-D8_AwH9o.mjs → credentials-CZiu-534.mjs} +12 -7
  25. package/dist/{current-deployment-workflow-B05z0EQa.mjs → current-deployment-workflow-zTmYbUjh.mjs} +5 -5
  26. package/dist/{current.handler-CuAtMZmm.mjs → current.handler-DA4FGfUP.mjs} +1 -1
  27. package/dist/{declared-credential-requirements-BtlcsEVn.mjs → declared-credential-requirements-B6h4WRv4.mjs} +5 -34
  28. package/dist/{delete.handler-DDY3X1Zm.mjs → delete.handler-CJcyvnUF.mjs} +1 -1
  29. package/dist/{deploy-B8TYutOi.mjs → deploy-BvaFgVvf.mjs} +1 -1
  30. package/dist/{deploy-Cn6FFnOM.mjs → deploy-DdMP-YaQ.mjs} +2 -2
  31. package/dist/{deploy-progress-XAfautnA.mjs → deploy-progress-CLO-yidq.mjs} +1 -1
  32. package/dist/{deploy.handler-D1DcAe-h.mjs → deploy.handler-Bag7rBG-.mjs} +16 -16
  33. package/dist/{detect-env-access-CwkOYeYM-D4o8gRZs.mjs → detect-env-access-CwkOYeYM-EmkYvbfJ.mjs} +1 -1
  34. package/dist/{diff.handler-BU6IewNG.mjs → diff.handler-Brgc-Ccl.mjs} +3 -3
  35. package/dist/{dist-DvO0q6Fo.mjs → dist-BMkNN03r.mjs} +16 -16
  36. package/dist/{env.handler-C6YAmHLi.mjs → env.handler-DFKzjIQT.mjs} +10 -7
  37. package/dist/{error-boundary-CpaVvFXk.mjs → error-boundary-B2ZKRkZI.mjs} +1 -1
  38. package/dist/{file-metadata-BvGM-B2v.mjs → file-metadata-Dwy9KKq_.mjs} +2 -2
  39. package/dist/{import-module-DDPnzlJ1-BIBSgOhK.mjs → import-module-DEI7R8Yh-Xz-KAPvB.mjs} +248 -246
  40. package/dist/{init-Da6_obl0.mjs → init-DhnABm3J.mjs} +2 -2
  41. package/dist/{init.handler-Cq2nk8DO.mjs → init.handler-QgehN8B4.mjs} +4 -4
  42. package/dist/{inspect.handler-D4YGryQB.mjs → inspect.handler-CMOFOb4G.mjs} +3 -3
  43. package/dist/{integration-catalog-DtNWaMvh.mjs → integration-catalog-BRrJIAVz.mjs} +5 -5
  44. package/dist/{integrations-CB_Ukq2g.mjs → integrations-7-U7nmkh.mjs} +7 -6
  45. package/dist/{invites-BOhuBtoq.mjs → invites-CmGmnUla.mjs} +4 -4
  46. package/dist/{invites.list.handler-C-Wv6E1g.mjs → invites.list.handler-CmkIf-uW.mjs} +1 -1
  47. package/dist/{invites.resend.handler-CI78XlQS.mjs → invites.resend.handler-FZl20yat.mjs} +1 -1
  48. package/dist/{invites.revoke.handler-DigAgNwB.mjs → invites.revoke.handler-D95mrfmB.mjs} +1 -1
  49. package/dist/keystroke.mjs +21 -21
  50. package/dist/{list-enrichment-Cxlq6BB9.mjs → list-enrichment-I4XQaMg0.mjs} +5 -1
  51. package/dist/{list.handler-OiLEylzS.mjs → list.handler-BrTW2viq.mjs} +1 -1
  52. package/dist/{list.handler-CsODcH6e.mjs → list.handler-Cp767f5l.mjs} +1 -1
  53. package/dist/{list.handler-BsyGhXns.mjs → list.handler-DRnHsEa0.mjs} +1 -1
  54. package/dist/{list.handler-B6IByHHB.mjs → list.handler-DXl8igi2.mjs} +13 -5
  55. package/dist/{list.handler-BpVNYShU.mjs → list.handler-DsYyTUhA.mjs} +1 -1
  56. package/dist/{list.handler--a1JEGSD.mjs → list.handler-H8aQSsFM.mjs} +3 -3
  57. package/dist/{list.handler-Dr9Ti-dt.mjs → list.handler-uzC77oIy.mjs} +3 -3
  58. package/dist/{listen-DUPk6cZC.mjs → listen-DckJq0y0.mjs} +2 -2
  59. package/dist/{listen.handler-B5WimrfF.mjs → listen.handler-Bf5MXKPO.mjs} +2 -2
  60. package/dist/{logs-C5_4lh3p.mjs → logs-D_l5BIn2.mjs} +3 -3
  61. package/dist/{logs.handler-CBHPwDuC.mjs → logs.handler-kYO3Uv9t.mjs} +2 -2
  62. package/dist/{members.add.handler-LcQJYBsu.mjs → members.add.handler-C2cppd-9.mjs} +1 -1
  63. package/dist/{members.invite.handler-p279O2aC.mjs → members.invite.handler-DY6kS4LN.mjs} +1 -1
  64. package/dist/{members.list.handler-Cjukjuot.mjs → members.list.handler-CFBG3SBw.mjs} +1 -1
  65. package/dist/{members.remove.handler-CzxPiQFv.mjs → members.remove.handler-LQ61_qip.mjs} +1 -1
  66. package/dist/{members.update.handler-CX5q86e3.mjs → members.update.handler-CqISA1mf.mjs} +1 -1
  67. package/dist/{normalize-path-CojS-CgQ-D_WTiHKw.mjs → normalize-path-CojS-CgQ-D5D0AIHR.mjs} +1 -1
  68. package/dist/{org-CnlKW-Hl.mjs → org-KQ2nD0yN.mjs} +15 -15
  69. package/dist/{orgs.create.handler-DRILhxdn.mjs → orgs.create.handler-Mv5CTGcG.mjs} +1 -1
  70. package/dist/{orgs.get.handler-Cue6stoX.mjs → orgs.get.handler-DvvOhshX.mjs} +1 -1
  71. package/dist/{orgs.list.handler-fuDLNI5X.mjs → orgs.list.handler-wWAg6cKg.mjs} +1 -1
  72. package/dist/{paused.handler-CuOVH4DZ.mjs → paused.handler-CbMkPD9e.mjs} +1 -1
  73. package/dist/{project-config-D9eFU8Jk.mjs → project-config-CJGSh2RQ.mjs} +4 -7
  74. package/dist/{projects-DN7dX6nN.mjs → projects-CWLOF5x4.mjs} +656 -3
  75. package/dist/{projects-DdgHbUpR.mjs → projects-CYqeKQGT.mjs} +4 -4
  76. package/dist/{requirements.handler-CX13XiXT.mjs → requirements.handler-CnDTBcH5.mjs} +5 -5
  77. package/dist/{resolve-project-C6UAOfAG.mjs → resolve-project-bVPMcs-y.mjs} +1 -1
  78. package/dist/{run-polling-1CTIeDea.mjs → run-polling-49w3PYAv.mjs} +3 -3
  79. package/dist/{run.handler-BxLH75WW.mjs → run.handler-Bma88649.mjs} +5 -5
  80. package/dist/{runs-lfE7r6i2.mjs → runs-HJejvQnQ.mjs} +2 -2
  81. package/dist/{schema-BgGlAs8a.mjs → schema-DFJiNWyd.mjs} +2 -1
  82. package/dist/schemas-DodkHgnS.mjs +280 -0
  83. package/dist/{skills-sync.handler-CntKndFm.mjs → skills-sync.handler-Cf74vKJA.mjs} +1 -1
  84. package/dist/{skills.command-X5zZwz2d.mjs → skills.command-KyAwBeST.mjs} +3 -3
  85. package/dist/{source-analysis-CHkWMC40.mjs → source-analysis-CJPymdaA.mjs} +1 -1
  86. package/dist/{source-analysis-DEEChuND-Csu0oOlw.mjs → source-analysis-DTnwNwKq-DoBxUDCg.mjs} +5 -5
  87. package/dist/{src--fCtOxNX.mjs → src-D-dFmoAF.mjs} +1 -1
  88. package/dist/{switch.handler-RaeKZ3ZB.mjs → switch.handler-DfsKVtR6.mjs} +1 -1
  89. package/dist/{sync-C89mJp7Y.mjs → sync-Bi2M_TUK.mjs} +2 -2
  90. package/dist/{sync.handler-BoAHHUQs.mjs → sync.handler-D6YFuVlq.mjs} +6 -6
  91. package/dist/{schedule-BWAI6qLx.mjs → task-BBgEvdG1.mjs} +395 -25
  92. package/dist/{task-target-build-D5IrHqSl.mjs → task-target-build-atWwwnSF.mjs} +8 -8
  93. package/dist/task-target-deploy-CRsrQTOy.mjs +4 -0
  94. package/dist/{task-target-deploy-Bf5i3ox1-2K0hAwzk.mjs → task-target-deploy-CZBGNC0H-BwPSfaJQ.mjs} +2 -2
  95. package/dist/task-target-deploy-runner.mjs +5 -5
  96. package/dist/{test-gPQJRkqa.mjs → test-Ctjy8mwC.mjs} +32 -144
  97. package/dist/{test.handler-B5GF5txS.mjs → test.handler-St9sBXyH.mjs} +1 -1
  98. package/dist/{trigger-artifacts-B3OCTX9K-ME6IVdUB.mjs → trigger-artifacts-RizI57RC-C-yCtEi-.mjs} +9 -9
  99. package/dist/{trigger-manifest-B3Gq1739.mjs → trigger-manifest-D5rnpPkA.mjs} +1 -1
  100. package/dist/{try-deploy.handler-dA_YGWRq.mjs → try-deploy.handler-BMcWQVST.mjs} +9 -9
  101. package/dist/{upgrade-xByIxaYu.mjs → upgrade-YavAf8AC.mjs} +2 -2
  102. package/dist/{upload.handler-BFDM6n_6.mjs → upload.handler-DemogvI1.mjs} +129 -18
  103. package/dist/{users.get.handler-CzaYM2bi.mjs → users.get.handler-B20PMSbl.mjs} +1 -1
  104. package/dist/{users.list.handler-CpOWwzBb.mjs → users.list.handler-BplFTjv3.mjs} +1 -1
  105. package/dist/{users.set-role.handler-BjiSNP2d.mjs → users.set-role.handler-wdmI6o3G.mjs} +1 -1
  106. package/dist/{utils-C_qCshBA.mjs → utils-DpEtybzI.mjs} +2 -2
  107. package/dist/{validate.handler-BtDSKAFY.mjs → validate.handler-DSAvNgns.mjs} +3 -3
  108. package/dist/{workflow-build-Z2_jkOsZ.mjs → workflow-build-Cmu1TOFu.mjs} +32 -32
  109. package/dist/{workflow-manifest-BfL74mjp.mjs → workflow-build-manifest-OPFqFD6f.mjs} +26 -28
  110. package/dist/{workflow-bundler-BzHk73PM-tt09RbIA.mjs → workflow-bundler-BzHk73PM-UJQa7Ubk.mjs} +2 -2
  111. package/dist/{workflows-V09d2r2H.mjs → workflows-DTlypo2t.mjs} +26 -27
  112. package/dist/{writer-CtvttJdP-DZJ0mZCm.mjs → writer-CtvttJdP-BfNsrheU.mjs} +5 -5
  113. package/package.json +11 -9
  114. package/dist/constants-BUgIAu2a.mjs +0 -8
  115. package/dist/credential-requirements-BCW8aQWS.mjs +0 -480
  116. package/dist/credentials-DAQfKqn0.mjs +0 -152025
  117. package/dist/get-intrinsic-BjqiGgLt.mjs +0 -658
  118. package/dist/hosted-action-dispatcher-registry-BWEtn13o.mjs +0 -126
  119. package/dist/schema-B-Wgo4rJ.mjs +0 -81
  120. package/dist/schemas-9FmGqrPT.mjs +0 -42
  121. package/dist/task-1qz1XNq7.mjs +0 -96
  122. package/dist/task-target-deploy-Bzfftyru.mjs +0 -4
  123. /package/dist/{agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs → agent-bundle-package-DWV6B_5q-cB76j6UL.mjs} +0 -0
  124. /package/dist/{browser-CvuyMLhI.mjs → browser-B4K0VW8p.mjs} +0 -0
  125. /package/dist/{clear-cache.handler-D-wboLB6.mjs → clear-cache.handler-Dywqc7TG.mjs} +0 -0
  126. /package/dist/{clear.handler-BC6pz0x-.mjs → clear.handler-ui4e1CnJ.mjs} +0 -0
  127. /package/dist/{concurrency-gXn9Rw8x-CnBnF2cg.mjs → concurrency-gXn9Rw8x-CaI6Vtbu.mjs} +0 -0
  128. /package/dist/{credential-env-map-C23GV6LN.mjs → credential-env-map-D0zgoUl0.mjs} +0 -0
  129. /package/dist/{credential-schema-mismatch-DM9Y91jL.mjs → credential-schema-mismatch-8pqwvswO.mjs} +0 -0
  130. /package/dist/{diff-utils-AATn2n56.mjs → diff-utils-BoXI705D.mjs} +0 -0
  131. /package/dist/{layout-CXkZEsXI.mjs → layout-DRf9qUf8.mjs} +0 -0
  132. /package/dist/{logs.handler-ClIIOeQB.mjs → logs.handler-DxSKmDCq.mjs} +0 -0
  133. /package/dist/{metadata-layout-C6ed-9dl-C6Bylr_z.mjs → metadata-layout-C6ed-9dl-EF5pCtIH.mjs} +0 -0
  134. /package/dist/{options-CIVqkc8V.mjs → options-DFPs-tAB.mjs} +0 -0
  135. /package/dist/{oxc-B3KI3rf_-ghZc3xZ5.mjs → oxc-B3KI3rf_-CHDUXsus.mjs} +0 -0
  136. /package/dist/{read-credential-keys-77a91T8M-B0eiobOd.mjs → read-credential-keys-77a91T8M-CzXPGxdU.mjs} +0 -0
  137. /package/dist/{register.handler-CpP_KB2u.mjs → register.handler-D7ZZAnGP.mjs} +0 -0
  138. /package/dist/{rolldown-runtime-twds-ZHy-RuJszab7.mjs → rolldown-runtime-twds-ZHy-3DMm_Sby.mjs} +0 -0
  139. /package/dist/{run-polling-DDpkIvwy.mjs → run-polling-Cb4ssXIE.mjs} +0 -0
  140. /package/dist/{schema-display-DuWBmkwk.mjs → schema-display-CyCWSgfY.mjs} +0 -0
  141. /package/dist/{skills.handler-CofL4oKs.mjs → skills.handler-C_4VzVmc.mjs} +0 -0
  142. /package/dist/{spinner-progress-Bt8zXPOc.mjs → spinner-progress-CS1BEdNB.mjs} +0 -0
  143. /package/dist/{status.handler-6cuHa0R0.mjs → status.handler-Cm9aNUBn.mjs} +0 -0
  144. /package/dist/{sync-keystroke-agent-skills-D746f2W_.mjs → sync-keystroke-agent-skills-CX9fS5nQ.mjs} +0 -0
  145. /package/dist/{upgrade.handler-DhKeyCy5.mjs → upgrade.handler-C2eZ_tg3.mjs} +0 -0
  146. /package/dist/{upload-C1qFWMm0.mjs → upload-C0kaZu08.mjs} +0 -0
@@ -0,0 +1,182 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { d as collectCredentialRequirementEntries } from "./credential-requirements-FtBk5JVB.mjs";
4
+ //#region ../../packages/workflow-deploy/dist/credentials/index.mjs
5
+ /**
6
+ * Resolves credential values from environment using KEYSTROKE_<KEY> convention.
7
+ * Optional keyToEnv override maps credential key -> env var name.
8
+ */
9
+ /**
10
+ * Resolves credential values from env.
11
+ * Convention: KEYSTROKE_<KEY> (e.g. SLACK_BOT_TOKEN -> KEYSTROKE_SLACK_BOT_TOKEN).
12
+ * Use keyToEnv to override: { SLACK_BOT_TOKEN: "MY_SLACK_TOKEN" }.
13
+ * Returns null if any required value is missing.
14
+ */
15
+ function resolveCredentialValuesFromEnv(keys, env, keyToEnv) {
16
+ const values = {};
17
+ const envForKey = keyToEnv ?? Object.fromEntries(keys.map((key) => [key, `KEYSTROKE_${key}`]));
18
+ for (const credentialKey of keys) {
19
+ const value = env[envForKey[credentialKey] ?? `KEYSTROKE_${credentialKey}`];
20
+ if (!value || value.trim() === "") return null;
21
+ values[credentialKey] = value;
22
+ }
23
+ return values;
24
+ }
25
+ function addEntriesToGroups(groups, entries) {
26
+ for (const entry of entries) {
27
+ const scopeKey = entry.scope ?? "__default__";
28
+ const key = `${entry.credentialSetId}:${scopeKey}`;
29
+ const existing = groups.get(key);
30
+ const keys = [...new Set(entry.credentialKeys)];
31
+ if (existing) {
32
+ for (const credentialKey of keys) if (!existing.keys.includes(credentialKey)) existing.keys.push(credentialKey);
33
+ } else groups.set(key, {
34
+ credentialSetId: entry.credentialSetId,
35
+ scope: entry.scope ?? null,
36
+ keys
37
+ });
38
+ }
39
+ }
40
+ function groupCredentialRequirements(manifest) {
41
+ const groups = /* @__PURE__ */ new Map();
42
+ addEntriesToGroups(groups, collectCredentialRequirementEntries(manifest.credentials));
43
+ return [...groups.values()];
44
+ }
45
+ function buildScopes(params) {
46
+ const { scope, organizationId, projectId } = params;
47
+ switch (scope) {
48
+ case "organization":
49
+ if (!organizationId) throw new Error("organizationId is required when scope is organization");
50
+ return [{
51
+ scope: "organization",
52
+ organizationId
53
+ }];
54
+ case "project":
55
+ if (!projectId) throw new Error("projectId is required when scope is project");
56
+ return [{
57
+ scope: "project",
58
+ projectId
59
+ }];
60
+ case "user": return [{ scope: "user" }];
61
+ default: throw new Error(`Unknown scope: ${scope}`);
62
+ }
63
+ }
64
+ function buildListParams(params) {
65
+ const listParams = {
66
+ credentialSetId: params.credentialSetId,
67
+ scope: params.scope,
68
+ limit: 100,
69
+ offset: 0
70
+ };
71
+ if (params.scope === "project" && params.projectId) listParams.projectId = params.projectId;
72
+ return listParams;
73
+ }
74
+ function handleExistingMatch(match, params) {
75
+ if (params.updateExisting) return handleUpdateExisting(match, params);
76
+ if (!match.isDefault) return handleMarkDefault(match, params.client);
77
+ return Promise.resolve({
78
+ action: "unchanged",
79
+ credentialSetId: match.id
80
+ });
81
+ }
82
+ async function handleUpdateExisting(match, params) {
83
+ if (!match.isDefault) await params.client.credentials.update(match.id, { isDefault: true });
84
+ await params.client.credentials.updateValues(match.id, {
85
+ ...params.credentialConnectionId ? { credentialConnectionId: params.credentialConnectionId } : {},
86
+ values: params.values
87
+ });
88
+ return {
89
+ action: "updated-values",
90
+ credentialSetId: match.id
91
+ };
92
+ }
93
+ async function handleMarkDefault(match, client) {
94
+ await client.credentials.update(match.id, { isDefault: true });
95
+ return {
96
+ action: "marked-default",
97
+ credentialSetId: match.id
98
+ };
99
+ }
100
+ /** Ensures a credential set exists for the given integration and is marked as default. */
101
+ async function uploadCredential(params) {
102
+ const { client, credentialSetId, name, values, updateExisting = false } = params;
103
+ const scopes = buildScopes(params);
104
+ const listParams = buildListParams(params);
105
+ const match = ((await client.credentials.list(listParams)).credentialSets ?? []).find((credentialSet) => credentialSet.name === name);
106
+ if (match) return handleExistingMatch(match, {
107
+ updateExisting,
108
+ ...params.credentialConnectionId ? { credentialConnectionId: params.credentialConnectionId } : {},
109
+ values,
110
+ client
111
+ });
112
+ try {
113
+ const created = (await client.credentials.create({
114
+ credentialSetId,
115
+ ...params.credentialConnectionId ? { credentialConnectionId: params.credentialConnectionId } : {},
116
+ name,
117
+ scopes,
118
+ isDefault: true,
119
+ values,
120
+ ...params.schemaFingerprint ? { schemaFingerprint: params.schemaFingerprint } : {}
121
+ })).credentialSets?.[0];
122
+ if (created) return {
123
+ action: "created",
124
+ credentialSetId: created.id
125
+ };
126
+ throw new Error("Create succeeded but no credential set in response");
127
+ } catch (error) {
128
+ const message = error instanceof Error ? error.message : String(error);
129
+ if (message.includes("duplicate key") || message.includes("unique constraint")) {
130
+ const retryMatch = (await client.credentials.list(listParams)).credentialSets?.find((credentialSet) => credentialSet.name === name);
131
+ if (retryMatch) return handleExistingMatch(retryMatch, {
132
+ updateExisting,
133
+ values,
134
+ client
135
+ });
136
+ }
137
+ throw error;
138
+ }
139
+ }
140
+ /** Verifies that credentials are resolvable by calling the resolve endpoint. */
141
+ async function verifyCredentialResolvable(params) {
142
+ const { client, credentialSetId, keys, scope, projectId } = params;
143
+ const resolveParams = {
144
+ credentialSetId,
145
+ keys
146
+ };
147
+ if (scope) resolveParams.scope = scope;
148
+ if (projectId) resolveParams.projectId = projectId;
149
+ const response = await client.credentials.resolve(resolveParams);
150
+ const resolvedKeys = Object.keys(response.credentials ?? {});
151
+ return {
152
+ success: keys.every((key) => resolvedKeys.includes(key)),
153
+ resolvedKeys
154
+ };
155
+ }
156
+ /**
157
+ * Run the manual `validate` hook for an official integration's credential
158
+ * set, if one is defined.
159
+ *
160
+ * Returns `{ status: 'skipped' }` when the credential set has no hook or is
161
+ * not an official integration. User-authored credential sets get the
162
+ * skipped path today; a separate cluster will add server-side validation
163
+ * for workspace-authored integrations.
164
+ *
165
+ * @example
166
+ * ```ts
167
+ * const validation = await validateManualCredentialWithHook({
168
+ * credentialSetId: 'stripe',
169
+ * values: { STRIPE_SECRET_KEY: 'sk_live_...' },
170
+ * });
171
+ * if (validation.status === 'failed') {
172
+ * throw new Error(validation.error);
173
+ * }
174
+ * ```
175
+ *
176
+ * @throws Never. Errors thrown by the hook are normalized onto the result.
177
+ */
178
+ async function validateManualCredentialWithHook(params) {
179
+ return { status: "skipped" };
180
+ }
181
+ //#endregion
182
+ export { verifyCredentialResolvable as a, validateManualCredentialWithHook as i, resolveCredentialValuesFromEnv as n, uploadCredential as r, groupCredentialRequirements as t };
@@ -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-CGdYhH0p.mjs";
4
- import { t as createTypedCommand } from "./commander-DcftG6dX.mjs";
5
- import { n as CredentialScopeSchema, r as CredentialScopeValues } from "./schema-BgGlAs8a.mjs";
4
+ import { t as createTypedCommand } from "./commander-BwtBoukr.mjs";
5
+ import { i as CredentialScopeValues, r as CredentialScopeSchema } from "./schema-DFJiNWyd.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/commands/credentials/list/list.command.ts
8
8
  const ListOptionsSchema = JsonOptionSchema.extend({
@@ -21,7 +21,7 @@ const LIST_OPTIONS_CONFIG = {
21
21
  },
22
22
  credentialSetId: {
23
23
  flag: "--credential-set-id <id>",
24
- description: "Filter by credential set ID (e.g. keystroke:slack)"
24
+ description: "Filter by credential set ID (e.g. slack)"
25
25
  },
26
26
  projectId: {
27
27
  flag: "--project-id <id>",
@@ -46,7 +46,7 @@ function createCredentialsListCommand() {
46
46
  description: "List credential sets on the server",
47
47
  schema: ListOptionsSchema,
48
48
  optionsConfig: LIST_OPTIONS_CONFIG,
49
- loadHandler: async () => (await import("./list.handler-B6IByHHB.mjs")).handleCredentialsList
49
+ loadHandler: async () => (await import("./list.handler-DXl8igi2.mjs")).handleCredentialsList
50
50
  });
51
51
  }
52
52
  //#endregion
@@ -65,13 +65,14 @@ function createCredentialsRequirementsCommand() {
65
65
  description: "Show what credentials built workflows need (keys, KEYSTROKE_* env names, workflows) — from dist manifests, no API call",
66
66
  schema: RequirementsOptionsSchema,
67
67
  optionsConfig: REQUIREMENTS_OPTIONS_CONFIG,
68
- loadHandler: async () => (await import("./requirements.handler-CX13XiXT.mjs")).handleCredentialsRequirements
68
+ loadHandler: async () => (await import("./requirements.handler-CnDTBcH5.mjs")).handleCredentialsRequirements
69
69
  });
70
70
  }
71
71
  //#endregion
72
72
  //#region src/commands/credentials/upload/upload.command.ts
73
73
  const UploadOptionsSchema = JsonOptionSchema.extend({
74
74
  integration: z.string().optional(),
75
+ credentialConnectionId: z.string().optional().describe("Credential connection ID to use for catalog-backed uploads"),
75
76
  credentialSet: z.string().optional(),
76
77
  keys: z.string().optional(),
77
78
  name: z.string().optional(),
@@ -86,6 +87,10 @@ const UPLOAD_OPTIONS_CONFIG = {
86
87
  flag: "--integration <public-id>",
87
88
  description: "Official integration public ID (e.g. slack, github, linear). Derives the internal credential identity and keys automatically."
88
89
  },
90
+ credentialConnectionId: {
91
+ flag: "--credential-connection-id <id>",
92
+ description: "Credential connection ID to use for catalog-backed uploads"
93
+ },
89
94
  credentialSet: {
90
95
  flag: "--credential-set <id>",
91
96
  description: "Explicit custom credential set ID. Requires --keys."
@@ -121,7 +126,7 @@ function createCredentialsUploadCommand() {
121
126
  description: "Upload credentials from env vars to the server. Default: reads requirements from built workflow manifests. Use --integration for an official integration or --credential-set + --keys for a custom explicit upload.",
122
127
  schema: UploadOptionsSchema,
123
128
  optionsConfig: UPLOAD_OPTIONS_CONFIG,
124
- loadHandler: async () => (await import("./upload.handler-BFDM6n_6.mjs")).handleCredentialsUpload
129
+ loadHandler: async () => (await import("./upload.handler-DemogvI1.mjs")).handleCredentialsUpload
125
130
  });
126
131
  }
127
132
  //#endregion
@@ -152,7 +157,7 @@ function createCredentialsCommand() {
152
157
  }
153
158
  },
154
159
  handler: async (opts, ctx) => {
155
- const { handleCredentialsList } = await import("./list.handler-B6IByHHB.mjs");
160
+ const { handleCredentialsList } = await import("./list.handler-DXl8igi2.mjs");
156
161
  await handleCredentialsList({
157
162
  ...opts,
158
163
  scope: void 0,
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { M as WorkflowResolutionError, _ as getApiErrorCode, n as ui, v as getHttpStatus } from "./keystroke.mjs";
4
- import { t as assertWorkflowProjectRoot } from "./project-config-D9eFU8Jk.mjs";
5
- import { a as readManifestsFromOutDir } from "./dist-DvO0q6Fo.mjs";
6
- import { t as requireWorkflowsDir } from "./resolve-project-C6UAOfAG.mjs";
7
- import { t as createSpinnerProgress } from "./spinner-progress-Bt8zXPOc.mjs";
8
- import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Z2_jkOsZ.mjs";
4
+ import { t as assertWorkflowProjectRoot } from "./project-config-CJGSh2RQ.mjs";
5
+ import { a as readManifestsFromOutDir } from "./dist-BMkNN03r.mjs";
6
+ import { t as requireWorkflowsDir } from "./resolve-project-bVPMcs-y.mjs";
7
+ import { t as createSpinnerProgress } from "./spinner-progress-CS1BEdNB.mjs";
8
+ import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Cmu1TOFu.mjs";
9
9
  //#region src/commands/workflows/_shared/current-deployment-workflow.ts
10
10
  /**
11
11
  * Lightweight resolution: gets projectId from keystroke.config.ts and authoredWorkflowId
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as ui } from "./keystroke.mjs";
4
- import { i as requireClient } from "./context-1VgRbzr-.mjs";
4
+ import { i as requireClient } from "./context-DQ4IA0yO.mjs";
5
5
  //#region src/commands/org/current.handler.ts
6
6
  async function handleOrgCurrent(_options, ctx) {
7
7
  if (!ctx.organizationId) {
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { d as schemaToJsonSchema } from "./schema-B-Wgo4rJ.mjs";
4
3
  import "zod";
5
4
  import { createHash } from "node:crypto";
6
- //#region ../../packages/core/src/artifacts/schema-fingerprint.ts
5
+ //#region ../../packages/workflow-build-contracts/src/schema-fingerprint.ts
7
6
  /**
8
7
  * schema-fingerprint.ts
9
8
  *
@@ -62,7 +61,7 @@ function sortDeep(value) {
62
61
  return value;
63
62
  }
64
63
  //#endregion
65
- //#region ../../packages/core/src/shared/declared-credential-requirements.ts
64
+ //#region ../../packages/workflow-build-contracts/src/declared-credential-requirements.ts
66
65
  function readSchemaKeys(schema, propertyKey) {
67
66
  if (schema === null || typeof schema !== "object") return [];
68
67
  const candidate = schema[propertyKey];
@@ -80,53 +79,25 @@ function readOptionalJsonSchemaKeys(schema) {
80
79
  const requiredSet = new Set(Array.isArray(record.required) ? record.required : []);
81
80
  return Object.keys(properties).filter((key) => !requiredSet.has(key)).sort();
82
81
  }
83
- function toDeclaredCredentialRequirement(credentialSet) {
84
- const optionalAuthKeys = credentialSet.optionalCredentialKeys;
85
- const optionalStoredKeys = credentialSet.optionalStoredCredentialKeys;
86
- const schemaFingerprint = computeSchemaFingerprint(schemaToJsonSchema(credentialSet.auth), credentialSet.stored ? schemaToJsonSchema(credentialSet.stored) : void 0);
87
- const onCredentialRevoked = credentialSet.onCredentialRevoked;
88
- return {
89
- credentialSetId: credentialSet.id,
90
- ...credentialSet.namespace ? { namespace: credentialSet.namespace } : {},
91
- resolvedCredentialSetId: credentialSet.resolvedCredentialSetId,
92
- credentialKeys: [...credentialSet.credentialKeys],
93
- ...optionalAuthKeys.length > 0 ? { optionalCredentialKeys: [...optionalAuthKeys] } : {},
94
- storedCredentialKeys: [...credentialSet.storedCredentialKeys],
95
- ...optionalStoredKeys.length > 0 ? { optionalStoredCredentialKeys: [...optionalStoredKeys] } : {},
96
- schemaFingerprint,
97
- ...credentialSet.needsResolve ? { needsResolve: true } : {},
98
- ...credentialSet.resolveCacheMs > 0 ? { resolveCacheMs: credentialSet.resolveCacheMs } : {},
99
- ...onCredentialRevoked ? { onCredentialRevoked } : {},
100
- ...credentialSet.proxy ? { proxy: credentialSet.proxy } : {},
101
- ...credentialSet.needsRawSecret === true ? { needsRawSecret: true } : {}
102
- };
103
- }
104
- function toDeclaredCredentialRequirements(credentialSets) {
105
- return credentialSets.map(toDeclaredCredentialRequirement);
106
- }
107
82
  function manifestToDeclaredCredentialRequirement(credentialSet) {
108
83
  const authKeys = readSchemaKeys(credentialSet.auth, "properties");
109
84
  const optionalAuthKeys = readOptionalJsonSchemaKeys(credentialSet.auth);
110
- const storedSchema = credentialSet.stored ?? credentialSet.auth;
85
+ const storedSchema = credentialSet.auth;
111
86
  const storedKeys = readSchemaKeys(storedSchema, "properties");
112
87
  const optionalStoredKeys = readOptionalJsonSchemaKeys(storedSchema);
113
- const schemaFingerprint = credentialSet.auth ? computeSchemaFingerprint(credentialSet.auth, credentialSet.stored) : void 0;
88
+ const schemaFingerprint = credentialSet.auth ? computeSchemaFingerprint(credentialSet.auth) : void 0;
114
89
  const onCredentialRevoked = credentialSet.onCredentialRevoked;
115
90
  return {
116
91
  credentialSetId: credentialSet.id,
117
- ...credentialSet.namespace ? { namespace: credentialSet.namespace } : {},
118
- resolvedCredentialSetId: credentialSet.resolvedCredentialSetId,
119
92
  credentialKeys: authKeys,
120
93
  ...optionalAuthKeys.length > 0 ? { optionalCredentialKeys: optionalAuthKeys } : {},
121
94
  storedCredentialKeys: storedKeys,
122
95
  ...optionalStoredKeys.length > 0 ? { optionalStoredCredentialKeys: optionalStoredKeys } : {},
123
96
  ...schemaFingerprint ? { schemaFingerprint } : {},
124
- ...credentialSet.needsResolve ? { needsResolve: true } : {},
125
- ...typeof credentialSet.resolveCacheMs === "number" && credentialSet.resolveCacheMs > 0 ? { resolveCacheMs: credentialSet.resolveCacheMs } : {},
126
97
  ...onCredentialRevoked ? { onCredentialRevoked } : {},
127
98
  ...credentialSet.proxy ? { proxy: credentialSet.proxy } : {},
128
99
  ...credentialSet.needsRawSecret === true ? { needsRawSecret: true } : {}
129
100
  };
130
101
  }
131
102
  //#endregion
132
- export { readOptionalJsonSchemaKeys as n, toDeclaredCredentialRequirements as r, manifestToDeclaredCredentialRequirement as t };
103
+ export { readOptionalJsonSchemaKeys as n, manifestToDeclaredCredentialRequirement as t };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { N as throwReportedCliExit, n as ui, x as toErrorMessage } from "./keystroke.mjs";
4
- import { i as requireClient } from "./context-1VgRbzr-.mjs";
4
+ import { i as requireClient } from "./context-DQ4IA0yO.mjs";
5
5
  //#region src/commands/api-keys/delete.handler.ts
6
6
  async function handleApiKeysDelete(options, ctx) {
7
7
  const client = requireClient(ctx);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { a as createKyInstance, n as auth, r as bundles, s as getClientEnv, t as projects } from "./projects-DN7dX6nN.mjs";
3
+ import { a as createKyInstance, n as auth, r as bundles, s as getClientEnv, t as projects } from "./projects-CWLOF5x4.mjs";
4
4
  //#region ../../packages/workflow-sdk/src/deploy.ts
5
5
  function createDeployClient(config = {}) {
6
6
  const env = getClientEnv();
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { t as createTypedCommand } from "./commander-DcftG6dX.mjs";
3
+ import { t as createTypedCommand } from "./commander-BwtBoukr.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/commands/deploy/deploy.command.ts
6
6
  /**
@@ -64,7 +64,7 @@ function createDeployCommand() {
64
64
  schema: DeployOptionsSchema,
65
65
  optionsConfig: DEPLOY_OPTIONS_CONFIG,
66
66
  contextMode: "auth",
67
- loadHandler: async () => (await import("./deploy.handler-D1DcAe-h.mjs")).handleDeploy
67
+ loadHandler: async () => (await import("./deploy.handler-Bag7rBG-.mjs")).handleDeploy
68
68
  });
69
69
  cmd.enablePositionalOptions();
70
70
  cmd.passThroughOptions();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as ui } from "./keystroke.mjs";
4
- import { t as createSpinnerProgress } from "./spinner-progress-Bt8zXPOc.mjs";
4
+ import { t as createSpinnerProgress } from "./spinner-progress-CS1BEdNB.mjs";
5
5
  //#region src/lib/deploy-progress.ts
6
6
  function renderItemFailure(event, kind, spinner) {
7
7
  if (event.result === "failure") spinner.fail(`${kind} failed (${event.name})`, void 0, event.error);
@@ -2,16 +2,16 @@
2
2
 
3
3
  import { f as ANSI, k as CliExitError, n as ui, o as isLocalMode, p as style, u as logger } from "./keystroke.mjs";
4
4
  import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
- import { t as assertWorkflowProjectRoot } from "./project-config-D9eFU8Jk.mjs";
6
- import { r as requireAuthOptions, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-1VgRbzr-.mjs";
7
- import { i as readAgentManifestsFromOutDir, o as readWorkflowsFromDisk } from "./dist-DvO0q6Fo.mjs";
8
- import { t as requireWorkflowsDir } from "./resolve-project-C6UAOfAG.mjs";
9
- import { n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-Z2_jkOsZ.mjs";
10
- import { t as createBuildProgress } from "./build-progress-DigAP-BN.mjs";
11
- import { t as createDeployProgress } from "./deploy-progress-XAfautnA.mjs";
12
- import { t as withErrorBoundary } from "./error-boundary-CpaVvFXk.mjs";
13
- import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-B05z0EQa.mjs";
14
- import { t as computeWorkflowDiff } from "./diff-utils-AATn2n56.mjs";
5
+ import { t as assertWorkflowProjectRoot } from "./project-config-CJGSh2RQ.mjs";
6
+ import { r as requireAuthOptions, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-DQ4IA0yO.mjs";
7
+ import { i as readAgentManifestsFromOutDir, o as readWorkflowsFromDisk } from "./dist-BMkNN03r.mjs";
8
+ import { t as requireWorkflowsDir } from "./resolve-project-bVPMcs-y.mjs";
9
+ import { n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-Cmu1TOFu.mjs";
10
+ import { t as createBuildProgress } from "./build-progress-CITED2tv.mjs";
11
+ import { t as createDeployProgress } from "./deploy-progress-CLO-yidq.mjs";
12
+ import { t as withErrorBoundary } from "./error-boundary-B2ZKRkZI.mjs";
13
+ import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-zTmYbUjh.mjs";
14
+ import { t as computeWorkflowDiff } from "./diff-utils-BoXI705D.mjs";
15
15
  import { access } from "node:fs/promises";
16
16
  import path from "node:path";
17
17
  //#region src/commands/deploy/deploy-diff.ts
@@ -198,7 +198,7 @@ async function handleDeploy(options, ctx) {
198
198
  let outDir;
199
199
  let artifactFilter;
200
200
  try {
201
- const { runWorkflowBuild } = await import("./workflow-build-Z2_jkOsZ.mjs").then((n) => n.o);
201
+ const { runWorkflowBuild } = await import("./workflow-build-Cmu1TOFu.mjs").then((n) => n.o);
202
202
  const buildOutcome = await runWorkflowBuild({
203
203
  workflowsDir,
204
204
  verbose: options.verbose,
@@ -233,7 +233,7 @@ async function handleDeploy(options, ctx) {
233
233
  const progress = createDeployProgress();
234
234
  let result;
235
235
  try {
236
- result = await (deployHandlerDependencies.deployFromDir ?? (await import("./dist-DvO0q6Fo.mjs").then((n) => n.r)).deployFromDir)({
236
+ result = await (deployHandlerDependencies.deployFromDir ?? (await import("./dist-BMkNN03r.mjs").then((n) => n.r)).deployFromDir)({
237
237
  outDir,
238
238
  workflowsDir,
239
239
  client,
@@ -260,7 +260,7 @@ async function handleDeploy(options, ctx) {
260
260
  }
261
261
  async function handleTaskTargetDeploy(options) {
262
262
  renderBuildHeader(void 0);
263
- const buildResult = await (deployHandlerDependencies.buildTaskTargets ?? (await import("./task-target-build-D5IrHqSl.mjs")).buildTaskTargets)({
263
+ const buildResult = await (deployHandlerDependencies.buildTaskTargets ?? (await import("./task-target-build-atWwwnSF.mjs")).buildTaskTargets)({
264
264
  projectRoot: options.workflowsDir,
265
265
  targetFiles: options.targetFiles,
266
266
  disableSourcemaps: options.options.disableSourcemaps
@@ -278,7 +278,7 @@ async function handleTaskTargetDeploy(options) {
278
278
  const progress = createDeployProgress();
279
279
  let result;
280
280
  try {
281
- result = await (deployHandlerDependencies.deployTaskTargets ?? (await import("./task-target-deploy-Bzfftyru.mjs")).deployTaskTargets)({
281
+ result = await (deployHandlerDependencies.deployTaskTargets ?? (await import("./task-target-deploy-CRsrQTOy.mjs")).deployTaskTargets)({
282
282
  preparedTasks: buildResult.preparedTasks,
283
283
  client,
284
284
  organizationId: options.projectConfig.organizationId,
@@ -300,7 +300,7 @@ async function handleTaskTargetDeploy(options) {
300
300
  }
301
301
  async function createFullDeployClient(ctx) {
302
302
  const authOptions = requireAuthOptions(ctx);
303
- const { createClient } = await import("./src--fCtOxNX.mjs");
303
+ const { createClient } = await import("./src-D-dFmoAF.mjs");
304
304
  return createClient({
305
305
  ...authOptions,
306
306
  onRequest: (info) => logger.debug(`-> ${info.method} ${info.url}`, {
@@ -315,7 +315,7 @@ async function createFullDeployClient(ctx) {
315
315
  }
316
316
  async function createTaskDeployClient(ctx) {
317
317
  const authOptions = requireAuthOptions(ctx);
318
- return (deployHandlerDependencies.createDeployClient ?? (await import("./deploy-B8TYutOi.mjs")).createDeployClient)(authOptions);
318
+ return (deployHandlerDependencies.createDeployClient ?? (await import("./deploy-BvaFgVvf.mjs")).createDeployClient)(authOptions);
319
319
  }
320
320
  function renderSuccessSummary(result) {
321
321
  const tasks = result.tasks || [];
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
4
- import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-RuJszab7.mjs";
4
+ import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-3DMm_Sby.mjs";
5
5
  import path from "node:path";
6
6
  //#region ../../packages/workflow-builder/dist/detect-env-access-CwkOYeYM.mjs
7
7
  var detect_env_access_CwkOYeYM_exports = /* @__PURE__ */ __exportAll({
@@ -3,9 +3,9 @@
3
3
  import { N as throwReportedCliExit, k as CliExitError, n as ui, x as toErrorMessage } from "./keystroke.mjs";
4
4
  import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
5
  import { i as writeJson } from "./output-CGdYhH0p.mjs";
6
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-1VgRbzr-.mjs";
7
- import { n as resolveLocalWorkflowManifest, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-B05z0EQa.mjs";
8
- import { n as renderDiff, t as computeWorkflowDiff } from "./diff-utils-AATn2n56.mjs";
6
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-DQ4IA0yO.mjs";
7
+ import { n as resolveLocalWorkflowManifest, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-zTmYbUjh.mjs";
8
+ import { n as renderDiff, t as computeWorkflowDiff } from "./diff-utils-BoXI705D.mjs";
9
9
  //#region src/commands/workflows/diff/diff.handler.ts
10
10
  async function handleWorkflowsDiff(options, ctx) {
11
11
  const resolved = await resolveLocalWorkflowManifest(options.workflow, options.path, { jsonMode: ctx.jsonMode });
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
4
- import { t as assertWorkflowProjectRoot } from "./project-config-D9eFU8Jk.mjs";
5
- import { r as SHA256HashSchema } from "./common-B3bLe3Mk.mjs";
6
- import { f as collectCredentialRequirementEntries, l as TriggerUploadDataSchema } from "./credential-requirements-BCW8aQWS.mjs";
7
- import { a as FlowGraphSchema, i as WorkflowManifestSchema } from "./workflow-manifest-BfL74mjp.mjs";
8
- import { t as AgentVersionManifestSchema } from "./agent-manifest-sJFbH5H8.mjs";
9
- import { n as TaskBuildManifestSchema } from "./task-1qz1XNq7.mjs";
10
- import { n as FileMetadataSchema } from "./file-metadata-BvGM-B2v.mjs";
11
- import { t as computeProjectSnapshotHash } from "./task-target-deploy-Bf5i3ox1-2K0hAwzk.mjs";
12
- import { a as MANIFEST_FILE_NAME, d as getMetadataRoot, f as getTriggersDir, m as getWorkflowManifestPath, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-CXkZEsXI.mjs";
13
- import { n as resolveProjectBuildOutputDir } from "./utils-C_qCshBA.mjs";
14
- import { t as TriggerBuildManifestSchema } from "./trigger-manifest-B3Gq1739.mjs";
15
- import { t as batchUpload } from "./upload-C1qFWMm0.mjs";
4
+ import { t as assertWorkflowProjectRoot } from "./project-config-CJGSh2RQ.mjs";
5
+ import { n as SHA256HashSchema } from "./common-BaGFkj3n.mjs";
6
+ import { c as TriggerUploadDataSchema, d as collectCredentialRequirementEntries } from "./credential-requirements-FtBk5JVB.mjs";
7
+ import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-OPFqFD6f.mjs";
8
+ import { t as AgentVersionManifestSchema } from "./agent-manifest-CZdlCTFs.mjs";
9
+ import { n as TaskBuildManifestSchema } from "./task-BBgEvdG1.mjs";
10
+ import { n as FileMetadataSchema } from "./file-metadata-Dwy9KKq_.mjs";
11
+ import { t as computeProjectSnapshotHash } from "./task-target-deploy-CZBGNC0H-BwPSfaJQ.mjs";
12
+ import { a as MANIFEST_FILE_NAME, d as getMetadataRoot, f as getTriggersDir, m as getWorkflowManifestPath, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-DRf9qUf8.mjs";
13
+ import { n as resolveProjectBuildOutputDir } from "./utils-DpEtybzI.mjs";
14
+ import { t as TriggerBuildManifestSchema } from "./trigger-manifest-D5rnpPkA.mjs";
15
+ import { t as batchUpload } from "./upload-C0kaZu08.mjs";
16
16
  import { createReadStream } from "node:fs";
17
17
  import * as fs from "node:fs/promises";
18
18
  import { stat } from "node:fs/promises";
@@ -53,7 +53,7 @@ async function readManifestsFromOutDir(workflowsDir, ref) {
53
53
  const manifestPath = getWorkflowManifestPath(distDir, entry.name);
54
54
  try {
55
55
  const raw = await fs.readFile(manifestPath, "utf-8");
56
- const parsed = WorkflowManifestSchema.safeParse(JSON.parse(raw));
56
+ const parsed = WorkflowBuildManifestSchema.safeParse(JSON.parse(raw));
57
57
  if (!parsed.success) continue;
58
58
  if (ref === void 0) {
59
59
  all.push({
@@ -103,7 +103,7 @@ async function readAgentManifestsFromOutDir(workflowsDir) {
103
103
  return results;
104
104
  }
105
105
  /**
106
- * Collects `resolvedCredentialSetId` → `schemaFingerprint` from a built agent
106
+ * Collects `credentialDefinitionId` → `schemaFingerprint` from a built agent
107
107
  * manifest (top-level credential sets, MCP servers, and messaging gateways).
108
108
  */
109
109
  function collectSchemaFingerprintsFromAgentManifest(manifest) {
@@ -117,7 +117,7 @@ function collectSchemaFingerprintsFromAgentManifest(manifest) {
117
117
  return map;
118
118
  }
119
119
  /**
120
- * Builds `resolvedCredentialSetId` → `schemaFingerprint` from all workflow
120
+ * Builds `credentialDefinitionId` → `schemaFingerprint` from all workflow
121
121
  * manifests and agent version manifests under a project's build output dir.
122
122
  */
123
123
  async function collectCredentialFingerprintMapFromProjectDist(projectRoot) {
@@ -642,7 +642,7 @@ async function readWorkflowsFromDisk(outDir, options) {
642
642
  const artifactPaths = getWorkflowArtifactPaths(outDir, entryName);
643
643
  try {
644
644
  const manifestRaw = await fs.readFile(artifactPaths.manifestPath, "utf-8");
645
- const manifestData = WorkflowManifestSchema.parse(JSON.parse(manifestRaw));
645
+ const manifestData = WorkflowBuildManifestSchema.parse(JSON.parse(manifestRaw));
646
646
  if (filterSet && !filterSet.has(manifestData.name) && !filterSet.has(manifestData.id)) continue;
647
647
  const flowRaw = await fs.readFile(artifactPaths.flowPath, "utf-8");
648
648
  const flowData = FlowGraphSchema.parse(JSON.parse(flowRaw));
@@ -3,12 +3,12 @@
3
3
  import { N as throwReportedCliExit, b as isNetworkError, f as ANSI, g as REAUTH_HINT, k as CliExitError, n as ui, p as style, x as toErrorMessage, y as isAuthError } from "./keystroke.mjs";
4
4
  import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
5
  import { i as writeJson } from "./output-CGdYhH0p.mjs";
6
- import { i as requireClient } from "./context-1VgRbzr-.mjs";
7
- import { n as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-BgGlAs8a.mjs";
8
- import { a as readManifestsFromOutDir } from "./dist-DvO0q6Fo.mjs";
9
- import { t as requireWorkflowsDir } from "./resolve-project-C6UAOfAG.mjs";
10
- import { t as groupCredentialRequirements } from "./credentials-DAQfKqn0.mjs";
11
- import { t as getIntegrationCatalog } from "./integration-catalog-DtNWaMvh.mjs";
6
+ import { i as requireClient } from "./context-DQ4IA0yO.mjs";
7
+ import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-DFJiNWyd.mjs";
8
+ import { a as readManifestsFromOutDir } from "./dist-BMkNN03r.mjs";
9
+ import { t as requireWorkflowsDir } from "./resolve-project-bVPMcs-y.mjs";
10
+ import { t as getIntegrationCatalog } from "./integration-catalog-BRrJIAVz.mjs";
11
+ import { t as groupCredentialRequirements } from "./credentials-Bu1MBiCL.mjs";
12
12
  import { z } from "zod";
13
13
  import Table from "cli-table3";
14
14
  //#region ../../packages/shared-types/src/credentials/api/responses.ts
@@ -22,6 +22,7 @@ const CredentialSetResponseSchema = z.object({
22
22
  id: z.string(),
23
23
  organizationId: z.string(),
24
24
  credentialSetId: z.string(),
25
+ credentialConnectionId: CredentialConnectionIdSchema,
25
26
  name: z.string(),
26
27
  scope: CredentialScopeSchema,
27
28
  userId: z.string().nullable(),
@@ -94,6 +95,8 @@ z.discriminatedUnion("status", [z.object({
94
95
  status: z.literal("exchanged"),
95
96
  /** The credential set the server persisted values into. */
96
97
  credentialSetId: z.string(),
98
+ /** Selected acquisition path persisted on the credential set row. */
99
+ credentialConnectionId: CredentialConnectionIdSchema,
97
100
  /** Keys persisted from the exchange hook's returned `stored` payload. */
98
101
  keys: z.array(z.string()),
99
102
  /** ISO timestamp when the stored payload expires, if any. */
@@ -267,7 +270,7 @@ async function readCredentialResolutionError(error) {
267
270
  }
268
271
  function getCredentialSourceLabel(catalog, credentialSetId) {
269
272
  if (!credentialSetId) return null;
270
- return catalog.byResolvedCredentialSetId.get(credentialSetId)?.label ?? credentialSetId;
273
+ return catalog.byCredentialDefinitionId.get(credentialSetId)?.label ?? credentialSetId;
271
274
  }
272
275
  function addWorkflowFix(fixes, fix) {
273
276
  if (fixes.some((existing) => existing.summary === fix.summary)) return;
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { b as isNetworkError, k as CliExitError, n as ui, u as logger, x as toErrorMessage } from "./keystroke.mjs";
4
4
  import { r as isJsonMode } from "./output-CGdYhH0p.mjs";
5
- import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-DM9Y91jL.mjs";
5
+ import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-8pqwvswO.mjs";
6
6
  //#region src/lib/error-boundary.ts
7
7
  async function withErrorBoundary(commandName, fn, options = {}) {
8
8
  const jsonMode = options.json ?? isJsonMode({});