@camunda8/cli 4.7.0-alpha.33 → 4.7.0-alpha.34

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.
@@ -6,12 +6,11 @@ development.
6
6
  ## Commands
7
7
 
8
8
  - `c8ctl setup` — the guided wizard: start a local cluster (downloading
9
- Camunda 8 Run on first run), install Desktop Modeler, create a starter
10
- project from a blueprint, deploy and run it, and set up AI assistant
11
- tooling (skills, MCP servers). Nothing is installed without a selection or
12
- `--yes`.
13
- - `c8ctl setup --yes` — set up the defaults without prompting (Rocket Launch
14
- blueprint).
9
+ Camunda 8 Run on first run), install Desktop Modeler, create the Rocket
10
+ Launch example, deploy and run it, and set up AI assistant tooling (skills,
11
+ MCP servers). Nothing is installed without a selection or `--yes`.
12
+ - `c8ctl setup --yes` — set up the defaults without prompting, including the
13
+ Rocket Launch example.
15
14
  - `c8ctl setup --remove` — preview and remove setup-managed MCP entries,
16
15
  Camunda skills, a c8ctl-managed Desktop Modeler installation, blueprint
17
16
  files, and the local cluster: the cluster is stopped, and its runtime
@@ -4560,7 +4560,6 @@ var SETUP_BLUEPRINTS = [
4560
4560
  {
4561
4561
  id: "rocket-launch",
4562
4562
  name: "Rocket Launch",
4563
- description: "A fully automated hello-world process with a decision.",
4564
4563
  guideUrl: "https://docs.camunda.io/docs/guides/getting-started-hello-world/",
4565
4564
  source: {
4566
4565
  owner: "camunda",
@@ -4589,52 +4588,6 @@ var SETUP_BLUEPRINTS = [
4589
4588
  `Inspect it: c8ctl get process-instance ${processInstanceKey} --profile local`,
4590
4589
  `Run again: c8ctl run "${join4(projectDir, "rocket-launch.bpmn")}" --profile local --variables '${JSON.stringify(ROCKET_LAUNCH_START_VARIABLES)}'`
4591
4590
  ]
4592
- },
4593
- {
4594
- id: "service-worker",
4595
- name: "Service worker",
4596
- description: "An order process with service worker implementations.",
4597
- guideUrl: "https://docs.camunda.io/docs/guides/getting-started-example/",
4598
- source: {
4599
- owner: "camunda",
4600
- repo: "camunda-8-get-started",
4601
- ref: "main",
4602
- path: "2-order-process-with-service-workers"
4603
- },
4604
- // The worker implementations each embed a copy of the model; only
4605
- // the bpmn/ directory is deployed.
4606
- deployPath: "bpmn",
4607
- processFile: "bpmn/order-process.bpmn",
4608
- // The started instance stalls at its first service task until a
4609
- // worker connects — starting one is the whole point of the box.
4610
- // One block per shipped worker language. Node.js and Python cd
4611
- // into the worker directory: a bare `npm install --prefix <dir>`
4612
- // is misread by npm on Windows as a global install of the
4613
- // caller's directory, and the Python worker needs a virtualenv —
4614
- // pip into an externally managed system Python fails (PEP 668).
4615
- // Java and C# can address the project directly: -f and --project
4616
- // share neither defect. Paths are quoted (the working directory
4617
- // may contain spaces), every command gets its own line (&& is a
4618
- // syntax error in Windows PowerShell 5.1), and all lines stay
4619
- // printable ASCII so the box keeps its borders.
4620
- nextSteps: ({ projectDir, processInstanceKey }) => [
4621
- "Process instance is running on the local cluster.",
4622
- "It waits at the first service task until a worker connects.",
4623
- `Open it: http://localhost:8080/operate/processes/${processInstanceKey}`,
4624
- " (login using demo / demo as username / password)",
4625
- "",
4626
- "Start a worker in your language:",
4627
- ` Node.js: cd "${join4(projectDir, "nodejs")}"`,
4628
- " npm install",
4629
- " npm start",
4630
- ` Python: cd "${join4(projectDir, "python")}"`,
4631
- " python -m venv .venv",
4632
- " source .venv/bin/activate # Windows: .venv\\Scripts\\activate",
4633
- " pip install -r requirements.txt",
4634
- " python main.py",
4635
- ` Java: mvn -f "${join4(projectDir, "java")}" spring-boot:run`,
4636
- ` C#: dotnet run --project "${join4(projectDir, "csharp")}"`
4637
- ]
4638
4591
  }
4639
4592
  ];
4640
4593
  var BlueprintScaffoldError = class extends Error {
@@ -4826,14 +4779,6 @@ function readRemovalMarker(directory) {
4826
4779
  { hint: "Repair or remove the marker manually before trying again." }
4827
4780
  );
4828
4781
  }
4829
- const blueprint = SETUP_BLUEPRINTS.find(
4830
- (candidate) => candidate.id === value.id
4831
- );
4832
- if (!blueprint) {
4833
- throw new BlueprintScaffoldError(
4834
- `Cannot safely remove the blueprint in ${directory}: "${value.id}" is not a supported setup blueprint.`
4835
- );
4836
- }
4837
4782
  if (value.files.some(
4838
4783
  (file) => !isSafeRelativePath(file) || file === MARKER_FILE
4839
4784
  ) || new Set(value.files).size !== value.files.length) {
@@ -4852,10 +4797,15 @@ function planSetupBlueprintRemovals({
4852
4797
  onError
4853
4798
  } = {}) {
4854
4799
  const root = resolve3(cwd);
4855
- const directories = [
4856
- root,
4857
- ...SETUP_BLUEPRINTS.map((blueprint) => resolve3(root, blueprint.id))
4858
- ];
4800
+ const directories = [root];
4801
+ try {
4802
+ directories.push(
4803
+ ...readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => resolve3(root, entry.name))
4804
+ );
4805
+ } catch (error) {
4806
+ if (!onError) throw error;
4807
+ onError(root, error);
4808
+ }
4859
4809
  const seen = /* @__PURE__ */ new Set();
4860
4810
  const removals = [];
4861
4811
  for (const directory of directories) {
@@ -4866,12 +4816,10 @@ function planSetupBlueprintRemovals({
4866
4816
  if (!result) continue;
4867
4817
  const blueprint = SETUP_BLUEPRINTS.find(
4868
4818
  (candidate) => candidate.id === result.marker.id
4869
- );
4870
- if (!blueprint) {
4871
- throw new BlueprintScaffoldError(
4872
- `Cannot safely remove the blueprint in ${directory}: its marker is unsupported.`
4873
- );
4874
- }
4819
+ ) ?? {
4820
+ id: result.marker.id,
4821
+ name: result.marker.id
4822
+ };
4875
4823
  removals.push({
4876
4824
  blueprint,
4877
4825
  directory,
@@ -5077,7 +5025,7 @@ async function scaffoldSetupBlueprint({
5077
5025
  throw new BlueprintScaffoldError(
5078
5026
  `Blueprint destination ${directory} already contains the "${marker.id}" blueprint.`,
5079
5027
  {
5080
- hint: `Remove the directory to start over, or keep it and pick the "${marker.id}" blueprint in the setup wizard.`
5028
+ hint: "Remove the directory to start over; existing files are never overwritten."
5081
5029
  }
5082
5030
  );
5083
5031
  }
@@ -5308,7 +5256,7 @@ var SETUP_STEPS = [
5308
5256
  {
5309
5257
  id: "scaffold-blueprint",
5310
5258
  title: "Create the blueprint project",
5311
- detail: "Rocket Launch or Service worker",
5259
+ detail: "Rocket Launch example",
5312
5260
  component: "blueprint"
5313
5261
  },
5314
5262
  {
@@ -5799,6 +5747,7 @@ async function inspectSetupRemovalInventory({
5799
5747
  if (!globalThis.c8ctl) throw new Error("c8ctl runtime not initialised");
5800
5748
  var c8ctl2 = globalThis.c8ctl;
5801
5749
  var LOCAL_TENANT_ID = "<default>";
5750
+ var SETUP_BLUEPRINT = SETUP_BLUEPRINTS[0];
5802
5751
  function applyComponentFlags(selected, flags) {
5803
5752
  const next = new Set(selected);
5804
5753
  if (flags["no-modeler"]) next.delete("modeler");
@@ -5808,7 +5757,7 @@ function applyComponentFlags(selected, flags) {
5808
5757
  }
5809
5758
  function effectiveBlueprint(selected) {
5810
5759
  if (!selected.has("blueprint")) return void 0;
5811
- return SETUP_BLUEPRINTS[0].id;
5760
+ return SETUP_BLUEPRINT.id;
5812
5761
  }
5813
5762
  async function runPrerequisites(ctx) {
5814
5763
  const results = await checkPrerequisites();
@@ -6034,9 +5983,8 @@ async function runModelerInstall(ctx) {
6034
5983
  });
6035
5984
  }
6036
5985
  async function runBlueprintScaffold(ctx, run) {
6037
- const id = run.blueprintId ?? SETUP_BLUEPRINTS[0].id;
6038
5986
  const scaffolded = await scaffoldSetupBlueprint({
6039
- id,
5987
+ id: SETUP_BLUEPRINT.id,
6040
5988
  // The completion line is the step's takeaway — fresh or reused —
6041
5989
  // so it survives the success collapse; progress chatter does not.
6042
5990
  onProgress: (event) => ctx.logger.info(event.message, {
@@ -6047,14 +5995,11 @@ async function runBlueprintScaffold(ctx, run) {
6047
5995
  }
6048
5996
  async function runBlueprintDeploy(ctx, run) {
6049
5997
  const { logger } = ctx;
6050
- const blueprint = setupBlueprintById(
6051
- run.blueprintId ?? SETUP_BLUEPRINTS[0].id
6052
- );
6053
5998
  const directory = run.blueprintDir;
6054
5999
  if (!directory) {
6055
6000
  throw new Error("The blueprint project was not created.");
6056
6001
  }
6057
- const deployDir = join7(directory, blueprint.deployPath ?? ".");
6002
+ const deployDir = directory;
6058
6003
  const health = await checkLocalClusterHealth();
6059
6004
  if (!health.healthy) {
6060
6005
  throw new Error(
@@ -6090,17 +6035,19 @@ async function runBlueprintDeploy(ctx, run) {
6090
6035
  } finally {
6091
6036
  rmSync3(deployDataDir, { recursive: true, force: true });
6092
6037
  }
6093
- const processFile = join7(directory, blueprint.processFile);
6038
+ const processFile = join7(directory, SETUP_BLUEPRINT.processFile);
6094
6039
  const processId = extractProcessId(readFileSync6(processFile, "utf-8"));
6095
6040
  if (!processId) {
6096
- throw new Error(`Could not find a process id in ${blueprint.processFile}.`);
6041
+ throw new Error(
6042
+ `Could not find a process id in ${SETUP_BLUEPRINT.processFile}.`
6043
+ );
6097
6044
  }
6098
- logger.info(`Starting a ${blueprint.name} process instance...`);
6045
+ logger.info(`Starting a ${SETUP_BLUEPRINT.name} process instance...`);
6099
6046
  const created = await c8ctl2.createClient(DEFAULT_PROFILE).createProcessInstance({
6100
6047
  processDefinitionId: ProcessDefinitionId.assumeExists(processId),
6101
6048
  tenantId: TenantId.assumeExists(LOCAL_TENANT_ID),
6102
- ...blueprint.startVariables !== void 0 && {
6103
- variables: blueprint.startVariables
6049
+ ...SETUP_BLUEPRINT.startVariables !== void 0 && {
6050
+ variables: SETUP_BLUEPRINT.startVariables
6104
6051
  }
6105
6052
  });
6106
6053
  logger.info(`Process instance created: ${created.processInstanceKey}`);
@@ -6207,9 +6154,9 @@ function withBufferedOutput(ctx, buffer, aroundPassthrough) {
6207
6154
  });
6208
6155
  return Object.create(ctx, { logger: { value: bufferedLogger } });
6209
6156
  }
6210
- async function executePlan(ctx, selected, blueprintId, { color }) {
6157
+ async function executePlan(ctx, selected, { color }) {
6211
6158
  const { logger } = ctx;
6212
- const run = { blueprintId };
6159
+ const run = {};
6213
6160
  const succeeded = /* @__PURE__ */ new Set();
6214
6161
  let failures = 0;
6215
6162
  const width = Math.max(...SETUP_STEPS.map((step) => step.title.length));
@@ -6733,22 +6680,7 @@ async function runSetup(ctx, flags) {
6733
6680
  selected = defaultSelection();
6734
6681
  }
6735
6682
  selected = applyComponentFlags(selected, flags);
6736
- let blueprintId = effectiveBlueprint(selected);
6737
- if (selected.has("blueprint") && interactive) {
6738
- const choice = await ctx.prompt.select({
6739
- message: "Which starter blueprint should we install?",
6740
- options: SETUP_BLUEPRINTS.map((b) => ({
6741
- label: b.name,
6742
- description: `${b.description} \u2014 guide: ${b.guideUrl}`,
6743
- value: b.id
6744
- }))
6745
- });
6746
- if (choice.cancelled) {
6747
- logger.info("Cancelled \u2014 nothing was changed.");
6748
- return;
6749
- }
6750
- blueprintId = choice.value;
6751
- }
6683
+ const blueprintId = effectiveBlueprint(selected);
6752
6684
  if (jsonMode) {
6753
6685
  logger.json(setupPlanPayload(selected, { blueprint: blueprintId }));
6754
6686
  return;
@@ -6765,29 +6697,24 @@ async function runSetup(ctx, flags) {
6765
6697
  { essential: true }
6766
6698
  );
6767
6699
  }
6768
- const { failures, run } = await executePlan(ctx, selected, blueprintId, {
6769
- color
6770
- });
6700
+ const { failures, run } = await executePlan(ctx, selected, { color });
6771
6701
  const nextSteps = [];
6772
6702
  if (run.blueprintDir) {
6773
- const blueprint = setupBlueprintById(
6774
- run.blueprintId ?? SETUP_BLUEPRINTS[0].id
6775
- );
6776
6703
  if (run.processInstanceKey !== void 0) {
6777
6704
  nextSteps.push(
6778
- ...blueprint.nextSteps({
6705
+ ...SETUP_BLUEPRINT.nextSteps({
6779
6706
  projectDir: run.blueprintDir,
6780
6707
  processInstanceKey: run.processInstanceKey
6781
6708
  })
6782
6709
  );
6783
6710
  }
6784
6711
  nextSteps.push(`Project: ${run.blueprintDir}`);
6785
- nextSteps.push(`Guide: ${blueprint.guideUrl}`);
6712
+ nextSteps.push(`Guide: ${SETUP_BLUEPRINT.guideUrl}`);
6786
6713
  } else if (run.clusterStarted) {
6787
6714
  nextSteps.push("Run your first process:");
6788
6715
  nextSteps.push(' c8ctl use tenant "<default>"');
6789
6716
  nextSteps.push(" c8ctl run my-process.bpmn --profile local");
6790
- nextSteps.push('Or re-run "c8ctl setup" and pick a starter blueprint.');
6717
+ nextSteps.push('Or re-run "c8ctl setup" and include the example project.');
6791
6718
  }
6792
6719
  if (run.clusterStarted) {
6793
6720
  nextSteps.push("Operate: http://localhost:8080/operate (demo/demo)");
@@ -6838,15 +6765,15 @@ async function setupHandler(_args, flagsRecord, ctx) {
6838
6765
  process.exitCode = 1;
6839
6766
  }
6840
6767
  }
6841
- var SETUP_HELP_DESCRIPTION = `Guided first-run setup: install a local cluster, a starter blueprint project, and AI assistant tooling.
6768
+ var SETUP_HELP_DESCRIPTION = `Guided first-run setup: install a local cluster, the Rocket Launch example, and AI assistant tooling.
6842
6769
 
6843
- The wizard offers to start a local cluster (downloading Camunda 8 Run on first run), install Desktop Modeler, create a starter project from a blueprint, deploy and run it, and set up AI assistant tooling. Nothing is installed without your say.
6770
+ The wizard offers to start a local cluster (downloading Camunda 8 Run on first run), install Desktop Modeler, create the Rocket Launch example, deploy and run it, and set up AI assistant tooling. Nothing is installed without your say.
6844
6771
 
6845
6772
  Each step announces its title and ends in [SUCCESS], [ERROR] or [SKIPPED]; a step's own output is shown only when it fails, and a failed step does not stop the rest. The blueprint and the cluster MCP server need the local cluster \u2014 deselect the cluster and both options are disabled.
6846
6773
 
6847
6774
  A browser window opens when the local cluster reports healthy; the docs MCP server asks you to sign in in a browser on first use \u2014 announced up front.
6848
6775
 
6849
- A run without a selection (piped output, CI) installs nothing unless you pass --yes; --json prints the plan without executing. The starter blueprint is chosen in the wizard; a non-interactive --yes run uses Rocket Launch.
6776
+ A run without a selection (piped output, CI) installs nothing unless you pass --yes; --json prints the plan without executing. Setup always uses the Rocket Launch example.
6850
6777
 
6851
6778
  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.
6852
6779
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda8/cli",
3
- "version": "4.7.0-alpha.33",
3
+ "version": "4.7.0-alpha.34",
4
4
  "description": "Camunda 8 CLI - minimal-dependency CLI for Camunda 8 operations",
5
5
  "type": "module",
6
6
  "engines": {