@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
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const InheritEnvironmentSchema = z.union([z.array(z.string().min(1)), z.literal(true)]);
|
|
4
|
+
export type InheritEnvironment = z.infer<typeof InheritEnvironmentSchema>;
|
|
5
|
+
|
|
6
|
+
const nativeEnvironment = new Set([
|
|
7
|
+
"PATH",
|
|
8
|
+
"HOME",
|
|
9
|
+
"USER",
|
|
10
|
+
"LOGNAME",
|
|
11
|
+
"SHELL",
|
|
12
|
+
"TMPDIR",
|
|
13
|
+
"TMP",
|
|
14
|
+
"TEMP",
|
|
15
|
+
"LANG",
|
|
16
|
+
"LANGUAGE",
|
|
17
|
+
"TERM",
|
|
18
|
+
"COLORTERM",
|
|
19
|
+
"NO_COLOR",
|
|
20
|
+
"FORCE_COLOR",
|
|
21
|
+
"CI",
|
|
22
|
+
"TZ",
|
|
23
|
+
"XDG_CONFIG_HOME",
|
|
24
|
+
"XDG_DATA_HOME",
|
|
25
|
+
"XDG_CACHE_HOME",
|
|
26
|
+
"XDG_STATE_HOME",
|
|
27
|
+
"CODEX_HOME",
|
|
28
|
+
"CLAUDE_CONFIG_DIR",
|
|
29
|
+
"CLAUDE_SECURESTORAGE_CONFIG_DIR",
|
|
30
|
+
"GROK_HOME",
|
|
31
|
+
"SYSTEMROOT",
|
|
32
|
+
"WINDIR",
|
|
33
|
+
"COMSPEC",
|
|
34
|
+
"PATHEXT",
|
|
35
|
+
"APPDATA",
|
|
36
|
+
"LOCALAPPDATA",
|
|
37
|
+
"USERPROFILE",
|
|
38
|
+
"HOMEDRIVE",
|
|
39
|
+
"HOMEPATH",
|
|
40
|
+
"USERNAME",
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
export const agentEnvironment = (
|
|
44
|
+
parent: NodeJS.ProcessEnv,
|
|
45
|
+
inherit: InheritEnvironment = true,
|
|
46
|
+
overrides?: NodeJS.ProcessEnv,
|
|
47
|
+
): Record<string, string> => {
|
|
48
|
+
const selected =
|
|
49
|
+
inherit === true
|
|
50
|
+
? { ...parent }
|
|
51
|
+
: Object.fromEntries(
|
|
52
|
+
Object.entries(parent).filter(
|
|
53
|
+
([name]) =>
|
|
54
|
+
nativeEnvironment.has(name.toUpperCase()) ||
|
|
55
|
+
name.startsWith("LC_") ||
|
|
56
|
+
inherit.includes(name),
|
|
57
|
+
),
|
|
58
|
+
);
|
|
59
|
+
return Object.fromEntries(
|
|
60
|
+
Object.entries({ ...selected, ...overrides }).filter(
|
|
61
|
+
(entry): entry is [string, string] => entry[1] !== undefined,
|
|
62
|
+
),
|
|
63
|
+
);
|
|
64
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { chmod, lstat, mkdir, mkdtemp, readdir, realpath, rm, symlink } from "node:fs/promises";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
import type { Run } from "./run.js";
|
|
5
|
+
import { copyRegularFileNoFollow } from "./secure-copy.js";
|
|
6
|
+
|
|
7
|
+
const executionWorkspaces = new WeakMap<Run, string>();
|
|
8
|
+
|
|
9
|
+
/** Internal: live execution state is deliberately absent from persisted run evidence. */
|
|
10
|
+
export const bindRunExecutionWorkspace = (run: Run, root: string): void => {
|
|
11
|
+
executionWorkspaces.set(run, resolve(root));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const runExecutionWorkspace = (run: Run): string | undefined => executionWorkspaces.get(run);
|
|
15
|
+
|
|
16
|
+
const within = (root: string, path: string): boolean => {
|
|
17
|
+
const rel = relative(root, path);
|
|
18
|
+
return rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** A disposable command tree preserves dependencies without exposing host symlink targets. */
|
|
22
|
+
export const copyCommandWorkspace = async (
|
|
23
|
+
source: string,
|
|
24
|
+
signal?: AbortSignal,
|
|
25
|
+
): Promise<{
|
|
26
|
+
root: string;
|
|
27
|
+
close: () => Promise<void>;
|
|
28
|
+
}> => {
|
|
29
|
+
const sourceRoot = await realpath(source);
|
|
30
|
+
if (!(await lstat(source)).isDirectory() || (await lstat(source)).isSymbolicLink()) {
|
|
31
|
+
throw new Error(`verification workspace must be a real directory: ${source}`);
|
|
32
|
+
}
|
|
33
|
+
const root = await mkdtemp(join(tmpdir(), "lux-command-verification-"));
|
|
34
|
+
const close = () => rm(root, { recursive: true, force: true });
|
|
35
|
+
let entries = 0;
|
|
36
|
+
const copy = async (directory: string): Promise<void> => {
|
|
37
|
+
if (!within(sourceRoot, await realpath(directory))) {
|
|
38
|
+
throw new Error(`verification directory escapes its workspace: ${directory}`);
|
|
39
|
+
}
|
|
40
|
+
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
|
41
|
+
signal?.throwIfAborted();
|
|
42
|
+
if (++entries > 100_000) throw new Error("verification workspace exceeds 100000 entries");
|
|
43
|
+
if (directory === sourceRoot && entry.name === ".lux-claude") continue;
|
|
44
|
+
const path = join(directory, entry.name);
|
|
45
|
+
const target = join(root, relative(sourceRoot, path));
|
|
46
|
+
const metadata = await lstat(path);
|
|
47
|
+
if (metadata.isSymbolicLink()) {
|
|
48
|
+
const resolved = await realpath(path);
|
|
49
|
+
if (!within(sourceRoot, resolved)) {
|
|
50
|
+
throw new Error(`verification symlink escapes its workspace: ${path}`);
|
|
51
|
+
}
|
|
52
|
+
await symlink(
|
|
53
|
+
relative(dirname(target), join(root, relative(sourceRoot, resolved))),
|
|
54
|
+
target,
|
|
55
|
+
);
|
|
56
|
+
} else if (metadata.isDirectory()) {
|
|
57
|
+
await mkdir(target, { mode: (metadata.mode & 0o777) | 0o700 });
|
|
58
|
+
await copy(path);
|
|
59
|
+
await chmod(target, metadata.mode & 0o777);
|
|
60
|
+
} else if (metadata.isFile()) {
|
|
61
|
+
await copyRegularFileNoFollow(sourceRoot, path, target);
|
|
62
|
+
} else {
|
|
63
|
+
throw new Error(`verification workspace contains an unsupported entry: ${path}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
try {
|
|
68
|
+
await copy(sourceRoot);
|
|
69
|
+
return { root, close };
|
|
70
|
+
} catch (error) {
|
|
71
|
+
await close();
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
};
|
package/src/core/driver.ts
CHANGED
|
@@ -13,6 +13,8 @@ export const ArtifactSchema = z.object({
|
|
|
13
13
|
* Consumers resolve `path` against this before falling back to the default.
|
|
14
14
|
*/
|
|
15
15
|
root: z.exactOptional(z.string()),
|
|
16
|
+
/** Assigned by Lux against fixture bytes frozen before the subject starts. */
|
|
17
|
+
origin: z.exactOptional(z.enum(["generated", "modified", "fixture"])),
|
|
16
18
|
contentType: z.exactOptional(z.string()),
|
|
17
19
|
size: z.exactOptional(z.number()),
|
|
18
20
|
meta: z.exactOptional(z.record(z.string(), z.unknown())),
|
|
@@ -72,6 +74,8 @@ export interface AgentDriver {
|
|
|
72
74
|
* responsible for stopping background writers before this promise resolves.
|
|
73
75
|
*/
|
|
74
76
|
collect(): Promise<Artifact[]>;
|
|
77
|
+
/** Optional quiesced full execution tree for private command verification, until close. */
|
|
78
|
+
verificationWorkspace?(): Promise<string | undefined>;
|
|
75
79
|
close(): Promise<void>;
|
|
76
80
|
}
|
|
77
81
|
|
package/src/core/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./action-events.js";
|
|
2
2
|
export * from "./agent-activity.js";
|
|
3
|
+
export * from "./agent-environment.js";
|
|
3
4
|
export * from "./agent-events.js";
|
|
4
5
|
export * from "./annotation.js";
|
|
5
6
|
export * from "./answerer.js";
|
|
@@ -7,6 +8,7 @@ export * from "./artifact-evidence.js";
|
|
|
7
8
|
export * from "./artifact-snapshot.js";
|
|
8
9
|
export * from "./assertion.js";
|
|
9
10
|
export * from "./case.js";
|
|
11
|
+
export * from "./command-verification.js";
|
|
10
12
|
export * from "./conversation-turn.js";
|
|
11
13
|
export * from "./driver.js";
|
|
12
14
|
export * from "./driver-metrics.js";
|
package/src/core/model-cli.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { rm } from "node:fs/promises";
|
|
2
2
|
import { temporaryDirectory } from "tempy";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
import {
|
|
5
|
+
agentEnvironment,
|
|
6
|
+
type InheritEnvironment,
|
|
7
|
+
InheritEnvironmentSchema,
|
|
8
|
+
} from "./agent-environment.js";
|
|
4
9
|
import { exec } from "./exec.js";
|
|
5
10
|
import {
|
|
6
11
|
defaultCatalogEffort,
|
|
@@ -62,6 +67,8 @@ export const HarnessModelConfigSchema = z
|
|
|
62
67
|
provider: ModelCliProviderSchema,
|
|
63
68
|
model: z.string().min(1),
|
|
64
69
|
command: z.string().optional(),
|
|
70
|
+
inheritEnv: InheritEnvironmentSchema.optional(),
|
|
71
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
65
72
|
reasoningEffort: ReasoningEffortSchema.optional(),
|
|
66
73
|
})
|
|
67
74
|
.strict()
|
|
@@ -93,6 +100,8 @@ export const mergeHarnessModelConfig = (
|
|
|
93
100
|
|
|
94
101
|
export type ModelCliOptions = {
|
|
95
102
|
provider: ModelCliProvider;
|
|
103
|
+
inheritEnv?: InheritEnvironment | undefined;
|
|
104
|
+
env?: Record<string, string> | undefined;
|
|
96
105
|
command?: string | undefined;
|
|
97
106
|
model?: string | undefined;
|
|
98
107
|
reasoningEffort?: ReasoningEffort | undefined;
|
|
@@ -169,7 +178,9 @@ const runClaude = async (
|
|
|
169
178
|
// empty value disables user/project/local settings for this one-shot.
|
|
170
179
|
"--setting-sources",
|
|
171
180
|
"",
|
|
172
|
-
...(process.env.
|
|
181
|
+
...(agentEnvironment(process.env, options.inheritEnv, options.env).ANTHROPIC_API_KEY
|
|
182
|
+
? ["--bare"]
|
|
183
|
+
: []),
|
|
173
184
|
"--settings",
|
|
174
185
|
JSON.stringify({ disableAllHooks: true }),
|
|
175
186
|
"--system-prompt",
|
|
@@ -180,7 +191,7 @@ const runClaude = async (
|
|
|
180
191
|
timeoutMs: options.timeoutMs,
|
|
181
192
|
cwd: workspace,
|
|
182
193
|
env: {
|
|
183
|
-
...process.env,
|
|
194
|
+
...agentEnvironment(process.env, options.inheritEnv, options.env),
|
|
184
195
|
CLAUDE_CODE_DISABLE_AUTO_MEMORY: "1",
|
|
185
196
|
CLAUDE_CODE_DISABLE_CLAUDE_MDS: "1",
|
|
186
197
|
CLAUDE_CODE_SKIP_PROMPT_HISTORY: "1",
|
|
@@ -252,6 +263,7 @@ const runCodex = async (
|
|
|
252
263
|
input,
|
|
253
264
|
timeoutMs: options.timeoutMs,
|
|
254
265
|
cwd: modelCwd,
|
|
266
|
+
env: agentEnvironment(process.env, options.inheritEnv, options.env),
|
|
255
267
|
...(options.signal ? { signal: options.signal } : {}),
|
|
256
268
|
});
|
|
257
269
|
if (result.timedOut) throw new Error(`model call timed out after ${options.timeoutMs}ms`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { InheritEnvironmentSchema } from "../../core/agent-environment.js";
|
|
2
3
|
import { DurationSchema } from "../../core/duration.js";
|
|
3
4
|
import { antigravityCatalog, applyCatalogEffort } from "../../core/index.js";
|
|
4
5
|
|
|
@@ -37,6 +38,7 @@ export const AntigravityDriverConfigSchema = z
|
|
|
37
38
|
reuseKeychain: z.boolean().default(false),
|
|
38
39
|
cwd: z.string().optional(),
|
|
39
40
|
env: z.record(z.string(), z.string()).optional(),
|
|
41
|
+
inheritEnv: InheritEnvironmentSchema.optional(),
|
|
40
42
|
extraArgs: z.array(z.string()).optional(),
|
|
41
43
|
idleTimeout: DurationSchema.default("10 minutes"),
|
|
42
44
|
maxLineBytes: z.number().positive().default(10_000_000),
|
|
@@ -2,6 +2,7 @@ import { chmod, copyFile, mkdir, readFile, rm, writeFile } from "node:fs/promise
|
|
|
2
2
|
import { homedir, platform } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { temporaryDirectory } from "tempy";
|
|
5
|
+
import { agentEnvironment } from "../../core/agent-environment.js";
|
|
5
6
|
import { exec } from "../../core/exec.js";
|
|
6
7
|
import { captureAntigravityArtifacts } from "./artifacts.js";
|
|
7
8
|
import type { AntigravityDriverConfig } from "./config.js";
|
|
@@ -16,7 +17,10 @@ export const prepareAntigravityRuntime = async (
|
|
|
16
17
|
}> => {
|
|
17
18
|
if (config.permissionMode === "inherit")
|
|
18
19
|
return {
|
|
19
|
-
env:
|
|
20
|
+
env:
|
|
21
|
+
config.inheritEnv === undefined
|
|
22
|
+
? config.env
|
|
23
|
+
: agentEnvironment(process.env, config.inheritEnv, config.env),
|
|
20
24
|
collect: async (destination) => {
|
|
21
25
|
if (isolatedHome) await captureAntigravityArtifacts(isolatedHome, destination);
|
|
22
26
|
},
|
|
@@ -74,7 +78,9 @@ export const prepareAntigravityRuntime = async (
|
|
|
74
78
|
}
|
|
75
79
|
return {
|
|
76
80
|
env: {
|
|
77
|
-
...config.
|
|
81
|
+
...(config.inheritEnv === undefined
|
|
82
|
+
? config.env
|
|
83
|
+
: agentEnvironment(process.env, config.inheritEnv, config.env)),
|
|
78
84
|
HOME: runtimeHome,
|
|
79
85
|
...(process.platform === "win32" ? { USERPROFILE: runtimeHome } : {}),
|
|
80
86
|
},
|