@evomap/evolver-cli 2.0.0-beta.9 → 2.0.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.
- package/dist/antiGeneBenchmark.js +2 -0
- package/dist/antiGeneRollout.js +9 -3
- package/dist/assetHealth.js +2 -0
- package/dist/assetTrust.js +14 -1
- package/dist/atp.d.ts +10 -5
- package/dist/atp.js +119 -26
- package/dist/atpAutoBuyer.d.ts +120 -0
- package/dist/atpAutoBuyer.js +814 -0
- package/dist/atpAutoDeliver.js +2 -2
- package/dist/autoDistillLlm.js +2 -1
- package/dist/autoDistillTranscript.js +3 -2
- package/dist/autoexec.d.ts +101 -13
- package/dist/autoexec.js +794 -91
- package/dist/cli.js +13 -0
- package/dist/cliContracts.d.ts +23 -2
- package/dist/cliContracts.js +504 -54
- package/dist/commands.d.ts +1 -0
- package/dist/commands.js +1 -0
- package/dist/curriculumCapabilityGaps.d.ts +6 -0
- package/dist/curriculumCapabilityGaps.js +24 -0
- package/dist/cycleConsumer.d.ts +13 -0
- package/dist/cycleConsumer.js +186 -20
- package/dist/dashboard.js +47 -9
- package/dist/dispatch.js +8 -2
- package/dist/distillPrimitives.d.ts +3 -2
- package/dist/distillPrimitives.js +80 -12
- package/dist/doctor.js +120 -11
- package/dist/identityHome.d.ts +9 -0
- package/dist/identityHome.js +47 -0
- package/dist/index.d.ts +70 -40
- package/dist/index.js +581 -193
- package/dist/learningTrace.d.ts +15 -0
- package/dist/learningTrace.js +73 -0
- package/dist/lifecycle.d.ts +67 -1
- package/dist/lifecycle.js +738 -44
- package/dist/localMemoryGraph.d.ts +90 -3
- package/dist/localMemoryGraph.js +2031 -231
- package/dist/login.d.ts +1 -1
- package/dist/login.js +3 -3
- package/dist/materialSnapshot.d.ts +9 -1
- package/dist/materialSnapshot.js +23 -6
- package/dist/memoryGraphOps.d.ts +8 -0
- package/dist/memoryGraphOps.js +140 -0
- package/dist/migrate/assetFormatMap.d.ts +61 -0
- package/dist/migrate/assetFormatMap.js +53 -0
- package/dist/migrate/envTranslate.d.ts +26 -0
- package/dist/migrate/envTranslate.js +147 -0
- package/dist/migrate/fieldMap.d.ts +4 -2
- package/dist/migrate/fieldMap.js +9 -5
- package/dist/migrate/oauthImport.d.ts +66 -0
- package/dist/migrate/oauthImport.js +667 -0
- package/dist/migrate/v1Import.d.ts +92 -1
- package/dist/migrate/v1Import.js +1481 -141
- package/dist/promptRecallHook.d.ts +24 -0
- package/dist/promptRecallHook.js +425 -0
- package/dist/recallVerifyReport.d.ts +37 -0
- package/dist/recallVerifyReport.js +244 -0
- package/dist/recipe.d.ts +7 -1
- package/dist/recipe.js +426 -56
- package/dist/requiredSandboxValidation.d.ts +5 -0
- package/dist/requiredSandboxValidation.js +4 -0
- package/dist/reuse.d.ts +9 -0
- package/dist/reuse.js +151 -56
- package/dist/runtimeCapabilities.js +15 -15
- package/dist/runtimeSessionSource.d.ts +3 -2
- package/dist/runtimeSessionSource.js +63 -11
- package/dist/selectionPolicyConfig.d.ts +8 -0
- package/dist/selectionPolicyConfig.js +18 -0
- package/dist/semanticIdfConfig.d.ts +2 -0
- package/dist/semanticIdfConfig.js +4 -0
- package/dist/sessionIngest.d.ts +37 -0
- package/dist/sessionIngest.js +156 -0
- package/dist/setupHooks.js +95 -1
- package/dist/skill2gep.d.ts +13 -9
- package/dist/skill2gep.js +42 -30
- package/dist/skillDistill.d.ts +8 -4
- package/dist/skillDistill.js +38 -9
- package/dist/solo/mode.js +1 -0
- package/dist/sync.d.ts +12 -0
- package/dist/sync.js +1246 -151
- package/dist/thesis.d.ts +1 -1
- package/dist/thesis.js +20 -3
- package/dist/trajectoryExport.js +21 -3
- package/dist/v1Compat.d.ts +1 -0
- package/dist/v1Compat.js +9 -0
- package/dist/workflowRuntime.js +24 -18
- package/package.json +11 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type UserInfo } from 'node:os';
|
|
2
|
-
import { algo } from '@evomap/evolver-core';
|
|
2
|
+
import { algo, util } from '@evomap/evolver-core';
|
|
3
3
|
export interface LocalMemoryGraphOptions {
|
|
4
4
|
dir: string;
|
|
5
5
|
userId: string;
|
|
@@ -11,6 +11,15 @@ export interface LocalMemoryGraphOptions {
|
|
|
11
11
|
maxCompactBytes?: number;
|
|
12
12
|
maxCompactEdges?: number;
|
|
13
13
|
archiveRetention?: number;
|
|
14
|
+
/** @internal Fault-injection seam used to verify restart reconciliation. */
|
|
15
|
+
onRotationPhase?: (event: MemoryGraphRotationEvent) => void;
|
|
16
|
+
}
|
|
17
|
+
export type MemoryGraphRotationPhase = 'journal_prepared' | 'compact_staged' | 'archive_staged' | 'active_staged' | 'journal_committed' | 'compact_published' | 'archive_published' | 'before_active_publish' | 'active_published' | 'before_journal_clear' | 'journal_cleared';
|
|
18
|
+
export interface MemoryGraphRotationEvent {
|
|
19
|
+
mode: 'commit' | 'recovery';
|
|
20
|
+
phase: MemoryGraphRotationPhase;
|
|
21
|
+
transactionId: string;
|
|
22
|
+
generation: string;
|
|
14
23
|
}
|
|
15
24
|
export declare function resolveLocalMemoryUserId(info?: Pick<UserInfo<string>, 'uid' | 'username' | 'homedir'>): string;
|
|
16
25
|
export declare function resolveLocalMemoryUserIdentity(graphDir: string, info?: Pick<UserInfo<string>, 'uid' | 'username' | 'homedir'>): {
|
|
@@ -25,6 +34,12 @@ export interface MemoryGraphMaintenanceReport {
|
|
|
25
34
|
archives: number;
|
|
26
35
|
recovery: 'healthy' | 'degraded' | 'recovered' | 'empty';
|
|
27
36
|
}
|
|
37
|
+
export interface MemoryGraphResetReport extends MemoryGraphMaintenanceReport {
|
|
38
|
+
backupId: string | null;
|
|
39
|
+
backupFiles: number;
|
|
40
|
+
epochId?: string;
|
|
41
|
+
lockReleaseWarning?: util.ReleaseLockReason;
|
|
42
|
+
}
|
|
28
43
|
export interface MemoryGraphHealthReport {
|
|
29
44
|
recovery: MemoryGraphMaintenanceReport['recovery'];
|
|
30
45
|
compactedRecords: number;
|
|
@@ -38,6 +53,13 @@ export interface MemoryGraphHealthReport {
|
|
|
38
53
|
export interface MemoryGraphOperatorStatus extends MemoryGraphHealthReport {
|
|
39
54
|
selectionReason?: string;
|
|
40
55
|
}
|
|
56
|
+
export interface MemoryGraphV1OutcomePlan {
|
|
57
|
+
readonly total: number;
|
|
58
|
+
readonly importable: number;
|
|
59
|
+
readonly duplicates: number;
|
|
60
|
+
readonly rejected: number;
|
|
61
|
+
readonly deferred: number;
|
|
62
|
+
}
|
|
41
63
|
export declare class MemoryGraphImportStateRejectedError extends Error {
|
|
42
64
|
constructor();
|
|
43
65
|
}
|
|
@@ -55,29 +77,93 @@ export declare class LocalMemoryGraph implements algo.MemoryGraphProvider {
|
|
|
55
77
|
private readonly maxCompactBytes;
|
|
56
78
|
private readonly maxCompactEdges;
|
|
57
79
|
private readonly archiveRetention;
|
|
80
|
+
private readonly onRotationPhase?;
|
|
58
81
|
private readonly importedFingerprints;
|
|
82
|
+
private rotationCleanupFailed;
|
|
59
83
|
constructor(options: LocalMemoryGraphOptions);
|
|
60
84
|
query(input: algo.MemoryGraphQueryInput): algo.MemoryGraphAdvice;
|
|
61
85
|
recordOutcome(input: algo.MemoryGraphRecordInput): void;
|
|
62
86
|
importV1Outcome(workspace: string, raw: unknown, source?: string): boolean;
|
|
87
|
+
/** Builds a stable import forecast without creating or locking the target graph. */
|
|
88
|
+
planV1Outcomes(workspace: string | null | undefined, raws: readonly unknown[], source?: string): MemoryGraphV1OutcomePlan;
|
|
89
|
+
/** Applies only the normalized records sealed by planV1Outcomes. */
|
|
90
|
+
applyV1OutcomePlan(plan: MemoryGraphV1OutcomePlan): number;
|
|
63
91
|
maintain(): MemoryGraphMaintenanceReport;
|
|
64
92
|
private maintainUnlocked;
|
|
65
93
|
recoverFromArchives(): MemoryGraphMaintenanceReport;
|
|
94
|
+
/** Enforce archive retention without changing active or compact state. */
|
|
95
|
+
prune(): MemoryGraphMaintenanceReport;
|
|
96
|
+
/**
|
|
97
|
+
* Copy every managed graph file into a non-active backup, then atomically
|
|
98
|
+
* advance the local storage epoch.
|
|
99
|
+
* The CLI requires explicit opt-in (`--yes`) before calling this method.
|
|
100
|
+
*/
|
|
101
|
+
resetGraph(): MemoryGraphResetReport;
|
|
102
|
+
private managedGraphStateFiles;
|
|
103
|
+
private createResetBackupDirectory;
|
|
104
|
+
private publishResetBackup;
|
|
105
|
+
private cleanupResetPendingDirectory;
|
|
106
|
+
private readResetSource;
|
|
107
|
+
private assertManagedStateUnchanged;
|
|
108
|
+
private ensureEpochStateFile;
|
|
109
|
+
private currentEpochId;
|
|
110
|
+
private epochBaselineFromState;
|
|
111
|
+
private readEpochState;
|
|
112
|
+
private writeEpochState;
|
|
113
|
+
private hasResetBackup;
|
|
114
|
+
private compactMatchesEpochBaseline;
|
|
115
|
+
private readCompactForEpoch;
|
|
116
|
+
private activeLogicalWindow;
|
|
117
|
+
private activePayloadForEpoch;
|
|
118
|
+
private readActiveForEpoch;
|
|
119
|
+
private currentArchiveFiles;
|
|
66
120
|
private recoverFromArchivesUnlocked;
|
|
67
121
|
inspectHealth(): MemoryGraphHealthReport;
|
|
68
122
|
private inspectHealthUnlocked;
|
|
69
123
|
private withGraphLock;
|
|
124
|
+
private importFingerprintCache;
|
|
125
|
+
private readStableImportState;
|
|
126
|
+
private persistedRecordLine;
|
|
127
|
+
private importRecordFits;
|
|
70
128
|
private importStateFingerprint;
|
|
71
129
|
private appendRecordUnlocked;
|
|
72
130
|
private rotateAndCompactUnlocked;
|
|
131
|
+
private reconcileRotationUnlocked;
|
|
132
|
+
private reconcileCommittedRotation;
|
|
133
|
+
private completeCommittedRotationCleanup;
|
|
134
|
+
private withRotationCleanupStatus;
|
|
135
|
+
private assertCommittedRotationApplied;
|
|
136
|
+
private assertCommittedRotationCanApply;
|
|
137
|
+
private assertRotationFileReady;
|
|
138
|
+
private assertOptionalRotationStage;
|
|
139
|
+
private publishRotationFile;
|
|
140
|
+
private publishRotationActive;
|
|
141
|
+
private writeRotationJournal;
|
|
142
|
+
private assertRotationJournalUnchanged;
|
|
143
|
+
private readRotationJournal;
|
|
144
|
+
private writeRotationStage;
|
|
145
|
+
private assertRotationStagesMatch;
|
|
146
|
+
private assertRotationSourceMatches;
|
|
147
|
+
private rotationActiveSourceMatches;
|
|
148
|
+
private rotationSourceMatches;
|
|
149
|
+
private rotationTargetMatches;
|
|
150
|
+
private requireRotationTarget;
|
|
151
|
+
private removeRotationStage;
|
|
152
|
+
private removeVerifiedRotationFile;
|
|
153
|
+
private readVerifiedRotationFile;
|
|
154
|
+
private rotationStageFiles;
|
|
155
|
+
private rotationTempFiles;
|
|
156
|
+
private removeRotationTemp;
|
|
157
|
+
private notifyRotationPhase;
|
|
158
|
+
private syncGraphDirectory;
|
|
73
159
|
private compactRequiresRecovery;
|
|
74
160
|
private readQueryableRecords;
|
|
75
161
|
private readImportRecords;
|
|
162
|
+
private readImportRecordsFromExistingDir;
|
|
76
163
|
private readCompact;
|
|
77
164
|
private readWholeBounded;
|
|
78
165
|
private readTail;
|
|
79
166
|
private readTailFromFd;
|
|
80
|
-
private readRawTail;
|
|
81
167
|
private parseBuffer;
|
|
82
168
|
private writeCompact;
|
|
83
169
|
private writeAtomic;
|
|
@@ -88,7 +174,8 @@ export declare class LocalMemoryGraph implements algo.MemoryGraphProvider {
|
|
|
88
174
|
private nextArchivePath;
|
|
89
175
|
private pruneArchives;
|
|
90
176
|
private writeRecoveryMarker;
|
|
91
|
-
private
|
|
177
|
+
private inspectArchivesForEpoch;
|
|
178
|
+
private recoveryMarkerState;
|
|
92
179
|
private clearRecoveryMarker;
|
|
93
180
|
private readRawBounded;
|
|
94
181
|
}
|