agency-lang 0.7.3 → 0.7.5

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.
@@ -1434,6 +1434,21 @@ node main() {
1434
1434
  setLlmOptions({ maxToolResultChars: maxResultChars })
1435
1435
  }
1436
1436
 
1437
+ // TEMPORARY: raise the per-turn output cap above smoltalk's 4096 default.
1438
+ // With adaptive thinking on, a hard reasoning turn can spend the entire
1439
+ // 4096-token budget thinking and return an empty reply (no text, no tool
1440
+ // call) — see the empty-output failures on regex-log / protein-assembly.
1441
+ // Capped at 20000: these llm() calls are non-streaming, and the Anthropic
1442
+ // SDK refuses a non-streaming request whose estimated time exceeds 10 min,
1443
+ // which is maxTokens > 21333 (60min * maxTokens / 128000 > 10min). 20000
1444
+ // stays under that and is well within every modern-Claude output cap
1445
+ // (Sonnet 5 = 64K, Opus 4.8 = 128K). Branch-scoped so every subagent
1446
+ // inherits it; per-call `llm(..., { maxTokens })` (e.g. the summarizer's
1447
+ // cap) still wins. Superseded by the declarative capabilities table in
1448
+ // docs/superpowers/specs/2026-07-09-model-capabilities-design.md (§2,
1449
+ // maxTokens applied via setLlmOptions at startup) — remove it then.
1450
+ setLlmOptions({ maxTokens: 20000 })
1451
+
1437
1452
  // One-shot autonomy: tell the code subagent there is no human to answer
1438
1453
  // questions and no next turn, so it must drive to a finished artifact.
1439
1454
  // Set before any dispatch so both the pinned `--agent code` path and the
@@ -7954,6 +7954,23 @@ graph.node("main", async (__state) => {
7954
7954
  __self.__retryable = false;
7955
7955
  });
7956
7956
  await runner.step(26, async (runner2) => {
7957
+ __self.__retryable = false;
7958
+ const __funcResult = await __call(setLlmOptions, {
7959
+ type: "positional",
7960
+ args: [{
7961
+ "maxTokens": 2e4
7962
+ }]
7963
+ });
7964
+ if (hasInterrupts(__funcResult)) {
7965
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
7966
+ runner2.halt({
7967
+ ...__state,
7968
+ data: __funcResult
7969
+ });
7970
+ return;
7971
+ }
7972
+ });
7973
+ await runner.step(27, async (runner2) => {
7957
7974
  __self.__retryable = false;
7958
7975
  const __funcResult = await __call(setCodeOneShot, {
7959
7976
  type: "positional",
@@ -7968,7 +7985,7 @@ graph.node("main", async (__state) => {
7968
7985
  return;
7969
7986
  }
7970
7987
  });
7971
- await runner.ifElse(27, [
7988
+ await runner.ifElse(28, [
7972
7989
  {
7973
7990
  condition: async () => !__eq(__stack.locals.startAgent, ``) && !await __callMethod(__readStatic(START_AGENTS, "START_AGENTS", "dist/lib/agents/agency-agent/agent.agency"), "includes", {
7974
7991
  type: "positional",
@@ -8004,9 +8021,9 @@ graph.node("main", async (__state) => {
8004
8021
  }
8005
8022
  }
8006
8023
  ]);
8007
- await runner.step(28, async (runner2) => {
8024
+ await runner.step(29, async (runner2) => {
8008
8025
  });
8009
- await runner.ifElse(29, [
8026
+ await runner.ifElse(30, [
8010
8027
  {
8011
8028
  condition: async () => __stack.locals.seededInteractive,
8012
8029
  body: async (runner2) => {
@@ -8091,13 +8108,13 @@ graph.node("main", async (__state) => {
8091
8108
  }
8092
8109
  }
8093
8110
  ]);
8094
- await runner.step(30, async (runner2) => {
8111
+ await runner.step(31, async (runner2) => {
8095
8112
  __self.__retryable = false;
8096
8113
  });
8097
- await runner.step(31, async (runner2) => {
8114
+ await runner.step(32, async (runner2) => {
8098
8115
  __stack.locals.forceOneShot = __stack.locals.args.flags.print || __stack.locals.hasQuery;
8099
8116
  });
8100
- await runner.ifElse(32, [
8117
+ await runner.ifElse(33, [
8101
8118
  {
8102
8119
  condition: async () => __stack.locals.forceOneShot || !await __call(isTTY, {
8103
8120
  type: "positional",
@@ -8170,9 +8187,9 @@ graph.node("main", async (__state) => {
8170
8187
  }
8171
8188
  }
8172
8189
  ]);
8173
- await runner.step(33, async (runner2) => {
8174
- });
8175
8190
  await runner.step(34, async (runner2) => {
8191
+ });
8192
+ await runner.step(35, async (runner2) => {
8176
8193
  __self.__retryable = false;
8177
8194
  const __funcResult = await __call(setTitle, {
8178
8195
  type: "positional",
@@ -8187,7 +8204,7 @@ graph.node("main", async (__state) => {
8187
8204
  return;
8188
8205
  }
8189
8206
  });
8190
- await runner.step(35, async (runner2) => {
8207
+ await runner.step(36, async (runner2) => {
8191
8208
  __self.__retryable = false;
8192
8209
  const __funcResult = await __call(clearScreen, {
8193
8210
  type: "positional",
@@ -8202,7 +8219,7 @@ graph.node("main", async (__state) => {
8202
8219
  return;
8203
8220
  }
8204
8221
  });
8205
- await runner.step(36, async (runner2) => {
8222
+ await runner.step(37, async (runner2) => {
8206
8223
  const __funcResult = await __call(printHeader, {
8207
8224
  type: "positional",
8208
8225
  args: []
@@ -8216,7 +8233,7 @@ graph.node("main", async (__state) => {
8216
8233
  return;
8217
8234
  }
8218
8235
  });
8219
- await runner.step(37, async (runner2) => {
8236
+ await runner.step(38, async (runner2) => {
8220
8237
  __stack.locals.handler = await __call(setupSession, {
8221
8238
  type: "positional",
8222
8239
  args: [true]
@@ -8230,7 +8247,7 @@ graph.node("main", async (__state) => {
8230
8247
  return;
8231
8248
  }
8232
8249
  });
8233
- await runner.step(38, async (runner2) => {
8250
+ await runner.step(39, async (runner2) => {
8234
8251
  const __funcResult = await __call(startInteractive, {
8235
8252
  type: "positional",
8236
8253
  args: [__stack.locals.handler, ``, ``]
@@ -8246,7 +8263,7 @@ graph.node("main", async (__state) => {
8246
8263
  });
8247
8264
  });
8248
8265
  if (runner.halted) return runner.haltResult;
8249
- await runner.hook(39, async () => {
8266
+ await runner.hook(40, async () => {
8250
8267
  await callHook({
8251
8268
  name: "onNodeEnd",
8252
8269
  data: {
@@ -8312,7 +8329,7 @@ Agent crashed: ${__error.message}`);
8312
8329
  }
8313
8330
  }
8314
8331
  var stdin_default = graph;
8315
- 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": 1440, "col": 2 }, "27": { "line": 1443, "col": 2 }, "29": { "line": 1458, "col": 2 }, "31": { "line": 1477, "col": 2 }, "32": { "line": 1478, "col": 2 }, "34": { "line": 1496, "col": 2 }, "35": { "line": 1497, "col": 2 }, "36": { "line": 1498, "col": 2 }, "37": { "line": 1499, "col": 2 }, "38": { "line": 1500, "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 }, "27.0": { "line": 1444, "col": 4 }, "27.1": { "line": 1449, "col": 4 }, "29.0": { "line": 1459, "col": 4 }, "29.1": { "line": 1460, "col": 4 }, "29.2": { "line": 1461, "col": 4 }, "29.3": { "line": 1462, "col": 4 }, "29.4": { "line": 1463, "col": 4 }, "29.5": { "line": 1464, "col": 4 }, "32.0": { "line": 1479, "col": 4 }, "32.1.0": { "line": 1481, "col": 6 }, "32.1.1.0": { "line": 1483, "col": 8 }, "32.1.1": { "line": 1482, "col": 6 }, "32.1.2": { "line": 1485, "col": 6 }, "32.1": { "line": 1480, "col": 4 }, "32.2": { "line": 1487, "col": 4 }, "32.3": { "line": 1488, "col": 4 } } };
8332
+ 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": 1449, "col": 2 }, "27": { "line": 1455, "col": 2 }, "28": { "line": 1458, "col": 2 }, "30": { "line": 1473, "col": 2 }, "32": { "line": 1492, "col": 2 }, "33": { "line": 1493, "col": 2 }, "35": { "line": 1511, "col": 2 }, "36": { "line": 1512, "col": 2 }, "37": { "line": 1513, "col": 2 }, "38": { "line": 1514, "col": 2 }, "39": { "line": 1515, "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 }, "28.0": { "line": 1459, "col": 4 }, "28.1": { "line": 1464, "col": 4 }, "30.0": { "line": 1474, "col": 4 }, "30.1": { "line": 1475, "col": 4 }, "30.2": { "line": 1476, "col": 4 }, "30.3": { "line": 1477, "col": 4 }, "30.4": { "line": 1478, "col": 4 }, "30.5": { "line": 1479, "col": 4 }, "33.0": { "line": 1494, "col": 4 }, "33.1.0": { "line": 1496, "col": 6 }, "33.1.1.0": { "line": 1498, "col": 8 }, "33.1.1": { "line": 1497, "col": 6 }, "33.1.2": { "line": 1500, "col": 6 }, "33.1": { "line": 1495, "col": 4 }, "33.2": { "line": 1502, "col": 4 }, "33.3": { "line": 1503, "col": 4 } } };
8316
8333
  export {
8317
8334
  Session,
8318
8335
  __cb_top_0,
@@ -366,6 +366,10 @@ questions and there is NO next turn. Therefore:
366
366
  If something is ambiguous, state the most reasonable assumption and
367
367
  proceed.
368
368
  - NEVER defer work to "the next turn" or hand back a plan — do it now.
369
+ - NEVER end with an empty response or zero tool calls. If the task is hard,
370
+ underspecified, or outside your usual area, still take a concrete first
371
+ action toward it and write your best attempt to the required file — an
372
+ imperfect artifact on disk always beats producing nothing.
369
373
  - Leave the task COMPLETE on disk: write the required file(s), then verify
370
374
  (compile, run, run any tests) and fix what fails before you stop.
371
375
  - If you are running low on tool budget, spend the remaining calls
@@ -553,6 +553,10 @@ questions and there is NO next turn. Therefore:
553
553
  If something is ambiguous, state the most reasonable assumption and
554
554
  proceed.
555
555
  - NEVER defer work to "the next turn" or hand back a plan \u2014 do it now.
556
+ - NEVER end with an empty response or zero tool calls. If the task is hard,
557
+ underspecified, or outside your usual area, still take a concrete first
558
+ action toward it and write your best attempt to the required file \u2014 an
559
+ imperfect artifact on disk always beats producing nothing.
556
560
  - Leave the task COMPLETE on disk: write the required file(s), then verify
557
561
  (compile, run, run any tests) and fix what fails before you stop.
558
562
  - If you are running low on tool budget, spend the remaining calls
@@ -1232,7 +1236,7 @@ const codeAgent = __AgencyFunction.create({
1232
1236
  exported: true
1233
1237
  }, __toolRegistry);
1234
1238
  var stdin_default = graph;
1235
- const __sourceMap = { "dist/lib/agents/agency-agent/subagents/code.agency:agencyCli": { "1": { "line": 66, "col": 2 } }, "dist/lib/agents/agency-agent/subagents/code.agency:setCodeOneShot": { "1": { "line": 378, "col": 2 } }, "dist/lib/agents/agency-agent/subagents/code.agency:codeAgent": { "1": { "line": 394, "col": 2 }, "2": { "line": 395, "col": 2 }, "3": { "line": 396, "col": 2 }, "4": { "line": 397, "col": 2 }, "5": { "line": 401, "col": 2 }, "6": { "line": 402, "col": 2 }, "7": { "line": 405, "col": 2 }, "8": { "line": 412, "col": 2 }, "9": { "line": 413, "col": 2 }, "11": { "line": 465, "col": 2 }, "4.0": { "line": 398, "col": 4 }, "9.0": { "line": 414, "col": 4 }, "9.1.0": { "line": 416, "col": 6 }, "9.1.2.1": { "line": 421, "col": 8 }, "9.1.2.2.0": { "line": 423, "col": 10 }, "9.1.2.2": { "line": 422, "col": 8 }, "9.1.2.4.0": { "line": 426, "col": 10 }, "9.1.2.4": { "line": 425, "col": 8 }, "9.1.2.5": { "line": 428, "col": 8 }, "9.1.2.6": { "line": 429, "col": 8 }, "9.1.2": { "line": 418, "col": 6 }, "9.1.4": { "line": 431, "col": 6 }, "9.1.5": { "line": 439, "col": 6 }, "9.1.6.0": { "line": 441, "col": 8 }, "9.1.6.1": { "line": 442, "col": 8 }, "9.1.6.2": { "line": 443, "col": 8 }, "9.1.6.3": { "line": 445, "col": 8 }, "9.1.6": { "line": 440, "col": 6 }, "9.1": { "line": 415, "col": 4 }, "9.3": { "line": 449, "col": 4 }, "9.4": { "line": 463, "col": 4 } }, "dist/lib/agents/agency-agent/subagents/code.agency:__block_0": {} };
1239
+ const __sourceMap = { "dist/lib/agents/agency-agent/subagents/code.agency:agencyCli": { "1": { "line": 66, "col": 2 } }, "dist/lib/agents/agency-agent/subagents/code.agency:setCodeOneShot": { "1": { "line": 382, "col": 2 } }, "dist/lib/agents/agency-agent/subagents/code.agency:codeAgent": { "1": { "line": 398, "col": 2 }, "2": { "line": 399, "col": 2 }, "3": { "line": 400, "col": 2 }, "4": { "line": 401, "col": 2 }, "5": { "line": 405, "col": 2 }, "6": { "line": 406, "col": 2 }, "7": { "line": 409, "col": 2 }, "8": { "line": 416, "col": 2 }, "9": { "line": 417, "col": 2 }, "11": { "line": 469, "col": 2 }, "4.0": { "line": 402, "col": 4 }, "9.0": { "line": 418, "col": 4 }, "9.1.0": { "line": 420, "col": 6 }, "9.1.2.1": { "line": 425, "col": 8 }, "9.1.2.2.0": { "line": 427, "col": 10 }, "9.1.2.2": { "line": 426, "col": 8 }, "9.1.2.4.0": { "line": 430, "col": 10 }, "9.1.2.4": { "line": 429, "col": 8 }, "9.1.2.5": { "line": 432, "col": 8 }, "9.1.2.6": { "line": 433, "col": 8 }, "9.1.2": { "line": 422, "col": 6 }, "9.1.4": { "line": 435, "col": 6 }, "9.1.5": { "line": 443, "col": 6 }, "9.1.6.0": { "line": 445, "col": 8 }, "9.1.6.1": { "line": 446, "col": 8 }, "9.1.6.2": { "line": 447, "col": 8 }, "9.1.6.3": { "line": 449, "col": 8 }, "9.1.6": { "line": 444, "col": 6 }, "9.1": { "line": 419, "col": 4 }, "9.3": { "line": 453, "col": 4 }, "9.4": { "line": 467, "col": 4 } }, "dist/lib/agents/agency-agent/subagents/code.agency:__block_0": {} };
1236
1240
  export {
1237
1241
  __getCheckpoints,
1238
1242
  __invokeFunction,
@@ -47,6 +47,13 @@ export type LlmOpts<S extends z.ZodSchema = z.ZodSchema> = RetryConfig & {
47
47
  * prompt. Subsequent `agency.llm` calls without `opts.model` use
48
48
  * the client's default. */
49
49
  model?: string;
50
+ /** Cap on generated output tokens for this call. Maps to the
51
+ * provider's `maxTokens`. Set it whenever the expected output is
52
+ * small and bounded (labels, summaries): without a cap, a model
53
+ * that fails to emit its stop token — small local models under a
54
+ * structured-output grammar are the common case — generates until
55
+ * its context window fills. */
56
+ maxTokens?: number;
50
57
  /** Structured-output schema. Maps to `runPrompt`'s `responseFormat`.
51
58
  * When set, the response is parsed and the call returns
52
59
  * `z.infer<S>` instead of the raw string content. */
@@ -10,6 +10,8 @@ export async function llm(prompt, opts = {}) {
10
10
  const clientConfig = {};
11
11
  if (opts.model !== undefined)
12
12
  clientConfig.model = opts.model;
13
+ if (opts.maxTokens !== undefined)
14
+ clientConfig.maxTokens = opts.maxTokens;
13
15
  // Resilience options ride a dedicated `retryConfig` parameter (cleanly
14
16
  // separated from provider-shaped `clientConfig`). Pass even when all three
15
17
  // are undefined — `resolveRetryPolicy` uses `firstDefined` and just falls
@@ -129,11 +129,20 @@ const _summarySchema = z.object({ summary: z.string() });
129
129
  /** Build the transcript string used by both the lazy and eager
130
130
  * summarize prompts. Keeps the shape symmetric with the Agency-side
131
131
  * `summarize()` def. Non-string content gets coerced the same way
132
- * `_getThread()` does to keep the prompt deterministic. */
132
+ * `_getThread()` does to keep the prompt deterministic.
133
+ *
134
+ * System/developer messages are excluded: they are instructions, not
135
+ * conversation, and an agent's system prompt can run thousands of
136
+ * tokens — pasting it into the "summarize this conversation" prompt
137
+ * leaks its content into summaries and, on small local models, makes
138
+ * the summarizer itself the most expensive call of the turn. */
133
139
  function _buildSummaryTranscript(messages) {
134
140
  let transcript = "";
135
141
  for (const m of messages) {
136
- transcript += `[${String(m.role)}] ${_contentToString(m.content)}\n`;
142
+ const role = String(m.role);
143
+ if (role === "system" || role === "developer")
144
+ continue;
145
+ transcript += `[${role}] ${_contentToString(m.content)}\n`;
137
146
  }
138
147
  return transcript;
139
148
  }
@@ -177,6 +186,10 @@ export async function _eagerSummarizeIfNeeded(evt) {
177
186
  return;
178
187
  try {
179
188
  const transcript = _buildSummaryTranscript(evt.messages);
189
+ // All-system threads produce an empty transcript — nothing to
190
+ // summarize, so skip the LLM call rather than prompt over "".
191
+ if (transcript === "")
192
+ return;
180
193
  const result = await agency.llm(`Summarize this conversation in 1-2 sentences:\n${transcript}`, {
181
194
  schema: _summarySchema,
182
195
  // Standalone MessageThread — not in the active ThreadStore,
@@ -184,6 +197,13 @@ export async function _eagerSummarizeIfNeeded(evt) {
184
197
  // isolation guarantee as `thread(hidden: true) { ... }` on
185
198
  // the Agency side.
186
199
  thread: new MessageThread(),
200
+ // A 1-2 sentence summary is small and bounded. Uncapped, a
201
+ // small local model under the structured-output grammar can
202
+ // miss its stop token and generate until the context window
203
+ // fills — and Runner.thread AWAITS this hook at thread close,
204
+ // so that runaway blocks the whole turn (the agent's reply is
205
+ // computed but never rendered).
206
+ maxTokens: 256,
187
207
  });
188
208
  _setThreadSummary(evt.threadId, result.summary);
189
209
  }
@@ -1 +1 @@
1
- export declare const VERSION = "0.7.3";
1
+ export declare const VERSION = "0.7.5";
@@ -1 +1 @@
1
- export const VERSION = "0.7.3";
1
+ export const VERSION = "0.7.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agency-lang",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "The Agency language",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -42,7 +42,7 @@ export effectSet FileSystem = <FileRead, FileWrite>
42
42
  export effectSet Shell = <std::bash, std::exec, std::run>
43
43
 
44
44
  /** Anything that talks to the outside world over the network. */
45
- export effectSet Network = <std::http::fetch, std::http::fetchJSON, std::http::fetchMarkdown, std::search, std::tavilySearch, std::weather, std::browserUse, std::wikipedia::article, std::wikipedia::search, std::wikipedia::summary, std::gdelt, std::fred, std::dbnomics, std::edgar, std::littlesis, std::yc, std::hackernews>
45
+ export effectSet Network = <std::http::fetch, std::http::fetchJSON, std::http::fetchMarkdown, std::search, std::tavilySearch, std::weather, std::browserUse, std::wikipedia::article, std::wikipedia::search, std::wikipedia::summary, std::gdelt, std::fred, std::dbnomics, std::edgar, std::littlesis, std::yc, std::hackernews, std::wikidata>
46
46
 
47
47
  /** The std::data/finance connectors (news + macro + filings). Each also raises
48
48
  std::http::fetchJSON, which is covered by the broader Network set. */
@@ -155,7 +155,7 @@ const FileRead = z.union([z.literal("std::read"), z.literal("std::readBinary"),
155
155
  const FileWrite = z.union([z.literal("std::write"), z.literal("std::writeBinary"), z.literal("std::edit"), z.literal("std::applyPatch"), z.literal("std::mkdir"), z.literal("std::move"), z.literal("std::copy"), z.literal("std::remove")]);
156
156
  const FileSystem = z.union([FileRead, FileWrite]);
157
157
  const Shell = z.union([z.literal("std::bash"), z.literal("std::exec"), z.literal("std::run")]);
158
- const Network = z.union([z.literal("std::http::fetch"), z.literal("std::http::fetchJSON"), z.literal("std::http::fetchMarkdown"), z.literal("std::search"), z.literal("std::tavilySearch"), z.literal("std::weather"), z.literal("std::browserUse"), z.literal("std::wikipedia::article"), z.literal("std::wikipedia::search"), z.literal("std::wikipedia::summary"), z.literal("std::gdelt"), z.literal("std::fred"), z.literal("std::dbnomics"), z.literal("std::edgar"), z.literal("std::littlesis"), z.literal("std::yc"), z.literal("std::hackernews")]);
158
+ const Network = z.union([z.literal("std::http::fetch"), z.literal("std::http::fetchJSON"), z.literal("std::http::fetchMarkdown"), z.literal("std::search"), z.literal("std::tavilySearch"), z.literal("std::weather"), z.literal("std::browserUse"), z.literal("std::wikipedia::article"), z.literal("std::wikipedia::search"), z.literal("std::wikipedia::summary"), z.literal("std::gdelt"), z.literal("std::fred"), z.literal("std::dbnomics"), z.literal("std::edgar"), z.literal("std::littlesis"), z.literal("std::yc"), z.literal("std::hackernews"), z.literal("std::wikidata")]);
159
159
  const DataFinance = z.union([z.literal("std::gdelt"), z.literal("std::fred"), z.literal("std::edgar"), z.literal("std::dbnomics")]);
160
160
  const Messaging = z.union([z.literal("std::sendEmail"), z.literal("std::sendSms"), z.literal("std::sendIMessage")]);
161
161
  const Secrets = z.union([z.literal("std::getSecret"), z.literal("std::setSecret"), z.literal("std::deleteSecret")]);