@evomap/evolver-cli 2.0.0-beta.0 → 2.0.0-beta.2
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/dist/antiGeneBenchmark.js +12 -0
- package/dist/antiGeneEvidence.d.ts +15 -0
- package/dist/antiGeneEvidence.js +49 -0
- package/dist/antiGeneRollout.d.ts +3 -1
- package/dist/antiGeneRollout.js +16 -2
- package/dist/atp.js +4 -2
- package/dist/autoDistillLlm.js +4 -1
- package/dist/autoexec.d.ts +4 -1
- package/dist/autoexec.js +23 -5
- package/dist/cli.js +12 -5
- package/dist/cliContracts.js +8 -2
- package/dist/cliLifecycle.d.ts +7 -0
- package/dist/cliLifecycle.js +9 -0
- package/dist/cycleConsumer.d.ts +59 -1
- package/dist/cycleConsumer.js +382 -5
- package/dist/dashboard.d.ts +21 -0
- package/dist/dashboard.js +173 -0
- package/dist/dispatch.d.ts +1 -0
- package/dist/dispatch.js +27 -2
- package/dist/distillObserver.js +2 -2
- package/dist/distillPrimitives.d.ts +1 -1
- package/dist/distillPrimitives.js +29 -2
- package/dist/doctor.js +15 -3
- package/dist/index.d.ts +6 -1
- package/dist/index.js +251 -30
- package/dist/lifecycle.js +6 -2
- package/dist/login.d.ts +20 -4
- package/dist/login.js +58 -8
- package/dist/materialPackage.d.ts +52 -0
- package/dist/materialPackage.js +404 -0
- package/dist/materialSnapshot.d.ts +30 -0
- package/dist/materialSnapshot.js +148 -0
- package/dist/memoryEventMirror.d.ts +23 -0
- package/dist/memoryEventMirror.js +140 -0
- package/dist/migrate/fieldMap.js +25 -0
- package/dist/nonGitWorkspaceNotice.d.ts +24 -0
- package/dist/nonGitWorkspaceNotice.js +122 -0
- package/dist/proxyToken.d.ts +10 -0
- package/dist/proxyToken.js +80 -0
- package/dist/recipe.d.ts +10 -2
- package/dist/recipe.js +349 -7
- package/dist/reuseReport.js +16 -16
- package/dist/runtimeSessionSource.d.ts +10 -0
- package/dist/runtimeSessionSource.js +32 -5
- package/dist/setupHooks.d.ts +6 -1
- package/dist/setupHooks.js +5 -2
- package/dist/skill2gep.d.ts +38 -9
- package/dist/skill2gep.js +147 -14
- package/dist/skillDistill.d.ts +1 -0
- package/dist/skillDistill.js +4 -4
- package/dist/skillFetch.d.ts +18 -0
- package/dist/skillFetch.js +391 -0
- package/dist/solo/mode.js +5 -0
- package/dist/sync.d.ts +26 -0
- package/dist/sync.js +988 -0
- package/dist/trajectoryExport.js +23 -12
- package/dist/v1Compat.d.ts +24 -0
- package/dist/v1Compat.js +249 -0
- package/dist/version.js +2 -0
- package/package.json +8 -6
package/dist/dispatch.js
CHANGED
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
import { runCli, runMigrate, runAssetLog, runDistill, runIngest, runInject, runReview, } from './index.js';
|
|
7
7
|
import { runAutoExec } from './autoexec.js';
|
|
8
8
|
import { runAtpCommand, runBuyCommand, runOrdersCommand, runVerifyCommand } from './atp.js';
|
|
9
|
-
import { runLogin } from './login.js';
|
|
9
|
+
import { runLogin, runLogout } from './login.js';
|
|
10
10
|
import { runSetupHooks } from './setupHooks.js';
|
|
11
11
|
import { runSkillDistill, runSkillMdUpdate } from './skillDistill.js';
|
|
12
|
+
import { runSkillCommand } from './skillFetch.js';
|
|
12
13
|
import { runThesisCommand } from './thesis.js';
|
|
13
14
|
import { getCliVersion } from './version.js';
|
|
14
15
|
import { runRecipeCommand } from './recipe.js';
|
|
@@ -19,10 +20,15 @@ import { runReuseReportCommand } from './reuseReport.js';
|
|
|
19
20
|
import { runDoctorCommand } from './doctor.js';
|
|
20
21
|
import { runPhubCommand } from './phub.js';
|
|
21
22
|
import { runTrajectoryExport } from './trajectoryExport.js';
|
|
23
|
+
import { runSyncCommand } from './sync.js';
|
|
22
24
|
import { runAntiGeneBenchmarkCommand } from './antiGeneBenchmark.js';
|
|
23
25
|
import { runAntiGeneRolloutCommand } from './antiGeneRollout.js';
|
|
24
26
|
import { runLifecycleCommand } from './lifecycle.js';
|
|
25
27
|
import { runCycleCommand } from './cycleConsumer.js';
|
|
28
|
+
import { runProxyToken } from './proxyToken.js';
|
|
29
|
+
import { runMaterialCommand } from './materialPackage.js';
|
|
30
|
+
import { runDashboardCommand } from './dashboard.js';
|
|
31
|
+
import { runV1FetchCompat, runV1RunCompat, runV1SolidifyCompat, runV1WebuiCompat } from './v1Compat.js';
|
|
26
32
|
/** Verbs dispatched asynchronously ahead of the synchronous runCli core. cli.ts drives its dispatch from this. */
|
|
27
33
|
export const ASYNC_COMMANDS = {
|
|
28
34
|
migrate: runMigrate,
|
|
@@ -31,11 +37,14 @@ export const ASYNC_COMMANDS = {
|
|
|
31
37
|
ingest: runIngest,
|
|
32
38
|
inject: runInject,
|
|
33
39
|
review: runReview,
|
|
40
|
+
skill: runSkillCommand,
|
|
34
41
|
'skill-distill': runSkillDistill,
|
|
35
42
|
'skill-md-update': runSkillMdUpdate,
|
|
36
43
|
thesis: runThesisCommand,
|
|
37
44
|
autoexec: runAutoExec,
|
|
38
45
|
login: runLogin,
|
|
46
|
+
logout: runLogout,
|
|
47
|
+
'proxy-token': runProxyToken,
|
|
39
48
|
'setup-hooks': runSetupHooks,
|
|
40
49
|
buy: runBuyCommand,
|
|
41
50
|
orders: runOrdersCommand,
|
|
@@ -44,15 +53,22 @@ export const ASYNC_COMMANDS = {
|
|
|
44
53
|
recipe: runRecipeCommand,
|
|
45
54
|
reuse: runReuseCommand,
|
|
46
55
|
publish: runPublishCommand,
|
|
56
|
+
sync: runSyncCommand,
|
|
47
57
|
recall: runRecallCommand,
|
|
48
58
|
'reuse-report': runReuseReportCommand,
|
|
49
59
|
doctor: runDoctorCommand,
|
|
50
60
|
phub: runPhubCommand,
|
|
51
61
|
lifecycle: runLifecycleCommand,
|
|
52
62
|
cycle: runCycleCommand,
|
|
63
|
+
material: runMaterialCommand,
|
|
53
64
|
'trajectory-export': runTrajectoryExport,
|
|
54
65
|
'anti-gene-benchmark': runAntiGeneBenchmarkCommand,
|
|
55
66
|
'anti-gene-rollout': runAntiGeneRolloutCommand,
|
|
67
|
+
dashboard: runDashboardCommand,
|
|
68
|
+
run: runV1RunCompat,
|
|
69
|
+
solidify: runV1SolidifyCompat,
|
|
70
|
+
fetch: runV1FetchCompat,
|
|
71
|
+
webui: runV1WebuiCompat,
|
|
56
72
|
};
|
|
57
73
|
/** Verbs handled by the synchronous runCli core (read-only views + local ops). Kept in sync with runCli's switch
|
|
58
74
|
* — the source of truth for these stays runCli; this list completes the surface for the registry contract. */
|
|
@@ -64,9 +80,18 @@ export const ALL_COMMANDS = new Set([
|
|
|
64
80
|
...Object.keys(ASYNC_COMMANDS),
|
|
65
81
|
...SYNC_COMMANDS,
|
|
66
82
|
]);
|
|
83
|
+
export function v1TopLevelRunArgs(argv) {
|
|
84
|
+
if (argv.length === 0)
|
|
85
|
+
return [];
|
|
86
|
+
const hasLoopMode = argv.includes('--loop') || argv.includes('--mad-dog');
|
|
87
|
+
return argv[0]?.startsWith('-') && hasLoopMode ? argv : undefined;
|
|
88
|
+
}
|
|
67
89
|
/** Run a top-level argv against the registry: async handler if present, else the synchronous runCli core. */
|
|
68
90
|
export function dispatch(argv) {
|
|
69
|
-
|
|
91
|
+
const topLevelRunArgs = v1TopLevelRunArgs(argv);
|
|
92
|
+
if (topLevelRunArgs)
|
|
93
|
+
return runV1RunCompat(topLevelRunArgs);
|
|
94
|
+
if (argv.length === 1 && (argv[0] === '--version' || argv[0] === '-v')) {
|
|
70
95
|
process.stdout.write(`${getCliVersion()}\n`);
|
|
71
96
|
return 0;
|
|
72
97
|
}
|
package/dist/distillObserver.js
CHANGED
|
@@ -13,7 +13,7 @@ import { assetstore, events, observers, signals, algo } from '@evomap/evolver-co
|
|
|
13
13
|
import { readFileSync } from 'node:fs';
|
|
14
14
|
import { draftGeneCandidate, assessDraftAdmission } from './distillPrimitives.js';
|
|
15
15
|
import { reviewLedgerForStore } from './reviewFilter.js';
|
|
16
|
-
import {
|
|
16
|
+
import { runtimeSessionSourcesForMaterial } from './materialSnapshot.js';
|
|
17
17
|
/** Consumer group the distill drain claims under — independent cursor from any other material consumer. */
|
|
18
18
|
export const DISTILL_CONSUMER_GROUP = 'distill';
|
|
19
19
|
/** Drafts created per tick — bound the auto-draft rate so an idle daemon does not flood the human review queue. */
|
|
@@ -37,7 +37,7 @@ export function makeDistillDrain(c) {
|
|
|
37
37
|
return { ack: true, drafted: 0 };
|
|
38
38
|
let sources;
|
|
39
39
|
try {
|
|
40
|
-
sources =
|
|
40
|
+
sources = runtimeSessionSourcesForMaterial(m, readSource);
|
|
41
41
|
}
|
|
42
42
|
catch {
|
|
43
43
|
return { ack: true, drafted: 0 }; // bad / missing / unparseable source — nothing to retry
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { algo, type signals } from '@evomap/evolver-core';
|
|
2
2
|
import type { NormalizedTurn } from '@evomap/evolver-runtime-adapters';
|
|
3
3
|
/** Short matchable signal tokens from the STRONG signals only (toolName + a known error class). Every strong
|
|
4
4
|
* signal yields ≥1 token: if it has no toolName and matches no known error class (e.g. `FAILED: …` or
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Distill primitives (#117 A1) — the PURE session→gene-draft logic, extracted from runIngest so the one-shot
|
|
2
|
+
// `evolver ingest --distill` and the live distillObserver reuse ONE copy (no forked distill logic). Zero behavior
|
|
3
|
+
// change vs the inline version: same tokens, same step drafting, same candidate shape. No I/O — the caller parses
|
|
4
|
+
// the session into turns + extracts signals; this turns them into a draft GeneCandidate (or null when too thin).
|
|
5
|
+
import { algo } from '@evomap/evolver-core';
|
|
1
6
|
// Map a strong signal's free-text to a SHORT, matchable token (so a gene's signals_match stays a few
|
|
2
7
|
// keywords, not a dumped error blob). Deterministic + testable; unknown errors fall back to the tool name only.
|
|
3
8
|
const SIGNAL_ERROR_CLASSES = [
|
|
@@ -100,13 +105,35 @@ export function draftStrategy(turns) {
|
|
|
100
105
|
export function draftGeneCandidate(turns, sigs, agent) {
|
|
101
106
|
const signals_match = signalTokens(sigs);
|
|
102
107
|
const strategy = draftStrategy(turns);
|
|
103
|
-
if (signals_match.length === 0 || strategy.length === 0)
|
|
104
|
-
|
|
108
|
+
if (signals_match.length === 0 || strategy.length === 0) {
|
|
109
|
+
const hit = algo.sniffConversationCapabilities(turns)[0];
|
|
110
|
+
if (!hit)
|
|
111
|
+
return null;
|
|
112
|
+
const fallbackStrategy = hit.evidence;
|
|
113
|
+
if (fallbackStrategy.length === 0)
|
|
114
|
+
return null;
|
|
115
|
+
return {
|
|
116
|
+
category: 'innovate',
|
|
117
|
+
signals_match: hit.signals,
|
|
118
|
+
strategy: fallbackStrategy.slice(0, 6),
|
|
119
|
+
summary: `Auto-drafted verified capability from ${agent} session (UNPROVEN — curate via review): ${hit.summary}`,
|
|
120
|
+
preconditions: [
|
|
121
|
+
'A live agent conversation explicitly described a reusable capability.',
|
|
122
|
+
'The same conversation included validation or successful tool evidence.',
|
|
123
|
+
],
|
|
124
|
+
validation: ['node --version'],
|
|
125
|
+
generation_meta: { source: 'distilled' },
|
|
126
|
+
};
|
|
127
|
+
}
|
|
105
128
|
return {
|
|
106
129
|
category: 'repair',
|
|
107
130
|
signals_match,
|
|
108
131
|
strategy,
|
|
109
132
|
summary: `Auto-drafted from ${agent} session (UNPROVEN — curate via review): ${signals_match.slice(0, 3).join(', ')}`,
|
|
133
|
+
// A session-distilled gene has execution evidence (the session's turns) but no verified fail→pass-with-blast
|
|
134
|
+
// trajectory → `distilled` per V1 #302 classifyProvenance. Tagged so future governance/selection can grade it
|
|
135
|
+
// apart from evolved (solve→fail→mutate→pass) and manual (human-taught) genes.
|
|
136
|
+
generation_meta: { source: 'distilled' },
|
|
110
137
|
};
|
|
111
138
|
}
|
|
112
139
|
/**
|
package/dist/doctor.js
CHANGED
|
@@ -85,6 +85,13 @@ const ENV_CATALOG_DEFINITIONS = [
|
|
|
85
85
|
purpose: 'Hub base URL for public/private adapter connections.',
|
|
86
86
|
requiredFor: 'hub sync, PHub runtime, live smoke',
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
name: 'EVOLVER_DEFAULT_HUB_URL',
|
|
90
|
+
group: 'hub-runtime',
|
|
91
|
+
purpose: 'Deployment-time default Hub URL override used when A2A_HUB_URL and EVOMAP_HUB_URL are unset.',
|
|
92
|
+
requiredFor: 'release/deployment default Hub selection',
|
|
93
|
+
defaultValue: 'https://evomap.ai',
|
|
94
|
+
},
|
|
88
95
|
{
|
|
89
96
|
name: 'EVOMAP_PRIVATE_ADAPTER_MODULE',
|
|
90
97
|
group: 'hub-runtime',
|
|
@@ -688,9 +695,9 @@ function privateRuntimeChecks(env, envFile, envFileReadiness) {
|
|
|
688
695
|
else {
|
|
689
696
|
checks.push({ name: 'phub-mode', status: 'fail', detail: `EVOMAP_HUB_MODE=${redact(mode)}; expected private for PHub runtime` });
|
|
690
697
|
}
|
|
691
|
-
const hubUrl =
|
|
698
|
+
const hubUrl = privateHubUrlValue(env, envFile);
|
|
692
699
|
if (!hubUrl) {
|
|
693
|
-
checks.push({ name: 'phub-url', status: 'fail', detail: '
|
|
700
|
+
checks.push({ name: 'phub-url', status: 'fail', detail: 'Hub URL is missing; set EVOMAP_HUB_URL in EVOLVER_ENV_FILE, or use A2A_HUB_URL / EVOLVER_DEFAULT_HUB_URL for explicit compatibility' });
|
|
694
701
|
}
|
|
695
702
|
else if (isProductionLikeHubUrl(hubUrl)) {
|
|
696
703
|
checks.push({ name: 'phub-url', status: 'warn', detail: `${redact(hubUrl)} does not look like a test-env URL; do not run live smoke against production PHub` });
|
|
@@ -771,7 +778,7 @@ function privateLiveSmokeCheck(env, envFile, essentials) {
|
|
|
771
778
|
if (essentials.mode !== 'private')
|
|
772
779
|
missing.push('EVOMAP_HUB_MODE=private');
|
|
773
780
|
if (!essentials.hubUrl)
|
|
774
|
-
missing.push('EVOMAP_HUB_URL');
|
|
781
|
+
missing.push('EVOMAP_HUB_URL|A2A_HUB_URL|EVOLVER_DEFAULT_HUB_URL');
|
|
775
782
|
if (essentials.tokenCount === 0)
|
|
776
783
|
missing.push(`one of ${PRIVATE_TOKEN_KEYS.join('|')}`);
|
|
777
784
|
if (missing.length > 0) {
|
|
@@ -827,6 +834,11 @@ function privateValue(env, envFile, key) {
|
|
|
827
834
|
const fromEnv = env[key]?.trim();
|
|
828
835
|
return fromEnv || undefined;
|
|
829
836
|
}
|
|
837
|
+
function privateHubUrlValue(env, envFile) {
|
|
838
|
+
return privateValue(env, envFile, 'EVOMAP_HUB_URL')
|
|
839
|
+
?? privateValue(env, envFile, 'A2A_HUB_URL')
|
|
840
|
+
?? privateValue(env, envFile, 'EVOLVER_DEFAULT_HUB_URL');
|
|
841
|
+
}
|
|
830
842
|
function isLoopbackProxyUrl(raw) {
|
|
831
843
|
try {
|
|
832
844
|
const url = new URL(raw);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { events, ops } from '@evomap/evolver-core';
|
|
2
2
|
import { assetstore, material as materialNs } from '@evomap/evolver-core';
|
|
3
|
+
import { type NonGitWorkspaceNoticeOptions } from './nonGitWorkspaceNotice.js';
|
|
3
4
|
/**
|
|
4
5
|
* Composition seam for ingest's substrate dependencies. The CLI is the composition layer that wires the
|
|
5
6
|
* MaterialStore (M1 raw-material substrate) + the watermark cursor (file-level re-ingest dedup) + the AE
|
|
@@ -16,6 +17,7 @@ export interface SessionIngestTickResult {
|
|
|
16
17
|
sourceAgents: string[];
|
|
17
18
|
signalKinds: string[];
|
|
18
19
|
signalStrengths: string[];
|
|
20
|
+
invalidJsonRows?: number;
|
|
19
21
|
}
|
|
20
22
|
export declare const PACKAGE = "@evomap/evolver-cli";
|
|
21
23
|
export interface RebuildOptions {
|
|
@@ -111,7 +113,7 @@ export declare function promoteHint(v: assetstore.GeneLearningView): string;
|
|
|
111
113
|
* gene); `--approve`/`--reject <id>` is the audited human act that lifts an auto-distilled draft out of (or
|
|
112
114
|
* confirms it out of) quarantine. Approval is what lets a distilled gene's strategy be embedded into a real run
|
|
113
115
|
* (the gate lives in makeTrustedGeneResolver, #45+review). The id may be a logical id or an asset_id.
|
|
114
|
-
* Usage: evolver review [limit] | evolver review --approve <id> [reason…] | evolver review --reject <id> [reason…]
|
|
116
|
+
* Usage: evolver review [limit] | evolver review --approve <id> [--allow-weak-evidence] [reason…] | evolver review --reject <id> [reason…]
|
|
115
117
|
*/
|
|
116
118
|
export declare function runReview(argv: readonly string[], store?: assetstore.AssetStoreProvider, review?: assetstore.ReviewLedger, deps?: IngestDeps): Promise<number>;
|
|
117
119
|
/** Injection seam for `value` (#113): tests point these at temp paths / a fixed clock; defaults are the live home.
|
|
@@ -139,6 +141,7 @@ export interface RetentionDeps {
|
|
|
139
141
|
rootEventsPath?: string;
|
|
140
142
|
materialStorePath?: string;
|
|
141
143
|
materialCursorPath?: string;
|
|
144
|
+
materialCursorPaths?: readonly string[];
|
|
142
145
|
now?: () => number;
|
|
143
146
|
}
|
|
144
147
|
export declare function formatRetentionReport(report: events.RetentionReport): string;
|
|
@@ -172,6 +175,8 @@ export interface InjectDeps {
|
|
|
172
175
|
readHookInput?: () => string | undefined;
|
|
173
176
|
/** Test seam for the hook-time proxy daemon recovery path. Default is maybeAutoRestartProxyForSessionStart. */
|
|
174
177
|
ensureProxyAutostart?: () => Promise<void>;
|
|
178
|
+
/** Test seam for the non-git workspace notice. Production uses cwd + ~/.evomap throttle state. */
|
|
179
|
+
nonGitNotice?: NonGitWorkspaceNoticeOptions;
|
|
175
180
|
}
|
|
176
181
|
/**
|
|
177
182
|
* `evolver inject session-start`: the SessionStart hook entrypoint (the command every installer registers).
|