@camunda8/cli 4.7.0-alpha.26 → 4.7.0-alpha.28
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.
- package/dist/default-plugins/cluster/README.md +1 -1
- package/dist/default-plugins/cluster/c8ctl-plugin.js +98 -32
- package/dist/default-plugins/modeler/README.md +3 -2
- package/dist/default-plugins/modeler/c8ctl-plugin.js +27 -17
- package/dist/default-plugins/setup/README.md +2 -2
- package/dist/default-plugins/setup/c8ctl-plugin.js +7 -7
- package/dist/default-plugins/skills/README.md +3 -2
- package/dist/default-plugins/skills/c8ctl-plugin.js +25 -19
- package/package.json +1 -1
|
@@ -77,7 +77,7 @@ patch releases.
|
|
|
77
77
|
|
|
78
78
|
### `start` vs `install` update behavior
|
|
79
79
|
|
|
80
|
-
- **`start`** uses the local version if available. A non-blocking remote check runs in the background — if a newer rolling release exists, a hint is printed (e.g. *"A newer server version is available. Install it with: c8ctl cluster install 8.9"*). If the network is unreachable, the hint is silently skipped.
|
|
80
|
+
- **`start`** uses the local version if available. A non-blocking remote check runs in the background — if a newer rolling release exists, a hint is printed (e.g. *"A newer server version is available. Install it with: c8ctl cluster install 8.9"*). If the network is unreachable, the hint is silently skipped. When starting a named alias (`stable`, `alpha`) whose newer target is already installed (e.g. via `c8ctl cluster install 8.10`), the check instead updates the cached alias so the next `start` uses that version, without downloading anything. If `start` fails, c8ctl waits up to one second for these checks before exiting, so the hint is not lost.
|
|
81
81
|
- **`install`** always checks the remote for a newer rolling release (via ETag comparison) and re-downloads if one is available.
|
|
82
82
|
|
|
83
83
|
If the download server is unreachable, the aliases fall back to the values
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { once } from 'node:events';
|
|
28
28
|
import { chmod } from 'node:fs/promises';
|
|
29
29
|
import { homedir, platform as osPlatform, arch as osArch } from 'node:os';
|
|
30
|
-
import { join, dirname, isAbsolute, resolve } from 'node:path';
|
|
30
|
+
import { join, dirname, basename, isAbsolute, resolve } from 'node:path';
|
|
31
31
|
import { finished } from 'node:stream/promises';
|
|
32
32
|
import { StringDecoder } from 'node:string_decoder';
|
|
33
33
|
import { fileURLToPath } from 'node:url';
|
|
@@ -215,37 +215,57 @@ function readLocalAliasMapping(cacheDir, alias) {
|
|
|
215
215
|
const filePath = getAliasMappingPath(cacheDir, alias);
|
|
216
216
|
if (!existsSync(filePath)) return null;
|
|
217
217
|
try {
|
|
218
|
-
const value = readFileSync(filePath, 'utf-8').trim();
|
|
219
218
|
// Only use the cached mapping if the version is actually installed
|
|
220
|
-
|
|
221
|
-
if (isC8RunInstalled(config)) return value;
|
|
222
|
-
|
|
223
|
-
// For rolling versions (minor version patterns like "8.9"), check if any
|
|
224
|
-
// installed version matches the minor version prefix (e.g. "8.9" matches
|
|
225
|
-
// "8.9.5"). This prevents re-downloading a rolling alias when a compatible
|
|
226
|
-
// pinned version is already installed locally (#431).
|
|
227
|
-
if (isMinorVersionPattern(value)) {
|
|
228
|
-
const installedVersions = getInstalledVersionsList(cacheDir)
|
|
229
|
-
.sort((a, b) => a.localeCompare(b, undefined, { numeric: true }));
|
|
230
|
-
const match = installedVersions
|
|
231
|
-
.filter((v) => v.startsWith(value + '.'))
|
|
232
|
-
.reverse()
|
|
233
|
-
.find((v) => isC8RunInstalled({ cacheDir, version: v }));
|
|
234
|
-
if (match) return match;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return null;
|
|
219
|
+
return findInstalledAliasTarget(cacheDir, readFileSync(filePath, 'utf-8').trim(), alias);
|
|
238
220
|
} catch {
|
|
239
221
|
return null;
|
|
240
222
|
}
|
|
241
223
|
}
|
|
242
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Return the installed version that satisfies an alias target, or null.
|
|
227
|
+
* An exact install wins; for a rolling minor pattern ("8.9") the highest
|
|
228
|
+
* installed pin in that minor line ("8.9.5") also counts, so a compatible
|
|
229
|
+
* pinned install is not re-downloaded (#431). For `stable`, an install whose
|
|
230
|
+
* build is a prerelease never counts — whether pinned ("c8run-8.10.0-alpha1")
|
|
231
|
+
* or a rolling dir that still holds an alpha build ("c8run-8.10/c8run-8.10.0-alpha1").
|
|
232
|
+
*/
|
|
233
|
+
function findInstalledAliasTarget(cacheDir, value, alias) {
|
|
234
|
+
const accepts = (version) => {
|
|
235
|
+
const binaryPath = findC8RunBinaryPath({ cacheDir, version });
|
|
236
|
+
if (!binaryPath) return false;
|
|
237
|
+
return alias !== 'stable' || !isPrereleaseBuild(basename(dirname(binaryPath)));
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
if (accepts(value)) return value;
|
|
241
|
+
|
|
242
|
+
if (isMinorVersionPattern(value)) {
|
|
243
|
+
const installedVersions = getInstalledVersionsList(cacheDir)
|
|
244
|
+
.sort((a, b) => a.localeCompare(b, undefined, { numeric: true }));
|
|
245
|
+
const match = installedVersions
|
|
246
|
+
.filter((v) => v.startsWith(value + '.'))
|
|
247
|
+
.reverse()
|
|
248
|
+
.find(accepts);
|
|
249
|
+
if (match) return match;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** True for a build dir like "c8run-8.10.0-alpha1" (anything with a semver prerelease suffix). */
|
|
256
|
+
function isPrereleaseBuild(buildDirName) {
|
|
257
|
+
return /^c8run-\d+\.\d+(\.\d+)?-/.test(buildDirName);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/** Persist an alias mapping. Returns false if it could not be written. */
|
|
243
261
|
export function storeLocalAliasMapping(cacheDir, alias, resolved) {
|
|
244
262
|
try {
|
|
245
263
|
mkdirSync(cacheDir, { recursive: true });
|
|
246
264
|
writeFileSync(getAliasMappingPath(cacheDir, alias), resolved);
|
|
265
|
+
return true;
|
|
247
266
|
} catch {
|
|
248
267
|
// Best-effort — don't break the command if we can't persist
|
|
268
|
+
return false;
|
|
249
269
|
}
|
|
250
270
|
}
|
|
251
271
|
|
|
@@ -270,16 +290,21 @@ export function _resetDynamicAliasCache() {
|
|
|
270
290
|
}
|
|
271
291
|
|
|
272
292
|
/**
|
|
273
|
-
* Non-blocking background check: query the remote download server and
|
|
274
|
-
*
|
|
293
|
+
* Non-blocking background check: query the remote download server and act
|
|
294
|
+
* if the remote alias resolves to a newer minor than the one being started.
|
|
295
|
+
*
|
|
296
|
+
* - Newer version already installed (e.g. via `cluster install 8.10`): the
|
|
297
|
+
* persisted alias mapping is advanced to it, so the *next* `start` uses it.
|
|
298
|
+
* Nothing is downloaded — the user already chose to install that version.
|
|
299
|
+
* - Newer version not installed: only a hint is printed; the mapping is left
|
|
300
|
+
* alone so `start` never silently switches to a version it would have to
|
|
301
|
+
* download.
|
|
275
302
|
*
|
|
276
|
-
*
|
|
277
|
-
* updated when the user explicitly runs `cluster install`, keeping `start`
|
|
278
|
-
* deterministic across runs.
|
|
303
|
+
* The current run is never affected: it has already resolved its version.
|
|
279
304
|
*
|
|
280
305
|
* Returns the fire-and-forget promise (for testing).
|
|
281
306
|
*/
|
|
282
|
-
export function checkBackgroundAliasFreshness(versionSpec, resolvedVersion) {
|
|
307
|
+
export function checkBackgroundAliasFreshness(versionSpec, resolvedVersion, cacheDir) {
|
|
283
308
|
const logger = getLogger();
|
|
284
309
|
const controller = new AbortController();
|
|
285
310
|
const timeoutId = setTimeout(() => controller.abort(), 5000);
|
|
@@ -290,7 +315,22 @@ export function checkBackgroundAliasFreshness(versionSpec, resolvedVersion) {
|
|
|
290
315
|
if (html) {
|
|
291
316
|
const remote = parseVersionsFromHtml(html);
|
|
292
317
|
const remoteVersion = remote?.[versionSpec];
|
|
293
|
-
if (remoteVersion
|
|
318
|
+
if (!remoteVersion || !isRemoteMinorNewer(remoteVersion, resolvedVersion)) return;
|
|
319
|
+
const installed = cacheDir && findInstalledAliasTarget(cacheDir, remoteVersion, versionSpec);
|
|
320
|
+
if (installed) {
|
|
321
|
+
if (storeLocalAliasMapping(cacheDir, versionSpec, remoteVersion)) {
|
|
322
|
+
logger.info(
|
|
323
|
+
`"${versionSpec}" now resolves to ${remoteVersion}, which is already installed. ` +
|
|
324
|
+
`The next "c8ctl cluster start ${versionSpec}" will use it.`,
|
|
325
|
+
);
|
|
326
|
+
} else {
|
|
327
|
+
// Name the exact install: a plain "8.10" would look for c8run-8.10 and download it.
|
|
328
|
+
logger.info(
|
|
329
|
+
`"${versionSpec}" now resolves to ${remoteVersion}, which is already installed, ` +
|
|
330
|
+
`but the cached alias could not be updated. Start it with: c8ctl cluster start ${installed}`,
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
} else {
|
|
294
334
|
logger.info(
|
|
295
335
|
`A newer "${versionSpec}" release is available (${remoteVersion}). ` +
|
|
296
336
|
`Install it with: c8ctl cluster install ${versionSpec}`,
|
|
@@ -315,6 +355,25 @@ function fireAndForget(promise) {
|
|
|
315
355
|
return promise.catch(() => {});
|
|
316
356
|
}
|
|
317
357
|
|
|
358
|
+
/**
|
|
359
|
+
* Give the background `start` hints (alias freshness, rolling update) a short,
|
|
360
|
+
* bounded chance to print before a failed start calls process.exit(), which
|
|
361
|
+
* would otherwise drop them mid-flight. A failed start is when a newer version
|
|
362
|
+
* is most worth knowing about.
|
|
363
|
+
*/
|
|
364
|
+
export async function flushStartHints(config, timeoutMs = 1000) {
|
|
365
|
+
const pending = [config?._aliasHintPromise, config?._hintPromise].filter(Boolean);
|
|
366
|
+
if (pending.length === 0) return;
|
|
367
|
+
let timer;
|
|
368
|
+
await Promise.race([
|
|
369
|
+
Promise.all(pending),
|
|
370
|
+
new Promise((resolve) => {
|
|
371
|
+
timer = setTimeout(resolve, timeoutMs);
|
|
372
|
+
}),
|
|
373
|
+
]);
|
|
374
|
+
clearTimeout(timer);
|
|
375
|
+
}
|
|
376
|
+
|
|
318
377
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
319
378
|
|
|
320
379
|
// ---------------------------------------------------------------------------
|
|
@@ -1716,9 +1775,13 @@ async function startC8Run(config, debug = false, startArgs = []) {
|
|
|
1716
1775
|
});
|
|
1717
1776
|
|
|
1718
1777
|
if (typeof proc.pid !== 'number') {
|
|
1778
|
+
// spawn() reports this failure via an async 'error' event; without a
|
|
1779
|
+
// listener it would crash the process while the hints are flushed below.
|
|
1780
|
+
proc.on('error', (err) => logger.error(`Failed to spawn c8run: ${err.message}`));
|
|
1719
1781
|
logger.error('Failed to start cluster process: no PID received from c8run.');
|
|
1720
1782
|
logger.error(`Check logs in: ${logDir}`);
|
|
1721
1783
|
logger.info(`Print logs with: cat "${logDir}"/*.log`, { essential: true });
|
|
1784
|
+
await flushStartHints(config);
|
|
1722
1785
|
process.exit(1);
|
|
1723
1786
|
}
|
|
1724
1787
|
|
|
@@ -1772,6 +1835,7 @@ async function startC8Run(config, debug = false, startArgs = []) {
|
|
|
1772
1835
|
logger.error(
|
|
1773
1836
|
`c8run start exited with code ${exitCode ?? 'unknown'}${exitSignal ? ` (signal: ${exitSignal})` : ''}. Cluster will not be marked as running.`,
|
|
1774
1837
|
);
|
|
1838
|
+
await flushStartHints(config);
|
|
1775
1839
|
process.exit(typeof exitCode === 'number' && exitCode > 0 ? exitCode : 1);
|
|
1776
1840
|
}
|
|
1777
1841
|
|
|
@@ -3821,11 +3885,6 @@ export const commands = {
|
|
|
3821
3885
|
logger.info(`Resolved alias "${versionSpec}" → ${version}`);
|
|
3822
3886
|
}
|
|
3823
3887
|
|
|
3824
|
-
// For start with a named alias, check in the background whether the
|
|
3825
|
-
// remote resolves to a different (newer) version and hint if so.
|
|
3826
|
-
if (isStart && isVersionAlias(versionSpec)) {
|
|
3827
|
-
checkBackgroundAliasFreshness(versionSpec, version);
|
|
3828
|
-
}
|
|
3829
3888
|
const rolling = isRollingVersion(versionSpec);
|
|
3830
3889
|
const config = {
|
|
3831
3890
|
cacheDir: theCacheDir,
|
|
@@ -3839,12 +3898,19 @@ export const commands = {
|
|
|
3839
3898
|
verbose: ctx?.verbose === true,
|
|
3840
3899
|
};
|
|
3841
3900
|
|
|
3901
|
+
// For start with a named alias, check in the background whether the
|
|
3902
|
+
// remote resolves to a different (newer) version and hint if so.
|
|
3903
|
+
if (isStart && isVersionAlias(versionSpec)) {
|
|
3904
|
+
config._aliasHintPromise = checkBackgroundAliasFreshness(versionSpec, version, theCacheDir);
|
|
3905
|
+
}
|
|
3906
|
+
|
|
3842
3907
|
if (parsed.subcommand === 'start') {
|
|
3843
3908
|
try {
|
|
3844
3909
|
await ensureC8RunInstalled(config);
|
|
3845
3910
|
await startC8Run(config, parsed.debug, parsed.startArgs);
|
|
3846
3911
|
} catch (error) {
|
|
3847
3912
|
logger.error(`Failed to start cluster: ${formatErrorWithCause(error)}`);
|
|
3913
|
+
await flushStartHints(config);
|
|
3848
3914
|
process.exit(1);
|
|
3849
3915
|
}
|
|
3850
3916
|
} else if (parsed.subcommand === 'stop') {
|
|
@@ -12,8 +12,9 @@ Default c8ctl plugin that manages Camunda Desktop Modeler.
|
|
|
12
12
|
- `c8ctl modeler update` — update through Homebrew, winget, or the direct
|
|
13
13
|
release installation method. Reports when the installation is already up to
|
|
14
14
|
date.
|
|
15
|
-
- `c8ctl modeler
|
|
16
|
-
remove the direct app/release installation
|
|
15
|
+
- `c8ctl modeler uninstall` — uninstall through the matching package manager or
|
|
16
|
+
remove the direct app/release installation (`modeler remove` remains a
|
|
17
|
+
compatibility alias). Linux file-type registrations
|
|
17
18
|
are removed with Modeler's bundled XDG unregister script. Unmanaged
|
|
18
19
|
installations are left untouched: direct macOS bundles in `/Applications` or
|
|
19
20
|
`~/Applications` must be signed by Camunda, Windows installs must be managed by
|
|
@@ -3613,7 +3613,7 @@ function removeWindowsModeler(ctx) {
|
|
|
3613
3613
|
verifyExpectedRemovalTarget(ctx, removalTarget);
|
|
3614
3614
|
if (ctx.isDryRun) {
|
|
3615
3615
|
return dryRunResult(
|
|
3616
|
-
"modeler
|
|
3616
|
+
"modeler uninstall",
|
|
3617
3617
|
"Dry run: would remove Camunda Modeler with `winget uninstall --id Camunda.Modeler --exact --source winget`.",
|
|
3618
3618
|
removalTarget
|
|
3619
3619
|
);
|
|
@@ -3677,7 +3677,7 @@ async function updateLinuxModeler(ctx) {
|
|
|
3677
3677
|
if (!installation) return noModelerInstalled();
|
|
3678
3678
|
if (!existsSync(join3(installation.installDir, LINUX_EXECUTABLE))) {
|
|
3679
3679
|
throw new Error(
|
|
3680
|
-
`Camunda Modeler ${installation.version} is only partially installed: ${join3(installation.installDir, LINUX_EXECUTABLE)} is missing. Run \`c8ctl modeler
|
|
3680
|
+
`Camunda Modeler ${installation.version} is only partially installed: ${join3(installation.installDir, LINUX_EXECUTABLE)} is missing. Run \`c8ctl modeler uninstall\` to clean up, then \`c8ctl modeler install\` to install it again.`
|
|
3681
3681
|
);
|
|
3682
3682
|
}
|
|
3683
3683
|
const tempDir = mkdtempSync(join3(tmpdir(), "c8ctl-modeler-"));
|
|
@@ -3847,7 +3847,7 @@ function removeLinuxModeler(ctx) {
|
|
|
3847
3847
|
verifyExpectedRemovalTarget(ctx, removalTarget);
|
|
3848
3848
|
if (ctx.isDryRun) {
|
|
3849
3849
|
return dryRunResult(
|
|
3850
|
-
"modeler
|
|
3850
|
+
"modeler uninstall",
|
|
3851
3851
|
`Dry run: would remove Camunda Modeler ${installation.version} from ${installation.installDir} and unregister its file types.`,
|
|
3852
3852
|
removalTarget
|
|
3853
3853
|
);
|
|
@@ -3903,7 +3903,7 @@ async function removeMacModeler(ctx) {
|
|
|
3903
3903
|
);
|
|
3904
3904
|
}
|
|
3905
3905
|
return dryRunResult(
|
|
3906
|
-
"modeler
|
|
3906
|
+
"modeler uninstall",
|
|
3907
3907
|
"Dry run: would remove Camunda Modeler with `brew uninstall --cask camunda-modeler`.",
|
|
3908
3908
|
removalTarget2
|
|
3909
3909
|
);
|
|
@@ -3934,7 +3934,7 @@ async function removeMacModeler(ctx) {
|
|
|
3934
3934
|
verifyMacModelerBundle(appPath, "remove", ctx.quiet);
|
|
3935
3935
|
if (ctx.isDryRun) {
|
|
3936
3936
|
return dryRunResult(
|
|
3937
|
-
"modeler
|
|
3937
|
+
"modeler uninstall",
|
|
3938
3938
|
`Dry run: would remove the Camunda Modeler app bundle at ${appPath}.`,
|
|
3939
3939
|
removalTarget
|
|
3940
3940
|
);
|
|
@@ -3964,7 +3964,7 @@ async function removeDesktopModeler(ctx) {
|
|
|
3964
3964
|
}
|
|
3965
3965
|
if (process.platform === "darwin") return removeMacModeler(ctx);
|
|
3966
3966
|
throw new Error(
|
|
3967
|
-
`c8ctl modeler
|
|
3967
|
+
`c8ctl modeler uninstall currently supports macOS, Windows, and Linux only. Download Modeler manually from ${MANUAL_DOWNLOAD_URL}`
|
|
3968
3968
|
);
|
|
3969
3969
|
}
|
|
3970
3970
|
|
|
@@ -3986,8 +3986,12 @@ var metadata = {
|
|
|
3986
3986
|
description: "Update Camunda Desktop Modeler to the latest stable release"
|
|
3987
3987
|
},
|
|
3988
3988
|
{
|
|
3989
|
-
name: "
|
|
3989
|
+
name: "uninstall",
|
|
3990
3990
|
description: "Remove a c8ctl-managed Camunda Desktop Modeler installation"
|
|
3991
|
+
},
|
|
3992
|
+
{
|
|
3993
|
+
name: "remove",
|
|
3994
|
+
description: "Alias for uninstall"
|
|
3991
3995
|
}
|
|
3992
3996
|
],
|
|
3993
3997
|
examples: [
|
|
@@ -4000,7 +4004,7 @@ var metadata = {
|
|
|
4000
4004
|
description: "Update Camunda Desktop Modeler"
|
|
4001
4005
|
},
|
|
4002
4006
|
{
|
|
4003
|
-
command: "c8ctl modeler
|
|
4007
|
+
command: "c8ctl modeler uninstall --dry-run",
|
|
4004
4008
|
description: "Preview removal of Camunda Desktop Modeler"
|
|
4005
4009
|
}
|
|
4006
4010
|
]
|
|
@@ -4027,13 +4031,14 @@ async function modelerHandler(args, _flags, ctx) {
|
|
|
4027
4031
|
const action = args[0];
|
|
4028
4032
|
if (action === void 0) {
|
|
4029
4033
|
logger.info(
|
|
4030
|
-
"\nUsage: c8ctl modeler <install|update|
|
|
4034
|
+
"\nUsage: c8ctl modeler <install|update|uninstall>\n\nAvailable commands:\n install\n update\n uninstall",
|
|
4031
4035
|
{ essential: true }
|
|
4032
4036
|
);
|
|
4033
4037
|
process.exitCode = 1;
|
|
4034
4038
|
return;
|
|
4035
4039
|
}
|
|
4036
|
-
|
|
4040
|
+
const canonicalAction = action === "remove" ? "uninstall" : action;
|
|
4041
|
+
if (canonicalAction !== "install" && canonicalAction !== "update" && canonicalAction !== "uninstall") {
|
|
4037
4042
|
logger.error(`Unknown command: modeler ${args.join(" ")}`);
|
|
4038
4043
|
logger.info('Run "c8 help" for usage information', { essential: true });
|
|
4039
4044
|
process.exitCode = 1;
|
|
@@ -4043,13 +4048,13 @@ async function modelerHandler(args, _flags, ctx) {
|
|
|
4043
4048
|
const operation = {
|
|
4044
4049
|
install: installDesktopModeler,
|
|
4045
4050
|
update: updateDesktopModeler,
|
|
4046
|
-
|
|
4047
|
-
}[
|
|
4051
|
+
uninstall: removeDesktopModeler
|
|
4052
|
+
}[canonicalAction];
|
|
4048
4053
|
const result = await operation({
|
|
4049
4054
|
isDryRun: ctx.dryRun,
|
|
4050
4055
|
logger,
|
|
4051
4056
|
quiet: ctx.quiet,
|
|
4052
|
-
...
|
|
4057
|
+
...canonicalAction === "uninstall" ? {
|
|
4053
4058
|
expectedRemovalTarget: expectedRemovalTargetFromEnvironment()
|
|
4054
4059
|
} : {}
|
|
4055
4060
|
});
|
|
@@ -4057,7 +4062,7 @@ async function modelerHandler(args, _flags, ctx) {
|
|
|
4057
4062
|
kind: "dryRun",
|
|
4058
4063
|
info: {
|
|
4059
4064
|
dryRun: true,
|
|
4060
|
-
command: `modeler ${
|
|
4065
|
+
command: `modeler ${canonicalAction}`,
|
|
4061
4066
|
message: result.message,
|
|
4062
4067
|
wouldChange: false
|
|
4063
4068
|
}
|
|
@@ -4070,9 +4075,14 @@ async function modelerHandler(args, _flags, ctx) {
|
|
|
4070
4075
|
logger.success(normalized.message);
|
|
4071
4076
|
}
|
|
4072
4077
|
} catch (error) {
|
|
4073
|
-
renderCommandFailure(
|
|
4074
|
-
|
|
4075
|
-
|
|
4078
|
+
renderCommandFailure(
|
|
4079
|
+
logger,
|
|
4080
|
+
`Failed to ${canonicalAction} Camunda Modeler`,
|
|
4081
|
+
error,
|
|
4082
|
+
{
|
|
4083
|
+
verbose: ctx.verbose
|
|
4084
|
+
}
|
|
4085
|
+
);
|
|
4076
4086
|
process.exitCode = 1;
|
|
4077
4087
|
}
|
|
4078
4088
|
}
|
|
@@ -27,10 +27,10 @@ Children run pinned to text output; their progress is buffered and surfaces
|
|
|
27
27
|
only when a step fails.
|
|
28
28
|
|
|
29
29
|
Removal orchestrates the same owners: the unified preview is built from
|
|
30
|
-
shared inspection helpers and a `modeler
|
|
30
|
+
shared inspection helpers and a `modeler uninstall --dry-run` probe, and after
|
|
31
31
|
one confirmation the actual teardown runs as child commands —
|
|
32
32
|
`c8ctl mcp uninstall` per harness,
|
|
33
|
-
`c8ctl skills
|
|
33
|
+
`c8ctl skills uninstall --harness <harness> --yes`, and `c8ctl modeler uninstall`.
|
|
34
34
|
|
|
35
35
|
## Flags
|
|
36
36
|
|
|
@@ -5666,19 +5666,19 @@ function captureC8ctlJson(argv) {
|
|
|
5666
5666
|
async function detectModelerRemoval() {
|
|
5667
5667
|
const payload = await captureC8ctlJson([
|
|
5668
5668
|
"modeler",
|
|
5669
|
-
"
|
|
5669
|
+
"uninstall",
|
|
5670
5670
|
"--dry-run"
|
|
5671
5671
|
]);
|
|
5672
5672
|
if (!isRecord(payload) || typeof payload.wouldChange !== "boolean") {
|
|
5673
5673
|
throw new Error(
|
|
5674
|
-
'modeler
|
|
5674
|
+
'modeler uninstall --dry-run returned an invalid response: expected a boolean "wouldChange" field.'
|
|
5675
5675
|
);
|
|
5676
5676
|
}
|
|
5677
5677
|
if (!payload.wouldChange) return void 0;
|
|
5678
5678
|
const removalTarget = payload.removalTarget;
|
|
5679
5679
|
if (!isRecord(removalTarget) || typeof removalTarget.method !== "string" || removalTarget.method.length === 0 || typeof removalTarget.path !== "string" || removalTarget.path.length === 0) {
|
|
5680
5680
|
throw new Error(
|
|
5681
|
-
'modeler
|
|
5681
|
+
'modeler uninstall --dry-run returned an invalid response: expected a "removalTarget" object with nonempty "method" and "path".'
|
|
5682
5682
|
);
|
|
5683
5683
|
}
|
|
5684
5684
|
return {
|
|
@@ -6001,7 +6001,7 @@ async function executePlan(ctx, selected, blueprintId, { color }) {
|
|
|
6001
6001
|
function modelerRemovalLine(message) {
|
|
6002
6002
|
const match = /^Dry run: would remove (.+)$/.exec(message);
|
|
6003
6003
|
if (match) return `Remove ${match[1]}`;
|
|
6004
|
-
return `Remove Camunda Desktop Modeler with \`c8ctl modeler
|
|
6004
|
+
return `Remove Camunda Desktop Modeler with \`c8ctl modeler uninstall\` (${message})`;
|
|
6005
6005
|
}
|
|
6006
6006
|
function setupRemovalPreview(inventory, stopCluster) {
|
|
6007
6007
|
const items = [];
|
|
@@ -6182,7 +6182,7 @@ async function applySetupRemoval(ctx, inventory, stopCluster) {
|
|
|
6182
6182
|
ctx,
|
|
6183
6183
|
[
|
|
6184
6184
|
"skills",
|
|
6185
|
-
"
|
|
6185
|
+
"uninstall",
|
|
6186
6186
|
...names,
|
|
6187
6187
|
"--harness",
|
|
6188
6188
|
harness,
|
|
@@ -6202,7 +6202,7 @@ async function applySetupRemoval(ctx, inventory, stopCluster) {
|
|
|
6202
6202
|
}
|
|
6203
6203
|
if (inventory.modeler) {
|
|
6204
6204
|
try {
|
|
6205
|
-
await spawnC8ctl(ctx, ["modeler", "
|
|
6205
|
+
await spawnC8ctl(ctx, ["modeler", "uninstall"], {
|
|
6206
6206
|
promoteStdoutLine: (line) => line.includes("Modeler"),
|
|
6207
6207
|
// Registration-cleanup warnings and failure diagnostics ride
|
|
6208
6208
|
// stderr — keep them visible in quiet removal runs.
|
|
@@ -6465,7 +6465,7 @@ A run without a selection (piped output, CI) installs nothing unless you pass --
|
|
|
6465
6465
|
|
|
6466
6466
|
Exit code 0: every selected setup step succeeded, or nothing was installed for lack of a go-ahead (wizard cancelled with Escape; a piped, --quiet or JSON-mode run without --yes; --json or --dry-run printing the plan). Ctrl+C ends the wizard by signal (130 on POSIX shells). A re-run reuses finished work where possible; the deploy, process start and skills install repeat by design. Exit code 1: arguments failed validation, or a step failed \u2014 other eligible steps still ran, while dependents (and the deploy finale after any failure) were skipped.
|
|
6467
6467
|
|
|
6468
|
-
--remove shows setup-managed MCP entries, Camunda skills, a c8ctl-managed Desktop Modeler installation, and marker-listed blueprint files before removing them. Confirm in the interactive prompt or pass --yes in non-interactive use. --json and --dry-run print only the removal preview. Removal runs the owning commands: mcp uninstall, skills
|
|
6468
|
+
--remove shows setup-managed MCP entries, Camunda skills, a c8ctl-managed Desktop Modeler installation, and marker-listed blueprint files before removing them. Confirm in the interactive prompt or pass --yes in non-interactive use. --json and --dry-run print only the removal preview. Removal runs the owning commands: mcp uninstall, skills uninstall, and modeler uninstall. Local edits in skill folders and listed blueprint files are removed; untracked blueprint files are kept. --remove cannot be combined with --modeler, --no-modeler, or --docs-mcp.
|
|
6469
6469
|
|
|
6470
6470
|
--stop-cluster is available only with --remove. It stops the local cluster without purging runtime data or deleting downloaded binaries.
|
|
6471
6471
|
|
|
@@ -12,9 +12,10 @@ harnesses.
|
|
|
12
12
|
GitHub CLI agent ID.
|
|
13
13
|
- `c8ctl skills list [--harness <agent-id>]` — list installed Camunda skills
|
|
14
14
|
and their harnesses and paths.
|
|
15
|
-
- `c8ctl skills
|
|
15
|
+
- `c8ctl skills uninstall [name...] [--skill-path <path>...] [--harness <agent-id>]`
|
|
16
16
|
— preview and remove installed Camunda skills from the detected harnesses
|
|
17
|
-
or one selected harness
|
|
17
|
+
or one selected harness (`skills remove` remains a compatibility alias).
|
|
18
|
+
Naming skills removes matching installations; an
|
|
18
19
|
unknown name fails before anything is deleted. To select one installation
|
|
19
20
|
when a name exists at multiple paths, pair each positional name with one
|
|
20
21
|
`--skill-path` value in the same order. Unknown name/path pairs fail before
|
|
@@ -2698,7 +2698,7 @@ var metadata = {
|
|
|
2698
2698
|
Requires GitHub CLI 2.95 or later; its skill commands are in preview.
|
|
2699
2699
|
Re-run to update the same skill directories without duplicates when upstream changes. Local edits to up-to-date skills are preserved; upstream updates may replace edited files.
|
|
2700
2700
|
To restore one skill's upstream files, use \`gh skill update --force --dir <skills-root> <skill-name>\`; pass the parent skills directory (for example \`~/.claude/skills\`), not the listed skill directory. Find names with \`gh skill list --scope user --agent <agent-id>\`. Extra local files are retained.
|
|
2701
|
-
Use \`skills list\` to inspect installed skills and \`skills
|
|
2701
|
+
Use \`skills list\` to inspect installed skills and \`skills uninstall\` to remove them (\`skills remove\` remains a compatibility alias). Removal deletes the full skill directories, including local edits. Name one or more skills to remove only those; unknown names fail before anything is deleted. When a name is installed at multiple paths, pair each positional name with a matching \`--skill-path\` value to remove only that installation. Use a GitHub CLI agent ID for --harness; see \`gh skill install --help\` for supported IDs. Pass \`--yes\` for non-interactive removal; \`--dry-run\` previews without deleting.`,
|
|
2702
2702
|
subcommands: [
|
|
2703
2703
|
{
|
|
2704
2704
|
name: "install",
|
|
@@ -2709,8 +2709,12 @@ Use \`skills list\` to inspect installed skills and \`skills remove\` to remove
|
|
|
2709
2709
|
description: "List installed Camunda skills by harness"
|
|
2710
2710
|
},
|
|
2711
2711
|
{
|
|
2712
|
-
name: "
|
|
2712
|
+
name: "uninstall",
|
|
2713
2713
|
description: "Remove installed Camunda skills"
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
name: "remove",
|
|
2717
|
+
description: "Alias for uninstall"
|
|
2714
2718
|
}
|
|
2715
2719
|
],
|
|
2716
2720
|
examples: [
|
|
@@ -2731,15 +2735,15 @@ Use \`skills list\` to inspect installed skills and \`skills remove\` to remove
|
|
|
2731
2735
|
description: "List installed Camunda skills by harness"
|
|
2732
2736
|
},
|
|
2733
2737
|
{
|
|
2734
|
-
command: "c8ctl skills
|
|
2738
|
+
command: "c8ctl skills uninstall --dry-run",
|
|
2735
2739
|
description: "Preview Camunda skills removal"
|
|
2736
2740
|
},
|
|
2737
2741
|
{
|
|
2738
|
-
command: "c8ctl skills
|
|
2742
|
+
command: "c8ctl skills uninstall camunda-c8ctl --yes",
|
|
2739
2743
|
description: "Remove only the named Camunda skills"
|
|
2740
2744
|
},
|
|
2741
2745
|
{
|
|
2742
|
-
command: "c8ctl skills
|
|
2746
|
+
command: "c8ctl skills uninstall --harness claude-code --yes",
|
|
2743
2747
|
description: "Remove Camunda skills from Claude Code"
|
|
2744
2748
|
}
|
|
2745
2749
|
]
|
|
@@ -2827,7 +2831,7 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
2827
2831
|
try {
|
|
2828
2832
|
if (ctx.unrecognizedFlags && ctx.unrecognizedFlags.length > 0) {
|
|
2829
2833
|
throw new Error(
|
|
2830
|
-
`Unknown flag${ctx.unrecognizedFlags.length === 1 ? "" : "s"} ${ctx.unrecognizedFlags.join(", ")} for 'skills
|
|
2834
|
+
`Unknown flag${ctx.unrecognizedFlags.length === 1 ? "" : "s"} ${ctx.unrecognizedFlags.join(", ")} for 'skills uninstall'. Only --harness and --skill-path are supported removal selectors; fix or remove the flag before deleting skills.`
|
|
2831
2835
|
);
|
|
2832
2836
|
}
|
|
2833
2837
|
const swallowed = ctx.suspiciousFlagValues?.[0];
|
|
@@ -2897,7 +2901,7 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
2897
2901
|
path
|
|
2898
2902
|
}));
|
|
2899
2903
|
const preview = {
|
|
2900
|
-
command: "skills
|
|
2904
|
+
command: "skills uninstall",
|
|
2901
2905
|
action: "remove",
|
|
2902
2906
|
preview: true,
|
|
2903
2907
|
items
|
|
@@ -2910,7 +2914,7 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
2910
2914
|
if (ctx.outputMode === "json") {
|
|
2911
2915
|
emitRowsJson(
|
|
2912
2916
|
ctx,
|
|
2913
|
-
{ command: "skills
|
|
2917
|
+
{ command: "skills uninstall", harnesses, removed: [] },
|
|
2914
2918
|
[]
|
|
2915
2919
|
);
|
|
2916
2920
|
} else {
|
|
@@ -2959,7 +2963,7 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
2959
2963
|
const command = [
|
|
2960
2964
|
"c8ctl",
|
|
2961
2965
|
"skills",
|
|
2962
|
-
"
|
|
2966
|
+
"uninstall",
|
|
2963
2967
|
...requestedNames,
|
|
2964
2968
|
...requestedHarness ? ["--harness", requestedHarness] : [],
|
|
2965
2969
|
"--yes"
|
|
@@ -2986,7 +2990,7 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
2986
2990
|
throw new Error(
|
|
2987
2991
|
`The installed-skills inventory changed after the preview: ${stale.map((skill) => `"${skill.name}" (${skill.path})`).join(
|
|
2988
2992
|
", "
|
|
2989
|
-
)}. Run "c8ctl skills
|
|
2993
|
+
)}. Run "c8ctl skills uninstall" again for a fresh preview before deleting.`
|
|
2990
2994
|
);
|
|
2991
2995
|
}
|
|
2992
2996
|
const removed = [];
|
|
@@ -3002,7 +3006,7 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
3002
3006
|
if (ctx.outputMode === "json") {
|
|
3003
3007
|
emitRowsJson(
|
|
3004
3008
|
ctx,
|
|
3005
|
-
{ command: "skills
|
|
3009
|
+
{ command: "skills uninstall", removed: skillRows(removed) },
|
|
3006
3010
|
skillRows(removed)
|
|
3007
3011
|
);
|
|
3008
3012
|
} else {
|
|
@@ -3027,7 +3031,7 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
3027
3031
|
}
|
|
3028
3032
|
if (failures.length > 0) process.exitCode = 1;
|
|
3029
3033
|
} catch (error) {
|
|
3030
|
-
renderCommandFailure(logger, "Failed to skills
|
|
3034
|
+
renderCommandFailure(logger, "Failed to skills uninstall", error, {
|
|
3031
3035
|
verbose: ctx.verbose
|
|
3032
3036
|
});
|
|
3033
3037
|
process.exitCode = 1;
|
|
@@ -3036,16 +3040,18 @@ async function removeSkills(rawHarness, extraArgs, rawSkillPaths, ctx) {
|
|
|
3036
3040
|
async function skillsHandler(args, flags, ctx) {
|
|
3037
3041
|
if (!ctx) throw new Error("skills requires the plugin host context");
|
|
3038
3042
|
const { logger } = ctx;
|
|
3039
|
-
|
|
3040
|
-
|
|
3043
|
+
const subcommand = args[0];
|
|
3044
|
+
const isUninstall = subcommand === "uninstall" || subcommand === "remove";
|
|
3045
|
+
if (!isUninstall && flags?.["skill-path"] !== void 0) {
|
|
3046
|
+
logger.error("--skill-path can only be used with 'skills uninstall'.");
|
|
3041
3047
|
process.exitCode = 1;
|
|
3042
3048
|
return;
|
|
3043
3049
|
}
|
|
3044
|
-
if (
|
|
3050
|
+
if (subcommand === "list") {
|
|
3045
3051
|
await listSkills(flags?.harness, ctx);
|
|
3046
3052
|
return;
|
|
3047
3053
|
}
|
|
3048
|
-
if (
|
|
3054
|
+
if (isUninstall) {
|
|
3049
3055
|
await removeSkills(
|
|
3050
3056
|
flags?.harness,
|
|
3051
3057
|
args.slice(1),
|
|
@@ -3054,10 +3060,10 @@ async function skillsHandler(args, flags, ctx) {
|
|
|
3054
3060
|
);
|
|
3055
3061
|
return;
|
|
3056
3062
|
}
|
|
3057
|
-
if (
|
|
3058
|
-
if (
|
|
3063
|
+
if (subcommand !== "install") {
|
|
3064
|
+
if (subcommand === void 0) {
|
|
3059
3065
|
logger.info(
|
|
3060
|
-
"\nUsage: c8ctl skills <install|list|
|
|
3066
|
+
"\nUsage: c8ctl skills <install|list|uninstall> [--harness <agent-id>]\n\nAvailable commands:\n install\n list\n uninstall",
|
|
3061
3067
|
{
|
|
3062
3068
|
essential: true
|
|
3063
3069
|
}
|