@prismatic-io/lux 0.0.2-preview.29 → 0.0.2-preview.30
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/lib/answerers/persona/index.d.ts +6 -0
- package/lib/answerers/persona/index.d.ts.map +1 -1
- package/lib/answerers/persona/index.js +5 -0
- package/lib/answerers/persona/index.js.map +1 -1
- package/lib/assertions/core/command-exits-zero.d.ts +2 -0
- package/lib/assertions/core/command-exits-zero.d.ts.map +1 -1
- package/lib/assertions/core/command-exits-zero.js +46 -4
- package/lib/assertions/core/command-exits-zero.js.map +1 -1
- package/lib/assertions/rubric/index.d.ts +16 -0
- package/lib/assertions/rubric/index.d.ts.map +1 -1
- package/lib/assertions/rubric/index.js +34 -3
- package/lib/assertions/rubric/index.js.map +1 -1
- package/lib/assertions/rubric/internal.d.ts +14 -0
- package/lib/assertions/rubric/internal.d.ts.map +1 -1
- package/lib/assertions/rubric/internal.js +122 -12
- package/lib/assertions/rubric/internal.js.map +1 -1
- package/lib/core/agent-environment.d.ts +5 -0
- package/lib/core/agent-environment.d.ts.map +1 -0
- package/lib/core/agent-environment.js +47 -0
- package/lib/core/agent-environment.js.map +1 -0
- package/lib/core/command-verification.d.ts +10 -0
- package/lib/core/command-verification.d.ts.map +1 -0
- package/lib/core/command-verification.js +66 -0
- package/lib/core/command-verification.js.map +1 -0
- package/lib/core/driver.d.ts +7 -0
- package/lib/core/driver.d.ts.map +1 -1
- package/lib/core/driver.js +2 -0
- package/lib/core/driver.js.map +1 -1
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -0
- package/lib/core/index.js.map +1 -1
- package/lib/core/model-cli.d.ts +5 -0
- package/lib/core/model-cli.d.ts.map +1 -1
- package/lib/core/model-cli.js +8 -2
- package/lib/core/model-cli.js.map +1 -1
- package/lib/core/run.d.ts +5 -0
- package/lib/core/run.d.ts.map +1 -1
- package/lib/core/secure-copy.d.ts.map +1 -0
- package/lib/core/secure-copy.js.map +1 -0
- package/lib/drivers/antigravity/config.d.ts +3 -0
- package/lib/drivers/antigravity/config.d.ts.map +1 -1
- package/lib/drivers/antigravity/config.js +2 -0
- package/lib/drivers/antigravity/config.js.map +1 -1
- package/lib/drivers/antigravity/index.d.ts +4 -0
- package/lib/drivers/antigravity/index.d.ts.map +1 -1
- package/lib/drivers/antigravity/runtime.d.ts.map +1 -1
- package/lib/drivers/antigravity/runtime.js +7 -2
- package/lib/drivers/antigravity/runtime.js.map +1 -1
- package/lib/drivers/claude-code/index.d.ts +18 -4
- package/lib/drivers/claude-code/index.d.ts.map +1 -1
- package/lib/drivers/claude-code/index.js +97 -200
- package/lib/drivers/claude-code/index.js.map +1 -1
- package/lib/drivers/claude-code/isolation.d.ts +8 -0
- package/lib/drivers/claude-code/isolation.d.ts.map +1 -0
- package/lib/drivers/claude-code/isolation.js +199 -0
- package/lib/drivers/claude-code/isolation.js.map +1 -0
- package/lib/drivers/codex/config.d.ts +3 -0
- package/lib/drivers/codex/config.d.ts.map +1 -1
- package/lib/drivers/codex/config.js +2 -0
- package/lib/drivers/codex/config.js.map +1 -1
- package/lib/drivers/codex/index.d.ts +4 -0
- package/lib/drivers/codex/index.d.ts.map +1 -1
- package/lib/drivers/codex/index.js +52 -24
- package/lib/drivers/codex/index.js.map +1 -1
- package/lib/drivers/copilot/config.d.ts +3 -0
- package/lib/drivers/copilot/config.d.ts.map +1 -1
- package/lib/drivers/copilot/config.js +2 -0
- package/lib/drivers/copilot/config.js.map +1 -1
- package/lib/drivers/copilot/index.d.ts +4 -0
- package/lib/drivers/copilot/index.d.ts.map +1 -1
- package/lib/drivers/copilot/index.js +2 -1
- package/lib/drivers/copilot/index.js.map +1 -1
- package/lib/drivers/cursor/config.d.ts +1 -0
- package/lib/drivers/cursor/config.d.ts.map +1 -1
- package/lib/drivers/cursor/config.js +2 -0
- package/lib/drivers/cursor/config.js.map +1 -1
- package/lib/drivers/cursor/index.d.ts +2 -0
- package/lib/drivers/cursor/index.d.ts.map +1 -1
- package/lib/drivers/cursor/index.js +2 -1
- package/lib/drivers/cursor/index.js.map +1 -1
- package/lib/drivers/grok-build/config.d.ts +3 -0
- package/lib/drivers/grok-build/config.d.ts.map +1 -1
- package/lib/drivers/grok-build/config.js +2 -0
- package/lib/drivers/grok-build/config.js.map +1 -1
- package/lib/drivers/grok-build/index.d.ts +4 -0
- package/lib/drivers/grok-build/index.d.ts.map +1 -1
- package/lib/drivers/grok-build/index.js +2 -1
- package/lib/drivers/grok-build/index.js.map +1 -1
- package/lib/drivers/subprocess/index.d.ts +3 -3
- package/lib/drivers/subprocess/index.d.ts.map +1 -1
- package/lib/drivers/subprocess/index.js +5 -2
- package/lib/drivers/subprocess/index.js.map +1 -1
- package/lib/orchestrator/artifact-origin.d.ts +3 -0
- package/lib/orchestrator/artifact-origin.d.ts.map +1 -0
- package/lib/orchestrator/artifact-origin.js +40 -0
- package/lib/orchestrator/artifact-origin.js.map +1 -0
- package/lib/orchestrator/config.d.ts +6 -0
- package/lib/orchestrator/config.d.ts.map +1 -1
- package/lib/orchestrator/experiment-context.d.ts +2 -0
- package/lib/orchestrator/experiment-context.d.ts.map +1 -1
- package/lib/orchestrator/experiment-corpus.d.ts.map +1 -1
- package/lib/orchestrator/experiment-corpus.js +2 -2
- package/lib/orchestrator/experiment-corpus.js.map +1 -1
- package/lib/orchestrator/experiment-identity.d.ts.map +1 -1
- package/lib/orchestrator/experiment-identity.js +4 -4
- package/lib/orchestrator/experiment-identity.js.map +1 -1
- package/lib/orchestrator/fixture-identity.d.ts +1 -0
- package/lib/orchestrator/fixture-identity.d.ts.map +1 -1
- package/lib/orchestrator/fixture-identity.js +6 -1
- package/lib/orchestrator/fixture-identity.js.map +1 -1
- package/lib/orchestrator/orchestrator.d.ts.map +1 -1
- package/lib/orchestrator/orchestrator.js +2 -2
- package/lib/orchestrator/orchestrator.js.map +1 -1
- package/lib/orchestrator/run-execution.d.ts.map +1 -1
- package/lib/orchestrator/run-execution.js +14 -3
- package/lib/orchestrator/run-execution.js.map +1 -1
- package/package.json +1 -1
- package/skills/lux-answerer/SKILL.md +1 -1
- package/src/answerers/persona/index.ts +5 -0
- package/src/assertions/core/command-exits-zero.ts +57 -4
- package/src/assertions/rubric/index.ts +38 -3
- package/src/assertions/rubric/internal.ts +172 -11
- package/src/core/agent-environment.ts +64 -0
- package/src/core/command-verification.ts +74 -0
- package/src/core/driver.ts +4 -0
- package/src/core/index.ts +2 -0
- package/src/core/model-cli.ts +14 -2
- package/src/drivers/antigravity/config.ts +2 -0
- package/src/drivers/antigravity/runtime.ts +8 -2
- package/src/drivers/claude-code/index.ts +112 -221
- package/src/drivers/claude-code/isolation.ts +228 -0
- package/src/drivers/codex/config.ts +2 -0
- package/src/drivers/codex/index.ts +71 -31
- package/src/drivers/copilot/config.ts +2 -0
- package/src/drivers/copilot/index.ts +2 -1
- package/src/drivers/cursor/config.ts +2 -0
- package/src/drivers/cursor/index.ts +2 -1
- package/src/drivers/grok-build/config.ts +2 -0
- package/src/drivers/grok-build/index.ts +2 -1
- package/src/drivers/subprocess/index.ts +5 -2
- package/src/orchestrator/artifact-origin.ts +50 -0
- package/src/orchestrator/experiment-corpus.ts +10 -7
- package/src/orchestrator/experiment-identity.ts +16 -13
- package/src/orchestrator/fixture-identity.ts +9 -1
- package/src/orchestrator/orchestrator.ts +12 -6
- package/src/orchestrator/run-execution.ts +21 -4
- package/lib/drivers/shared/secure-copy.d.ts.map +0 -1
- package/lib/drivers/shared/secure-copy.js.map +0 -1
- /package/lib/{drivers/shared → core}/secure-copy.d.ts +0 -0
- /package/lib/{drivers/shared → core}/secure-copy.js +0 -0
- /package/src/{drivers/shared → core}/secure-copy.ts +0 -0
|
@@ -5,6 +5,7 @@ import { contentHash, type FixturesRef, valueHash } from "../core/index.js";
|
|
|
5
5
|
export type FixtureIdentity = {
|
|
6
6
|
rootDir: string;
|
|
7
7
|
hash: string;
|
|
8
|
+
fileHashes: ReadonlyMap<string, string>;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const fixtureEntries = async (
|
|
@@ -63,5 +64,12 @@ export const fixtureIdentity = async (
|
|
|
63
64
|
if (metadata.isSymbolicLink() || !metadata.isDirectory()) {
|
|
64
65
|
throw new Error(`fixtures: expected a real directory: ${rootDir}`);
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
+
const entries = await fixtureEntries(rootDir);
|
|
68
|
+
return {
|
|
69
|
+
rootDir,
|
|
70
|
+
hash: valueHash(entries),
|
|
71
|
+
fileHashes: new Map(
|
|
72
|
+
entries.flatMap((entry) => (entry.hash === undefined ? [] : [[entry.path, entry.hash]])),
|
|
73
|
+
),
|
|
74
|
+
};
|
|
67
75
|
};
|
|
@@ -358,13 +358,19 @@ export class Orchestrator {
|
|
|
358
358
|
registry,
|
|
359
359
|
);
|
|
360
360
|
|
|
361
|
-
const driverRef =
|
|
361
|
+
const driverRef = bindSubjectRoot(
|
|
362
|
+
resolveDriverReference(evalCase, this.defaultDriver, request.driver),
|
|
363
|
+
request.subjectRoot,
|
|
364
|
+
);
|
|
362
365
|
const driverName = driverNameOf(driverRef);
|
|
363
|
-
const answererRef =
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
const answererRef = bindSubjectRoot(
|
|
367
|
+
resolveAnswererReference(
|
|
368
|
+
evalCase,
|
|
369
|
+
this.defaultAnswerer,
|
|
370
|
+
this.harness,
|
|
371
|
+
request.answererOverride,
|
|
372
|
+
),
|
|
373
|
+
request.subjectRoot,
|
|
368
374
|
);
|
|
369
375
|
const answererName = answererNameOf(answererRef);
|
|
370
376
|
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
type AnswerHistoryEntry,
|
|
13
13
|
type Artifact,
|
|
14
14
|
actionTiming,
|
|
15
|
+
bindRunExecutionWorkspace,
|
|
15
16
|
type EvalCase,
|
|
16
17
|
emptyUsage,
|
|
17
18
|
type FixturesRef,
|
|
@@ -38,6 +39,7 @@ import {
|
|
|
38
39
|
TokenUsageSchema,
|
|
39
40
|
valueHash,
|
|
40
41
|
} from "../core/index.js";
|
|
42
|
+
import { identifyArtifactOrigins } from "./artifact-origin.js";
|
|
41
43
|
import {
|
|
42
44
|
createDriverSession,
|
|
43
45
|
type DriverSession,
|
|
@@ -115,7 +117,9 @@ const readAnswererUsage = (answerer: Answerer): TokenUsage =>
|
|
|
115
117
|
const stageFixtures = async (
|
|
116
118
|
ref: FixturesRef | undefined,
|
|
117
119
|
options: { fixturesRoot?: string; casePath: string; artifactsDir: string },
|
|
118
|
-
): Promise<
|
|
120
|
+
): Promise<
|
|
121
|
+
{ fixtures: ResolvedFixtures; hash: string; fileHashes: ReadonlyMap<string, string> } | undefined
|
|
122
|
+
> => {
|
|
119
123
|
if (!ref) return undefined;
|
|
120
124
|
const path = typeof ref === "string" ? ref : ref.path;
|
|
121
125
|
if (!isAbsolute(path) && !options.fixturesRoot && options.casePath === INLINE_CASE_PATH) {
|
|
@@ -130,7 +134,11 @@ const stageFixtures = async (
|
|
|
130
134
|
if (staged.hash !== source.hash) {
|
|
131
135
|
throw new Error(`fixtures: tree changed while staging: ${source.rootDir}`);
|
|
132
136
|
}
|
|
133
|
-
return {
|
|
137
|
+
return {
|
|
138
|
+
fixtures: { rootDir: source.rootDir },
|
|
139
|
+
hash: staged.hash,
|
|
140
|
+
fileHashes: staged.fileHashes,
|
|
141
|
+
};
|
|
134
142
|
};
|
|
135
143
|
|
|
136
144
|
export const runDirOfError = (error: unknown): string | null =>
|
|
@@ -308,6 +316,7 @@ class RunExecution implements RunLifecycleEffects<RunResult> {
|
|
|
308
316
|
private loop: DriverSession | undefined;
|
|
309
317
|
private ready: ReadyState | undefined;
|
|
310
318
|
private fixturesHash: string | undefined;
|
|
319
|
+
private fixtureFileHashes: ReadonlyMap<string, string> = new Map();
|
|
311
320
|
private startAttempted = false;
|
|
312
321
|
private loopOutcome: DriverSessionOutcome | undefined;
|
|
313
322
|
private collection: Collection = { artifacts: [] };
|
|
@@ -378,6 +387,7 @@ class RunExecution implements RunLifecycleEffects<RunResult> {
|
|
|
378
387
|
artifactsDir: this.workspace.path,
|
|
379
388
|
});
|
|
380
389
|
this.fixturesHash = staged?.hash;
|
|
390
|
+
this.fixtureFileHashes = staged?.fileHashes ?? new Map();
|
|
381
391
|
if (request.abortSignal?.aborted) return;
|
|
382
392
|
|
|
383
393
|
this.lifecycle("start-driver");
|
|
@@ -437,6 +447,8 @@ class RunExecution implements RunLifecycleEffects<RunResult> {
|
|
|
437
447
|
this.metadata = completed.metadata;
|
|
438
448
|
this.usage = completed.usage;
|
|
439
449
|
this.run = completed.run;
|
|
450
|
+
const executionWorkspace = await this.args.driver.verificationWorkspace?.();
|
|
451
|
+
if (executionWorkspace) bindRunExecutionWorkspace(this.run, executionWorkspace);
|
|
440
452
|
await writeFrozenCase(this.runDir.path, this.args.authoredCase, this.args.casePath);
|
|
441
453
|
await this.runDir.writeJson("run.json", completed.metadata);
|
|
442
454
|
await this.runDir.writeJson("artifacts.json", this.collection.artifacts);
|
|
@@ -577,9 +589,14 @@ class RunExecution implements RunLifecycleEffects<RunResult> {
|
|
|
577
589
|
try {
|
|
578
590
|
await this.args.driver.quiesce?.();
|
|
579
591
|
const artifacts = await this.args.driver.collect();
|
|
592
|
+
const archived =
|
|
593
|
+
(await this.workspace?.archive(this.runDir.artifactsDir, artifacts)) ?? artifacts;
|
|
580
594
|
return {
|
|
581
|
-
artifacts:
|
|
582
|
-
|
|
595
|
+
artifacts: await identifyArtifactOrigins(
|
|
596
|
+
this.runDir.path,
|
|
597
|
+
archived,
|
|
598
|
+
this.fixtureFileHashes,
|
|
599
|
+
),
|
|
583
600
|
};
|
|
584
601
|
} catch (error) {
|
|
585
602
|
const reason = errorMessage(error);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secure-copy.d.ts","sourceRoot":"","sources":["../../../src/drivers/shared/secure-copy.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,uBAAuB,e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