@evo-dev/evodev 0.0.1-alpha.8 → 0.0.1-alpha.9

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.
@@ -4,13 +4,13 @@
4
4
  "name": "EvoDev"
5
5
  },
6
6
  "description": "EvoDev Claude Code hook plugins for AI-assisted R&D workflows.",
7
- "version": "0.0.1-alpha.8",
7
+ "version": "0.0.1-alpha.9",
8
8
  "plugins": [
9
9
  {
10
10
  "name": "evodev",
11
11
  "source": "./packages/plugin",
12
12
  "description": "EvoDev hook integration for disciplined AI coding workflows.",
13
- "version": "0.0.1-alpha.8",
13
+ "version": "0.0.1-alpha.9",
14
14
  "author": {
15
15
  "name": "EvoDev"
16
16
  },
package/dist/index.js CHANGED
@@ -20227,7 +20227,8 @@ async function runInit(options = {}) {
20227
20227
  label: "Prepare EvoDev config",
20228
20228
  detail: store.paths.rootDir
20229
20229
  });
20230
- const settingsInput = createInitSettingsInput(selectedPlugins, answers);
20230
+ const existingSettings = await readExistingSettingsForInit(store);
20231
+ const settingsInput = createInitSettingsInput(selectedPlugins, answers, existingSettings);
20231
20232
  emitInitProgress(options.progress, {
20232
20233
  status: "doing",
20233
20234
  current: 3,
@@ -20333,6 +20334,7 @@ async function runInit(options = {}) {
20333
20334
  homeDir,
20334
20335
  assetsRootDir,
20335
20336
  pluginRegistry,
20337
+ targetPlugins: selectedPlugins,
20336
20338
  force: true,
20337
20339
  now: () => timestamp
20338
20340
  }) : null;
@@ -20613,21 +20615,27 @@ function createCodeAgentChoices(defaultValue) {
20613
20615
  }
20614
20616
  ];
20615
20617
  }
20616
- function createInitSettingsInput(selectedPlugins, answers) {
20618
+ function createInitSettingsInput(selectedPlugins, answers, existingSettings) {
20619
+ const plugins2 = {};
20620
+ if (existingSettings === null) {
20621
+ plugins2.claude = { enabled: false };
20622
+ plugins2.codex = { enabled: false };
20623
+ }
20624
+ if (selectedPlugins.includes("claude")) {
20625
+ plugins2.claude = {
20626
+ enabled: true,
20627
+ autoSyncSkills: answers.registerSkills,
20628
+ autoSyncAgents: answers.registerAgents
20629
+ };
20630
+ }
20631
+ if (selectedPlugins.includes("codex")) {
20632
+ plugins2.codex = { enabled: true };
20633
+ }
20617
20634
  return {
20618
20635
  platform: {
20619
20636
  os: process.platform
20620
20637
  },
20621
- plugins: {
20622
- claude: {
20623
- enabled: selectedPlugins.includes("claude"),
20624
- autoSyncSkills: answers.registerSkills,
20625
- autoSyncAgents: answers.registerAgents
20626
- },
20627
- codex: {
20628
- enabled: selectedPlugins.includes("codex")
20629
- }
20630
- },
20638
+ plugins: plugins2,
20631
20639
  assets: {
20632
20640
  skills: {
20633
20641
  enabled: answers.registerSkills
@@ -20636,23 +20644,40 @@ function createInitSettingsInput(selectedPlugins, answers) {
20636
20644
  enabled: answers.registerAgents
20637
20645
  }
20638
20646
  },
20639
- hooks: createInitHookSettings(selectedPlugins)
20647
+ hooks: createInitHookSettings(selectedPlugins, existingSettings?.hooks)
20640
20648
  };
20641
20649
  }
20642
- function createInitHookSettings(selectedPlugins) {
20643
- const settings = createDefaultHookSettings();
20644
- settings.enabled = selectedPlugins.length > 0;
20645
- settings.targets.claude.enabled = selectedPlugins.includes("claude");
20646
- settings.targets.codex.enabled = selectedPlugins.includes("codex");
20647
- for (const eventType of Object.keys(settings.targets.claude.events)) {
20648
- settings.targets.claude.events[eventType] = selectedPlugins.includes("claude");
20649
- settings.targets.codex.events[eventType] = selectedPlugins.includes("codex");
20650
+ function createInitHookSettings(selectedPlugins, existingHooks) {
20651
+ const settings = existingHooks === undefined ? createDefaultHookSettings() : structuredClone(existingHooks);
20652
+ if (existingHooks === undefined) {
20653
+ for (const target of ["claude", "codex"]) {
20654
+ settings.targets[target].enabled = false;
20655
+ for (const eventType of Object.keys(settings.targets[target].events)) {
20656
+ settings.targets[target].events[eventType] = false;
20657
+ }
20658
+ }
20659
+ }
20660
+ settings.enabled ||= selectedPlugins.length > 0;
20661
+ for (const target of selectedPlugins) {
20662
+ settings.targets[target].enabled = true;
20663
+ for (const eventType of Object.keys(settings.targets[target].events)) {
20664
+ settings.targets[target].events[eventType] = true;
20665
+ }
20650
20666
  }
20651
20667
  settings.observability.metadataOnly = true;
20652
20668
  settings.observability.rawPayloadStorage = false;
20653
20669
  settings.observability.appendEvents = false;
20654
20670
  return settings;
20655
20671
  }
20672
+ async function readExistingSettingsForInit(store) {
20673
+ try {
20674
+ return await store.readSettings();
20675
+ } catch (error) {
20676
+ if (isNotFoundError11(error))
20677
+ return null;
20678
+ throw error;
20679
+ }
20680
+ }
20656
20681
  async function installSelectedCodeAgentPlugins(selectedPlugins, pluginRegistry, progress) {
20657
20682
  const results = [];
20658
20683
  if (selectedPlugins.length === 0) {
@@ -20904,19 +20929,19 @@ async function runSystemChecks(runtime, commandRunner) {
20904
20929
  })
20905
20930
  ]);
20906
20931
  return [
20907
- platform === "darwin" ? {
20908
- id: "system.macos",
20932
+ platform === "darwin" || platform === "linux" ? {
20933
+ id: "system.platform",
20909
20934
  group: "System",
20910
- label: "macOS",
20935
+ label: "Operating system",
20911
20936
  status: "pass",
20912
- message: "darwin detected"
20937
+ message: `${platform} detected`
20913
20938
  } : {
20914
- id: "system.macos",
20939
+ id: "system.platform",
20915
20940
  group: "System",
20916
- label: "macOS",
20941
+ label: "Operating system",
20917
20942
  status: "fail",
20918
- message: `${platform} detected; MVP is validated on macOS first`,
20919
- fix: "Run on macOS for the MVP path, or treat this environment as unsupported."
20943
+ message: `${platform} detected; EvoDev supports macOS and Linux`,
20944
+ fix: platform === "win32" ? "Run EvoDev inside WSL, which is supported as Linux." : "Run EvoDev on macOS or Linux."
20920
20945
  },
20921
20946
  bunResult.ok ? {
20922
20947
  id: "system.bun",
@@ -20956,9 +20981,9 @@ async function runSystemChecks(runtime, commandRunner) {
20956
20981
  id: "system.npm",
20957
20982
  group: "System",
20958
20983
  label: "npm",
20959
- status: "fail",
20984
+ status: "warn",
20960
20985
  message: npmResult.stderr?.trim() || "npm command is unavailable",
20961
- fix: "Install npm or ensure npm is available on PATH."
20986
+ fix: "Install npm or ensure it is available on PATH for npm package workflows."
20962
20987
  },
20963
20988
  tmuxResult.ok ? {
20964
20989
  id: "system.tmux",
@@ -20970,9 +20995,9 @@ async function runSystemChecks(runtime, commandRunner) {
20970
20995
  id: "system.tmux",
20971
20996
  group: "System",
20972
20997
  label: "tmux",
20973
- status: "fail",
20998
+ status: "warn",
20974
20999
  message: tmuxResult.stderr?.trim() || "tmux command was not detected on PATH",
20975
- fix: "Install tmux for EvoDev team runtime, for example `brew install tmux` on macOS, then rerun `evodev doctor`."
21000
+ fix: platform === "darwin" ? "Install tmux for EvoDev team runtime with `brew install tmux`." : "Install tmux with your Linux package manager to use EvoDev team runtime."
20976
21001
  }
20977
21002
  ];
20978
21003
  }
@@ -27783,7 +27808,8 @@ function getHelpText() {
27783
27808
  " evodev <command> --help",
27784
27809
  "",
27785
27810
  "Commands:",
27786
- " init Initialize EvoDev user config and sync built-in assets",
27811
+ " init [claude|codex] Initialize EvoDev for selected Code Agents",
27812
+ " init --yes Initialize both Claude and Codex with default answers",
27787
27813
  " doctor Check system, config, plugins, and built-in assets",
27788
27814
  " sync Sync enabled built-in assets to Code Agent user dirs",
27789
27815
  " config get Print ~/.evodev/settings.json without creating files",
@@ -27842,7 +27868,7 @@ function getHelpText() {
27842
27868
  ].join(`
27843
27869
  `);
27844
27870
  }
27845
- var CLI_VERSION = "0.0.1-alpha.8";
27871
+ var CLI_VERSION = "0.0.1-alpha.9";
27846
27872
  function getVersionText() {
27847
27873
  return `evodev ${CLI_VERSION}`;
27848
27874
  }
@@ -27942,29 +27968,34 @@ async function runCommand(argv, options) {
27942
27968
  return 0;
27943
27969
  }
27944
27970
  if (command === "init") {
27945
- const write = options.write ?? console.log;
27946
- const progress = options.write === undefined ? createInitProgressReporter({ stream: process.stdout }) : createInitProgressReporter(write);
27947
- const result = await runInit({
27948
- ...options,
27949
- answers: parseInitFlags(argv.slice(1)),
27950
- prompter: createInteractivePrompter(),
27951
- progress,
27952
- runDoctor: options.runDoctor ?? (async (context) => {
27953
- const doctorResult = await runDoctor({
27954
- homeDir: context.homeDir,
27955
- assetsRootDir: context.assetsRootDir,
27956
- mode: "environment",
27957
- selectedPlugins: context.selectedPlugins,
27958
- strictPluginAvailability: true,
27959
- pluginRegistry: context.pluginRegistry,
27960
- commandRunner: options.commandRunner,
27961
- runtime: options.runtime
27962
- });
27963
- return { exitCode: doctorResult.exitCode, output: doctorResult.output };
27964
- }),
27965
- write
27966
- });
27967
- return hasInitInstallFailure(result) ? 1 : 0;
27971
+ try {
27972
+ const write = options.write ?? console.log;
27973
+ const progress = options.write === undefined ? createInitProgressReporter({ stream: process.stdout }) : createInitProgressReporter(write);
27974
+ const result = await runInit({
27975
+ ...options,
27976
+ answers: parseInitFlags(argv.slice(1)),
27977
+ prompter: createInteractivePrompter(),
27978
+ progress,
27979
+ runDoctor: options.runDoctor ?? (async (context) => {
27980
+ const doctorResult = await runDoctor({
27981
+ homeDir: context.homeDir,
27982
+ assetsRootDir: context.assetsRootDir,
27983
+ mode: "environment",
27984
+ selectedPlugins: context.selectedPlugins,
27985
+ strictPluginAvailability: true,
27986
+ pluginRegistry: context.pluginRegistry,
27987
+ commandRunner: options.commandRunner,
27988
+ runtime: options.runtime
27989
+ });
27990
+ return { exitCode: doctorResult.exitCode, output: doctorResult.output };
27991
+ }),
27992
+ write
27993
+ });
27994
+ return hasInitInstallFailure(result) ? 1 : 0;
27995
+ } catch (error) {
27996
+ console.error(formatCommandError(error));
27997
+ return 1;
27998
+ }
27968
27999
  }
27969
28000
  if (command === "doctor") {
27970
28001
  const result = await runDoctor({
@@ -28418,30 +28449,50 @@ function hasInitInstallFailure(result) {
28418
28449
  }
28419
28450
  function parseInitFlags(argv) {
28420
28451
  const answers = {};
28452
+ let useDefaultTargets = false;
28453
+ let explicitTarget;
28421
28454
  for (const flag of argv) {
28455
+ if (flag === "claude" || flag === "codex") {
28456
+ if (explicitTarget !== undefined && explicitTarget !== flag) {
28457
+ throw new Error("init accepts at most one explicit Code Agent target: claude or codex");
28458
+ }
28459
+ explicitTarget = flag;
28460
+ continue;
28461
+ }
28422
28462
  if (flag === "--yes" || flag === "-y") {
28423
- answers.selectedPlugins = ["claude"];
28463
+ useDefaultTargets = true;
28424
28464
  answers.installCodeAgentPlugins = true;
28425
28465
  answers.initializeConfig = true;
28426
28466
  answers.registerSkills = true;
28427
28467
  answers.registerAgents = true;
28428
28468
  answers.runDoctor = true;
28469
+ continue;
28429
28470
  }
28430
28471
  if (flag === "--with-codex") {
28431
- answers.selectedPlugins = ["claude", "codex"];
28472
+ throw new Error("--with-codex is no longer supported; use `evodev init --yes` for both Agents or `evodev init codex --yes` for Codex only");
28432
28473
  }
28433
28474
  if (flag === "--doctor") {
28434
28475
  answers.runDoctor = true;
28476
+ continue;
28435
28477
  }
28436
28478
  if (flag === "--no-code-agent-plugins" || flag === "--no-plugins") {
28437
28479
  answers.installCodeAgentPlugins = false;
28480
+ continue;
28438
28481
  }
28439
28482
  if (flag === "--no-skills") {
28440
28483
  answers.registerSkills = false;
28484
+ continue;
28441
28485
  }
28442
28486
  if (flag === "--no-agents") {
28443
28487
  answers.registerAgents = false;
28488
+ continue;
28444
28489
  }
28490
+ throw new Error(`Unknown init option or Code Agent target: ${flag}`);
28491
+ }
28492
+ if (explicitTarget !== undefined) {
28493
+ answers.selectedPlugins = [explicitTarget];
28494
+ } else if (useDefaultTargets) {
28495
+ answers.selectedPlugins = ["claude", "codex"];
28445
28496
  }
28446
28497
  return answers;
28447
28498
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "evodev",
3
3
  "description": "EvoDev hook, skill, and Teams MCP integration for disciplined AI coding workflows.",
4
- "version": "0.0.1-alpha.8",
4
+ "version": "0.0.1-alpha.9",
5
5
  "author": {
6
6
  "name": "EvoDev"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evodev",
3
- "version": "0.0.1-alpha.8",
3
+ "version": "0.0.1-alpha.9",
4
4
  "description": "EvoDev hook, skill, and Teams MCP integration for disciplined AI coding workflows.",
5
5
  "author": {
6
6
  "name": "EvoDev"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evo-dev/plugin",
3
- "version": "0.0.1-alpha.8",
3
+ "version": "0.0.1-alpha.9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./hooks/index.ts"