brass-runtime 1.18.0 → 1.18.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.
Files changed (77) hide show
  1. package/dist/agent/cli/main.cjs +30 -30
  2. package/dist/agent/cli/main.js +2 -2
  3. package/dist/agent/cli/main.mjs +2 -2
  4. package/dist/agent/index.cjs +3 -3
  5. package/dist/agent/index.d.ts +1 -1
  6. package/dist/agent/index.js +2 -2
  7. package/dist/agent/index.mjs +2 -2
  8. package/dist/{chunk-PSEU65ND.js → chunk-22HZQG5F.js} +6 -6
  9. package/dist/{chunk-SSQJKDN3.cjs → chunk-2JHJ4YHS.cjs} +227 -117
  10. package/dist/{chunk-IFRBVMWJ.cjs → chunk-2OW6IFY2.cjs} +19 -19
  11. package/dist/{chunk-YTX2JYYP.cjs → chunk-5LC7V2OZ.cjs} +18 -18
  12. package/dist/{chunk-7TXQJFZX.cjs → chunk-5RZ7YITF.cjs} +13 -13
  13. package/dist/{chunk-OT2TESZU.mjs → chunk-6V2AWT4R.mjs} +1 -1
  14. package/dist/{chunk-BG5RNEA2.js → chunk-7DU7IQHK.js} +3 -3
  15. package/dist/{chunk-QCOLAHU3.mjs → chunk-7GBJYOX7.mjs} +5 -5
  16. package/dist/{chunk-ITG6I7ZS.js → chunk-7VQLEN37.js} +1 -1
  17. package/dist/{chunk-QZ6QFJNM.mjs → chunk-B5FKOLTB.mjs} +3 -3
  18. package/dist/{chunk-RREBJX2S.mjs → chunk-BC6Q6BCO.mjs} +1 -1
  19. package/dist/{chunk-KRYP6CAE.mjs → chunk-COOW7BJX.mjs} +2 -2
  20. package/dist/{chunk-ELLF55ER.mjs → chunk-EEN5OTCR.mjs} +1 -1
  21. package/dist/{chunk-3PFZGP23.cjs → chunk-EICAJDNX.cjs} +13 -13
  22. package/dist/{chunk-5XADBMSU.cjs → chunk-ELIECDYN.cjs} +5 -5
  23. package/dist/{chunk-2QNREG6K.mjs → chunk-H626ZTDZ.mjs} +211 -101
  24. package/dist/{chunk-JH4GI3DW.js → chunk-IPSMXUWA.js} +1 -1
  25. package/dist/{chunk-2SLT3X6G.cjs → chunk-J6DUHITE.cjs} +6 -6
  26. package/dist/{chunk-OI4ESUMC.mjs → chunk-JWIEMBE6.mjs} +6 -6
  27. package/dist/{chunk-N6QNSTWD.cjs → chunk-KNTJ7FQB.cjs} +5 -5
  28. package/dist/{chunk-W6WR37HN.js → chunk-LSYQ3C2M.js} +2 -2
  29. package/dist/{chunk-AADFFVYS.js → chunk-OW5VHAOE.js} +1 -1
  30. package/dist/{chunk-G5JTCFMI.mjs → chunk-RBHNOKH4.mjs} +2 -2
  31. package/dist/{chunk-IBRHSH5H.js → chunk-S4HXADU4.js} +1 -1
  32. package/dist/{chunk-XSAHV5HQ.js → chunk-TTSPIU3U.js} +211 -101
  33. package/dist/{chunk-S4HHFUYP.js → chunk-UAKAF32U.js} +2 -2
  34. package/dist/{chunk-R6WDSZA6.mjs → chunk-WCBNXPN6.mjs} +1 -1
  35. package/dist/{chunk-AJMKZXRB.cjs → chunk-WGE2FEZE.cjs} +2 -2
  36. package/dist/{chunk-LXBU5E77.cjs → chunk-WI7GZF3B.cjs} +16 -16
  37. package/dist/{chunk-H5GYX7RZ.js → chunk-WUDHOZIH.js} +113 -5
  38. package/dist/{chunk-KHACHFBQ.cjs → chunk-WVSZOPGQ.cjs} +54 -54
  39. package/dist/{chunk-VIFA4DPN.cjs → chunk-XPIMJQYS.cjs} +193 -85
  40. package/dist/{chunk-3PHU7FWS.js → chunk-YGR2IN4R.js} +5 -5
  41. package/dist/{chunk-ITZQ526U.mjs → chunk-YWLLH27R.mjs} +2 -2
  42. package/dist/{chunk-4YQHPIWJ.js → chunk-YZ5LQ32F.js} +2 -2
  43. package/dist/{chunk-Z3PSSXP3.mjs → chunk-Z3ZZMQUZ.mjs} +113 -5
  44. package/dist/core/index.cjs +13 -7
  45. package/dist/core/index.d.ts +6 -6
  46. package/dist/core/index.js +12 -6
  47. package/dist/core/index.mjs +12 -6
  48. package/dist/{defaultClient-DhpCQW9m.d.ts → defaultClient-Cid0JoUR.d.ts} +29 -4
  49. package/dist/{effect-CtUDl5M5.d.ts → effect-DnGUuhw6.d.ts} +22 -1
  50. package/dist/http/index.cjs +52 -48
  51. package/dist/http/index.d.ts +8 -8
  52. package/dist/http/index.js +10 -6
  53. package/dist/http/index.mjs +10 -6
  54. package/dist/http/testing.cjs +8 -8
  55. package/dist/http/testing.d.ts +4 -4
  56. package/dist/http/testing.js +4 -4
  57. package/dist/http/testing.mjs +4 -4
  58. package/dist/index.cjs +91 -85
  59. package/dist/index.d.ts +7 -7
  60. package/dist/index.js +13 -7
  61. package/dist/index.mjs +13 -7
  62. package/dist/{layer-BalPI6cN.d.ts → layer-D2LFcBVx.d.ts} +1 -1
  63. package/dist/observability/index.cjs +9 -9
  64. package/dist/observability/index.d.ts +7 -7
  65. package/dist/observability/index.js +8 -8
  66. package/dist/observability/index.mjs +8 -8
  67. package/dist/perf/cli.cjs +25 -25
  68. package/dist/perf/cli.js +10 -10
  69. package/dist/perf/cli.mjs +10 -10
  70. package/dist/perf/index.cjs +12 -12
  71. package/dist/perf/index.js +10 -10
  72. package/dist/perf/index.mjs +10 -10
  73. package/dist/{server-C1zVmqE6.d.ts → server-Bf1zNYZk.d.ts} +4 -4
  74. package/dist/{stream-Bb4FTejt.d.ts → stream-I7bkvF7a.d.ts} +1 -1
  75. package/dist/{tracer-DzfuE6um.d.ts → tracer-DF83nLn6.d.ts} +2 -2
  76. package/dist/{tracing-BABA5arE.d.ts → tracing-CWV4gT0u.d.ts} +1 -1
  77. package/package.json +3 -2
@@ -17,11 +17,11 @@
17
17
 
18
18
 
19
19
 
20
- var _chunk2SLT3X6Gcjs = require('../../chunk-2SLT3X6G.cjs');
20
+ var _chunkJ6DUHITEcjs = require('../../chunk-J6DUHITE.cjs');
21
21
  require('../../chunk-SA6HUJVI.cjs');
22
22
 
23
23
 
24
- var _chunkSSQJKDN3cjs = require('../../chunk-SSQJKDN3.cjs');
24
+ var _chunk2JHJ4YHScjs = require('../../chunk-2JHJ4YHS.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: ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, request.action)}
59
+ _optionalChain([output, 'optionalAccess', _3 => _3.write, 'optionalCall', _4 => _4(`Action: ${_chunkJ6DUHITEcjs.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 (!_chunk2SLT3X6Gcjs.isAgentPreset.call(void 0, value)) {
1106
+ if (!_chunkJ6DUHITEcjs.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" || !_chunk2SLT3X6Gcjs.isAgentPreset.call(void 0, preset))) {
1282
+ if (preset !== void 0 && (typeof preset !== "string" || !_chunkJ6DUHITEcjs.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 _chunk2SLT3X6Gcjs.goalForAgentPreset.call(void 0, item.preset);
1326
+ if (item.preset) return _chunkJ6DUHITEcjs.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 = _chunk2SLT3X6Gcjs.discoverNodeWorkspaceRoot.call(void 0, parsed.cwd, {
1353
+ const workspaceDiscovery = _chunkJ6DUHITEcjs.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 _chunk2SLT3X6Gcjs.loadNodeAgentConfig.call(void 0, {
1361
+ const loaded = await _chunkJ6DUHITEcjs.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 ? _chunk2SLT3X6Gcjs.goalForAgentPreset.call(void 0, parsed.preset) : parsed.patchFile ? "apply supplied patch" : parsed.goalText),
1377
+ goalText: parsed.goalText || (parsed.preset ? _chunkJ6DUHITEcjs.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 _chunk2SLT3X6Gcjs.makeGoogleGenerativeAILLM.call(void 0, {
1501
+ return _chunkJ6DUHITEcjs.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 _chunk2SLT3X6Gcjs.makeOpenAICompatibleLLM.call(void 0, { endpoint, apiKey, model });
1519
+ return _chunkJ6DUHITEcjs.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 _chunk2SLT3X6Gcjs.makeFakeLLM.call(void 0, { content: fakeResponse });
1524
+ if (provider === "fake") return _chunkJ6DUHITEcjs.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))), () => ( _chunk2SLT3X6Gcjs.makeFakeLLM.call(void 0, { content: fakeResponse })));
1546
+ return _nullishCoalesce(_nullishCoalesce(makeGoogleLLMFromEnv(config), () => ( makeOpenAICompatibleLLMFromEnv(config))), () => ( _chunkJ6DUHITEcjs.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 _chunk2SLT3X6Gcjs.autoApproveApprovals;
1569
+ return _chunkJ6DUHITEcjs.autoApproveApprovals;
1570
1570
  case "deny":
1571
- return _chunk2SLT3X6Gcjs.makeAutoDenyApprovals.call(void 0, "Approval rejected because the CLI is running without interactive input. Use --yes to auto-approve.");
1571
+ return _chunkJ6DUHITEcjs.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 ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, event.action)}`);
1703
+ console.log(`\u2192 ${_chunkJ6DUHITEcjs.summarizeAgentAction.call(void 0, event.action)}`);
1704
1704
  break;
1705
1705
  case "agent.action.completed": {
1706
- const status = _chunk2SLT3X6Gcjs.observationStatus.call(void 0, event.observation);
1707
- console.log(`${statusIcon2(status)} ${_chunk2SLT3X6Gcjs.summarizeAgentObservation.call(void 0, event.observation)} ${formatDuration(event.durationMs)}`);
1706
+ const status = _chunkJ6DUHITEcjs.observationStatus.call(void 0, event.observation);
1707
+ console.log(`${statusIcon2(status)} ${_chunkJ6DUHITEcjs.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 ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, event.action)} failed with ${event.error._tag} ${formatDuration(event.durationMs)}`);
1712
+ console.log(`\u2717 ${_chunkJ6DUHITEcjs.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(`! ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, event.action)} timed out after ${event.timeoutMs}ms`);
1716
+ console.log(`! ${_chunkJ6DUHITEcjs.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 ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, event.action)} denied: ${event.reason}`);
1719
+ console.log(`\u2717 ${_chunkJ6DUHITEcjs.summarizeAgentAction.call(void 0, event.action)} denied: ${event.reason}`);
1720
1720
  break;
1721
1721
  case "agent.approval.requested":
1722
- console.log(`? approval required for ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, event.action)} (${event.risk})`);
1722
+ console.log(`? approval required for ${_chunkJ6DUHITEcjs.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 ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, event.action)}`);
1726
+ console.log(`\u2713 approval granted for ${_chunkJ6DUHITEcjs.summarizeAgentAction.call(void 0, event.action)}`);
1727
1727
  } else {
1728
- console.log(`\u2717 approval rejected for ${_chunk2SLT3X6Gcjs.summarizeAgentAction.call(void 0, event.action)}${event.reason ? `: ${event.reason}` : ""}`);
1728
+ console.log(`\u2717 approval rejected for ${_chunkJ6DUHITEcjs.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 = _chunk2SLT3X6Gcjs.NodeShell;
1833
+ const shell = _chunkJ6DUHITEcjs.NodeShell;
1834
1834
  return {
1835
1835
  shell,
1836
- fs: _chunk2SLT3X6Gcjs.makeNodeFileSystem.call(void 0, shell),
1837
- patch: _chunk2SLT3X6Gcjs.makeNodePatchService.call(void 0, shell),
1836
+ fs: _chunkJ6DUHITEcjs.makeNodeFileSystem.call(void 0, shell),
1837
+ patch: _chunkJ6DUHITEcjs.makeNodePatchService.call(void 0, shell),
1838
1838
  llm: makeLLMFromEnv(parsed.config.llm),
1839
- permissions: _chunk2SLT3X6Gcjs.makeConfiguredPermissions.call(void 0, parsed.config.permissions),
1839
+ permissions: _chunkJ6DUHITEcjs.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, _chunkSSQJKDN3cjs.Runtime)({ env });
1856
+ const runtime = new (0, _chunk2JHJ4YHScjs.Runtime)({ env });
1857
1857
  const initialPatch = run.patchFile ? await readPatchFile(run.cwd, run.patchFile) : void 0;
1858
1858
  const state = await runtime.toPromise(
1859
- _chunk2SLT3X6Gcjs.runAgent.call(void 0, runtime, {
1859
+ _chunkJ6DUHITEcjs.runAgent.call(void 0, runtime, {
1860
1860
  id: `agent-${Date.now()}-${run.index + 1}`,
1861
1861
  cwd: run.cwd,
1862
1862
  text: run.goalText,
@@ -17,11 +17,11 @@ import {
17
17
  runAgent,
18
18
  summarizeAgentAction,
19
19
  summarizeAgentObservation
20
- } from "../../chunk-ITG6I7ZS.js";
20
+ } from "../../chunk-7VQLEN37.js";
21
21
  import "../../chunk-UCUBNWM2.js";
22
22
  import {
23
23
  Runtime
24
- } from "../../chunk-XSAHV5HQ.js";
24
+ } from "../../chunk-TTSPIU3U.js";
25
25
  import {
26
26
  Cause,
27
27
  Exit,
@@ -17,11 +17,11 @@ import {
17
17
  runAgent,
18
18
  summarizeAgentAction,
19
19
  summarizeAgentObservation
20
- } from "../../chunk-R6WDSZA6.mjs";
20
+ } from "../../chunk-WCBNXPN6.mjs";
21
21
  import "../../chunk-B5JD23U7.mjs";
22
22
  import {
23
23
  Runtime
24
- } from "../../chunk-2QNREG6K.mjs";
24
+ } from "../../chunk-H626ZTDZ.mjs";
25
25
  import {
26
26
  Cause,
27
27
  Exit,
@@ -73,9 +73,9 @@
73
73
 
74
74
 
75
75
 
76
- var _chunk2SLT3X6Gcjs = require('../chunk-2SLT3X6G.cjs');
76
+ var _chunkJ6DUHITEcjs = require('../chunk-J6DUHITE.cjs');
77
77
  require('../chunk-SA6HUJVI.cjs');
78
- require('../chunk-SSQJKDN3.cjs');
78
+ require('../chunk-2JHJ4YHS.cjs');
79
79
  require('../chunk-MVGUEJ5Z.cjs');
80
80
  require('../chunk-UUMKZJRJ.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 = _chunk2SLT3X6Gcjs.AGENT_CONFIG_FILE_NAMES; exports.NodeShell = _chunk2SLT3X6Gcjs.NodeShell; exports.PROJECT_LOCKFILE_PROBES = _chunk2SLT3X6Gcjs.PROJECT_LOCKFILE_PROBES; exports.PROJECT_PROFILE_PROBES = _chunk2SLT3X6Gcjs.PROJECT_PROFILE_PROBES; exports.autoApproveApprovals = _chunk2SLT3X6Gcjs.autoApproveApprovals; exports.canAutoRollback = _chunk2SLT3X6Gcjs.canAutoRollback; exports.canRequestPatchRepair = _chunk2SLT3X6Gcjs.canRequestPatchRepair; exports.commandForScript = _chunk2SLT3X6Gcjs.commandForScript; exports.decideNextAction = _chunk2SLT3X6Gcjs.decideNextAction; exports.defaultPermissions = _chunk2SLT3X6Gcjs.defaultPermissions; exports.deriveContextSearchQueries = _chunk2SLT3X6Gcjs.deriveContextSearchQueries; exports.describeCommandDiscovery = _chunk2SLT3X6Gcjs.describeCommandDiscovery; exports.describeContextDiscovery = _chunk2SLT3X6Gcjs.describeContextDiscovery; exports.describeLanguagePolicy = _chunk2SLT3X6Gcjs.describeLanguagePolicy; exports.describePatchQuality = _chunk2SLT3X6Gcjs.describePatchQuality; exports.describeProjectProfile = _chunk2SLT3X6Gcjs.describeProjectProfile; exports.describeRollbackSafety = _chunk2SLT3X6Gcjs.describeRollbackSafety; exports.discoverNodeWorkspaceRoot = _chunk2SLT3X6Gcjs.discoverNodeWorkspaceRoot; exports.discoverPackageManager = _chunk2SLT3X6Gcjs.discoverPackageManager; exports.discoverProjectProfile = _chunk2SLT3X6Gcjs.discoverProjectProfile; exports.discoverValidationCommands = _chunk2SLT3X6Gcjs.discoverValidationCommands; exports.emitAgentEvent = _chunk2SLT3X6Gcjs.emitAgentEvent; exports.emitAgentEvents = _chunk2SLT3X6Gcjs.emitAgentEvents; exports.errorEventFor = _chunk2SLT3X6Gcjs.errorEventFor; exports.extractLikelyFilePaths = _chunk2SLT3X6Gcjs.extractLikelyFilePaths; exports.extractPatchPaths = _chunk2SLT3X6Gcjs.extractPatchPaths; exports.extractUnifiedDiff = _chunk2SLT3X6Gcjs.extractUnifiedDiff; exports.goalForAgentPreset = _chunk2SLT3X6Gcjs.goalForAgentPreset; exports.inferUserLanguage = _chunk2SLT3X6Gcjs.inferUserLanguage; exports.initialAgentState = _chunk2SLT3X6Gcjs.initialAgentState; exports.invokeAction = _chunk2SLT3X6Gcjs.invokeAction; exports.isAgentConfigApprovalMode = _chunk2SLT3X6Gcjs.isAgentConfigApprovalMode; exports.isAgentConfigLLMProvider = _chunk2SLT3X6Gcjs.isAgentConfigLLMProvider; exports.isAgentConfigMode = _chunk2SLT3X6Gcjs.isAgentConfigMode; exports.isAgentPreset = _chunk2SLT3X6Gcjs.isAgentPreset; exports.isRedactionEnabled = _chunk2SLT3X6Gcjs.isRedactionEnabled; exports.isTerminal = _chunk2SLT3X6Gcjs.isTerminal; exports.latestUnappliedPatch = _chunk2SLT3X6Gcjs.latestUnappliedPatch; exports.loadNodeAgentConfig = _chunk2SLT3X6Gcjs.loadNodeAgentConfig; exports.makeAutoDenyApprovals = _chunk2SLT3X6Gcjs.makeAutoDenyApprovals; exports.makeConfiguredPermissions = _chunk2SLT3X6Gcjs.makeConfiguredPermissions; exports.makeFakeLLM = _chunk2SLT3X6Gcjs.makeFakeLLM; exports.makeGoogleGenerativeAILLM = _chunk2SLT3X6Gcjs.makeGoogleGenerativeAILLM; exports.makeNodeFileSystem = _chunk2SLT3X6Gcjs.makeNodeFileSystem; exports.makeNodePatchService = _chunk2SLT3X6Gcjs.makeNodePatchService; exports.makeOpenAICompatibleLLM = _chunk2SLT3X6Gcjs.makeOpenAICompatibleLLM; exports.nextContextDiscoveryAction = _chunk2SLT3X6Gcjs.nextContextDiscoveryAction; exports.nextProjectProbeAction = _chunk2SLT3X6Gcjs.nextProjectProbeAction; exports.nextUnrunValidationCommand = _chunk2SLT3X6Gcjs.nextUnrunValidationCommand; exports.nowMillis = _chunk2SLT3X6Gcjs.nowMillis; exports.observationEventFor = _chunk2SLT3X6Gcjs.observationEventFor; exports.observationStatus = _chunk2SLT3X6Gcjs.observationStatus; exports.parseProjectPackageJson = _chunk2SLT3X6Gcjs.parseProjectPackageJson; exports.patchQualitySummary = _chunk2SLT3X6Gcjs.patchQualitySummary; exports.patchRepairAttemptsUsed = _chunk2SLT3X6Gcjs.patchRepairAttemptsUsed; exports.patchValidationStatus = _chunk2SLT3X6Gcjs.patchValidationStatus; exports.projectProfileProbePending = _chunk2SLT3X6Gcjs.projectProfileProbePending; exports.redactText = _chunk2SLT3X6Gcjs.redactText; exports.reduceAgentState = _chunk2SLT3X6Gcjs.reduceAgentState; exports.responseLanguageName = _chunk2SLT3X6Gcjs.responseLanguageName; exports.retry = _chunk2SLT3X6Gcjs.retry; exports.rollbackSafetySummary = _chunk2SLT3X6Gcjs.rollbackSafetySummary; exports.runAgent = _chunk2SLT3X6Gcjs.runAgent; exports.runStatusFor = _chunk2SLT3X6Gcjs.runStatusFor; exports.shouldContinueRollbackStack = _chunk2SLT3X6Gcjs.shouldContinueRollbackStack; exports.sleep = _chunk2SLT3X6Gcjs.sleep; exports.spanishLike = _chunk2SLT3X6Gcjs.spanishLike; exports.splitCommand = _chunk2SLT3X6Gcjs.splitCommand; exports.summarizeAgentAction = _chunk2SLT3X6Gcjs.summarizeAgentAction; exports.summarizeAgentObservation = _chunk2SLT3X6Gcjs.summarizeAgentObservation; exports.summarizeContextDiscovery = _chunk2SLT3X6Gcjs.summarizeContextDiscovery; exports.timeout = _chunk2SLT3X6Gcjs.timeout; exports.unappliedPatchStack = _chunk2SLT3X6Gcjs.unappliedPatchStack; exports.workspaceValidationStatus = _chunk2SLT3X6Gcjs.workspaceValidationStatus;
157
+ exports.AGENT_CONFIG_FILE_NAMES = _chunkJ6DUHITEcjs.AGENT_CONFIG_FILE_NAMES; exports.NodeShell = _chunkJ6DUHITEcjs.NodeShell; exports.PROJECT_LOCKFILE_PROBES = _chunkJ6DUHITEcjs.PROJECT_LOCKFILE_PROBES; exports.PROJECT_PROFILE_PROBES = _chunkJ6DUHITEcjs.PROJECT_PROFILE_PROBES; exports.autoApproveApprovals = _chunkJ6DUHITEcjs.autoApproveApprovals; exports.canAutoRollback = _chunkJ6DUHITEcjs.canAutoRollback; exports.canRequestPatchRepair = _chunkJ6DUHITEcjs.canRequestPatchRepair; exports.commandForScript = _chunkJ6DUHITEcjs.commandForScript; exports.decideNextAction = _chunkJ6DUHITEcjs.decideNextAction; exports.defaultPermissions = _chunkJ6DUHITEcjs.defaultPermissions; exports.deriveContextSearchQueries = _chunkJ6DUHITEcjs.deriveContextSearchQueries; exports.describeCommandDiscovery = _chunkJ6DUHITEcjs.describeCommandDiscovery; exports.describeContextDiscovery = _chunkJ6DUHITEcjs.describeContextDiscovery; exports.describeLanguagePolicy = _chunkJ6DUHITEcjs.describeLanguagePolicy; exports.describePatchQuality = _chunkJ6DUHITEcjs.describePatchQuality; exports.describeProjectProfile = _chunkJ6DUHITEcjs.describeProjectProfile; exports.describeRollbackSafety = _chunkJ6DUHITEcjs.describeRollbackSafety; exports.discoverNodeWorkspaceRoot = _chunkJ6DUHITEcjs.discoverNodeWorkspaceRoot; exports.discoverPackageManager = _chunkJ6DUHITEcjs.discoverPackageManager; exports.discoverProjectProfile = _chunkJ6DUHITEcjs.discoverProjectProfile; exports.discoverValidationCommands = _chunkJ6DUHITEcjs.discoverValidationCommands; exports.emitAgentEvent = _chunkJ6DUHITEcjs.emitAgentEvent; exports.emitAgentEvents = _chunkJ6DUHITEcjs.emitAgentEvents; exports.errorEventFor = _chunkJ6DUHITEcjs.errorEventFor; exports.extractLikelyFilePaths = _chunkJ6DUHITEcjs.extractLikelyFilePaths; exports.extractPatchPaths = _chunkJ6DUHITEcjs.extractPatchPaths; exports.extractUnifiedDiff = _chunkJ6DUHITEcjs.extractUnifiedDiff; exports.goalForAgentPreset = _chunkJ6DUHITEcjs.goalForAgentPreset; exports.inferUserLanguage = _chunkJ6DUHITEcjs.inferUserLanguage; exports.initialAgentState = _chunkJ6DUHITEcjs.initialAgentState; exports.invokeAction = _chunkJ6DUHITEcjs.invokeAction; exports.isAgentConfigApprovalMode = _chunkJ6DUHITEcjs.isAgentConfigApprovalMode; exports.isAgentConfigLLMProvider = _chunkJ6DUHITEcjs.isAgentConfigLLMProvider; exports.isAgentConfigMode = _chunkJ6DUHITEcjs.isAgentConfigMode; exports.isAgentPreset = _chunkJ6DUHITEcjs.isAgentPreset; exports.isRedactionEnabled = _chunkJ6DUHITEcjs.isRedactionEnabled; exports.isTerminal = _chunkJ6DUHITEcjs.isTerminal; exports.latestUnappliedPatch = _chunkJ6DUHITEcjs.latestUnappliedPatch; exports.loadNodeAgentConfig = _chunkJ6DUHITEcjs.loadNodeAgentConfig; exports.makeAutoDenyApprovals = _chunkJ6DUHITEcjs.makeAutoDenyApprovals; exports.makeConfiguredPermissions = _chunkJ6DUHITEcjs.makeConfiguredPermissions; exports.makeFakeLLM = _chunkJ6DUHITEcjs.makeFakeLLM; exports.makeGoogleGenerativeAILLM = _chunkJ6DUHITEcjs.makeGoogleGenerativeAILLM; exports.makeNodeFileSystem = _chunkJ6DUHITEcjs.makeNodeFileSystem; exports.makeNodePatchService = _chunkJ6DUHITEcjs.makeNodePatchService; exports.makeOpenAICompatibleLLM = _chunkJ6DUHITEcjs.makeOpenAICompatibleLLM; exports.nextContextDiscoveryAction = _chunkJ6DUHITEcjs.nextContextDiscoveryAction; exports.nextProjectProbeAction = _chunkJ6DUHITEcjs.nextProjectProbeAction; exports.nextUnrunValidationCommand = _chunkJ6DUHITEcjs.nextUnrunValidationCommand; exports.nowMillis = _chunkJ6DUHITEcjs.nowMillis; exports.observationEventFor = _chunkJ6DUHITEcjs.observationEventFor; exports.observationStatus = _chunkJ6DUHITEcjs.observationStatus; exports.parseProjectPackageJson = _chunkJ6DUHITEcjs.parseProjectPackageJson; exports.patchQualitySummary = _chunkJ6DUHITEcjs.patchQualitySummary; exports.patchRepairAttemptsUsed = _chunkJ6DUHITEcjs.patchRepairAttemptsUsed; exports.patchValidationStatus = _chunkJ6DUHITEcjs.patchValidationStatus; exports.projectProfileProbePending = _chunkJ6DUHITEcjs.projectProfileProbePending; exports.redactText = _chunkJ6DUHITEcjs.redactText; exports.reduceAgentState = _chunkJ6DUHITEcjs.reduceAgentState; exports.responseLanguageName = _chunkJ6DUHITEcjs.responseLanguageName; exports.retry = _chunkJ6DUHITEcjs.retry; exports.rollbackSafetySummary = _chunkJ6DUHITEcjs.rollbackSafetySummary; exports.runAgent = _chunkJ6DUHITEcjs.runAgent; exports.runStatusFor = _chunkJ6DUHITEcjs.runStatusFor; exports.shouldContinueRollbackStack = _chunkJ6DUHITEcjs.shouldContinueRollbackStack; exports.sleep = _chunkJ6DUHITEcjs.sleep; exports.spanishLike = _chunkJ6DUHITEcjs.spanishLike; exports.splitCommand = _chunkJ6DUHITEcjs.splitCommand; exports.summarizeAgentAction = _chunkJ6DUHITEcjs.summarizeAgentAction; exports.summarizeAgentObservation = _chunkJ6DUHITEcjs.summarizeAgentObservation; exports.summarizeContextDiscovery = _chunkJ6DUHITEcjs.summarizeContextDiscovery; exports.timeout = _chunkJ6DUHITEcjs.timeout; exports.unappliedPatchStack = _chunkJ6DUHITEcjs.unappliedPatchStack; exports.workspaceValidationStatus = _chunkJ6DUHITEcjs.workspaceValidationStatus;
@@ -1,4 +1,4 @@
1
- import { A as Async, b as Runtime, S as Scope } from '../effect-CtUDl5M5.js';
1
+ import { A as Async, b as Runtime, S as Scope } from '../effect-DnGUuhw6.js';
2
2
 
3
3
  type AgentMode = "read-only" | "propose" | "write" | "autonomous";
4
4
  type AgentPackageManager = "npm" | "pnpm" | "yarn" | "bun";
@@ -73,9 +73,9 @@ import {
73
73
  timeout,
74
74
  unappliedPatchStack,
75
75
  workspaceValidationStatus
76
- } from "../chunk-ITG6I7ZS.js";
76
+ } from "../chunk-7VQLEN37.js";
77
77
  import "../chunk-UCUBNWM2.js";
78
- import "../chunk-XSAHV5HQ.js";
78
+ import "../chunk-TTSPIU3U.js";
79
79
  import "../chunk-UB4B6OFY.js";
80
80
  import "../chunk-HCJ4S3YB.js";
81
81
  import "../chunk-3RG5ZIWI.js";
@@ -73,9 +73,9 @@ import {
73
73
  timeout,
74
74
  unappliedPatchStack,
75
75
  workspaceValidationStatus
76
- } from "../chunk-R6WDSZA6.mjs";
76
+ } from "../chunk-WCBNXPN6.mjs";
77
77
  import "../chunk-B5JD23U7.mjs";
78
- import "../chunk-2QNREG6K.mjs";
78
+ import "../chunk-H626ZTDZ.mjs";
79
79
  import "../chunk-36I3M4UC.mjs";
80
80
  import "../chunk-6MLAZPBL.mjs";
81
81
  import "../chunk-Y6FXYEAI.mjs";
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  makeFiberRef,
3
3
  makeRuntimeRecorder
4
- } from "./chunk-S4HHFUYP.js";
4
+ } from "./chunk-UAKAF32U.js";
5
5
  import {
6
6
  withHttpObservability
7
- } from "./chunk-3PHU7FWS.js";
7
+ } from "./chunk-YGR2IN4R.js";
8
8
  import {
9
9
  makeObservability
10
- } from "./chunk-4YQHPIWJ.js";
10
+ } from "./chunk-YZ5LQ32F.js";
11
11
  import {
12
12
  EventBus
13
- } from "./chunk-AADFFVYS.js";
13
+ } from "./chunk-OW5VHAOE.js";
14
14
  import {
15
15
  makeDefaultHttpClient,
16
16
  makeHttp
17
- } from "./chunk-H5GYX7RZ.js";
17
+ } from "./chunk-WUDHOZIH.js";
18
18
  import {
19
19
  Runtime,
20
20
  Scheduler
21
- } from "./chunk-XSAHV5HQ.js";
21
+ } from "./chunk-TTSPIU3U.js";
22
22
  import {
23
23
  asyncFlatMap,
24
24
  asyncSucceed,