@camunda8/cli 4.7.0-alpha.20 → 4.7.0-alpha.22

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 (91) hide show
  1. package/PLUGIN-HELP.md +1 -1
  2. package/README.md +0 -3
  3. package/dist/command-dispatch.d.ts.map +1 -1
  4. package/dist/command-dispatch.js +0 -8
  5. package/dist/command-dispatch.js.map +1 -1
  6. package/dist/commands/run.d.ts +0 -5
  7. package/dist/commands/run.d.ts.map +1 -1
  8. package/dist/commands/run.js +1 -9
  9. package/dist/commands/run.js.map +1 -1
  10. package/dist/core/errors.d.ts +17 -0
  11. package/dist/core/errors.d.ts.map +1 -1
  12. package/dist/core/errors.js +32 -0
  13. package/dist/core/errors.js.map +1 -1
  14. package/dist/default-plugins/modeler/README.md +12 -0
  15. package/dist/default-plugins/modeler/c8ctl-plugin.js +3042 -0
  16. package/dist/default-plugins/modeler/package.json +8 -0
  17. package/dist/default-plugins/setup/README.md +36 -0
  18. package/dist/default-plugins/setup/c8ctl-plugin.js +6423 -0
  19. package/dist/default-plugins/setup/package.json +8 -0
  20. package/dist/default-plugins/skills/README.md +27 -0
  21. package/dist/default-plugins/skills/c8ctl-plugin.js +985 -0
  22. package/dist/default-plugins/skills/package.json +8 -0
  23. package/dist/framework/argv-parser.d.ts +14 -0
  24. package/dist/framework/argv-parser.d.ts.map +1 -1
  25. package/dist/framework/argv-parser.js +25 -0
  26. package/dist/framework/argv-parser.js.map +1 -1
  27. package/dist/framework/command-registry.d.ts +0 -76
  28. package/dist/framework/command-registry.d.ts.map +1 -1
  29. package/dist/framework/command-registry.js +0 -161
  30. package/dist/framework/command-registry.js.map +1 -1
  31. package/dist/framework/plugins/plugin-loader.d.ts +20 -2
  32. package/dist/framework/plugins/plugin-loader.d.ts.map +1 -1
  33. package/dist/framework/plugins/plugin-loader.js.map +1 -1
  34. package/dist/framework/ui/help.d.ts.map +1 -1
  35. package/dist/framework/ui/help.js +26 -13
  36. package/dist/framework/ui/help.js.map +1 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +64 -11
  39. package/dist/index.js.map +1 -1
  40. package/dist/utils/command-local/mcp-install-helpers.d.ts +17 -0
  41. package/dist/utils/command-local/mcp-install-helpers.d.ts.map +1 -1
  42. package/dist/utils/command-local/mcp-install-helpers.js +23 -9
  43. package/dist/utils/command-local/mcp-install-helpers.js.map +1 -1
  44. package/dist/utils/command-local/process-instance-helpers.d.ts +6 -0
  45. package/dist/utils/command-local/process-instance-helpers.d.ts.map +1 -1
  46. package/dist/utils/command-local/process-instance-helpers.js +9 -0
  47. package/dist/utils/command-local/process-instance-helpers.js.map +1 -1
  48. package/dist/utils/command-local/skills-install-helpers.d.ts.map +1 -1
  49. package/dist/utils/command-local/skills-install-helpers.js +99 -1
  50. package/dist/utils/command-local/skills-install-helpers.js.map +1 -1
  51. package/dist/utils/index.d.ts +0 -6
  52. package/dist/utils/index.d.ts.map +1 -1
  53. package/dist/utils/index.js +0 -6
  54. package/dist/utils/index.js.map +1 -1
  55. package/package.json +1 -1
  56. package/dist/commands/modeler.d.ts +0 -10
  57. package/dist/commands/modeler.d.ts.map +0 -1
  58. package/dist/commands/modeler.js +0 -604
  59. package/dist/commands/modeler.js.map +0 -1
  60. package/dist/commands/setup.d.ts +0 -39
  61. package/dist/commands/setup.d.ts.map +0 -1
  62. package/dist/commands/setup.js +0 -856
  63. package/dist/commands/setup.js.map +0 -1
  64. package/dist/commands/skills.d.ts +0 -2
  65. package/dist/commands/skills.d.ts.map +0 -1
  66. package/dist/commands/skills.js +0 -38
  67. package/dist/commands/skills.js.map +0 -1
  68. package/dist/utils/command-local/blueprint-scaffold.d.ts +0 -151
  69. package/dist/utils/command-local/blueprint-scaffold.d.ts.map +0 -1
  70. package/dist/utils/command-local/blueprint-scaffold.js +0 -547
  71. package/dist/utils/command-local/blueprint-scaffold.js.map +0 -1
  72. package/dist/utils/command-local/modeler-helpers.d.ts +0 -15
  73. package/dist/utils/command-local/modeler-helpers.d.ts.map +0 -1
  74. package/dist/utils/command-local/modeler-helpers.js +0 -67
  75. package/dist/utils/command-local/modeler-helpers.js.map +0 -1
  76. package/dist/utils/command-local/setup-detectors.d.ts +0 -51
  77. package/dist/utils/command-local/setup-detectors.d.ts.map +0 -1
  78. package/dist/utils/command-local/setup-detectors.js +0 -115
  79. package/dist/utils/command-local/setup-detectors.js.map +0 -1
  80. package/dist/utils/command-local/setup-helpers.d.ts +0 -179
  81. package/dist/utils/command-local/setup-helpers.d.ts.map +0 -1
  82. package/dist/utils/command-local/setup-helpers.js +0 -374
  83. package/dist/utils/command-local/setup-helpers.js.map +0 -1
  84. package/dist/utils/command-local/setup-prerequisites.d.ts +0 -67
  85. package/dist/utils/command-local/setup-prerequisites.d.ts.map +0 -1
  86. package/dist/utils/command-local/setup-prerequisites.js +0 -238
  87. package/dist/utils/command-local/setup-prerequisites.js.map +0 -1
  88. package/dist/utils/command-local/setup-removal.d.ts +0 -37
  89. package/dist/utils/command-local/setup-removal.d.ts.map +0 -1
  90. package/dist/utils/command-local/setup-removal.js +0 -82
  91. package/dist/utils/command-local/setup-removal.js.map +0 -1
@@ -1,238 +0,0 @@
1
- /**
2
- * Prerequisite checks for `c8ctl setup`: Node.js version, operating
3
- * system and architecture, and network access to the Camunda 8 Run
4
- * download host.
5
- *
6
- * Inputs (versions, platform, fetch, environment) are parameters with
7
- * the real runtime as the default, so every outcome is testable.
8
- */
9
- import { readFileSync } from "node:fs";
10
- import { join } from "node:path";
11
- import semver from "semver";
12
- /**
13
- * Pages for setting Camunda up by hand, for anyone who cannot meet a
14
- * prerequisite. Unversioned docs.camunda.io URLs resolve to the current
15
- * release.
16
- */
17
- export const MANUAL_SETUP_LINKS = [
18
- {
19
- label: "Run your first process without c8ctl",
20
- url: "https://docs.camunda.io/docs/guides/getting-started-hello-world/",
21
- },
22
- {
23
- label: "Install and start Camunda 8 Run",
24
- url: "https://docs.camunda.io/docs/self-managed/quickstart/developer-quickstart/c8run/install-start/",
25
- },
26
- {
27
- label: "Install Desktop Modeler",
28
- url: "https://docs.camunda.io/docs/components/modeler/desktop-modeler/install-the-modeler/",
29
- },
30
- ];
31
- // ── Node.js ────────────────────────────────────────────────────────
32
- function readRequiredNodeRange() {
33
- try {
34
- // src/utils/command-local/ and dist/utils/command-local/ are both
35
- // three levels below the package root.
36
- const pkg = JSON.parse(readFileSync(join(import.meta.dirname, "..", "..", "..", "package.json"), "utf-8"));
37
- const engines = pkg && typeof pkg === "object" && "engines" in pkg
38
- ? pkg.engines
39
- : undefined;
40
- const node = engines && typeof engines === "object" && "node" in engines
41
- ? engines.node
42
- : undefined;
43
- return typeof node === "string" ? node : undefined;
44
- }
45
- catch {
46
- return undefined;
47
- }
48
- }
49
- /** The Node.js range from c8ctl's `engines.node`, the one npm enforces. */
50
- export const REQUIRED_NODE_RANGE = readRequiredNodeRange();
51
- export function checkNodeVersion({ version = process.versions.node, range = REQUIRED_NODE_RANGE, } = {}) {
52
- const title = "Node.js version";
53
- if (!range) {
54
- return { id: "node", title, ok: true, detail: `Node.js ${version}.` };
55
- }
56
- const ok = semver.satisfies(version, range, { includePrerelease: true });
57
- return ok
58
- ? { id: "node", title, ok, detail: `Node.js ${version}.` }
59
- : {
60
- id: "node",
61
- title,
62
- ok,
63
- detail: `Node.js ${version} is installed; c8ctl needs ${range}.`,
64
- hint: "Install a supported Node.js release from https://nodejs.org/en/download, then run c8ctl setup again.",
65
- };
66
- }
67
- // ── Platform ───────────────────────────────────────────────────────
68
- /**
69
- * Platform and architecture pairs Camunda 8 Run is published for: exactly
70
- * the darwin-aarch64, darwin-x86_64, linux-x86_64 and windows-x86_64
71
- * builds on the Camunda Download Center. Other pairs, including Linux and
72
- * Windows on arm64, have no build to download.
73
- */
74
- const SUPPORTED_ARCHS_BY_PLATFORM = {
75
- darwin: ["x64", "arm64"],
76
- linux: ["x64"],
77
- win32: ["x64"],
78
- };
79
- export function checkPlatform({ platform = process.platform, arch = process.arch, } = {}) {
80
- const title = "Operating system";
81
- const ok = Object.hasOwn(SUPPORTED_ARCHS_BY_PLATFORM, platform) &&
82
- SUPPORTED_ARCHS_BY_PLATFORM[platform].includes(arch);
83
- return ok
84
- ? { id: "platform", title, ok, detail: `${platform} ${arch}.` }
85
- : {
86
- id: "platform",
87
- title,
88
- ok,
89
- detail: `Camunda 8 Run is not available for ${platform} ${arch}.`,
90
- hint: "Camunda 8 Run is available for macOS (x64, arm64), Linux (x64) and Windows (x64).",
91
- };
92
- }
93
- // ── Network ────────────────────────────────────────────────────────
94
- const DEFAULT_DOWNLOAD_URL = "https://downloads.camunda.cloud/release/camunda/c8run/";
95
- const DEFAULT_NETWORK_TIMEOUT_MS = 10_000;
96
- /** The download base URL, honouring the same mirror override as the cluster plugin. */
97
- function downloadBaseUrl(env) {
98
- return (env.C8CTL_C8RUN_DOWNLOAD_URL || DEFAULT_DOWNLOAD_URL).replace(/\/*$/, "/");
99
- }
100
- /**
101
- * A URL safe to print, redacted like the cluster plugin's download URLs:
102
- * credentials become `***`, and a query string or fragment `?<redacted>`.
103
- */
104
- function displayUrl(url) {
105
- try {
106
- const parsed = new URL(url);
107
- if (parsed.username || parsed.password) {
108
- parsed.username = "***";
109
- parsed.password = "";
110
- }
111
- const query = parsed.search || parsed.hash ? "?<redacted>" : "";
112
- parsed.search = "";
113
- parsed.hash = "";
114
- return `${parsed.toString()}${query}`;
115
- }
116
- catch {
117
- return "(invalid URL)";
118
- }
119
- }
120
- /** Why a download URL cannot work, as the cluster plugin reports it, or undefined. */
121
- function downloadUrlProblem(url) {
122
- let parsed;
123
- try {
124
- parsed = new URL(url);
125
- }
126
- catch {
127
- return "not a valid URL";
128
- }
129
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
130
- return `unsupported protocol ${parsed.protocol} (use http or https)`;
131
- }
132
- if (parsed.username || parsed.password) {
133
- return "the URL contains credentials, which fetch() does not send";
134
- }
135
- return undefined;
136
- }
137
- /** The first error code in an error's cause chain, e.g. ENOTFOUND. */
138
- function causeCode(error) {
139
- for (let current = error, depth = 0; current && depth < 5; depth++) {
140
- if (typeof current !== "object")
141
- return undefined;
142
- if ("code" in current && typeof current.code === "string") {
143
- return current.code;
144
- }
145
- current = "cause" in current ? current.cause : undefined;
146
- }
147
- return undefined;
148
- }
149
- function networkHint(env) {
150
- if (env.C8CTL_C8RUN_DOWNLOAD_URL) {
151
- return ("C8CTL_C8RUN_DOWNLOAD_URL points the download at a mirror. Make sure that " +
152
- "server is reachable, or unset it to use the Camunda Download Center.");
153
- }
154
- if ((env.HTTPS_PROXY || env.https_proxy) && env.NODE_USE_ENV_PROXY !== "1") {
155
- return ("HTTPS_PROXY is set, but Node.js only uses it when NODE_USE_ENV_PROXY=1 is " +
156
- "set as well (Node.js 22.21+ or 24.5+). Set NODE_USE_ENV_PROXY=1 and try again.");
157
- }
158
- return ("Check your network connection. Behind a proxy? Set HTTPS_PROXY together with " +
159
- "NODE_USE_ENV_PROXY=1 (Node.js 22.21+ or 24.5+).");
160
- }
161
- /**
162
- * Check that the Camunda 8 Run download host answers. Any HTTP response,
163
- * including a redirect, counts as reachable; a connection failure, a
164
- * timeout, or a download URL that cannot work fails.
165
- */
166
- export async function checkNetwork({ fetch = globalThis.fetch, env = process.env, timeoutMs = DEFAULT_NETWORK_TIMEOUT_MS, } = {}) {
167
- const title = "Network access";
168
- const url = downloadBaseUrl(env);
169
- const shown = displayUrl(url);
170
- const problem = downloadUrlProblem(url);
171
- if (problem) {
172
- return {
173
- id: "network",
174
- title,
175
- ok: false,
176
- detail: `Cannot use ${shown}: ${problem}.`,
177
- hint: networkHint(env),
178
- };
179
- }
180
- // A referenced timer rather than AbortSignal.timeout(), whose timer is
181
- // unreferenced: the timeout must fire even when nothing else keeps the
182
- // event loop alive, or a stalled request could end the process early.
183
- const controller = new AbortController();
184
- let timedOut = false;
185
- const timer = setTimeout(() => {
186
- timedOut = true;
187
- controller.abort();
188
- }, timeoutMs);
189
- try {
190
- // A redirect is an answer from the host, so it is not followed.
191
- await fetch(url, {
192
- method: "HEAD",
193
- redirect: "manual",
194
- signal: controller.signal,
195
- });
196
- return { id: "network", title, ok: true, detail: `${shown} is reachable.` };
197
- }
198
- catch (error) {
199
- // Never the error's message: it can repeat the URL, credentials included.
200
- const reason = timedOut
201
- ? `timed out after ${timeoutMs / 1000}s`
202
- : (causeCode(error) ?? "connection failed");
203
- return {
204
- id: "network",
205
- title,
206
- ok: false,
207
- detail: `Could not reach ${shown} (${reason}).`,
208
- hint: networkHint(env),
209
- };
210
- }
211
- finally {
212
- clearTimeout(timer);
213
- }
214
- }
215
- // ── All checks ─────────────────────────────────────────────────────
216
- export async function checkPrerequisites(options = {}) {
217
- return [
218
- checkNodeVersion(options),
219
- checkPlatform(options),
220
- await checkNetwork(options),
221
- ];
222
- }
223
- /** Explain the failed checks and point at the manual setup instead. */
224
- export function formatPrerequisiteFailures(results) {
225
- const failed = results.filter((result) => !result.ok);
226
- return [
227
- "c8ctl setup cannot continue:",
228
- "",
229
- ...failed.flatMap((result) => [
230
- ` ✗ ${result.title}: ${result.detail}`,
231
- ...(result.hint ? [` ${result.hint}`] : []),
232
- ]),
233
- "",
234
- "To set up Camunda by hand instead:",
235
- ...MANUAL_SETUP_LINKS.map((link) => ` ${link.label}: ${link.url}`),
236
- ].join("\n");
237
- }
238
- //# sourceMappingURL=setup-prerequisites.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup-prerequisites.js","sourceRoot":"","sources":["../../../src/utils/command-local/setup-prerequisites.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAsB5B;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAGzB;IACL;QACC,KAAK,EAAE,sCAAsC;QAC7C,GAAG,EAAE,kEAAkE;KACvE;IACD;QACC,KAAK,E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YACb,KAAK;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,mBAAmB,KAAK,KAAK,MAAM,IAAI;YAC/C,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC;SACtB,CAAC;IACH,CAAC;YAAS,CAAC;QACV,YAAY,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AACF,CAAC;AAED,sEAAsE;AAEtE,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,UAQI,EAAE;IAEN,OAAO;QACN,gBAAgB,CAAC,OAAO,CAAC;QACzB,aAAa,CAAC,OAAO,CAAC;QACtB,MAAM,YAAY,CAAC,OAAO,CAAC;KAC3B,CAAC;AACH,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,0BAA0B,CACzC,OAAsC;IAEtC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtD,OAAO;QACN,8BAA8B;QAC9B,EAAE;QACF,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;YAC7B,OAAO,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,MAAM,EAAE;YACvC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9C,CAAC;QACF,EAAE;QACF,oCAAoC;QACpC,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC;KACnE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC"}
@@ -1,37 +0,0 @@
1
- import { type SetupBlueprintRemoval } from "./blueprint-scaffold.ts";
2
- import { type McpConfigPlan } from "./mcp-install-helpers.ts";
3
- import { type CamundaSkillInstallation } from "./skills-install-helpers.ts";
4
- export interface SetupMcpRemoval {
5
- readonly plan: McpConfigPlan;
6
- readonly servers: readonly string[];
7
- readonly preservedServers: readonly string[];
8
- }
9
- export interface SetupSkillDiscoveryFailure {
10
- readonly harness: string;
11
- readonly message: string;
12
- }
13
- export interface SetupMcpPlanningFailure {
14
- readonly harness: string;
15
- readonly message: string;
16
- }
17
- export interface SetupBlueprintPlanningFailure {
18
- readonly directory: string;
19
- readonly message: string;
20
- }
21
- export interface SetupRemovalInventory {
22
- readonly mcp: readonly SetupMcpRemoval[];
23
- readonly mcpPlanningFailures: readonly SetupMcpPlanningFailure[];
24
- readonly skills: readonly CamundaSkillInstallation[];
25
- readonly skillDiscoveryFailures: readonly SetupSkillDiscoveryFailure[];
26
- readonly blueprints: readonly SetupBlueprintRemoval[];
27
- readonly blueprintPlanningFailures: readonly SetupBlueprintPlanningFailure[];
28
- }
29
- /**
30
- * Inspect setup-managed artifacts without changing them. MCP plans use an
31
- * explicit harness list so teardown can find entries even if a harness is no
32
- * longer detected by its executable.
33
- */
34
- export declare function inspectSetupRemovalInventory({ cwd, }?: {
35
- cwd?: string;
36
- }): Promise<SetupRemovalInventory>;
37
- //# sourceMappingURL=setup-removal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup-removal.d.ts","sourceRoot":"","sources":["../../../src/utils/command-local/setup-removal.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,qBAAqB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EACN,KAAK,wBAAwB,EAK7B,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,6BAA6B;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,GAAG,EAAE,SAAS,eAAe,EAAE,CAAC;IACzC,QAAQ,CAAC,mBAAmB,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACjE,QAAQ,CAAC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACrD,QAAQ,CAAC,sBAAsB,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACvE,QAAQ,CAAC,UAAU,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACtD,QAAQ,CAAC,yBAAyB,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC7E;AASD;;;;GAIG;AACH,wBAAsB,4BAA4B,CAAC,EAClD,GAAmB,GACnB,GAAE;IACF,GAAG,CAAC,EAAE,MAAM,CAAC;CACR,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAuEtC"}
@@ -1,82 +0,0 @@
1
- import { planSetupBlueprintRemovals, } from "./blueprint-scaffold.js";
2
- import { planMcpConfigs } from "./mcp-install-helpers.js";
3
- import { camundaSkillRemovalPath, detectInstalledHarnesses, hasCamundaUserSkillsDirectory, listCamundaSkills, } from "./skills-install-helpers.js";
4
- const SETUP_MCP_HARNESSES = [
5
- "claude-code",
6
- "github-copilot",
7
- "cursor",
8
- "vscode",
9
- ];
10
- /**
11
- * Inspect setup-managed artifacts without changing them. MCP plans use an
12
- * explicit harness list so teardown can find entries even if a harness is no
13
- * longer detected by its executable.
14
- */
15
- export async function inspectSetupRemovalInventory({ cwd = process.cwd(), } = {}) {
16
- const mcpHarnesses = process.platform === "darwin" || process.platform === "win32"
17
- ? [...SETUP_MCP_HARNESSES, "claude-desktop"]
18
- : [...SETUP_MCP_HARNESSES];
19
- const mcpPlanningFailures = [];
20
- const plans = planMcpConfigs({
21
- requested: mcpHarnesses,
22
- operation: "uninstall",
23
- docs: true,
24
- orchestration: true,
25
- alias: "camunda",
26
- preserveConflicts: true,
27
- onError: (harness, error) => {
28
- mcpPlanningFailures.push({
29
- harness,
30
- message: error instanceof Error ? error.message : String(error),
31
- });
32
- },
33
- });
34
- const mcp = plans
35
- .map((plan) => ({
36
- plan,
37
- servers: plan.changes
38
- .filter((change) => change.status === "removed")
39
- .map((change) => change.server),
40
- preservedServers: plan.changes
41
- .filter((change) => change.status === "preserved")
42
- .map((change) => change.server),
43
- }))
44
- .filter((entry) => entry.servers.length > 0 || entry.preservedServers.length > 0);
45
- const skills = [];
46
- const skillDiscoveryFailures = [];
47
- for (const harness of detectInstalledHarnesses()) {
48
- try {
49
- if (!hasCamundaUserSkillsDirectory(harness))
50
- continue;
51
- const discovered = await listCamundaSkills(harness);
52
- for (const skill of discovered)
53
- camundaSkillRemovalPath(skill);
54
- skills.push(...discovered);
55
- }
56
- catch (error) {
57
- skillDiscoveryFailures.push({
58
- harness,
59
- message: error instanceof Error ? error.message : String(error),
60
- });
61
- }
62
- }
63
- const blueprintPlanningFailures = [];
64
- const blueprints = planSetupBlueprintRemovals({
65
- cwd,
66
- onError: (directory, error) => {
67
- blueprintPlanningFailures.push({
68
- directory,
69
- message: error instanceof Error ? error.message : String(error),
70
- });
71
- },
72
- });
73
- return {
74
- mcp,
75
- mcpPlanningFailures,
76
- skills,
77
- skillDiscoveryFailures,
78
- blueprints,
79
- blueprintPlanningFailures,
80
- };
81
- }
82
- //# sourceMappingURL=setup-removal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup-removal.js","sourceRoot":"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