@evomap/evolver-core 2.0.0-beta.1 → 2.0.0-beta.11
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/assets/gep/genes.jsonl +5 -0
- package/dist/algo/candidateAssembly.js +23 -14
- package/dist/algo/capabilityCandidates.d.ts +2 -0
- package/dist/algo/capabilityCandidates.js +5 -0
- package/dist/algo/conversationSniffer.d.ts +18 -0
- package/dist/algo/conversationSniffer.js +149 -0
- package/dist/algo/cycleEngine.d.ts +11 -0
- package/dist/algo/cycleEngine.js +14 -6
- package/dist/algo/cycleFailureClassifier.d.ts +1 -1
- package/dist/algo/cycleFailureClassifier.js +13 -5
- package/dist/algo/geneIntake.d.ts +14 -4
- package/dist/algo/geneIntake.js +37 -9
- package/dist/algo/geneSelection.d.ts +18 -1
- package/dist/algo/geneSelection.js +42 -18
- package/dist/algo/index.d.ts +2 -0
- package/dist/algo/index.js +2 -0
- package/dist/algo/memoryGraph.d.ts +62 -0
- package/dist/algo/memoryGraph.js +86 -0
- package/dist/algo/orchestrator.d.ts +3 -0
- package/dist/algo/orchestrator.js +14 -2
- package/dist/assetstore/assetSidecarRecords.d.ts +28 -0
- package/dist/assetstore/assetSidecarRecords.js +376 -0
- package/dist/assetstore/assetSidecarRecovery.d.ts +48 -0
- package/dist/assetstore/assetSidecarRecovery.js +288 -0
- package/dist/assetstore/assetStoreHealth.d.ts +82 -0
- package/dist/assetstore/assetStoreHealth.js +308 -0
- package/dist/assetstore/assetStoreLayout.d.ts +2 -0
- package/dist/assetstore/assetStoreLayout.js +6 -0
- package/dist/assetstore/assetStoreStorage.d.ts +42 -0
- package/dist/assetstore/assetStoreStorage.js +327 -0
- package/dist/assetstore/assetSyncLedger.d.ts +118 -0
- package/dist/assetstore/assetSyncLedger.js +745 -0
- package/dist/assetstore/index.d.ts +5 -1
- package/dist/assetstore/index.js +5 -1
- package/dist/assetstore/localJsonl.d.ts +12 -3
- package/dist/assetstore/localJsonl.js +131 -39
- package/dist/assetstore/pendingSignals.js +3 -1
- package/dist/assetstore/provenance.d.ts +39 -4
- package/dist/assetstore/provenance.js +134 -55
- package/dist/assetstore/provider.d.ts +40 -0
- package/dist/assetstore/provider.js +63 -5
- package/dist/assetstore/reviewFilter.js +5 -2
- package/dist/assetstore/reviewLedger.d.ts +14 -2
- package/dist/assetstore/reviewLedger.js +78 -43
- package/dist/assetstore/seedGenes.d.ts +3 -0
- package/dist/assetstore/seedGenes.js +134 -0
- package/dist/benchmark/antiGeneBenchmark.d.ts +2 -0
- package/dist/benchmark/antiGeneBenchmark.js +11 -1
- package/dist/benchmark/antiGeneImpact.d.ts +16 -0
- package/dist/benchmark/antiGeneImpact.js +34 -0
- package/dist/benchmark/antiGeneRollout.d.ts +2 -0
- package/dist/benchmark/antiGeneRollout.js +13 -1
- package/dist/benchmark/index.d.ts +2 -1
- package/dist/benchmark/index.js +2 -1
- package/dist/benchmark/triggerShift.d.ts +62 -0
- package/dist/benchmark/triggerShift.js +106 -0
- package/dist/events/eventArchive.d.ts +65 -0
- package/dist/events/eventArchive.js +343 -0
- package/dist/events/eventStore.js +2 -12
- package/dist/events/ingest.d.ts +1 -1
- package/dist/events/ingest.js +9 -0
- package/dist/events/paths.d.ts +10 -10
- package/dist/events/paths.js +20 -20
- package/dist/events/public.d.ts +3 -1
- package/dist/events/public.js +2 -1
- package/dist/events/retention.d.ts +24 -1
- package/dist/events/retention.js +133 -37
- package/dist/exec/autoExec.d.ts +6 -1
- package/dist/exec/autoExec.js +34 -0
- package/dist/exec/autonomousCycle.d.ts +2 -0
- package/dist/exec/autonomousCycle.js +5 -0
- package/dist/exec/claudeBridge.d.ts +21 -3
- package/dist/exec/claudeBridge.js +413 -26
- package/dist/exec/openPrRegistry.d.ts +8 -2
- package/dist/exec/openPrRegistry.js +32 -22
- package/dist/exec/prompt.js +9 -0
- package/dist/exec/runnerRegistry.d.ts +90 -18
- package/dist/exec/runnerRegistry.js +603 -42
- package/dist/exec/selfPrObfuscation.d.ts +2 -1
- package/dist/exec/selfPrObfuscation.js +19 -6
- package/dist/hub/agentDirectory.d.ts +90 -0
- package/dist/hub/agentDirectory.js +104 -0
- package/dist/hub/bindings.js +23 -3
- package/dist/hub/capability.d.ts +14 -2
- package/dist/hub/fake.d.ts +4 -2
- package/dist/hub/fake.js +3 -2
- package/dist/hub/index.d.ts +1 -0
- package/dist/hub/index.js +1 -0
- package/dist/hub/sanitize.js +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/issueReporter/index.d.ts +156 -0
- package/dist/issueReporter/index.js +1688 -0
- package/dist/mailbox/catalog.js +3 -0
- package/dist/mailbox/ipcServer.js +2 -2
- package/dist/mailbox/store.d.ts +14 -0
- package/dist/mailbox/store.js +44 -2
- package/dist/material/consumer.js +9 -6
- package/dist/material/index.d.ts +1 -0
- package/dist/material/index.js +1 -0
- package/dist/material/materialArchive.d.ts +81 -0
- package/dist/material/materialArchive.js +466 -0
- package/dist/material/materialStore.d.ts +1 -0
- package/dist/material/materialStore.js +6 -13
- package/dist/ops/savingsCore.js +1 -2
- package/dist/ops/selfUpdate.d.ts +10 -1
- package/dist/ops/selfUpdate.js +64 -15
- package/dist/personality/schema.d.ts +12 -12
- package/dist/schema/common.d.ts +1 -1
- package/dist/schema/common.js +1 -1
- package/dist/schema/material.d.ts +5 -5
- package/dist/strategy/constraintAblation.d.ts +64 -0
- package/dist/strategy/constraintAblation.js +3074 -0
- package/dist/strategy/index.d.ts +2 -1
- package/dist/strategy/index.js +2 -1
- package/dist/trace/trajectoryExport.js +2 -2
- package/dist/util/fetchPort.d.ts +1 -0
- package/dist/util/fetchPort.js +11 -0
- package/dist/util/fileLock.d.ts +24 -5
- package/dist/util/fileLock.js +288 -72
- package/dist/util/index.d.ts +1 -0
- package/dist/util/index.js +1 -0
- package/dist/wire/geneHints.d.ts +42 -1
- package/dist/wire/geneHints.js +52 -1
- package/dist/wire/index.d.ts +14 -2
- package/dist/wire/index.js +1 -1
- package/dist/workflow/dsl.d.ts +24 -3
- package/dist/workflow/dsl.js +4 -0
- package/dist/workflow/engine.d.ts +5 -1
- package/dist/workflow/engine.js +3 -0
- package/dist/workflow/index.d.ts +3 -1
- package/dist/workflow/index.js +3 -1
- package/dist/workflow/runtime.d.ts +110 -0
- package/dist/workflow/runtime.js +1298 -0
- package/dist/workflow/stateStore.d.ts +172 -0
- package/dist/workflow/stateStore.js +1044 -0
- package/package.json +6 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export declare const DEFAULT_TIMEOUT_MS = 600000;
|
|
2
|
+
/** Per-stream stdout/stderr capture ceiling. A child can emit indefinitely without growing the parent heap. */
|
|
3
|
+
export declare const DEFAULT_MAX_CAPTURE_BYTES = 1048576;
|
|
2
4
|
export interface AgentRunContext {
|
|
3
5
|
cwd: string;
|
|
4
6
|
timeoutMs?: number;
|
|
7
|
+
/** Cooperative cancellation. The runner kills the whole spawned process tree when aborted. */
|
|
8
|
+
signal?: AbortSignal;
|
|
5
9
|
/** Environment for the spawned agent. The bridge passes a scrubbed env here (see scrubAgentEnv); undefined → inherit. */
|
|
6
10
|
env?: NodeJS.ProcessEnv;
|
|
7
11
|
}
|
|
@@ -9,6 +13,8 @@ export interface AgentRunResult {
|
|
|
9
13
|
ok: boolean;
|
|
10
14
|
output: string;
|
|
11
15
|
error?: string;
|
|
16
|
+
failureKind?: 'spawn_failed' | 'timeout' | 'cancelled' | 'permission_denied' | 'non_zero_exit' | 'invalid_output' | 'runtime_error';
|
|
17
|
+
exitCode?: number | null;
|
|
12
18
|
}
|
|
13
19
|
/** Run a coding agent against a working directory with the given instruction. */
|
|
14
20
|
export type AgentRunner = (prompt: string, ctx: AgentRunContext) => Promise<AgentRunResult>;
|
|
@@ -20,40 +26,99 @@ export declare class UnboundedSkipPermissionsError extends Error {
|
|
|
20
26
|
export declare class UnsupportedCursorSkipPermissionsError extends Error {
|
|
21
27
|
constructor();
|
|
22
28
|
}
|
|
23
|
-
/** Thrown when
|
|
29
|
+
/** Thrown when Gemini permission options cannot be mapped to a verified bounded CLI contract. */
|
|
30
|
+
export declare class UnsupportedGeminiPermissionOptionsError extends Error {
|
|
31
|
+
constructor();
|
|
32
|
+
}
|
|
33
|
+
/** Thrown when Cursor's Windows installation cannot be reduced to a shell-free node.exe + index.js launch. */
|
|
24
34
|
export declare class UnsupportedCursorWindowsRunnerError extends Error {
|
|
25
35
|
constructor();
|
|
26
36
|
}
|
|
27
|
-
export declare function assertCursorRunnerPlatformSupported(platform?: NodeJS.Platform): void;
|
|
37
|
+
export declare function assertCursorRunnerPlatformSupported(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): void;
|
|
28
38
|
/**
|
|
29
39
|
* Make a bare command name spawnable shell-free on Windows. `spawn(shell:false)` cannot execute an npm CLI
|
|
30
40
|
* shim (a `.cmd`/`.bat`), and routing through a shell would expose the prompt arg to cmd.exe quoting
|
|
31
41
|
* (injection). npm shims are node wrappers, so we resolve the bare name on PATH and, when it's a node shim,
|
|
32
|
-
* run `node <entry.js>` directly
|
|
33
|
-
*
|
|
34
|
-
*
|
|
42
|
+
* run `node <entry.js>` directly. Cursor's installer uses a PowerShell shim around a bundled
|
|
43
|
+
* `versions/<version>/node.exe + index.js`; that known layout is resolved directly too, without invoking
|
|
44
|
+
* cmd.exe or PowerShell. A native `.exe` (claude) resolves to itself. No-op on POSIX and for any command that
|
|
45
|
+
* is already a path or has an extension. Surfaced by codex/cursor-agent on Windows (#66).
|
|
35
46
|
*/
|
|
36
|
-
export declare function resolveSpawnCommand(cmd: string, args: readonly string[], env?: NodeJS.ProcessEnv): {
|
|
47
|
+
export declare function resolveSpawnCommand(cmd: string, args: readonly string[], env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): {
|
|
37
48
|
cmd: string;
|
|
38
49
|
args: string[];
|
|
39
50
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
export interface WindowsTreeKillCommand {
|
|
52
|
+
command: 'taskkill.exe';
|
|
53
|
+
args: ['/PID', string, '/T', '/F'];
|
|
54
|
+
}
|
|
55
|
+
export interface WindowsTreeKillChild {
|
|
56
|
+
once(event: 'error', listener: (error: Error) => void): this;
|
|
57
|
+
once(event: 'close', listener: (code: number | null) => void): this;
|
|
58
|
+
kill?(signal?: NodeJS.Signals | number): boolean;
|
|
59
|
+
}
|
|
60
|
+
export type WindowsTreeKillSpawn = (command: string, args: readonly string[], options: {
|
|
61
|
+
shell: false;
|
|
62
|
+
windowsHide: true;
|
|
63
|
+
stdio: 'ignore';
|
|
64
|
+
}) => WindowsTreeKillChild;
|
|
65
|
+
type WindowsProcessTreeKiller = (pid: number) => Promise<boolean>;
|
|
66
|
+
/** Build the shell-free taskkill invocation used for Windows process-tree termination. */
|
|
67
|
+
export declare function windowsTreeKillCommand(pid: number): WindowsTreeKillCommand;
|
|
68
|
+
/** Run taskkill and report whether Windows accepted the process-tree termination request. */
|
|
69
|
+
export declare function killWindowsProcessTree(pid: number, spawnCommand?: WindowsTreeKillSpawn, timeoutMs?: number): Promise<boolean>;
|
|
70
|
+
export interface SpawnCaptureOptions {
|
|
48
71
|
cwd: string;
|
|
49
72
|
timeoutMs: number;
|
|
50
73
|
input?: string;
|
|
51
74
|
env?: NodeJS.ProcessEnv;
|
|
52
|
-
|
|
75
|
+
signal?: AbortSignal;
|
|
76
|
+
/** Cleanup subprocesses can shield themselves from repeated SIGINT/SIGTERM instead of cancelling. */
|
|
77
|
+
processSignalMode?: 'cancel' | 'ignore';
|
|
78
|
+
/** Maximum retained bytes for each of stdout and stderr. The original byte count is still reported. */
|
|
79
|
+
maxOutputBytes?: number;
|
|
80
|
+
/** Stream stdout directly to a file when the complete artifact must outlive the subprocess. */
|
|
81
|
+
stdoutFile?: string;
|
|
82
|
+
/** Ownership hook fired only after an exclusive redirected stdout artifact is opened successfully. */
|
|
83
|
+
onStdoutFileOpened?: (path: string) => void;
|
|
84
|
+
/** Test seam for redirected stdout finalization; production callers should use the filesystem defaults. */
|
|
85
|
+
stdoutFileOps?: {
|
|
86
|
+
size(fd: number): number;
|
|
87
|
+
close(fd: number): void;
|
|
88
|
+
};
|
|
89
|
+
resolvePlatform?: NodeJS.Platform;
|
|
90
|
+
/** Test seam for Windows process behavior; production callers should use the default. */
|
|
91
|
+
processPlatform?: NodeJS.Platform;
|
|
92
|
+
/** Test seam for the shell-free Windows taskkill invocation. */
|
|
93
|
+
windowsProcessTreeKiller?: WindowsProcessTreeKiller;
|
|
94
|
+
}
|
|
95
|
+
export interface SpawnCaptureResult {
|
|
53
96
|
code: number | null;
|
|
54
97
|
stdout: string;
|
|
55
98
|
stderr: string;
|
|
56
|
-
|
|
99
|
+
termination: 'exit' | 'timeout' | 'cancelled';
|
|
100
|
+
/** Present on real spawn results; optional so injected legacy test seams remain source-compatible. */
|
|
101
|
+
stdoutBytes?: number;
|
|
102
|
+
stderrBytes?: number;
|
|
103
|
+
stdoutTruncated?: boolean;
|
|
104
|
+
stderrTruncated?: boolean;
|
|
105
|
+
stdoutRedirected?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/** A redirected stdout artifact could not be finalized; the subprocess outcome remains available for classification. */
|
|
108
|
+
export declare class SpawnCaptureFinalizeError extends Error {
|
|
109
|
+
readonly result: SpawnCaptureResult;
|
|
110
|
+
constructor(result: SpawnCaptureResult, cause?: unknown);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Promise wrapper over spawn (shell:false). Optionally writes `input` to stdin; resolves with stdout/exit.
|
|
114
|
+
* On timeout the WHOLE process group is killed, not just the direct child (finding #39.5): an agent spawns
|
|
115
|
+
* tool subprocesses (grandchildren) that would otherwise orphan and leak. On POSIX we spawn detached (the
|
|
116
|
+
* child becomes its own group leader) and SIGKILL the group via the negative pid. Windows runs
|
|
117
|
+
* `taskkill.exe /PID <pid> /T /F` without a shell and waits for that command before resolving.
|
|
118
|
+
*/
|
|
119
|
+
export declare function spawnCapture(cmd: string, args: readonly string[], opts: SpawnCaptureOptions): Promise<SpawnCaptureResult>;
|
|
120
|
+
/** Map the shared process result into the failure taxonomy used by plain-text runners. */
|
|
121
|
+
export declare function classifyBasicRunnerResult(runner: 'claude' | 'codex' | 'cursor', result: SpawnCaptureResult, timeoutMs: number): AgentRunResult;
|
|
57
122
|
/** Options for a built-in headless runner (claude / codex share the shape and the skip⇒bounded invariant). */
|
|
58
123
|
export interface AgentRunnerOptions {
|
|
59
124
|
/** Bypass permission prompts so the agent can edit autonomously (required for unattended use). Default off.
|
|
@@ -95,6 +160,12 @@ export declare const claudeHeadlessRunner: AgentRunner;
|
|
|
95
160
|
export declare function codexRunnerArgs(opts?: AgentRunnerOptions): string[];
|
|
96
161
|
/** Headless `codex exec` runner. Working root pinned with `--cd`; prompt is the trailing positional arg (shell:false). */
|
|
97
162
|
export declare function makeCodexHeadlessRunner(opts?: AgentRunnerOptions): AgentRunner;
|
|
163
|
+
/** Interpret one bounded Gemini subprocess result. Structured output and diagnostics require complete capture. */
|
|
164
|
+
export declare function classifyGeminiRunnerResult(result: SpawnCaptureResult, timeoutMs: number): AgentRunResult;
|
|
165
|
+
/** Build verified Gemini CLI argv. The prompt is appended separately as one argv element with shell:false. */
|
|
166
|
+
export declare function geminiRunnerArgs(opts?: AgentRunnerOptions): string[];
|
|
167
|
+
/** Headless Gemini runner with structured failure classification; stdout text alone never proves execution success. */
|
|
168
|
+
export declare function makeGeminiHeadlessRunner(opts?: AgentRunnerOptions): AgentRunner;
|
|
98
169
|
/**
|
|
99
170
|
* Build the `cursor-agent` argv (pure). Ground-truth from `cursor-agent --help` (#66): base `-p --output-format
|
|
100
171
|
* text` (headless, write+shell access). `--model` is a real flag. skipPermissions is rejected until Cursor has a
|
|
@@ -108,7 +179,7 @@ export declare function cursorRunnerArgs(opts?: AgentRunnerOptions): string[];
|
|
|
108
179
|
*/
|
|
109
180
|
export declare function makeCursorHeadlessRunner(opts?: AgentRunnerOptions, platform?: NodeJS.Platform): AgentRunner;
|
|
110
181
|
/** A built-in coding-agent harness (#66). cursor is a SCAFFOLD — its runner is unverified (see cursorRunnerArgs). */
|
|
111
|
-
export type RunnerName = 'claude' | 'codex' | 'cursor';
|
|
182
|
+
export type RunnerName = 'claude' | 'codex' | 'cursor' | 'gemini';
|
|
112
183
|
/** A harness runner: how to launch it + which env auth prefixes it (and ONLY it) may keep (#66). */
|
|
113
184
|
export interface AgentRunnerSpec {
|
|
114
185
|
name: RunnerName;
|
|
@@ -120,4 +191,5 @@ export interface AgentRunnerSpec {
|
|
|
120
191
|
};
|
|
121
192
|
}
|
|
122
193
|
/** Resolve a runner spec by name (default 'claude' — byte-identical to the pre-registry behavior). */
|
|
123
|
-
export declare function getRunnerSpec(name?: RunnerName): AgentRunnerSpec;
|
|
194
|
+
export declare function getRunnerSpec(name?: RunnerName): AgentRunnerSpec;
|
|
195
|
+
export {};
|