@evomap/evolver-cli 2.0.48 → 2.0.49

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.
@@ -10,12 +10,14 @@ import { resolveInstallComponents } from '@evomap/evolver-mcp';
10
10
  import { accessSync, constants, existsSync, readFileSync, realpathSync, statSync } from 'node:fs';
11
11
  import { createRequire } from 'node:module';
12
12
  import { homedir } from 'node:os';
13
- import { basename, delimiter, dirname, isAbsolute, relative, resolve, sep } from 'node:path';
13
+ import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
14
14
  import { fileURLToPath } from 'node:url';
15
15
  import { currentTopCursorGenes } from './cursorRewrite.js';
16
16
  import { resolveProxyBinPath, resolveStableNodePath } from './lifecycle.js';
17
17
  import { reviewLedgerForStore } from './reviewFilter.js';
18
18
  import { maybeEmitNonGitWorkspaceNotice } from './nonGitWorkspaceNotice.js';
19
+ import { AGENT_PLUGIN_NAME, pluginHostNamed } from './pluginHosts.js';
20
+ import { protectedAuditInstallReport } from './protectedAuditStatus.js';
19
21
  import { createSetupLifecyclePlan, decodeSetupLifecyclePlan, executeSetupLifecyclePlan, SETUP_LIFECYCLE_SCHEMA, setupLifecycleCapabilities, SetupLifecycleError, verifySetupLifecycle, } from './setupHooksLifecycle.js';
20
22
  const requireFromHere = createRequire(import.meta.url);
21
23
  function configuredHomeDir() {
@@ -1022,6 +1024,13 @@ export async function runSetupHooks(argv, store, review, deps = {}) {
1022
1024
  }
1023
1025
  const files = displayResultPaths(r.files, configRoot, scope) ?? [];
1024
1026
  const backups = displayResultPaths(r.backups, configRoot, scope);
1027
+ const audit = protectedAuditInstallReport((deps.protectedAudit ?? events.protectedAuditReadiness)());
1028
+ const warnings = [
1029
+ ...(r.warnings ?? []),
1030
+ ...(audit.protected_audit_next_step ? [audit.protected_audit_next_step] : []),
1031
+ ...(runtime === 'claude-code' && f['components'] !== 'product-only' && claudeAgentPluginEnabled() ? [CLAUDE_PLUGIN_OVERLAP_WARNING] : []),
1032
+ ];
1033
+ const warningFields = warnings.length > 0 ? { warnings } : {};
1025
1034
  if (r.dryRun) {
1026
1035
  if (json) {
1027
1036
  emit({
@@ -1031,6 +1040,8 @@ export async function runSetupHooks(argv, store, review, deps = {}) {
1031
1040
  backups,
1032
1041
  dryRun: true,
1033
1042
  ...(r.alreadyInstalled ? { alreadyInstalled: true } : {}),
1043
+ ...audit,
1044
+ ...warningFields,
1034
1045
  });
1035
1046
  }
1036
1047
  else if (r.alreadyInstalled) {
@@ -1039,20 +1050,33 @@ export async function runSetupHooks(argv, store, review, deps = {}) {
1039
1050
  else {
1040
1051
  process.stdout.write(`dry-run: would install evolver (${r.mode}) → ${files.join(', ')}\n`);
1041
1052
  }
1053
+ emitWarnings(warnings);
1042
1054
  return 0;
1043
1055
  }
1044
1056
  if (r.alreadyInstalled) {
1045
1057
  if (json)
1046
- emit({ runtime, outcome: 'installed', files, alreadyInstalled: true, ...(r.warnings ? { warnings: r.warnings } : {}) });
1058
+ emit({ runtime, outcome: 'installed', files, alreadyInstalled: true, ...audit, ...warningFields });
1047
1059
  else
1048
1060
  process.stdout.write('evolver already installed (use --force to reinstall)\n');
1049
- emitWarnings(r.warnings);
1061
+ emitWarnings(warnings);
1050
1062
  return 0;
1051
1063
  }
1052
1064
  if (json)
1053
- emit({ runtime, outcome: 'installed', files, backups, mode: r.mode, verified: r.verified, ...(r.warnings ? { warnings: r.warnings } : {}) });
1065
+ emit({ runtime, outcome: 'installed', files, backups, mode: r.mode, verified: r.verified, ...audit, ...warningFields });
1054
1066
  else
1055
1067
  process.stdout.write(`installed evolver (${r.mode}) → ${files.join(', ')}\n`);
1056
- emitWarnings(r.warnings);
1068
+ emitWarnings(warnings);
1057
1069
  return 0;
1070
+ }
1071
+ const CLAUDE_PLUGIN_OVERLAP_WARNING = `Claude Code already enables ${AGENT_PLUGIN_NAME}, which covers recall; the SessionStart/UserPromptSubmit hooks written by setup-hooks duplicate it. Consider removing only those two evolver hook entries from your Claude Code settings; setup-hooks did not change the plugin or its settings.`;
1072
+ function claudeAgentPluginEnabled() {
1073
+ const marketplace = pluginHostNamed('claude-code')?.marketplace;
1074
+ const settingsPath = join(process.env['CLAUDE_CONFIG_DIR'] || join(configuredHomeDir(), '.claude'), 'settings.json');
1075
+ try {
1076
+ const settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
1077
+ return settings.enabledPlugins?.[`${AGENT_PLUGIN_NAME}@${marketplace}`] === true;
1078
+ }
1079
+ catch {
1080
+ return false;
1081
+ }
1058
1082
  }
@@ -2,7 +2,7 @@ import { closeSync, existsSync, lstatSync, openSync, readSync, readdirSync, read
2
2
  import { basename, delimiter, dirname, extname, join, resolve, sep } from 'node:path';
3
3
  import { homedir } from 'node:os';
4
4
  import { events, ops, trace } from '@evomap/evolver-core';
5
- import { ADAPTERS, isRemovedAdapter, adapterForPath, genericChatAdapter, isCursorStateVscdbPath, parseCursorStateVscdb, parseJsonlLines, parseJsonlLinesWithStats, } from '@evomap/evolver-runtime-adapters';
5
+ import { ADAPTERS, isRemovedAdapter, adapterForPath, genericChatAdapter, isCursorStateVscdbPath, parseCursorStateVscdb, parseJsonlLines, readSessionLog, parseJsonlLinesWithStats, } from '@evomap/evolver-runtime-adapters';
6
6
  const TRACE_FILE_RE = /(^|[/\\])llm-trace-[^/\\]*\.jsonl$/i;
7
7
  const RUNTIME_SESSION_ENABLE_ENV = 'EVOLVER_TRAJECTORY_RUNTIME_SESSIONS';
8
8
  const RUNTIME_SESSION_ENABLE_ENV_LEGACY = 'EVOLVER_TRAJECTORY_EXPORT_RUNTIME_SESSIONS';
@@ -862,7 +862,7 @@ export async function runTrajectoryExport(argv) {
862
862
  continue;
863
863
  }
864
864
  }
865
- const chunk = readFileSync(file.path, 'utf8');
865
+ const chunk = file.kind === 'session' ? readSessionLog(file.path) : readFileSync(file.path, 'utf8');
866
866
  if (file.kind === 'trace') {
867
867
  const result = trace.readTraceRowsFromJsonl(chunk, readOpts);
868
868
  allRows.push(...result.rows);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evomap/evolver-cli",
3
- "version": "2.0.48",
3
+ "version": "2.0.49",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -27,12 +27,12 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@evomap/evolver-core": "2.0.48",
31
- "@evomap/evolver-adapter-public": "2.0.48",
32
- "@evomap/evolver-mcp": "2.0.48",
33
- "@evomap/evolver-proxy": "2.0.48",
34
- "@evomap/evolver-runtime-adapters": "2.0.48",
35
- "@evomap/evolver-webui": "2.0.48"
30
+ "@evomap/evolver-core": "2.0.49",
31
+ "@evomap/evolver-adapter-public": "2.0.49",
32
+ "@evomap/evolver-mcp": "2.0.49",
33
+ "@evomap/evolver-proxy": "2.0.49",
34
+ "@evomap/evolver-runtime-adapters": "2.0.49",
35
+ "@evomap/evolver-webui": "2.0.49"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",