@camunda8/cli 4.7.0-alpha.27 → 4.7.0-alpha.29
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/c8ctl-plugin.js +4 -1
- 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 +9 -8
- package/dist/default-plugins/setup/c8ctl-plugin.js +220 -72
- package/dist/default-plugins/skills/README.md +3 -2
- package/dist/default-plugins/skills/c8ctl-plugin.js +25 -19
- package/package.json +1 -1
|
@@ -3226,7 +3226,10 @@ export async function deleteVersion(cacheDir, versionSpec) {
|
|
|
3226
3226
|
|
|
3227
3227
|
const config = { cacheDir, version: resolvedVersion };
|
|
3228
3228
|
|
|
3229
|
-
|
|
3229
|
+
// Guard on the install dir, not on the binary: the dir can survive
|
|
3230
|
+
// without its launcher (partial/corrupt install), and delete should
|
|
3231
|
+
// still remove what is left rather than report the version unremovable.
|
|
3232
|
+
if (!existsSync(join(cacheDir, `c8run-${resolvedVersion}`))) {
|
|
3230
3233
|
logger.warn(`Version ${versionSpec} is not installed locally.`);
|
|
3231
3234
|
return;
|
|
3232
3235
|
}
|
|
@@ -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
|
}
|
|
@@ -12,10 +12,10 @@ development.
|
|
|
12
12
|
`--yes`.
|
|
13
13
|
- `c8ctl setup --yes` — set up the defaults without prompting (Rocket Launch
|
|
14
14
|
blueprint).
|
|
15
|
-
- `c8ctl setup --remove
|
|
16
|
-
|
|
17
|
-
and
|
|
18
|
-
|
|
15
|
+
- `c8ctl setup --remove` — preview and remove setup-managed MCP entries,
|
|
16
|
+
Camunda skills, a c8ctl-managed Desktop Modeler installation, blueprint
|
|
17
|
+
files, and the local cluster: the cluster is stopped, and its runtime
|
|
18
|
+
data and downloaded Camunda 8 Run binaries are deleted.
|
|
19
19
|
|
|
20
20
|
## Architecture
|
|
21
21
|
|
|
@@ -27,14 +27,15 @@ 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
|
-
`c8ctl
|
|
33
|
-
`c8ctl
|
|
32
|
+
`c8ctl cluster stop --purge` followed by `c8ctl cluster purge`/`delete` per
|
|
33
|
+
installed version, `c8ctl mcp uninstall` per harness,
|
|
34
|
+
`c8ctl skills uninstall --harness <harness> --yes`, and `c8ctl modeler uninstall`.
|
|
34
35
|
|
|
35
36
|
## Flags
|
|
36
37
|
|
|
37
|
-
`--modeler`, `--no-modeler`, `--docs-mcp`, `--remove`,
|
|
38
|
+
`--modeler`, `--no-modeler`, `--docs-mcp`, `--remove`, plus
|
|
38
39
|
the global `--yes`, `--json`, `--dry-run`, `--quiet`, and `--verbose` flags.
|
|
39
40
|
|
|
40
41
|
**Exit codes:** `0` when every selected step succeeded or nothing was
|
|
@@ -2025,7 +2025,7 @@ var require_semver2 = __commonJS({
|
|
|
2025
2025
|
// default-plugins/setup/c8ctl-plugin.ts
|
|
2026
2026
|
import { spawn as spawn2 } from "node:child_process";
|
|
2027
2027
|
import {
|
|
2028
|
-
existsSync as
|
|
2028
|
+
existsSync as existsSync6,
|
|
2029
2029
|
mkdtempSync,
|
|
2030
2030
|
readFileSync as readFileSync6,
|
|
2031
2031
|
realpathSync as realpathSync3,
|
|
@@ -2033,7 +2033,7 @@ import {
|
|
|
2033
2033
|
writeFileSync as writeFileSync3
|
|
2034
2034
|
} from "node:fs";
|
|
2035
2035
|
import { tmpdir } from "node:os";
|
|
2036
|
-
import { join as
|
|
2036
|
+
import { join as join7, resolve as resolve4 } from "node:path";
|
|
2037
2037
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
2038
2038
|
|
|
2039
2039
|
// node_modules/@camunda8/orchestration-cluster-api/dist/index.js
|
|
@@ -4910,6 +4910,34 @@ async function scaffoldSetupBlueprint({
|
|
|
4910
4910
|
}
|
|
4911
4911
|
|
|
4912
4912
|
// default-plugins/setup/detectors.ts
|
|
4913
|
+
import { existsSync as existsSync4, readdirSync as readdirSync2 } from "node:fs";
|
|
4914
|
+
import { homedir as homedir4 } from "node:os";
|
|
4915
|
+
import { join as join5 } from "node:path";
|
|
4916
|
+
function c8runCacheDir({
|
|
4917
|
+
env = process.env,
|
|
4918
|
+
platform: platform2 = process.platform,
|
|
4919
|
+
home = homedir4()
|
|
4920
|
+
} = {}) {
|
|
4921
|
+
if (env.C8RUN_CACHE_DIR) return env.C8RUN_CACHE_DIR;
|
|
4922
|
+
switch (platform2) {
|
|
4923
|
+
case "darwin":
|
|
4924
|
+
return join5(home, "Library", "Caches", "c8run");
|
|
4925
|
+
case "win32":
|
|
4926
|
+
return join5(
|
|
4927
|
+
env.LOCALAPPDATA || join5(home, "AppData", "Local"),
|
|
4928
|
+
"c8run",
|
|
4929
|
+
"cache"
|
|
4930
|
+
);
|
|
4931
|
+
default:
|
|
4932
|
+
return join5(env.XDG_CACHE_HOME || join5(home, ".cache"), "c8run");
|
|
4933
|
+
}
|
|
4934
|
+
}
|
|
4935
|
+
function camunda8RunInstallDirs({
|
|
4936
|
+
cacheDir = c8runCacheDir()
|
|
4937
|
+
} = {}) {
|
|
4938
|
+
if (!existsSync4(cacheDir)) return [];
|
|
4939
|
+
return readdirSync2(cacheDir, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.startsWith("c8run-")).map((entry) => entry.name.slice("c8run-".length)).sort((a, b) => a.localeCompare(b, void 0, { numeric: true }));
|
|
4940
|
+
}
|
|
4913
4941
|
var LOCAL_CLUSTER_HEALTH_URL = "http://localhost:9600/actuator/health";
|
|
4914
4942
|
var DEFAULT_HEALTH_TIMEOUT_MS = 3e3;
|
|
4915
4943
|
function causeCode(error) {
|
|
@@ -5250,8 +5278,8 @@ function setupPlanPayload(selected, { blueprint } = {}) {
|
|
|
5250
5278
|
|
|
5251
5279
|
// default-plugins/setup/prerequisites.ts
|
|
5252
5280
|
var import_semver2 = __toESM(require_semver2(), 1);
|
|
5253
|
-
import { existsSync as
|
|
5254
|
-
import { join as
|
|
5281
|
+
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
|
|
5282
|
+
import { join as join6 } from "node:path";
|
|
5255
5283
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
5256
5284
|
var MANUAL_SETUP_LINKS = [
|
|
5257
5285
|
{
|
|
@@ -5271,9 +5299,9 @@ function readRequiredNodeRange2() {
|
|
|
5271
5299
|
try {
|
|
5272
5300
|
const dir = fileURLToPath3(new URL(".", import.meta.url));
|
|
5273
5301
|
const packageJson = [
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
].find((candidate) =>
|
|
5302
|
+
join6(dir, "..", "..", "package.json"),
|
|
5303
|
+
join6(dir, "..", "..", "..", "package.json")
|
|
5304
|
+
].find((candidate) => existsSync5(candidate));
|
|
5277
5305
|
if (!packageJson) return void 0;
|
|
5278
5306
|
const pkg = JSON.parse(readFileSync5(packageJson, "utf-8"));
|
|
5279
5307
|
const engines = pkg && typeof pkg === "object" && "engines" in pkg ? pkg.engines : void 0;
|
|
@@ -5438,7 +5466,8 @@ var SETUP_MCP_HARNESSES = [
|
|
|
5438
5466
|
];
|
|
5439
5467
|
async function inspectSetupRemovalInventory({
|
|
5440
5468
|
cwd = process.cwd(),
|
|
5441
|
-
detectModeler
|
|
5469
|
+
detectModeler,
|
|
5470
|
+
detectClusterRunning: detectClusterRunning2
|
|
5442
5471
|
} = {}) {
|
|
5443
5472
|
const mcpHarnesses = process.platform === "darwin" || process.platform === "win32" ? [...SETUP_MCP_HARNESSES, "claude-desktop"] : [...SETUP_MCP_HARNESSES];
|
|
5444
5473
|
const mcpPlanningFailures = [];
|
|
@@ -5501,6 +5530,31 @@ async function inspectSetupRemovalInventory({
|
|
|
5501
5530
|
};
|
|
5502
5531
|
}
|
|
5503
5532
|
}
|
|
5533
|
+
let cluster;
|
|
5534
|
+
let clusterInspectionFailure;
|
|
5535
|
+
try {
|
|
5536
|
+
const versions = camunda8RunInstallDirs();
|
|
5537
|
+
let probe;
|
|
5538
|
+
if (versions.length === 0 && detectClusterRunning2) {
|
|
5539
|
+
try {
|
|
5540
|
+
probe = await detectClusterRunning2();
|
|
5541
|
+
} catch (error) {
|
|
5542
|
+
clusterInspectionFailure = {
|
|
5543
|
+
message: error instanceof Error ? error.message : String(error)
|
|
5544
|
+
};
|
|
5545
|
+
}
|
|
5546
|
+
}
|
|
5547
|
+
if (versions.length > 0 || probe?.running) {
|
|
5548
|
+
cluster = {
|
|
5549
|
+
versions,
|
|
5550
|
+
...probe?.running && probe.version ? { runningVersion: probe.version } : {}
|
|
5551
|
+
};
|
|
5552
|
+
}
|
|
5553
|
+
} catch (error) {
|
|
5554
|
+
clusterInspectionFailure = {
|
|
5555
|
+
message: error instanceof Error ? error.message : String(error)
|
|
5556
|
+
};
|
|
5557
|
+
}
|
|
5504
5558
|
return {
|
|
5505
5559
|
mcp,
|
|
5506
5560
|
mcpPlanningFailures,
|
|
@@ -5509,7 +5563,9 @@ async function inspectSetupRemovalInventory({
|
|
|
5509
5563
|
blueprints,
|
|
5510
5564
|
blueprintPlanningFailures,
|
|
5511
5565
|
modeler,
|
|
5512
|
-
modelerInspectionFailure
|
|
5566
|
+
modelerInspectionFailure,
|
|
5567
|
+
cluster,
|
|
5568
|
+
clusterInspectionFailure
|
|
5513
5569
|
};
|
|
5514
5570
|
}
|
|
5515
5571
|
|
|
@@ -5554,7 +5610,7 @@ var CLI_ENTRY = (() => {
|
|
|
5554
5610
|
resolve4(dir, "..", "..", "index.js"),
|
|
5555
5611
|
resolve4(dir, "..", "..", "src", "index.ts")
|
|
5556
5612
|
];
|
|
5557
|
-
return candidates.find((candidate) =>
|
|
5613
|
+
return candidates.find((candidate) => existsSync6(candidate)) ?? candidates[0];
|
|
5558
5614
|
})();
|
|
5559
5615
|
function spawnC8ctl(ctx, argv, {
|
|
5560
5616
|
skipStdoutLine,
|
|
@@ -5618,6 +5674,12 @@ function spawnClusterStop(ctx) {
|
|
|
5618
5674
|
stderrPassthrough: true
|
|
5619
5675
|
});
|
|
5620
5676
|
}
|
|
5677
|
+
function spawnClusterStopPurge(ctx) {
|
|
5678
|
+
return spawnC8ctl(ctx, ["cluster", "stop", "--purge"], {
|
|
5679
|
+
promoteStdoutLine: () => true,
|
|
5680
|
+
stderrPassthrough: true
|
|
5681
|
+
});
|
|
5682
|
+
}
|
|
5621
5683
|
function captureC8ctlJson(argv) {
|
|
5622
5684
|
const label = `c8ctl ${argv.join(" ")}`;
|
|
5623
5685
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
@@ -5666,19 +5728,19 @@ function captureC8ctlJson(argv) {
|
|
|
5666
5728
|
async function detectModelerRemoval() {
|
|
5667
5729
|
const payload = await captureC8ctlJson([
|
|
5668
5730
|
"modeler",
|
|
5669
|
-
"
|
|
5731
|
+
"uninstall",
|
|
5670
5732
|
"--dry-run"
|
|
5671
5733
|
]);
|
|
5672
5734
|
if (!isRecord(payload) || typeof payload.wouldChange !== "boolean") {
|
|
5673
5735
|
throw new Error(
|
|
5674
|
-
'modeler
|
|
5736
|
+
'modeler uninstall --dry-run returned an invalid response: expected a boolean "wouldChange" field.'
|
|
5675
5737
|
);
|
|
5676
5738
|
}
|
|
5677
5739
|
if (!payload.wouldChange) return void 0;
|
|
5678
5740
|
const removalTarget = payload.removalTarget;
|
|
5679
5741
|
if (!isRecord(removalTarget) || typeof removalTarget.method !== "string" || removalTarget.method.length === 0 || typeof removalTarget.path !== "string" || removalTarget.path.length === 0) {
|
|
5680
5742
|
throw new Error(
|
|
5681
|
-
'modeler
|
|
5743
|
+
'modeler uninstall --dry-run returned an invalid response: expected a "removalTarget" object with nonempty "method" and "path".'
|
|
5682
5744
|
);
|
|
5683
5745
|
}
|
|
5684
5746
|
return {
|
|
@@ -5691,6 +5753,35 @@ async function detectModelerRemoval() {
|
|
|
5691
5753
|
}
|
|
5692
5754
|
var CLUSTER_HEALTH_TIMEOUT_MS = 12e4;
|
|
5693
5755
|
var CLUSTER_HEALTH_POLL_MS = 2e3;
|
|
5756
|
+
function parseClusterStatus(payload) {
|
|
5757
|
+
if (!isRecord(payload) || typeof payload.status !== "string") {
|
|
5758
|
+
return void 0;
|
|
5759
|
+
}
|
|
5760
|
+
return {
|
|
5761
|
+
running: payload.status !== "stopped",
|
|
5762
|
+
version: typeof payload.version === "string" && payload.version.length > 0 ? payload.version : void 0
|
|
5763
|
+
};
|
|
5764
|
+
}
|
|
5765
|
+
async function probeRunningCluster() {
|
|
5766
|
+
try {
|
|
5767
|
+
return parseClusterStatus(
|
|
5768
|
+
await captureC8ctlJson(["cluster", "status", "--json"])
|
|
5769
|
+
);
|
|
5770
|
+
} catch {
|
|
5771
|
+
return void 0;
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
async function detectClusterRunning() {
|
|
5775
|
+
const probe = parseClusterStatus(
|
|
5776
|
+
await captureC8ctlJson(["cluster", "status", "--json"])
|
|
5777
|
+
);
|
|
5778
|
+
if (!probe) {
|
|
5779
|
+
throw new Error(
|
|
5780
|
+
'cluster status --json returned an invalid response: expected a string "status" field.'
|
|
5781
|
+
);
|
|
5782
|
+
}
|
|
5783
|
+
return probe;
|
|
5784
|
+
}
|
|
5694
5785
|
async function runClusterStart(ctx, run) {
|
|
5695
5786
|
await spawnClusterStart(ctx);
|
|
5696
5787
|
const deadline = Date.now() + CLUSTER_HEALTH_TIMEOUT_MS;
|
|
@@ -5737,7 +5828,7 @@ async function runBlueprintDeploy(ctx, run) {
|
|
|
5737
5828
|
if (!directory) {
|
|
5738
5829
|
throw new Error("The blueprint project was not created.");
|
|
5739
5830
|
}
|
|
5740
|
-
const deployDir =
|
|
5831
|
+
const deployDir = join7(directory, blueprint.deployPath ?? ".");
|
|
5741
5832
|
const health = await checkLocalClusterHealth();
|
|
5742
5833
|
if (!health.healthy) {
|
|
5743
5834
|
throw new Error(
|
|
@@ -5750,7 +5841,7 @@ async function runBlueprintDeploy(ctx, run) {
|
|
|
5750
5841
|
].join("\n")
|
|
5751
5842
|
);
|
|
5752
5843
|
}
|
|
5753
|
-
const deployDataDir = mkdtempSync(
|
|
5844
|
+
const deployDataDir = mkdtempSync(join7(tmpdir(), "c8ctl-setup-deploy-"));
|
|
5754
5845
|
stageLocalProfile(deployDataDir);
|
|
5755
5846
|
try {
|
|
5756
5847
|
await spawnC8ctl(
|
|
@@ -5773,7 +5864,7 @@ async function runBlueprintDeploy(ctx, run) {
|
|
|
5773
5864
|
} finally {
|
|
5774
5865
|
rmSync3(deployDataDir, { recursive: true, force: true });
|
|
5775
5866
|
}
|
|
5776
|
-
const processFile =
|
|
5867
|
+
const processFile = join7(directory, blueprint.processFile);
|
|
5777
5868
|
const processId = extractProcessId(readFileSync6(processFile, "utf-8"));
|
|
5778
5869
|
if (!processId) {
|
|
5779
5870
|
throw new Error(`Could not find a process id in ${blueprint.processFile}.`);
|
|
@@ -5790,14 +5881,14 @@ async function runBlueprintDeploy(ctx, run) {
|
|
|
5790
5881
|
run.processInstanceKey = created.processInstanceKey;
|
|
5791
5882
|
}
|
|
5792
5883
|
function stageLocalProfile(deployDataDir) {
|
|
5793
|
-
const profilesPath =
|
|
5794
|
-
if (!
|
|
5884
|
+
const profilesPath = join7(c8ctl2.getUserDataDir(), "profiles.json");
|
|
5885
|
+
if (!existsSync6(profilesPath)) return;
|
|
5795
5886
|
const parsed = JSON.parse(readFileSync6(profilesPath, "utf-8"));
|
|
5796
5887
|
const profiles = isRecord(parsed) && Array.isArray(parsed.profiles) ? parsed.profiles : [];
|
|
5797
5888
|
const local = profiles.filter(isRecord).find((profile) => profile.name === DEFAULT_PROFILE);
|
|
5798
5889
|
if (!local) return;
|
|
5799
5890
|
writeFileSync3(
|
|
5800
|
-
|
|
5891
|
+
join7(deployDataDir, "profiles.json"),
|
|
5801
5892
|
JSON.stringify({
|
|
5802
5893
|
profiles: [{ ...local, defaultTenantId: LOCAL_TENANT_ID }]
|
|
5803
5894
|
}),
|
|
@@ -6001,9 +6092,9 @@ async function executePlan(ctx, selected, blueprintId, { color }) {
|
|
|
6001
6092
|
function modelerRemovalLine(message) {
|
|
6002
6093
|
const match = /^Dry run: would remove (.+)$/.exec(message);
|
|
6003
6094
|
if (match) return `Remove ${match[1]}`;
|
|
6004
|
-
return `Remove Camunda Desktop Modeler with \`c8ctl modeler
|
|
6095
|
+
return `Remove Camunda Desktop Modeler with \`c8ctl modeler uninstall\` (${message})`;
|
|
6005
6096
|
}
|
|
6006
|
-
function setupRemovalPreview(inventory
|
|
6097
|
+
function setupRemovalPreview(inventory) {
|
|
6007
6098
|
const items = [];
|
|
6008
6099
|
const warnings = [];
|
|
6009
6100
|
const lines = ["Setup removal preview:"];
|
|
@@ -6040,6 +6131,11 @@ function setupRemovalPreview(inventory, stopCluster) {
|
|
|
6040
6131
|
warnings.push(warning);
|
|
6041
6132
|
lines.push(` Warning: ${warning}`);
|
|
6042
6133
|
}
|
|
6134
|
+
if (inventory.clusterInspectionFailure) {
|
|
6135
|
+
const warning = `Could not inspect the local Camunda 8 Run installation: ${inventory.clusterInspectionFailure.message}. The cluster was left untouched.`;
|
|
6136
|
+
warnings.push(warning);
|
|
6137
|
+
lines.push(` Warning: ${warning}`);
|
|
6138
|
+
}
|
|
6043
6139
|
for (const failure of inventory.blueprintPlanningFailures) {
|
|
6044
6140
|
const warning = `Could not inspect setup blueprint marker in ${failure.directory}: ${failure.message}. That project was left untouched.`;
|
|
6045
6141
|
warnings.push(warning);
|
|
@@ -6078,11 +6174,19 @@ function setupRemovalPreview(inventory, stopCluster) {
|
|
|
6078
6174
|
);
|
|
6079
6175
|
for (const file of files) lines.push(` ${file}`);
|
|
6080
6176
|
}
|
|
6081
|
-
if (
|
|
6082
|
-
items.push({
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6177
|
+
if (inventory.cluster) {
|
|
6178
|
+
items.push({
|
|
6179
|
+
type: "local-cluster",
|
|
6180
|
+
action: "remove",
|
|
6181
|
+
versions: [...inventory.cluster.versions]
|
|
6182
|
+
});
|
|
6183
|
+
if (inventory.cluster.versions.length > 0) {
|
|
6184
|
+
lines.push(
|
|
6185
|
+
` Stop the local cluster and remove Camunda 8 Run ${inventory.cluster.versions.join(", ")} (runtime data and downloaded binaries will be deleted)`
|
|
6186
|
+
);
|
|
6187
|
+
} else {
|
|
6188
|
+
lines.push(" Stop the local cluster");
|
|
6189
|
+
}
|
|
6086
6190
|
}
|
|
6087
6191
|
if (items.length === 0)
|
|
6088
6192
|
lines.push(" No setup-managed components were found.");
|
|
@@ -6105,9 +6209,9 @@ function removalFailure(ctx, action, error) {
|
|
|
6105
6209
|
const message = error instanceof Error ? error.message : String(error);
|
|
6106
6210
|
ctx.logger.error(`Could not ${action}: ${message}`);
|
|
6107
6211
|
}
|
|
6108
|
-
async function applySetupRemoval(ctx, inventory
|
|
6212
|
+
async function applySetupRemoval(ctx, inventory) {
|
|
6109
6213
|
const { logger } = ctx;
|
|
6110
|
-
let failures = inventory.mcpPlanningFailures.length + inventory.skillDiscoveryFailures.length + inventory.blueprintPlanningFailures.length + (inventory.modelerInspectionFailure ? 1 : 0);
|
|
6214
|
+
let failures = inventory.mcpPlanningFailures.length + inventory.skillDiscoveryFailures.length + inventory.blueprintPlanningFailures.length + (inventory.modelerInspectionFailure ? 1 : 0) + (inventory.clusterInspectionFailure ? 1 : 0);
|
|
6111
6215
|
for (const failure of inventory.mcpPlanningFailures) {
|
|
6112
6216
|
logger.error(
|
|
6113
6217
|
`Could not inspect MCP configuration for ${failure.harness}: ${failure.message}. That configuration was left untouched.`
|
|
@@ -6128,16 +6232,67 @@ async function applySetupRemoval(ctx, inventory, stopCluster) {
|
|
|
6128
6232
|
`Could not inspect the Camunda Desktop Modeler installation: ${inventory.modelerInspectionFailure.message}. Modeler was left untouched.`
|
|
6129
6233
|
);
|
|
6130
6234
|
}
|
|
6131
|
-
if (
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6235
|
+
if (inventory.clusterInspectionFailure) {
|
|
6236
|
+
logger.error(
|
|
6237
|
+
`Could not inspect the local Camunda 8 Run installation: ${inventory.clusterInspectionFailure.message}. The cluster was left untouched.`
|
|
6238
|
+
);
|
|
6239
|
+
}
|
|
6240
|
+
if (inventory.cluster) {
|
|
6241
|
+
const probe = await probeRunningCluster();
|
|
6242
|
+
let purgedByStop;
|
|
6243
|
+
if (probe === void 0) {
|
|
6139
6244
|
failures += 1;
|
|
6140
|
-
|
|
6245
|
+
logger.error(
|
|
6246
|
+
"Could not determine whether the local cluster is running (the cluster status probe failed); it was not stopped. Stop it yourself with: c8ctl cluster stop"
|
|
6247
|
+
);
|
|
6248
|
+
} else if (probe.running) {
|
|
6249
|
+
if (probe.version && inventory.cluster.versions.includes(probe.version)) {
|
|
6250
|
+
try {
|
|
6251
|
+
await spawnClusterStopPurge(ctx);
|
|
6252
|
+
purgedByStop = probe.version;
|
|
6253
|
+
} catch (error) {
|
|
6254
|
+
failures += 1;
|
|
6255
|
+
removalFailure(ctx, "stop the local cluster", error);
|
|
6256
|
+
}
|
|
6257
|
+
} else if (probe.version && probe.version !== inventory.cluster.runningVersion) {
|
|
6258
|
+
failures += 1;
|
|
6259
|
+
logger.error(
|
|
6260
|
+
`Camunda 8 Run ${probe.version} is running but was not in the removal preview; leaving it running and keeping its data. Stop it yourself with: c8ctl cluster stop`
|
|
6261
|
+
);
|
|
6262
|
+
} else {
|
|
6263
|
+
try {
|
|
6264
|
+
await spawnClusterStop(ctx);
|
|
6265
|
+
} catch (error) {
|
|
6266
|
+
failures += 1;
|
|
6267
|
+
removalFailure(ctx, "stop the local cluster", error);
|
|
6268
|
+
}
|
|
6269
|
+
}
|
|
6270
|
+
}
|
|
6271
|
+
for (const version of inventory.cluster.versions) {
|
|
6272
|
+
if (version !== purgedByStop) {
|
|
6273
|
+
try {
|
|
6274
|
+
await spawnC8ctl(ctx, ["cluster", "purge", version], {
|
|
6275
|
+
promoteStdoutLine: () => true,
|
|
6276
|
+
stderrPassthrough: true
|
|
6277
|
+
});
|
|
6278
|
+
} catch (error) {
|
|
6279
|
+
failures += 1;
|
|
6280
|
+
removalFailure(
|
|
6281
|
+
ctx,
|
|
6282
|
+
`delete the runtime data of Camunda 8 Run ${version}`,
|
|
6283
|
+
error
|
|
6284
|
+
);
|
|
6285
|
+
}
|
|
6286
|
+
}
|
|
6287
|
+
try {
|
|
6288
|
+
await spawnC8ctl(ctx, ["cluster", "delete", version], {
|
|
6289
|
+
promoteStdoutLine: () => true,
|
|
6290
|
+
stderrPassthrough: true
|
|
6291
|
+
});
|
|
6292
|
+
} catch (error) {
|
|
6293
|
+
failures += 1;
|
|
6294
|
+
removalFailure(ctx, `remove Camunda 8 Run ${version}`, error);
|
|
6295
|
+
}
|
|
6141
6296
|
}
|
|
6142
6297
|
}
|
|
6143
6298
|
for (const { plan, servers } of inventory.mcp) {
|
|
@@ -6182,7 +6337,7 @@ async function applySetupRemoval(ctx, inventory, stopCluster) {
|
|
|
6182
6337
|
ctx,
|
|
6183
6338
|
[
|
|
6184
6339
|
"skills",
|
|
6185
|
-
"
|
|
6340
|
+
"uninstall",
|
|
6186
6341
|
...names,
|
|
6187
6342
|
"--harness",
|
|
6188
6343
|
harness,
|
|
@@ -6202,7 +6357,7 @@ async function applySetupRemoval(ctx, inventory, stopCluster) {
|
|
|
6202
6357
|
}
|
|
6203
6358
|
if (inventory.modeler) {
|
|
6204
6359
|
try {
|
|
6205
|
-
await spawnC8ctl(ctx, ["modeler", "
|
|
6360
|
+
await spawnC8ctl(ctx, ["modeler", "uninstall"], {
|
|
6206
6361
|
promoteStdoutLine: (line) => line.includes("Modeler"),
|
|
6207
6362
|
// Registration-cleanup warnings and failure diagnostics ride
|
|
6208
6363
|
// stderr — keep them visible in quiet removal runs.
|
|
@@ -6252,12 +6407,13 @@ async function applySetupRemoval(ctx, inventory, stopCluster) {
|
|
|
6252
6407
|
logger.info("Setup removal finished.", { essential: true });
|
|
6253
6408
|
}
|
|
6254
6409
|
}
|
|
6255
|
-
async function runSetupRemoval(ctx
|
|
6410
|
+
async function runSetupRemoval(ctx) {
|
|
6256
6411
|
const { logger } = ctx;
|
|
6257
6412
|
const inventory = await inspectSetupRemovalInventory({
|
|
6258
|
-
detectModeler: detectModelerRemoval
|
|
6413
|
+
detectModeler: detectModelerRemoval,
|
|
6414
|
+
detectClusterRunning
|
|
6259
6415
|
});
|
|
6260
|
-
const preview = setupRemovalPreview(inventory
|
|
6416
|
+
const preview = setupRemovalPreview(inventory);
|
|
6261
6417
|
const jsonMode = logger.mode === "json";
|
|
6262
6418
|
if (ctx.dryRun || jsonMode) {
|
|
6263
6419
|
logger.json({
|
|
@@ -6268,7 +6424,7 @@ async function runSetupRemoval(ctx, stopCluster) {
|
|
|
6268
6424
|
}
|
|
6269
6425
|
logger.output(preview.text);
|
|
6270
6426
|
if (preview.payload.items.length === 0) {
|
|
6271
|
-
if (inventory.mcpPlanningFailures.length > 0 || inventory.skillDiscoveryFailures.length > 0 || inventory.blueprintPlanningFailures.length > 0 || inventory.modelerInspectionFailure) {
|
|
6427
|
+
if (inventory.mcpPlanningFailures.length > 0 || inventory.skillDiscoveryFailures.length > 0 || inventory.blueprintPlanningFailures.length > 0 || inventory.modelerInspectionFailure || inventory.clusterInspectionFailure) {
|
|
6272
6428
|
process.exitCode = 1;
|
|
6273
6429
|
}
|
|
6274
6430
|
return;
|
|
@@ -6287,32 +6443,23 @@ async function runSetupRemoval(ctx, stopCluster) {
|
|
|
6287
6443
|
return;
|
|
6288
6444
|
}
|
|
6289
6445
|
} else if (!ctx.yes) {
|
|
6290
|
-
|
|
6291
|
-
"c8ctl",
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
...stopCluster ? ["--stop-cluster"] : [],
|
|
6295
|
-
"--yes"
|
|
6296
|
-
].join(" ");
|
|
6297
|
-
logger.info(`Nothing was removed. Run "${command}" to confirm.`, {
|
|
6298
|
-
essential: true
|
|
6299
|
-
});
|
|
6446
|
+
logger.info(
|
|
6447
|
+
'Nothing was removed. Run "c8ctl setup --remove --yes" to confirm.',
|
|
6448
|
+
{ essential: true }
|
|
6449
|
+
);
|
|
6300
6450
|
return;
|
|
6301
6451
|
}
|
|
6302
|
-
await applySetupRemoval(ctx, inventory
|
|
6452
|
+
await applySetupRemoval(ctx, inventory);
|
|
6303
6453
|
}
|
|
6304
6454
|
async function runSetup(ctx, flags) {
|
|
6305
6455
|
const { logger } = ctx;
|
|
6306
|
-
if (flags["stop-cluster"] && !flags.remove) {
|
|
6307
|
-
throw new Error("--stop-cluster can only be used with --remove.");
|
|
6308
|
-
}
|
|
6309
6456
|
if (flags.remove) {
|
|
6310
6457
|
if (flags.modeler || flags["no-modeler"] || flags["docs-mcp"]) {
|
|
6311
6458
|
throw new Error(
|
|
6312
6459
|
"--remove cannot be combined with --modeler, --no-modeler, or --docs-mcp."
|
|
6313
6460
|
);
|
|
6314
6461
|
}
|
|
6315
|
-
await runSetupRemoval(ctx
|
|
6462
|
+
await runSetupRemoval(ctx);
|
|
6316
6463
|
return;
|
|
6317
6464
|
}
|
|
6318
6465
|
if (ctx.dryRun) {
|
|
@@ -6437,12 +6584,23 @@ ${renderNextSteps(nextSteps, { color, maxWidth: process.stdout.columns || void 0
|
|
|
6437
6584
|
}
|
|
6438
6585
|
async function setupHandler(_args, flagsRecord, ctx) {
|
|
6439
6586
|
if (!ctx) throw new Error("setup requires the plugin host context");
|
|
6587
|
+
if (ctx.unrecognizedFlags?.includes("--stop-cluster")) {
|
|
6588
|
+
renderCommandFailure(
|
|
6589
|
+
ctx.logger,
|
|
6590
|
+
"Failed to setup",
|
|
6591
|
+
new Error(
|
|
6592
|
+
"--stop-cluster no longer exists: c8ctl setup --remove stops the local cluster and deletes its runtime data and downloaded Camunda 8 Run binaries after confirmation."
|
|
6593
|
+
),
|
|
6594
|
+
{ verbose: ctx.verbose }
|
|
6595
|
+
);
|
|
6596
|
+
process.exitCode = 1;
|
|
6597
|
+
return;
|
|
6598
|
+
}
|
|
6440
6599
|
const flags = {
|
|
6441
6600
|
modeler: flagsRecord?.modeler === true,
|
|
6442
6601
|
"no-modeler": flagsRecord?.["no-modeler"] === true,
|
|
6443
6602
|
"docs-mcp": flagsRecord?.["docs-mcp"] === true,
|
|
6444
|
-
remove: flagsRecord?.remove === true
|
|
6445
|
-
"stop-cluster": flagsRecord?.["stop-cluster"] === true
|
|
6603
|
+
remove: flagsRecord?.remove === true
|
|
6446
6604
|
};
|
|
6447
6605
|
try {
|
|
6448
6606
|
await runSetup(ctx, flags);
|
|
@@ -6465,9 +6623,7 @@ A run without a selection (piped output, CI) installs nothing unless you pass --
|
|
|
6465
6623
|
|
|
6466
6624
|
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
6625
|
|
|
6468
|
-
--remove shows setup-managed MCP entries, Camunda skills, a c8ctl-managed Desktop Modeler installation,
|
|
6469
|
-
|
|
6470
|
-
--stop-cluster is available only with --remove. It stops the local cluster without purging runtime data or deleting downloaded binaries.
|
|
6626
|
+
--remove shows setup-managed MCP entries, Camunda skills, a c8ctl-managed Desktop Modeler installation, marker-listed blueprint files, and the local cluster before removing them: the cluster is stopped, and its runtime data and downloaded binaries are deleted \u2014 setup-deployed process state goes with the runtime data. 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: cluster stop --purge plus per-version cluster purge and delete, 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.
|
|
6471
6627
|
|
|
6472
6628
|
Removal exits 0 when every requested action succeeds, and 1 if any action fails; the other removal actions still run.`;
|
|
6473
6629
|
var metadata = {
|
|
@@ -6493,10 +6649,6 @@ var metadata = {
|
|
|
6493
6649
|
{
|
|
6494
6650
|
command: "c8ctl setup --remove --yes",
|
|
6495
6651
|
description: "Remove the previewed setup-managed components"
|
|
6496
|
-
},
|
|
6497
|
-
{
|
|
6498
|
-
command: "c8ctl setup --remove --stop-cluster --yes",
|
|
6499
|
-
description: "Also stop the local cluster without purging its data"
|
|
6500
6652
|
}
|
|
6501
6653
|
]
|
|
6502
6654
|
}
|
|
@@ -6519,11 +6671,7 @@ var commands = {
|
|
|
6519
6671
|
},
|
|
6520
6672
|
remove: {
|
|
6521
6673
|
type: "boolean",
|
|
6522
|
-
description: "Preview and remove setup-managed MCP entries, skills, Modeler, and
|
|
6523
|
-
},
|
|
6524
|
-
"stop-cluster": {
|
|
6525
|
-
type: "boolean",
|
|
6526
|
-
description: "With --remove, stop the local cluster without purging its data"
|
|
6674
|
+
description: "Preview and remove setup-managed MCP entries, skills, Modeler, blueprint files, and the local cluster"
|
|
6527
6675
|
}
|
|
6528
6676
|
},
|
|
6529
6677
|
handler: setupHandler
|
|
@@ -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
|
}
|