@zeroxyz/cli 1.11.0 → 1.12.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.
Files changed (3) hide show
  1. package/README.md +1 -3
  2. package/dist/index.js +18 -63
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -68,9 +68,7 @@ Bootstrap Zero for agent harnesses.
68
68
 
69
69
  ```bash
70
70
  zero init # target every supported agent
71
- zero init --agent codex # only Codex
72
- zero init --agent claude,codex # comma-separated or repeat --agent
73
- zero init --agent standalone # only standalone skills + Claude/Codex hooks
71
+ zero init --standalone # only standalone skills + Claude/Codex hooks
74
72
  zero init --no-fallback # fail instead of writing standalone fallback
75
73
  zero init --dry-run # preview actions
76
74
  ```
package/dist/index.js CHANGED
@@ -78576,7 +78576,7 @@ init_esm_shims();
78576
78576
 
78577
78577
  // package.json
78578
78578
  var package_default = {
78579
- version: "1.11.0"};
78579
+ version: "1.12.0"};
78580
78580
 
78581
78581
  // src/app.ts
78582
78582
  init_esm_shims();
@@ -149726,45 +149726,20 @@ var CODEX_HOOKS_PATH = ".codex/hooks.json";
149726
149726
  var CLI_VERSION = package_default.version;
149727
149727
  var STANDALONE = "standalone";
149728
149728
  var unique = (items) => [...new Set(items)];
149729
- var parseAgentValues = (values, matrixIds) => {
149730
- if (!values || values.length === 0) {
149729
+ var buildSelection = (standalone, matrixIds) => {
149730
+ if (standalone) {
149731
149731
  return {
149732
- kind: "default",
149733
- requestedAgents: [...matrixIds],
149734
- pluginAgents: [...matrixIds]
149732
+ kind: "standalone",
149733
+ requestedAgents: [STANDALONE],
149734
+ pluginAgents: []
149735
149735
  };
149736
149736
  }
149737
- const parsed = unique(
149738
- values.flatMap(
149739
- (value) => value.split(",").map((part) => part.trim().toLowerCase()).filter(Boolean)
149740
- )
149741
- );
149742
- if (parsed.length === 0) {
149743
- throw new Error("Pass at least one agent name to --agent");
149744
- }
149745
- const valid = /* @__PURE__ */ new Set([...matrixIds, STANDALONE]);
149746
- const agents = parsed.map((value) => {
149747
- if (!valid.has(value)) {
149748
- throw new Error(
149749
- `Unknown agent "${value}". Expected one of: ${[...valid].join(", ")}`
149750
- );
149751
- }
149752
- return value;
149753
- });
149754
- if (agents.includes(STANDALONE) && agents.length > 1) {
149755
- throw new Error(
149756
- "`standalone` cannot be combined with other --agent values; run it separately."
149757
- );
149758
- }
149759
- if (agents[0] === STANDALONE) {
149760
- return { kind: "standalone", requestedAgents: agents, pluginAgents: [] };
149761
- }
149762
- return { kind: "specific", requestedAgents: agents, pluginAgents: agents };
149737
+ return {
149738
+ kind: "default",
149739
+ requestedAgents: [...matrixIds],
149740
+ pluginAgents: [...matrixIds]
149741
+ };
149763
149742
  };
149764
- var collectAgentOption = (value, previous = []) => [
149765
- ...previous,
149766
- value
149767
- ];
149768
149743
  var commandSummary = (command, args) => [command, ...args].join(" ");
149769
149744
  var commandOutput = (result) => {
149770
149745
  const chunks = [result.stderr, result.stdout].map((chunk) => typeof chunk === "string" ? chunk.trim() : "").filter(Boolean);
@@ -149830,25 +149805,10 @@ var installAgentPlugin = (entry, method, options) => {
149830
149805
  detail: optionalFailure ? `installed; ignored ${optionalFailure}` : void 0
149831
149806
  };
149832
149807
  };
149833
- var manualInstructionLines = (entry, method) => {
149834
- if (!method) {
149835
- return [`${entry.name}: no automated plugin install is available.`];
149836
- }
149837
- return [
149838
- `${entry.name}: run these from a shell where \`${method.executable}\` is on PATH:`,
149839
- ...method.steps.map((step) => commandSummary(step.command, step.args))
149840
- ];
149841
- };
149842
- var printManualInstructions = (lines) => {
149843
- for (const line of lines) {
149844
- console.log(` ${color.gray("\xB7")} ${color.dim(line)}`);
149845
- }
149846
- };
149847
149808
  var fallbackReason = (selection, detections, results) => {
149848
- if (selection.kind === "standalone")
149849
- return "--agent standalone was requested";
149809
+ if (selection.kind === "standalone") return "--standalone was requested";
149850
149810
  if (!detections.some((detection) => detection.present)) {
149851
- return selection.kind === "default" ? "no supported harness was detected in this environment" : "no requested harness was detected in this environment";
149811
+ return "no supported harness was detected in this environment";
149852
149812
  }
149853
149813
  if (results.length > 0 && results.every((result) => result.status === "skipped_unavailable")) {
149854
149814
  return "no detected harness could install the Zero plugin";
@@ -150122,8 +150082,8 @@ var runInit = async (appContext, options = {}) => {
150122
150082
  );
150123
150083
  currentStep = "plugins";
150124
150084
  const entryById = new Map(entries.map((entry) => [entry.id, entry]));
150125
- const selection = parseAgentValues(
150126
- options.agent,
150085
+ const selection = buildSelection(
150086
+ options.standalone ?? false,
150127
150087
  entries.map((entry) => entry.id)
150128
150088
  );
150129
150089
  const requestedAgents = selection.requestedAgents;
@@ -150170,9 +150130,6 @@ var runInit = async (appContext, options = {}) => {
150170
150130
  fallbackSkillDirs.push(join(home, dir));
150171
150131
  }
150172
150132
  }
150173
- if (selection.kind === "specific") {
150174
- printManualInstructions(manualInstructionLines(entry, method));
150175
- }
150176
150133
  }
150177
150134
  const pluginSucceeded = pluginResults.some(
150178
150135
  (result) => result.status === "installed" || result.status === "would_install"
@@ -150280,12 +150237,10 @@ var runInit = async (appContext, options = {}) => {
150280
150237
  }
150281
150238
  };
150282
150239
  var initCommand = (appContext) => new Command("init").description(
150283
- "Install the Zero plugin for supported agents, with a standalone skill/hook fallback"
150240
+ "Install the Zero plugin for every supported agent, with a standalone skill/hook fallback"
150284
150241
  ).option(
150285
- "--agent <agent>",
150286
- "Agent target: a supported harness id (e.g. claude-code, codex, droid, gemini-cli) or standalone. Repeat or comma-separate values. Omit to target every supported agent.",
150287
- collectAgentOption,
150288
- []
150242
+ "--standalone",
150243
+ "Install only the standalone skill/hooks fallback; skip all plugin installs"
150289
150244
  ).option(
150290
150245
  "--no-fallback",
150291
150246
  "Do not install standalone skills/hooks if plugin install does not succeed"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeroxyz/cli",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "zero": "dist/index.js",