@evomap/evolver-cli 2.0.15 → 2.0.18

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.
@@ -199,9 +199,13 @@ function buildDistillPrompt(input) {
199
199
  // new signal for a genuinely new scope dimension. For a hard scope facet write `required:<signal>` using the
200
200
  // EXACT signal string as it appears there (e.g. `required:rounding-v2`, never a bare qualifier like `required:v2`).
201
201
  '- Scope signals must name signals that exist: reuse an OBSERVED_SIGNALS entry verbatim unless the scope is genuinely new.',
202
+ // K_auto coordinates (optional but preferred). Intake fills honest defaults when omitted; when present they
203
+ // must use closed vocabularies so the gene can enter automatic claim-level governance.
204
+ '- Optional K_auto fields: claims (closed predicates), scope.signals (prefer namespaced terms like capability:<signal> or repo:org/name), runtime_profile, verifier_profile.',
205
+ '- claims[].predicate MUST be one of: source_of_truth, requires_service, requires_tool, forbids_action, output_contract, ordering_constraint, environment_precondition.',
202
206
  '',
203
207
  'Required JSON shape:',
204
- '{"type":"Gene","id":"gene_distilled_<descriptive-kebab-name>","summary":"...","category":"repair|optimize|innovate|explore","signals_match":["signal"],"preconditions":["condition"],"strategy":["step"],"constraints":{"max_files":3,"forbidden_paths":[".git","node_modules"]},"validation":["node --version"]}',
208
+ '{"type":"Gene","id":"gene_distilled_<descriptive-kebab-name>","summary":"...","category":"repair|optimize|innovate|explore","signals_match":["signal"],"preconditions":["condition"],"strategy":["step"],"constraints":{"max_files":3,"forbidden_paths":[".git","node_modules"]},"validation":["node --version"],"claims":[{"predicate":"output_contract","kind":"behavioral"}],"scope":{"signals":["capability:signal"]},"runtime_profile":{"runtime":"model-id","env_class":"local"},"verifier_profile":{"verifier":"evolver-sandboxed-validation","decision":"pass"}}',
205
209
  '',
206
210
  `DATA_HASH: ${input.dataHash}`,
207
211
  'OBSERVED_SIGNALS (signal (asset_count), most-used first — reuse these exact strings for scope):',
@@ -316,6 +320,12 @@ export function asGeneCandidate(value) {
316
320
  },
317
321
  } : {}),
318
322
  ...(Array.isArray(value['validation']) ? { validation: value['validation'].map(String) } : {}),
323
+ // K_auto coordinates: pass through when the model supplies them. intakeGene normalizes + fills honest
324
+ // defaults for any missing coordinate so forward genes can enter strict K_auto without inventing claims.
325
+ ...(value['claims'] !== undefined ? { claims: value['claims'] } : {}),
326
+ ...(value['scope'] !== undefined ? { scope: value['scope'] } : {}),
327
+ ...(value['runtime_profile'] !== undefined ? { runtime_profile: value['runtime_profile'] } : {}),
328
+ ...(value['verifier_profile'] !== undefined ? { verifier_profile: value['verifier_profile'] } : {}),
319
329
  // An LLM-distilled gene is distilled from prior capsule/session evidence (not a verified fail→pass trajectory,
320
330
  // not a human-taught gene) → `distilled` per V1 #302 classifyProvenance. intakeGene normalizes + validates it.
321
331
  generation_meta: { source: 'distilled' },
@@ -0,0 +1,71 @@
1
+ export declare const COMMAND_GROUP_ORDER: readonly ["Daemon", "Evolution", "Memory", "Assets", "Hub", "Operations", "Tools", "Advanced"];
2
+ export type CommandGroup = (typeof COMMAND_GROUP_ORDER)[number];
3
+ export declare const SYNC_COMMAND_NAMES: readonly ["status", "cycles", "trigger", "value", "narrative", "retention", "gene-value", "replay", "rebuild-views", "reset-local-secret"];
4
+ export type SyncCommandName = (typeof SYNC_COMMAND_NAMES)[number];
5
+ export declare function isSyncCommandName(value: string): value is SyncCommandName;
6
+ export declare const COMMAND_GROUPS: {
7
+ readonly proxy: "Daemon";
8
+ readonly lifecycle: "Daemon";
9
+ readonly 'proxy-token': "Daemon";
10
+ readonly doctor: "Daemon";
11
+ readonly 'setup-hooks': "Daemon";
12
+ readonly run: "Evolution";
13
+ readonly cycle: "Evolution";
14
+ readonly autoexec: "Evolution";
15
+ readonly solidify: "Evolution";
16
+ readonly distill: "Evolution";
17
+ readonly review: "Evolution";
18
+ readonly thesis: "Evolution";
19
+ readonly ingest: "Memory";
20
+ readonly inject: "Memory";
21
+ readonly recall: "Memory";
22
+ readonly reuse: "Memory";
23
+ readonly 'reuse-report': "Memory";
24
+ readonly 'recall-verify-report': "Memory";
25
+ readonly narrative: "Memory";
26
+ readonly 'gene-value': "Memory";
27
+ readonly 'memory-graph': "Memory";
28
+ readonly 'asset-log': "Assets";
29
+ readonly 'asset-trust': "Assets";
30
+ readonly 'asset-health': "Assets";
31
+ readonly 'asset-repair': "Assets";
32
+ readonly material: "Assets";
33
+ readonly recipe: "Assets";
34
+ readonly skill: "Assets";
35
+ readonly login: "Hub";
36
+ readonly logout: "Hub";
37
+ readonly phub: "Hub";
38
+ readonly sync: "Hub";
39
+ readonly publish: "Hub";
40
+ readonly fetch: "Hub";
41
+ readonly buy: "Hub";
42
+ readonly orders: "Hub";
43
+ readonly verify: "Hub";
44
+ readonly atp: "Hub";
45
+ readonly status: "Operations";
46
+ readonly daily: "Operations";
47
+ readonly workflow: "Operations";
48
+ readonly cycles: "Operations";
49
+ readonly trigger: "Operations";
50
+ readonly value: "Operations";
51
+ readonly retention: "Operations";
52
+ readonly replay: "Operations";
53
+ readonly 'rebuild-views': "Operations";
54
+ readonly 'issue-report': "Operations";
55
+ readonly dashboard: "Tools";
56
+ readonly webui: "Tools";
57
+ readonly 'trajectory-export': "Tools";
58
+ readonly migrate: "Tools";
59
+ readonly exec: "Tools";
60
+ readonly 'anti-gene-benchmark': "Advanced";
61
+ readonly 'anti-gene-rollout': "Advanced";
62
+ readonly 'reset-local-secret': "Advanced";
63
+ readonly 'skill-distill': "Advanced";
64
+ readonly 'skill-md-update': "Advanced";
65
+ };
66
+ export type CommandName = keyof typeof COMMAND_GROUPS;
67
+ export type AsyncCommandName = Exclude<CommandName, SyncCommandName>;
68
+ export declare const COMMAND_HELP_MAX_WIDTH = 100;
69
+ export declare function commandsInGroup(group: CommandGroup): readonly CommandName[];
70
+ export declare function commandHelpLabel(command: CommandName): string;
71
+ export declare function renderCommandGroups(): string[];
@@ -0,0 +1,119 @@
1
+ export const COMMAND_GROUP_ORDER = [
2
+ 'Daemon',
3
+ 'Evolution',
4
+ 'Memory',
5
+ 'Assets',
6
+ 'Hub',
7
+ 'Operations',
8
+ 'Tools',
9
+ 'Advanced',
10
+ ];
11
+ export const SYNC_COMMAND_NAMES = [
12
+ 'status', 'cycles', 'trigger', 'value', 'narrative', 'retention', 'gene-value', 'replay', 'rebuild-views',
13
+ 'reset-local-secret',
14
+ ];
15
+ const SYNC_COMMAND_NAME_SET = new Set(SYNC_COMMAND_NAMES);
16
+ export function isSyncCommandName(value) {
17
+ return SYNC_COMMAND_NAME_SET.has(value);
18
+ }
19
+ export const COMMAND_GROUPS = {
20
+ proxy: 'Daemon',
21
+ lifecycle: 'Daemon',
22
+ 'proxy-token': 'Daemon',
23
+ doctor: 'Daemon',
24
+ 'setup-hooks': 'Daemon',
25
+ run: 'Evolution',
26
+ cycle: 'Evolution',
27
+ autoexec: 'Evolution',
28
+ solidify: 'Evolution',
29
+ distill: 'Evolution',
30
+ review: 'Evolution',
31
+ thesis: 'Evolution',
32
+ ingest: 'Memory',
33
+ inject: 'Memory',
34
+ recall: 'Memory',
35
+ reuse: 'Memory',
36
+ 'reuse-report': 'Memory',
37
+ 'recall-verify-report': 'Memory',
38
+ narrative: 'Memory',
39
+ 'gene-value': 'Memory',
40
+ 'memory-graph': 'Memory',
41
+ 'asset-log': 'Assets',
42
+ 'asset-trust': 'Assets',
43
+ 'asset-health': 'Assets',
44
+ 'asset-repair': 'Assets',
45
+ material: 'Assets',
46
+ recipe: 'Assets',
47
+ skill: 'Assets',
48
+ login: 'Hub',
49
+ logout: 'Hub',
50
+ phub: 'Hub',
51
+ sync: 'Hub',
52
+ publish: 'Hub',
53
+ fetch: 'Hub',
54
+ buy: 'Hub',
55
+ orders: 'Hub',
56
+ verify: 'Hub',
57
+ atp: 'Hub',
58
+ status: 'Operations',
59
+ daily: 'Operations',
60
+ workflow: 'Operations',
61
+ cycles: 'Operations',
62
+ trigger: 'Operations',
63
+ value: 'Operations',
64
+ retention: 'Operations',
65
+ replay: 'Operations',
66
+ 'rebuild-views': 'Operations',
67
+ 'issue-report': 'Operations',
68
+ dashboard: 'Tools',
69
+ webui: 'Tools',
70
+ 'trajectory-export': 'Tools',
71
+ migrate: 'Tools',
72
+ exec: 'Tools',
73
+ 'anti-gene-benchmark': 'Advanced',
74
+ 'anti-gene-rollout': 'Advanced',
75
+ 'reset-local-secret': 'Advanced',
76
+ 'skill-distill': 'Advanced',
77
+ 'skill-md-update': 'Advanced',
78
+ };
79
+ const COMMAND_HELP_LABELS = {
80
+ workflow: 'workflow status',
81
+ 'skill-distill': 'skill-distill (legacy; prefer `evolver recipe build`)',
82
+ };
83
+ const COMMAND_HELP_LABEL_COLUMN = 15;
84
+ export const COMMAND_HELP_MAX_WIDTH = 100;
85
+ export function commandsInGroup(group) {
86
+ return Object.keys(COMMAND_GROUPS).filter((command) => COMMAND_GROUPS[command] === group);
87
+ }
88
+ export function commandHelpLabel(command) {
89
+ return COMMAND_HELP_LABELS[command] ?? command;
90
+ }
91
+ function wrapEntries(entries, firstPrefix, continuationPrefix) {
92
+ const lines = [];
93
+ let current = firstPrefix;
94
+ let hasEntry = false;
95
+ entries.forEach((entry, index) => {
96
+ const separator = index === entries.length - 1 ? '' : ',';
97
+ const candidate = hasEntry ? `${current} ${entry}${separator}` : `${current}${entry}${separator}`;
98
+ if (hasEntry && candidate.length > COMMAND_HELP_MAX_WIDTH) {
99
+ lines.push(current);
100
+ current = `${continuationPrefix}${entry}${separator}`;
101
+ return;
102
+ }
103
+ current = candidate;
104
+ hasEntry = true;
105
+ });
106
+ if (hasEntry)
107
+ lines.push(current);
108
+ return lines;
109
+ }
110
+ export function renderCommandGroups() {
111
+ const continuationPrefix = ' '.repeat(COMMAND_HELP_LABEL_COLUMN);
112
+ return COMMAND_GROUP_ORDER.flatMap((group) => {
113
+ const commands = commandsInGroup(group);
114
+ if (commands.length === 0)
115
+ return [];
116
+ const firstPrefix = ` ${group}:`.padEnd(COMMAND_HELP_LABEL_COLUMN, ' ');
117
+ return wrapEntries(commands.map(commandHelpLabel), firstPrefix, continuationPrefix);
118
+ });
119
+ }
@@ -6,7 +6,6 @@ interface ProxyCliModule {
6
6
  type ProxyCliImporter = () => Promise<ProxyCliModule>;
7
7
  export declare function runProxyCommand(argv: string[], importer?: ProxyCliImporter): Promise<number>;
8
8
  export type CommandHandler = (argv: string[]) => Promise<number>;
9
- /** Verbs dispatched asynchronously ahead of the synchronous runCli core. cli.ts drives its dispatch from this. */
10
9
  export declare const ASYNC_COMMANDS: Readonly<Record<string, CommandHandler>>;
11
10
  /** Verbs handled by the synchronous runCli core (read-only views + local ops). Kept in sync with runCli's switch
12
11
  * — the source of truth for these stays runCli; this list completes the surface for the registry contract. */
package/dist/dispatch.js CHANGED
@@ -36,12 +36,13 @@ import { runAssetRepairCommand } from './assetRepair.js';
36
36
  import { runV1FetchCompat, runV1RunCompat, runV1SolidifyCompat, runV1WebuiCompat, runV1ExecCompat } from './v1Compat.js';
37
37
  import { runWorkflowCommand } from './workflow.js';
38
38
  import { runMemoryGraphCommand } from './memoryGraphOps.js';
39
+ import { SYNC_COMMAND_NAMES } from './commandCatalog.js';
39
40
  export async function runProxyCommand(argv, importer = () => import('@evomap/evolver-proxy/bin/evolver-proxy')) {
40
41
  const { runProxyCli } = await importer();
41
42
  return runProxyCli({ argv: ['proxy', ...argv] });
42
43
  }
43
44
  /** Verbs dispatched asynchronously ahead of the synchronous runCli core. cli.ts drives its dispatch from this. */
44
- export const ASYNC_COMMANDS = {
45
+ const ASYNC_COMMAND_TABLE = {
45
46
  migrate: runMigrate,
46
47
  'asset-log': runAssetLog,
47
48
  distill: runDistill,
@@ -91,11 +92,10 @@ export const ASYNC_COMMANDS = {
91
92
  exec: runV1ExecCompat,
92
93
  workflow: runWorkflowCommand,
93
94
  };
95
+ export const ASYNC_COMMANDS = ASYNC_COMMAND_TABLE;
94
96
  /** Verbs handled by the synchronous runCli core (read-only views + local ops). Kept in sync with runCli's switch
95
97
  * — the source of truth for these stays runCli; this list completes the surface for the registry contract. */
96
- export const SYNC_COMMANDS = [
97
- 'status', 'cycles', 'trigger', 'value', 'narrative', 'retention', 'gene-value', 'replay', 'rebuild-views', 'reset-local-secret',
98
- ];
98
+ export const SYNC_COMMANDS = SYNC_COMMAND_NAMES;
99
99
  /** Every top-level verb `evolver` resolves to (async-dispatched ∪ runCli core). */
100
100
  export const ALL_COMMANDS = new Set([
101
101
  ...Object.keys(ASYNC_COMMANDS),
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import { listApprovedGenes, provenanceStoreForStore, reviewLedgerForStore } from
9
9
  import { ADAPTERS, parseJsonlLines } from '@evomap/evolver-runtime-adapters';
10
10
  import { draftGeneCandidate } from './distillPrimitives.js';
11
11
  import { assessDraftAdmissionFromStore } from './distillAdmission.js';
12
+ import { isSyncCommandName, renderCommandGroups } from './commandCatalog.js';
12
13
  import { parseRuntimeSessionSourcesWithDiagnostics } from './runtimeSessionSource.js';
13
14
  import { closeSync, constants as fsConstants, existsSync, fstatSync, lstatSync, openSync, readFileSync, readSync, readdirSync, realpathSync, statSync, unlinkSync, writeFileSync, mkdirSync, } from 'node:fs';
14
15
  import { homedir } from 'node:os';
@@ -66,17 +67,7 @@ export function cliUsage() {
66
67
  ' --env-file <path> Environment file',
67
68
  '',
68
69
  'Commands:',
69
- ' Daemon: proxy, lifecycle, proxy-token, doctor, setup-hooks',
70
- ' Evolution: run, cycle, autoexec, solidify, distill, review, thesis',
71
- ' Memory: ingest, inject, recall, reuse, reuse-report, recall-verify-report',
72
- ' narrative, gene-value',
73
- ' Assets: asset-log, asset-trust, asset-health, material, recipe, skill',
74
- ' Hub: login, logout, phub, sync, publish, fetch, buy, orders, verify, atp',
75
- ' Operations: status, daily, workflow status, cycles, trigger, value,',
76
- ' retention, replay, rebuild-views, issue-report',
77
- ' Tools: dashboard, webui, trajectory-export, migrate',
78
- ' Advanced: anti-gene-benchmark, anti-gene-rollout, reset-local-secret',
79
- ' skill-distill, skill-md-update',
70
+ ...renderCommandGroups(),
80
71
  '',
81
72
  'Run evolver <command> --help for command-specific options.',
82
73
  '',
@@ -1779,6 +1770,21 @@ export function runCli(argv) {
1779
1770
  process.stdout.write(cliUsage());
1780
1771
  return 0;
1781
1772
  }
1773
+ // `cycle` is async-dispatched at the top level, but keep the legacy direct runCli seam for callers that still
1774
+ // invoke `cycle show` through this exported function.
1775
+ if (cmd === 'cycle') {
1776
+ if (argv[1] !== 'show' || !argv[2]) {
1777
+ process.stderr.write('用法: evolver cycle show <id>\n');
1778
+ return 1;
1779
+ }
1780
+ for (const t of showCycle(readEvents(), argv[2]).timeline)
1781
+ process.stdout.write(`#${t.seq} ${t.type} ${t.title}\n`);
1782
+ return 0;
1783
+ }
1784
+ if (!isSyncCommandName(cmd)) {
1785
+ process.stderr.write(`Unknown command: ${cmd}\n\n${cliUsage()}`);
1786
+ return 1;
1787
+ }
1782
1788
  switch (cmd) {
1783
1789
  case 'rebuild-views': {
1784
1790
  const r = rebuildViews();
@@ -1797,15 +1803,6 @@ export function runCli(argv) {
1797
1803
  process.stdout.write(`${c.cycleId} ${c.finalStage} (${c.events} events)\n`);
1798
1804
  return 0;
1799
1805
  }
1800
- case 'cycle': {
1801
- if (argv[1] !== 'show' || !argv[2]) {
1802
- process.stderr.write('用法: evolver cycle show <id>\n');
1803
- return 1;
1804
- }
1805
- for (const t of showCycle(readEvents(), argv[2]).timeline)
1806
- process.stdout.write(`#${t.seq} ${t.type} ${t.title}\n`);
1807
- return 0;
1808
- }
1809
1806
  case 'trigger': {
1810
1807
  for (const t of listTriggers(readEvents()))
1811
1808
  process.stdout.write(`${t.patternId} ${t.triggered ? '触发' : '抑制'} value=${t.value}\n`);
@@ -1824,8 +1821,7 @@ export function runCli(argv) {
1824
1821
  process.stdout.write(`replayed → MV: ${r.rebuilt.join(', ')}\n`);
1825
1822
  return 0;
1826
1823
  }
1827
- default:
1828
- process.stderr.write(`Unknown command: ${cmd}\n\n${cliUsage()}`);
1829
- return 1;
1830
1824
  }
1825
+ const unreachable = cmd;
1826
+ return unreachable;
1831
1827
  }
@@ -1,5 +1,5 @@
1
1
  /** V1→V2 asset path / schema mapping — Refs #684 (R4 Asset-format, 5 sub-items). */
2
- export declare const CURRENT_WIRE_SCHEMA_VERSION: "1.12.1";
2
+ export declare const CURRENT_WIRE_SCHEMA_VERSION: "1.13.0";
3
3
  export declare const V1_EVENT_SCHEMA_VERSION_EXAMPLE: "1.6.0";
4
4
  /** Machine-readable mapping for the five issue rows. */
5
5
  export declare const ASSET_FORMAT_MAP: readonly [{
@@ -7,7 +7,7 @@ export declare const ASSET_FORMAT_MAP: readonly [{
7
7
  readonly severity: "major";
8
8
  readonly v1: "events.jsonl in the selected current store, or repository legacy assets/gep (EvolutionEvent plus ValidationReport rows; stored schema often 1.6.0)";
9
9
  readonly v2: "content-addressed EvolutionEvent JSONL; existing schema_version is preserved";
10
- readonly migrate: "import-v1 injects 1.12.1 only when schema_version is missing; frozen hash mismatches remain untrusted; ValidationReport rows are validated, counted, and preserved in the V1 source";
10
+ readonly migrate: "import-v1 injects 1.13.0 only when schema_version is missing; frozen hash mismatches remain untrusted; ValidationReport rows are validated, counted, and preserved in the V1 source";
11
11
  }, {
12
12
  readonly id: 2;
13
13
  readonly severity: "cosmetic";
@@ -13,8 +13,8 @@ export interface MappedAsset {
13
13
  * - asset_id: 有则**冻结**(原样); 缺失时新算(recomputed=true). 若映射改变正文,importer 会用
14
14
  * content-bound provenance 隔离 frozen mismatch,而不是把它默认为可信资产(Refs #677).
15
15
  * - v2 新增 optional(resolution_status/proof_of_work/...) v1 无 → 自然省略(不合成).
16
- * - Gene 的 routing_hint/tool_policy 是 v2-delta(v1 PR #93): gep-sdk gene.schema.json 尚无 → schemaProperties
17
- * 不含它们, 默认会落 sidecar; 这里按已知 delta 归一化后保留在 record(保真). 存在但归一化为 null 的脏值
18
- * (如 {tier:'ultra'})落 sidecar(可审计, 不静默丢); v1 的 null/缺省干净省略, 不污染 sidecar.
16
+ * - Gene 的 routing_hint/tool_policy/generation_meta 需要先 normalize,不能走 raw-copy;这里维护迁移本地
17
+ * 的阻断集,避免 future schema promotion 让 `allowed.has(k)` 把原始脏值直接塞进 record。
18
+ * v1 的 null/缺省干净省略;存在但归一化失败的脏值落 dropped 便于审计。
19
19
  */
20
20
  export declare function mapV1Asset(kind: V1Kind, v1: Record<string, unknown>): MappedAsset;
@@ -2,6 +2,7 @@ import { wire } from '@evomap/evolver-core';
2
2
  // v1→v2 source_type 枚举转换(skill2gep_distillation 等非标 → generated).
3
3
  const SOURCE_TYPE_MAP = { skill2gep_distillation: 'generated' };
4
4
  const KNOWN_SOURCE = new Set(['generated', 'reused', 'reference', 'user_authored']);
5
+ const GENE_RAW_NORMALIZED_FIELDS = new Set(['routing_hint', 'tool_policy', 'generation_meta']);
5
6
  /**
6
7
  * v1 资产 → v2 wire(M8-2). 规则:
7
8
  * - 只留 gep-sdk schema 允许字段, 其余(avoid 等)落 dropped→sidecar(不参与 canonicalize, 不动 asset_id).
@@ -11,9 +12,9 @@ const KNOWN_SOURCE = new Set(['generated', 'reused', 'reference', 'user_authored
11
12
  * - asset_id: 有则**冻结**(原样); 缺失时新算(recomputed=true). 若映射改变正文,importer 会用
12
13
  * content-bound provenance 隔离 frozen mismatch,而不是把它默认为可信资产(Refs #677).
13
14
  * - v2 新增 optional(resolution_status/proof_of_work/...) v1 无 → 自然省略(不合成).
14
- * - Gene 的 routing_hint/tool_policy 是 v2-delta(v1 PR #93): gep-sdk gene.schema.json 尚无 → schemaProperties
15
- * 不含它们, 默认会落 sidecar; 这里按已知 delta 归一化后保留在 record(保真). 存在但归一化为 null 的脏值
16
- * (如 {tier:'ultra'})落 sidecar(可审计, 不静默丢); v1 的 null/缺省干净省略, 不污染 sidecar.
15
+ * - Gene 的 routing_hint/tool_policy/generation_meta 需要先 normalize,不能走 raw-copy;这里维护迁移本地
16
+ * 的阻断集,避免 future schema promotion 让 `allowed.has(k)` 把原始脏值直接塞进 record。
17
+ * v1 的 null/缺省干净省略;存在但归一化失败的脏值落 dropped 便于审计。
17
18
  */
18
19
  export function mapV1Asset(kind, v1) {
19
20
  const allowed = new Set(wire.schemaProperties(kind));
@@ -21,14 +22,15 @@ export function mapV1Asset(kind, v1) {
21
22
  // Object.prototype setters and silently losing extension data.
22
23
  const record = Object.create(null);
23
24
  const dropped = Object.create(null);
24
- // v2-delta gene 提示字段不当作"非 schema 字段"丢 sidecar — 下方归一化后保留为 record 一等字段.
25
- const deltaKeys = kind === 'Gene' ? new Set(wire.GENE_HINT_FIELDS) : new Set();
25
+ // Gene normalization is migration-local. wire.GENE_HINT_FIELDS is only the runtime strip list for local-only
26
+ // annotations; do not reuse it here or a future schema promotion can re-enable raw-copy leakage.
27
+ const geneNormalizedFields = kind === 'Gene' ? GENE_RAW_NORMALIZED_FIELDS : null;
26
28
  for (const [k, val] of Object.entries(v1)) {
27
- // Hint fields are owned EXCLUSIVELY by the normalize block below — never copied raw. This must hold even
29
+ // Normalized Gene fields are owned EXCLUSIVELY by the block below — never copied raw. This must hold even
28
30
  // after a future gep-sdk bump adds them to schemaProperties (allowed): otherwise `allowed.has(k)` would
29
- // copy the RAW v1 hint into record, and the normalize-overwrite below only fires when normalize returns
31
+ // copy the RAW v1 field into record, and the normalize-overwrite below only fires when normalize returns
30
32
  // truthy — so a malformed hint (normalizes to null) would leak through un-normalized.
31
- if (deltaKeys.has(k))
33
+ if (geneNormalizedFields?.has(k))
32
34
  continue;
33
35
  if (allowed.has(k))
34
36
  record[k] = val;
@@ -54,7 +56,7 @@ export function mapV1Asset(kind, v1) {
54
56
  // (forward-compat for a repo that carried the #302 branch). A `_source` whose generation_source normalizes away
55
57
  // (unknown enum) is NOT silently dropped — the raw `_source` stays in `dropped` for audit (it already landed there
56
58
  // above as a non-schema field). `generation_meta` itself (if a v1 gene already carried the v2 field name) is a
57
- // deltaKey so it was skipped above and is handled here by normalize, same as the hints.
59
+ // normalized field and is handled here by normalize, same as the hints.
58
60
  if (v1['_source'] !== undefined && v1['_source'] !== null) {
59
61
  const src = v1['_source'];
60
62
  if (src && typeof src === 'object') {
@@ -222,6 +222,7 @@ export async function runSkillDistill(argv, injected = {}) {
222
222
  return 1;
223
223
  }
224
224
  process.stdout.write(`skill-distill: gene ${res.geneId} ${res.quarantined ? 'QUARANTINED (awaiting `evolver review --approve`)' : 'recorded'}\n`);
225
+ process.stdout.write(' preferred hub artifact is Recipe (`evolver recipe build --publish`), not Skill Store\n');
225
226
  if (res.capsuleId)
226
227
  process.stdout.write(` → capsule ${res.capsuleId} (real execution evidence)\n`);
227
228
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evomap/evolver-cli",
3
- "version": "2.0.15",
3
+ "version": "2.0.18",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -23,12 +23,12 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@evomap/evolver-core": "2.0.15",
27
- "@evomap/evolver-adapter-public": "2.0.15",
28
- "@evomap/evolver-mcp": "2.0.15",
29
- "@evomap/evolver-proxy": "2.0.15",
30
- "@evomap/evolver-runtime-adapters": "2.0.15",
31
- "@evomap/evolver-webui": "2.0.15"
26
+ "@evomap/evolver-core": "2.0.18",
27
+ "@evomap/evolver-adapter-public": "2.0.18",
28
+ "@evomap/evolver-mcp": "2.0.18",
29
+ "@evomap/evolver-proxy": "2.0.18",
30
+ "@evomap/evolver-runtime-adapters": "2.0.18",
31
+ "@evomap/evolver-webui": "2.0.18"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",