@camunda8/cli 4.7.0-alpha.23 → 4.7.0-alpha.25
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/README.md +1 -2
- package/dist/command-dispatch.d.ts.map +1 -1
- package/dist/command-dispatch.js +0 -3
- package/dist/command-dispatch.js.map +1 -1
- package/dist/default-plugins/mcp/README.md +33 -0
- package/dist/default-plugins/mcp/c8ctl-plugin.js +2604 -0
- package/dist/default-plugins/mcp/package.json +8 -0
- package/dist/default-plugins/modeler/c8ctl-plugin.js +80 -15
- package/dist/default-plugins/setup/README.md +12 -6
- package/dist/default-plugins/setup/c8ctl-plugin.js +227 -143
- package/dist/default-plugins/skills/README.md +9 -2
- package/dist/default-plugins/skills/c8ctl-plugin.js +116 -20
- package/dist/framework/command-registry.d.ts +0 -30
- package/dist/framework/command-registry.d.ts.map +1 -1
- package/dist/framework/command-registry.js +0 -54
- package/dist/framework/command-registry.js.map +1 -1
- package/package.json +1 -1
- package/dist/commands/mcp.d.ts +0 -9
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -109
- package/dist/commands/mcp.js.map +0 -1
|
@@ -3216,10 +3216,26 @@ function noModelerInstalled() {
|
|
|
3216
3216
|
message: "Camunda Modeler is not installed; run `c8ctl modeler install` first."
|
|
3217
3217
|
};
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3219
|
+
function verifyExpectedRemovalTarget(ctx, target) {
|
|
3220
|
+
const expected = ctx.expectedRemovalTarget;
|
|
3221
|
+
if (expected !== void 0 && (target === void 0 || target.method !== expected.method || target.path !== expected.path)) {
|
|
3222
|
+
throw new Error(
|
|
3223
|
+
"Camunda Modeler installation changed after the setup preview; refusing to remove a different target. Run `c8ctl setup --remove` again to review the current installation."
|
|
3224
|
+
);
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
function dryRunResult(command, message, removalTarget) {
|
|
3220
3228
|
return {
|
|
3221
3229
|
kind: "dryRun",
|
|
3222
|
-
|
|
3230
|
+
// `wouldChange` lets automation (c8ctl setup --remove) tell a real
|
|
3231
|
+
// preview apart from a normalized "nothing to do" info result.
|
|
3232
|
+
info: {
|
|
3233
|
+
dryRun: true,
|
|
3234
|
+
command,
|
|
3235
|
+
message,
|
|
3236
|
+
wouldChange: true,
|
|
3237
|
+
...removalTarget === void 0 ? {} : { removalTarget }
|
|
3238
|
+
}
|
|
3223
3239
|
};
|
|
3224
3240
|
}
|
|
3225
3241
|
function homebrewModelerInstalled() {
|
|
@@ -3507,6 +3523,7 @@ function removeWindowsModeler(ctx) {
|
|
|
3507
3523
|
`winget is not available, so c8ctl cannot safely remove the Modeler installation at ${installDir}.`
|
|
3508
3524
|
);
|
|
3509
3525
|
}
|
|
3526
|
+
verifyExpectedRemovalTarget(ctx, void 0);
|
|
3510
3527
|
return noModelerInstalled();
|
|
3511
3528
|
}
|
|
3512
3529
|
if (!isInstalledWith({
|
|
@@ -3520,12 +3537,16 @@ function removeWindowsModeler(ctx) {
|
|
|
3520
3537
|
`Camunda Modeler at ${installDir} is not installed with winget; refusing to remove it.`
|
|
3521
3538
|
);
|
|
3522
3539
|
}
|
|
3540
|
+
verifyExpectedRemovalTarget(ctx, void 0);
|
|
3523
3541
|
return noModelerInstalled();
|
|
3524
3542
|
}
|
|
3543
|
+
const removalTarget = { method: "winget-package", path: installDir };
|
|
3544
|
+
verifyExpectedRemovalTarget(ctx, removalTarget);
|
|
3525
3545
|
if (ctx.isDryRun) {
|
|
3526
3546
|
return dryRunResult(
|
|
3527
3547
|
"modeler remove",
|
|
3528
|
-
"Dry run: would remove Camunda Modeler with `winget uninstall --id Camunda.Modeler --exact --source winget`."
|
|
3548
|
+
"Dry run: would remove Camunda Modeler with `winget uninstall --id Camunda.Modeler --exact --source winget`.",
|
|
3549
|
+
removalTarget
|
|
3529
3550
|
);
|
|
3530
3551
|
}
|
|
3531
3552
|
reportProgress(ctx, "Removing Camunda Modeler with winget...");
|
|
@@ -3746,11 +3767,20 @@ async function updateLinuxModeler(ctx) {
|
|
|
3746
3767
|
}
|
|
3747
3768
|
function removeLinuxModeler(ctx) {
|
|
3748
3769
|
const installation = linuxModelerForAction("remove");
|
|
3749
|
-
if (!installation)
|
|
3770
|
+
if (!installation) {
|
|
3771
|
+
verifyExpectedRemovalTarget(ctx, void 0);
|
|
3772
|
+
return noModelerInstalled();
|
|
3773
|
+
}
|
|
3774
|
+
const removalTarget = {
|
|
3775
|
+
method: "linux-managed-install",
|
|
3776
|
+
path: installation.installDir
|
|
3777
|
+
};
|
|
3778
|
+
verifyExpectedRemovalTarget(ctx, removalTarget);
|
|
3750
3779
|
if (ctx.isDryRun) {
|
|
3751
3780
|
return dryRunResult(
|
|
3752
3781
|
"modeler remove",
|
|
3753
|
-
`Dry run: would remove Camunda Modeler ${installation.version} from ${installation.installDir} and unregister its file types
|
|
3782
|
+
`Dry run: would remove Camunda Modeler ${installation.version} from ${installation.installDir} and unregister its file types.`,
|
|
3783
|
+
removalTarget
|
|
3754
3784
|
);
|
|
3755
3785
|
}
|
|
3756
3786
|
if (process.getuid?.() !== 0) {
|
|
@@ -3784,20 +3814,31 @@ function removeLinuxModeler(ctx) {
|
|
|
3784
3814
|
}
|
|
3785
3815
|
async function removeMacModeler(ctx) {
|
|
3786
3816
|
if (hasPackageManager("brew", "Homebrew") && homebrewModelerInstalled()) {
|
|
3787
|
-
if (ctx.isDryRun) {
|
|
3788
|
-
return dryRunResult(
|
|
3789
|
-
"modeler remove",
|
|
3790
|
-
"Dry run: would remove Camunda Modeler with `brew uninstall --cask camunda-modeler`."
|
|
3791
|
-
);
|
|
3792
|
-
}
|
|
3793
3817
|
let appPath2;
|
|
3794
3818
|
try {
|
|
3795
3819
|
appPath2 = resolveHomebrewModelerPath();
|
|
3796
3820
|
} catch (error) {
|
|
3821
|
+
if (ctx.isDryRun || ctx.expectedRemovalTarget !== void 0) {
|
|
3822
|
+
throw error;
|
|
3823
|
+
}
|
|
3797
3824
|
ctx.logger.warn(
|
|
3798
3825
|
`Could not locate the Homebrew Modeler bundle before uninstalling it: ${errorMessage(error)}`
|
|
3799
3826
|
);
|
|
3800
3827
|
}
|
|
3828
|
+
const removalTarget2 = appPath2 === void 0 ? void 0 : { method: "homebrew-cask", path: appPath2 };
|
|
3829
|
+
verifyExpectedRemovalTarget(ctx, removalTarget2);
|
|
3830
|
+
if (ctx.isDryRun) {
|
|
3831
|
+
if (removalTarget2 === void 0) {
|
|
3832
|
+
throw new Error(
|
|
3833
|
+
"Could not identify the Homebrew Modeler target for the removal preview."
|
|
3834
|
+
);
|
|
3835
|
+
}
|
|
3836
|
+
return dryRunResult(
|
|
3837
|
+
"modeler remove",
|
|
3838
|
+
"Dry run: would remove Camunda Modeler with `brew uninstall --cask camunda-modeler`.",
|
|
3839
|
+
removalTarget2
|
|
3840
|
+
);
|
|
3841
|
+
}
|
|
3801
3842
|
reportProgress(ctx, "Removing Camunda Modeler with Homebrew...");
|
|
3802
3843
|
runCommand("brew", ["uninstall", "--cask", "camunda-modeler"], {
|
|
3803
3844
|
failureMessage: "Homebrew could not remove Camunda Modeler",
|
|
@@ -3810,7 +3851,12 @@ async function removeMacModeler(ctx) {
|
|
|
3810
3851
|
};
|
|
3811
3852
|
}
|
|
3812
3853
|
const appPath = findInstalledModeler();
|
|
3813
|
-
if (!appPath)
|
|
3854
|
+
if (!appPath) {
|
|
3855
|
+
verifyExpectedRemovalTarget(ctx, void 0);
|
|
3856
|
+
return noModelerInstalled();
|
|
3857
|
+
}
|
|
3858
|
+
const removalTarget = { method: "macos-app-bundle", path: appPath };
|
|
3859
|
+
verifyExpectedRemovalTarget(ctx, removalTarget);
|
|
3814
3860
|
if (isHomebrewCaskPath(appPath)) {
|
|
3815
3861
|
throw new Error(
|
|
3816
3862
|
"Camunda Modeler appears to be Homebrew-managed, but its cask was not found; refusing to remove the app bundle directly."
|
|
@@ -3820,7 +3866,8 @@ async function removeMacModeler(ctx) {
|
|
|
3820
3866
|
if (ctx.isDryRun) {
|
|
3821
3867
|
return dryRunResult(
|
|
3822
3868
|
"modeler remove",
|
|
3823
|
-
`Dry run: would remove the Camunda Modeler app bundle at ${appPath}
|
|
3869
|
+
`Dry run: would remove the Camunda Modeler app bundle at ${appPath}.`,
|
|
3870
|
+
removalTarget
|
|
3824
3871
|
);
|
|
3825
3872
|
}
|
|
3826
3873
|
reportProgress(ctx, `Removing Camunda Modeler from ${appPath}...`);
|
|
@@ -3891,6 +3938,20 @@ var metadata = {
|
|
|
3891
3938
|
}
|
|
3892
3939
|
}
|
|
3893
3940
|
};
|
|
3941
|
+
function expectedRemovalTargetFromEnvironment() {
|
|
3942
|
+
const serialized = process.env.C8CTL_SETUP_MODELER_REMOVAL_TARGET;
|
|
3943
|
+
if (serialized === void 0) return void 0;
|
|
3944
|
+
let parsed;
|
|
3945
|
+
try {
|
|
3946
|
+
parsed = JSON.parse(serialized);
|
|
3947
|
+
} catch {
|
|
3948
|
+
throw new Error("Invalid setup-provided Modeler removal target.");
|
|
3949
|
+
}
|
|
3950
|
+
if (!isRecord(parsed) || typeof parsed.method !== "string" || parsed.method.length === 0 || typeof parsed.path !== "string" || parsed.path.length === 0) {
|
|
3951
|
+
throw new Error("Invalid setup-provided Modeler removal target.");
|
|
3952
|
+
}
|
|
3953
|
+
return { method: parsed.method, path: parsed.path };
|
|
3954
|
+
}
|
|
3894
3955
|
async function modelerHandler(args, _flags, ctx) {
|
|
3895
3956
|
if (!ctx) throw new Error("modeler requires the plugin host context");
|
|
3896
3957
|
const { logger } = ctx;
|
|
@@ -3918,14 +3979,18 @@ async function modelerHandler(args, _flags, ctx) {
|
|
|
3918
3979
|
const result = await operation({
|
|
3919
3980
|
isDryRun: ctx.dryRun,
|
|
3920
3981
|
logger,
|
|
3921
|
-
quiet: ctx.quiet
|
|
3982
|
+
quiet: ctx.quiet,
|
|
3983
|
+
...action === "remove" ? {
|
|
3984
|
+
expectedRemovalTarget: expectedRemovalTargetFromEnvironment()
|
|
3985
|
+
} : {}
|
|
3922
3986
|
});
|
|
3923
3987
|
const normalized = result.kind === "info" && ctx.dryRun ? {
|
|
3924
3988
|
kind: "dryRun",
|
|
3925
3989
|
info: {
|
|
3926
3990
|
dryRun: true,
|
|
3927
3991
|
command: `modeler ${action}`,
|
|
3928
|
-
message: result.message
|
|
3992
|
+
message: result.message,
|
|
3993
|
+
wouldChange: false
|
|
3929
3994
|
}
|
|
3930
3995
|
} : result;
|
|
3931
3996
|
if (normalized.kind === "dryRun") {
|
|
@@ -13,18 +13,24 @@ development.
|
|
|
13
13
|
- `c8ctl setup --yes` — set up the defaults without prompting (Rocket Launch
|
|
14
14
|
blueprint).
|
|
15
15
|
- `c8ctl setup --remove [--stop-cluster]` — preview and remove setup-managed
|
|
16
|
-
MCP entries, Camunda skills,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
MCP entries, Camunda skills, a c8ctl-managed Desktop Modeler installation,
|
|
17
|
+
and blueprint files; `--stop-cluster` also stops the local cluster without
|
|
18
|
+
purging its data.
|
|
19
19
|
|
|
20
20
|
## Architecture
|
|
21
21
|
|
|
22
22
|
The wizard orchestrates the commands that own each capability instead of
|
|
23
23
|
reimplementing them: `c8ctl cluster start`/`stop` (cluster plugin),
|
|
24
24
|
`c8ctl modeler install` (modeler plugin), `c8ctl skills install` (skills
|
|
25
|
-
plugin), `c8ctl mcp install` and `c8ctl deploy` (core).
|
|
26
|
-
to text output; their progress is buffered and surfaces
|
|
27
|
-
fails.
|
|
25
|
+
plugin), `c8ctl mcp install` (mcp plugin) and `c8ctl deploy` (core).
|
|
26
|
+
Children run pinned to text output; their progress is buffered and surfaces
|
|
27
|
+
only when a step fails.
|
|
28
|
+
|
|
29
|
+
Removal orchestrates the same owners: the unified preview is built from
|
|
30
|
+
shared inspection helpers and a `modeler remove --dry-run` probe, and after
|
|
31
|
+
one confirmation the actual teardown runs as child commands —
|
|
32
|
+
`c8ctl mcp uninstall` per harness,
|
|
33
|
+
`c8ctl skills remove --harness <harness> --yes`, and `c8ctl modeler remove`.
|
|
28
34
|
|
|
29
35
|
## Flags
|
|
30
36
|
|