negotium 0.2.2 → 0.2.4
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/agent-helpers.js +3117 -2915
- package/dist/agent-helpers.js.map +38 -37
- package/dist/background-bash.js.map +1 -1
- package/dist/browser-runtime.js +137 -21
- package/dist/browser-runtime.js.map +10 -9
- package/dist/{chunk-kc5kmr95.js → chunk-1s9ryz8g.js} +1195 -21
- package/dist/chunk-1s9ryz8g.js.map +35 -0
- package/dist/hosted-agent.js +60 -48
- package/dist/hosted-agent.js.map +10 -10
- package/dist/main.js +3038 -3357
- package/dist/main.js.map +35 -35
- package/dist/mcp-factories.js +6227 -6021
- package/dist/mcp-factories.js.map +40 -39
- package/dist/prompts.js.map +1 -1
- package/dist/query-runtime.js +22 -2
- package/dist/query-runtime.js.map +4 -4
- package/dist/registry.js +169 -213
- package/dist/registry.js.map +8 -9
- package/dist/rollout.js +1 -1
- package/dist/runtime/src/agents/codex-app-server.ts +136 -0
- package/dist/runtime/src/agents/codex-native-multi-agent.ts +1 -1
- package/dist/runtime/src/agents/codex-provider.ts +21 -11
- package/dist/runtime/src/agents/codex-registry.ts +9 -17
- package/dist/runtime/src/agents/contracts.ts +2 -0
- package/dist/runtime/src/agents/execution-host.ts +6 -0
- package/dist/runtime/src/agents/fork.ts +24 -18
- package/dist/runtime/src/agents/idle-archiver.ts +7 -2
- package/dist/runtime/src/agents/index.ts +2 -1
- package/dist/runtime/src/agents/maestro-registry.ts +26 -7
- package/dist/runtime/src/agents/memory-archive-policy.ts +20 -0
- package/dist/runtime/src/agents/rollout/codex.ts +6 -5
- package/dist/runtime/src/agents/rollout/shared.ts +3 -5
- package/dist/runtime/src/mcp/factories/session-comm.ts +12 -0
- package/dist/runtime/src/mcp/session-comm/default-host.ts +16 -0
- package/dist/runtime/src/mcp/session-comm/server.ts +25 -0
- package/dist/runtime/src/platform/config.ts +4 -1
- package/dist/runtime/src/platform/playwright/manager.ts +57 -1
- package/dist/runtime/src/platform/playwright/profile-management.ts +33 -0
- package/dist/runtime/src/platform/playwright/public-runtime.ts +5 -0
- package/dist/runtime/src/platform/playwright/vault-broker.ts +9 -10
- package/dist/runtime/src/storage/browser-profiles.ts +35 -10
- package/dist/runtime/src/storage/storage-host.ts +31 -5
- package/dist/runtime/src/storage/vault.ts +30 -2
- package/dist/runtime/src/topics/derive.ts +38 -2
- package/dist/runtime/src/topics/lifecycle.ts +12 -2
- package/dist/runtime/src/version.ts +1 -1
- package/dist/runtime-helpers.js +22 -2
- package/dist/runtime-helpers.js.map +4 -4
- package/dist/storage.js +22 -2
- package/dist/storage.js.map +4 -4
- package/dist/types/packages/core/src/agents/codex-app-server.d.ts +13 -0
- package/dist/types/packages/core/src/agents/codex-native-multi-agent.d.ts +1 -0
- package/dist/types/packages/core/src/agents/contracts.d.ts +2 -0
- package/dist/types/packages/core/src/agents/execution-host.d.ts +2 -0
- package/dist/types/packages/core/src/agents/fork.d.ts +8 -7
- package/dist/types/packages/core/src/agents/memory-archive-policy.d.ts +10 -0
- package/dist/types/packages/core/src/agents/rollout/codex.d.ts +4 -2
- package/dist/types/packages/core/src/mcp/factories/session-comm.d.ts +1 -0
- package/dist/types/packages/core/src/platform/playwright/manager.d.ts +15 -0
- package/dist/types/packages/core/src/platform/playwright/profile-management.d.ts +8 -0
- package/dist/types/packages/core/src/platform/playwright/public-runtime.d.ts +2 -1
- package/dist/types/packages/core/src/storage/browser-profiles.d.ts +3 -1
- package/dist/types/packages/core/src/storage/storage-host.d.ts +1 -0
- package/dist/types/packages/core/src/storage/vault.d.ts +8 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/dist/vault.js +19 -3
- package/dist/vault.js.map +4 -4
- package/package.json +2 -2
- package/dist/chunk-kc5kmr95.js.map +0 -19
- package/dist/runtime/src/migration/single-user.ts +0 -805
package/dist/hosted-agent.js
CHANGED
|
@@ -11,8 +11,7 @@ import { existsSync as existsSync2, readFileSync as readFileSync3 } from "fs";
|
|
|
11
11
|
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
12
12
|
|
|
13
13
|
// ../../packages/core/src/agents/rollout/shared.ts
|
|
14
|
-
import {
|
|
15
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
14
|
+
import { resolve as resolve2 } from "path";
|
|
16
15
|
|
|
17
16
|
// ../../packages/core/src/platform/config.ts
|
|
18
17
|
import { execFileSync } from "child_process";
|
|
@@ -302,18 +301,17 @@ var PDFTOTEXT_BIN = envText("PDFTOTEXT_BIN") ?? "pdftotext";
|
|
|
302
301
|
var _envMaxTellDepth = Number.parseInt(process.env.MAX_TELL_DEPTH ?? "", 10);
|
|
303
302
|
var MAX_TELL_DEPTH = Number.isInteger(_envMaxTellDepth) && _envMaxTellDepth > 0 ? _envMaxTellDepth : 20;
|
|
304
303
|
function codexAuthFilePath() {
|
|
305
|
-
return process.env.NEGOTIUM_CODEX_AUTH_FILE || join(homedir(), ".codex", "auth.json");
|
|
304
|
+
return process.env.NEGOTIUM_CODEX_AUTH_FILE || join(process.env.CODEX_HOME || join(homedir(), ".codex"), "auth.json");
|
|
306
305
|
}
|
|
307
306
|
|
|
308
307
|
// ../../packages/core/src/agents/rollout/shared.ts
|
|
309
|
-
var __dirname2 = dirname2(fileURLToPath2(import.meta.url));
|
|
310
308
|
var trustedWorkspaceRoots = [
|
|
311
309
|
WORKSPACE_DIR,
|
|
312
310
|
DM_WORKSPACE_DIR,
|
|
313
311
|
SESSION_WORKSPACE_DIR,
|
|
314
312
|
TOPIC_WORKSPACE_DIR
|
|
315
313
|
].map((root) => resolve2(root));
|
|
316
|
-
var FIXTURES_DIR =
|
|
314
|
+
var FIXTURES_DIR = resolve2(PROJECT_ROOT, "src", "agents", "fixtures");
|
|
317
315
|
|
|
318
316
|
// ../../packages/core/src/platform/jsonl.ts
|
|
319
317
|
import {
|
|
@@ -328,7 +326,7 @@ import {
|
|
|
328
326
|
unlinkSync as unlinkSync2,
|
|
329
327
|
writeFileSync as writeFileSync2
|
|
330
328
|
} from "fs";
|
|
331
|
-
import { dirname as
|
|
329
|
+
import { dirname as dirname2 } from "path";
|
|
332
330
|
|
|
333
331
|
// ../../packages/core/src/platform/file-utils.ts
|
|
334
332
|
import { unlinkSync } from "fs";
|
|
@@ -356,7 +354,7 @@ function parseJsonlText(raw) {
|
|
|
356
354
|
}
|
|
357
355
|
var LOCK_SLEEP = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));
|
|
358
356
|
function writeJsonlFile(filePath, entries) {
|
|
359
|
-
const dir =
|
|
357
|
+
const dir = dirname2(filePath);
|
|
360
358
|
mkdirSync2(dir, { recursive: true });
|
|
361
359
|
const tmpPath = `${filePath}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
362
360
|
const payload = `${entries.map((e) => JSON.stringify(e)).join(`
|
|
@@ -442,6 +440,7 @@ function deepMapStrings(value, fn) {
|
|
|
442
440
|
|
|
443
441
|
// ../../packages/core/src/agents/execution-host.ts
|
|
444
442
|
import { AsyncLocalStorage } from "async_hooks";
|
|
443
|
+
import { dirname as dirname3 } from "path";
|
|
445
444
|
|
|
446
445
|
// ../../packages/core/src/security/sensitive-path.ts
|
|
447
446
|
import { realpathSync } from "fs";
|
|
@@ -1317,7 +1316,7 @@ function getMcpServersForQuery(opts) {
|
|
|
1317
1316
|
|
|
1318
1317
|
// ../../packages/core/src/storage/vault.ts
|
|
1319
1318
|
import { chmodSync as chmodSync2, mkdirSync as mkdirSync3 } from "fs";
|
|
1320
|
-
import { join as
|
|
1319
|
+
import { join as join2 } from "path";
|
|
1321
1320
|
|
|
1322
1321
|
// ../../packages/core/src/storage/sqlite.ts
|
|
1323
1322
|
var isBun = typeof process.versions.bun === "string";
|
|
@@ -1459,8 +1458,8 @@ function initializeVaultDatabase(database) {
|
|
|
1459
1458
|
}
|
|
1460
1459
|
}
|
|
1461
1460
|
function openVaultDatabase(dataDir) {
|
|
1462
|
-
const vaultDir =
|
|
1463
|
-
const path =
|
|
1461
|
+
const vaultDir = join2(dataDir, "vault");
|
|
1462
|
+
const path = join2(vaultDir, "vault.db");
|
|
1464
1463
|
mkdirSync3(vaultDir, { recursive: true, mode: 448 });
|
|
1465
1464
|
const database = new Database(path, { create: true });
|
|
1466
1465
|
chmodSync2(path, 384);
|
|
@@ -1484,13 +1483,19 @@ function decryptRow(userId, key, storedValue) {
|
|
|
1484
1483
|
}
|
|
1485
1484
|
return decoded.value;
|
|
1486
1485
|
}
|
|
1487
|
-
function
|
|
1486
|
+
function vaultListDecryptableValues(userId) {
|
|
1488
1487
|
const rows = activeVaultDatabase().prepare("SELECT key, description, value FROM vault WHERE user_id = ? ORDER BY key").all(userId);
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1488
|
+
const entries = [];
|
|
1489
|
+
for (const row of rows) {
|
|
1490
|
+
try {
|
|
1491
|
+
entries.push({
|
|
1492
|
+
key: row.key,
|
|
1493
|
+
description: row.description,
|
|
1494
|
+
value: decryptRow(userId, row.key, row.value)
|
|
1495
|
+
});
|
|
1496
|
+
} catch {}
|
|
1497
|
+
}
|
|
1498
|
+
return entries;
|
|
1494
1499
|
}
|
|
1495
1500
|
function vaultGetValue(userId, key) {
|
|
1496
1501
|
const normalizedKey = normalizeVaultKey(key);
|
|
@@ -1498,10 +1503,12 @@ function vaultGetValue(userId, key) {
|
|
|
1498
1503
|
return row ? decryptRow(userId, row.key, row.value) : undefined;
|
|
1499
1504
|
}
|
|
1500
1505
|
function vaultSubstituteDetailed(userId, text) {
|
|
1501
|
-
const entries = new Map
|
|
1506
|
+
const entries = new Map;
|
|
1502
1507
|
const usedKeys = new Set;
|
|
1503
1508
|
const substituted = text.replace(/\{\{([^}]+)\}\}/g, (match, rawKey) => {
|
|
1504
1509
|
const key = normalizeVaultKey(rawKey);
|
|
1510
|
+
if (!entries.has(key))
|
|
1511
|
+
entries.set(key, vaultGetValue(userId, key));
|
|
1505
1512
|
const value = entries.get(key);
|
|
1506
1513
|
if (value === undefined)
|
|
1507
1514
|
return match;
|
|
@@ -1522,7 +1529,7 @@ function encodedSecretForms(value) {
|
|
|
1522
1529
|
return [...forms].sort((a, b) => b.length - a.length);
|
|
1523
1530
|
}
|
|
1524
1531
|
function redactVaultSecrets(userId, text) {
|
|
1525
|
-
const candidates =
|
|
1532
|
+
const candidates = vaultListDecryptableValues(userId).flatMap((entry) => encodedSecretForms(entry.value).map((form) => ({ form, key: entry.key }))).sort((a, b) => b.form.length - a.form.length || a.key.localeCompare(b.key));
|
|
1526
1533
|
if (candidates.length === 0)
|
|
1527
1534
|
return text;
|
|
1528
1535
|
const candidatesByFirstCharacter = new Map;
|
|
@@ -1616,6 +1623,9 @@ function hostedClaudeCodeExecutablePath() {
|
|
|
1616
1623
|
function hostedCodexAuthFilePath() {
|
|
1617
1624
|
return activeHost().codexAuthFilePath();
|
|
1618
1625
|
}
|
|
1626
|
+
function hostedCodexHomePath() {
|
|
1627
|
+
return dirname3(hostedCodexAuthFilePath());
|
|
1628
|
+
}
|
|
1619
1629
|
|
|
1620
1630
|
// ../../packages/core/src/media/file-events.ts
|
|
1621
1631
|
function* extractFileEvents(text, source) {
|
|
@@ -2120,7 +2130,8 @@ async function* claudeProvider(opts) {
|
|
|
2120
2130
|
// ../../packages/core/src/agents/codex-provider.ts
|
|
2121
2131
|
import { execFileSync as execFileSync4 } from "child_process";
|
|
2122
2132
|
import { existsSync as existsSync5, readFileSync as readFileSync6, realpathSync as realpathSync3, statSync as statSync3 } from "fs";
|
|
2123
|
-
import {
|
|
2133
|
+
import { homedir as homedir2 } from "os";
|
|
2134
|
+
import { dirname as dirname6, isAbsolute, join as join5, relative, resolve as resolve5 } from "path";
|
|
2124
2135
|
import { Codex } from "@openai/codex-sdk";
|
|
2125
2136
|
|
|
2126
2137
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
@@ -2139,10 +2150,10 @@ import {
|
|
|
2139
2150
|
} from "fs";
|
|
2140
2151
|
import { createRequire as createRequire2 } from "module";
|
|
2141
2152
|
import { tmpdir } from "os";
|
|
2142
|
-
import { dirname as dirname4, join as
|
|
2153
|
+
import { dirname as dirname4, join as join3 } from "path";
|
|
2143
2154
|
|
|
2144
2155
|
// ../../packages/core/src/version.ts
|
|
2145
|
-
var NEGOTIUM_VERSION = "0.2.
|
|
2156
|
+
var NEGOTIUM_VERSION = "0.2.4";
|
|
2146
2157
|
|
|
2147
2158
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
2148
2159
|
var moduleRequire = createRequire2(import.meta.url);
|
|
@@ -2161,7 +2172,7 @@ var SAFE_BUNDLED_CODEX_VERSION = BUNDLED_CODEX_VERSION.replace(/[^a-zA-Z0-9._-]/
|
|
|
2161
2172
|
var NEGOTIUM_MODEL_CACHE = `negotium-models-cache-${SAFE_BUNDLED_CODEX_VERSION}.json`;
|
|
2162
2173
|
var NEGOTIUM_MODEL_CATALOG = `negotium-model-catalog-${SAFE_BUNDLED_CODEX_VERSION}.json`;
|
|
2163
2174
|
function codexCliScriptPath() {
|
|
2164
|
-
return
|
|
2175
|
+
return join3(dirname4(bundledCodexPackagePath), "bin", "codex.js");
|
|
2165
2176
|
}
|
|
2166
2177
|
function parseCodexModelCache(contents, sourcePath) {
|
|
2167
2178
|
let parsed;
|
|
@@ -2202,7 +2213,7 @@ function writePrivateFileAtomic(path, contents) {
|
|
|
2202
2213
|
}
|
|
2203
2214
|
}
|
|
2204
2215
|
function bundledCodexModelCachePath(authFilePath) {
|
|
2205
|
-
return
|
|
2216
|
+
return join3(dirname4(authFilePath), NEGOTIUM_MODEL_CACHE);
|
|
2206
2217
|
}
|
|
2207
2218
|
async function bootstrapCodexModelCache(codexHome, cachePath) {
|
|
2208
2219
|
const child = spawn3(process.execPath, [codexCliScriptPath(), "app-server", "--stdio"], {
|
|
@@ -2288,15 +2299,15 @@ async function bootstrapCodexModelCache(codexHome, cachePath) {
|
|
|
2288
2299
|
}
|
|
2289
2300
|
async function bootstrapIsolatedCodexModelCache(authFilePath, bootstrap) {
|
|
2290
2301
|
const sourceHome = dirname4(authFilePath);
|
|
2291
|
-
const isolatedHome = mkdtempSync(
|
|
2292
|
-
const isolatedCachePath =
|
|
2302
|
+
const isolatedHome = mkdtempSync(join3(tmpdir(), "negotium-codex-models-"));
|
|
2303
|
+
const isolatedCachePath = join3(isolatedHome, "models_cache.json");
|
|
2293
2304
|
try {
|
|
2294
|
-
const isolatedAuthPath =
|
|
2305
|
+
const isolatedAuthPath = join3(isolatedHome, "auth.json");
|
|
2295
2306
|
copyFileSync(authFilePath, isolatedAuthPath);
|
|
2296
2307
|
chmodSync3(isolatedAuthPath, 384);
|
|
2297
|
-
const sourceConfigPath =
|
|
2308
|
+
const sourceConfigPath = join3(sourceHome, "config.toml");
|
|
2298
2309
|
if (existsSync3(sourceConfigPath)) {
|
|
2299
|
-
const isolatedConfigPath =
|
|
2310
|
+
const isolatedConfigPath = join3(isolatedHome, "config.toml");
|
|
2300
2311
|
copyFileSync(sourceConfigPath, isolatedConfigPath);
|
|
2301
2312
|
chmodSync3(isolatedConfigPath, 384);
|
|
2302
2313
|
}
|
|
@@ -2317,7 +2328,7 @@ async function ensureCodexModelCache(authFilePath, bootstrap = bootstrapCodexMod
|
|
|
2317
2328
|
return configuredCachePath;
|
|
2318
2329
|
}
|
|
2319
2330
|
const bundledCachePath = bundledCodexModelCachePath(authFilePath);
|
|
2320
|
-
const sharedCachePath =
|
|
2331
|
+
const sharedCachePath = join3(codexHome, "models_cache.json");
|
|
2321
2332
|
if (existsSync3(sharedCachePath)) {
|
|
2322
2333
|
try {
|
|
2323
2334
|
const shared = readCompatibleCodexModelCache(sharedCachePath);
|
|
@@ -2337,7 +2348,7 @@ async function ensureCodexModelCache(authFilePath, bootstrap = bootstrapCodexMod
|
|
|
2337
2348
|
}
|
|
2338
2349
|
function writeCodexCatalogWithNativeMultiAgentDisabled(authFilePath, sourcePath) {
|
|
2339
2350
|
const codexHome = dirname4(authFilePath);
|
|
2340
|
-
const outputPath =
|
|
2351
|
+
const outputPath = join3(codexHome, NEGOTIUM_MODEL_CATALOG);
|
|
2341
2352
|
const parsed = readCodexModelCache(sourcePath).parsed;
|
|
2342
2353
|
const models = parsed.models.map((model, index) => {
|
|
2343
2354
|
if (!model || typeof model !== "object" || Array.isArray(model)) {
|
|
@@ -2572,10 +2583,9 @@ var killOwnedCodexTreesForShutdown = manager.killOwnedTreesForShutdown;
|
|
|
2572
2583
|
|
|
2573
2584
|
// ../../packages/core/src/agents/rollout/codex.ts
|
|
2574
2585
|
import { existsSync as existsSync4, readFileSync as readFileSync5, realpathSync as realpathSync2, statSync as statSync2, unlinkSync as unlinkSync4 } from "fs";
|
|
2575
|
-
import {
|
|
2576
|
-
import { basename, dirname as dirname5, join as join5, resolve as resolve4 } from "path";
|
|
2586
|
+
import { basename, dirname as dirname5, join as join4, resolve as resolve4 } from "path";
|
|
2577
2587
|
function codexSessionsDir() {
|
|
2578
|
-
return
|
|
2588
|
+
return join4(hostedCodexHomePath(), "sessions");
|
|
2579
2589
|
}
|
|
2580
2590
|
function canonicalFilePath(path) {
|
|
2581
2591
|
const absolute = resolve4(path);
|
|
@@ -2583,7 +2593,7 @@ function canonicalFilePath(path) {
|
|
|
2583
2593
|
return realpathSync2(absolute);
|
|
2584
2594
|
} catch {
|
|
2585
2595
|
try {
|
|
2586
|
-
return
|
|
2596
|
+
return join4(realpathSync2(dirname5(absolute)), basename(absolute));
|
|
2587
2597
|
} catch {
|
|
2588
2598
|
return absolute;
|
|
2589
2599
|
}
|
|
@@ -2772,19 +2782,19 @@ function latestCodexRolloutPath(threadId) {
|
|
|
2772
2782
|
try {
|
|
2773
2783
|
if (buckets) {
|
|
2774
2784
|
for (const bucket of buckets) {
|
|
2775
|
-
const dir =
|
|
2785
|
+
const dir = join4(sessionsDir, bucket);
|
|
2776
2786
|
if (!existsSync4(dir))
|
|
2777
2787
|
continue;
|
|
2778
2788
|
const glob = new Bun.Glob(`rollout-*-${threadId}.jsonl`);
|
|
2779
2789
|
for (const rel of glob.scanSync({ cwd: dir, onlyFiles: true })) {
|
|
2780
|
-
candidates.push(
|
|
2790
|
+
candidates.push(join4(dir, rel));
|
|
2781
2791
|
}
|
|
2782
2792
|
}
|
|
2783
2793
|
}
|
|
2784
2794
|
if (candidates.length === 0) {
|
|
2785
2795
|
const glob = new Bun.Glob(`**/rollout-*-${threadId}.jsonl`);
|
|
2786
2796
|
for (const rel of glob.scanSync({ cwd: sessionsDir, onlyFiles: true })) {
|
|
2787
|
-
candidates.push(
|
|
2797
|
+
candidates.push(join4(sessionsDir, rel));
|
|
2788
2798
|
}
|
|
2789
2799
|
}
|
|
2790
2800
|
return candidates.sort((a, b) => statSync2(b).mtimeMs - statSync2(a).mtimeMs)[0];
|
|
@@ -2922,7 +2932,7 @@ function codexMcpServerName(name) {
|
|
|
2922
2932
|
return CODEX_MCP_SERVER_NAME_OVERRIDES[name] ?? name;
|
|
2923
2933
|
}
|
|
2924
2934
|
function globalCodexMcpServerNames(authFilePath) {
|
|
2925
|
-
const configPath =
|
|
2935
|
+
const configPath = join5(dirname6(authFilePath), "config.toml");
|
|
2926
2936
|
if (!existsSync5(configPath))
|
|
2927
2937
|
return [];
|
|
2928
2938
|
try {
|
|
@@ -3283,13 +3293,15 @@ async function* codexProvider(opts) {
|
|
|
3283
3293
|
resume: Boolean(opts.sessionId),
|
|
3284
3294
|
mcpServerCount: Object.keys(codexMcpServers).length
|
|
3285
3295
|
}, "codexProvider: starting turn");
|
|
3296
|
+
const hostedCodexHome = hostedCodexHomePath();
|
|
3297
|
+
const inheritedCodexHome = process.env.CODEX_HOME || join5(homedir2(), ".codex");
|
|
3298
|
+
const codexEnvironment = scopedBrowserCapability || resolve5(hostedCodexHome) !== resolve5(inheritedCodexHome) ? {
|
|
3299
|
+
...Object.fromEntries(Object.entries(process.env).filter((entry) => typeof entry[1] === "string")),
|
|
3300
|
+
CODEX_HOME: hostedCodexHome,
|
|
3301
|
+
...scopedBrowserCapability ? { [CODEX_BROWSER_CAPABILITY_ENV]: scopedBrowserCapability } : {}
|
|
3302
|
+
} : undefined;
|
|
3286
3303
|
const codex = new Codex({
|
|
3287
|
-
...
|
|
3288
|
-
env: {
|
|
3289
|
-
...Object.fromEntries(Object.entries(process.env).filter((entry) => typeof entry[1] === "string")),
|
|
3290
|
-
[CODEX_BROWSER_CAPABILITY_ENV]: scopedBrowserCapability
|
|
3291
|
-
}
|
|
3292
|
-
} : {},
|
|
3304
|
+
...codexEnvironment ? { env: codexEnvironment } : {},
|
|
3293
3305
|
config: {
|
|
3294
3306
|
features: { multi_agent: false, multi_agent_v2: false, enable_fanout: false },
|
|
3295
3307
|
model_catalog_json: codexModelCatalogPath,
|
|
@@ -3688,7 +3700,7 @@ function maestroProvider(opts) {
|
|
|
3688
3700
|
// ../../packages/core/src/agents/claude-runtime-inspection.ts
|
|
3689
3701
|
import { readFileSync as readFileSync7 } from "fs";
|
|
3690
3702
|
import { createRequire as createRequire3 } from "module";
|
|
3691
|
-
import { dirname as dirname7, join as
|
|
3703
|
+
import { dirname as dirname7, join as join6 } from "path";
|
|
3692
3704
|
var cached;
|
|
3693
3705
|
function inspectBundledClaudeRuntime() {
|
|
3694
3706
|
if (cached)
|
|
@@ -3696,8 +3708,8 @@ function inspectBundledClaudeRuntime() {
|
|
|
3696
3708
|
try {
|
|
3697
3709
|
const require2 = createRequire3(import.meta.url);
|
|
3698
3710
|
const sdkDir = dirname7(require2.resolve("@anthropic-ai/claude-agent-sdk"));
|
|
3699
|
-
const sdkPackage = JSON.parse(readFileSync7(
|
|
3700
|
-
const manifest = JSON.parse(readFileSync7(
|
|
3711
|
+
const sdkPackage = JSON.parse(readFileSync7(join6(sdkDir, "package.json"), "utf8"));
|
|
3712
|
+
const manifest = JSON.parse(readFileSync7(join6(sdkDir, "manifest.json"), "utf8"));
|
|
3701
3713
|
const sdkVersion = typeof sdkPackage.version === "string" ? sdkPackage.version : "";
|
|
3702
3714
|
const claudeCodeVersion = typeof manifest.version === "string" ? manifest.version : "";
|
|
3703
3715
|
if (!sdkVersion || !claudeCodeVersion) {
|
|
@@ -3770,4 +3782,4 @@ export {
|
|
|
3770
3782
|
buildClaudeDisallowedTools
|
|
3771
3783
|
};
|
|
3772
3784
|
|
|
3773
|
-
//# debugId=
|
|
3785
|
+
//# debugId=03F870923DEBEFF364756E2164756E21
|