agency-lang 0.7.1 → 0.7.2

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 (39) hide show
  1. package/dist/lib/agents/agency-agent/agent.agency +48 -2
  2. package/dist/lib/agents/agency-agent/agent.js +120 -20
  3. package/dist/lib/agents/agency-agent/shared.agency +22 -0
  4. package/dist/lib/agents/agency-agent/shared.js +158 -1
  5. package/dist/lib/agents/agency-agent/tests/oneShotRounds.agency +20 -0
  6. package/dist/lib/agents/agency-agent/tests/oneShotRounds.js +555 -0
  7. package/dist/lib/agents/agency-agent/tests/oneShotRounds.test.json +9 -0
  8. package/dist/lib/cli/doctor.d.ts +8 -0
  9. package/dist/lib/cli/doctor.js +21 -13
  10. package/dist/lib/cli/doctor.test.js +34 -0
  11. package/dist/lib/cli/help.js +1 -5
  12. package/dist/lib/cli/runBundledAgent.d.ts +17 -1
  13. package/dist/lib/cli/runBundledAgent.js +73 -2
  14. package/dist/lib/cli/runBundledAgent.test.d.ts +1 -0
  15. package/dist/lib/cli/runBundledAgent.test.js +96 -0
  16. package/dist/lib/config.d.ts +42 -33
  17. package/dist/lib/config.js +108 -6
  18. package/dist/lib/config.test.js +121 -2
  19. package/dist/lib/parseCache.js +8 -13
  20. package/dist/lib/parseCache.test.js +5 -8
  21. package/dist/lib/parser.js +5 -12
  22. package/dist/lib/preprocessors/typescriptPreprocessor.d.ts +0 -28
  23. package/dist/lib/preprocessors/typescriptPreprocessor.js +0 -245
  24. package/dist/lib/runtime/configOverrides.d.ts +17 -16
  25. package/dist/lib/runtime/configOverrides.js +27 -16
  26. package/dist/lib/runtime/configOverrides.test.js +116 -2
  27. package/dist/lib/runtime/prompt.js +7 -3
  28. package/dist/lib/runtime/state/context.js +9 -2
  29. package/dist/lib/stdlib/llm.d.ts +1 -0
  30. package/dist/lib/stdlib/version.d.ts +1 -1
  31. package/dist/lib/stdlib/version.js +1 -1
  32. package/dist/scripts/agency.d.ts +2 -0
  33. package/dist/scripts/agency.js +55 -12
  34. package/dist/scripts/agency.test.js +73 -1
  35. package/package.json +1 -1
  36. package/stdlib/llm.agency +2 -1
  37. package/stdlib/llm.js +2 -2
  38. package/dist/lib/preprocessors/typescriptPreprocessor.config.test.js +0 -327
  39. /package/dist/lib/{preprocessors/typescriptPreprocessor.config.test.d.ts → cli/doctor.test.d.ts} +0 -0
@@ -9,7 +9,7 @@ import { map } from "std::array"
9
9
  import { today } from "std::date"
10
10
  import { generateImage } from "std::image"
11
11
  import { applyAgentCwd, setAgentCwd } from "std::index"
12
- import { listHostedModels, hostedModelInfo } from "std::llm"
12
+ import { listHostedModels, hostedModelInfo, setLlmOptions } from "std::llm"
13
13
  import { setMemoryId, disableMemory } from "std::memory"
14
14
  import { keys } from "std::object"
15
15
  import { basename, dirname } from "std::path"
@@ -81,6 +81,7 @@ import {
81
81
  applyResolved,
82
82
  promoteAll,
83
83
  currentProvider,
84
+ resolveMaxToolCallRounds,
84
85
  } from "./shared.agency"
85
86
  import { codeAgent } from "./subagents/code.agency"
86
87
  import { explorerAgent } from "./subagents/explorer.agency"
@@ -1267,11 +1268,34 @@ node main() {
1267
1268
  type: "string",
1268
1269
  optional: true,
1269
1270
  description: "Deprecated alias for --local."
1271
+ },
1272
+ trace: {
1273
+ type: "string",
1274
+ optional: true,
1275
+ description: "Write an execution trace to this file for debugging (bare --trace writes <runId>.agencytrace in the current directory)"
1276
+ },
1277
+ "log-file": {
1278
+ type: "string",
1279
+ description: "Append structured statelog events (one JSON object per line) to this file for debugging"
1280
+ },
1281
+ "max-tool-call-rounds": {
1282
+ type: "number",
1283
+ description: "Max LLM tool-call rounds before a tool loop halts (default 10 interactive, 50 in one-shot/-p mode)"
1284
+ },
1285
+ "max-tool-result-chars": {
1286
+ type: "number",
1287
+ description: "Max chars of a single tool result fed back to the model (0 disables; default 100000)"
1270
1288
  }
1271
1289
  }
1272
1290
  },
1273
1291
  )
1274
1292
 
1293
+ // NOTE: --trace / --log-file are declared here only for --help and so
1294
+ // parseArgs accepts them. runBundledAgent extracts them from the forwarded
1295
+ // args and passes them to this process as the AGENCY_CONFIG_OVERRIDES env
1296
+ // var, read when the RuntimeContext is constructed — before this main() runs.
1297
+ // Do not re-handle them here.
1298
+
1275
1299
  if (args.flags.debug) {
1276
1300
  AGENT_DEBUG = true
1277
1301
  }
@@ -1388,6 +1412,28 @@ node main() {
1388
1412
  const startAgent = args.flags.agent ?? ""
1389
1413
  const wantInteractive = args.flags.interactive
1390
1414
 
1415
+ // Seeded interactive: run the prompt as the first turn, then hand over the
1416
+ // REPL (needs a TTY + query, and not --print). Everything else is one-shot.
1417
+ const seededInteractive = wantInteractive && hasQuery && isTTY() && !args.flags.print
1418
+ const runningOneShot = !seededInteractive && (args.flags.print || hasQuery || !isTTY())
1419
+
1420
+ // Tool-loop caps. One-shot runs (--print / piped / a positional query) have
1421
+ // no REPL to continue an autonomous task, so maxToolCallRounds defaults
1422
+ // higher (resolveMaxToolCallRounds); an explicit --max-tool-call-rounds always
1423
+ // wins. Set as branch-scoped defaults on the root branch BEFORE any subagent
1424
+ // is dispatched, so every (fork-seeded) subagent inherits them. setLlmOptions
1425
+ // merges only present keys, so this never clobbers the model defaults above.
1426
+ // Separate calls, each gated on its own value: setLlmOptions only skips
1427
+ // `undefined`, not `null`, so passing an absent key would clobber the bag.
1428
+ const maxRounds = resolveMaxToolCallRounds(args.flags["max-tool-call-rounds"] ?? null, runningOneShot)
1429
+ if (maxRounds != null) {
1430
+ setLlmOptions({ maxToolCallRounds: maxRounds })
1431
+ }
1432
+ const maxResultChars = args.flags["max-tool-result-chars"]
1433
+ if (maxResultChars != null) {
1434
+ setLlmOptions({ maxToolResultChars: maxResultChars })
1435
+ }
1436
+
1391
1437
  // Validate the target subagent name up front (empty = coordinator).
1392
1438
  if (startAgent != "" && !START_AGENTS.includes(startAgent)) {
1393
1439
  print(
@@ -1404,7 +1450,7 @@ node main() {
1404
1450
  // and exit with no REPL. Without a TTY (or with `--print`) we fall
1405
1451
  // through to one-shot below; `--interactive` with no prompt falls through
1406
1452
  // to the plain REPL.
1407
- if (wantInteractive && hasQuery && isTTY() && !args.flags.print) {
1453
+ if (seededInteractive) {
1408
1454
  setTitle("Agency Agent")
1409
1455
  clearScreen()
1410
1456
  printHeader()
@@ -6,7 +6,7 @@ import { map } from "agency-lang/stdlib/array.js";
6
6
  import { today } from "agency-lang/stdlib/date.js";
7
7
  import { generateImage } from "agency-lang/stdlib/image.js";
8
8
  import { applyAgentCwd, setAgentCwd } from "agency-lang/stdlib/index.js";
9
- import { listHostedModels, hostedModelInfo } from "agency-lang/stdlib/llm.js";
9
+ import { listHostedModels, hostedModelInfo, setLlmOptions } from "agency-lang/stdlib/llm.js";
10
10
  import { setMemoryId, disableMemory } from "agency-lang/stdlib/memory.js";
11
11
  import { keys } from "agency-lang/stdlib/object.js";
12
12
  import { basename, dirname } from "agency-lang/stdlib/path.js";
@@ -29,7 +29,7 @@ import { buildLayers, resolveAll, diffResolved, Ctx, SlotChange } from "./lib/re
29
29
  import { configureSearch, setSearchBackend, getSearchBackend, availableBackendItems } from "./lib/search.js";
30
30
  import { getModelSettings, loadSettings } from "./lib/settings.js";
31
31
  import { truncate, formatArgs, formatToolResponse } from "./lib/utils.js";
32
- import { configureModels, configureLocalModel, enableAgentMemory, getResolvedSlots, applyResolved, promoteAll, currentProvider } from "./shared.js";
32
+ import { configureModels, configureLocalModel, enableAgentMemory, getResolvedSlots, applyResolved, promoteAll, currentProvider, resolveMaxToolCallRounds } from "./shared.js";
33
33
  import { codeAgent } from "./subagents/code.js";
34
34
  import { explorerAgent } from "./subagents/explorer.js";
35
35
  import { oracleAgent } from "./subagents/oracle.js";
@@ -216,6 +216,7 @@ __registerTool(applyAgentCwd);
216
216
  __registerTool(setAgentCwd);
217
217
  __registerTool(listHostedModels);
218
218
  __registerTool(hostedModelInfo);
219
+ __registerTool(setLlmOptions);
219
220
  __registerTool(setMemoryId);
220
221
  __registerTool(disableMemory);
221
222
  __registerTool(keys);
@@ -288,6 +289,7 @@ __registerTool(getResolvedSlots);
288
289
  __registerTool(applyResolved);
289
290
  __registerTool(promoteAll);
290
291
  __registerTool(currentProvider);
292
+ __registerTool(resolveMaxToolCallRounds);
291
293
  __registerTool(codeAgent);
292
294
  __registerTool(explorerAgent);
293
295
  __registerTool(oracleAgent);
@@ -7362,6 +7364,23 @@ graph.node("main", async (__state) => {
7362
7364
  "type": `string`,
7363
7365
  "optional": true,
7364
7366
  "description": `Deprecated alias for --local.`
7367
+ },
7368
+ "trace": {
7369
+ "type": `string`,
7370
+ "optional": true,
7371
+ "description": `Write an execution trace to this file for debugging (bare --trace writes <runId>.agencytrace in the current directory)`
7372
+ },
7373
+ "log-file": {
7374
+ "type": `string`,
7375
+ "description": `Append structured statelog events (one JSON object per line) to this file for debugging`
7376
+ },
7377
+ "max-tool-call-rounds": {
7378
+ "type": `number`,
7379
+ "description": `Max LLM tool-call rounds before a tool loop halts (default 10 interactive, 50 in one-shot/-p mode)`
7380
+ },
7381
+ "max-tool-result-chars": {
7382
+ "type": `number`,
7383
+ "description": `Max chars of a single tool result fed back to the model (0 disables; default 100000)`
7365
7384
  }
7366
7385
  }
7367
7386
  }]
@@ -7849,7 +7868,91 @@ graph.node("main", async (__state) => {
7849
7868
  await runner.step(17, async (runner2) => {
7850
7869
  __stack.locals.wantInteractive = __stack.locals.args.flags.interactive;
7851
7870
  });
7852
- await runner.ifElse(18, [
7871
+ await runner.step(18, async (runner2) => {
7872
+ __stack.locals.seededInteractive = __stack.locals.wantInteractive && __stack.locals.hasQuery && await __call(isTTY, {
7873
+ type: "positional",
7874
+ args: []
7875
+ }) && !__stack.locals.args.flags.print;
7876
+ });
7877
+ await runner.step(19, async (runner2) => {
7878
+ __stack.locals.runningOneShot = !__stack.locals.seededInteractive && (__stack.locals.args.flags.print || __stack.locals.hasQuery || !await __call(isTTY, {
7879
+ type: "positional",
7880
+ args: []
7881
+ }));
7882
+ });
7883
+ await runner.step(20, async (runner2) => {
7884
+ __self.__retryable = false;
7885
+ __stack.locals.maxRounds = await __call(resolveMaxToolCallRounds, {
7886
+ type: "positional",
7887
+ args: [__stack.locals.args.flags[`max-tool-call-rounds`] ?? null, __stack.locals.runningOneShot]
7888
+ });
7889
+ if (hasInterrupts(__stack.locals.maxRounds)) {
7890
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
7891
+ runner2.halt({
7892
+ ...__state,
7893
+ data: __stack.locals.maxRounds
7894
+ });
7895
+ return;
7896
+ }
7897
+ });
7898
+ await runner.ifElse(21, [
7899
+ {
7900
+ condition: async () => !__eq(__stack.locals.maxRounds, null),
7901
+ body: async (runner2) => {
7902
+ await runner2.step(0, async (runner3) => {
7903
+ __self.__retryable = false;
7904
+ const __funcResult = await __call(setLlmOptions, {
7905
+ type: "positional",
7906
+ args: [{
7907
+ "maxToolCallRounds": __stack.locals.maxRounds
7908
+ }]
7909
+ });
7910
+ if (hasInterrupts(__funcResult)) {
7911
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
7912
+ runner3.halt({
7913
+ ...__state,
7914
+ data: __funcResult
7915
+ });
7916
+ return;
7917
+ }
7918
+ });
7919
+ }
7920
+ }
7921
+ ]);
7922
+ await runner.step(22, async (runner2) => {
7923
+ __self.__retryable = false;
7924
+ });
7925
+ await runner.step(23, async (runner2) => {
7926
+ __stack.locals.maxResultChars = __stack.locals.args.flags[`max-tool-result-chars`];
7927
+ });
7928
+ await runner.ifElse(24, [
7929
+ {
7930
+ condition: async () => !__eq(__stack.locals.maxResultChars, null),
7931
+ body: async (runner2) => {
7932
+ await runner2.step(0, async (runner3) => {
7933
+ __self.__retryable = false;
7934
+ const __funcResult = await __call(setLlmOptions, {
7935
+ type: "positional",
7936
+ args: [{
7937
+ "maxToolResultChars": __stack.locals.maxResultChars
7938
+ }]
7939
+ });
7940
+ if (hasInterrupts(__funcResult)) {
7941
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
7942
+ runner3.halt({
7943
+ ...__state,
7944
+ data: __funcResult
7945
+ });
7946
+ return;
7947
+ }
7948
+ });
7949
+ }
7950
+ }
7951
+ ]);
7952
+ await runner.step(25, async (runner2) => {
7953
+ __self.__retryable = false;
7954
+ });
7955
+ await runner.ifElse(26, [
7853
7956
  {
7854
7957
  condition: async () => !__eq(__stack.locals.startAgent, ``) && !await __callMethod(__readStatic(START_AGENTS, "START_AGENTS", "dist/lib/agents/agency-agent/agent.agency"), "includes", {
7855
7958
  type: "positional",
@@ -7885,14 +7988,11 @@ graph.node("main", async (__state) => {
7885
7988
  }
7886
7989
  }
7887
7990
  ]);
7888
- await runner.step(19, async (runner2) => {
7991
+ await runner.step(27, async (runner2) => {
7889
7992
  });
7890
- await runner.ifElse(20, [
7993
+ await runner.ifElse(28, [
7891
7994
  {
7892
- condition: async () => __stack.locals.wantInteractive && __stack.locals.hasQuery && await __call(isTTY, {
7893
- type: "positional",
7894
- args: []
7895
- }) && !__stack.locals.args.flags.print,
7995
+ condition: async () => __stack.locals.seededInteractive,
7896
7996
  body: async (runner2) => {
7897
7997
  await runner2.step(0, async (runner3) => {
7898
7998
  __self.__retryable = false;
@@ -7975,13 +8075,13 @@ graph.node("main", async (__state) => {
7975
8075
  }
7976
8076
  }
7977
8077
  ]);
7978
- await runner.step(21, async (runner2) => {
8078
+ await runner.step(29, async (runner2) => {
7979
8079
  __self.__retryable = false;
7980
8080
  });
7981
- await runner.step(22, async (runner2) => {
8081
+ await runner.step(30, async (runner2) => {
7982
8082
  __stack.locals.forceOneShot = __stack.locals.args.flags.print || __stack.locals.hasQuery;
7983
8083
  });
7984
- await runner.ifElse(23, [
8084
+ await runner.ifElse(31, [
7985
8085
  {
7986
8086
  condition: async () => __stack.locals.forceOneShot || !await __call(isTTY, {
7987
8087
  type: "positional",
@@ -8054,9 +8154,9 @@ graph.node("main", async (__state) => {
8054
8154
  }
8055
8155
  }
8056
8156
  ]);
8057
- await runner.step(24, async (runner2) => {
8157
+ await runner.step(32, async (runner2) => {
8058
8158
  });
8059
- await runner.step(25, async (runner2) => {
8159
+ await runner.step(33, async (runner2) => {
8060
8160
  __self.__retryable = false;
8061
8161
  const __funcResult = await __call(setTitle, {
8062
8162
  type: "positional",
@@ -8071,7 +8171,7 @@ graph.node("main", async (__state) => {
8071
8171
  return;
8072
8172
  }
8073
8173
  });
8074
- await runner.step(26, async (runner2) => {
8174
+ await runner.step(34, async (runner2) => {
8075
8175
  __self.__retryable = false;
8076
8176
  const __funcResult = await __call(clearScreen, {
8077
8177
  type: "positional",
@@ -8086,7 +8186,7 @@ graph.node("main", async (__state) => {
8086
8186
  return;
8087
8187
  }
8088
8188
  });
8089
- await runner.step(27, async (runner2) => {
8189
+ await runner.step(35, async (runner2) => {
8090
8190
  const __funcResult = await __call(printHeader, {
8091
8191
  type: "positional",
8092
8192
  args: []
@@ -8100,7 +8200,7 @@ graph.node("main", async (__state) => {
8100
8200
  return;
8101
8201
  }
8102
8202
  });
8103
- await runner.step(28, async (runner2) => {
8203
+ await runner.step(36, async (runner2) => {
8104
8204
  __stack.locals.handler = await __call(setupSession, {
8105
8205
  type: "positional",
8106
8206
  args: [true]
@@ -8114,7 +8214,7 @@ graph.node("main", async (__state) => {
8114
8214
  return;
8115
8215
  }
8116
8216
  });
8117
- await runner.step(29, async (runner2) => {
8217
+ await runner.step(37, async (runner2) => {
8118
8218
  const __funcResult = await __call(startInteractive, {
8119
8219
  type: "positional",
8120
8220
  args: [__stack.locals.handler, ``, ``]
@@ -8130,7 +8230,7 @@ graph.node("main", async (__state) => {
8130
8230
  });
8131
8231
  });
8132
8232
  if (runner.halted) return runner.haltResult;
8133
- await runner.hook(30, async () => {
8233
+ await runner.hook(38, async () => {
8134
8234
  await callHook({
8135
8235
  name: "onNodeEnd",
8136
8236
  data: {
@@ -8196,7 +8296,7 @@ Agent crashed: ${__error.message}`);
8196
8296
  }
8197
8297
  }
8198
8298
  var stdin_default = graph;
8199
- const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:__cb_top_0": { "1": { "line": 158, "col": 2 }, "1.0": { "line": 159, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_1": { "1": { "line": 164, "col": 2 }, "1.0.0": { "line": 165, "col": 4 }, "1.0.1": { "line": 166, "col": 6 }, "1.0.2": { "line": 167, "col": 11 }, "1.0.3": { "line": 168, "col": 6 }, "1.0.4": { "line": 170, "col": 6 }, "1.0": { "line": 165, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_2": { "1": { "line": 176, "col": 2 }, "1.0": { "line": 177, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_3": { "1": { "line": 182, "col": 2 }, "1.0": { "line": 183, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_4": { "1": { "line": 223, "col": 2 }, "1.0": { "line": 224, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_showTraces": { "1": { "line": 154, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:retryReasonLabel": { "1": { "line": 194, "col": 2 }, "2": { "line": 197, "col": 2 }, "3": { "line": 200, "col": 2 }, "4": { "line": 203, "col": 2 }, "5": { "line": 206, "col": 2 }, "6": { "line": 209, "col": 2 }, "7": { "line": 212, "col": 2 }, "1.0": { "line": 195, "col": 4 }, "2.0": { "line": 198, "col": 4 }, "3.0": { "line": 201, "col": 4 }, "4.0": { "line": 204, "col": 4 }, "5.0": { "line": 207, "col": 4 }, "6.0": { "line": 210, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:formatTurnFailure": { "1": { "line": 239, "col": 2 }, "2": { "line": 242, "col": 2 }, "3": { "line": 245, "col": 2 }, "4": { "line": 248, "col": 2 }, "1.0": { "line": 240, "col": 4 }, "2.0": { "line": 243, "col": 4 }, "3.0": { "line": 246, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:renderLLMCallResponse": { "1": { "line": 265, "col": 2 }, "2": { "line": 266, "col": 2 }, "3": { "line": 269, "col": 2 }, "5": { "line": 274, "col": 2 }, "2.0": { "line": 267, "col": 4 }, "3.0.0": { "line": 271, "col": 6 }, "3.0": { "line": 270, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:loadAgentsMd": { "1": { "line": 285, "col": 2 }, "2": { "line": 288, "col": 2 }, "3": { "line": 289, "col": 2 }, "4": { "line": 292, "col": 2 }, "1.0": { "line": 286, "col": 4 }, "2.0": { "line": 288, "col": 2 }, "3.0": { "line": 290, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:builtinPalette": { "1": { "line": 306, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:mergedPalette": { "1": { "line": 323, "col": 2 }, "2": { "line": 324, "col": 2 }, "3": { "line": 331, "col": 2 }, "4": { "line": 332, "col": 2 }, "5": { "line": 335, "col": 2 }, "2.0": { "line": 325, "col": 4 }, "2.1.0": { "line": 327, "col": 6 }, "2.1": { "line": 326, "col": 4 }, "2.2": { "line": 329, "col": 4 }, "4.0": { "line": 333, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:switchModel": { "1": { "line": 362, "col": 2 }, "2": { "line": 363, "col": 2 }, "3": { "line": 366, "col": 2 }, "4": { "line": 370, "col": 2 }, "5": { "line": 371, "col": 2 }, "7": { "line": 381, "col": 2 }, "9": { "line": 389, "col": 2 }, "10": { "line": 390, "col": 2 }, "11": { "line": 391, "col": 2 }, "12": { "line": 400, "col": 2 }, "13": { "line": 401, "col": 2 }, "15": { "line": 409, "col": 2 }, "16": { "line": 410, "col": 2 }, "17": { "line": 411, "col": 2 }, "2.0": { "line": 364, "col": 4 }, "5.0": { "line": 372, "col": 4 }, "5.1": { "line": 375, "col": 4 }, "7.0": { "line": 382, "col": 4 }, "7.1": { "line": 384, "col": 4 }, "13.0": { "line": 402, "col": 4 }, "13.1": { "line": 403, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:reactToSlotChange": { "1": { "line": 423, "col": 2 }, "3": { "line": 434, "col": 2 }, "1.0": { "line": 424, "col": 4 }, "1.1": { "line": 431, "col": 4 }, "1.3": { "line": 432, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:modelChoiceItems": { "1": { "line": 440, "col": 2 }, "2": { "line": 441, "col": 2 }, "4": { "line": 448, "col": 2 }, "2.0": { "line": 442, "col": 4 }, "2.1": { "line": 443, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:parseModelsFilters": { "1": { "line": 455, "col": 2 }, "2": { "line": 456, "col": 2 }, "3": { "line": 459, "col": 2 }, "4": { "line": 460, "col": 2 }, "5": { "line": 463, "col": 2 }, "2.0": { "line": 457, "col": 4 }, "4.0": { "line": 461, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runTurn": { "2": { "line": 476, "col": 2 }, "3": { "line": 477, "col": 2 }, "4": { "line": 480, "col": 2 }, "5": { "line": 483, "col": 2 }, "7": { "line": 487, "col": 2 }, "9": { "line": 492, "col": 2 }, "11": { "line": 498, "col": 2 }, "13": { "line": 513, "col": 2 }, "15": { "line": 541, "col": 2 }, "17": { "line": 586, "col": 2 }, "19": { "line": 600, "col": 2 }, "21": { "line": 642, "col": 2 }, "22": { "line": 643, "col": 2 }, "24": { "line": 652, "col": 2 }, "3.0": { "line": 478, "col": 4 }, "4.0": { "line": 481, "col": 4 }, "5.0": { "line": 484, "col": 4 }, "5.1": { "line": 485, "col": 4 }, "7.0": { "line": 488, "col": 4 }, "7.1": { "line": 489, "col": 4 }, "7.2": { "line": 490, "col": 4 }, "9.0": { "line": 493, "col": 4 }, "9.1": { "line": 496, "col": 4 }, "11.0": { "line": 499, "col": 4 }, "11.1": { "line": 500, "col": 4 }, "11.2.0": { "line": 508, "col": 6 }, "11.2.1": { "line": 509, "col": 6 }, "11.2": { "line": 507, "col": 4 }, "11.4": { "line": 511, "col": 4 }, "13.1": { "line": 521, "col": 4 }, "13.2": { "line": 522, "col": 4 }, "13.3": { "line": 523, "col": 4 }, "13.4.0": { "line": 525, "col": 6 }, "13.4.1": { "line": 526, "col": 6 }, "13.4": { "line": 524, "col": 4 }, "13.5": { "line": 528, "col": 4 }, "13.6": { "line": 529, "col": 4 }, "13.7.0": { "line": 531, "col": 6 }, "13.7.1": { "line": 532, "col": 6 }, "13.7.2.0": { "line": 534, "col": 8 }, "13.7.2": { "line": 533, "col": 6 }, "13.7": { "line": 530, "col": 4 }, "13.9": { "line": 539, "col": 4 }, "15.0": { "line": 542, "col": 4 }, "15.1.0": { "line": 544, "col": 6 }, "15.1": { "line": 543, "col": 4 }, "15.2.0": { "line": 547, "col": 6 }, "15.2.1": { "line": 548, "col": 6 }, "15.2.2.0": { "line": 550, "col": 8 }, "15.2.2.1.0": { "line": 552, "col": 10 }, "15.2.2.1": { "line": 551, "col": 8 }, "15.2.2": { "line": 549, "col": 6 }, "15.2.4": { "line": 555, "col": 6 }, "15.2.5": { "line": 556, "col": 6 }, "15.2.6.0": { "line": 564, "col": 8 }, "15.2.6": { "line": 563, "col": 6 }, "15.2.7": { "line": 566, "col": 6 }, "15.2": { "line": 546, "col": 4 }, "15.4": { "line": 568, "col": 4 }, "15.5": { "line": 572, "col": 4 }, "15.6": { "line": 573, "col": 4 }, "15.7.0": { "line": 575, "col": 6 }, "15.7": { "line": 574, "col": 4 }, "15.8": { "line": 577, "col": 4 }, "15.9.0": { "line": 579, "col": 6 }, "15.9.1.0": { "line": 581, "col": 8 }, "15.9.1": { "line": 580, "col": 6 }, "15.9": { "line": 578, "col": 4 }, "15.11": { "line": 584, "col": 4 }, "17.0": { "line": 587, "col": 4 }, "17.1": { "line": 588, "col": 4 }, "17.2.0": { "line": 590, "col": 6 }, "17.2.1": { "line": 591, "col": 6 }, "17.2": { "line": 589, "col": 4 }, "17.4.0": { "line": 594, "col": 6 }, "17.4": { "line": 593, "col": 4 }, "17.6": { "line": 598, "col": 4 }, "19.0.0": { "line": 602, "col": 6 }, "19.0.1": { "line": 607, "col": 6 }, "19.0": { "line": 601, "col": 4 }, "19.2": { "line": 609, "col": 4 }, "19.3.0": { "line": 611, "col": 6 }, "19.3": { "line": 610, "col": 4 }, "19.5": { "line": 616, "col": 4 }, "19.6.0": { "line": 624, "col": 6 }, "19.6": { "line": 623, "col": 4 }, "19.7": { "line": 626, "col": 4 }, "19.8": { "line": 627, "col": 4 }, "19.9": { "line": 628, "col": 4 }, "19.10.0": { "line": 630, "col": 6 }, "19.10": { "line": 629, "col": 4 }, "19.12": { "line": 632, "col": 4 }, "19.13": { "line": 633, "col": 4 }, "22.0": { "line": 643, "col": 2 }, "22.1.0": { "line": 645, "col": 6 }, "22.1.1": { "line": 647, "col": 6 }, "22.1": { "line": 644, "col": 4 }, "22.3": { "line": 649, "col": 9 }, "22.4": { "line": 650, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:resolveEditInputs": { "1": { "line": 838, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_0": { "1.0.0": { "line": 840, "col": 6 }, "1.0": { "line": 839, "col": 4 }, "1.1": { "line": 842, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:generateImageFile": { "2": { "line": 870, "col": 2 }, "3": { "line": 871, "col": 2 }, "4": { "line": 872, "col": 2 }, "6": { "line": 878, "col": 2 }, "7": { "line": 884, "col": 2 }, "9": { "line": 890, "col": 2 }, "10": { "line": 891, "col": 2 }, "4.0": { "line": 873, "col": 4 }, "7.0": { "line": 885, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:mainAgent": { "1": { "line": 904, "col": 2 }, "3": { "line": 918, "col": 2 }, "1.0": { "line": 905, "col": 4 }, "1.1.1": { "line": 910, "col": 6 }, "1.1.2": { "line": 911, "col": 6 }, "1.1": { "line": 906, "col": 4 }, "1.3": { "line": 913, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReplyVia": { "1": { "line": 927, "col": 2 }, "2": { "line": 928, "col": 2 }, "4": { "line": 931, "col": 2 }, "6": { "line": 934, "col": 2 }, "8": { "line": 937, "col": 2 }, "10": { "line": 940, "col": 2 }, "12": { "line": 946, "col": 2 }, "13": { "line": 947, "col": 2 }, "15": { "line": 952, "col": 2 }, "16": { "line": 959, "col": 2 }, "18": { "line": 962, "col": 2 }, "19": { "line": 965, "col": 2 }, "20": { "line": 966, "col": 2 }, "2.0": { "line": 929, "col": 4 }, "4.0": { "line": 932, "col": 4 }, "6.0": { "line": 935, "col": 4 }, "8.0": { "line": 938, "col": 4 }, "10.0": { "line": 941, "col": 4 }, "13.0": { "line": 948, "col": 4 }, "15.1": { "line": 957, "col": 4 }, "16.0": { "line": 960, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_1": { "18.0": { "line": 963, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReply": { "1": { "line": 976, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:roundedCost": { "1": { "line": 980, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:_buildStatus": { "1": { "line": 984, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:sample": { "1": { "line": 992, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:printHeader": { "1": { "line": 996, "col": 2 }, "2": { "line": 997, "col": 2 }, "3": { "line": 1019, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_2": { "2.0": { "line": 1004, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_3": { "2.0.0": { "line": 1005, "col": 6 }, "2.0.1": { "line": 1013, "col": 6 }, "2.0.2": { "line": 1014, "col": 6 } }, "dist/lib/agents/agency-agent/agent.agency:__block_4": { "2.0.0.0": { "line": 1006, "col": 8 }, "2.0.0.1": { "line": 1007, "col": 8 }, "2.0.0.2": { "line": 1008, "col": 8 }, "2.0.0.3": { "line": 1009, "col": 8 }, "2.0.0.4": { "line": 1010, "col": 8 }, "2.0.0.5": { "line": 1011, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:__block_5": { "2.0.2.0": { "line": 1015, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:printPolicyHelp": { "1": { "line": 1025, "col": 2 }, "2": { "line": 1026, "col": 2 }, "3": { "line": 1029, "col": 2 }, "4": { "line": 1030, "col": 2 }, "5": { "line": 1031, "col": 2 }, "5.0": { "line": 1032, "col": 4 }, "5.1": { "line": 1033, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:givePolicyChoice": { "1": { "line": 1038, "col": 2 }, "2": { "line": 1039, "col": 2 }, "3": { "line": 1040, "col": 2 }, "4": { "line": 1051, "col": 2 }, "5": { "line": 1052, "col": 9 }, "6": { "line": 1052, "col": 2 }, "5.0": { "line": 1053, "col": 17 }, "5.1": { "line": 1053, "col": 17 }, "5.2": { "line": 1054, "col": 21 }, "5.3": { "line": 1054, "col": 21 } }, "dist/lib/agents/agency-agent/agent.agency:setupSession": { "2": { "line": 1070, "col": 2 }, "3": { "line": 1075, "col": 2 }, "4": { "line": 1076, "col": 2 }, "5": { "line": 1082, "col": 2 }, "6": { "line": 1083, "col": 2 }, "7": { "line": 1085, "col": 2 }, "9": { "line": 1133, "col": 2 }, "3.0": { "line": 1075, "col": 2 }, "7.1": { "line": 1090, "col": 4 }, "7.2.1": { "line": 1096, "col": 6 }, "7.2.2": { "line": 1097, "col": 6 }, "7.2.4": { "line": 1102, "col": 6 }, "7.2.5.0": { "line": 1103, "col": 6 }, "7.2.5.1": { "line": 1104, "col": 8 }, "7.2.5.2": { "line": 1109, "col": 8 }, "7.2.5": { "line": 1103, "col": 6 }, "7.2.7": { "line": 1111, "col": 6 }, "7.2": { "line": 1091, "col": 4 }, "7.4": { "line": 1114, "col": 4 }, "7.5.0": { "line": 1115, "col": 4 }, "7.5.1.0.0": { "line": 1118, "col": 10 }, "7.5.1.0.1": { "line": 1119, "col": 10 }, "7.5.1.0.2": { "line": 1121, "col": 10 }, "7.5.1.0": { "line": 1117, "col": 8 }, "7.5.1.2": { "line": 1124, "col": 8 }, "7.5.1.3": { "line": 1125, "col": 8 }, "7.5.1": { "line": 1116, "col": 6 }, "7.5.3": { "line": 1128, "col": 6 }, "7.5": { "line": 1115, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line": 1147, "col": 2 }, "2": { "line": 1148, "col": 2 }, "3": { "line": 1149, "col": 2 }, "4": { "line": 1150, "col": 2 }, "5": { "line": 1163, "col": 2 }, "4.1": { "line": 1154, "col": 4 }, "4.2.0": { "line": 1155, "col": 4 }, "4.2.1": { "line": 1156, "col": 6 }, "4.2.2": { "line": 1157, "col": 11 }, "4.2.3": { "line": 1158, "col": 6 }, "4.2": { "line": 1155, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runSeedTurn": { "1": { "line": 1170, "col": 2 }, "2": { "line": 1171, "col": 2 }, "3": { "line": 1172, "col": 2 }, "3.0": { "line": 1172, "col": 2 }, "3.1.0": { "line": 1174, "col": 6 }, "3.1.1": { "line": 1176, "col": 6 }, "3.1": { "line": 1173, "col": 4 }, "3.3": { "line": 1178, "col": 9 }, "3.4": { "line": 1179, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:startInteractive": { "1": { "line": 1190, "col": 2 }, "3": { "line": 1205, "col": 2 }, "1.0.0": { "line": 1192, "col": 6 }, "1.0": { "line": 1191, "col": 4 }, "1.1": { "line": 1194, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:main": { "2": { "line": 1211, "col": 2 }, "3": { "line": 1274, "col": 2 }, "4": { "line": 1277, "col": 2 }, "6": { "line": 1283, "col": 2 }, "7": { "line": 1287, "col": 2 }, "8": { "line": 1294, "col": 2 }, "9": { "line": 1295, "col": 2 }, "10": { "line": 1296, "col": 2 }, "11": { "line": 1297, "col": 2 }, "12": { "line": 1303, "col": 2 }, "14": { "line": 1385, "col": 2 }, "15": { "line": 1386, "col": 2 }, "16": { "line": 1387, "col": 2 }, "17": { "line": 1388, "col": 2 }, "18": { "line": 1391, "col": 2 }, "20": { "line": 1406, "col": 2 }, "22": { "line": 1425, "col": 2 }, "23": { "line": 1426, "col": 2 }, "25": { "line": 1444, "col": 2 }, "26": { "line": 1445, "col": 2 }, "27": { "line": 1446, "col": 2 }, "28": { "line": 1447, "col": 2 }, "29": { "line": 1448, "col": 2 }, "3.0": { "line": 1275, "col": 4 }, "4.0": { "line": 1278, "col": 4 }, "6.0": { "line": 1284, "col": 4 }, "6.1": { "line": 1285, "col": 4 }, "11.0": { "line": 1298, "col": 4 }, "11.1": { "line": 1301, "col": 4 }, "12.1.0": { "line": 1307, "col": 6 }, "12.1.1": { "line": 1308, "col": 6 }, "12.1": { "line": 1306, "col": 4 }, "12.3.0": { "line": 1311, "col": 6 }, "12.3.1": { "line": 1312, "col": 6 }, "12.3.2": { "line": 1313, "col": 6 }, "12.3": { "line": 1310, "col": 4 }, "12.5": { "line": 1315, "col": 4 }, "12.6.0": { "line": 1317, "col": 6 }, "12.6": { "line": 1316, "col": 4 }, "12.8": { "line": 1322, "col": 4 }, "12.9.0": { "line": 1330, "col": 6 }, "12.9": { "line": 1329, "col": 4 }, "12.10": { "line": 1332, "col": 4 }, "12.11": { "line": 1333, "col": 4 }, "12.12": { "line": 1336, "col": 4 }, "12.13": { "line": 1340, "col": 4 }, "12.15": { "line": 1344, "col": 4 }, "12.16": { "line": 1345, "col": 4 }, "12.17": { "line": 1346, "col": 4 }, "12.18": { "line": 1347, "col": 4 }, "12.19.0.0": { "line": 1350, "col": 8 }, "12.19.0.1": { "line": 1352, "col": 8 }, "12.19.0.2": { "line": 1354, "col": 8 }, "12.19.0.3": { "line": 1356, "col": 8 }, "12.19.0.4": { "line": 1361, "col": 8 }, "12.19.0": { "line": 1349, "col": 6 }, "12.19": { "line": 1348, "col": 4 }, "12.20": { "line": 1364, "col": 4 }, "12.21": { "line": 1365, "col": 4 }, "12.22.0": { "line": 1367, "col": 6 }, "12.22": { "line": 1366, "col": 4 }, "12.23.0": { "line": 1370, "col": 6 }, "12.23": { "line": 1369, "col": 4 }, "12.24": { "line": 1372, "col": 4 }, "12.25": { "line": 1378, "col": 4 }, "12.26": { "line": 1379, "col": 4 }, "18.0": { "line": 1392, "col": 4 }, "18.1": { "line": 1397, "col": 4 }, "20.0": { "line": 1407, "col": 4 }, "20.1": { "line": 1408, "col": 4 }, "20.2": { "line": 1409, "col": 4 }, "20.3": { "line": 1410, "col": 4 }, "20.4": { "line": 1411, "col": 4 }, "20.5": { "line": 1412, "col": 4 }, "23.0": { "line": 1427, "col": 4 }, "23.1.0": { "line": 1429, "col": 6 }, "23.1.1.0": { "line": 1431, "col": 8 }, "23.1.1": { "line": 1430, "col": 6 }, "23.1.2": { "line": 1433, "col": 6 }, "23.1": { "line": 1428, "col": 4 }, "23.2": { "line": 1435, "col": 4 }, "23.3": { "line": 1436, "col": 4 } } };
8299
+ const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:__cb_top_0": { "1": { "line": 159, "col": 2 }, "1.0": { "line": 160, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_1": { "1": { "line": 165, "col": 2 }, "1.0.0": { "line": 166, "col": 4 }, "1.0.1": { "line": 167, "col": 6 }, "1.0.2": { "line": 168, "col": 11 }, "1.0.3": { "line": 169, "col": 6 }, "1.0.4": { "line": 171, "col": 6 }, "1.0": { "line": 166, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_2": { "1": { "line": 177, "col": 2 }, "1.0": { "line": 178, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_3": { "1": { "line": 183, "col": 2 }, "1.0": { "line": 184, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_4": { "1": { "line": 224, "col": 2 }, "1.0": { "line": 225, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_showTraces": { "1": { "line": 155, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:retryReasonLabel": { "1": { "line": 195, "col": 2 }, "2": { "line": 198, "col": 2 }, "3": { "line": 201, "col": 2 }, "4": { "line": 204, "col": 2 }, "5": { "line": 207, "col": 2 }, "6": { "line": 210, "col": 2 }, "7": { "line": 213, "col": 2 }, "1.0": { "line": 196, "col": 4 }, "2.0": { "line": 199, "col": 4 }, "3.0": { "line": 202, "col": 4 }, "4.0": { "line": 205, "col": 4 }, "5.0": { "line": 208, "col": 4 }, "6.0": { "line": 211, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:formatTurnFailure": { "1": { "line": 240, "col": 2 }, "2": { "line": 243, "col": 2 }, "3": { "line": 246, "col": 2 }, "4": { "line": 249, "col": 2 }, "1.0": { "line": 241, "col": 4 }, "2.0": { "line": 244, "col": 4 }, "3.0": { "line": 247, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:renderLLMCallResponse": { "1": { "line": 266, "col": 2 }, "2": { "line": 267, "col": 2 }, "3": { "line": 270, "col": 2 }, "5": { "line": 275, "col": 2 }, "2.0": { "line": 268, "col": 4 }, "3.0.0": { "line": 272, "col": 6 }, "3.0": { "line": 271, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:loadAgentsMd": { "1": { "line": 286, "col": 2 }, "2": { "line": 289, "col": 2 }, "3": { "line": 290, "col": 2 }, "4": { "line": 293, "col": 2 }, "1.0": { "line": 287, "col": 4 }, "2.0": { "line": 289, "col": 2 }, "3.0": { "line": 291, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:builtinPalette": { "1": { "line": 307, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:mergedPalette": { "1": { "line": 324, "col": 2 }, "2": { "line": 325, "col": 2 }, "3": { "line": 332, "col": 2 }, "4": { "line": 333, "col": 2 }, "5": { "line": 336, "col": 2 }, "2.0": { "line": 326, "col": 4 }, "2.1.0": { "line": 328, "col": 6 }, "2.1": { "line": 327, "col": 4 }, "2.2": { "line": 330, "col": 4 }, "4.0": { "line": 334, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:switchModel": { "1": { "line": 363, "col": 2 }, "2": { "line": 364, "col": 2 }, "3": { "line": 367, "col": 2 }, "4": { "line": 371, "col": 2 }, "5": { "line": 372, "col": 2 }, "7": { "line": 382, "col": 2 }, "9": { "line": 390, "col": 2 }, "10": { "line": 391, "col": 2 }, "11": { "line": 392, "col": 2 }, "12": { "line": 401, "col": 2 }, "13": { "line": 402, "col": 2 }, "15": { "line": 410, "col": 2 }, "16": { "line": 411, "col": 2 }, "17": { "line": 412, "col": 2 }, "2.0": { "line": 365, "col": 4 }, "5.0": { "line": 373, "col": 4 }, "5.1": { "line": 376, "col": 4 }, "7.0": { "line": 383, "col": 4 }, "7.1": { "line": 385, "col": 4 }, "13.0": { "line": 403, "col": 4 }, "13.1": { "line": 404, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:reactToSlotChange": { "1": { "line": 424, "col": 2 }, "3": { "line": 435, "col": 2 }, "1.0": { "line": 425, "col": 4 }, "1.1": { "line": 432, "col": 4 }, "1.3": { "line": 433, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:modelChoiceItems": { "1": { "line": 441, "col": 2 }, "2": { "line": 442, "col": 2 }, "4": { "line": 449, "col": 2 }, "2.0": { "line": 443, "col": 4 }, "2.1": { "line": 444, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:parseModelsFilters": { "1": { "line": 456, "col": 2 }, "2": { "line": 457, "col": 2 }, "3": { "line": 460, "col": 2 }, "4": { "line": 461, "col": 2 }, "5": { "line": 464, "col": 2 }, "2.0": { "line": 458, "col": 4 }, "4.0": { "line": 462, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runTurn": { "2": { "line": 477, "col": 2 }, "3": { "line": 478, "col": 2 }, "4": { "line": 481, "col": 2 }, "5": { "line": 484, "col": 2 }, "7": { "line": 488, "col": 2 }, "9": { "line": 493, "col": 2 }, "11": { "line": 499, "col": 2 }, "13": { "line": 514, "col": 2 }, "15": { "line": 542, "col": 2 }, "17": { "line": 587, "col": 2 }, "19": { "line": 601, "col": 2 }, "21": { "line": 643, "col": 2 }, "22": { "line": 644, "col": 2 }, "24": { "line": 653, "col": 2 }, "3.0": { "line": 479, "col": 4 }, "4.0": { "line": 482, "col": 4 }, "5.0": { "line": 485, "col": 4 }, "5.1": { "line": 486, "col": 4 }, "7.0": { "line": 489, "col": 4 }, "7.1": { "line": 490, "col": 4 }, "7.2": { "line": 491, "col": 4 }, "9.0": { "line": 494, "col": 4 }, "9.1": { "line": 497, "col": 4 }, "11.0": { "line": 500, "col": 4 }, "11.1": { "line": 501, "col": 4 }, "11.2.0": { "line": 509, "col": 6 }, "11.2.1": { "line": 510, "col": 6 }, "11.2": { "line": 508, "col": 4 }, "11.4": { "line": 512, "col": 4 }, "13.1": { "line": 522, "col": 4 }, "13.2": { "line": 523, "col": 4 }, "13.3": { "line": 524, "col": 4 }, "13.4.0": { "line": 526, "col": 6 }, "13.4.1": { "line": 527, "col": 6 }, "13.4": { "line": 525, "col": 4 }, "13.5": { "line": 529, "col": 4 }, "13.6": { "line": 530, "col": 4 }, "13.7.0": { "line": 532, "col": 6 }, "13.7.1": { "line": 533, "col": 6 }, "13.7.2.0": { "line": 535, "col": 8 }, "13.7.2": { "line": 534, "col": 6 }, "13.7": { "line": 531, "col": 4 }, "13.9": { "line": 540, "col": 4 }, "15.0": { "line": 543, "col": 4 }, "15.1.0": { "line": 545, "col": 6 }, "15.1": { "line": 544, "col": 4 }, "15.2.0": { "line": 548, "col": 6 }, "15.2.1": { "line": 549, "col": 6 }, "15.2.2.0": { "line": 551, "col": 8 }, "15.2.2.1.0": { "line": 553, "col": 10 }, "15.2.2.1": { "line": 552, "col": 8 }, "15.2.2": { "line": 550, "col": 6 }, "15.2.4": { "line": 556, "col": 6 }, "15.2.5": { "line": 557, "col": 6 }, "15.2.6.0": { "line": 565, "col": 8 }, "15.2.6": { "line": 564, "col": 6 }, "15.2.7": { "line": 567, "col": 6 }, "15.2": { "line": 547, "col": 4 }, "15.4": { "line": 569, "col": 4 }, "15.5": { "line": 573, "col": 4 }, "15.6": { "line": 574, "col": 4 }, "15.7.0": { "line": 576, "col": 6 }, "15.7": { "line": 575, "col": 4 }, "15.8": { "line": 578, "col": 4 }, "15.9.0": { "line": 580, "col": 6 }, "15.9.1.0": { "line": 582, "col": 8 }, "15.9.1": { "line": 581, "col": 6 }, "15.9": { "line": 579, "col": 4 }, "15.11": { "line": 585, "col": 4 }, "17.0": { "line": 588, "col": 4 }, "17.1": { "line": 589, "col": 4 }, "17.2.0": { "line": 591, "col": 6 }, "17.2.1": { "line": 592, "col": 6 }, "17.2": { "line": 590, "col": 4 }, "17.4.0": { "line": 595, "col": 6 }, "17.4": { "line": 594, "col": 4 }, "17.6": { "line": 599, "col": 4 }, "19.0.0": { "line": 603, "col": 6 }, "19.0.1": { "line": 608, "col": 6 }, "19.0": { "line": 602, "col": 4 }, "19.2": { "line": 610, "col": 4 }, "19.3.0": { "line": 612, "col": 6 }, "19.3": { "line": 611, "col": 4 }, "19.5": { "line": 617, "col": 4 }, "19.6.0": { "line": 625, "col": 6 }, "19.6": { "line": 624, "col": 4 }, "19.7": { "line": 627, "col": 4 }, "19.8": { "line": 628, "col": 4 }, "19.9": { "line": 629, "col": 4 }, "19.10.0": { "line": 631, "col": 6 }, "19.10": { "line": 630, "col": 4 }, "19.12": { "line": 633, "col": 4 }, "19.13": { "line": 634, "col": 4 }, "22.0": { "line": 644, "col": 2 }, "22.1.0": { "line": 646, "col": 6 }, "22.1.1": { "line": 648, "col": 6 }, "22.1": { "line": 645, "col": 4 }, "22.3": { "line": 650, "col": 9 }, "22.4": { "line": 651, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:resolveEditInputs": { "1": { "line": 839, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_0": { "1.0.0": { "line": 841, "col": 6 }, "1.0": { "line": 840, "col": 4 }, "1.1": { "line": 843, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:generateImageFile": { "2": { "line": 871, "col": 2 }, "3": { "line": 872, "col": 2 }, "4": { "line": 873, "col": 2 }, "6": { "line": 879, "col": 2 }, "7": { "line": 885, "col": 2 }, "9": { "line": 891, "col": 2 }, "10": { "line": 892, "col": 2 }, "4.0": { "line": 874, "col": 4 }, "7.0": { "line": 886, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:mainAgent": { "1": { "line": 905, "col": 2 }, "3": { "line": 919, "col": 2 }, "1.0": { "line": 906, "col": 4 }, "1.1.1": { "line": 911, "col": 6 }, "1.1.2": { "line": 912, "col": 6 }, "1.1": { "line": 907, "col": 4 }, "1.3": { "line": 914, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReplyVia": { "1": { "line": 928, "col": 2 }, "2": { "line": 929, "col": 2 }, "4": { "line": 932, "col": 2 }, "6": { "line": 935, "col": 2 }, "8": { "line": 938, "col": 2 }, "10": { "line": 941, "col": 2 }, "12": { "line": 947, "col": 2 }, "13": { "line": 948, "col": 2 }, "15": { "line": 953, "col": 2 }, "16": { "line": 960, "col": 2 }, "18": { "line": 963, "col": 2 }, "19": { "line": 966, "col": 2 }, "20": { "line": 967, "col": 2 }, "2.0": { "line": 930, "col": 4 }, "4.0": { "line": 933, "col": 4 }, "6.0": { "line": 936, "col": 4 }, "8.0": { "line": 939, "col": 4 }, "10.0": { "line": 942, "col": 4 }, "13.0": { "line": 949, "col": 4 }, "15.1": { "line": 958, "col": 4 }, "16.0": { "line": 961, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_1": { "18.0": { "line": 964, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReply": { "1": { "line": 977, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:roundedCost": { "1": { "line": 981, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:_buildStatus": { "1": { "line": 985, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:sample": { "1": { "line": 993, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:printHeader": { "1": { "line": 997, "col": 2 }, "2": { "line": 998, "col": 2 }, "3": { "line": 1020, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_2": { "2.0": { "line": 1005, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_3": { "2.0.0": { "line": 1006, "col": 6 }, "2.0.1": { "line": 1014, "col": 6 }, "2.0.2": { "line": 1015, "col": 6 } }, "dist/lib/agents/agency-agent/agent.agency:__block_4": { "2.0.0.0": { "line": 1007, "col": 8 }, "2.0.0.1": { "line": 1008, "col": 8 }, "2.0.0.2": { "line": 1009, "col": 8 }, "2.0.0.3": { "line": 1010, "col": 8 }, "2.0.0.4": { "line": 1011, "col": 8 }, "2.0.0.5": { "line": 1012, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:__block_5": { "2.0.2.0": { "line": 1016, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:printPolicyHelp": { "1": { "line": 1026, "col": 2 }, "2": { "line": 1027, "col": 2 }, "3": { "line": 1030, "col": 2 }, "4": { "line": 1031, "col": 2 }, "5": { "line": 1032, "col": 2 }, "5.0": { "line": 1033, "col": 4 }, "5.1": { "line": 1034, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:givePolicyChoice": { "1": { "line": 1039, "col": 2 }, "2": { "line": 1040, "col": 2 }, "3": { "line": 1041, "col": 2 }, "4": { "line": 1052, "col": 2 }, "5": { "line": 1053, "col": 9 }, "6": { "line": 1053, "col": 2 }, "5.0": { "line": 1054, "col": 17 }, "5.1": { "line": 1054, "col": 17 }, "5.2": { "line": 1055, "col": 21 }, "5.3": { "line": 1055, "col": 21 } }, "dist/lib/agents/agency-agent/agent.agency:setupSession": { "2": { "line": 1071, "col": 2 }, "3": { "line": 1076, "col": 2 }, "4": { "line": 1077, "col": 2 }, "5": { "line": 1083, "col": 2 }, "6": { "line": 1084, "col": 2 }, "7": { "line": 1086, "col": 2 }, "9": { "line": 1134, "col": 2 }, "3.0": { "line": 1076, "col": 2 }, "7.1": { "line": 1091, "col": 4 }, "7.2.1": { "line": 1097, "col": 6 }, "7.2.2": { "line": 1098, "col": 6 }, "7.2.4": { "line": 1103, "col": 6 }, "7.2.5.0": { "line": 1104, "col": 6 }, "7.2.5.1": { "line": 1105, "col": 8 }, "7.2.5.2": { "line": 1110, "col": 8 }, "7.2.5": { "line": 1104, "col": 6 }, "7.2.7": { "line": 1112, "col": 6 }, "7.2": { "line": 1092, "col": 4 }, "7.4": { "line": 1115, "col": 4 }, "7.5.0": { "line": 1116, "col": 4 }, "7.5.1.0.0": { "line": 1119, "col": 10 }, "7.5.1.0.1": { "line": 1120, "col": 10 }, "7.5.1.0.2": { "line": 1122, "col": 10 }, "7.5.1.0": { "line": 1118, "col": 8 }, "7.5.1.2": { "line": 1125, "col": 8 }, "7.5.1.3": { "line": 1126, "col": 8 }, "7.5.1": { "line": 1117, "col": 6 }, "7.5.3": { "line": 1129, "col": 6 }, "7.5": { "line": 1116, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line": 1148, "col": 2 }, "2": { "line": 1149, "col": 2 }, "3": { "line": 1150, "col": 2 }, "4": { "line": 1151, "col": 2 }, "5": { "line": 1164, "col": 2 }, "4.1": { "line": 1155, "col": 4 }, "4.2.0": { "line": 1156, "col": 4 }, "4.2.1": { "line": 1157, "col": 6 }, "4.2.2": { "line": 1158, "col": 11 }, "4.2.3": { "line": 1159, "col": 6 }, "4.2": { "line": 1156, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runSeedTurn": { "1": { "line": 1171, "col": 2 }, "2": { "line": 1172, "col": 2 }, "3": { "line": 1173, "col": 2 }, "3.0": { "line": 1173, "col": 2 }, "3.1.0": { "line": 1175, "col": 6 }, "3.1.1": { "line": 1177, "col": 6 }, "3.1": { "line": 1174, "col": 4 }, "3.3": { "line": 1179, "col": 9 }, "3.4": { "line": 1180, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:startInteractive": { "1": { "line": 1191, "col": 2 }, "3": { "line": 1206, "col": 2 }, "1.0.0": { "line": 1193, "col": 6 }, "1.0": { "line": 1192, "col": 4 }, "1.1": { "line": 1195, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:main": { "2": { "line": 1212, "col": 2 }, "3": { "line": 1298, "col": 2 }, "4": { "line": 1301, "col": 2 }, "6": { "line": 1307, "col": 2 }, "7": { "line": 1311, "col": 2 }, "8": { "line": 1318, "col": 2 }, "9": { "line": 1319, "col": 2 }, "10": { "line": 1320, "col": 2 }, "11": { "line": 1321, "col": 2 }, "12": { "line": 1327, "col": 2 }, "14": { "line": 1409, "col": 2 }, "15": { "line": 1410, "col": 2 }, "16": { "line": 1411, "col": 2 }, "17": { "line": 1412, "col": 2 }, "18": { "line": 1416, "col": 2 }, "19": { "line": 1417, "col": 2 }, "20": { "line": 1427, "col": 2 }, "21": { "line": 1428, "col": 2 }, "23": { "line": 1431, "col": 2 }, "24": { "line": 1432, "col": 2 }, "26": { "line": 1437, "col": 2 }, "28": { "line": 1452, "col": 2 }, "30": { "line": 1471, "col": 2 }, "31": { "line": 1472, "col": 2 }, "33": { "line": 1490, "col": 2 }, "34": { "line": 1491, "col": 2 }, "35": { "line": 1492, "col": 2 }, "36": { "line": 1493, "col": 2 }, "37": { "line": 1494, "col": 2 }, "3.0": { "line": 1299, "col": 4 }, "4.0": { "line": 1302, "col": 4 }, "6.0": { "line": 1308, "col": 4 }, "6.1": { "line": 1309, "col": 4 }, "11.0": { "line": 1322, "col": 4 }, "11.1": { "line": 1325, "col": 4 }, "12.1.0": { "line": 1331, "col": 6 }, "12.1.1": { "line": 1332, "col": 6 }, "12.1": { "line": 1330, "col": 4 }, "12.3.0": { "line": 1335, "col": 6 }, "12.3.1": { "line": 1336, "col": 6 }, "12.3.2": { "line": 1337, "col": 6 }, "12.3": { "line": 1334, "col": 4 }, "12.5": { "line": 1339, "col": 4 }, "12.6.0": { "line": 1341, "col": 6 }, "12.6": { "line": 1340, "col": 4 }, "12.8": { "line": 1346, "col": 4 }, "12.9.0": { "line": 1354, "col": 6 }, "12.9": { "line": 1353, "col": 4 }, "12.10": { "line": 1356, "col": 4 }, "12.11": { "line": 1357, "col": 4 }, "12.12": { "line": 1360, "col": 4 }, "12.13": { "line": 1364, "col": 4 }, "12.15": { "line": 1368, "col": 4 }, "12.16": { "line": 1369, "col": 4 }, "12.17": { "line": 1370, "col": 4 }, "12.18": { "line": 1371, "col": 4 }, "12.19.0.0": { "line": 1374, "col": 8 }, "12.19.0.1": { "line": 1376, "col": 8 }, "12.19.0.2": { "line": 1378, "col": 8 }, "12.19.0.3": { "line": 1380, "col": 8 }, "12.19.0.4": { "line": 1385, "col": 8 }, "12.19.0": { "line": 1373, "col": 6 }, "12.19": { "line": 1372, "col": 4 }, "12.20": { "line": 1388, "col": 4 }, "12.21": { "line": 1389, "col": 4 }, "12.22.0": { "line": 1391, "col": 6 }, "12.22": { "line": 1390, "col": 4 }, "12.23.0": { "line": 1394, "col": 6 }, "12.23": { "line": 1393, "col": 4 }, "12.24": { "line": 1396, "col": 4 }, "12.25": { "line": 1402, "col": 4 }, "12.26": { "line": 1403, "col": 4 }, "21.0": { "line": 1429, "col": 4 }, "24.0": { "line": 1433, "col": 4 }, "26.0": { "line": 1438, "col": 4 }, "26.1": { "line": 1443, "col": 4 }, "28.0": { "line": 1453, "col": 4 }, "28.1": { "line": 1454, "col": 4 }, "28.2": { "line": 1455, "col": 4 }, "28.3": { "line": 1456, "col": 4 }, "28.4": { "line": 1457, "col": 4 }, "28.5": { "line": 1458, "col": 4 }, "31.0": { "line": 1473, "col": 4 }, "31.1.0": { "line": 1475, "col": 6 }, "31.1.1.0": { "line": 1477, "col": 8 }, "31.1.1": { "line": 1476, "col": 6 }, "31.1.2": { "line": 1479, "col": 6 }, "31.1": { "line": 1474, "col": 4 }, "31.2": { "line": 1481, "col": 4 }, "31.3": { "line": 1482, "col": 4 } } };
8200
8300
  export {
8201
8301
  Session,
8202
8302
  __cb_top_0,
@@ -21,6 +21,28 @@ import { getModelSettings, loadSettings } from "./lib/settings.agency"
21
21
  import { slotKind } from "./lib/slots.agency"
22
22
 
23
23
 
24
+ // One-shot runs (--print / piped / a positional query) have no REPL for the
25
+ // user to say "keep going", so an autonomous task gets more tool rounds by
26
+ // default than the interactive baked default (10).
27
+ export static const ONE_SHOT_MAX_TOOL_CALL_ROUNDS = 50
28
+
29
+ /** Effective maxToolCallRounds for a run. An explicit --max-tool-call-rounds
30
+ always wins; otherwise a one-shot run gets ONE_SHOT_MAX_TOOL_CALL_ROUNDS and
31
+ an interactive run returns null (keep the compiled default). */
32
+ export def resolveMaxToolCallRounds(
33
+ explicit: number | null,
34
+ oneShot: boolean,
35
+ ): number | null {
36
+ if (explicit != null) {
37
+ return explicit
38
+ }
39
+ if (oneShot) {
40
+ return ONE_SHOT_MAX_TOOL_CALL_ROUNDS
41
+ }
42
+ return null
43
+ }
44
+
45
+
24
46
  // Per-user state directory for the agent (persistent memory + saved
25
47
  // policy). We expand `~` ourselves via `env("HOME")` because
26
48
  // `enableMemory(...)`'s underlying `MemoryFrame` calls