agency-lang 0.7.0 → 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 (182) hide show
  1. package/dist/lib/agents/agency-agent/agent.agency +169 -28
  2. package/dist/lib/agents/agency-agent/agent.js +579 -152
  3. package/dist/lib/agents/agency-agent/lib/attachments.js +2 -2
  4. package/dist/lib/agents/agency-agent/lib/config.agency +5 -0
  5. package/dist/lib/agents/agency-agent/lib/config.js +11 -0
  6. package/dist/lib/agents/agency-agent/lib/defaultPolicy.agency +106 -0
  7. package/dist/lib/agents/agency-agent/lib/defaultPolicy.js +764 -3
  8. package/dist/lib/agents/agency-agent/lib/modelFilters.js +1 -1
  9. package/dist/lib/agents/agency-agent/lib/resolution.js +4 -4
  10. package/dist/lib/agents/agency-agent/lib/search.js +3 -3
  11. package/dist/lib/agents/agency-agent/lib/settings.js +1 -1
  12. package/dist/lib/agents/agency-agent/lib/utils.js +1 -1
  13. package/dist/lib/agents/agency-agent/shared.agency +22 -0
  14. package/dist/lib/agents/agency-agent/shared.js +160 -3
  15. package/dist/lib/agents/agency-agent/subagents/code.js +1 -1
  16. package/dist/lib/agents/agency-agent/subagents/explorer.js +1 -1
  17. package/dist/lib/agents/agency-agent/subagents/oracle.js +1 -1
  18. package/dist/lib/agents/agency-agent/subagents/research.js +1 -1
  19. package/dist/lib/agents/agency-agent/subagents/review.js +4 -4
  20. package/dist/lib/agents/agency-agent/tests/agentTurn.js +1 -1
  21. package/dist/lib/agents/agency-agent/tests/attachments.js +1 -1
  22. package/dist/lib/agents/agency-agent/tests/attachmentsTurn.js +2 -2
  23. package/dist/lib/agents/agency-agent/tests/gitPolicy.js +3 -3
  24. package/dist/lib/agents/agency-agent/tests/oneShotRounds.agency +20 -0
  25. package/dist/lib/agents/agency-agent/tests/oneShotRounds.js +555 -0
  26. package/dist/lib/agents/agency-agent/tests/oneShotRounds.test.json +9 -0
  27. package/dist/lib/agents/review/agent.js +3 -3
  28. package/dist/lib/cli/doctor.d.ts +8 -0
  29. package/dist/lib/cli/doctor.js +21 -13
  30. package/dist/lib/cli/doctor.test.js +34 -0
  31. package/dist/lib/cli/help.js +1 -5
  32. package/dist/lib/cli/runBundledAgent.d.ts +17 -1
  33. package/dist/lib/cli/runBundledAgent.js +73 -2
  34. package/dist/lib/cli/runBundledAgent.test.d.ts +1 -0
  35. package/dist/lib/cli/runBundledAgent.test.js +96 -0
  36. package/dist/lib/config.d.ts +42 -33
  37. package/dist/lib/config.js +108 -6
  38. package/dist/lib/config.test.js +121 -2
  39. package/dist/lib/ir/prettyPrint.js +25 -4
  40. package/dist/lib/parseCache.js +8 -13
  41. package/dist/lib/parseCache.test.js +5 -8
  42. package/dist/lib/parser.js +5 -12
  43. package/dist/lib/preprocessors/typescriptPreprocessor.d.ts +0 -28
  44. package/dist/lib/preprocessors/typescriptPreprocessor.js +0 -245
  45. package/dist/lib/runtime/configOverrides.d.ts +17 -16
  46. package/dist/lib/runtime/configOverrides.js +27 -16
  47. package/dist/lib/runtime/configOverrides.test.js +116 -2
  48. package/dist/lib/runtime/prompt.js +7 -3
  49. package/dist/lib/runtime/runner.d.ts +2 -2
  50. package/dist/lib/runtime/runner.js +26 -7
  51. package/dist/lib/runtime/state/context.js +9 -2
  52. package/dist/lib/stdlib/llm.d.ts +1 -0
  53. package/dist/lib/stdlib/version.d.ts +1 -1
  54. package/dist/lib/stdlib/version.js +1 -1
  55. package/dist/scripts/agency.d.ts +2 -0
  56. package/dist/scripts/agency.js +55 -12
  57. package/dist/scripts/agency.test.js +73 -1
  58. package/package.json +1 -1
  59. package/stdlib/agency/eval.js +1 -1
  60. package/stdlib/agency.js +1 -1
  61. package/stdlib/agent.agency +9 -9
  62. package/stdlib/agent.js +5 -5
  63. package/stdlib/data/tech/hackernews.js +1 -1
  64. package/stdlib/index.js +15 -15
  65. package/stdlib/llm.agency +2 -1
  66. package/stdlib/llm.js +3 -3
  67. package/stdlib/markdown.js +1 -1
  68. package/stdlib/memory.js +2 -2
  69. package/stdlib/object.js +5 -5
  70. package/stdlib/policy.agency +21 -7
  71. package/stdlib/policy.js +45 -16
  72. package/stdlib/skills.js +1 -1
  73. package/stdlib/strategy.js +3 -3
  74. package/stdlib/thread.js +3 -3
  75. package/stdlib/ui/chart.js +2 -2
  76. package/stdlib/ui/cli.agency +1 -1
  77. package/stdlib/ui/cli.js +1 -1
  78. package/stdlib/ui/layout.js +3 -3
  79. package/stdlib/ui/table.js +2 -2
  80. package/stdlib/ui.js +3 -3
  81. package/dist/lib/agents/docs/cli/cli/agent.md +0 -16
  82. package/dist/lib/agents/docs/cli/cli/compile.md +0 -21
  83. package/dist/lib/agents/docs/cli/cli/coverage.md +0 -112
  84. package/dist/lib/agents/docs/cli/cli/debug.md +0 -41
  85. package/dist/lib/agents/docs/cli/cli/doc.md +0 -98
  86. package/dist/lib/agents/docs/cli/cli/editor-integration.md +0 -44
  87. package/dist/lib/agents/docs/cli/cli/eval-judge.md +0 -72
  88. package/dist/lib/agents/docs/cli/cli/eval.md +0 -194
  89. package/dist/lib/agents/docs/cli/cli/format.md +0 -23
  90. package/dist/lib/agents/docs/cli/cli/index.md +0 -7
  91. package/dist/lib/agents/docs/cli/cli/local.md +0 -92
  92. package/dist/lib/agents/docs/cli/cli/models.md +0 -63
  93. package/dist/lib/agents/docs/cli/cli/optimize.md +0 -338
  94. package/dist/lib/agents/docs/cli/cli/pack.md +0 -56
  95. package/dist/lib/agents/docs/cli/cli/policy.md +0 -23
  96. package/dist/lib/agents/docs/cli/cli/preprocess-and-ast.md +0 -21
  97. package/dist/lib/agents/docs/cli/cli/review.md +0 -16
  98. package/dist/lib/agents/docs/cli/cli/run.md +0 -79
  99. package/dist/lib/agents/docs/cli/cli/schedule.md +0 -89
  100. package/dist/lib/agents/docs/cli/cli/serve.md +0 -52
  101. package/dist/lib/agents/docs/cli/cli/test.md +0 -44
  102. package/dist/lib/agents/docs/cli/cli/trace-and-bundle.md +0 -75
  103. package/dist/lib/agents/docs/cli/cli/typecheck.md +0 -19
  104. package/dist/lib/agents/docs/guide/guide/advanced-types.md +0 -26
  105. package/dist/lib/agents/docs/guide/guide/agency-config-file.md +0 -212
  106. package/dist/lib/agents/docs/guide/guide/agency-packages.md +0 -54
  107. package/dist/lib/agents/docs/guide/guide/agency-stdlib.md +0 -14
  108. package/dist/lib/agents/docs/guide/guide/agency-vs-typescript.md +0 -33
  109. package/dist/lib/agents/docs/guide/guide/attachments.md +0 -56
  110. package/dist/lib/agents/docs/guide/guide/basic-syntax.md +0 -350
  111. package/dist/lib/agents/docs/guide/guide/blocks.md +0 -134
  112. package/dist/lib/agents/docs/guide/guide/build-integration.md +0 -99
  113. package/dist/lib/agents/docs/guide/guide/builtins.md +0 -84
  114. package/dist/lib/agents/docs/guide/guide/callbacks.md +0 -169
  115. package/dist/lib/agents/docs/guide/guide/checkpointing.md +0 -101
  116. package/dist/lib/agents/docs/guide/guide/cli-args.md +0 -190
  117. package/dist/lib/agents/docs/guide/guide/common-functions.md +0 -36
  118. package/dist/lib/agents/docs/guide/guide/compiling-and-running.md +0 -62
  119. package/dist/lib/agents/docs/guide/guide/concurrency.md +0 -108
  120. package/dist/lib/agents/docs/guide/guide/cross-thread-context.md +0 -226
  121. package/dist/lib/agents/docs/guide/guide/custom-providers.md +0 -195
  122. package/dist/lib/agents/docs/guide/guide/debugging.md +0 -67
  123. package/dist/lib/agents/docs/guide/guide/developer-tools.md +0 -90
  124. package/dist/lib/agents/docs/guide/guide/effects-and-raises.md +0 -137
  125. package/dist/lib/agents/docs/guide/guide/effects.md +0 -100
  126. package/dist/lib/agents/docs/guide/guide/error-handling.md +0 -161
  127. package/dist/lib/agents/docs/guide/guide/exercise-1.md +0 -32
  128. package/dist/lib/agents/docs/guide/guide/functions.md +0 -94
  129. package/dist/lib/agents/docs/guide/guide/getting-started.md +0 -35
  130. package/dist/lib/agents/docs/guide/guide/global-var-initialization.md +0 -70
  131. package/dist/lib/agents/docs/guide/guide/global-vs-static.md +0 -76
  132. package/dist/lib/agents/docs/guide/guide/guards.md +0 -134
  133. package/dist/lib/agents/docs/guide/guide/handlers.md +0 -196
  134. package/dist/lib/agents/docs/guide/guide/image-generation.md +0 -113
  135. package/dist/lib/agents/docs/guide/guide/imports-and-packages.md +0 -100
  136. package/dist/lib/agents/docs/guide/guide/interrupts-from-typescript.md +0 -84
  137. package/dist/lib/agents/docs/guide/guide/interrupts-part-2.md +0 -54
  138. package/dist/lib/agents/docs/guide/guide/interrupts.md +0 -139
  139. package/dist/lib/agents/docs/guide/guide/llm-part-2.md +0 -111
  140. package/dist/lib/agents/docs/guide/guide/llm.md +0 -109
  141. package/dist/lib/agents/docs/guide/guide/mcp.md +0 -295
  142. package/dist/lib/agents/docs/guide/guide/memory.md +0 -401
  143. package/dist/lib/agents/docs/guide/guide/message-threads.md +0 -111
  144. package/dist/lib/agents/docs/guide/guide/nodes.md +0 -50
  145. package/dist/lib/agents/docs/guide/guide/observability.md +0 -99
  146. package/dist/lib/agents/docs/guide/guide/partial-application.md +0 -96
  147. package/dist/lib/agents/docs/guide/guide/pattern-matching.md +0 -366
  148. package/dist/lib/agents/docs/guide/guide/policies.md +0 -67
  149. package/dist/lib/agents/docs/guide/guide/schema-parameter-injection.md +0 -101
  150. package/dist/lib/agents/docs/guide/guide/schemas.md +0 -99
  151. package/dist/lib/agents/docs/guide/guide/serving.md +0 -165
  152. package/dist/lib/agents/docs/guide/guide/state-isolation.md +0 -139
  153. package/dist/lib/agents/docs/guide/guide/streaming.md +0 -28
  154. package/dist/lib/agents/docs/guide/guide/tags.md +0 -72
  155. package/dist/lib/agents/docs/guide/guide/testing.md +0 -187
  156. package/dist/lib/agents/docs/guide/guide/troubleshooting.md +0 -86
  157. package/dist/lib/agents/docs/guide/guide/ts-helpers.md +0 -559
  158. package/dist/lib/agents/docs/guide/guide/ts-interop.md +0 -72
  159. package/dist/lib/agents/docs/guide/guide/type-validation.md +0 -187
  160. package/dist/lib/agents/docs/guide/guide/types.md +0 -181
  161. package/dist/lib/agents/docs/guide/guide/unused.md +0 -178
  162. package/dist/lib/agents/docs/guide/guide/unused2.md +0 -258
  163. package/dist/lib/agents/docs/guide/guide/value-parameterized-types.md +0 -186
  164. package/dist/lib/agents/docs/guide/guide/vscode-extension.md +0 -33
  165. package/dist/lib/agents/docs/guide/guide/why-agency.md +0 -323
  166. package/dist/lib/preprocessors/typescriptPreprocessor.config.test.js +0 -327
  167. package/stdlib/browser.js +0 -421
  168. package/stdlib/chart.js +0 -983
  169. package/stdlib/cli.js +0 -1116
  170. package/stdlib/email.js +0 -1104
  171. package/stdlib/imessage.js +0 -377
  172. package/stdlib/keyring.js +0 -803
  173. package/stdlib/layout.js +0 -3657
  174. package/stdlib/oauth.js +0 -862
  175. package/stdlib/schemas.js +0 -223
  176. package/stdlib/search.js +0 -629
  177. package/stdlib/sms.js +0 -419
  178. package/stdlib/table.js +0 -1419
  179. package/stdlib/threads.js +0 -1041
  180. package/stdlib/types.js +0 -222
  181. package/stdlib/validators.js +0 -1606
  182. /package/dist/lib/{preprocessors/typescriptPreprocessor.config.test.d.ts → cli/doctor.test.d.ts} +0 -0
@@ -3,15 +3,13 @@ import { getVersion } from "agency-lang/stdlib/agency.js";
3
3
  import { printLocalCatalog, localModelsSupported, listModelNames } from "agency-lang/stdlib/agency/local.js";
4
4
  import { parseArgs } from "agency-lang/stdlib/args.js";
5
5
  import { map } from "agency-lang/stdlib/array.js";
6
- import { clearMessages, pushMessage, repl, clearScreen, clearHistory } from "agency-lang/stdlib/ui/cli.js";
7
6
  import { today } from "agency-lang/stdlib/date.js";
8
7
  import { generateImage } from "agency-lang/stdlib/image.js";
9
8
  import { applyAgentCwd, setAgentCwd } from "agency-lang/stdlib/index.js";
9
+ import { listHostedModels, hostedModelInfo, setLlmOptions } from "agency-lang/stdlib/llm.js";
10
+ import { setMemoryId, disableMemory } from "agency-lang/stdlib/memory.js";
10
11
  import { keys } from "agency-lang/stdlib/object.js";
11
12
  import { basename, dirname } from "agency-lang/stdlib/path.js";
12
- import { box, render } from "agency-lang/stdlib/ui/layout.js";
13
- import { listHostedModels, hostedModelInfo } from "agency-lang/stdlib/llm.js";
14
- import { setMemoryId, disableMemory } from "agency-lang/stdlib/memory.js";
15
13
  import { cliPolicyHandler, parsePolicyFile, setPolicy, ScopedRuleFields } from "agency-lang/stdlib/policy.js";
16
14
  import { exists } from "agency-lang/stdlib/shell.js";
17
15
  import { commandsDir, expandSlash } from "agency-lang/stdlib/skills.js";
@@ -19,17 +17,19 @@ import { highlight } from "agency-lang/stdlib/syntax.js";
19
17
  import { cwd, env, isTTY, readStdin, setTitle } from "agency-lang/stdlib/system.js";
20
18
  import { attachToReply, getCost, getModelCosts, image, systemMessage, Attachment } from "agency-lang/stdlib/thread.js";
21
19
  import { chooseOption, ChoiceItem } from "agency-lang/stdlib/ui.js";
20
+ import { clearMessages, pushMessage, repl, clearScreen, clearHistory } from "agency-lang/stdlib/ui/cli.js";
21
+ import { box, render } from "agency-lang/stdlib/ui/layout.js";
22
22
  import { figs, title } from "./images/images.js";
23
23
  import { detectAttachments, modalityFilter } from "./lib/attachments.js";
24
- import { POLICY_PATH, HISTORY_PATH, ALWAYS_FIELDS } from "./lib/config.js";
25
- import { minimalAutoApprovePolicy, recommendedAutoApprovePolicy } from "./lib/defaultPolicy.js";
24
+ import { POLICY_PATH, SESSION_POLICY_PATH, HISTORY_PATH, ALWAYS_FIELDS } from "./lib/config.js";
25
+ import { builtinPolicy, builtinPolicyNames, minimalAutoApprovePolicy, recommendedAutoApprovePolicy, BUILTIN_POLICIES } from "./lib/defaultPolicy.js";
26
26
  import { filterHostedModels, ModelFilters } from "./lib/modelFilters.js";
27
27
  import { parseModelFlag, knownProviders, Resolved } from "./lib/models.js";
28
28
  import { buildLayers, resolveAll, diffResolved, Ctx, SlotChange } from "./lib/resolution.js";
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";
@@ -210,24 +210,18 @@ __registerTool(localModelsSupported);
210
210
  __registerTool(listModelNames);
211
211
  __registerTool(parseArgs);
212
212
  __registerTool(map);
213
- __registerTool(clearMessages);
214
- __registerTool(pushMessage);
215
- __registerTool(repl);
216
- __registerTool(clearScreen);
217
- __registerTool(clearHistory);
218
213
  __registerTool(today);
219
214
  __registerTool(generateImage);
220
215
  __registerTool(applyAgentCwd);
221
216
  __registerTool(setAgentCwd);
222
- __registerTool(keys);
223
- __registerTool(basename);
224
- __registerTool(dirname);
225
- __registerTool(box);
226
- __registerTool(render);
227
217
  __registerTool(listHostedModels);
228
218
  __registerTool(hostedModelInfo);
219
+ __registerTool(setLlmOptions);
229
220
  __registerTool(setMemoryId);
230
221
  __registerTool(disableMemory);
222
+ __registerTool(keys);
223
+ __registerTool(basename);
224
+ __registerTool(dirname);
231
225
  __registerTool(cliPolicyHandler);
232
226
  __registerTool(parsePolicyFile);
233
227
  __registerTool(setPolicy);
@@ -249,15 +243,26 @@ __registerTool(systemMessage);
249
243
  __registerTool(Attachment);
250
244
  __registerTool(chooseOption);
251
245
  __registerTool(ChoiceItem);
246
+ __registerTool(clearMessages);
247
+ __registerTool(pushMessage);
248
+ __registerTool(repl);
249
+ __registerTool(clearScreen);
250
+ __registerTool(clearHistory);
251
+ __registerTool(box);
252
+ __registerTool(render);
252
253
  __registerTool(figs);
253
254
  __registerTool(title);
254
255
  __registerTool(detectAttachments);
255
256
  __registerTool(modalityFilter);
256
257
  __registerTool(POLICY_PATH);
258
+ __registerTool(SESSION_POLICY_PATH);
257
259
  __registerTool(HISTORY_PATH);
258
260
  __registerTool(ALWAYS_FIELDS);
261
+ __registerTool(builtinPolicy);
262
+ __registerTool(builtinPolicyNames);
259
263
  __registerTool(minimalAutoApprovePolicy);
260
264
  __registerTool(recommendedAutoApprovePolicy);
265
+ __registerTool(BUILTIN_POLICIES);
261
266
  __registerTool(filterHostedModels);
262
267
  __registerTool(ModelFilters);
263
268
  __registerTool(parseModelFlag);
@@ -284,6 +289,7 @@ __registerTool(getResolvedSlots);
284
289
  __registerTool(applyResolved);
285
290
  __registerTool(promoteAll);
286
291
  __registerTool(currentProvider);
292
+ __registerTool(resolveMaxToolCallRounds);
287
293
  __registerTool(codeAgent);
288
294
  __registerTool(explorerAgent);
289
295
  __registerTool(oracleAgent);
@@ -537,6 +543,7 @@ async function __initializeGlobals(__ctx) {
537
543
  }), `1`));
538
544
  __ctx.globals.set("dist/lib/agents/agency-agent/agent.agency", "VERBOSE", false);
539
545
  __ctx.globals.set("dist/lib/agents/agency-agent/agent.agency", "_isInteractive", true);
546
+ __ctx.globals.set("dist/lib/agents/agency-agent/agent.agency", "_policyArg", ``);
540
547
  __ctx.globals.set("dist/lib/agents/agency-agent/agent.agency", "_context", ``);
541
548
  __ctx.globals.set("dist/lib/agents/agency-agent/agent.agency", "_session", {
542
549
  "pin": ``,
@@ -1854,7 +1861,7 @@ async function __renderLLMCallResponse_impl(data) {
1854
1861
  {
1855
1862
  condition: async () => __stack.args.data.toolCalls.length > 0,
1856
1863
  body: async (runner2) => {
1857
- await runner2.loop(0, __stack.args.data.toolCalls, async (toolCall, _, runner3) => {
1864
+ await runner2.loop(0, async () => __stack.args.data.toolCalls, async (toolCall, _, runner3) => {
1858
1865
  await runner3.step(0, async (runner4) => {
1859
1866
  __self.__retryable = false;
1860
1867
  await __callMethod(__stack.locals.response, "push", {
@@ -2269,7 +2276,7 @@ async function __mergedPalette_impl() {
2269
2276
  await runner.step(1, async (runner2) => {
2270
2277
  __stack.locals.out = {};
2271
2278
  });
2272
- await runner.loop(2, __readStatic(projectCommands, "projectCommands", "dist/lib/agents/agency-agent/agent.agency"), async (cmd, _, runner2) => {
2279
+ await runner.loop(2, async () => __readStatic(projectCommands, "projectCommands", "dist/lib/agents/agency-agent/agent.agency"), async (cmd, _, runner2) => {
2273
2280
  await runner2.step(0, async (runner3) => {
2274
2281
  __stack.locals.label = cmd.description;
2275
2282
  });
@@ -2298,7 +2305,7 @@ async function __mergedPalette_impl() {
2298
2305
  return;
2299
2306
  }
2300
2307
  });
2301
- await runner.loop(4, __stack.locals.builtins, async (key, _, runner2) => {
2308
+ await runner.loop(4, async () => __stack.locals.builtins, async (key, _, runner2) => {
2302
2309
  await runner2.step(0, async (runner3) => {
2303
2310
  __stack.locals.out[key] = __stack.locals.builtins[key];
2304
2311
  });
@@ -2435,7 +2442,7 @@ async function __switchModel_impl(prior, spec, ctx, before) {
2435
2442
  await runner.step(1, async (runner2) => {
2436
2443
  __stack.locals.nextSlots = {};
2437
2444
  });
2438
- await runner.loop(2, await __callMethod(Object, "keys", {
2445
+ await runner.loop(2, async () => await __callMethod(Object, "keys", {
2439
2446
  type: "positional",
2440
2447
  args: [__stack.args.prior.slots]
2441
2448
  }), async (key, _, runner2) => {
@@ -2922,7 +2929,7 @@ async function __modelChoiceItems_impl(filters) {
2922
2929
  await runner.step(1, async (runner2) => {
2923
2930
  __stack.locals.items = [];
2924
2931
  });
2925
- await runner.loop(2, await __call(filterHostedModels, {
2932
+ await runner.loop(2, async () => await __call(filterHostedModels, {
2926
2933
  type: "positional",
2927
2934
  args: [await __call(listHostedModels, {
2928
2935
  type: "positional",
@@ -3442,7 +3449,7 @@ async function ___runTurn_impl(msg) {
3442
3449
  await runner2.step(3, async (runner3) => {
3443
3450
  __stack.locals.totalTokens = 0;
3444
3451
  });
3445
- await runner2.loop(4, __stack.locals.byModel, async (m, _, runner3) => {
3452
+ await runner2.loop(4, async () => __stack.locals.byModel, async (m, _, runner3) => {
3446
3453
  await runner3.step(0, async (runner4) => {
3447
3454
  __stack.locals.totalCost = __stack.locals.totalCost + m.cost;
3448
3455
  });
@@ -3505,7 +3512,7 @@ async function ___runTurn_impl(msg) {
3505
3512
  return;
3506
3513
  }
3507
3514
  });
3508
- await runner3.loop(2, __stack.locals.byModel, async (m, _, runner4) => {
3515
+ await runner3.loop(2, async () => __stack.locals.byModel, async (m, _, runner4) => {
3509
3516
  await runner4.step(0, async (runner5) => {
3510
3517
  __self.__retryable = false;
3511
3518
  const __funcResult = await __call(pushMessage, {
@@ -3596,7 +3603,7 @@ async function ___runTurn_impl(msg) {
3596
3603
  return;
3597
3604
  }
3598
3605
  });
3599
- await runner3.loop(2, await __callMethod(Object, "keys", {
3606
+ await runner3.loop(2, async () => await __callMethod(Object, "keys", {
3600
3607
  type: "positional",
3601
3608
  args: [__stack.locals.current]
3602
3609
  }), async (slot, _, runner4) => {
@@ -3705,7 +3712,7 @@ async function ___runTurn_impl(msg) {
3705
3712
  await runner2.step(6, async (runner3) => {
3706
3713
  __globals().set("dist/lib/agents/agency-agent/agent.agency", "_session", __stack.locals.out.session);
3707
3714
  });
3708
- await runner2.loop(7, __stack.locals.out.changes, async (change, _, runner3) => {
3715
+ await runner2.loop(7, async () => __stack.locals.out.changes, async (change, _, runner3) => {
3709
3716
  await runner3.step(0, async (runner4) => {
3710
3717
  const __funcResult = await __call(reactToSlotChange, {
3711
3718
  type: "positional",
@@ -3730,7 +3737,7 @@ async function ___runTurn_impl(msg) {
3730
3737
  return;
3731
3738
  }
3732
3739
  });
3733
- await runner2.loop(9, await __callMethod(Object, "keys", {
3740
+ await runner2.loop(9, async () => await __callMethod(Object, "keys", {
3734
3741
  type: "positional",
3735
3742
  args: [__stack.locals.out.resolved]
3736
3743
  }), async (slot, _, runner3) => {
@@ -3837,7 +3844,7 @@ async function ___runTurn_impl(msg) {
3837
3844
  await runner2.step(3, async (runner3) => {
3838
3845
  __self.__retryable = false;
3839
3846
  });
3840
- await runner2.loop(4, __stack.locals.models, async (model, _, runner3) => {
3847
+ await runner2.loop(4, async () => __stack.locals.models, async (model, _, runner3) => {
3841
3848
  await runner3.step(0, async (runner4) => {
3842
3849
  __self.__retryable = false;
3843
3850
  const __funcResult = await __call(pushMessage, {
@@ -3905,7 +3912,7 @@ async function ___runTurn_impl(msg) {
3905
3912
  await runner2.step(2, async (runner3) => {
3906
3913
  __stack.locals.items = [];
3907
3914
  });
3908
- await runner2.loop(3, await __call(listModelNames, {
3915
+ await runner2.loop(3, async () => await __call(listModelNames, {
3909
3916
  type: "positional",
3910
3917
  args: []
3911
3918
  }), async (modelName, _, runner3) => {
@@ -3986,7 +3993,7 @@ async function ___runTurn_impl(msg) {
3986
3993
  return;
3987
3994
  }
3988
3995
  });
3989
- await runner2.loop(10, await __call(diffResolved, {
3996
+ await runner2.loop(10, async () => await __call(diffResolved, {
3990
3997
  type: "positional",
3991
3998
  args: [__stack.locals.before, await __call(getResolvedSlots, {
3992
3999
  type: "positional",
@@ -4662,7 +4669,7 @@ async function __mainAgent_impl(prompt) {
4662
4669
  }
4663
4670
  });
4664
4671
  });
4665
- await runner.thread(1, "create", { label: `main`, summarize: true, session: `main` }, async (runner2) => {
4672
+ await runner.thread(1, "create", async () => ({ label: `main`, summarize: true, session: `main` }), async (runner2) => {
4666
4673
  await runner2.step(0, async (runner3) => {
4667
4674
  __self.__retryable = false;
4668
4675
  const __funcResult = await __call(setMemoryId, {
@@ -4969,7 +4976,7 @@ async function __agentReplyVia_impl(target, userMsg) {
4969
4976
  return;
4970
4977
  }
4971
4978
  });
4972
- await runner.loop(13, __stack.locals.detected.skipped, async (skippedFile, _, runner2) => {
4979
+ await runner.loop(13, async () => __stack.locals.detected.skipped, async (skippedFile, _, runner2) => {
4973
4980
  await runner2.step(0, async (runner3) => {
4974
4981
  __self.__retryable = false;
4975
4982
  const __funcResult = await __call(pushMessage, {
@@ -5006,7 +5013,7 @@ async function __agentReplyVia_impl(target, userMsg) {
5006
5013
  }
5007
5014
  }
5008
5015
  ]);
5009
- await runner.loop(16, __stack.locals.detected.attached, async (item, _, runner2) => {
5016
+ await runner.loop(16, async () => __stack.locals.detected.attached, async (item, _, runner2) => {
5010
5017
  await runner2.step(0, async (runner3) => {
5011
5018
  __self.__retryable = false;
5012
5019
  const __funcResult = await __call(pushMessage, {
@@ -5889,6 +5896,181 @@ const printHeader = __AgencyFunction.create({
5889
5896
  safe: false,
5890
5897
  exported: false
5891
5898
  }, __toolRegistry);
5899
+ async function __printPolicyHelp_impl() {
5900
+ const __setupData = setupFunction();
5901
+ const __stack = __setupData.stack;
5902
+ const __step = __setupData.step;
5903
+ const __self = __setupData.self;
5904
+ const __ctx = getRuntimeContext().ctx;
5905
+ let __forked;
5906
+ let __functionCompleted = false;
5907
+ if (!__globals().isInitialized("dist/lib/agents/agency-agent/agent.agency")) {
5908
+ await __initializeGlobals(__ctx);
5909
+ }
5910
+ let __funcStartTime = performance.now();
5911
+ __self.__retryable = __self.__retryable ?? true;
5912
+ const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/agent.agency", scopeName: "printPolicyHelp", threads: __setupData.threads });
5913
+ let __resultCheckpointId = -1;
5914
+ if (__ctx._pendingArgOverrides) {
5915
+ const __overrides = __ctx._pendingArgOverrides;
5916
+ __ctx._pendingArgOverrides = void 0;
5917
+ }
5918
+ try {
5919
+ await agencyStore.run({
5920
+ ...getRuntimeContext(),
5921
+ ctx: __ctx,
5922
+ stack: __setupData.stateStack,
5923
+ threads: __setupData.threads
5924
+ }, async () => {
5925
+ await runner.hook(0, async () => {
5926
+ await callHook({
5927
+ name: "onFunctionStart",
5928
+ data: {
5929
+ functionName: "printPolicyHelp",
5930
+ args: {},
5931
+ moduleId: "dist/lib/agents/agency-agent/agent.agency"
5932
+ }
5933
+ });
5934
+ });
5935
+ await runner.step(1, async (runner2) => {
5936
+ const __funcResult = await __call(print, {
5937
+ type: "positional",
5938
+ args: [await __callMethod(color, "bold", {
5939
+ type: "positional",
5940
+ args: [`Usage: agency agent --policy <name | path>`]
5941
+ })]
5942
+ });
5943
+ if (hasInterrupts(__funcResult)) {
5944
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
5945
+ runner2.halt(__funcResult);
5946
+ return;
5947
+ }
5948
+ });
5949
+ await runner.step(2, async (runner2) => {
5950
+ const __funcResult = await __call(print, {
5951
+ type: "positional",
5952
+ args: [`Select the approval policy for this run: a built-in name below, or a path to a policy JSON file.`]
5953
+ });
5954
+ if (hasInterrupts(__funcResult)) {
5955
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
5956
+ runner2.halt(__funcResult);
5957
+ return;
5958
+ }
5959
+ });
5960
+ await runner.step(3, async (runner2) => {
5961
+ const __funcResult = await __call(print, {
5962
+ type: "positional",
5963
+ args: [``]
5964
+ });
5965
+ if (hasInterrupts(__funcResult)) {
5966
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
5967
+ runner2.halt(__funcResult);
5968
+ return;
5969
+ }
5970
+ });
5971
+ await runner.step(4, async (runner2) => {
5972
+ const __funcResult = await __call(print, {
5973
+ type: "positional",
5974
+ args: [await __callMethod(color, "bold", {
5975
+ type: "positional",
5976
+ args: [`Built-in policies:`]
5977
+ })]
5978
+ });
5979
+ if (hasInterrupts(__funcResult)) {
5980
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
5981
+ runner2.halt(__funcResult);
5982
+ return;
5983
+ }
5984
+ });
5985
+ await runner.loop(5, async () => __readStatic(BUILTIN_POLICIES, "BUILTIN_POLICIES", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/defaultPolicy.agency"), async (p, _, runner2) => {
5986
+ await runner2.step(0, async (runner3) => {
5987
+ const __funcResult = await __call(print, {
5988
+ type: "positional",
5989
+ args: [` ${await __callMethod(color, "cyan", {
5990
+ type: "positional",
5991
+ args: [p.name]
5992
+ })}`]
5993
+ });
5994
+ if (hasInterrupts(__funcResult)) {
5995
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
5996
+ runner3.halt(__funcResult);
5997
+ return;
5998
+ }
5999
+ });
6000
+ await runner2.step(1, async (runner3) => {
6001
+ const __funcResult = await __call(print, {
6002
+ type: "positional",
6003
+ args: [` ${p.description}`]
6004
+ });
6005
+ if (hasInterrupts(__funcResult)) {
6006
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6007
+ runner3.halt(__funcResult);
6008
+ return;
6009
+ }
6010
+ });
6011
+ });
6012
+ });
6013
+ if (runner.halted) {
6014
+ if (isFailure(runner.haltResult)) {
6015
+ runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
6016
+ }
6017
+ return runner.haltResult;
6018
+ }
6019
+ } catch (__error) {
6020
+ if (__error instanceof RestoreSignal) {
6021
+ throw __error;
6022
+ }
6023
+ if (__error instanceof AgencyAbort) {
6024
+ throw __error;
6025
+ }
6026
+ {
6027
+ const __errMsg = __error instanceof Error ? __error.message : String(__error);
6028
+ const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
6029
+ const __log = __createLogger(__ctx.logLevel);
6030
+ __log.error("Function printPolicyHelp threw an exception (converted to Failure): " + __errMsg);
6031
+ if (__errStack) __log.error(__errStack);
6032
+ __ctx.statelogClient?.error?.({
6033
+ errorType: "runtimeError",
6034
+ message: __errMsg,
6035
+ functionName: "printPolicyHelp",
6036
+ retryable: __self.__retryable
6037
+ });
6038
+ }
6039
+ return failure(
6040
+ __error instanceof Error ? __error.message : String(__error),
6041
+ {
6042
+ checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
6043
+ retryable: __self.__retryable,
6044
+ functionName: "printPolicyHelp",
6045
+ args: __stack.args
6046
+ }
6047
+ );
6048
+ } finally {
6049
+ __stateStack()?.pop();
6050
+ if (__functionCompleted) {
6051
+ await callHook({
6052
+ name: "onFunctionEnd",
6053
+ data: {
6054
+ functionName: "printPolicyHelp",
6055
+ timeTaken: performance.now() - __funcStartTime
6056
+ }
6057
+ });
6058
+ }
6059
+ }
6060
+ }
6061
+ const printPolicyHelp = __AgencyFunction.create({
6062
+ name: "printPolicyHelp",
6063
+ module: "dist/lib/agents/agency-agent/agent.agency",
6064
+ fn: __printPolicyHelp_impl,
6065
+ params: [],
6066
+ toolDefinition: {
6067
+ name: "printPolicyHelp",
6068
+ description: "No description provided.",
6069
+ schema: z.object({})
6070
+ },
6071
+ safe: false,
6072
+ exported: false
6073
+ }, __toolRegistry);
5892
6074
  async function __givePolicyChoice_impl() {
5893
6075
  const __setupData = setupFunction();
5894
6076
  const __stack = __setupData.stack;
@@ -6136,138 +6318,249 @@ Current working directory: ${await __call(cwd, {
6136
6318
  })}${__stack.locals.projectContext}`);
6137
6319
  });
6138
6320
  await runner.step(5, async (runner2) => {
6139
- __self.__retryable = false;
6140
- __stack.locals.policy = await __call(parsePolicyFile, {
6141
- type: "positional",
6142
- args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency")]
6143
- });
6144
- if (hasInterrupts(__stack.locals.policy)) {
6145
- await getRuntimeContext().ctx.pendingPromises.awaitAll();
6146
- runner2.halt(__stack.locals.policy);
6147
- return;
6148
- }
6321
+ __stack.locals.policyFile = __readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency");
6149
6322
  });
6150
- await runner.ifElse(6, [
6323
+ await runner.step(6, async (runner2) => {
6324
+ __stack.locals.sessionPolicy = null;
6325
+ });
6326
+ await runner.ifElse(7, [
6151
6327
  {
6152
- condition: async () => await isFailure(__stack.locals.policy),
6328
+ condition: async () => !__eq(__globals().get("dist/lib/agents/agency-agent/agent.agency", "_policyArg"), ``),
6153
6329
  body: async (runner2) => {
6154
6330
  await runner2.step(0, async (runner3) => {
6155
- __stack.locals.f = __stack.locals.policy.error;
6156
6331
  });
6157
- await runner2.ifElse(1, [
6332
+ await runner2.step(1, async (runner3) => {
6333
+ __self.__retryable = false;
6334
+ __stack.locals.builtin = await __call(builtinPolicy, {
6335
+ type: "positional",
6336
+ args: [__globals().get("dist/lib/agents/agency-agent/agent.agency", "_policyArg"), await __call(cwd, {
6337
+ type: "positional",
6338
+ args: []
6339
+ })]
6340
+ });
6341
+ if (hasInterrupts(__stack.locals.builtin)) {
6342
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6343
+ runner3.halt(__stack.locals.builtin);
6344
+ return;
6345
+ }
6346
+ });
6347
+ await runner2.ifElse(2, [
6158
6348
  {
6159
- condition: async () => __eq(__stack.locals.f.status, `doesnt-exist`),
6349
+ condition: async () => !__eq(__stack.locals.builtin, null),
6160
6350
  body: async (runner3) => {
6161
- await runner3.ifElse(0, [
6162
- {
6163
- condition: async () => __stack.args.interactive,
6164
- body: async (runner4) => {
6165
- await runner4.step(0, async (runner5) => {
6166
- const __funcResult = await __call(print, {
6167
- type: "positional",
6168
- args: [await __callMethod(color, "yellow", {
6169
- type: "positional",
6170
- args: [`No existing policy found at ${__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency")}.`]
6171
- })]
6172
- });
6173
- if (hasInterrupts(__funcResult)) {
6174
- await getRuntimeContext().ctx.pendingPromises.awaitAll();
6175
- runner5.halt(__funcResult);
6176
- return;
6177
- }
6178
- });
6179
- await runner4.step(1, async (runner5) => {
6180
- __self.__retryable = false;
6181
- const __funcResult = await __call(setPolicy, {
6182
- type: "positional",
6183
- args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"), await __call(givePolicyChoice, {
6184
- type: "positional",
6185
- args: []
6186
- })]
6187
- });
6188
- if (hasInterrupts(__funcResult)) {
6189
- await getRuntimeContext().ctx.pendingPromises.awaitAll();
6190
- runner5.halt(__funcResult);
6191
- return;
6192
- }
6193
- });
6194
- }
6195
- }
6196
- ], async (runner4) => {
6197
- await runner4.step(2, async (runner5) => {
6198
- __self.__retryable = false;
6199
- const __funcResult = await __call(setPolicy, {
6200
- type: "positional",
6201
- args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"), __readStatic(recommendedAutoApprovePolicy, "recommendedAutoApprovePolicy", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/defaultPolicy.agency")]
6202
- });
6203
- if (hasInterrupts(__funcResult)) {
6204
- await getRuntimeContext().ctx.pendingPromises.awaitAll();
6205
- runner5.halt(__funcResult);
6206
- return;
6207
- }
6208
- });
6351
+ await runner3.step(0, async (runner4) => {
6209
6352
  });
6210
6353
  await runner3.step(1, async (runner4) => {
6211
- __self.__retryable = false;
6354
+ __stack.locals.policyFile = __readStatic(SESSION_POLICY_PATH, "SESSION_POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency");
6355
+ });
6356
+ await runner3.step(2, async (runner4) => {
6357
+ __stack.locals.sessionPolicy = __stack.locals.builtin;
6212
6358
  });
6213
6359
  }
6214
6360
  }
6215
6361
  ], async (runner3) => {
6216
- await runner3.step(2, async (runner4) => {
6217
- const __funcResult = await __call(print, {
6362
+ await runner3.step(3, async (runner4) => {
6363
+ });
6364
+ await runner3.step(4, async (runner4) => {
6365
+ __self.__retryable = false;
6366
+ __stack.locals.loaded = await __call(parsePolicyFile, {
6218
6367
  type: "positional",
6219
- args: [await __callMethod(color, "red", {
6220
- type: "positional",
6221
- args: [`Failed to load policy: ${await __callMethod(JSON, "stringify", {
6222
- type: "positional",
6223
- args: [__stack.locals.f.error]
6224
- })}`]
6225
- })]
6368
+ args: [__globals().get("dist/lib/agents/agency-agent/agent.agency", "_policyArg")]
6226
6369
  });
6227
- if (hasInterrupts(__funcResult)) {
6370
+ if (hasInterrupts(__stack.locals.loaded)) {
6228
6371
  await getRuntimeContext().ctx.pendingPromises.awaitAll();
6229
- runner4.halt(__funcResult);
6372
+ runner4.halt(__stack.locals.loaded);
6230
6373
  return;
6231
6374
  }
6232
6375
  });
6233
- await runner3.step(3, async (runner4) => {
6234
- await __callMethod(process, "exit", {
6235
- type: "positional",
6236
- args: [1]
6237
- });
6376
+ await runner3.ifElse(5, [
6377
+ {
6378
+ condition: async () => await isFailure(__stack.locals.loaded),
6379
+ body: async (runner4) => {
6380
+ await runner4.step(0, async (runner5) => {
6381
+ __stack.locals.f = __stack.locals.loaded.error;
6382
+ });
6383
+ await runner4.step(1, async (runner5) => {
6384
+ __self.__retryable = false;
6385
+ const __funcResult = await __call(print, {
6386
+ type: "positional",
6387
+ args: [await __callMethod(color, "red", {
6388
+ type: "positional",
6389
+ args: [`--policy '${__globals().get("dist/lib/agents/agency-agent/agent.agency", "_policyArg")}' is neither a built-in policy (${await __callMethod(await await __call(builtinPolicyNames, {
6390
+ type: "positional",
6391
+ args: []
6392
+ }), "join", {
6393
+ type: "positional",
6394
+ args: [`, `]
6395
+ })}) nor a readable policy file (${__stack.locals.f.status}).`]
6396
+ })]
6397
+ });
6398
+ if (hasInterrupts(__funcResult)) {
6399
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6400
+ runner5.halt(__funcResult);
6401
+ return;
6402
+ }
6403
+ });
6404
+ await runner4.step(2, async (runner5) => {
6405
+ await __callMethod(process, "exit", {
6406
+ type: "positional",
6407
+ args: [1]
6408
+ });
6409
+ });
6410
+ }
6411
+ }
6412
+ ]);
6413
+ await runner3.step(6, async (runner4) => {
6414
+ __self.__retryable = false;
6415
+ });
6416
+ await runner3.step(7, async (runner4) => {
6417
+ __stack.locals.policyFile = __globals().get("dist/lib/agents/agency-agent/agent.agency", "_policyArg");
6238
6418
  });
6239
6419
  });
6240
- await runner2.step(2, async (runner3) => {
6420
+ await runner2.step(3, async (runner3) => {
6241
6421
  __self.__retryable = false;
6242
6422
  });
6243
6423
  }
6244
6424
  }
6245
6425
  ], async (runner2) => {
6246
- await runner2.step(3, async (runner3) => {
6426
+ await runner2.step(4, async (runner3) => {
6247
6427
  __self.__retryable = false;
6248
- const __funcResult = await __call(setPolicy, {
6428
+ __stack.locals.policy = await __call(parsePolicyFile, {
6249
6429
  type: "positional",
6250
- args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"), __stack.locals.policy.value]
6430
+ args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency")]
6251
6431
  });
6252
- if (hasInterrupts(__funcResult)) {
6432
+ if (hasInterrupts(__stack.locals.policy)) {
6253
6433
  await getRuntimeContext().ctx.pendingPromises.awaitAll();
6254
- runner3.halt(__funcResult);
6434
+ runner3.halt(__stack.locals.policy);
6255
6435
  return;
6256
6436
  }
6257
6437
  });
6438
+ await runner2.ifElse(5, [
6439
+ {
6440
+ condition: async () => await isFailure(__stack.locals.policy),
6441
+ body: async (runner3) => {
6442
+ await runner3.step(0, async (runner4) => {
6443
+ __stack.locals.f = __stack.locals.policy.error;
6444
+ });
6445
+ await runner3.ifElse(1, [
6446
+ {
6447
+ condition: async () => __eq(__stack.locals.f.status, `doesnt-exist`),
6448
+ body: async (runner4) => {
6449
+ await runner4.ifElse(0, [
6450
+ {
6451
+ condition: async () => __stack.args.interactive,
6452
+ body: async (runner5) => {
6453
+ await runner5.step(0, async (runner6) => {
6454
+ const __funcResult = await __call(print, {
6455
+ type: "positional",
6456
+ args: [await __callMethod(color, "yellow", {
6457
+ type: "positional",
6458
+ args: [`No existing policy found at ${__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency")}.`]
6459
+ })]
6460
+ });
6461
+ if (hasInterrupts(__funcResult)) {
6462
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6463
+ runner6.halt(__funcResult);
6464
+ return;
6465
+ }
6466
+ });
6467
+ await runner5.step(1, async (runner6) => {
6468
+ __self.__retryable = false;
6469
+ const __funcResult = await __call(setPolicy, {
6470
+ type: "positional",
6471
+ args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"), await __call(givePolicyChoice, {
6472
+ type: "positional",
6473
+ args: []
6474
+ })]
6475
+ });
6476
+ if (hasInterrupts(__funcResult)) {
6477
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6478
+ runner6.halt(__funcResult);
6479
+ return;
6480
+ }
6481
+ });
6482
+ }
6483
+ }
6484
+ ], async (runner5) => {
6485
+ await runner5.step(2, async (runner6) => {
6486
+ __self.__retryable = false;
6487
+ const __funcResult = await __call(setPolicy, {
6488
+ type: "positional",
6489
+ args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"), __readStatic(recommendedAutoApprovePolicy, "recommendedAutoApprovePolicy", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/defaultPolicy.agency")]
6490
+ });
6491
+ if (hasInterrupts(__funcResult)) {
6492
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6493
+ runner6.halt(__funcResult);
6494
+ return;
6495
+ }
6496
+ });
6497
+ });
6498
+ await runner4.step(1, async (runner5) => {
6499
+ __self.__retryable = false;
6500
+ });
6501
+ }
6502
+ }
6503
+ ], async (runner4) => {
6504
+ await runner4.step(2, async (runner5) => {
6505
+ const __funcResult = await __call(print, {
6506
+ type: "positional",
6507
+ args: [await __callMethod(color, "red", {
6508
+ type: "positional",
6509
+ args: [`Failed to load policy: ${await __callMethod(JSON, "stringify", {
6510
+ type: "positional",
6511
+ args: [__stack.locals.f.error]
6512
+ })}`]
6513
+ })]
6514
+ });
6515
+ if (hasInterrupts(__funcResult)) {
6516
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6517
+ runner5.halt(__funcResult);
6518
+ return;
6519
+ }
6520
+ });
6521
+ await runner4.step(3, async (runner5) => {
6522
+ await __callMethod(process, "exit", {
6523
+ type: "positional",
6524
+ args: [1]
6525
+ });
6526
+ });
6527
+ });
6528
+ await runner3.step(2, async (runner4) => {
6529
+ __self.__retryable = false;
6530
+ });
6531
+ }
6532
+ }
6533
+ ], async (runner3) => {
6534
+ await runner3.step(3, async (runner4) => {
6535
+ __self.__retryable = false;
6536
+ const __funcResult = await __call(setPolicy, {
6537
+ type: "positional",
6538
+ args: [__readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"), __stack.locals.policy.value]
6539
+ });
6540
+ if (hasInterrupts(__funcResult)) {
6541
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
6542
+ runner4.halt(__funcResult);
6543
+ return;
6544
+ }
6545
+ });
6546
+ });
6547
+ await runner2.step(6, async (runner3) => {
6548
+ __self.__retryable = false;
6549
+ });
6258
6550
  });
6259
- await runner.step(7, async (runner2) => {
6551
+ await runner.step(8, async (runner2) => {
6260
6552
  __self.__retryable = false;
6261
6553
  });
6262
- await runner.step(8, async (runner2) => {
6554
+ await runner.step(9, async (runner2) => {
6263
6555
  __self.__retryable = false;
6264
6556
  __functionCompleted = true;
6265
6557
  runner2.halt(await __call(cliPolicyHandler, {
6266
6558
  type: "named",
6267
6559
  positionalArgs: [],
6268
6560
  namedArgs: {
6269
- file: __readStatic(POLICY_PATH, "POLICY_PATH", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"),
6270
- fields: __readStatic(ALWAYS_FIELDS, "ALWAYS_FIELDS", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency")
6561
+ file: __stack.locals.policyFile,
6562
+ fields: __readStatic(ALWAYS_FIELDS, "ALWAYS_FIELDS", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/config.agency"),
6563
+ policy: __stack.locals.sessionPolicy
6271
6564
  }
6272
6565
  }));
6273
6566
  return;
@@ -7057,6 +7350,11 @@ graph.node("main", async (__state) => {
7057
7350
  "type": `string`,
7058
7351
  "description": `Route the starting prompt to a named subagent: code, research, oracle, explorer, review (default: coordinator)`
7059
7352
  },
7353
+ "policy": {
7354
+ "type": `string`,
7355
+ "optional": true,
7356
+ "description": `Approval policy for this run: a built-in name (minimal, recommended, with-writes, with-bash) or a path to a policy JSON file. with-writes/with-bash auto-approve writes (and, for with-bash, shell) scoped to the current directory and its children. Overrides the saved policy without persisting it. Pass --policy with no value to list the built-in policies.`
7357
+ },
7060
7358
  "local": {
7061
7359
  "type": `string`,
7062
7360
  "optional": true,
@@ -7066,6 +7364,23 @@ graph.node("main", async (__state) => {
7066
7364
  "type": `string`,
7067
7365
  "optional": true,
7068
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)`
7069
7384
  }
7070
7385
  }
7071
7386
  }]
@@ -7101,16 +7416,46 @@ graph.node("main", async (__state) => {
7101
7416
  ]);
7102
7417
  await runner.step(5, async (runner2) => {
7103
7418
  });
7104
- await runner.step(6, async (runner2) => {
7419
+ await runner.ifElse(6, [
7420
+ {
7421
+ condition: async () => __eq(__stack.locals.args.flags.policy, ``),
7422
+ body: async (runner2) => {
7423
+ await runner2.step(0, async (runner3) => {
7424
+ const __funcResult = await __call(printPolicyHelp, {
7425
+ type: "positional",
7426
+ args: []
7427
+ });
7428
+ if (hasInterrupts(__funcResult)) {
7429
+ await getRuntimeContext().ctx.pendingPromises.awaitAll();
7430
+ runner3.halt({
7431
+ ...__state,
7432
+ data: __funcResult
7433
+ });
7434
+ return;
7435
+ }
7436
+ });
7437
+ await runner2.step(1, async (runner3) => {
7438
+ await __callMethod(process, "exit", {
7439
+ type: "positional",
7440
+ args: [0]
7441
+ });
7442
+ });
7443
+ }
7444
+ }
7445
+ ]);
7446
+ await runner.step(7, async (runner2) => {
7447
+ __globals().set("dist/lib/agents/agency-agent/agent.agency", "_policyArg", __stack.locals.args.flags.policy ?? ``);
7448
+ });
7449
+ await runner.step(8, async (runner2) => {
7105
7450
  __stack.locals.localVal = __stack.locals.args.flags[`local`] ?? __stack.locals.args.flags[`local-model`];
7106
7451
  });
7107
- await runner.step(7, async (runner2) => {
7452
+ await runner.step(9, async (runner2) => {
7108
7453
  __stack.locals.modelArg = __stack.locals.args.flags.model ?? ``;
7109
7454
  });
7110
- await runner.step(8, async (runner2) => {
7455
+ await runner.step(10, async (runner2) => {
7111
7456
  __stack.locals.hasModelFlags = !__eq(__stack.locals.modelArg, ``) || !__eq(__stack.locals.args.flags.fastmodel ?? ``, ``) || !__eq(__stack.locals.args.flags.slowmodel ?? ``, ``);
7112
7457
  });
7113
- await runner.ifElse(9, [
7458
+ await runner.ifElse(11, [
7114
7459
  {
7115
7460
  condition: async () => !__eq(__stack.locals.localVal, null) && __stack.locals.hasModelFlags,
7116
7461
  body: async (runner2) => {
@@ -7140,7 +7485,7 @@ graph.node("main", async (__state) => {
7140
7485
  }
7141
7486
  }
7142
7487
  ]);
7143
- await runner.ifElse(10, [
7488
+ await runner.ifElse(12, [
7144
7489
  {
7145
7490
  condition: async () => __eq(__stack.locals.localVal, ``),
7146
7491
  body: async (runner2) => {
@@ -7233,7 +7578,7 @@ graph.node("main", async (__state) => {
7233
7578
  await runner2.step(5, async (runner3) => {
7234
7579
  __stack.locals.items = [];
7235
7580
  });
7236
- await runner2.loop(6, await __call(listModelNames, {
7581
+ await runner2.loop(6, async () => await __call(listModelNames, {
7237
7582
  type: "positional",
7238
7583
  args: []
7239
7584
  }), async (modelName, _, runner3) => {
@@ -7505,25 +7850,109 @@ graph.node("main", async (__state) => {
7505
7850
  }
7506
7851
  });
7507
7852
  });
7508
- await runner.step(11, async (runner2) => {
7853
+ await runner.step(13, async (runner2) => {
7509
7854
  __self.__retryable = false;
7510
7855
  });
7511
- await runner.step(12, async (runner2) => {
7856
+ await runner.step(14, async (runner2) => {
7512
7857
  __stack.locals.positionalQuery = await __callMethod(__stack.locals.args.positionals, "join", {
7513
7858
  type: "positional",
7514
7859
  args: [` `]
7515
7860
  });
7516
7861
  });
7517
- await runner.step(13, async (runner2) => {
7862
+ await runner.step(15, async (runner2) => {
7518
7863
  __stack.locals.hasQuery = !__eq(__stack.locals.positionalQuery, ``);
7519
7864
  });
7520
- await runner.step(14, async (runner2) => {
7865
+ await runner.step(16, async (runner2) => {
7521
7866
  __stack.locals.startAgent = __stack.locals.args.flags.agent ?? ``;
7522
7867
  });
7523
- await runner.step(15, async (runner2) => {
7868
+ await runner.step(17, async (runner2) => {
7524
7869
  __stack.locals.wantInteractive = __stack.locals.args.flags.interactive;
7525
7870
  });
7526
- await runner.ifElse(16, [
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, [
7527
7956
  {
7528
7957
  condition: async () => !__eq(__stack.locals.startAgent, ``) && !await __callMethod(__readStatic(START_AGENTS, "START_AGENTS", "dist/lib/agents/agency-agent/agent.agency"), "includes", {
7529
7958
  type: "positional",
@@ -7559,14 +7988,11 @@ graph.node("main", async (__state) => {
7559
7988
  }
7560
7989
  }
7561
7990
  ]);
7562
- await runner.step(17, async (runner2) => {
7991
+ await runner.step(27, async (runner2) => {
7563
7992
  });
7564
- await runner.ifElse(18, [
7993
+ await runner.ifElse(28, [
7565
7994
  {
7566
- condition: async () => __stack.locals.wantInteractive && __stack.locals.hasQuery && await __call(isTTY, {
7567
- type: "positional",
7568
- args: []
7569
- }) && !__stack.locals.args.flags.print,
7995
+ condition: async () => __stack.locals.seededInteractive,
7570
7996
  body: async (runner2) => {
7571
7997
  await runner2.step(0, async (runner3) => {
7572
7998
  __self.__retryable = false;
@@ -7649,13 +8075,13 @@ graph.node("main", async (__state) => {
7649
8075
  }
7650
8076
  }
7651
8077
  ]);
7652
- await runner.step(19, async (runner2) => {
8078
+ await runner.step(29, async (runner2) => {
7653
8079
  __self.__retryable = false;
7654
8080
  });
7655
- await runner.step(20, async (runner2) => {
8081
+ await runner.step(30, async (runner2) => {
7656
8082
  __stack.locals.forceOneShot = __stack.locals.args.flags.print || __stack.locals.hasQuery;
7657
8083
  });
7658
- await runner.ifElse(21, [
8084
+ await runner.ifElse(31, [
7659
8085
  {
7660
8086
  condition: async () => __stack.locals.forceOneShot || !await __call(isTTY, {
7661
8087
  type: "positional",
@@ -7728,9 +8154,9 @@ graph.node("main", async (__state) => {
7728
8154
  }
7729
8155
  }
7730
8156
  ]);
7731
- await runner.step(22, async (runner2) => {
8157
+ await runner.step(32, async (runner2) => {
7732
8158
  });
7733
- await runner.step(23, async (runner2) => {
8159
+ await runner.step(33, async (runner2) => {
7734
8160
  __self.__retryable = false;
7735
8161
  const __funcResult = await __call(setTitle, {
7736
8162
  type: "positional",
@@ -7745,7 +8171,7 @@ graph.node("main", async (__state) => {
7745
8171
  return;
7746
8172
  }
7747
8173
  });
7748
- await runner.step(24, async (runner2) => {
8174
+ await runner.step(34, async (runner2) => {
7749
8175
  __self.__retryable = false;
7750
8176
  const __funcResult = await __call(clearScreen, {
7751
8177
  type: "positional",
@@ -7760,7 +8186,7 @@ graph.node("main", async (__state) => {
7760
8186
  return;
7761
8187
  }
7762
8188
  });
7763
- await runner.step(25, async (runner2) => {
8189
+ await runner.step(35, async (runner2) => {
7764
8190
  const __funcResult = await __call(printHeader, {
7765
8191
  type: "positional",
7766
8192
  args: []
@@ -7774,7 +8200,7 @@ graph.node("main", async (__state) => {
7774
8200
  return;
7775
8201
  }
7776
8202
  });
7777
- await runner.step(26, async (runner2) => {
8203
+ await runner.step(36, async (runner2) => {
7778
8204
  __stack.locals.handler = await __call(setupSession, {
7779
8205
  type: "positional",
7780
8206
  args: [true]
@@ -7788,7 +8214,7 @@ graph.node("main", async (__state) => {
7788
8214
  return;
7789
8215
  }
7790
8216
  });
7791
- await runner.step(27, async (runner2) => {
8217
+ await runner.step(37, async (runner2) => {
7792
8218
  const __funcResult = await __call(startInteractive, {
7793
8219
  type: "positional",
7794
8220
  args: [__stack.locals.handler, ``, ``]
@@ -7804,7 +8230,7 @@ graph.node("main", async (__state) => {
7804
8230
  });
7805
8231
  });
7806
8232
  if (runner.halted) return runner.haltResult;
7807
- await runner.hook(28, async () => {
8233
+ await runner.hook(38, async () => {
7808
8234
  await callHook({
7809
8235
  name: "onNodeEnd",
7810
8236
  data: {
@@ -7870,7 +8296,7 @@ Agent crashed: ${__error.message}`);
7870
8296
  }
7871
8297
  }
7872
8298
  var stdin_default = graph;
7873
- const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:__cb_top_0": { "1": { "line": 138, "col": 2 }, "1.0": { "line": 139, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_1": { "1": { "line": 144, "col": 2 }, "1.0.0": { "line": 145, "col": 4 }, "1.0.1": { "line": 146, "col": 6 }, "1.0.2": { "line": 147, "col": 11 }, "1.0.3": { "line": 148, "col": 6 }, "1.0.4": { "line": 150, "col": 6 }, "1.0": { "line": 145, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_2": { "1": { "line": 156, "col": 2 }, "1.0": { "line": 157, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_3": { "1": { "line": 162, "col": 2 }, "1.0": { "line": 163, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_4": { "1": { "line": 203, "col": 2 }, "1.0": { "line": 204, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_showTraces": { "1": { "line": 134, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:retryReasonLabel": { "1": { "line": 174, "col": 2 }, "2": { "line": 177, "col": 2 }, "3": { "line": 180, "col": 2 }, "4": { "line": 183, "col": 2 }, "5": { "line": 186, "col": 2 }, "6": { "line": 189, "col": 2 }, "7": { "line": 192, "col": 2 }, "1.0": { "line": 175, "col": 4 }, "2.0": { "line": 178, "col": 4 }, "3.0": { "line": 181, "col": 4 }, "4.0": { "line": 184, "col": 4 }, "5.0": { "line": 187, "col": 4 }, "6.0": { "line": 190, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:formatTurnFailure": { "1": { "line": 219, "col": 2 }, "2": { "line": 222, "col": 2 }, "3": { "line": 225, "col": 2 }, "4": { "line": 228, "col": 2 }, "1.0": { "line": 220, "col": 4 }, "2.0": { "line": 223, "col": 4 }, "3.0": { "line": 226, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:renderLLMCallResponse": { "1": { "line": 245, "col": 2 }, "2": { "line": 246, "col": 2 }, "3": { "line": 249, "col": 2 }, "5": { "line": 254, "col": 2 }, "2.0": { "line": 247, "col": 4 }, "3.0.0": { "line": 251, "col": 6 }, "3.0": { "line": 250, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:loadAgentsMd": { "1": { "line": 265, "col": 2 }, "2": { "line": 268, "col": 2 }, "3": { "line": 269, "col": 2 }, "4": { "line": 272, "col": 2 }, "1.0": { "line": 266, "col": 4 }, "2.0": { "line": 268, "col": 2 }, "3.0": { "line": 270, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:builtinPalette": { "1": { "line": 286, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:mergedPalette": { "1": { "line": 303, "col": 2 }, "2": { "line": 304, "col": 2 }, "3": { "line": 311, "col": 2 }, "4": { "line": 312, "col": 2 }, "5": { "line": 315, "col": 2 }, "2.0": { "line": 305, "col": 4 }, "2.1.0": { "line": 307, "col": 6 }, "2.1": { "line": 306, "col": 4 }, "2.2": { "line": 309, "col": 4 }, "4.0": { "line": 313, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:switchModel": { "1": { "line": 342, "col": 2 }, "2": { "line": 343, "col": 2 }, "3": { "line": 346, "col": 2 }, "4": { "line": 350, "col": 2 }, "5": { "line": 351, "col": 2 }, "7": { "line": 361, "col": 2 }, "9": { "line": 369, "col": 2 }, "10": { "line": 370, "col": 2 }, "11": { "line": 371, "col": 2 }, "12": { "line": 380, "col": 2 }, "13": { "line": 381, "col": 2 }, "15": { "line": 389, "col": 2 }, "16": { "line": 390, "col": 2 }, "17": { "line": 391, "col": 2 }, "2.0": { "line": 344, "col": 4 }, "5.0": { "line": 352, "col": 4 }, "5.1": { "line": 355, "col": 4 }, "7.0": { "line": 362, "col": 4 }, "7.1": { "line": 364, "col": 4 }, "13.0": { "line": 382, "col": 4 }, "13.1": { "line": 383, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:reactToSlotChange": { "1": { "line": 403, "col": 2 }, "3": { "line": 414, "col": 2 }, "1.0": { "line": 404, "col": 4 }, "1.1": { "line": 411, "col": 4 }, "1.3": { "line": 412, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:modelChoiceItems": { "1": { "line": 420, "col": 2 }, "2": { "line": 421, "col": 2 }, "4": { "line": 428, "col": 2 }, "2.0": { "line": 422, "col": 4 }, "2.1": { "line": 423, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:parseModelsFilters": { "1": { "line": 435, "col": 2 }, "2": { "line": 436, "col": 2 }, "3": { "line": 439, "col": 2 }, "4": { "line": 440, "col": 2 }, "5": { "line": 443, "col": 2 }, "2.0": { "line": 437, "col": 4 }, "4.0": { "line": 441, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runTurn": { "2": { "line": 456, "col": 2 }, "3": { "line": 457, "col": 2 }, "4": { "line": 460, "col": 2 }, "5": { "line": 463, "col": 2 }, "7": { "line": 467, "col": 2 }, "9": { "line": 472, "col": 2 }, "11": { "line": 478, "col": 2 }, "13": { "line": 493, "col": 2 }, "15": { "line": 521, "col": 2 }, "17": { "line": 566, "col": 2 }, "19": { "line": 580, "col": 2 }, "21": { "line": 622, "col": 2 }, "22": { "line": 623, "col": 2 }, "24": { "line": 632, "col": 2 }, "3.0": { "line": 458, "col": 4 }, "4.0": { "line": 461, "col": 4 }, "5.0": { "line": 464, "col": 4 }, "5.1": { "line": 465, "col": 4 }, "7.0": { "line": 468, "col": 4 }, "7.1": { "line": 469, "col": 4 }, "7.2": { "line": 470, "col": 4 }, "9.0": { "line": 473, "col": 4 }, "9.1": { "line": 476, "col": 4 }, "11.0": { "line": 479, "col": 4 }, "11.1": { "line": 480, "col": 4 }, "11.2.0": { "line": 488, "col": 6 }, "11.2.1": { "line": 489, "col": 6 }, "11.2": { "line": 487, "col": 4 }, "11.4": { "line": 491, "col": 4 }, "13.1": { "line": 501, "col": 4 }, "13.2": { "line": 502, "col": 4 }, "13.3": { "line": 503, "col": 4 }, "13.4.0": { "line": 505, "col": 6 }, "13.4.1": { "line": 506, "col": 6 }, "13.4": { "line": 504, "col": 4 }, "13.5": { "line": 508, "col": 4 }, "13.6": { "line": 509, "col": 4 }, "13.7.0": { "line": 511, "col": 6 }, "13.7.1": { "line": 512, "col": 6 }, "13.7.2.0": { "line": 514, "col": 8 }, "13.7.2": { "line": 513, "col": 6 }, "13.7": { "line": 510, "col": 4 }, "13.9": { "line": 519, "col": 4 }, "15.0": { "line": 522, "col": 4 }, "15.1.0": { "line": 524, "col": 6 }, "15.1": { "line": 523, "col": 4 }, "15.2.0": { "line": 527, "col": 6 }, "15.2.1": { "line": 528, "col": 6 }, "15.2.2.0": { "line": 530, "col": 8 }, "15.2.2.1.0": { "line": 532, "col": 10 }, "15.2.2.1": { "line": 531, "col": 8 }, "15.2.2": { "line": 529, "col": 6 }, "15.2.4": { "line": 535, "col": 6 }, "15.2.5": { "line": 536, "col": 6 }, "15.2.6.0": { "line": 544, "col": 8 }, "15.2.6": { "line": 543, "col": 6 }, "15.2.7": { "line": 546, "col": 6 }, "15.2": { "line": 526, "col": 4 }, "15.4": { "line": 548, "col": 4 }, "15.5": { "line": 552, "col": 4 }, "15.6": { "line": 553, "col": 4 }, "15.7.0": { "line": 555, "col": 6 }, "15.7": { "line": 554, "col": 4 }, "15.8": { "line": 557, "col": 4 }, "15.9.0": { "line": 559, "col": 6 }, "15.9.1.0": { "line": 561, "col": 8 }, "15.9.1": { "line": 560, "col": 6 }, "15.9": { "line": 558, "col": 4 }, "15.11": { "line": 564, "col": 4 }, "17.0": { "line": 567, "col": 4 }, "17.1": { "line": 568, "col": 4 }, "17.2.0": { "line": 570, "col": 6 }, "17.2.1": { "line": 571, "col": 6 }, "17.2": { "line": 569, "col": 4 }, "17.4.0": { "line": 574, "col": 6 }, "17.4": { "line": 573, "col": 4 }, "17.6": { "line": 578, "col": 4 }, "19.0.0": { "line": 582, "col": 6 }, "19.0.1": { "line": 587, "col": 6 }, "19.0": { "line": 581, "col": 4 }, "19.2": { "line": 589, "col": 4 }, "19.3.0": { "line": 591, "col": 6 }, "19.3": { "line": 590, "col": 4 }, "19.5": { "line": 596, "col": 4 }, "19.6.0": { "line": 604, "col": 6 }, "19.6": { "line": 603, "col": 4 }, "19.7": { "line": 606, "col": 4 }, "19.8": { "line": 607, "col": 4 }, "19.9": { "line": 608, "col": 4 }, "19.10.0": { "line": 610, "col": 6 }, "19.10": { "line": 609, "col": 4 }, "19.12": { "line": 612, "col": 4 }, "19.13": { "line": 613, "col": 4 }, "22.0": { "line": 623, "col": 2 }, "22.1.0": { "line": 625, "col": 6 }, "22.1.1": { "line": 627, "col": 6 }, "22.1": { "line": 624, "col": 4 }, "22.3": { "line": 629, "col": 9 }, "22.4": { "line": 630, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:resolveEditInputs": { "1": { "line": 818, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_0": { "1.0.0": { "line": 820, "col": 6 }, "1.0": { "line": 819, "col": 4 }, "1.1": { "line": 822, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:generateImageFile": { "2": { "line": 850, "col": 2 }, "3": { "line": 851, "col": 2 }, "4": { "line": 852, "col": 2 }, "6": { "line": 858, "col": 2 }, "7": { "line": 859, "col": 2 }, "9": { "line": 865, "col": 2 }, "10": { "line": 866, "col": 2 }, "4.0": { "line": 853, "col": 4 }, "7.0": { "line": 860, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:mainAgent": { "1": { "line": 879, "col": 2 }, "3": { "line": 893, "col": 2 }, "1.0": { "line": 880, "col": 4 }, "1.1.1": { "line": 885, "col": 6 }, "1.1.2": { "line": 886, "col": 6 }, "1.1": { "line": 881, "col": 4 }, "1.3": { "line": 888, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReplyVia": { "1": { "line": 902, "col": 2 }, "2": { "line": 903, "col": 2 }, "4": { "line": 906, "col": 2 }, "6": { "line": 909, "col": 2 }, "8": { "line": 912, "col": 2 }, "10": { "line": 915, "col": 2 }, "12": { "line": 921, "col": 2 }, "13": { "line": 922, "col": 2 }, "15": { "line": 925, "col": 2 }, "16": { "line": 932, "col": 2 }, "18": { "line": 935, "col": 2 }, "19": { "line": 938, "col": 2 }, "20": { "line": 939, "col": 2 }, "2.0": { "line": 904, "col": 4 }, "4.0": { "line": 907, "col": 4 }, "6.0": { "line": 910, "col": 4 }, "8.0": { "line": 913, "col": 4 }, "10.0": { "line": 916, "col": 4 }, "13.0": { "line": 923, "col": 4 }, "15.1": { "line": 930, "col": 4 }, "16.0": { "line": 933, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_1": { "18.0": { "line": 936, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReply": { "1": { "line": 949, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:roundedCost": { "1": { "line": 953, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:_buildStatus": { "1": { "line": 957, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:sample": { "1": { "line": 965, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:printHeader": { "1": { "line": 969, "col": 2 }, "2": { "line": 970, "col": 2 }, "3": { "line": 992, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_2": { "2.0": { "line": 977, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_3": { "2.0.0": { "line": 978, "col": 6 }, "2.0.1": { "line": 986, "col": 6 }, "2.0.2": { "line": 987, "col": 6 } }, "dist/lib/agents/agency-agent/agent.agency:__block_4": { "2.0.0.0": { "line": 979, "col": 8 }, "2.0.0.1": { "line": 980, "col": 8 }, "2.0.0.2": { "line": 981, "col": 8 }, "2.0.0.3": { "line": 982, "col": 8 }, "2.0.0.4": { "line": 983, "col": 8 }, "2.0.0.5": { "line": 984, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:__block_5": { "2.0.2.0": { "line": 988, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:givePolicyChoice": { "1": { "line": 996, "col": 2 }, "2": { "line": 997, "col": 2 }, "3": { "line": 998, "col": 2 }, "4": { "line": 1009, "col": 2 }, "5": { "line": 1010, "col": 9 }, "6": { "line": 1010, "col": 2 }, "5.0": { "line": 1011, "col": 17 }, "5.1": { "line": 1011, "col": 17 }, "5.2": { "line": 1012, "col": 21 }, "5.3": { "line": 1012, "col": 21 } }, "dist/lib/agents/agency-agent/agent.agency:setupSession": { "2": { "line": 1028, "col": 2 }, "3": { "line": 1033, "col": 2 }, "4": { "line": 1034, "col": 2 }, "5": { "line": 1036, "col": 2 }, "6": { "line": 1037, "col": 2 }, "8": { "line": 1054, "col": 2 }, "3.0": { "line": 1033, "col": 2 }, "6.0": { "line": 1037, "col": 2 }, "6.1.0.0": { "line": 1040, "col": 8 }, "6.1.0.1": { "line": 1041, "col": 8 }, "6.1.0.2": { "line": 1043, "col": 8 }, "6.1.0": { "line": 1039, "col": 6 }, "6.1.2": { "line": 1046, "col": 6 }, "6.1.3": { "line": 1047, "col": 6 }, "6.1": { "line": 1038, "col": 4 }, "6.3": { "line": 1050, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line": 1064, "col": 2 }, "2": { "line": 1065, "col": 2 }, "3": { "line": 1066, "col": 2 }, "4": { "line": 1067, "col": 2 }, "5": { "line": 1080, "col": 2 }, "4.1": { "line": 1071, "col": 4 }, "4.2.0": { "line": 1072, "col": 4 }, "4.2.1": { "line": 1073, "col": 6 }, "4.2.2": { "line": 1074, "col": 11 }, "4.2.3": { "line": 1075, "col": 6 }, "4.2": { "line": 1072, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runSeedTurn": { "1": { "line": 1087, "col": 2 }, "2": { "line": 1088, "col": 2 }, "3": { "line": 1089, "col": 2 }, "3.0": { "line": 1089, "col": 2 }, "3.1.0": { "line": 1091, "col": 6 }, "3.1.1": { "line": 1093, "col": 6 }, "3.1": { "line": 1090, "col": 4 }, "3.3": { "line": 1095, "col": 9 }, "3.4": { "line": 1096, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:startInteractive": { "1": { "line": 1107, "col": 2 }, "3": { "line": 1122, "col": 2 }, "1.0.0": { "line": 1109, "col": 6 }, "1.0": { "line": 1108, "col": 4 }, "1.1": { "line": 1111, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:main": { "2": { "line": 1128, "col": 2 }, "3": { "line": 1186, "col": 2 }, "4": { "line": 1189, "col": 2 }, "6": { "line": 1198, "col": 2 }, "7": { "line": 1199, "col": 2 }, "8": { "line": 1200, "col": 2 }, "9": { "line": 1201, "col": 2 }, "10": { "line": 1207, "col": 2 }, "12": { "line": 1289, "col": 2 }, "13": { "line": 1290, "col": 2 }, "14": { "line": 1291, "col": 2 }, "15": { "line": 1292, "col": 2 }, "16": { "line": 1295, "col": 2 }, "18": { "line": 1310, "col": 2 }, "20": { "line": 1329, "col": 2 }, "21": { "line": 1330, "col": 2 }, "23": { "line": 1348, "col": 2 }, "24": { "line": 1349, "col": 2 }, "25": { "line": 1350, "col": 2 }, "26": { "line": 1351, "col": 2 }, "27": { "line": 1352, "col": 2 }, "3.0": { "line": 1187, "col": 4 }, "4.0": { "line": 1190, "col": 4 }, "9.0": { "line": 1202, "col": 4 }, "9.1": { "line": 1205, "col": 4 }, "10.1.0": { "line": 1211, "col": 6 }, "10.1.1": { "line": 1212, "col": 6 }, "10.1": { "line": 1210, "col": 4 }, "10.3.0": { "line": 1215, "col": 6 }, "10.3.1": { "line": 1216, "col": 6 }, "10.3.2": { "line": 1217, "col": 6 }, "10.3": { "line": 1214, "col": 4 }, "10.5": { "line": 1219, "col": 4 }, "10.6.0": { "line": 1221, "col": 6 }, "10.6": { "line": 1220, "col": 4 }, "10.8": { "line": 1226, "col": 4 }, "10.9.0": { "line": 1234, "col": 6 }, "10.9": { "line": 1233, "col": 4 }, "10.10": { "line": 1236, "col": 4 }, "10.11": { "line": 1237, "col": 4 }, "10.12": { "line": 1240, "col": 4 }, "10.13": { "line": 1244, "col": 4 }, "10.15": { "line": 1248, "col": 4 }, "10.16": { "line": 1249, "col": 4 }, "10.17": { "line": 1250, "col": 4 }, "10.18": { "line": 1251, "col": 4 }, "10.19.0.0": { "line": 1254, "col": 8 }, "10.19.0.1": { "line": 1256, "col": 8 }, "10.19.0.2": { "line": 1258, "col": 8 }, "10.19.0.3": { "line": 1260, "col": 8 }, "10.19.0.4": { "line": 1265, "col": 8 }, "10.19.0": { "line": 1253, "col": 6 }, "10.19": { "line": 1252, "col": 4 }, "10.20": { "line": 1268, "col": 4 }, "10.21": { "line": 1269, "col": 4 }, "10.22.0": { "line": 1271, "col": 6 }, "10.22": { "line": 1270, "col": 4 }, "10.23.0": { "line": 1274, "col": 6 }, "10.23": { "line": 1273, "col": 4 }, "10.24": { "line": 1276, "col": 4 }, "10.25": { "line": 1282, "col": 4 }, "10.26": { "line": 1283, "col": 4 }, "16.0": { "line": 1296, "col": 4 }, "16.1": { "line": 1301, "col": 4 }, "18.0": { "line": 1311, "col": 4 }, "18.1": { "line": 1312, "col": 4 }, "18.2": { "line": 1313, "col": 4 }, "18.3": { "line": 1314, "col": 4 }, "18.4": { "line": 1315, "col": 4 }, "18.5": { "line": 1316, "col": 4 }, "21.0": { "line": 1331, "col": 4 }, "21.1.0": { "line": 1333, "col": 6 }, "21.1.1.0": { "line": 1335, "col": 8 }, "21.1.1": { "line": 1334, "col": 6 }, "21.1.2": { "line": 1337, "col": 6 }, "21.1": { "line": 1332, "col": 4 }, "21.2": { "line": 1339, "col": 4 }, "21.3": { "line": 1340, "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 } } };
7874
8300
  export {
7875
8301
  Session,
7876
8302
  __cb_top_0,
@@ -7910,6 +8336,7 @@ export {
7910
8336
  oneShotAgent,
7911
8337
  parseModelsFilters,
7912
8338
  printHeader,
8339
+ printPolicyHelp,
7913
8340
  reactToSlotChange,
7914
8341
  reject,
7915
8342
  renderLLMCallResponse,