agency-lang 0.21.0 → 0.22.0

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 (484) hide show
  1. package/dist/lib/agents/agency-agent/agent.js +2 -2
  2. package/dist/lib/agents/agency-agent/brains/brain.js +2 -2
  3. package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency +2 -0
  4. package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.js +6 -4
  5. package/dist/lib/agents/agency-agent/brains/coordinator/learn.agency +1 -1
  6. package/dist/lib/agents/agency-agent/brains/coordinator/learn.js +3 -3
  7. package/dist/lib/agents/agency-agent/brains/coordinator/lib/announce.js +2 -2
  8. package/dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.js +2 -2
  9. package/dist/lib/agents/agency-agent/brains/coordinator/lib/bundledSkills.js +2 -2
  10. package/dist/lib/agents/agency-agent/brains/coordinator/presetTools.js +2 -2
  11. package/dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.js +2 -2
  12. package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-large.md +11 -1
  13. package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-small.md +4 -0
  14. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/brainstorm.js +2 -2
  15. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency +4 -0
  16. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.js +11 -6
  17. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.js +2 -2
  18. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.agency +2 -0
  19. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.js +8 -4
  20. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.agency +2 -1
  21. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.js +6 -4
  22. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.agency +2 -1
  23. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.js +11 -5
  24. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/rewrite.js +2 -2
  25. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/supervisor.js +2 -2
  26. package/dist/lib/agents/agency-agent/brains/coordinator/subagents/writing.js +2 -2
  27. package/dist/lib/agents/agency-agent/brains/registry.js +2 -2
  28. package/dist/lib/agents/agency-agent/brains/simple/simple.js +2 -2
  29. package/dist/lib/agents/agency-agent/images/images.js +2 -2
  30. package/dist/lib/agents/agency-agent/lib/agentName.js +2 -2
  31. package/dist/lib/agents/agency-agent/lib/agentSource.js +2 -2
  32. package/dist/lib/agents/agency-agent/lib/args.js +2 -2
  33. package/dist/lib/agents/agency-agent/lib/attachments.js +2 -2
  34. package/dist/lib/agents/agency-agent/lib/budget.js +2 -2
  35. package/dist/lib/agents/agency-agent/lib/capabilities.js +2 -2
  36. package/dist/lib/agents/agency-agent/lib/capabilitiesUi.js +2 -2
  37. package/dist/lib/agents/agency-agent/lib/commandPalette.js +2 -2
  38. package/dist/lib/agents/agency-agent/lib/config.js +2 -2
  39. package/dist/lib/agents/agency-agent/lib/grounding.js +2 -2
  40. package/dist/lib/agents/agency-agent/lib/header.js +2 -2
  41. package/dist/lib/agents/agency-agent/lib/images.js +2 -2
  42. package/dist/lib/agents/agency-agent/lib/learned.js +2 -2
  43. package/dist/lib/agents/agency-agent/lib/mcp.js +2 -2
  44. package/dist/lib/agents/agency-agent/lib/modelFilters.js +2 -2
  45. package/dist/lib/agents/agency-agent/lib/modelRequest.js +2 -2
  46. package/dist/lib/agents/agency-agent/lib/models.js +2 -2
  47. package/dist/lib/agents/agency-agent/lib/policy.js +2 -2
  48. package/dist/lib/agents/agency-agent/lib/presetRules.js +2 -2
  49. package/dist/lib/agents/agency-agent/lib/presets.js +2 -2
  50. package/dist/lib/agents/agency-agent/lib/projectContext.js +2 -2
  51. package/dist/lib/agents/agency-agent/lib/repl.js +2 -2
  52. package/dist/lib/agents/agency-agent/lib/resolution.js +2 -2
  53. package/dist/lib/agents/agency-agent/lib/resume.js +2 -2
  54. package/dist/lib/agents/agency-agent/lib/search.js +2 -2
  55. package/dist/lib/agents/agency-agent/lib/session.js +2 -2
  56. package/dist/lib/agents/agency-agent/lib/sessionTitle.js +2 -2
  57. package/dist/lib/agents/agency-agent/lib/sessions.js +2 -2
  58. package/dist/lib/agents/agency-agent/lib/settings.js +2 -2
  59. package/dist/lib/agents/agency-agent/lib/slashCommands/policy.js +2 -2
  60. package/dist/lib/agents/agency-agent/lib/slots.js +2 -2
  61. package/dist/lib/agents/agency-agent/lib/toolLimits.js +2 -2
  62. package/dist/lib/agents/agency-agent/lib/trace.js +2 -2
  63. package/dist/lib/agents/agency-agent/lib/transcript.js +2 -2
  64. package/dist/lib/agents/agency-agent/lib/turn.js +2 -2
  65. package/dist/lib/agents/agency-agent/lib/utils/renderLLMCallResponse.js +2 -2
  66. package/dist/lib/agents/agency-agent/lib/utils.js +2 -2
  67. package/dist/lib/agents/agency-agent/shared.js +2 -2
  68. package/dist/lib/agents/eval/goalJudge.js +2 -2
  69. package/dist/lib/agents/eval/judge.js +2 -2
  70. package/dist/lib/agents/eval/judgePairwise.js +2 -2
  71. package/dist/lib/agents/eval/rubricJudge.js +2 -2
  72. package/dist/lib/agents/optimize/gepaReflect.js +2 -2
  73. package/dist/lib/agents/optimize/mutatePrompt.js +2 -2
  74. package/dist/lib/agents/policy/agent.js +2 -2
  75. package/dist/lib/agents/review/agent.js +2 -2
  76. package/dist/lib/analysis/bodyFacts.d.ts +31 -0
  77. package/dist/lib/analysis/bodyFacts.js +57 -1
  78. package/dist/lib/analysis/effects.js +20 -12
  79. package/dist/lib/analysis/interrupts.d.ts +4 -0
  80. package/dist/lib/analysis/interrupts.js +28 -37
  81. package/dist/lib/backends/agencyGenerator.js +11 -2
  82. package/dist/lib/backends/typescriptBuilder/nodeWrapperParams.d.ts +14 -11
  83. package/dist/lib/backends/typescriptBuilder/nodeWrapperParams.js +40 -16
  84. package/dist/lib/backends/typescriptBuilder.d.ts +3 -0
  85. package/dist/lib/backends/typescriptBuilder.js +15 -7
  86. package/dist/lib/backends/typescriptGenerator/validationDescriptor.d.ts +5 -0
  87. package/dist/lib/backends/typescriptGenerator/validationDescriptor.js +7 -0
  88. package/dist/lib/cli/doc.js +4 -4
  89. package/dist/lib/cli/interrupts.js +6 -0
  90. package/dist/lib/cli/logsView.d.ts +10 -4
  91. package/dist/lib/cli/logsView.js +26 -4
  92. package/dist/lib/cli/remote/commands/logs.js +5 -1
  93. package/dist/lib/compilationUnit.d.ts +3 -1
  94. package/dist/lib/compilationUnit.js +32 -25
  95. package/dist/lib/compiler/compile.js +20 -67
  96. package/dist/lib/compiler/compileClosure.js +13 -0
  97. package/dist/lib/compiler/compileSandboxed.d.ts +3 -2
  98. package/dist/lib/compiler/compileValidatedClosure.d.ts +11 -2
  99. package/dist/lib/compiler/compileValidatedClosure.js +9 -7
  100. package/dist/lib/compiler/importCycle.d.ts +9 -0
  101. package/dist/lib/compiler/importCycle.js +57 -0
  102. package/dist/lib/compiler/initDepGraph.js +20 -1
  103. package/dist/lib/compiler/prepareProgram.d.ts +90 -0
  104. package/dist/lib/compiler/prepareProgram.js +200 -0
  105. package/dist/lib/compiler/splice/eligibility.d.ts +11 -0
  106. package/dist/lib/compiler/splice/eligibility.js +11 -0
  107. package/dist/lib/compiler/splice/runGenerator.js +19 -11
  108. package/dist/lib/compiler/typecheck.d.ts +5 -0
  109. package/dist/lib/compiler/typecheck.js +46 -48
  110. package/dist/lib/config/config.d.ts +2 -2
  111. package/dist/lib/eval/extract.js +4 -1
  112. package/dist/lib/eval/types.d.ts +8 -1
  113. package/dist/lib/importResolutionError.d.ts +3 -0
  114. package/dist/lib/importResolutionError.js +7 -3
  115. package/dist/lib/logsViewer/detailTarget.d.ts +4 -0
  116. package/dist/lib/logsViewer/detailTarget.js +15 -0
  117. package/dist/lib/logsViewer/escLadder.d.ts +18 -0
  118. package/dist/lib/logsViewer/escLadder.js +25 -0
  119. package/dist/lib/logsViewer/forest.d.ts +22 -0
  120. package/dist/lib/logsViewer/forest.js +79 -0
  121. package/dist/lib/logsViewer/format.d.ts +4 -0
  122. package/dist/lib/logsViewer/format.js +36 -0
  123. package/dist/lib/logsViewer/keymap.d.ts +5 -0
  124. package/dist/lib/logsViewer/keymap.js +5 -0
  125. package/dist/lib/logsViewer/messageDelta.d.ts +17 -0
  126. package/dist/lib/logsViewer/messageDelta.js +45 -0
  127. package/dist/lib/logsViewer/overviewData.d.ts +10 -0
  128. package/dist/lib/logsViewer/overviewData.js +14 -0
  129. package/dist/lib/logsViewer/payload.d.ts +33 -0
  130. package/dist/lib/logsViewer/payload.js +212 -0
  131. package/dist/lib/logsViewer/roundInputPayload.d.ts +5 -0
  132. package/dist/lib/logsViewer/roundInputPayload.js +62 -0
  133. package/dist/lib/logsViewer/run.d.ts +16 -1
  134. package/dist/lib/logsViewer/run.js +353 -132
  135. package/dist/lib/logsViewer/screenHost.d.ts +35 -0
  136. package/dist/lib/logsViewer/screenHost.js +103 -0
  137. package/dist/lib/logsViewer/screens/charts.d.ts +12 -0
  138. package/dist/lib/logsViewer/screens/charts.js +54 -0
  139. package/dist/lib/logsViewer/screens/chrome.d.ts +19 -0
  140. package/dist/lib/logsViewer/screens/chrome.js +59 -0
  141. package/dist/lib/logsViewer/screens/lineNumbers.d.ts +7 -0
  142. package/dist/lib/logsViewer/screens/lineNumbers.js +26 -0
  143. package/dist/lib/logsViewer/screens/overviewCharts.d.ts +7 -0
  144. package/dist/lib/logsViewer/screens/overviewCharts.js +151 -0
  145. package/dist/lib/logsViewer/screens/overviewScreen.d.ts +48 -0
  146. package/dist/lib/logsViewer/screens/overviewScreen.js +338 -0
  147. package/dist/lib/logsViewer/screens/payloadPaint.d.ts +3 -0
  148. package/dist/lib/logsViewer/screens/payloadPaint.js +60 -0
  149. package/dist/lib/logsViewer/screens/screen.d.ts +12 -0
  150. package/dist/lib/logsViewer/screens/screen.js +6 -0
  151. package/dist/lib/logsViewer/{views/flameView.d.ts → screens/timelineScreen.d.ts} +34 -8
  152. package/dist/lib/logsViewer/screens/timelineScreen.js +586 -0
  153. package/dist/lib/logsViewer/screens/tracePicker.d.ts +43 -0
  154. package/dist/lib/logsViewer/screens/tracePicker.js +254 -0
  155. package/dist/lib/logsViewer/screens/traceScreen.d.ts +74 -0
  156. package/dist/lib/logsViewer/screens/traceScreen.js +697 -0
  157. package/dist/lib/logsViewer/screens/transcriptScreen.d.ts +49 -0
  158. package/dist/lib/logsViewer/screens/transcriptScreen.js +355 -0
  159. package/dist/lib/logsViewer/spanText.d.ts +4 -4
  160. package/dist/lib/logsViewer/spanText.js +24 -21
  161. package/dist/lib/logsViewer/story.d.ts +87 -0
  162. package/dist/lib/logsViewer/story.js +297 -0
  163. package/dist/lib/logsViewer/storyFixture.d.ts +5 -0
  164. package/dist/lib/logsViewer/storyFixture.js +65 -0
  165. package/dist/lib/logsViewer/structured.d.ts +7 -0
  166. package/dist/lib/logsViewer/structured.js +33 -0
  167. package/dist/lib/logsViewer/summary.d.ts +0 -3
  168. package/dist/lib/logsViewer/summary.js +3 -41
  169. package/dist/lib/logsViewer/theme.d.ts +28 -0
  170. package/dist/lib/logsViewer/theme.js +44 -0
  171. package/dist/lib/logsViewer/thresholds.js +4 -4
  172. package/dist/lib/logsViewer/timeline/groups.d.ts +9 -8
  173. package/dist/lib/logsViewer/timeline/groups.js +50 -53
  174. package/dist/lib/logsViewer/timeline/rounds.d.ts +37 -0
  175. package/dist/lib/logsViewer/timeline/rounds.js +82 -0
  176. package/dist/lib/logsViewer/timeline/rows.d.ts +19 -0
  177. package/dist/lib/logsViewer/timeline/rows.js +98 -0
  178. package/dist/lib/logsViewer/timeline/spans.d.ts +3 -0
  179. package/dist/lib/logsViewer/timeline/spans.js +40 -22
  180. package/dist/lib/logsViewer/traceFixture.d.ts +8 -0
  181. package/dist/lib/logsViewer/traceFixture.js +35 -0
  182. package/dist/lib/logsViewer/traceSearch.d.ts +22 -0
  183. package/dist/lib/logsViewer/traceSearch.js +60 -0
  184. package/dist/lib/logsViewer/traceSummaries.d.ts +13 -0
  185. package/dist/lib/logsViewer/traceSummaries.js +24 -0
  186. package/dist/lib/logsViewer/transcript.d.ts +41 -0
  187. package/dist/lib/logsViewer/transcript.js +227 -0
  188. package/dist/lib/logsViewer/transcriptPayload.d.ts +3 -0
  189. package/dist/lib/logsViewer/transcriptPayload.js +81 -0
  190. package/dist/lib/logsViewer/tree.js +6 -19
  191. package/dist/lib/logsViewer/types.d.ts +1 -15
  192. package/dist/lib/logsViewer/views/detailScreen.d.ts +13 -9
  193. package/dist/lib/logsViewer/views/detailScreen.js +82 -130
  194. package/dist/lib/logsViewer/views/occurrencesView.d.ts +6 -1
  195. package/dist/lib/logsViewer/views/occurrencesView.js +70 -58
  196. package/dist/lib/logsViewer/views/shared.d.ts +1 -5
  197. package/dist/lib/logsViewer/views/shared.js +7 -11
  198. package/dist/lib/logsViewer/views/view.d.ts +15 -13
  199. package/dist/lib/logsViewer/views/view.js +6 -5
  200. package/dist/lib/lsp/builtinHover.js +3 -0
  201. package/dist/lib/lsp/diagnostics.js +62 -180
  202. package/dist/lib/parser.js +32 -15
  203. package/dist/lib/parsers/messages.d.ts +7 -1
  204. package/dist/lib/parsers/messages.js +18 -1
  205. package/dist/lib/parsers/parsers.d.ts +15 -0
  206. package/dist/lib/parsers/parsers.js +185 -44
  207. package/dist/lib/parsers/reservedNames.cases.d.ts +6 -0
  208. package/dist/lib/parsers/reservedNames.cases.js +53 -0
  209. package/dist/lib/parsers/vitest.setup.js +2 -2
  210. package/dist/lib/preprocessors/expandSplices.js +26 -1
  211. package/dist/lib/preprocessors/hoistCalls.d.ts +7 -3
  212. package/dist/lib/preprocessors/hoistCalls.js +38 -20
  213. package/dist/lib/preprocessors/hoistPositions.d.ts +33 -0
  214. package/dist/lib/preprocessors/hoistPositions.js +93 -0
  215. package/dist/lib/preprocessors/importResolver.d.ts +1 -0
  216. package/dist/lib/preprocessors/importResolver.js +25 -4
  217. package/dist/lib/preprocessors/liftCallbacks.d.ts +16 -0
  218. package/dist/lib/preprocessors/liftCallbacks.js +63 -52
  219. package/dist/lib/preprocessors/typescriptPreprocessor.js +16 -1
  220. package/dist/lib/reservedNames.d.ts +10 -0
  221. package/dist/lib/reservedNames.js +22 -0
  222. package/dist/lib/runDirectory/annotations.d.ts +1 -1
  223. package/dist/lib/runsExplorer/run.d.ts +2 -0
  224. package/dist/lib/runsExplorer/run.js +1 -0
  225. package/dist/lib/runtime/abortedResult.d.ts +4 -0
  226. package/dist/lib/runtime/abortedResult.js +8 -0
  227. package/dist/lib/runtime/prompt.js +2 -0
  228. package/dist/lib/runtime/state/messageThread.d.ts +1 -0
  229. package/dist/lib/runtime/state/messageThread.js +4 -0
  230. package/dist/lib/runtime/state/schemas.d.ts +6 -0
  231. package/dist/lib/runtime/state/schemas.js +1 -0
  232. package/dist/lib/runtime/template/fill.js +6 -0
  233. package/dist/lib/runtime/template/hygiene.d.ts +2 -1
  234. package/dist/lib/runtime/template/hygiene.js +4 -2
  235. package/dist/lib/runtime/threadRepair.js +5 -0
  236. package/dist/lib/statelog/wireAccessors.d.ts +37 -4
  237. package/dist/lib/statelog/wireAccessors.js +130 -9
  238. package/dist/lib/statelogClient.d.ts +5 -1
  239. package/dist/lib/statelogClient.js +3 -1
  240. package/dist/lib/stdlib/agency.d.ts +2 -2
  241. package/dist/lib/stdlib/agency.js +59 -7
  242. package/dist/lib/stdlib/cli.d.ts +5 -1
  243. package/dist/lib/stdlib/cli.js +5 -3
  244. package/dist/lib/stdlib/skills.d.ts +6 -0
  245. package/dist/lib/stdlib/skills.js +8 -0
  246. package/dist/lib/stdlib/speech.d.ts +1 -1
  247. package/dist/lib/stdlib/speech.js +3 -1
  248. package/dist/lib/symbolTable.d.ts +6 -0
  249. package/dist/lib/symbolTable.js +12 -0
  250. package/dist/lib/templates/backends/typescriptGenerator/finalizeClosure.d.ts +1 -1
  251. package/dist/lib/templates/backends/typescriptGenerator/finalizeClosure.js +1 -1
  252. package/dist/lib/templates/backends/typescriptGenerator/imports.d.ts +1 -1
  253. package/dist/lib/templates/backends/typescriptGenerator/imports.js +2 -2
  254. package/dist/lib/tui/index.d.ts +2 -0
  255. package/dist/lib/tui/index.js +2 -0
  256. package/dist/lib/tui/input/terminal.js +5 -0
  257. package/dist/lib/tui/keymap.d.ts +25 -0
  258. package/dist/lib/tui/keymap.js +45 -0
  259. package/dist/lib/tui/paint.d.ts +38 -0
  260. package/dist/lib/tui/paint.js +108 -0
  261. package/dist/lib/tui/table.d.ts +5 -4
  262. package/dist/lib/tui/table.js +15 -24
  263. package/dist/lib/typeChecker/castPositions.d.ts +2 -0
  264. package/dist/lib/typeChecker/castPositions.js +53 -0
  265. package/dist/lib/typeChecker/castTestUtils.d.ts +6 -0
  266. package/dist/lib/typeChecker/castTestUtils.js +10 -0
  267. package/dist/lib/typeChecker/checker.d.ts +0 -2
  268. package/dist/lib/typeChecker/checker.js +2 -9
  269. package/dist/lib/typeChecker/diagnosticExplanations.js +44 -1
  270. package/dist/lib/typeChecker/diagnostics.d.ts +56 -1
  271. package/dist/lib/typeChecker/diagnostics.js +56 -1
  272. package/dist/lib/typeChecker/flow.js +2 -42
  273. package/dist/lib/typeChecker/index.d.ts +1 -0
  274. package/dist/lib/typeChecker/index.js +5 -1
  275. package/dist/lib/typeChecker/interruptAnalysis.js +48 -23
  276. package/dist/lib/typeChecker/nameReferences.d.ts +5 -0
  277. package/dist/lib/typeChecker/nameReferences.js +5 -4
  278. package/dist/lib/typeChecker/narrowing.d.ts +6 -2
  279. package/dist/lib/typeChecker/narrowing.js +38 -15
  280. package/dist/lib/typeChecker/resolveCall.d.ts +5 -1
  281. package/dist/lib/typeChecker/resolveCall.js +4 -0
  282. package/dist/lib/typeChecker/resolvePath.d.ts +12 -0
  283. package/dist/lib/typeChecker/resolvePath.js +44 -0
  284. package/dist/lib/typeChecker/sandboxNameCheck.js +9 -0
  285. package/dist/lib/typeChecker/scope.d.ts +9 -0
  286. package/dist/lib/typeChecker/scope.js +22 -0
  287. package/dist/lib/typeChecker/scopes.js +18 -2
  288. package/dist/lib/typeChecker/staticInitRules.d.ts +19 -0
  289. package/dist/lib/typeChecker/staticInitRules.js +50 -5
  290. package/dist/lib/typeChecker/synthesizer.js +80 -7
  291. package/dist/lib/typeChecker/templateNames.js +9 -1
  292. package/dist/lib/typeChecker/toolBlockBinding.d.ts +12 -1
  293. package/dist/lib/typeChecker/toolBlockBinding.js +10 -6
  294. package/dist/lib/typeChecker/toolElementTypes.d.ts +4 -0
  295. package/dist/lib/typeChecker/toolElementTypes.js +55 -0
  296. package/dist/lib/typeChecker/undefinedVariableDiagnostic.d.ts +3 -0
  297. package/dist/lib/typeChecker/undefinedVariableDiagnostic.js +6 -0
  298. package/dist/lib/typeChecker/validateStaticInit.d.ts +2 -1
  299. package/dist/lib/typeChecker/validateStaticInit.js +4 -2
  300. package/dist/lib/typeChecker/valueArgReferences.js +2 -0
  301. package/dist/lib/types/binop.d.ts +3 -0
  302. package/dist/lib/types/binop.js +7 -0
  303. package/dist/lib/types/castExpression.d.ts +13 -0
  304. package/dist/lib/types/castExpression.js +1 -0
  305. package/dist/lib/types/function.d.ts +4 -1
  306. package/dist/lib/types.d.ts +4 -2
  307. package/dist/lib/types.js +2 -0
  308. package/dist/lib/utils/expressionSlots.js +4 -0
  309. package/dist/lib/utils/findReservedName.d.ts +5 -0
  310. package/dist/lib/utils/findReservedName.js +88 -0
  311. package/dist/lib/utils/identifierSlots.js +8 -5
  312. package/dist/lib/utils/moduleDoc.d.ts +12 -0
  313. package/dist/lib/utils/moduleDoc.js +22 -1
  314. package/dist/lib/utils/node.js +34 -0
  315. package/dist/lib/utils/topLevel.js +1 -0
  316. package/dist/scripts/agency.js +52 -23
  317. package/package.json +2 -1
  318. package/stdlib/agency/eval.js +2 -2
  319. package/stdlib/agency/local.js +2 -2
  320. package/stdlib/agency.agency +10 -4
  321. package/stdlib/agency.js +45 -14
  322. package/stdlib/agent.agency +4 -1
  323. package/stdlib/agent.js +7 -4
  324. package/stdlib/agents/agency/coding.agency +84 -28
  325. package/stdlib/agents/agency/coding.js +796 -128
  326. package/stdlib/agents/agency/expert.js +3 -3
  327. package/stdlib/agents/agency/researcher.js +3 -3
  328. package/stdlib/agents/agency/review.agency +12 -5
  329. package/stdlib/agents/agency/review.js +90 -39
  330. package/stdlib/agents/agency/verifier.js +3 -3
  331. package/stdlib/agents/coding.agency +2 -1
  332. package/stdlib/agents/coding.js +7 -6
  333. package/stdlib/agents/composable/promptRewriter.js +2 -2
  334. package/stdlib/agents/composable/researcher.js +2 -2
  335. package/stdlib/agents/composable/utils.js +2 -2
  336. package/stdlib/agents/data.agency +2 -2
  337. package/stdlib/agents/data.js +6 -5
  338. package/stdlib/agents/expert.js +3 -3
  339. package/stdlib/agents/explorer.agency +7 -5
  340. package/stdlib/agents/explorer.js +12 -10
  341. package/stdlib/agents/lib/expertGuidance.js +2 -2
  342. package/stdlib/agents/lib/feedback.js +2 -2
  343. package/stdlib/agents/lib/search.js +2 -2
  344. package/stdlib/agents/lib/shared.js +2 -2
  345. package/stdlib/agents/lib/toolkits.agency +51 -9
  346. package/stdlib/agents/lib/toolkits.js +225 -17
  347. package/stdlib/agents/oracle.js +3 -3
  348. package/stdlib/agents/planner.agency +2 -2
  349. package/stdlib/agents/planner.js +5 -4
  350. package/stdlib/agents/prompts/agency-tutorial.md +1201 -0
  351. package/stdlib/agents/researcher.agency +3 -3
  352. package/stdlib/agents/researcher.js +7 -6
  353. package/stdlib/agents/review.agency +2 -2
  354. package/stdlib/agents/review.js +6 -5
  355. package/stdlib/agents/typescript/review.agency +2 -1
  356. package/stdlib/agents/typescript/review.js +7 -6
  357. package/stdlib/agents/verifier.agency +2 -2
  358. package/stdlib/agents/verifier.js +5 -4
  359. package/stdlib/agents/writing/review.agency +2 -1
  360. package/stdlib/agents/writing/review.js +7 -6
  361. package/stdlib/agents/writing/rewrite.js +2 -2
  362. package/stdlib/args.js +2 -2
  363. package/stdlib/array.js +2 -2
  364. package/stdlib/auth/keyring.js +2 -2
  365. package/stdlib/auth/oauth.js +2 -2
  366. package/stdlib/aws/s3.js +2 -2
  367. package/stdlib/calendar.js +2 -2
  368. package/stdlib/capabilities.js +2 -2
  369. package/stdlib/clipboard.js +2 -2
  370. package/stdlib/concurrency.js +2 -2
  371. package/stdlib/data/connector.js +2 -2
  372. package/stdlib/data/finance/dbnomics.js +2 -2
  373. package/stdlib/data/finance/edgar.js +2 -2
  374. package/stdlib/data/finance/fred.js +2 -2
  375. package/stdlib/data/news/gdelt.js +2 -2
  376. package/stdlib/data/people/littlesis.js +2 -2
  377. package/stdlib/data/social/bluesky.js +2 -2
  378. package/stdlib/data/tech/hackernews.js +2 -2
  379. package/stdlib/data/tech/yc.js +2 -2
  380. package/stdlib/data/usaspending.js +2 -2
  381. package/stdlib/data/wikidata.js +2 -2
  382. package/stdlib/date.js +2 -2
  383. package/stdlib/docs/diagnostics/index.md +12 -1
  384. package/stdlib/docs/diagnostics/names.md +12 -0
  385. package/stdlib/docs/diagnostics/static-init.md +12 -0
  386. package/stdlib/docs/diagnostics/templates.md +16 -2
  387. package/stdlib/docs/diagnostics/tools.md +12 -0
  388. package/stdlib/docs/diagnostics/types-aliases.md +70 -0
  389. package/stdlib/docs/guide/interrupts-from-typescript.md +9 -0
  390. package/stdlib/docs/guide/observability.md +101 -49
  391. package/stdlib/docs/stdlib/agency.md +51 -43
  392. package/stdlib/docs/stdlib/agent.md +4 -1
  393. package/stdlib/docs/stdlib/agents/agency/coding.md +21 -2
  394. package/stdlib/docs/stdlib/agents/agency/review.md +3 -0
  395. package/stdlib/docs/stdlib/agents/coding.md +2 -2
  396. package/stdlib/docs/stdlib/agents/explorer.md +4 -4
  397. package/stdlib/docs/stdlib/agents/lib/toolkits.md +46 -16
  398. package/stdlib/docs/stdlib/agents/oracle.md +2 -2
  399. package/stdlib/docs/stdlib/agents/typescript/review.md +3 -3
  400. package/stdlib/docs/stdlib/agents/writing/review.md +3 -3
  401. package/stdlib/docs/stdlib/agents/writing/rewrite.md +13 -13
  402. package/stdlib/docs/stdlib/fs.md +4 -4
  403. package/stdlib/docs/stdlib/llm.md +3 -3
  404. package/stdlib/docs/stdlib/math.md +9 -8
  405. package/stdlib/docs/stdlib/memory.md +24 -24
  406. package/stdlib/docs/stdlib/policy.md +228 -228
  407. package/stdlib/docs/stdlib/safeBash/actions.md +9 -9
  408. package/stdlib/docs/stdlib/safeBash.md +5 -5
  409. package/stdlib/docs/stdlib/shell.md +6 -6
  410. package/stdlib/docs/stdlib/skills.md +97 -27
  411. package/stdlib/docs/stdlib/speech.md +19 -15
  412. package/stdlib/docs/stdlib/statelog.md +14 -14
  413. package/stdlib/docs/stdlib/syntax.md +12 -12
  414. package/stdlib/docs/stdlib/thread.md +13 -13
  415. package/stdlib/docs/stdlib/toolbox.md +23 -20
  416. package/stdlib/docs/stdlib/ui/cli.md +7 -4
  417. package/stdlib/docs/stdlib/ui/layout.md +5 -5
  418. package/stdlib/docs/stdlib/ui/table.md +16 -16
  419. package/stdlib/docs/stdlib/ui.md +93 -93
  420. package/stdlib/embedding.js +2 -2
  421. package/stdlib/fs.js +2 -2
  422. package/stdlib/git.js +2 -2
  423. package/stdlib/github.js +2 -2
  424. package/stdlib/http.js +2 -2
  425. package/stdlib/image.js +2 -2
  426. package/stdlib/index.js +2 -2
  427. package/stdlib/llm.js +2 -2
  428. package/stdlib/markdown.js +2 -2
  429. package/stdlib/math.agency +4 -3
  430. package/stdlib/math.js +11 -9
  431. package/stdlib/mcp.js +2 -2
  432. package/stdlib/memory.js +2 -2
  433. package/stdlib/messaging/email.js +2 -2
  434. package/stdlib/messaging/imessage.js +2 -2
  435. package/stdlib/messaging/sms.js +2 -2
  436. package/stdlib/notes/apple.js +2 -2
  437. package/stdlib/object.js +2 -2
  438. package/stdlib/ocr.js +2 -2
  439. package/stdlib/path.js +2 -2
  440. package/stdlib/policy.agency +36 -8
  441. package/stdlib/policy.js +268 -16
  442. package/stdlib/safeBash/actions.js +2 -2
  443. package/stdlib/safeBash.js +2 -2
  444. package/stdlib/shell.js +2 -2
  445. package/stdlib/skills.agency +88 -20
  446. package/stdlib/skills.js +973 -156
  447. package/stdlib/speech.agency +5 -0
  448. package/stdlib/speech.js +23 -8
  449. package/stdlib/spill.js +2 -2
  450. package/stdlib/statelog.js +2 -2
  451. package/stdlib/strategy.js +2 -2
  452. package/stdlib/supervise.js +2 -2
  453. package/stdlib/syntax.js +2 -2
  454. package/stdlib/system.js +2 -2
  455. package/stdlib/tag.js +2 -2
  456. package/stdlib/thread.js +2 -2
  457. package/stdlib/toolbox.agency +220 -45
  458. package/stdlib/toolbox.js +1830 -694
  459. package/stdlib/ui/chart.js +2 -2
  460. package/stdlib/ui/cli.agency +3 -1
  461. package/stdlib/ui/cli.js +22 -8
  462. package/stdlib/ui/layout.js +2 -2
  463. package/stdlib/ui/table.js +2 -2
  464. package/stdlib/ui.js +2 -2
  465. package/stdlib/validation.js +2 -2
  466. package/stdlib/weather.js +2 -2
  467. package/stdlib/web/browser.js +2 -2
  468. package/stdlib/web/search.js +2 -2
  469. package/stdlib/wikipedia.js +2 -2
  470. package/dist/lib/logsViewer/conversation.d.ts +0 -22
  471. package/dist/lib/logsViewer/conversation.js +0 -147
  472. package/dist/lib/logsViewer/help.d.ts +0 -9
  473. package/dist/lib/logsViewer/help.js +0 -62
  474. package/dist/lib/logsViewer/search.d.ts +0 -8
  475. package/dist/lib/logsViewer/search.js +0 -167
  476. package/dist/lib/logsViewer/treeRows.d.ts +0 -23
  477. package/dist/lib/logsViewer/treeRows.js +0 -400
  478. package/dist/lib/logsViewer/views/byNameView.d.ts +0 -49
  479. package/dist/lib/logsViewer/views/byNameView.js +0 -284
  480. package/dist/lib/logsViewer/views/flameView.js +0 -389
  481. package/dist/lib/logsViewer/views/treeReducer.d.ts +0 -15
  482. package/dist/lib/logsViewer/views/treeReducer.js +0 -229
  483. package/dist/lib/logsViewer/views/treeView.d.ts +0 -50
  484. package/dist/lib/logsViewer/views/treeView.js +0 -292
@@ -140,7 +140,7 @@ function propagate() {
140
140
  function pass() {
141
141
  return { type: "pass" };
142
142
  }
143
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
143
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
144
144
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
145
145
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
146
146
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -186,7 +186,7 @@ function registerTools(tools) {
186
186
  }
187
187
  }
188
188
  }
189
- __registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "2b22b23fb06991c0126dc2154846365ebc1cb5c85005532280436b1b2191ae99", import.meta.url);
189
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "7895daaab342ab8c994c7efdfb878130c18dbfcc1826734ca9029f25bc4ab6a6", import.meta.url);
190
190
  __registerTool(print);
191
191
  __registerTool(printJSON);
192
192
  __registerTool(input);
@@ -88,7 +88,7 @@ function propagate() {
88
88
  function pass() {
89
89
  return { type: "pass" };
90
90
  }
91
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
91
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
92
92
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
93
93
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
94
94
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -134,7 +134,7 @@ function registerTools(tools) {
134
134
  }
135
135
  }
136
136
  }
137
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/brain.agency", "1dda5af8743ef5e2e7750334137f8df3c1ef915b3099fdd4485c345e21e86a3d", import.meta.url);
137
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/brain.agency", "93a5849e53c1d4a0b51490cdd82e65eb99d6de0b1ea8579aa7520c79ccb1619d", import.meta.url);
138
138
  __registerTool(print);
139
139
  __registerTool(printJSON);
140
140
  __registerTool(input);
@@ -4,6 +4,7 @@
4
4
  and lib/) owns the CLI, the REPL, the policy handler, and the per-turn
5
5
  guard; this module only answers turns.
6
6
  */
7
+ import { question } from "std::agent"
7
8
  import { readOnlyFileTools, whatIAmDoing } from "std::agents/lib/toolkits"
8
9
  import { now, elapsedTime } from "std::date"
9
10
  import { edit } from "std::fs"
@@ -116,6 +117,7 @@ export def turnTools(turnStart: any): any[] {
116
117
  ...getMcpTools(),
117
118
  ...learnedExtras(),
118
119
  whatIAmDoing,
120
+ question,
119
121
  elapsedTime.partial(since: turnStart),
120
122
  ]
121
123
  }
@@ -1,4 +1,5 @@
1
1
  import { print, printJSON, input, sleep, saveDraft, _guard, _pairsOf, read, write, writeBinary, readBinary, range, callback, map, mapWithIndex, filter, exclude, find, findIndex, reduce, flatMap, every, some, count, sortBy, unique, groupBy, flatten, setAgentCwd, getAgentCwd, applyAgentCwd } from "agency-lang/stdlib/index.js";
2
+ import { question } from "agency-lang/stdlib/agent.js";
2
3
  import { readOnlyFileTools, whatIAmDoing } from "agency-lang/stdlib/agents/lib/toolkits.js";
3
4
  import { now, elapsedTime } from "agency-lang/stdlib/date.js";
4
5
  import { edit } from "agency-lang/stdlib/fs.js";
@@ -138,7 +139,7 @@ function propagate() {
138
139
  function pass() {
139
140
  return { type: "pass" };
140
141
  }
141
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
142
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
142
143
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
143
144
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
144
145
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -184,7 +185,7 @@ function registerTools(tools) {
184
185
  }
185
186
  }
186
187
  }
187
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "2a1f763ab148e4d47c36556b38fda8bab46e9b76345ffa8c12ab7a0b2f487942", import.meta.url);
188
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "93a22a29ec8339bd249d199e45accbcbaa793c2efb69e791e91e6bb3ae7d1a9f", import.meta.url);
188
189
  __registerTool(print);
189
190
  __registerTool(printJSON);
190
191
  __registerTool(input);
@@ -216,6 +217,7 @@ __registerTool(flatten);
216
217
  __registerTool(setAgentCwd);
217
218
  __registerTool(getAgentCwd);
218
219
  __registerTool(applyAgentCwd);
220
+ __registerTool(question);
219
221
  __registerTool(readOnlyFileTools);
220
222
  __registerTool(whatIAmDoing);
221
223
  __registerTool(now);
@@ -862,7 +864,7 @@ async function __turnTools_impl(turnStart) {
862
864
  });
863
865
  await runner.step(4, async (runner2) => {
864
866
  __functionCompleted = true;
865
- runner2.halt([...__readStatic(mainAgentTools, "mainAgentTools", "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency"), ...__stack.locals.__hoist_0, ...__stack.locals.__hoist_1, __readStatic(whatIAmDoing, "whatIAmDoing", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/agents/lib/toolkits.agency"), __stack.locals.__hoist_2]);
867
+ runner2.halt([...__readStatic(mainAgentTools, "mainAgentTools", "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency"), ...__stack.locals.__hoist_0, ...__stack.locals.__hoist_1, __readStatic(whatIAmDoing, "whatIAmDoing", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/agents/lib/toolkits.agency"), __readStatic(question, "question", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/agent.agency"), __stack.locals.__hoist_2]);
866
868
  return;
867
869
  });
868
870
  });
@@ -2482,7 +2484,7 @@ const coordinatorBrain = __AgencyFunction.create({
2482
2484
  exported: true
2483
2485
  }, __toolRegistry);
2484
2486
  var stdin_default = graph;
2485
- const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:exitIfBroken": { "1": { "line": 78, "col": 2 }, "2": { "line": 79, "col": 4 }, "3": { "line": 78, "col": 2 }, "3.0": { "line": 78, "col": 2 }, "3.1": { "line": 80, "col": 12 }, "3.2": { "line": 80, "col": 6 }, "3.3": { "line": 81, "col": 6 }, "3.4": { "line": 83, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorInit": { "1": { "line": 88, "col": 6 }, "2": { "line": 88, "col": 2 }, "3": { "line": 94, "col": 6 }, "4": { "line": 94, "col": 2 }, "5": { "line": 100, "col": 15 }, "6": { "line": 100, "col": 2 }, "7": { "line": 101, "col": 15 }, "8": { "line": 101, "col": 2 }, "9": { "line": 102, "col": 2 }, "10": { "line": 103, "col": 2 }, "11": { "line": 106, "col": 2 }, "2.0": { "line": 90, "col": 6 }, "2.1": { "line": 89, "col": 4 }, "2.2": { "line": 92, "col": 4 }, "4.0": { "line": 96, "col": 6 }, "4.1": { "line": 95, "col": 4 }, "4.2": { "line": 98, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:turnTools": { "1": { "line": 115, "col": 7 }, "2": { "line": 116, "col": 7 }, "3": { "line": 118, "col": 4 }, "4": { "line": 113, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:mainAgent": { "2": { "line": 126, "col": 2 }, "3": { "line": 127, "col": 2 }, "4": { "line": 153, "col": 2 }, "3.0": { "line": 128, "col": 4 }, "3.1.1": { "line": 130, "col": 6 }, "3.1.2": { "line": 131, "col": 24 }, "3.1.3": { "line": 131, "col": 6 }, "3.1.4": { "line": 135, "col": 6 }, "3.1.5": { "line": 136, "col": 6 }, "3.1": { "line": 129, "col": 4 }, "3.3": { "line": 144, "col": 13 }, "3.4": { "line": 142, "col": 4 }, "3.5": { "line": 146, "col": 4 }, "3.6.0": { "line": 148, "col": 6 }, "3.6.1": { "line": 149, "col": 6 }, "3.6": { "line": 147, "col": 4 }, "3.7": { "line": 151, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:promptText": { "1": { "line": 159, "col": 9 }, "2": { "line": 159, "col": 9 }, "3": { "line": 159, "col": 2 }, "2.0": { "line": 159, "col": 9 }, "2.1": { "line": 160, "col": 20 }, "2.2": { "line": 160, "col": 20 }, "2.3": { "line": 159, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:replyText": { "1": { "line": 167, "col": 6 }, "2": { "line": 167, "col": 2 }, "3": { "line": 170, "col": 2 }, "2.0": { "line": 168, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:researchTurn": { "1": { "line": 174, "col": 37 }, "2": { "line": 174, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:oracleTurn": { "1": { "line": 182, "col": 2 }, "2": { "line": 183, "col": 2 }, "3": { "line": 186, "col": 2 }, "2.0": { "line": 184, "col": 36 }, "2.1": { "line": 184, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:explorerTurn": { "1": { "line": 190, "col": 2 }, "2": { "line": 191, "col": 2 }, "3": { "line": 194, "col": 2 }, "2.0": { "line": 192, "col": 38 }, "2.1": { "line": 192, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorRunTurn": { "1": { "line": 201, "col": 9 }, "2": { "line": 201, "col": 2 }, "1.0": { "line": 202, "col": 24 }, "1.1": { "line": 202, "col": 14 }, "1.2": { "line": 202, "col": 14 }, "1.3": { "line": 203, "col": 31 }, "1.4": { "line": 203, "col": 18 }, "1.5": { "line": 203, "col": 18 }, "1.6": { "line": 204, "col": 27 }, "1.7": { "line": 204, "col": 16 }, "1.8": { "line": 204, "col": 16 }, "1.9": { "line": 205, "col": 31 }, "1.10": { "line": 205, "col": 18 }, "1.11": { "line": 205, "col": 18 }, "1.12": { "line": 206, "col": 28 }, "1.13": { "line": 206, "col": 16 }, "1.14": { "line": 206, "col": 16 }, "1.15": { "line": 207, "col": 30 }, "1.16": { "line": 207, "col": 17 }, "1.17": { "line": 207, "col": 17 }, "1.18": { "line": 208, "col": 30 }, "1.19": { "line": 208, "col": 17 }, "1.20": { "line": 208, "col": 17 }, "1.21": { "line": 209, "col": 9 }, "1.22": { "line": 209, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorBrain": { "1": { "line": 214, "col": 2 } } };
2487
+ const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:exitIfBroken": { "1": { "line": 79, "col": 2 }, "2": { "line": 80, "col": 4 }, "3": { "line": 79, "col": 2 }, "3.0": { "line": 79, "col": 2 }, "3.1": { "line": 81, "col": 12 }, "3.2": { "line": 81, "col": 6 }, "3.3": { "line": 82, "col": 6 }, "3.4": { "line": 84, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorInit": { "1": { "line": 89, "col": 6 }, "2": { "line": 89, "col": 2 }, "3": { "line": 95, "col": 6 }, "4": { "line": 95, "col": 2 }, "5": { "line": 101, "col": 15 }, "6": { "line": 101, "col": 2 }, "7": { "line": 102, "col": 15 }, "8": { "line": 102, "col": 2 }, "9": { "line": 103, "col": 2 }, "10": { "line": 104, "col": 2 }, "11": { "line": 107, "col": 2 }, "2.0": { "line": 91, "col": 6 }, "2.1": { "line": 90, "col": 4 }, "2.2": { "line": 93, "col": 4 }, "4.0": { "line": 97, "col": 6 }, "4.1": { "line": 96, "col": 4 }, "4.2": { "line": 99, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:turnTools": { "1": { "line": 116, "col": 7 }, "2": { "line": 117, "col": 7 }, "3": { "line": 120, "col": 4 }, "4": { "line": 114, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:mainAgent": { "2": { "line": 128, "col": 2 }, "3": { "line": 129, "col": 2 }, "4": { "line": 155, "col": 2 }, "3.0": { "line": 130, "col": 4 }, "3.1.1": { "line": 132, "col": 6 }, "3.1.2": { "line": 133, "col": 24 }, "3.1.3": { "line": 133, "col": 6 }, "3.1.4": { "line": 137, "col": 6 }, "3.1.5": { "line": 138, "col": 6 }, "3.1": { "line": 131, "col": 4 }, "3.3": { "line": 146, "col": 13 }, "3.4": { "line": 144, "col": 4 }, "3.5": { "line": 148, "col": 4 }, "3.6.0": { "line": 150, "col": 6 }, "3.6.1": { "line": 151, "col": 6 }, "3.6": { "line": 149, "col": 4 }, "3.7": { "line": 153, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:promptText": { "1": { "line": 161, "col": 9 }, "2": { "line": 161, "col": 9 }, "3": { "line": 161, "col": 2 }, "2.0": { "line": 161, "col": 9 }, "2.1": { "line": 162, "col": 20 }, "2.2": { "line": 162, "col": 20 }, "2.3": { "line": 161, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:replyText": { "1": { "line": 169, "col": 6 }, "2": { "line": 169, "col": 2 }, "3": { "line": 172, "col": 2 }, "2.0": { "line": 170, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:researchTurn": { "1": { "line": 176, "col": 37 }, "2": { "line": 176, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:oracleTurn": { "1": { "line": 184, "col": 2 }, "2": { "line": 185, "col": 2 }, "3": { "line": 188, "col": 2 }, "2.0": { "line": 186, "col": 36 }, "2.1": { "line": 186, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:explorerTurn": { "1": { "line": 192, "col": 2 }, "2": { "line": 193, "col": 2 }, "3": { "line": 196, "col": 2 }, "2.0": { "line": 194, "col": 38 }, "2.1": { "line": 194, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorRunTurn": { "1": { "line": 203, "col": 9 }, "2": { "line": 203, "col": 2 }, "1.0": { "line": 204, "col": 24 }, "1.1": { "line": 204, "col": 14 }, "1.2": { "line": 204, "col": 14 }, "1.3": { "line": 205, "col": 31 }, "1.4": { "line": 205, "col": 18 }, "1.5": { "line": 205, "col": 18 }, "1.6": { "line": 206, "col": 27 }, "1.7": { "line": 206, "col": 16 }, "1.8": { "line": 206, "col": 16 }, "1.9": { "line": 207, "col": 31 }, "1.10": { "line": 207, "col": 18 }, "1.11": { "line": 207, "col": 18 }, "1.12": { "line": 208, "col": 28 }, "1.13": { "line": 208, "col": 16 }, "1.14": { "line": 208, "col": 16 }, "1.15": { "line": 209, "col": 30 }, "1.16": { "line": 209, "col": 17 }, "1.17": { "line": 209, "col": 17 }, "1.18": { "line": 210, "col": 30 }, "1.19": { "line": 210, "col": 17 }, "1.20": { "line": 210, "col": 17 }, "1.21": { "line": 211, "col": 9 }, "1.22": { "line": 211, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorBrain": { "1": { "line": 216, "col": 2 } } };
2486
2488
  export {
2487
2489
  __getCheckpoints,
2488
2490
  __invokeFunction,
@@ -44,7 +44,7 @@ export def writeToolFor(name: string, purpose: string, request: string): string
44
44
  model calls. In a one-shot run nothing is saved.
45
45
 
46
46
  @param name - camelCase name: a lowercase letter, then letters and digits
47
- @param purpose - What the tool should do, in plain language
47
+ @param purpose - What the tool should do, in plain language. State only what the user said; ask the user first for anything the tool needs that they have not told you
48
48
  @param request - The tool's input type as Agency type text, such as { topics: string[]; maxItems: number }
49
49
  """
50
50
  const cap = maxLearnedToolName()
@@ -108,7 +108,7 @@ function propagate() {
108
108
  function pass() {
109
109
  return { type: "pass" };
110
110
  }
111
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
111
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
112
112
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
113
113
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
114
114
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -154,7 +154,7 @@ function registerTools(tools) {
154
154
  }
155
155
  }
156
156
  }
157
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/learn.agency", "42d11f7cba780022c78a4fa87f454bb7891885a3ecedaaf59ed8384475ac3bb1", import.meta.url);
157
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/learn.agency", "bd71c5f741e508e5dc8b9f88ec98b6d30781383d7a53267a1ebcd32bcc3f4b8a", import.meta.url);
158
158
  __registerTool(print);
159
159
  __registerTool(printJSON);
160
160
  __registerTool(input);
@@ -634,7 +634,7 @@ const writeToolFor = __AgencyFunction.create({
634
634
  model calls. In a one-shot run nothing is saved.
635
635
 
636
636
  @param name - camelCase name: a lowercase letter, then letters and digits
637
- @param purpose - What the tool should do, in plain language
637
+ @param purpose - What the tool should do, in plain language. State only what the user said; ask the user first for anything the tool needs that they have not told you
638
638
  @param request - The tool's input type as Agency type text, such as { topics: string[]; maxItems: number }`,
639
639
  schema: z.object({ "name": z.string(), "purpose": z.string(), "request": z.string() })
640
640
  },
@@ -106,7 +106,7 @@ function propagate() {
106
106
  function pass() {
107
107
  return { type: "pass" };
108
108
  }
109
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
109
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
110
110
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
111
111
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
112
112
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -152,7 +152,7 @@ function registerTools(tools) {
152
152
  }
153
153
  }
154
154
  }
155
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", "b8801fef45da41591a56ed1747192a103829712efebdd3e053a245bccda08b9d", import.meta.url);
155
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", "45ead7baa72e6119d56338642a70383c73e8c59adf3ed806111bc3b10feb0355", import.meta.url);
156
156
  __registerTool(print);
157
157
  __registerTool(printJSON);
158
158
  __registerTool(input);
@@ -108,7 +108,7 @@ function propagate() {
108
108
  function pass() {
109
109
  return { type: "pass" };
110
110
  }
111
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
111
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
112
112
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
113
113
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
114
114
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -154,7 +154,7 @@ function registerTools(tools) {
154
154
  }
155
155
  }
156
156
  }
157
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency", "86c5e2aa6b56a7128fecdd59f0598d75584d9b6304fb04a892ebbd444f99adb6", import.meta.url);
157
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency", "dd27d4e36a454596242dd97ab056d4a68f8556df4bbb7b565f8cc96e952fecee", import.meta.url);
158
158
  __registerTool(print);
159
159
  __registerTool(printJSON);
160
160
  __registerTool(input);
@@ -106,7 +106,7 @@ function propagate() {
106
106
  function pass() {
107
107
  return { type: "pass" };
108
108
  }
109
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
109
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
110
110
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
111
111
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
112
112
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -152,7 +152,7 @@ function registerTools(tools) {
152
152
  }
153
153
  }
154
154
  }
155
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/bundledSkills.agency", "7b90176c1efa3e27c083618b9040d38b76d9bb9ecdd76cdd2e4103ea6b1966a4", import.meta.url);
155
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/bundledSkills.agency", "e8f224ff6ba7bcd69ea0cb16b33f31f0048b8babd2119d64ca80b07dad345155", import.meta.url);
156
156
  __registerTool(print);
157
157
  __registerTool(printJSON);
158
158
  __registerTool(input);
@@ -111,7 +111,7 @@ function propagate() {
111
111
  function pass() {
112
112
  return { type: "pass" };
113
113
  }
114
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
114
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
115
115
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
116
116
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
117
117
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -157,7 +157,7 @@ function registerTools(tools) {
157
157
  }
158
158
  }
159
159
  }
160
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/presetTools.agency", "7185a39c80797eae1c9b55a50b80034213a2724d29fb3adb2db1bb5db977252c", import.meta.url);
160
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/presetTools.agency", "852ddb1b97464e42a5a193f079cbcf7af805a9dd508d876811b912875be8d145", import.meta.url);
161
161
  __registerTool(print);
162
162
  __registerTool(printJSON);
163
163
  __registerTool(input);
@@ -108,7 +108,7 @@ function propagate() {
108
108
  function pass() {
109
109
  return { type: "pass" };
110
110
  }
111
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
111
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
112
112
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
113
113
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
114
114
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -154,7 +154,7 @@ function registerTools(tools) {
154
154
  }
155
155
  }
156
156
  }
157
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency", "54ac8e91969c7a431868443b870aa391a653a3d47c4d9330f0664006f13dd789", import.meta.url);
157
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency", "18bafcd1566542c8b475a549f7012881fb69f0f6ee154dc3fc3f62cb84a28f7e", import.meta.url);
158
158
  __registerTool(print);
159
159
  __registerTool(printJSON);
160
160
  __registerTool(input);
@@ -116,6 +116,13 @@ name, the purpose, and the request type. The user reviews the complete
116
116
  draft before anything is saved and can send feedback for another draft.
117
117
  Never claim a skill or tool was saved unless the reply said so.
118
118
 
119
+ Before you call `writeToolFor`, list what the tool needs that the user
120
+ has not told you: an address, an account, a provider, the name of an
121
+ environment variable. Ask the user for those first, and put the answers
122
+ in the purpose. In the purpose, state only what the user said. Do not
123
+ call something "configured" or "existing" unless the user said it is:
124
+ the author will go looking for it.
125
+
119
126
  A saved tool is in your tools as `learned_<name>`, and `learned_skills`
120
127
  reads your saved skills. Both appear from the next turn on. When the
121
128
  user asks for something one of them covers, call it rather than doing
@@ -170,7 +177,9 @@ When the user asks you to look at, debug, or change a file or some
170
177
  code, look at it — read it yourself, or delegate changes to
171
178
  `codeAgent`. Don't ask the user to paste a file or describe code you
172
179
  can read. Only ask the user for information you genuinely cannot
173
- obtain yourself.
180
+ obtain yourself. A fact about the user that no file holds, such as which
181
+ address, account, or service they mean, is that kind of information:
182
+ ask for it and do not guess.
174
183
 
175
184
  ## Answer before action
176
185
 
@@ -184,6 +193,7 @@ with them — don't sprint to implementation.
184
193
  ## Communicating with the user
185
194
 
186
195
  - Make sure the user is following what you're doing. Use the `whatIAmDoing` tool frequently to tell the user what you're doing. (Subagent dispatches are announced automatically — narrate everything else.)
196
+ - When the work turns on something only the user can tell you — which account they mean, which of two readings of the request, a value you cannot look up — ask with the `question` tool, and ask before you build on the guess rather than after. Do not ask for anything you could find yourself. When nobody can answer, your question comes back rejected; when that happens, pick the most reasonable reading, say which one you picked, and carry on.
187
197
  - Also use the `elapsedTime` tool frequently to check how much time has elapsed since you started the task. If the user gave you a time constraint to work within, make sure you finish the task within that time constraint. For simple tasks, make sure you don't spend too long researching things before giving an answer.
188
198
 
189
199
  ## Budgets and subagents that stop early
@@ -52,6 +52,9 @@ short unless the task demands detail.
52
52
  `learnSkill` saves a skill you write to your learned catalog; `writeToolFor`
53
53
  has a tool written and saved there. The user reviews before anything
54
54
  is saved. Never claim a save the reply did not confirm.
55
+ Before `writeToolFor`, ask the user for anything the tool needs that
56
+ they have not told you (an address, an account, a provider). In the
57
+ purpose, state only what the user said.
55
58
  A saved tool is in your tools as `learned_<name>`, and `learned_skills`
56
59
  reads your saved skills. Call them when they cover the request. A saved
57
60
  tool's code is at `~/.agency-agent/tools/<name>/impl.agency`.
@@ -74,6 +77,7 @@ Only reference files that live in the user's own working directory. Never cite a
74
77
  ## Communicating with the user
75
78
 
76
79
  - Make sure the user is following what you're doing. Use the `whatIAmDoing` tool frequently to tell the user what you're doing. (Subagent dispatches are announced automatically — narrate everything else.)
80
+ - When the work turns on something only the user can tell you — which account they mean, which of two readings of the request, a value you cannot look up — ask with the `question` tool, and ask before you build on the guess rather than after. Do not ask for anything you could find yourself. When nobody can answer, your question comes back rejected; when that happens, pick the most reasonable reading, say which one you picked, and carry on.
77
81
  - Also use the `elapsedTime` tool frequently to check how much time has elapsed since you started the task. If the user gave you a time constraint to work within, make sure you finish the task within that time constraint. For simple tasks, make sure you don't spend too long researching things before giving an answer.
78
82
 
79
83
  ## Budgets and subagents that stop early
@@ -115,7 +115,7 @@ function propagate() {
115
115
  function pass() {
116
116
  return { type: "pass" };
117
117
  }
118
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
118
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
119
119
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
120
120
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
121
121
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -161,7 +161,7 @@ function registerTools(tools) {
161
161
  }
162
162
  }
163
163
  }
164
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/subagents/brainstorm.agency", "4b9caf6a53e5a8dafe4780d508074938d5a6bd4a34d3f5b53a30a2b360c3bd4f", import.meta.url);
164
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/subagents/brainstorm.agency", "9f942cc25a1a2ad879e29c604adc262015e1ac16daccf0c4c0a5d3bdbb62bdc0", import.meta.url);
165
165
  __registerTool(print);
166
166
  __registerTool(printJSON);
167
167
  __registerTool(input);
@@ -10,6 +10,7 @@
10
10
  * (`setAgentCwd`/`getAgentCwd`), which `agent.agency` pins to the user's
11
11
  * cwd at startup.
12
12
  */
13
+ import { question } from "std::agent"
13
14
  import { cli, cliHandles, CLI_NOT_AVAILABLE } from "std::agency"
14
15
  import { filter } from "std::array"
15
16
  import { agencyCodingAgent } from "std::agents/agency/coding"
@@ -203,6 +204,7 @@ def consultExpert(task: string, agencyTask: boolean): Result<ExpertGuidance> {
203
204
  maxTime: 5m,
204
205
  model: getSlowModel(),
205
206
  provider: getSlowProvider(),
207
+ extraTools: [question],
206
208
  )
207
209
  }
208
210
  return expertAgent(
@@ -211,6 +213,7 @@ def consultExpert(task: string, agencyTask: boolean): Result<ExpertGuidance> {
211
213
  maxTime: 5m,
212
214
  model: getSlowModel(),
213
215
  provider: getSlowProvider(),
216
+ extraTools: [question],
214
217
  )
215
218
  }
216
219
 
@@ -260,6 +263,7 @@ Deliverable: ONLY the Agency module source that will be saved as ${target}. The
260
263
  requireMain: target == "",
261
264
  maxCost: ESCALATE_MAX_COST,
262
265
  maxTime: ESCALATE_MAX_TIME,
266
+ extraTools: [question],
263
267
  )
264
268
  if (isFailure(written)) {
265
269
  return failure("could not write valid Agency code: ${written.error}")
@@ -1,4 +1,5 @@
1
1
  import { print, printJSON, input, sleep, saveDraft, _guard, _pairsOf, read, write, writeBinary, readBinary, range, callback, map, mapWithIndex, exclude, find, findIndex, reduce, flatMap, every, some, count, sortBy, unique, groupBy, flatten, applyAgentCwd } from "agency-lang/stdlib/index.js";
2
+ import { question } from "agency-lang/stdlib/agent.js";
2
3
  import { cli, cliHandles, CLI_NOT_AVAILABLE } from "agency-lang/stdlib/agency.js";
3
4
  import { filter } from "agency-lang/stdlib/array.js";
4
5
  import { agencyCodingAgent } from "agency-lang/stdlib/agents/agency/coding.js";
@@ -142,7 +143,7 @@ function propagate() {
142
143
  function pass() {
143
144
  return { type: "pass" };
144
145
  }
145
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
146
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
146
147
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
147
148
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
148
149
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -188,7 +189,7 @@ function registerTools(tools) {
188
189
  }
189
190
  }
190
191
  }
191
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency", "2344a7d427a7f5172e4ee3486737fcbb1f0e91ce4e66a22c6cc52de9bb2b886c", import.meta.url);
192
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency", "e6fbe59c5fb45ee166de4c80fc2ddc643b883291dc1cf435a53a73a0a05fb3d4", import.meta.url);
192
193
  __registerTool(print);
193
194
  __registerTool(printJSON);
194
195
  __registerTool(input);
@@ -220,6 +221,7 @@ __registerTool(flatten);
220
221
  __registerTool(setAgentCwd);
221
222
  __registerTool(getAgentCwd);
222
223
  __registerTool(applyAgentCwd);
224
+ __registerTool(question);
223
225
  __registerTool(cli);
224
226
  __registerTool(cliHandles);
225
227
  __registerTool(CLI_NOT_AVAILABLE);
@@ -1407,7 +1409,8 @@ async function __consultExpert_impl(task, agencyTask) {
1407
1409
  maxCost: __readStatic(ESCALATE_MAX_COST, "ESCALATE_MAX_COST", "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency"),
1408
1410
  maxTime: 3e5,
1409
1411
  model: __stack.locals.__hoist_0,
1410
- provider: __stack.locals.__hoist_1
1412
+ provider: __stack.locals.__hoist_1,
1413
+ extraTools: [__readStatic(question, "question", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/agent.agency")]
1411
1414
  }
1412
1415
  }));
1413
1416
  return;
@@ -1455,7 +1458,8 @@ async function __consultExpert_impl(task, agencyTask) {
1455
1458
  maxCost: __readStatic(ESCALATE_MAX_COST, "ESCALATE_MAX_COST", "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency"),
1456
1459
  maxTime: 3e5,
1457
1460
  model: __stack.locals.__hoist_2,
1458
- provider: __stack.locals.__hoist_3
1461
+ provider: __stack.locals.__hoist_3,
1462
+ extraTools: [__readStatic(question, "question", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/agent.agency")]
1459
1463
  }
1460
1464
  }));
1461
1465
  return;
@@ -1777,7 +1781,8 @@ Deliverable: ONLY the Agency module source that will be saved as ${__stack.local
1777
1781
  context: __stack.args.context,
1778
1782
  requireMain: __eq(__stack.locals.target, ``),
1779
1783
  maxCost: __readStatic(ESCALATE_MAX_COST, "ESCALATE_MAX_COST", "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency"),
1780
- maxTime: __readStatic(ESCALATE_MAX_TIME, "ESCALATE_MAX_TIME", "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency")
1784
+ maxTime: __readStatic(ESCALATE_MAX_TIME, "ESCALATE_MAX_TIME", "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency"),
1785
+ extraTools: [__readStatic(question, "question", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/agent.agency")]
1781
1786
  }
1782
1787
  });
1783
1788
  if (hasInterrupts(__stack.locals.written)) {
@@ -4481,7 +4486,7 @@ const converse = __AgencyFunction.create({
4481
4486
  exported: false
4482
4487
  }, __toolRegistry);
4483
4488
  var stdin_default = graph;
4484
- const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:agencyCli": { "1": { "line": 72, "col": 2 }, "2": { "line": 83, "col": 2 }, "3": { "line": 84, "col": 2 }, "4": { "line": 91, "col": 2 }, "1.0": { "line": 73, "col": 26 }, "1.1": { "line": 73, "col": 4 }, "1.2": { "line": 74, "col": 15 }, "1.3.0": { "line": 74, "col": 4 }, "1.3.1": { "line": 75, "col": 6 }, "1.3": { "line": 74, "col": 4 }, "1.4": { "line": 81, "col": 4 }, "3.0": { "line": 85, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:promptFile": { "1": { "line": 101, "col": 2 }, "2": { "line": 102, "col": 6 }, "3": { "line": 102, "col": 2 }, "4": { "line": 105, "col": 2 }, "1.0": { "line": 101, "col": 2 }, "3.0": { "line": 103, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:setCodeOneShot": { "1": { "line": 141, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:triage": { "1": { "line": 160, "col": 2 }, "2": { "line": 168, "col": 2 }, "3": { "line": 169, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:routeFor": { "1": { "line": 174, "col": 9 }, "2": { "line": 174, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:escalate": { "1": { "line": 188, "col": 2 }, "2": { "line": 189, "col": 6 }, "3": { "line": 189, "col": 2 }, "4": { "line": 192, "col": 2 }, "3.0": { "line": 190, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:consultExpert": { "1": { "line": 198, "col": 2 }, "2": { "line": 211, "col": 11 }, "3": { "line": 212, "col": 14 }, "4": { "line": 207, "col": 2 }, "1.0": { "line": 203, "col": 13 }, "1.1": { "line": 204, "col": 16 }, "1.2": { "line": 199, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:saveTargetFor": { "1": { "line": 223, "col": 2 }, "2": { "line": 231, "col": 2 }, "3": { "line": 232, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:solve": { "1": { "line": 241, "col": 2 }, "2": { "line": 277, "col": 2 }, "1.1": { "line": 247, "col": 4 }, "1.2": { "line": 248, "col": 4 }, "1.3.0": { "line": 250, "col": 6 }, "1.3": { "line": 249, "col": 4 }, "1.4": { "line": 256, "col": 4 }, "1.5": { "line": 263, "col": 8 }, "1.6.0": { "line": 264, "col": 6 }, "1.6": { "line": 263, "col": 4 }, "1.7.0": { "line": 267, "col": 6 }, "1.7.1": { "line": 268, "col": 10 }, "1.7.2.0": { "line": 269, "col": 8 }, "1.7.2": { "line": 268, "col": 6 }, "1.7.3": { "line": 273, "col": 6 }, "1.7": { "line": 266, "col": 4 }, "1.8": { "line": 275, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:flattenSolveOutcome": { "1": { "line": 301, "col": 6 }, "2": { "line": 301, "col": 2 }, "3": { "line": 304, "col": 2 }, "4": { "line": 305, "col": 2 }, "5": { "line": 310, "col": 2 }, "6": { "line": 313, "col": 2 }, "2.0": { "line": 302, "col": 4 }, "4.0": { "line": 306, "col": 4 }, "5.0": { "line": 311, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:supervisedRun": { "1": { "line": 321, "col": 2 }, "2": { "line": 325, "col": 11 }, "3": { "line": 322, "col": 2 }, "4": { "line": 339, "col": 2 }, "5": { "line": 340, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_0": { "3.0": { "line": 327, "col": 4 }, "3.1": { "line": 328, "col": 8 }, "3.2.0": { "line": 329, "col": 6 }, "3.2": { "line": 328, "col": 4 }, "3.3": { "line": 334, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:supervisedSolve": { "1": { "line": 349, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_1": {}, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:supervisedPlan": { "1": { "line": 363, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_2": {}, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:codeAgent": { "1": { "line": 388, "col": 2 }, "2": { "line": 389, "col": 2 }, "3": { "line": 390, "col": 2 }, "4": { "line": 391, "col": 6 }, "5": { "line": 391, "col": 2 }, "6": { "line": 394, "col": 2 }, "7": { "line": 397, "col": 2 }, "5.0": { "line": 392, "col": 4 }, "6.0": { "line": 395, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:escalateToExpert": { "1": { "line": 408, "col": 35 }, "2": { "line": 408, "col": 2 }, "3": { "line": 409, "col": 59 }, "4": { "line": 409, "col": 2 }, "5": { "line": 410, "col": 2 }, "6": { "line": 416, "col": 5 }, "7": { "line": 416, "col": 31 }, "8": { "line": 415, "col": 2 }, "9": { "line": 421, "col": 13 }, "10": { "line": 419, "col": 2 }, "11": { "line": 425, "col": 2 }, "12": { "line": 426, "col": 2 }, "13": { "line": 427, "col": 6 }, "14": { "line": 427, "col": 2 }, "15": { "line": 437, "col": 2 }, "16": { "line": 443, "col": 6 }, "17": { "line": 443, "col": 2 }, "19": { "line": 471, "col": 2 }, "20": { "line": 474, "col": 2 }, "14.0": { "line": 428, "col": 4 }, "14.1": { "line": 430, "col": 4 }, "14.2": { "line": 431, "col": 4 }, "14.3": { "line": 435, "col": 4 }, "17.0": { "line": 449, "col": 2 }, "17.1": { "line": 444, "col": 4 }, "17.2": { "line": 453, "col": 4 }, "17.3": { "line": 454, "col": 8 }, "17.4.0": { "line": 455, "col": 6 }, "17.4": { "line": 454, "col": 4 }, "17.5": { "line": 457, "col": 4 }, "17.6": { "line": 458, "col": 4 }, "17.7": { "line": 460, "col": 4 }, "17.8": { "line": 466, "col": 4 }, "19.0": { "line": 472, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_3": {}, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:withVerification": { "1": { "line": 484, "col": 2 }, "2": { "line": 485, "col": 2 }, "3": { "line": 488, "col": 6 }, "4": { "line": 488, "col": 2 }, "5": { "line": 491, "col": 2 }, "2.0": { "line": 486, "col": 4 }, "4.0": { "line": 489, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:solveUnattended": { "1": { "line": 499, "col": 2 }, "2": { "line": 500, "col": 6 }, "3": { "line": 500, "col": 2 }, "5": { "line": 505, "col": 2 }, "6": { "line": 506, "col": 2 }, "7": { "line": 507, "col": 7 }, "8": { "line": 507, "col": 2 }, "9": { "line": 515, "col": 2 }, "10": { "line": 510, "col": 2 }, "11": { "line": 519, "col": 2 }, "12": { "line": 520, "col": 6 }, "13": { "line": 520, "col": 2 }, "14": { "line": 523, "col": 2 }, "15": { "line": 525, "col": 2 }, "16": { "line": 526, "col": 2 }, "3.0": { "line": 501, "col": 4 }, "8.0": { "line": 508, "col": 4 }, "13.0": { "line": 521, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:converse": { "1": { "line": 536, "col": 2 }, "2": { "line": 537, "col": 2 }, "3": { "line": 538, "col": 2 }, "4": { "line": 539, "col": 2 }, "5": { "line": 540, "col": 2 }, "6": { "line": 541, "col": 2 }, "7": { "line": 590, "col": 2 }, "6.0": { "line": 542, "col": 4 }, "6.1.1": { "line": 546, "col": 35 }, "6.1.2": { "line": 546, "col": 6 }, "6.1.3": { "line": 547, "col": 10 }, "6.1.4.0": { "line": 548, "col": 8 }, "6.1.4": { "line": 547, "col": 6 }, "6.1.5": { "line": 550, "col": 6 }, "6.1.6": { "line": 551, "col": 6 }, "6.1": { "line": 543, "col": 4 }, "6.2": { "line": 553, "col": 4 }, "6.3.0": { "line": 555, "col": 6 }, "6.3.1": { "line": 556, "col": 27 }, "6.3.2": { "line": 556, "col": 6 }, "6.3.3": { "line": 559, "col": 6 }, "6.3.4.0.0": { "line": 561, "col": 8 }, "6.3.4.0": { "line": 561, "col": 8 }, "6.3.4": { "line": 560, "col": 6 }, "6.3.5": { "line": 563, "col": 10 }, "6.3.6.0": { "line": 567, "col": 10 }, "6.3.6.1": { "line": 564, "col": 8 }, "6.3.6.2": { "line": 572, "col": 8 }, "6.3.6": { "line": 563, "col": 6 }, "6.3": { "line": 554, "col": 4 }, "6.4": { "line": 575, "col": 4 }, "6.5": { "line": 588, "col": 4 } } };
4489
+ const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:agencyCli": { "1": { "line": 73, "col": 2 }, "2": { "line": 84, "col": 2 }, "3": { "line": 85, "col": 2 }, "4": { "line": 92, "col": 2 }, "1.0": { "line": 74, "col": 26 }, "1.1": { "line": 74, "col": 4 }, "1.2": { "line": 75, "col": 15 }, "1.3.0": { "line": 75, "col": 4 }, "1.3.1": { "line": 76, "col": 6 }, "1.3": { "line": 75, "col": 4 }, "1.4": { "line": 82, "col": 4 }, "3.0": { "line": 86, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:promptFile": { "1": { "line": 102, "col": 2 }, "2": { "line": 103, "col": 6 }, "3": { "line": 103, "col": 2 }, "4": { "line": 106, "col": 2 }, "1.0": { "line": 102, "col": 2 }, "3.0": { "line": 104, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:setCodeOneShot": { "1": { "line": 142, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:triage": { "1": { "line": 161, "col": 2 }, "2": { "line": 169, "col": 2 }, "3": { "line": 170, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:routeFor": { "1": { "line": 175, "col": 9 }, "2": { "line": 175, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:escalate": { "1": { "line": 189, "col": 2 }, "2": { "line": 190, "col": 6 }, "3": { "line": 190, "col": 2 }, "4": { "line": 193, "col": 2 }, "3.0": { "line": 191, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:consultExpert": { "1": { "line": 199, "col": 2 }, "2": { "line": 213, "col": 11 }, "3": { "line": 214, "col": 14 }, "4": { "line": 209, "col": 2 }, "1.0": { "line": 204, "col": 13 }, "1.1": { "line": 205, "col": 16 }, "1.2": { "line": 200, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:saveTargetFor": { "1": { "line": 226, "col": 2 }, "2": { "line": 234, "col": 2 }, "3": { "line": 235, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:solve": { "1": { "line": 244, "col": 2 }, "2": { "line": 281, "col": 2 }, "1.1": { "line": 250, "col": 4 }, "1.2": { "line": 251, "col": 4 }, "1.3.0": { "line": 253, "col": 6 }, "1.3": { "line": 252, "col": 4 }, "1.4": { "line": 259, "col": 4 }, "1.5": { "line": 267, "col": 8 }, "1.6.0": { "line": 268, "col": 6 }, "1.6": { "line": 267, "col": 4 }, "1.7.0": { "line": 271, "col": 6 }, "1.7.1": { "line": 272, "col": 10 }, "1.7.2.0": { "line": 273, "col": 8 }, "1.7.2": { "line": 272, "col": 6 }, "1.7.3": { "line": 277, "col": 6 }, "1.7": { "line": 270, "col": 4 }, "1.8": { "line": 279, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:flattenSolveOutcome": { "1": { "line": 305, "col": 6 }, "2": { "line": 305, "col": 2 }, "3": { "line": 308, "col": 2 }, "4": { "line": 309, "col": 2 }, "5": { "line": 314, "col": 2 }, "6": { "line": 317, "col": 2 }, "2.0": { "line": 306, "col": 4 }, "4.0": { "line": 310, "col": 4 }, "5.0": { "line": 315, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:supervisedRun": { "1": { "line": 325, "col": 2 }, "2": { "line": 329, "col": 11 }, "3": { "line": 326, "col": 2 }, "4": { "line": 343, "col": 2 }, "5": { "line": 344, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_0": { "3.0": { "line": 331, "col": 4 }, "3.1": { "line": 332, "col": 8 }, "3.2.0": { "line": 333, "col": 6 }, "3.2": { "line": 332, "col": 4 }, "3.3": { "line": 338, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:supervisedSolve": { "1": { "line": 353, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_1": {}, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:supervisedPlan": { "1": { "line": 367, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_2": {}, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:codeAgent": { "1": { "line": 392, "col": 2 }, "2": { "line": 393, "col": 2 }, "3": { "line": 394, "col": 2 }, "4": { "line": 395, "col": 6 }, "5": { "line": 395, "col": 2 }, "6": { "line": 398, "col": 2 }, "7": { "line": 401, "col": 2 }, "5.0": { "line": 396, "col": 4 }, "6.0": { "line": 399, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:escalateToExpert": { "1": { "line": 412, "col": 35 }, "2": { "line": 412, "col": 2 }, "3": { "line": 413, "col": 59 }, "4": { "line": 413, "col": 2 }, "5": { "line": 414, "col": 2 }, "6": { "line": 420, "col": 5 }, "7": { "line": 420, "col": 31 }, "8": { "line": 419, "col": 2 }, "9": { "line": 425, "col": 13 }, "10": { "line": 423, "col": 2 }, "11": { "line": 429, "col": 2 }, "12": { "line": 430, "col": 2 }, "13": { "line": 431, "col": 6 }, "14": { "line": 431, "col": 2 }, "15": { "line": 441, "col": 2 }, "16": { "line": 447, "col": 6 }, "17": { "line": 447, "col": 2 }, "19": { "line": 475, "col": 2 }, "20": { "line": 478, "col": 2 }, "14.0": { "line": 432, "col": 4 }, "14.1": { "line": 434, "col": 4 }, "14.2": { "line": 435, "col": 4 }, "14.3": { "line": 439, "col": 4 }, "17.0": { "line": 453, "col": 2 }, "17.1": { "line": 448, "col": 4 }, "17.2": { "line": 457, "col": 4 }, "17.3": { "line": 458, "col": 8 }, "17.4.0": { "line": 459, "col": 6 }, "17.4": { "line": 458, "col": 4 }, "17.5": { "line": 461, "col": 4 }, "17.6": { "line": 462, "col": 4 }, "17.7": { "line": 464, "col": 4 }, "17.8": { "line": 470, "col": 4 }, "19.0": { "line": 476, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:__block_3": {}, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:withVerification": { "1": { "line": 488, "col": 2 }, "2": { "line": 489, "col": 2 }, "3": { "line": 492, "col": 6 }, "4": { "line": 492, "col": 2 }, "5": { "line": 495, "col": 2 }, "2.0": { "line": 490, "col": 4 }, "4.0": { "line": 493, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:solveUnattended": { "1": { "line": 503, "col": 2 }, "2": { "line": 504, "col": 6 }, "3": { "line": 504, "col": 2 }, "5": { "line": 509, "col": 2 }, "6": { "line": 510, "col": 2 }, "7": { "line": 511, "col": 7 }, "8": { "line": 511, "col": 2 }, "9": { "line": 519, "col": 2 }, "10": { "line": 514, "col": 2 }, "11": { "line": 523, "col": 2 }, "12": { "line": 524, "col": 6 }, "13": { "line": 524, "col": 2 }, "14": { "line": 527, "col": 2 }, "15": { "line": 529, "col": 2 }, "16": { "line": 530, "col": 2 }, "3.0": { "line": 505, "col": 4 }, "8.0": { "line": 512, "col": 4 }, "13.0": { "line": 525, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency:converse": { "1": { "line": 540, "col": 2 }, "2": { "line": 541, "col": 2 }, "3": { "line": 542, "col": 2 }, "4": { "line": 543, "col": 2 }, "5": { "line": 544, "col": 2 }, "6": { "line": 545, "col": 2 }, "7": { "line": 594, "col": 2 }, "6.0": { "line": 546, "col": 4 }, "6.1.1": { "line": 550, "col": 35 }, "6.1.2": { "line": 550, "col": 6 }, "6.1.3": { "line": 551, "col": 10 }, "6.1.4.0": { "line": 552, "col": 8 }, "6.1.4": { "line": 551, "col": 6 }, "6.1.5": { "line": 554, "col": 6 }, "6.1.6": { "line": 555, "col": 6 }, "6.1": { "line": 547, "col": 4 }, "6.2": { "line": 557, "col": 4 }, "6.3.0": { "line": 559, "col": 6 }, "6.3.1": { "line": 560, "col": 27 }, "6.3.2": { "line": 560, "col": 6 }, "6.3.3": { "line": 563, "col": 6 }, "6.3.4.0.0": { "line": 565, "col": 8 }, "6.3.4.0": { "line": 565, "col": 8 }, "6.3.4": { "line": 564, "col": 6 }, "6.3.5": { "line": 567, "col": 10 }, "6.3.6.0": { "line": 571, "col": 10 }, "6.3.6.1": { "line": 568, "col": 8 }, "6.3.6.2": { "line": 576, "col": 8 }, "6.3.6": { "line": 567, "col": 6 }, "6.3": { "line": 558, "col": 4 }, "6.4": { "line": 579, "col": 4 }, "6.5": { "line": 592, "col": 4 } } };
4485
4490
  export {
4486
4491
  __getCheckpoints,
4487
4492
  __invokeFunction,
@@ -109,7 +109,7 @@ function propagate() {
109
109
  function pass() {
110
110
  return { type: "pass" };
111
111
  }
112
- const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
112
+ const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
113
113
  const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
114
114
  const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
115
115
  const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
@@ -155,7 +155,7 @@ function registerTools(tools) {
155
155
  }
156
156
  }
157
157
  }
158
- __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.agency", "9a61565270b8a4ace0cae2a11e83c256b3750a95cac32d2b78358e14fd12ed2f", import.meta.url);
158
+ __registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.agency", "9215af84eb222720d89314971a1e4b15f3bfc00d98b38235ed3fb0f31ecbe6b3", import.meta.url);
159
159
  __registerTool(print);
160
160
  __registerTool(printJSON);
161
161
  __registerTool(input);
@@ -11,6 +11,7 @@
11
11
  * The docstring below is what the coordinator reads when deciding whether to
12
12
  * call this, so it is written for routing, not for the agent's own behavior.
13
13
  */
14
+ import { question } from "std::agent"
14
15
  import { oracleAgent as stdOracleAgent } from "std::agents/oracle"
15
16
 
16
17
  import { getSlowModel, getSlowProvider } from "../../../shared.agency"
@@ -56,6 +57,7 @@ export handoff def oracleAgent(
56
57
  maxTime: timeBudget(maxSeconds, 15m),
57
58
  model: getSlowModel(),
58
59
  provider: getSlowProvider(),
60
+ extraTools: [question],
59
61
  )
60
62
  }
61
63
  }