brass-runtime 1.19.0 → 1.19.1
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/cli/main.cjs +30 -30
- package/dist/agent/cli/main.js +2 -2
- package/dist/agent/cli/main.mjs +2 -2
- package/dist/agent/index.cjs +3 -3
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/index.mjs +2 -2
- package/dist/{chunk-HW2CLRJ3.mjs → chunk-22HYIE56.mjs} +6 -6
- package/dist/{chunk-GOEO763K.cjs → chunk-2XXQ3NVT.cjs} +19 -19
- package/dist/{chunk-QBVS3UYN.cjs → chunk-67256TKF.cjs} +54 -54
- package/dist/{chunk-BLXBZ6RE.mjs → chunk-6BNZS2A4.mjs} +1 -1
- package/dist/{chunk-EXBGIC66.js → chunk-6W5DC3TX.js} +1 -1
- package/dist/{chunk-OX6MF7SZ.mjs → chunk-AITYRQX2.mjs} +5 -5
- package/dist/{chunk-MUMBUXU6.mjs → chunk-BFNBU47C.mjs} +22 -6
- package/dist/{chunk-OO7BGCC3.cjs → chunk-CXWJII2N.cjs} +13 -13
- package/dist/{chunk-Z2YIDHRI.cjs → chunk-ENMKEX3N.cjs} +5 -5
- package/dist/{chunk-NQW3YUFN.cjs → chunk-EZ76UNHP.cjs} +18 -18
- package/dist/{chunk-5RVHSBJ6.mjs → chunk-ID2WOCBA.mjs} +3 -3
- package/dist/{chunk-RZGB3DXR.js → chunk-IHXF6NQG.js} +3 -3
- package/dist/{chunk-MA74OYCI.cjs → chunk-IHY2EJTT.cjs} +6 -6
- package/dist/{chunk-AQQQFNYD.mjs → chunk-IWAQQDYE.mjs} +1 -1
- package/dist/{chunk-C3CWI42G.js → chunk-J4F5KC3U.js} +1 -1
- package/dist/{chunk-ZDZNV6NA.cjs → chunk-JKHBEWQA.cjs} +23 -7
- package/dist/{chunk-5UBJT4RW.mjs → chunk-JM7WMSRR.mjs} +3 -3
- package/dist/{chunk-YQWZ7FZX.cjs → chunk-JQCQWO47.cjs} +5 -5
- package/dist/{chunk-B2VXVNIS.js → chunk-LI7WUVJN.js} +1 -1
- package/dist/{chunk-7FZUTJM3.cjs → chunk-LXNU3MRV.cjs} +14 -14
- package/dist/{chunk-FC5N5QHJ.js → chunk-NWONRWBT.js} +2 -2
- package/dist/{chunk-H4ZRUQZL.js → chunk-PG6CHG34.js} +3 -3
- package/dist/{chunk-GXOIUBKE.js → chunk-RZQK32C6.js} +2 -2
- package/dist/{chunk-EKLEDIVJ.mjs → chunk-S6KSHYAT.mjs} +2 -2
- package/dist/{chunk-URVS2OE2.mjs → chunk-SCHM2MDA.mjs} +2 -2
- package/dist/{chunk-A6EG5WRL.js → chunk-TAPB4NN5.js} +2 -2
- package/dist/{chunk-APQBU7TM.js → chunk-TN2P7RNK.js} +22 -6
- package/dist/{chunk-2R3RVNS2.js → chunk-U42YF6B2.js} +6 -6
- package/dist/{chunk-FYWWU3Z7.cjs → chunk-VXNWVAIG.cjs} +2 -2
- package/dist/{chunk-KAPZHDO4.mjs → chunk-WA65XP2P.mjs} +1 -1
- package/dist/{chunk-JWFOWPMB.js → chunk-XJSWDU2S.js} +5 -5
- package/dist/{chunk-4PKBNG2H.js → chunk-XO3TDAJE.js} +1 -1
- package/dist/{chunk-KDXNWGPB.mjs → chunk-XRRC5BBM.mjs} +1 -1
- package/dist/{chunk-DV644N7P.cjs → chunk-ZJC3JZIE.cjs} +16 -16
- package/dist/{chunk-3NKXUX4T.mjs → chunk-ZXLETUGQ.mjs} +2 -2
- package/dist/{chunk-6STX4PS3.cjs → chunk-ZZ2CMYJL.cjs} +13 -13
- package/dist/core/index.cjs +9 -7
- package/dist/core/index.d.ts +6 -6
- package/dist/core/index.js +8 -6
- package/dist/core/index.mjs +8 -6
- package/dist/{defaultClient-Cid0JoUR.d.ts → defaultClient-hyVSNzSJ.d.ts} +3 -3
- package/dist/{effect-DnGUuhw6.d.ts → effect-DbEMiMvv.d.ts} +8 -1
- package/dist/http/index.cjs +48 -48
- package/dist/http/index.d.ts +8 -8
- package/dist/http/index.js +6 -6
- package/dist/http/index.mjs +6 -6
- package/dist/http/testing.cjs +8 -8
- package/dist/http/testing.d.ts +4 -4
- package/dist/http/testing.js +4 -4
- package/dist/http/testing.mjs +4 -4
- package/dist/index.cjs +87 -85
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -7
- package/dist/index.mjs +9 -7
- package/dist/{layer-D2LFcBVx.d.ts → layer-CsNGeVee.d.ts} +1 -1
- package/dist/observability/index.cjs +9 -9
- package/dist/observability/index.d.ts +7 -7
- package/dist/observability/index.js +8 -8
- package/dist/observability/index.mjs +8 -8
- package/dist/perf/cli.cjs +25 -25
- package/dist/perf/cli.js +10 -10
- package/dist/perf/cli.mjs +10 -10
- package/dist/perf/index.cjs +12 -12
- package/dist/perf/index.js +10 -10
- package/dist/perf/index.mjs +10 -10
- package/dist/{server-Bf1zNYZk.d.ts → server-BKKuzAW9.d.ts} +4 -4
- package/dist/{stream-I7bkvF7a.d.ts → stream-B8c_UKZq.d.ts} +1 -1
- package/dist/{tracer-DF83nLn6.d.ts → tracer-CS3yOXZx.d.ts} +2 -2
- package/dist/{tracing-CWV4gT0u.d.ts → tracing-DIAUf2x8.d.ts} +1 -1
- package/package.json +1 -1
package/dist/agent/cli/main.cjs
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkIHY2EJTTcjs = require('../../chunk-IHY2EJTT.cjs');
|
|
21
21
|
require('../../chunk-SA6HUJVI.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkJKHBEWQAcjs = require('../../chunk-JKHBEWQA.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -56,7 +56,7 @@ var makeCliApprovalService = (options = {}) => ({
|
|
|
56
56
|
_optionalChain([output, 'optionalAccess', _ => _.write, 'optionalCall', _2 => _2(`
|
|
57
57
|
Approval required (${request.risk})
|
|
58
58
|
`)]);
|
|
59
|
-
_optionalChain([output, 'optionalAccess', _3 => _3.write, 'optionalCall', _4 => _4(`Action: ${
|
|
59
|
+
_optionalChain([output, 'optionalAccess', _3 => _3.write, 'optionalCall', _4 => _4(`Action: ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, request.action)}
|
|
60
60
|
`)]);
|
|
61
61
|
_optionalChain([output, 'optionalAccess', _5 => _5.write, 'optionalCall', _6 => _6(`Reason: ${request.reason}
|
|
62
62
|
`)]);
|
|
@@ -1103,7 +1103,7 @@ var parseCliArgs = (argv) => {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
if (arg === "--preset" || arg.startsWith("--preset=")) {
|
|
1105
1105
|
const [value, nextIndex] = readFlagValue(argv, index, "--preset");
|
|
1106
|
-
if (!
|
|
1106
|
+
if (!_chunkIHY2EJTTcjs.isAgentPreset.call(void 0, value)) {
|
|
1107
1107
|
throw new Error("--preset requires one of: fix-tests, inspect, typecheck, lint");
|
|
1108
1108
|
}
|
|
1109
1109
|
preset = value;
|
|
@@ -1279,7 +1279,7 @@ var parseBatchGoal = (value, path) => {
|
|
|
1279
1279
|
if (cwd !== void 0 && typeof cwd !== "string") throw new Error(`${path}.cwd must be a string.`);
|
|
1280
1280
|
if (patchFile !== void 0 && typeof patchFile !== "string") throw new Error(`${path}.patchFile must be a string.`);
|
|
1281
1281
|
if (saveRunDir !== void 0 && typeof saveRunDir !== "string") throw new Error(`${path}.saveRunDir must be a string.`);
|
|
1282
|
-
if (preset !== void 0 && (typeof preset !== "string" || !
|
|
1282
|
+
if (preset !== void 0 && (typeof preset !== "string" || !_chunkIHY2EJTTcjs.isAgentPreset.call(void 0, preset))) {
|
|
1283
1283
|
throw new Error(`${path}.preset must be one of: fix-tests, inspect, typecheck, lint.`);
|
|
1284
1284
|
}
|
|
1285
1285
|
if (mode !== void 0 && (typeof mode !== "string" || !isAgentMode(mode))) {
|
|
@@ -1323,7 +1323,7 @@ var readBatchFile = async (cwd, batchFile) => {
|
|
|
1323
1323
|
var resolveBatchGoalText = (item, fallbackPatchFile) => {
|
|
1324
1324
|
if (typeof item === "string") return item;
|
|
1325
1325
|
if (item.goal) return item.goal;
|
|
1326
|
-
if (item.preset) return
|
|
1326
|
+
if (item.preset) return _chunkIHY2EJTTcjs.goalForAgentPreset.call(void 0, item.preset);
|
|
1327
1327
|
if (_nullishCoalesce(item.patchFile, () => ( fallbackPatchFile))) return "apply supplied patch";
|
|
1328
1328
|
return "";
|
|
1329
1329
|
};
|
|
@@ -1350,7 +1350,7 @@ var resolveBatchRuns = (items, parsed, config) => items.map((item, index) => {
|
|
|
1350
1350
|
};
|
|
1351
1351
|
});
|
|
1352
1352
|
var resolveParsedConfig = async (parsed) => {
|
|
1353
|
-
const workspaceDiscovery =
|
|
1353
|
+
const workspaceDiscovery = _chunkIHY2EJTTcjs.discoverNodeWorkspaceRoot.call(void 0, parsed.cwd, {
|
|
1354
1354
|
enabled: parsed.discoverWorkspace
|
|
1355
1355
|
});
|
|
1356
1356
|
const cwdResolved = workspaceDiscovery.cwd;
|
|
@@ -1358,7 +1358,7 @@ var resolveParsedConfig = async (parsed) => {
|
|
|
1358
1358
|
...parsed,
|
|
1359
1359
|
cwd: cwdResolved
|
|
1360
1360
|
};
|
|
1361
|
-
const loaded = await
|
|
1361
|
+
const loaded = await _chunkIHY2EJTTcjs.loadNodeAgentConfig.call(void 0, {
|
|
1362
1362
|
cwd: cwdResolved,
|
|
1363
1363
|
configPath: parsed.configPath,
|
|
1364
1364
|
noConfig: parsed.noConfig
|
|
@@ -1374,7 +1374,7 @@ var resolveParsedConfig = async (parsed) => {
|
|
|
1374
1374
|
const batchRuns = resolveBatchRuns(batchItems, parsedAtWorkspace, loaded.config);
|
|
1375
1375
|
return {
|
|
1376
1376
|
...parsedAtWorkspace,
|
|
1377
|
-
goalText: parsed.goalText || (parsed.preset ?
|
|
1377
|
+
goalText: parsed.goalText || (parsed.preset ? _chunkIHY2EJTTcjs.goalForAgentPreset.call(void 0, parsed.preset) : parsed.patchFile ? "apply supplied patch" : parsed.goalText),
|
|
1378
1378
|
mode: parsed.modeSpecified ? parsed.mode : parsed.preset === "inspect" ? "read-only" : _nullishCoalesce(loaded.config.mode, () => ( parsed.mode)),
|
|
1379
1379
|
approval: parsed.approvalSpecified ? parsed.approval : _nullishCoalesce(loaded.config.approval, () => ( parsed.approval)),
|
|
1380
1380
|
config: loaded.config,
|
|
@@ -1498,7 +1498,7 @@ var envByName = (name) => name ? process.env[name] : void 0;
|
|
|
1498
1498
|
var makeGoogleLLMFromEnv = (config) => {
|
|
1499
1499
|
const apiKey = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envByName(_optionalChain([config, 'optionalAccess', _39 => _39.apiKeyEnv])), () => ( process.env.BRASS_GOOGLE_API_KEY)), () => ( process.env.GOOGLE_API_KEY)), () => ( process.env.GEMINI_API_KEY));
|
|
1500
1500
|
if (!apiKey) return void 0;
|
|
1501
|
-
return
|
|
1501
|
+
return _chunkIHY2EJTTcjs.makeGoogleGenerativeAILLM.call(void 0, {
|
|
1502
1502
|
apiKey,
|
|
1503
1503
|
model: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(process.env.BRASS_GOOGLE_MODEL, () => ( process.env.BRASS_LLM_MODEL)), () => ( _optionalChain([config, 'optionalAccess', _40 => _40.model]))), () => ( "gemini-2.5-flash")),
|
|
1504
1504
|
apiVersion: _nullishCoalesce(_nullishCoalesce(process.env.BRASS_GOOGLE_API_VERSION, () => ( _optionalChain([config, 'optionalAccess', _41 => _41.apiVersion]))), () => ( "v1beta")),
|
|
@@ -1516,12 +1516,12 @@ var makeOpenAICompatibleLLMFromEnv = (config) => {
|
|
|
1516
1516
|
const apiKey = _nullishCoalesce(envByName(_optionalChain([config, 'optionalAccess', _50 => _50.apiKeyEnv])), () => ( process.env.BRASS_LLM_API_KEY));
|
|
1517
1517
|
const model = _nullishCoalesce(_nullishCoalesce(process.env.BRASS_LLM_MODEL, () => ( _optionalChain([config, 'optionalAccess', _51 => _51.model]))), () => ( "gpt-4.1"));
|
|
1518
1518
|
if (!endpoint || !apiKey) return void 0;
|
|
1519
|
-
return
|
|
1519
|
+
return _chunkIHY2EJTTcjs.makeOpenAICompatibleLLM.call(void 0, { endpoint, apiKey, model });
|
|
1520
1520
|
};
|
|
1521
1521
|
var makeLLMFromEnv = (config) => {
|
|
1522
1522
|
const provider = _optionalChain([(_nullishCoalesce(process.env.BRASS_LLM_PROVIDER, () => ( _optionalChain([config, 'optionalAccess', _52 => _52.provider])))), 'optionalAccess', _53 => _53.trim, 'call', _54 => _54(), 'access', _55 => _55.toLowerCase, 'call', _56 => _56()]);
|
|
1523
1523
|
const fakeResponse = _nullishCoalesce(process.env.BRASS_FAKE_LLM_RESPONSE, () => ( _optionalChain([config, 'optionalAccess', _57 => _57.fakeResponse])));
|
|
1524
|
-
if (provider === "fake") return
|
|
1524
|
+
if (provider === "fake") return _chunkIHY2EJTTcjs.makeFakeLLM.call(void 0, { content: fakeResponse });
|
|
1525
1525
|
if (provider === "google" || provider === "gemini") {
|
|
1526
1526
|
const google = makeGoogleLLMFromEnv(config);
|
|
1527
1527
|
if (!google) {
|
|
@@ -1543,7 +1543,7 @@ var makeLLMFromEnv = (config) => {
|
|
|
1543
1543
|
if (provider) {
|
|
1544
1544
|
throw new Error(`Unsupported LLM provider: ${provider}`);
|
|
1545
1545
|
}
|
|
1546
|
-
return _nullishCoalesce(_nullishCoalesce(makeGoogleLLMFromEnv(config), () => ( makeOpenAICompatibleLLMFromEnv(config))), () => (
|
|
1546
|
+
return _nullishCoalesce(_nullishCoalesce(makeGoogleLLMFromEnv(config), () => ( makeOpenAICompatibleLLMFromEnv(config))), () => ( _chunkIHY2EJTTcjs.makeFakeLLM.call(void 0, { content: fakeResponse })));
|
|
1547
1547
|
};
|
|
1548
1548
|
var parseApprovalModeFromEnv = () => {
|
|
1549
1549
|
const raw = _optionalChain([process, 'access', _58 => _58.env, 'access', _59 => _59.BRASS_AGENT_APPROVAL, 'optionalAccess', _60 => _60.trim, 'call', _61 => _61(), 'access', _62 => _62.toLowerCase, 'call', _63 => _63()]);
|
|
@@ -1566,9 +1566,9 @@ var makeApprovalServiceFromCli = (parsed) => {
|
|
|
1566
1566
|
const mode = resolveApprovalMode(parsed);
|
|
1567
1567
|
switch (mode) {
|
|
1568
1568
|
case "approve":
|
|
1569
|
-
return
|
|
1569
|
+
return _chunkIHY2EJTTcjs.autoApproveApprovals;
|
|
1570
1570
|
case "deny":
|
|
1571
|
-
return
|
|
1571
|
+
return _chunkIHY2EJTTcjs.makeAutoDenyApprovals.call(void 0, "Approval rejected because the CLI is running without interactive input. Use --yes to auto-approve.");
|
|
1572
1572
|
case "interactive":
|
|
1573
1573
|
return makeCliApprovalService();
|
|
1574
1574
|
}
|
|
@@ -1700,32 +1700,32 @@ var createHumanEventSink = (configPath) => ({
|
|
|
1700
1700
|
console.log("");
|
|
1701
1701
|
break;
|
|
1702
1702
|
case "agent.action.started":
|
|
1703
|
-
console.log(`\u2192 ${
|
|
1703
|
+
console.log(`\u2192 ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, event.action)}`);
|
|
1704
1704
|
break;
|
|
1705
1705
|
case "agent.action.completed": {
|
|
1706
|
-
const status =
|
|
1707
|
-
console.log(`${statusIcon2(status)} ${
|
|
1706
|
+
const status = _chunkIHY2EJTTcjs.observationStatus.call(void 0, event.observation);
|
|
1707
|
+
console.log(`${statusIcon2(status)} ${_chunkIHY2EJTTcjs.summarizeAgentObservation.call(void 0, event.observation)} ${formatDuration(event.durationMs)}`);
|
|
1708
1708
|
break;
|
|
1709
1709
|
}
|
|
1710
1710
|
case "agent.action.failed":
|
|
1711
1711
|
if (event.error._tag !== "ToolTimeout" && event.error._tag !== "PermissionDenied" && event.error._tag !== "ApprovalRejected") {
|
|
1712
|
-
console.log(`\u2717 ${
|
|
1712
|
+
console.log(`\u2717 ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, event.action)} failed with ${event.error._tag} ${formatDuration(event.durationMs)}`);
|
|
1713
1713
|
}
|
|
1714
1714
|
break;
|
|
1715
1715
|
case "agent.tool.timeout":
|
|
1716
|
-
console.log(`! ${
|
|
1716
|
+
console.log(`! ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, event.action)} timed out after ${event.timeoutMs}ms`);
|
|
1717
1717
|
break;
|
|
1718
1718
|
case "agent.permission.denied":
|
|
1719
|
-
console.log(`\u2717 ${
|
|
1719
|
+
console.log(`\u2717 ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, event.action)} denied: ${event.reason}`);
|
|
1720
1720
|
break;
|
|
1721
1721
|
case "agent.approval.requested":
|
|
1722
|
-
console.log(`? approval required for ${
|
|
1722
|
+
console.log(`? approval required for ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, event.action)} (${event.risk})`);
|
|
1723
1723
|
break;
|
|
1724
1724
|
case "agent.approval.resolved":
|
|
1725
1725
|
if (event.approved) {
|
|
1726
|
-
console.log(`\u2713 approval granted for ${
|
|
1726
|
+
console.log(`\u2713 approval granted for ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, event.action)}`);
|
|
1727
1727
|
} else {
|
|
1728
|
-
console.log(`\u2717 approval rejected for ${
|
|
1728
|
+
console.log(`\u2717 approval rejected for ${_chunkIHY2EJTTcjs.summarizeAgentAction.call(void 0, event.action)}${event.reason ? `: ${event.reason}` : ""}`);
|
|
1729
1729
|
}
|
|
1730
1730
|
break;
|
|
1731
1731
|
case "agent.patch.applied":
|
|
@@ -1830,13 +1830,13 @@ var printHumanFinalSummary = (state) => {
|
|
|
1830
1830
|
};
|
|
1831
1831
|
var makeEventsSink = (parsed, compactOptions) => parsed.output === "human" ? createHumanEventSink(parsed.resolvedConfigPath) : parsed.output === "events-json" ? createJsonEventSink(compactOptions) : parsed.output === "protocol-json" ? createProtocolEventSink(compactOptions) : void 0;
|
|
1832
1832
|
var makeAgentEnv = (parsed, events) => {
|
|
1833
|
-
const shell =
|
|
1833
|
+
const shell = _chunkIHY2EJTTcjs.NodeShell;
|
|
1834
1834
|
return {
|
|
1835
1835
|
shell,
|
|
1836
|
-
fs:
|
|
1837
|
-
patch:
|
|
1836
|
+
fs: _chunkIHY2EJTTcjs.makeNodeFileSystem.call(void 0, shell),
|
|
1837
|
+
patch: _chunkIHY2EJTTcjs.makeNodePatchService.call(void 0, shell),
|
|
1838
1838
|
llm: makeLLMFromEnv(parsed.config.llm),
|
|
1839
|
-
permissions:
|
|
1839
|
+
permissions: _chunkIHY2EJTTcjs.makeConfiguredPermissions.call(void 0, parsed.config.permissions),
|
|
1840
1840
|
approvals: makeApprovalServiceFromCli(parsed),
|
|
1841
1841
|
...events ? { events } : {},
|
|
1842
1842
|
...parsed.config.tools ? { toolPolicies: parsed.config.tools } : {}
|
|
@@ -1853,10 +1853,10 @@ var singleRunFromParsed = (parsed) => ({
|
|
|
1853
1853
|
});
|
|
1854
1854
|
var runCliAgent = async (parsed, run, compactOptions, events) => {
|
|
1855
1855
|
const env = makeAgentEnv(parsed, events);
|
|
1856
|
-
const runtime = new (0,
|
|
1856
|
+
const runtime = new (0, _chunkJKHBEWQAcjs.Runtime)({ env });
|
|
1857
1857
|
const initialPatch = run.patchFile ? await readPatchFile(run.cwd, run.patchFile) : void 0;
|
|
1858
1858
|
const state = await runtime.toPromise(
|
|
1859
|
-
|
|
1859
|
+
_chunkIHY2EJTTcjs.runAgent.call(void 0, runtime, {
|
|
1860
1860
|
id: `agent-${Date.now()}-${run.index + 1}`,
|
|
1861
1861
|
cwd: run.cwd,
|
|
1862
1862
|
text: run.goalText,
|
package/dist/agent/cli/main.js
CHANGED
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
runAgent,
|
|
18
18
|
summarizeAgentAction,
|
|
19
19
|
summarizeAgentObservation
|
|
20
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-J4F5KC3U.js";
|
|
21
21
|
import "../../chunk-UCUBNWM2.js";
|
|
22
22
|
import {
|
|
23
23
|
Runtime
|
|
24
|
-
} from "../../chunk-
|
|
24
|
+
} from "../../chunk-TN2P7RNK.js";
|
|
25
25
|
import {
|
|
26
26
|
Cause,
|
|
27
27
|
Exit,
|
package/dist/agent/cli/main.mjs
CHANGED
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
runAgent,
|
|
18
18
|
summarizeAgentAction,
|
|
19
19
|
summarizeAgentObservation
|
|
20
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-6BNZS2A4.mjs";
|
|
21
21
|
import "../../chunk-B5JD23U7.mjs";
|
|
22
22
|
import {
|
|
23
23
|
Runtime
|
|
24
|
-
} from "../../chunk-
|
|
24
|
+
} from "../../chunk-BFNBU47C.mjs";
|
|
25
25
|
import {
|
|
26
26
|
Cause,
|
|
27
27
|
Exit,
|
package/dist/agent/index.cjs
CHANGED
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
var
|
|
76
|
+
var _chunkIHY2EJTTcjs = require('../chunk-IHY2EJTT.cjs');
|
|
77
77
|
require('../chunk-SA6HUJVI.cjs');
|
|
78
|
-
require('../chunk-
|
|
78
|
+
require('../chunk-JKHBEWQA.cjs');
|
|
79
79
|
require('../chunk-MVGUEJ5Z.cjs');
|
|
80
80
|
require('../chunk-KPOL2YEO.cjs');
|
|
81
81
|
require('../chunk-OBGZSXTJ.cjs');
|
|
@@ -154,4 +154,4 @@ require('../chunk-OBGZSXTJ.cjs');
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
exports.AGENT_CONFIG_FILE_NAMES =
|
|
157
|
+
exports.AGENT_CONFIG_FILE_NAMES = _chunkIHY2EJTTcjs.AGENT_CONFIG_FILE_NAMES; exports.NodeShell = _chunkIHY2EJTTcjs.NodeShell; exports.PROJECT_LOCKFILE_PROBES = _chunkIHY2EJTTcjs.PROJECT_LOCKFILE_PROBES; exports.PROJECT_PROFILE_PROBES = _chunkIHY2EJTTcjs.PROJECT_PROFILE_PROBES; exports.autoApproveApprovals = _chunkIHY2EJTTcjs.autoApproveApprovals; exports.canAutoRollback = _chunkIHY2EJTTcjs.canAutoRollback; exports.canRequestPatchRepair = _chunkIHY2EJTTcjs.canRequestPatchRepair; exports.commandForScript = _chunkIHY2EJTTcjs.commandForScript; exports.decideNextAction = _chunkIHY2EJTTcjs.decideNextAction; exports.defaultPermissions = _chunkIHY2EJTTcjs.defaultPermissions; exports.deriveContextSearchQueries = _chunkIHY2EJTTcjs.deriveContextSearchQueries; exports.describeCommandDiscovery = _chunkIHY2EJTTcjs.describeCommandDiscovery; exports.describeContextDiscovery = _chunkIHY2EJTTcjs.describeContextDiscovery; exports.describeLanguagePolicy = _chunkIHY2EJTTcjs.describeLanguagePolicy; exports.describePatchQuality = _chunkIHY2EJTTcjs.describePatchQuality; exports.describeProjectProfile = _chunkIHY2EJTTcjs.describeProjectProfile; exports.describeRollbackSafety = _chunkIHY2EJTTcjs.describeRollbackSafety; exports.discoverNodeWorkspaceRoot = _chunkIHY2EJTTcjs.discoverNodeWorkspaceRoot; exports.discoverPackageManager = _chunkIHY2EJTTcjs.discoverPackageManager; exports.discoverProjectProfile = _chunkIHY2EJTTcjs.discoverProjectProfile; exports.discoverValidationCommands = _chunkIHY2EJTTcjs.discoverValidationCommands; exports.emitAgentEvent = _chunkIHY2EJTTcjs.emitAgentEvent; exports.emitAgentEvents = _chunkIHY2EJTTcjs.emitAgentEvents; exports.errorEventFor = _chunkIHY2EJTTcjs.errorEventFor; exports.extractLikelyFilePaths = _chunkIHY2EJTTcjs.extractLikelyFilePaths; exports.extractPatchPaths = _chunkIHY2EJTTcjs.extractPatchPaths; exports.extractUnifiedDiff = _chunkIHY2EJTTcjs.extractUnifiedDiff; exports.goalForAgentPreset = _chunkIHY2EJTTcjs.goalForAgentPreset; exports.inferUserLanguage = _chunkIHY2EJTTcjs.inferUserLanguage; exports.initialAgentState = _chunkIHY2EJTTcjs.initialAgentState; exports.invokeAction = _chunkIHY2EJTTcjs.invokeAction; exports.isAgentConfigApprovalMode = _chunkIHY2EJTTcjs.isAgentConfigApprovalMode; exports.isAgentConfigLLMProvider = _chunkIHY2EJTTcjs.isAgentConfigLLMProvider; exports.isAgentConfigMode = _chunkIHY2EJTTcjs.isAgentConfigMode; exports.isAgentPreset = _chunkIHY2EJTTcjs.isAgentPreset; exports.isRedactionEnabled = _chunkIHY2EJTTcjs.isRedactionEnabled; exports.isTerminal = _chunkIHY2EJTTcjs.isTerminal; exports.latestUnappliedPatch = _chunkIHY2EJTTcjs.latestUnappliedPatch; exports.loadNodeAgentConfig = _chunkIHY2EJTTcjs.loadNodeAgentConfig; exports.makeAutoDenyApprovals = _chunkIHY2EJTTcjs.makeAutoDenyApprovals; exports.makeConfiguredPermissions = _chunkIHY2EJTTcjs.makeConfiguredPermissions; exports.makeFakeLLM = _chunkIHY2EJTTcjs.makeFakeLLM; exports.makeGoogleGenerativeAILLM = _chunkIHY2EJTTcjs.makeGoogleGenerativeAILLM; exports.makeNodeFileSystem = _chunkIHY2EJTTcjs.makeNodeFileSystem; exports.makeNodePatchService = _chunkIHY2EJTTcjs.makeNodePatchService; exports.makeOpenAICompatibleLLM = _chunkIHY2EJTTcjs.makeOpenAICompatibleLLM; exports.nextContextDiscoveryAction = _chunkIHY2EJTTcjs.nextContextDiscoveryAction; exports.nextProjectProbeAction = _chunkIHY2EJTTcjs.nextProjectProbeAction; exports.nextUnrunValidationCommand = _chunkIHY2EJTTcjs.nextUnrunValidationCommand; exports.nowMillis = _chunkIHY2EJTTcjs.nowMillis; exports.observationEventFor = _chunkIHY2EJTTcjs.observationEventFor; exports.observationStatus = _chunkIHY2EJTTcjs.observationStatus; exports.parseProjectPackageJson = _chunkIHY2EJTTcjs.parseProjectPackageJson; exports.patchQualitySummary = _chunkIHY2EJTTcjs.patchQualitySummary; exports.patchRepairAttemptsUsed = _chunkIHY2EJTTcjs.patchRepairAttemptsUsed; exports.patchValidationStatus = _chunkIHY2EJTTcjs.patchValidationStatus; exports.projectProfileProbePending = _chunkIHY2EJTTcjs.projectProfileProbePending; exports.redactText = _chunkIHY2EJTTcjs.redactText; exports.reduceAgentState = _chunkIHY2EJTTcjs.reduceAgentState; exports.responseLanguageName = _chunkIHY2EJTTcjs.responseLanguageName; exports.retry = _chunkIHY2EJTTcjs.retry; exports.rollbackSafetySummary = _chunkIHY2EJTTcjs.rollbackSafetySummary; exports.runAgent = _chunkIHY2EJTTcjs.runAgent; exports.runStatusFor = _chunkIHY2EJTTcjs.runStatusFor; exports.shouldContinueRollbackStack = _chunkIHY2EJTTcjs.shouldContinueRollbackStack; exports.sleep = _chunkIHY2EJTTcjs.sleep; exports.spanishLike = _chunkIHY2EJTTcjs.spanishLike; exports.splitCommand = _chunkIHY2EJTTcjs.splitCommand; exports.summarizeAgentAction = _chunkIHY2EJTTcjs.summarizeAgentAction; exports.summarizeAgentObservation = _chunkIHY2EJTTcjs.summarizeAgentObservation; exports.summarizeContextDiscovery = _chunkIHY2EJTTcjs.summarizeContextDiscovery; exports.timeout = _chunkIHY2EJTTcjs.timeout; exports.unappliedPatchStack = _chunkIHY2EJTTcjs.unappliedPatchStack; exports.workspaceValidationStatus = _chunkIHY2EJTTcjs.workspaceValidationStatus;
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Async, b as Runtime, S as Scope } from '../effect-
|
|
1
|
+
import { A as Async, b as Runtime, S as Scope } from '../effect-DbEMiMvv.js';
|
|
2
2
|
|
|
3
3
|
type AgentMode = "read-only" | "propose" | "write" | "autonomous";
|
|
4
4
|
type AgentPackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
package/dist/agent/index.js
CHANGED
|
@@ -73,9 +73,9 @@ import {
|
|
|
73
73
|
timeout,
|
|
74
74
|
unappliedPatchStack,
|
|
75
75
|
workspaceValidationStatus
|
|
76
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-J4F5KC3U.js";
|
|
77
77
|
import "../chunk-UCUBNWM2.js";
|
|
78
|
-
import "../chunk-
|
|
78
|
+
import "../chunk-TN2P7RNK.js";
|
|
79
79
|
import "../chunk-UB4B6OFY.js";
|
|
80
80
|
import "../chunk-FNWOH2T2.js";
|
|
81
81
|
import "../chunk-3RG5ZIWI.js";
|
package/dist/agent/index.mjs
CHANGED
|
@@ -73,9 +73,9 @@ import {
|
|
|
73
73
|
timeout,
|
|
74
74
|
unappliedPatchStack,
|
|
75
75
|
workspaceValidationStatus
|
|
76
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-6BNZS2A4.mjs";
|
|
77
77
|
import "../chunk-B5JD23U7.mjs";
|
|
78
|
-
import "../chunk-
|
|
78
|
+
import "../chunk-BFNBU47C.mjs";
|
|
79
79
|
import "../chunk-36I3M4UC.mjs";
|
|
80
80
|
import "../chunk-UZQ3BB6W.mjs";
|
|
81
81
|
import "../chunk-Y6FXYEAI.mjs";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeFiberRef,
|
|
3
3
|
makeRuntimeRecorder
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-S6KSHYAT.mjs";
|
|
5
5
|
import {
|
|
6
6
|
withHttpObservability
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AITYRQX2.mjs";
|
|
8
8
|
import {
|
|
9
9
|
makeObservability
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SCHM2MDA.mjs";
|
|
11
11
|
import {
|
|
12
12
|
EventBus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WA65XP2P.mjs";
|
|
14
14
|
import {
|
|
15
15
|
makeDefaultHttpClient,
|
|
16
16
|
makeHttp
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ID2WOCBA.mjs";
|
|
18
18
|
import {
|
|
19
19
|
Runtime,
|
|
20
20
|
Scheduler
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BFNBU47C.mjs";
|
|
22
22
|
import {
|
|
23
23
|
asyncFlatMap,
|
|
24
24
|
asyncSucceed,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkVXNWVAIGcjs = require('./chunk-VXNWVAIG.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkZZ2CMYJLcjs = require('./chunk-ZZ2CMYJL.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ var _chunk6STX4PS3cjs = require('./chunk-6STX4PS3.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkJKHBEWQAcjs = require('./chunk-JKHBEWQA.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -63,19 +63,19 @@ function linkAbortController(token, ac) {
|
|
|
63
63
|
|
|
64
64
|
// src/core/runtime/dx.ts
|
|
65
65
|
function makeRuntime(env = {}, options = {}) {
|
|
66
|
-
return new (0,
|
|
66
|
+
return new (0, _chunkJKHBEWQAcjs.Runtime)({ ...options, env });
|
|
67
67
|
}
|
|
68
68
|
function runPromise(effect, envOrRuntime) {
|
|
69
|
-
if (envOrRuntime instanceof
|
|
70
|
-
return
|
|
69
|
+
if (envOrRuntime instanceof _chunkJKHBEWQAcjs.Runtime) return envOrRuntime.toPromise(effect);
|
|
70
|
+
return _chunkJKHBEWQAcjs.toPromise.call(void 0, effect, envOrRuntime);
|
|
71
71
|
}
|
|
72
72
|
function runExit(effect, envOrRuntime) {
|
|
73
73
|
return new Promise((resolve) => {
|
|
74
|
-
if (envOrRuntime instanceof
|
|
74
|
+
if (envOrRuntime instanceof _chunkJKHBEWQAcjs.Runtime) {
|
|
75
75
|
envOrRuntime.unsafeRunAsync(effect, resolve);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
_chunkJKHBEWQAcjs.unsafeRunAsync.call(void 0, effect, envOrRuntime, resolve);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
var runEffect = runPromise;
|
|
@@ -162,7 +162,7 @@ function makeSemaphore(n) {
|
|
|
162
162
|
released = true;
|
|
163
163
|
release();
|
|
164
164
|
};
|
|
165
|
-
const fiber =
|
|
165
|
+
const fiber = _chunkJKHBEWQAcjs.getCurrentFiber.call(void 0, );
|
|
166
166
|
_optionalChain([fiber, 'optionalAccess', _2 => _2.addFinalizer, 'call', _3 => _3(() => {
|
|
167
167
|
releaseOnce();
|
|
168
168
|
})]);
|
|
@@ -496,7 +496,7 @@ function makeTestRuntime(env, options = {}) {
|
|
|
496
496
|
const scheduler = new TestScheduler(options);
|
|
497
497
|
const clock = new TestClock(options.initialTimeMs, () => scheduler.flushAll(options.maxSteps), options.maxSteps);
|
|
498
498
|
const testEnv = withTestClock(_nullishCoalesce(env, () => ( {})), clock);
|
|
499
|
-
const runtime =
|
|
499
|
+
const runtime = _chunkJKHBEWQAcjs.Runtime.makeWithEngine(testEnv, "ts", { scheduler });
|
|
500
500
|
const flush = (maxTasks) => scheduler.flush(maxTasks);
|
|
501
501
|
const flushAll = (maxSteps) => scheduler.flushAll(maxSteps);
|
|
502
502
|
const advance = (ms) => clock.advance(ms);
|
|
@@ -567,7 +567,7 @@ function firstFailureValue(exit) {
|
|
|
567
567
|
return failure._tag === "Some" ? failure.value : void 0;
|
|
568
568
|
}
|
|
569
569
|
function makeAssertionRuntime(runtime) {
|
|
570
|
-
return _nullishCoalesce(runtime, () => (
|
|
570
|
+
return _nullishCoalesce(runtime, () => ( _chunkJKHBEWQAcjs.Runtime.make({})));
|
|
571
571
|
}
|
|
572
572
|
async function assertSucceeds(effect, expected, runtime) {
|
|
573
573
|
const rt = makeAssertionRuntime(runtime);
|
|
@@ -603,9 +603,9 @@ async function assertFailsWith(effect, predicate, runtime) {
|
|
|
603
603
|
}
|
|
604
604
|
async function assertCompletesWithin(effect, maxMs, runtime) {
|
|
605
605
|
const rt = makeAssertionRuntime(runtime);
|
|
606
|
-
const start =
|
|
606
|
+
const start = _chunkJKHBEWQAcjs.runtimeClockFromEnv.call(void 0, rt.env).now();
|
|
607
607
|
const result = await rt.toPromise(effect);
|
|
608
|
-
const elapsed =
|
|
608
|
+
const elapsed = _chunkJKHBEWQAcjs.runtimeClockFromEnv.call(void 0, rt.env).now() - start;
|
|
609
609
|
if (elapsed > maxMs) {
|
|
610
610
|
throw new Error(`Effect took ${elapsed.toFixed(1)}ms, expected < ${maxMs}ms`);
|
|
611
611
|
}
|
|
@@ -624,7 +624,7 @@ function flakyEffect(failCount, successValue, errorValue) {
|
|
|
624
624
|
}
|
|
625
625
|
function delayedEffect(ms, value) {
|
|
626
626
|
return _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (env, cb) => {
|
|
627
|
-
const clock =
|
|
627
|
+
const clock = _chunkJKHBEWQAcjs.runtimeClockFromEnv.call(void 0, env);
|
|
628
628
|
const id = clock.setTimeout(() => cb(_chunkMVGUEJ5Zcjs.Exit.succeed(value)), ms);
|
|
629
629
|
return () => clock.clearTimeout(id);
|
|
630
630
|
});
|
|
@@ -638,7 +638,7 @@ function neverEffect() {
|
|
|
638
638
|
|
|
639
639
|
// src/core/runtime/configLayer.ts
|
|
640
640
|
function makeConfigLayer(tag, schema, source, options = {}) {
|
|
641
|
-
return
|
|
641
|
+
return _chunkZZ2CMYJLcjs.layerEffect.call(void 0,
|
|
642
642
|
tag,
|
|
643
643
|
(context) => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0,
|
|
644
644
|
() => _chunkKPOL2YEOcjs.parseConfig.call(void 0, _nullishCoalesce(options.name, () => ( tag.name)), schema, readConfigSource(source, context))
|
|
@@ -829,7 +829,7 @@ var RuntimeRegistry = (_class4 = class {constructor() { _class4.prototype.__init
|
|
|
829
829
|
__init18() {this.recent = []}
|
|
830
830
|
__init19() {this.recentCap = 2e3}
|
|
831
831
|
emit(ev, ctx) {
|
|
832
|
-
const rec =
|
|
832
|
+
const rec = _chunkVXNWVAIGcjs.makeRuntimeEventRecord.call(void 0, ev, ctx, this.seq++);
|
|
833
833
|
this.recent.push(rec);
|
|
834
834
|
if (this.recent.length > this.recentCap) this.recent.shift();
|
|
835
835
|
switch (rec.type) {
|
|
@@ -1174,7 +1174,7 @@ var Supervisor = (_class5 = class {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
record.restartTimes.push(now);
|
|
1176
1176
|
if (record.restart.schedule) {
|
|
1177
|
-
record.scheduleDriver ??=
|
|
1177
|
+
record.scheduleDriver ??= _chunkZZ2CMYJLcjs.makeScheduleDriver.call(void 0, record.restart.schedule, {
|
|
1178
1178
|
name: _nullishCoalesce(record.restart.schedule.name, () => ( "supervisor.restart")),
|
|
1179
1179
|
clock: this.scheduleClock()
|
|
1180
1180
|
});
|
|
@@ -1224,8 +1224,8 @@ var Supervisor = (_class5 = class {
|
|
|
1224
1224
|
scheduleClock() {
|
|
1225
1225
|
return {
|
|
1226
1226
|
now: this.clock,
|
|
1227
|
-
setTimeout:
|
|
1228
|
-
clearTimeout:
|
|
1227
|
+
setTimeout: _chunkJKHBEWQAcjs.liveClock.setTimeout,
|
|
1228
|
+
clearTimeout: _chunkJKHBEWQAcjs.liveClock.clearTimeout
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
1231
|
}, _class5);
|