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.
- package/dist/lib/agents/agency-agent/agent.js +2 -2
- package/dist/lib/agents/agency-agent/brains/brain.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency +2 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.js +6 -4
- package/dist/lib/agents/agency-agent/brains/coordinator/learn.agency +1 -1
- package/dist/lib/agents/agency-agent/brains/coordinator/learn.js +3 -3
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/announce.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/bundledSkills.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/presetTools.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-large.md +11 -1
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-small.md +4 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/brainstorm.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency +4 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.js +11 -6
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.agency +2 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.js +8 -4
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.agency +2 -1
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.js +6 -4
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.agency +2 -1
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.js +11 -5
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/rewrite.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/supervisor.js +2 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/writing.js +2 -2
- package/dist/lib/agents/agency-agent/brains/registry.js +2 -2
- package/dist/lib/agents/agency-agent/brains/simple/simple.js +2 -2
- package/dist/lib/agents/agency-agent/images/images.js +2 -2
- package/dist/lib/agents/agency-agent/lib/agentName.js +2 -2
- package/dist/lib/agents/agency-agent/lib/agentSource.js +2 -2
- package/dist/lib/agents/agency-agent/lib/args.js +2 -2
- package/dist/lib/agents/agency-agent/lib/attachments.js +2 -2
- package/dist/lib/agents/agency-agent/lib/budget.js +2 -2
- package/dist/lib/agents/agency-agent/lib/capabilities.js +2 -2
- package/dist/lib/agents/agency-agent/lib/capabilitiesUi.js +2 -2
- package/dist/lib/agents/agency-agent/lib/commandPalette.js +2 -2
- package/dist/lib/agents/agency-agent/lib/config.js +2 -2
- package/dist/lib/agents/agency-agent/lib/grounding.js +2 -2
- package/dist/lib/agents/agency-agent/lib/header.js +2 -2
- package/dist/lib/agents/agency-agent/lib/images.js +2 -2
- package/dist/lib/agents/agency-agent/lib/learned.js +2 -2
- package/dist/lib/agents/agency-agent/lib/mcp.js +2 -2
- package/dist/lib/agents/agency-agent/lib/modelFilters.js +2 -2
- package/dist/lib/agents/agency-agent/lib/modelRequest.js +2 -2
- package/dist/lib/agents/agency-agent/lib/models.js +2 -2
- package/dist/lib/agents/agency-agent/lib/policy.js +2 -2
- package/dist/lib/agents/agency-agent/lib/presetRules.js +2 -2
- package/dist/lib/agents/agency-agent/lib/presets.js +2 -2
- package/dist/lib/agents/agency-agent/lib/projectContext.js +2 -2
- package/dist/lib/agents/agency-agent/lib/repl.js +2 -2
- package/dist/lib/agents/agency-agent/lib/resolution.js +2 -2
- package/dist/lib/agents/agency-agent/lib/resume.js +2 -2
- package/dist/lib/agents/agency-agent/lib/search.js +2 -2
- package/dist/lib/agents/agency-agent/lib/session.js +2 -2
- package/dist/lib/agents/agency-agent/lib/sessionTitle.js +2 -2
- package/dist/lib/agents/agency-agent/lib/sessions.js +2 -2
- package/dist/lib/agents/agency-agent/lib/settings.js +2 -2
- package/dist/lib/agents/agency-agent/lib/slashCommands/policy.js +2 -2
- package/dist/lib/agents/agency-agent/lib/slots.js +2 -2
- package/dist/lib/agents/agency-agent/lib/toolLimits.js +2 -2
- package/dist/lib/agents/agency-agent/lib/trace.js +2 -2
- package/dist/lib/agents/agency-agent/lib/transcript.js +2 -2
- package/dist/lib/agents/agency-agent/lib/turn.js +2 -2
- package/dist/lib/agents/agency-agent/lib/utils/renderLLMCallResponse.js +2 -2
- package/dist/lib/agents/agency-agent/lib/utils.js +2 -2
- package/dist/lib/agents/agency-agent/shared.js +2 -2
- package/dist/lib/agents/eval/goalJudge.js +2 -2
- package/dist/lib/agents/eval/judge.js +2 -2
- package/dist/lib/agents/eval/judgePairwise.js +2 -2
- package/dist/lib/agents/eval/rubricJudge.js +2 -2
- package/dist/lib/agents/optimize/gepaReflect.js +2 -2
- package/dist/lib/agents/optimize/mutatePrompt.js +2 -2
- package/dist/lib/agents/policy/agent.js +2 -2
- package/dist/lib/agents/review/agent.js +2 -2
- package/dist/lib/analysis/bodyFacts.d.ts +31 -0
- package/dist/lib/analysis/bodyFacts.js +57 -1
- package/dist/lib/analysis/effects.js +20 -12
- package/dist/lib/analysis/interrupts.d.ts +4 -0
- package/dist/lib/analysis/interrupts.js +28 -37
- package/dist/lib/backends/agencyGenerator.js +11 -2
- package/dist/lib/backends/typescriptBuilder/nodeWrapperParams.d.ts +14 -11
- package/dist/lib/backends/typescriptBuilder/nodeWrapperParams.js +40 -16
- package/dist/lib/backends/typescriptBuilder.d.ts +3 -0
- package/dist/lib/backends/typescriptBuilder.js +15 -7
- package/dist/lib/backends/typescriptGenerator/validationDescriptor.d.ts +5 -0
- package/dist/lib/backends/typescriptGenerator/validationDescriptor.js +7 -0
- package/dist/lib/cli/doc.js +4 -4
- package/dist/lib/cli/interrupts.js +6 -0
- package/dist/lib/cli/logsView.d.ts +10 -4
- package/dist/lib/cli/logsView.js +26 -4
- package/dist/lib/cli/remote/commands/logs.js +5 -1
- package/dist/lib/compilationUnit.d.ts +3 -1
- package/dist/lib/compilationUnit.js +32 -25
- package/dist/lib/compiler/compile.js +20 -67
- package/dist/lib/compiler/compileClosure.js +13 -0
- package/dist/lib/compiler/compileSandboxed.d.ts +3 -2
- package/dist/lib/compiler/compileValidatedClosure.d.ts +11 -2
- package/dist/lib/compiler/compileValidatedClosure.js +9 -7
- package/dist/lib/compiler/importCycle.d.ts +9 -0
- package/dist/lib/compiler/importCycle.js +57 -0
- package/dist/lib/compiler/initDepGraph.js +20 -1
- package/dist/lib/compiler/prepareProgram.d.ts +90 -0
- package/dist/lib/compiler/prepareProgram.js +200 -0
- package/dist/lib/compiler/splice/eligibility.d.ts +11 -0
- package/dist/lib/compiler/splice/eligibility.js +11 -0
- package/dist/lib/compiler/splice/runGenerator.js +19 -11
- package/dist/lib/compiler/typecheck.d.ts +5 -0
- package/dist/lib/compiler/typecheck.js +46 -48
- package/dist/lib/config/config.d.ts +2 -2
- package/dist/lib/eval/extract.js +4 -1
- package/dist/lib/eval/types.d.ts +8 -1
- package/dist/lib/importResolutionError.d.ts +3 -0
- package/dist/lib/importResolutionError.js +7 -3
- package/dist/lib/logsViewer/detailTarget.d.ts +4 -0
- package/dist/lib/logsViewer/detailTarget.js +15 -0
- package/dist/lib/logsViewer/escLadder.d.ts +18 -0
- package/dist/lib/logsViewer/escLadder.js +25 -0
- package/dist/lib/logsViewer/forest.d.ts +22 -0
- package/dist/lib/logsViewer/forest.js +79 -0
- package/dist/lib/logsViewer/format.d.ts +4 -0
- package/dist/lib/logsViewer/format.js +36 -0
- package/dist/lib/logsViewer/keymap.d.ts +5 -0
- package/dist/lib/logsViewer/keymap.js +5 -0
- package/dist/lib/logsViewer/messageDelta.d.ts +17 -0
- package/dist/lib/logsViewer/messageDelta.js +45 -0
- package/dist/lib/logsViewer/overviewData.d.ts +10 -0
- package/dist/lib/logsViewer/overviewData.js +14 -0
- package/dist/lib/logsViewer/payload.d.ts +33 -0
- package/dist/lib/logsViewer/payload.js +212 -0
- package/dist/lib/logsViewer/roundInputPayload.d.ts +5 -0
- package/dist/lib/logsViewer/roundInputPayload.js +62 -0
- package/dist/lib/logsViewer/run.d.ts +16 -1
- package/dist/lib/logsViewer/run.js +353 -132
- package/dist/lib/logsViewer/screenHost.d.ts +35 -0
- package/dist/lib/logsViewer/screenHost.js +103 -0
- package/dist/lib/logsViewer/screens/charts.d.ts +12 -0
- package/dist/lib/logsViewer/screens/charts.js +54 -0
- package/dist/lib/logsViewer/screens/chrome.d.ts +19 -0
- package/dist/lib/logsViewer/screens/chrome.js +59 -0
- package/dist/lib/logsViewer/screens/lineNumbers.d.ts +7 -0
- package/dist/lib/logsViewer/screens/lineNumbers.js +26 -0
- package/dist/lib/logsViewer/screens/overviewCharts.d.ts +7 -0
- package/dist/lib/logsViewer/screens/overviewCharts.js +151 -0
- package/dist/lib/logsViewer/screens/overviewScreen.d.ts +48 -0
- package/dist/lib/logsViewer/screens/overviewScreen.js +338 -0
- package/dist/lib/logsViewer/screens/payloadPaint.d.ts +3 -0
- package/dist/lib/logsViewer/screens/payloadPaint.js +60 -0
- package/dist/lib/logsViewer/screens/screen.d.ts +12 -0
- package/dist/lib/logsViewer/screens/screen.js +6 -0
- package/dist/lib/logsViewer/{views/flameView.d.ts → screens/timelineScreen.d.ts} +34 -8
- package/dist/lib/logsViewer/screens/timelineScreen.js +586 -0
- package/dist/lib/logsViewer/screens/tracePicker.d.ts +43 -0
- package/dist/lib/logsViewer/screens/tracePicker.js +254 -0
- package/dist/lib/logsViewer/screens/traceScreen.d.ts +74 -0
- package/dist/lib/logsViewer/screens/traceScreen.js +697 -0
- package/dist/lib/logsViewer/screens/transcriptScreen.d.ts +49 -0
- package/dist/lib/logsViewer/screens/transcriptScreen.js +355 -0
- package/dist/lib/logsViewer/spanText.d.ts +4 -4
- package/dist/lib/logsViewer/spanText.js +24 -21
- package/dist/lib/logsViewer/story.d.ts +87 -0
- package/dist/lib/logsViewer/story.js +297 -0
- package/dist/lib/logsViewer/storyFixture.d.ts +5 -0
- package/dist/lib/logsViewer/storyFixture.js +65 -0
- package/dist/lib/logsViewer/structured.d.ts +7 -0
- package/dist/lib/logsViewer/structured.js +33 -0
- package/dist/lib/logsViewer/summary.d.ts +0 -3
- package/dist/lib/logsViewer/summary.js +3 -41
- package/dist/lib/logsViewer/theme.d.ts +28 -0
- package/dist/lib/logsViewer/theme.js +44 -0
- package/dist/lib/logsViewer/thresholds.js +4 -4
- package/dist/lib/logsViewer/timeline/groups.d.ts +9 -8
- package/dist/lib/logsViewer/timeline/groups.js +50 -53
- package/dist/lib/logsViewer/timeline/rounds.d.ts +37 -0
- package/dist/lib/logsViewer/timeline/rounds.js +82 -0
- package/dist/lib/logsViewer/timeline/rows.d.ts +19 -0
- package/dist/lib/logsViewer/timeline/rows.js +98 -0
- package/dist/lib/logsViewer/timeline/spans.d.ts +3 -0
- package/dist/lib/logsViewer/timeline/spans.js +40 -22
- package/dist/lib/logsViewer/traceFixture.d.ts +8 -0
- package/dist/lib/logsViewer/traceFixture.js +35 -0
- package/dist/lib/logsViewer/traceSearch.d.ts +22 -0
- package/dist/lib/logsViewer/traceSearch.js +60 -0
- package/dist/lib/logsViewer/traceSummaries.d.ts +13 -0
- package/dist/lib/logsViewer/traceSummaries.js +24 -0
- package/dist/lib/logsViewer/transcript.d.ts +41 -0
- package/dist/lib/logsViewer/transcript.js +227 -0
- package/dist/lib/logsViewer/transcriptPayload.d.ts +3 -0
- package/dist/lib/logsViewer/transcriptPayload.js +81 -0
- package/dist/lib/logsViewer/tree.js +6 -19
- package/dist/lib/logsViewer/types.d.ts +1 -15
- package/dist/lib/logsViewer/views/detailScreen.d.ts +13 -9
- package/dist/lib/logsViewer/views/detailScreen.js +82 -130
- package/dist/lib/logsViewer/views/occurrencesView.d.ts +6 -1
- package/dist/lib/logsViewer/views/occurrencesView.js +70 -58
- package/dist/lib/logsViewer/views/shared.d.ts +1 -5
- package/dist/lib/logsViewer/views/shared.js +7 -11
- package/dist/lib/logsViewer/views/view.d.ts +15 -13
- package/dist/lib/logsViewer/views/view.js +6 -5
- package/dist/lib/lsp/builtinHover.js +3 -0
- package/dist/lib/lsp/diagnostics.js +62 -180
- package/dist/lib/parser.js +32 -15
- package/dist/lib/parsers/messages.d.ts +7 -1
- package/dist/lib/parsers/messages.js +18 -1
- package/dist/lib/parsers/parsers.d.ts +15 -0
- package/dist/lib/parsers/parsers.js +185 -44
- package/dist/lib/parsers/reservedNames.cases.d.ts +6 -0
- package/dist/lib/parsers/reservedNames.cases.js +53 -0
- package/dist/lib/parsers/vitest.setup.js +2 -2
- package/dist/lib/preprocessors/expandSplices.js +26 -1
- package/dist/lib/preprocessors/hoistCalls.d.ts +7 -3
- package/dist/lib/preprocessors/hoistCalls.js +38 -20
- package/dist/lib/preprocessors/hoistPositions.d.ts +33 -0
- package/dist/lib/preprocessors/hoistPositions.js +93 -0
- package/dist/lib/preprocessors/importResolver.d.ts +1 -0
- package/dist/lib/preprocessors/importResolver.js +25 -4
- package/dist/lib/preprocessors/liftCallbacks.d.ts +16 -0
- package/dist/lib/preprocessors/liftCallbacks.js +63 -52
- package/dist/lib/preprocessors/typescriptPreprocessor.js +16 -1
- package/dist/lib/reservedNames.d.ts +10 -0
- package/dist/lib/reservedNames.js +22 -0
- package/dist/lib/runDirectory/annotations.d.ts +1 -1
- package/dist/lib/runsExplorer/run.d.ts +2 -0
- package/dist/lib/runsExplorer/run.js +1 -0
- package/dist/lib/runtime/abortedResult.d.ts +4 -0
- package/dist/lib/runtime/abortedResult.js +8 -0
- package/dist/lib/runtime/prompt.js +2 -0
- package/dist/lib/runtime/state/messageThread.d.ts +1 -0
- package/dist/lib/runtime/state/messageThread.js +4 -0
- package/dist/lib/runtime/state/schemas.d.ts +6 -0
- package/dist/lib/runtime/state/schemas.js +1 -0
- package/dist/lib/runtime/template/fill.js +6 -0
- package/dist/lib/runtime/template/hygiene.d.ts +2 -1
- package/dist/lib/runtime/template/hygiene.js +4 -2
- package/dist/lib/runtime/threadRepair.js +5 -0
- package/dist/lib/statelog/wireAccessors.d.ts +37 -4
- package/dist/lib/statelog/wireAccessors.js +130 -9
- package/dist/lib/statelogClient.d.ts +5 -1
- package/dist/lib/statelogClient.js +3 -1
- package/dist/lib/stdlib/agency.d.ts +2 -2
- package/dist/lib/stdlib/agency.js +59 -7
- package/dist/lib/stdlib/cli.d.ts +5 -1
- package/dist/lib/stdlib/cli.js +5 -3
- package/dist/lib/stdlib/skills.d.ts +6 -0
- package/dist/lib/stdlib/skills.js +8 -0
- package/dist/lib/stdlib/speech.d.ts +1 -1
- package/dist/lib/stdlib/speech.js +3 -1
- package/dist/lib/symbolTable.d.ts +6 -0
- package/dist/lib/symbolTable.js +12 -0
- package/dist/lib/templates/backends/typescriptGenerator/finalizeClosure.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/finalizeClosure.js +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/imports.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/imports.js +2 -2
- package/dist/lib/tui/index.d.ts +2 -0
- package/dist/lib/tui/index.js +2 -0
- package/dist/lib/tui/input/terminal.js +5 -0
- package/dist/lib/tui/keymap.d.ts +25 -0
- package/dist/lib/tui/keymap.js +45 -0
- package/dist/lib/tui/paint.d.ts +38 -0
- package/dist/lib/tui/paint.js +108 -0
- package/dist/lib/tui/table.d.ts +5 -4
- package/dist/lib/tui/table.js +15 -24
- package/dist/lib/typeChecker/castPositions.d.ts +2 -0
- package/dist/lib/typeChecker/castPositions.js +53 -0
- package/dist/lib/typeChecker/castTestUtils.d.ts +6 -0
- package/dist/lib/typeChecker/castTestUtils.js +10 -0
- package/dist/lib/typeChecker/checker.d.ts +0 -2
- package/dist/lib/typeChecker/checker.js +2 -9
- package/dist/lib/typeChecker/diagnosticExplanations.js +44 -1
- package/dist/lib/typeChecker/diagnostics.d.ts +56 -1
- package/dist/lib/typeChecker/diagnostics.js +56 -1
- package/dist/lib/typeChecker/flow.js +2 -42
- package/dist/lib/typeChecker/index.d.ts +1 -0
- package/dist/lib/typeChecker/index.js +5 -1
- package/dist/lib/typeChecker/interruptAnalysis.js +48 -23
- package/dist/lib/typeChecker/nameReferences.d.ts +5 -0
- package/dist/lib/typeChecker/nameReferences.js +5 -4
- package/dist/lib/typeChecker/narrowing.d.ts +6 -2
- package/dist/lib/typeChecker/narrowing.js +38 -15
- package/dist/lib/typeChecker/resolveCall.d.ts +5 -1
- package/dist/lib/typeChecker/resolveCall.js +4 -0
- package/dist/lib/typeChecker/resolvePath.d.ts +12 -0
- package/dist/lib/typeChecker/resolvePath.js +44 -0
- package/dist/lib/typeChecker/sandboxNameCheck.js +9 -0
- package/dist/lib/typeChecker/scope.d.ts +9 -0
- package/dist/lib/typeChecker/scope.js +22 -0
- package/dist/lib/typeChecker/scopes.js +18 -2
- package/dist/lib/typeChecker/staticInitRules.d.ts +19 -0
- package/dist/lib/typeChecker/staticInitRules.js +50 -5
- package/dist/lib/typeChecker/synthesizer.js +80 -7
- package/dist/lib/typeChecker/templateNames.js +9 -1
- package/dist/lib/typeChecker/toolBlockBinding.d.ts +12 -1
- package/dist/lib/typeChecker/toolBlockBinding.js +10 -6
- package/dist/lib/typeChecker/toolElementTypes.d.ts +4 -0
- package/dist/lib/typeChecker/toolElementTypes.js +55 -0
- package/dist/lib/typeChecker/undefinedVariableDiagnostic.d.ts +3 -0
- package/dist/lib/typeChecker/undefinedVariableDiagnostic.js +6 -0
- package/dist/lib/typeChecker/validateStaticInit.d.ts +2 -1
- package/dist/lib/typeChecker/validateStaticInit.js +4 -2
- package/dist/lib/typeChecker/valueArgReferences.js +2 -0
- package/dist/lib/types/binop.d.ts +3 -0
- package/dist/lib/types/binop.js +7 -0
- package/dist/lib/types/castExpression.d.ts +13 -0
- package/dist/lib/types/castExpression.js +1 -0
- package/dist/lib/types/function.d.ts +4 -1
- package/dist/lib/types.d.ts +4 -2
- package/dist/lib/types.js +2 -0
- package/dist/lib/utils/expressionSlots.js +4 -0
- package/dist/lib/utils/findReservedName.d.ts +5 -0
- package/dist/lib/utils/findReservedName.js +88 -0
- package/dist/lib/utils/identifierSlots.js +8 -5
- package/dist/lib/utils/moduleDoc.d.ts +12 -0
- package/dist/lib/utils/moduleDoc.js +22 -1
- package/dist/lib/utils/node.js +34 -0
- package/dist/lib/utils/topLevel.js +1 -0
- package/dist/scripts/agency.js +52 -23
- package/package.json +2 -1
- package/stdlib/agency/eval.js +2 -2
- package/stdlib/agency/local.js +2 -2
- package/stdlib/agency.agency +10 -4
- package/stdlib/agency.js +45 -14
- package/stdlib/agent.agency +4 -1
- package/stdlib/agent.js +7 -4
- package/stdlib/agents/agency/coding.agency +84 -28
- package/stdlib/agents/agency/coding.js +796 -128
- package/stdlib/agents/agency/expert.js +3 -3
- package/stdlib/agents/agency/researcher.js +3 -3
- package/stdlib/agents/agency/review.agency +12 -5
- package/stdlib/agents/agency/review.js +90 -39
- package/stdlib/agents/agency/verifier.js +3 -3
- package/stdlib/agents/coding.agency +2 -1
- package/stdlib/agents/coding.js +7 -6
- package/stdlib/agents/composable/promptRewriter.js +2 -2
- package/stdlib/agents/composable/researcher.js +2 -2
- package/stdlib/agents/composable/utils.js +2 -2
- package/stdlib/agents/data.agency +2 -2
- package/stdlib/agents/data.js +6 -5
- package/stdlib/agents/expert.js +3 -3
- package/stdlib/agents/explorer.agency +7 -5
- package/stdlib/agents/explorer.js +12 -10
- package/stdlib/agents/lib/expertGuidance.js +2 -2
- package/stdlib/agents/lib/feedback.js +2 -2
- package/stdlib/agents/lib/search.js +2 -2
- package/stdlib/agents/lib/shared.js +2 -2
- package/stdlib/agents/lib/toolkits.agency +51 -9
- package/stdlib/agents/lib/toolkits.js +225 -17
- package/stdlib/agents/oracle.js +3 -3
- package/stdlib/agents/planner.agency +2 -2
- package/stdlib/agents/planner.js +5 -4
- package/stdlib/agents/prompts/agency-tutorial.md +1201 -0
- package/stdlib/agents/researcher.agency +3 -3
- package/stdlib/agents/researcher.js +7 -6
- package/stdlib/agents/review.agency +2 -2
- package/stdlib/agents/review.js +6 -5
- package/stdlib/agents/typescript/review.agency +2 -1
- package/stdlib/agents/typescript/review.js +7 -6
- package/stdlib/agents/verifier.agency +2 -2
- package/stdlib/agents/verifier.js +5 -4
- package/stdlib/agents/writing/review.agency +2 -1
- package/stdlib/agents/writing/review.js +7 -6
- package/stdlib/agents/writing/rewrite.js +2 -2
- package/stdlib/args.js +2 -2
- package/stdlib/array.js +2 -2
- package/stdlib/auth/keyring.js +2 -2
- package/stdlib/auth/oauth.js +2 -2
- package/stdlib/aws/s3.js +2 -2
- package/stdlib/calendar.js +2 -2
- package/stdlib/capabilities.js +2 -2
- package/stdlib/clipboard.js +2 -2
- package/stdlib/concurrency.js +2 -2
- package/stdlib/data/connector.js +2 -2
- package/stdlib/data/finance/dbnomics.js +2 -2
- package/stdlib/data/finance/edgar.js +2 -2
- package/stdlib/data/finance/fred.js +2 -2
- package/stdlib/data/news/gdelt.js +2 -2
- package/stdlib/data/people/littlesis.js +2 -2
- package/stdlib/data/social/bluesky.js +2 -2
- package/stdlib/data/tech/hackernews.js +2 -2
- package/stdlib/data/tech/yc.js +2 -2
- package/stdlib/data/usaspending.js +2 -2
- package/stdlib/data/wikidata.js +2 -2
- package/stdlib/date.js +2 -2
- package/stdlib/docs/diagnostics/index.md +12 -1
- package/stdlib/docs/diagnostics/names.md +12 -0
- package/stdlib/docs/diagnostics/static-init.md +12 -0
- package/stdlib/docs/diagnostics/templates.md +16 -2
- package/stdlib/docs/diagnostics/tools.md +12 -0
- package/stdlib/docs/diagnostics/types-aliases.md +70 -0
- package/stdlib/docs/guide/interrupts-from-typescript.md +9 -0
- package/stdlib/docs/guide/observability.md +101 -49
- package/stdlib/docs/stdlib/agency.md +51 -43
- package/stdlib/docs/stdlib/agent.md +4 -1
- package/stdlib/docs/stdlib/agents/agency/coding.md +21 -2
- package/stdlib/docs/stdlib/agents/agency/review.md +3 -0
- package/stdlib/docs/stdlib/agents/coding.md +2 -2
- package/stdlib/docs/stdlib/agents/explorer.md +4 -4
- package/stdlib/docs/stdlib/agents/lib/toolkits.md +46 -16
- package/stdlib/docs/stdlib/agents/oracle.md +2 -2
- package/stdlib/docs/stdlib/agents/typescript/review.md +3 -3
- package/stdlib/docs/stdlib/agents/writing/review.md +3 -3
- package/stdlib/docs/stdlib/agents/writing/rewrite.md +13 -13
- package/stdlib/docs/stdlib/fs.md +4 -4
- package/stdlib/docs/stdlib/llm.md +3 -3
- package/stdlib/docs/stdlib/math.md +9 -8
- package/stdlib/docs/stdlib/memory.md +24 -24
- package/stdlib/docs/stdlib/policy.md +228 -228
- package/stdlib/docs/stdlib/safeBash/actions.md +9 -9
- package/stdlib/docs/stdlib/safeBash.md +5 -5
- package/stdlib/docs/stdlib/shell.md +6 -6
- package/stdlib/docs/stdlib/skills.md +97 -27
- package/stdlib/docs/stdlib/speech.md +19 -15
- package/stdlib/docs/stdlib/statelog.md +14 -14
- package/stdlib/docs/stdlib/syntax.md +12 -12
- package/stdlib/docs/stdlib/thread.md +13 -13
- package/stdlib/docs/stdlib/toolbox.md +23 -20
- package/stdlib/docs/stdlib/ui/cli.md +7 -4
- package/stdlib/docs/stdlib/ui/layout.md +5 -5
- package/stdlib/docs/stdlib/ui/table.md +16 -16
- package/stdlib/docs/stdlib/ui.md +93 -93
- package/stdlib/embedding.js +2 -2
- package/stdlib/fs.js +2 -2
- package/stdlib/git.js +2 -2
- package/stdlib/github.js +2 -2
- package/stdlib/http.js +2 -2
- package/stdlib/image.js +2 -2
- package/stdlib/index.js +2 -2
- package/stdlib/llm.js +2 -2
- package/stdlib/markdown.js +2 -2
- package/stdlib/math.agency +4 -3
- package/stdlib/math.js +11 -9
- package/stdlib/mcp.js +2 -2
- package/stdlib/memory.js +2 -2
- package/stdlib/messaging/email.js +2 -2
- package/stdlib/messaging/imessage.js +2 -2
- package/stdlib/messaging/sms.js +2 -2
- package/stdlib/notes/apple.js +2 -2
- package/stdlib/object.js +2 -2
- package/stdlib/ocr.js +2 -2
- package/stdlib/path.js +2 -2
- package/stdlib/policy.agency +36 -8
- package/stdlib/policy.js +268 -16
- package/stdlib/safeBash/actions.js +2 -2
- package/stdlib/safeBash.js +2 -2
- package/stdlib/shell.js +2 -2
- package/stdlib/skills.agency +88 -20
- package/stdlib/skills.js +973 -156
- package/stdlib/speech.agency +5 -0
- package/stdlib/speech.js +23 -8
- package/stdlib/spill.js +2 -2
- package/stdlib/statelog.js +2 -2
- package/stdlib/strategy.js +2 -2
- package/stdlib/supervise.js +2 -2
- package/stdlib/syntax.js +2 -2
- package/stdlib/system.js +2 -2
- package/stdlib/tag.js +2 -2
- package/stdlib/thread.js +2 -2
- package/stdlib/toolbox.agency +220 -45
- package/stdlib/toolbox.js +1830 -694
- package/stdlib/ui/chart.js +2 -2
- package/stdlib/ui/cli.agency +3 -1
- package/stdlib/ui/cli.js +22 -8
- package/stdlib/ui/layout.js +2 -2
- package/stdlib/ui/table.js +2 -2
- package/stdlib/ui.js +2 -2
- package/stdlib/validation.js +2 -2
- package/stdlib/weather.js +2 -2
- package/stdlib/web/browser.js +2 -2
- package/stdlib/web/search.js +2 -2
- package/stdlib/wikipedia.js +2 -2
- package/dist/lib/logsViewer/conversation.d.ts +0 -22
- package/dist/lib/logsViewer/conversation.js +0 -147
- package/dist/lib/logsViewer/help.d.ts +0 -9
- package/dist/lib/logsViewer/help.js +0 -62
- package/dist/lib/logsViewer/search.d.ts +0 -8
- package/dist/lib/logsViewer/search.js +0 -167
- package/dist/lib/logsViewer/treeRows.d.ts +0 -23
- package/dist/lib/logsViewer/treeRows.js +0 -400
- package/dist/lib/logsViewer/views/byNameView.d.ts +0 -49
- package/dist/lib/logsViewer/views/byNameView.js +0 -284
- package/dist/lib/logsViewer/views/flameView.js +0 -389
- package/dist/lib/logsViewer/views/treeReducer.d.ts +0 -15
- package/dist/lib/logsViewer/views/treeReducer.js +0 -229
- package/dist/lib/logsViewer/views/treeView.d.ts +0 -50
- 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", "
|
|
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", "
|
|
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", "
|
|
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":
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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":
|
|
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", "
|
|
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
|
}
|