c8ctl-plugin-nano 1.43.2 → 1.44.0

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 CHANGED
@@ -900,9 +900,10 @@ c8ctl nano workforce stop # remove this manifest's workers (+ st
900
900
  c8ctl nano workforce remove qwen # drop an entry ("all" clears the manifest)
901
901
  ```
902
902
 
903
- Every subcommand takes `--profile <name>` (default `default`) to select which
904
- manifest it operates on, so you can keep several — `--profile review-only`,
905
- `--profile full-fleet` — side by side.
903
+ Every subcommand takes `--manifest <name>` (default `default`) to select which
904
+ manifest it operates on, so you can keep several — `--manifest review-only`,
905
+ `--manifest full-fleet` — side by side. (This flag was renamed from `--profile`,
906
+ which now collides with c8ctl's global connection-profile flag.)
906
907
 
907
908
  ### The manifest
908
909
 
@@ -991,8 +992,9 @@ hired with `--capabilities ""`.
991
992
  - `start` with an empty/absent manifest → a friendly pointer at `workforce add`,
992
993
  exit 0.
993
994
 
994
- `--json` on `list`/`status` emits machine-readable output (through the same
995
- output-mode-aware logger) so the install script and CI can consume it.
995
+ `--json` on `list`/`status` emits machine-readable output (via c8ctl's global
996
+ `--json` flag, whose parsed value is passed through to the handler) so the
997
+ install script and CI can consume it.
996
998
 
997
999
  ## Cleaning up disk
998
1000
 
package/c8ctl-plugin.js CHANGED
@@ -8762,7 +8762,7 @@ function formatWorkforceStatus(report) {
8762
8762
  const missing = entries.filter((e) => e.running < e.desired);
8763
8763
  if (missing.length > 0) {
8764
8764
  lines.push('');
8765
- lines.push(` Missing: ${missing.map((e) => `${e.profile} (${e.running}/${e.desired})`).join(', ')} — run: c8ctl nano workforce start${report.name === DEFAULT_WORKFORCE_MANIFEST ? '' : ` --profile ${report.name}`}`);
8765
+ lines.push(` Missing: ${missing.map((e) => `${e.profile} (${e.running}/${e.desired})`).join(', ')} — run: c8ctl nano workforce start${report.name === DEFAULT_WORKFORCE_MANIFEST ? '' : ` --manifest ${report.name}`}`);
8766
8766
  }
8767
8767
  if (Array.isArray(report.extra) && report.extra.length > 0) {
8768
8768
  lines.push('');
@@ -8771,16 +8771,16 @@ function formatWorkforceStatus(report) {
8771
8771
  return lines.join('\n');
8772
8772
  }
8773
8773
 
8774
- /** Resolve the manifest name from `--profile` (default `default`). Pure. */
8775
- function lastProfileValue(flags) {
8776
- // A repeated `--profile` flag arrives as a string[]; honor the last value.
8777
- let profile = flags?.profile;
8778
- if (Array.isArray(profile)) profile = profile.length ? profile[profile.length - 1] : '';
8779
- return typeof profile === 'string' ? profile.trim() : '';
8774
+ /** Resolve the manifest name from `--manifest` (default `default`). Pure. */
8775
+ function lastManifestValue(flags) {
8776
+ // A repeated `--manifest` flag arrives as a string[]; honor the last value.
8777
+ let manifest = flags?.manifest;
8778
+ if (Array.isArray(manifest)) manifest = manifest.length ? manifest[manifest.length - 1] : '';
8779
+ return typeof manifest === 'string' ? manifest.trim() : '';
8780
8780
  }
8781
8781
 
8782
8782
  function workforceManifestName(flags) {
8783
- return lastProfileValue(flags) || DEFAULT_WORKFORCE_MANIFEST;
8783
+ return lastManifestValue(flags) || DEFAULT_WORKFORCE_MANIFEST;
8784
8784
  }
8785
8785
 
8786
8786
  /** Fetch the live supervisor worker set, or `[]` when no daemon is running. */
@@ -8798,7 +8798,7 @@ async function workforceAddCmd(req, flags, manifestName) {
8798
8798
  const logger = getLogger();
8799
8799
  const profile = req.positional[1];
8800
8800
  if (!profile) {
8801
- logger.error('Usage: c8ctl nano workforce add <profile> [--instances <n>] [--auto [--auto-scope <s>] | --roles a,b,c] [--arg <flag> ...] [--profile <manifest>]');
8801
+ logger.error('Usage: c8ctl nano workforce add <profile> [--instances <n>] [--auto [--auto-scope <s>] | --roles a,b,c] [--arg <flag> ...] [--manifest <manifest>]');
8802
8802
  process.exit(1);
8803
8803
  }
8804
8804
  if (!isValidProfileName(profile)) {
@@ -8872,14 +8872,14 @@ async function workforceAddCmd(req, flags, manifestName) {
8872
8872
  manifest = upsertManifestEntry(manifest, entry);
8873
8873
  writeWorkforceManifest(manifest);
8874
8874
  logger.info(`${existed ? 'Updated' : 'Added'} "${profile}" in workforce "${manifestName}": instances ${count}, roles ${describeEntryRoles(entry)}${extraArgs.length ? `, args ${redactWorkArgs(extraArgs).join(' ')}` : ''}.`);
8875
- logger.info(`Bring it up with: c8ctl nano workforce start${manifestName === DEFAULT_WORKFORCE_MANIFEST ? '' : ` --profile ${manifestName}`}`);
8875
+ logger.info(`Bring it up with: c8ctl nano workforce start${manifestName === DEFAULT_WORKFORCE_MANIFEST ? '' : ` --manifest ${manifestName}`}`);
8876
8876
  }
8877
8877
 
8878
8878
  async function workforceRemoveCmd(req, flags, manifestName) {
8879
8879
  const logger = getLogger();
8880
8880
  const profile = req.positional[1];
8881
8881
  if (!profile) {
8882
- logger.error('Usage: c8ctl nano workforce remove <profile|all> [--profile <manifest>]');
8882
+ logger.error('Usage: c8ctl nano workforce remove <profile|all> [--manifest <manifest>]');
8883
8883
  process.exit(1);
8884
8884
  }
8885
8885
  const manifest = readWorkforceManifestStrict(manifestName);
@@ -8894,9 +8894,9 @@ async function workforceRemoveCmd(req, flags, manifestName) {
8894
8894
  async function workforceListCmd(req, flags, manifestName) {
8895
8895
  const logger = getLogger();
8896
8896
  const json = coerceBool(flags?.json, false);
8897
- const explicitProfile = lastProfileValue(flags) !== '';
8897
+ const explicitManifest = lastManifestValue(flags) !== '';
8898
8898
  const manifest = readWorkforceManifestStrict(manifestName);
8899
- const others = explicitProfile ? null : listWorkforceManifestNames();
8899
+ const others = explicitManifest ? null : listWorkforceManifestNames();
8900
8900
  if (json) {
8901
8901
  const payload = { manifest: manifest || null };
8902
8902
  if (others) payload.manifests = others;
@@ -9095,15 +9095,15 @@ async function workforceStopCmd(req, flags, manifestName) {
9095
9095
  async function workforceCommand(req, flags) {
9096
9096
  const logger = getLogger();
9097
9097
  const action = (req.positional[0] || '').toLowerCase();
9098
- // A bare `--profile` (no value) is parsed as boolean `true`; reject it so we
9098
+ // A bare `--manifest` (no value) is parsed as boolean `true`; reject it so we
9099
9099
  // fail fast instead of silently operating on the default manifest.
9100
- if (flags?.profile === true) {
9101
- logger.error('--profile requires a manifest name.');
9100
+ if (flags?.manifest === true) {
9101
+ logger.error('--manifest requires a manifest name.');
9102
9102
  process.exit(1);
9103
9103
  }
9104
9104
  const manifestName = workforceManifestName(flags);
9105
9105
  if (!isValidManifestName(manifestName)) {
9106
- logger.error(`Invalid --profile "${manifestName}". Use letters, digits, dot, dash or underscore.`);
9106
+ logger.error(`Invalid --manifest "${manifestName}". Use letters, digits, dot, dash or underscore.`);
9107
9107
  process.exit(1);
9108
9108
  }
9109
9109
  switch (action) {
@@ -10957,7 +10957,7 @@ export {
10957
10957
  buildWorkforceStatus,
10958
10958
  formatWorkforceStatus,
10959
10959
  workforceManifestName,
10960
- lastProfileValue,
10960
+ lastManifestValue,
10961
10961
  };
10962
10962
 
10963
10963
  export const metadata = {
@@ -11015,7 +11015,7 @@ export const metadata = {
11015
11015
  { command: 'c8ctl nano workforce add copilot --instances 5 --auto', description: 'Compose a reusable fleet: 5 copilot workers serving every deployed agent job type (--auto)' },
11016
11016
  { command: 'c8ctl nano workforce add qwen --instances 2 --roles pr-review,feature', description: "Add an entry mapped to explicit job types (<rank>:pr-review, <rank>:feature, where <rank> is the qwen hire's rank at start) — does not mutate the hired profile" },
11017
11017
  { command: 'c8ctl nano workforce start', description: "Ensure the daemon is up, then reconcile running workers to the 'default' manifest (idempotent — a second run changes nothing)" },
11018
- { command: 'c8ctl nano workforce start --profile review-only', description: 'Bring up a named manifest (<stateHome>/workforce/review-only.json)' },
11018
+ { command: 'c8ctl nano workforce start --manifest review-only', description: 'Bring up a named manifest (<stateHome>/workforce/review-only.json)' },
11019
11019
  { command: 'c8ctl nano workforce status --json', description: 'Manifest entries joined against live supervisor status (desired vs actual), machine-readable for the install script / CI' },
11020
11020
  { command: 'c8ctl nano workforce list', description: 'Print the default manifest and list the manifests that exist on this machine' },
11021
11021
  { command: 'c8ctl nano workforce stop', description: "Remove this manifest's workers; stop the daemon too if no supervised workers remain" },
@@ -11090,9 +11090,8 @@ export const commands = {
11090
11090
  worker: { type: 'string', multiple: true, description: 'supervisor start: profile to launch as a supervised worker (repeatable)' },
11091
11091
  instances: { type: 'string', description: `supervisor add / workforce add: spawn/compose N distinct instances of the profile in one call (default 1, max ${MAX_ADD_INSTANCES}; for supervisor add cannot combine with --name)` },
11092
11092
  attach: { type: 'boolean', description: 'supervisor start: attach the interactive console after starting the daemon' },
11093
- profile: { type: 'string', description: `workforce: manifest name to operate on (default ${DEFAULT_WORKFORCE_MANIFEST}); each subcommand reads/writes <stateHome>/workforce/<name>.json` },
11093
+ manifest: { type: 'string', description: `workforce: manifest name to operate on (default ${DEFAULT_WORKFORCE_MANIFEST}); each subcommand reads/writes <stateHome>/workforce/<name>.json. Renamed from --profile (which now collides with c8ctl's global connection-profile flag).` },
11094
11094
  roles: { type: 'string', description: 'workforce add: comma-separated role list for the entry (→ --job-type <rank>:<role> at start); mutually exclusive with --auto' },
11095
- json: { type: 'boolean', description: 'workforce list/status: emit machine-readable JSON (for the install script / CI)' },
11096
11095
  },
11097
11096
  handler: async (args, flags) => {
11098
11097
  const logger = getLogger();
@@ -11252,7 +11251,7 @@ function printUsage() {
11252
11251
  console.log(' c8ctl nano assign <profileName> <cap[,cap...]> [--name <n>] [--capabilities <a,b>]');
11253
11252
  console.log(' c8ctl nano work <profileName> [--auto [--auto-scope <p>]] [--arg <switch> ...] [--recovery-window <ms>] [--idle-timeout <ms>] [--job-timeout <ms>] [--poll-timeout <ms>] [--job-type <token> ...] [--sandbox none|docker|podman] [--image <ref>] [--env NAME=VALUE ...] [--secret-resolver host] [--min-free-mb <n>] [--clone-timeout <ms>] [--keep-runs] [--stream]');
11254
11253
  console.log(' c8ctl nano supervisor [start|status|add|remove|restart|stop|logs|attach] ... (manage many workers from one terminal)');
11255
- console.log(' c8ctl nano workforce [add|remove|list|start|status|stop] ... [--profile <manifest>] (declarative, reusable fleet manifests)');
11254
+ console.log(' c8ctl nano workforce [add|remove|list|start|status|stop] ... [--manifest <manifest>] (declarative, reusable fleet manifests)');
11256
11255
  console.log('');
11257
11256
  console.log('Subcommands:');
11258
11257
  console.log(' start Spawn an N-node local cluster wired to talk to each other on localhost');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c8ctl-plugin-nano",
3
- "version": "1.43.2",
3
+ "version": "1.44.0",
4
4
  "type": "module",
5
5
  "description": "c8ctl plugin to start, inspect, and stop a local Nano BPM (nanobpmn) cluster",
6
6
  "main": "c8ctl-plugin.js",
@@ -57,12 +57,12 @@
57
57
  },
58
58
  "optionalDependencies": {
59
59
  "node-pty": "^1.0.0",
60
- "@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.43.2",
61
- "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.43.2",
62
- "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.43.2",
63
- "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.43.2",
64
- "@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.43.2",
65
- "@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.43.2",
66
- "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.43.2"
60
+ "@nanobpm/c8ctl-plugin-nano-darwin-arm64": "1.44.0",
61
+ "@nanobpm/c8ctl-plugin-nano-darwin-x64": "1.44.0",
62
+ "@nanobpm/c8ctl-plugin-nano-linux-x64": "1.44.0",
63
+ "@nanobpm/c8ctl-plugin-nano-linux-arm64": "1.44.0",
64
+ "@nanobpm/c8ctl-plugin-nano-linux-armv7": "1.44.0",
65
+ "@nanobpm/c8ctl-plugin-nano-linux-armv6": "1.44.0",
66
+ "@nanobpm/c8ctl-plugin-nano-win32-x64": "1.44.0"
67
67
  }
68
68
  }