agency-lang 0.18.1 → 0.19.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.agency +1 -1
- package/dist/lib/agents/agency-agent/agent.js +12 -15
- package/dist/lib/agents/agency-agent/brains/brain.js +3 -3
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency +2 -1
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.js +63 -89
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/announce.js +16 -22
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.js +31 -42
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.js +9 -9
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-large.md +3 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-small.md +2 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/brainstorm.js +46 -67
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency +1 -1
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.js +118 -171
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.js +10 -13
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.js +10 -13
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.js +10 -13
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.js +40 -58
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/rewrite.js +16 -22
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/supervisor.js +82 -121
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/writing.js +10 -13
- package/dist/lib/agents/agency-agent/brains/registry.js +16 -22
- package/dist/lib/agents/agency-agent/brains/simple/simple.js +22 -31
- package/dist/lib/agents/agency-agent/images/images.js +3 -3
- package/dist/lib/agents/agency-agent/lib/agentName.js +10 -13
- package/dist/lib/agents/agency-agent/lib/args.agency +1 -1
- package/dist/lib/agents/agency-agent/lib/args.js +17 -23
- package/dist/lib/agents/agency-agent/lib/attachments.js +16 -22
- package/dist/lib/agents/agency-agent/lib/budget.js +10 -13
- package/dist/lib/agents/agency-agent/lib/capabilities.agency +4 -0
- package/dist/lib/agents/agency-agent/lib/capabilities.js +74 -104
- package/dist/lib/agents/agency-agent/lib/capabilitiesUi.js +58 -85
- package/dist/lib/agents/agency-agent/lib/commandPalette.js +16 -22
- package/dist/lib/agents/agency-agent/lib/config.js +10 -13
- package/dist/lib/agents/agency-agent/lib/grounding.js +16 -22
- package/dist/lib/agents/agency-agent/lib/header.js +46 -67
- package/dist/lib/agents/agency-agent/lib/images.agency +19 -1
- package/dist/lib/agents/agency-agent/lib/images.js +192 -25
- package/dist/lib/agents/agency-agent/lib/mcp.js +40 -58
- package/dist/lib/agents/agency-agent/lib/modelFilters.js +10 -13
- package/dist/lib/agents/agency-agent/lib/models.js +69 -98
- package/dist/lib/agents/agency-agent/lib/policy.agency +3 -3
- package/dist/lib/agents/agency-agent/lib/policy.js +57 -72
- package/dist/lib/agents/agency-agent/lib/projectContext.js +16 -22
- package/dist/lib/agents/agency-agent/lib/repl.agency +2 -4
- package/dist/lib/agents/agency-agent/lib/repl.js +85 -124
- package/dist/lib/agents/agency-agent/lib/resolution.js +46 -67
- package/dist/lib/agents/agency-agent/lib/resume.js +52 -76
- package/dist/lib/agents/agency-agent/lib/search.js +100 -148
- package/dist/lib/agents/agency-agent/lib/session.js +46 -67
- package/dist/lib/agents/agency-agent/lib/sessionTitle.js +35 -49
- package/dist/lib/agents/agency-agent/lib/sessions.js +65 -94
- package/dist/lib/agents/agency-agent/lib/settings.js +40 -58
- package/dist/lib/agents/agency-agent/lib/slots.js +22 -31
- package/dist/lib/agents/agency-agent/lib/trace.js +76 -112
- package/dist/lib/agents/agency-agent/lib/transcript.js +22 -31
- package/dist/lib/agents/agency-agent/lib/turn.js +70 -103
- package/dist/lib/agents/agency-agent/lib/utils/renderLLMCallResponse.js +10 -13
- package/dist/lib/agents/agency-agent/lib/utils.js +52 -76
- package/dist/lib/agents/agency-agent/shared.agency +33 -5
- package/dist/lib/agents/agency-agent/shared.js +306 -241
- package/dist/lib/agents/eval/goalJudge.js +5 -5
- package/dist/lib/agents/eval/judge.js +5 -5
- package/dist/lib/agents/eval/judgePairwise.js +5 -5
- package/dist/lib/agents/eval/rubricJudge.js +5 -5
- package/dist/lib/agents/optimize/gepaReflect.js +5 -5
- package/dist/lib/agents/optimize/mutatePrompt.js +5 -5
- package/dist/lib/agents/policy/agent.js +60 -86
- package/dist/lib/agents/review/agent.js +6 -6
- package/dist/lib/backends/typescriptBuilder.js +18 -3
- package/dist/lib/backends/typescriptGenerator/typeToString.js +8 -6
- package/dist/lib/backends/typescriptGenerator/typeToZodSchema.d.ts +1 -1
- package/dist/lib/backends/typescriptGenerator/typeToZodSchema.js +7 -2
- package/dist/lib/backends/typescriptGenerator/validationDescriptor.js +27 -14
- package/dist/lib/cli/local.d.ts +16 -1
- package/dist/lib/cli/local.js +178 -10
- package/dist/lib/cli/localFlag.d.ts +4 -3
- package/dist/lib/cli/localFlag.js +11 -4
- package/dist/lib/cli/localServe.d.ts +111 -0
- package/dist/lib/cli/localServe.js +380 -0
- package/dist/lib/cli/mlxServer.d.ts +23 -0
- package/dist/lib/cli/mlxServer.js +164 -0
- package/dist/lib/cli/precompile.js +5 -1
- package/dist/lib/cli/serveLog.d.ts +59 -0
- package/dist/lib/cli/serveLog.js +174 -0
- package/dist/lib/cli/test.d.ts +3 -0
- package/dist/lib/cli/test.js +22 -2
- package/dist/lib/compiler/initDepGraph.d.ts +5 -0
- package/dist/lib/compiler/initDepGraph.js +56 -4
- package/dist/lib/config.d.ts +24 -0
- package/dist/lib/config.js +8 -0
- package/dist/lib/importPaths.js +17 -1
- package/dist/lib/importResolutionError.d.ts +21 -0
- package/dist/lib/importResolutionError.js +32 -0
- package/dist/lib/parsers/parsers.js +9 -9
- package/dist/lib/preprocessors/importResolver.d.ts +2 -12
- package/dist/lib/preprocessors/importResolver.js +13 -16
- package/dist/lib/runtime/agencyFunction.js +4 -2
- package/dist/lib/runtime/builtinPolicies.js +14 -0
- package/dist/lib/runtime/call.js +2 -2
- package/dist/lib/runtime/index.d.ts +2 -2
- package/dist/lib/runtime/index.js +2 -2
- package/dist/lib/runtime/interruptResponse.d.ts +2 -2
- package/dist/lib/runtime/interruptResponse.js +2 -2
- package/dist/lib/runtime/ipc.js +1 -2
- package/dist/lib/runtime/llmRetry.js +1 -1
- package/dist/lib/runtime/prompt.d.ts +0 -6
- package/dist/lib/runtime/prompt.js +19 -28
- package/dist/lib/runtime/result.d.ts +24 -2
- package/dist/lib/runtime/result.js +82 -6
- package/dist/lib/runtime/toolBlockDiagnostics.d.ts +1 -1
- package/dist/lib/runtime/toolBlockDiagnostics.js +4 -4
- package/dist/lib/runtime/validateChain.d.ts +7 -0
- package/dist/lib/runtime/validateChain.js +28 -2
- package/dist/lib/statelogClient.d.ts +1 -1
- package/dist/lib/stdlib/agency.d.ts +3 -3
- package/dist/lib/stdlib/agency.js +7 -7
- package/dist/lib/stdlib/approvedPath.d.ts +13 -0
- package/dist/lib/stdlib/approvedPath.js +26 -0
- package/dist/lib/stdlib/aws/client.js +1 -3
- package/dist/lib/stdlib/aws/credentials.js +2 -4
- package/dist/lib/stdlib/aws/endpoints.js +3 -7
- package/dist/lib/stdlib/aws/errors.js +1 -2
- package/dist/lib/stdlib/aws/s3.js +5 -11
- package/dist/lib/stdlib/contained.d.ts +13 -1
- package/dist/lib/stdlib/contained.js +35 -5
- package/dist/lib/stdlib/http.js +1 -2
- package/dist/lib/stdlib/hubClient.d.ts +75 -0
- package/dist/lib/stdlib/hubClient.js +223 -0
- package/dist/lib/stdlib/hubDownload.d.ts +47 -0
- package/dist/lib/stdlib/hubDownload.js +384 -0
- package/dist/lib/stdlib/localModels.d.ts +74 -54
- package/dist/lib/stdlib/localModels.js +372 -340
- package/dist/lib/stdlib/mcp.js +1 -1
- package/dist/lib/stdlib/mlxModelRecord.d.ts +26 -0
- package/dist/lib/stdlib/mlxModelRecord.js +60 -0
- package/dist/lib/stdlib/mlxServerModels.d.ts +10 -0
- package/dist/lib/stdlib/mlxServerModels.js +32 -0
- package/dist/lib/stdlib/modelBackend.d.ts +46 -0
- package/dist/lib/stdlib/modelBackend.js +184 -0
- package/dist/lib/stdlib/modelCatalog.d.ts +43 -0
- package/dist/lib/stdlib/modelCatalog.js +380 -0
- package/dist/lib/stdlib/modelVerify.d.ts +9 -0
- package/dist/lib/stdlib/modelVerify.js +55 -0
- package/dist/lib/stdlib/objectBytes.js +2 -4
- package/dist/lib/stdlib/ocr.d.ts +33 -0
- package/dist/lib/stdlib/ocr.js +106 -0
- package/dist/lib/stdlib/thread.d.ts +9 -0
- package/dist/lib/stdlib/thread.js +36 -1
- package/dist/lib/stdlib/threads.js +1 -1
- package/dist/lib/stdlib/visionOcr.jxa +50 -0
- package/dist/lib/symbolTable.js +30 -14
- package/dist/lib/templates/backends/typescriptGenerator/functionCatchFailure.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/functionCatchFailure.js +6 -9
- package/dist/lib/templates/backends/typescriptGenerator/imports.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/imports.js +3 -3
- package/dist/lib/templates/backends/typescriptGenerator/interruptAssignment.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/interruptAssignment.js +4 -4
- package/dist/lib/templates/backends/typescriptGenerator/interruptReturn.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/interruptReturn.js +4 -4
- package/dist/lib/testFormat/schema.d.ts +15 -0
- package/dist/lib/testFormat/schema.js +10 -0
- package/dist/lib/typeChecker/assignability.js +2 -2
- package/dist/lib/typeChecker/builtinGenerics.d.ts +12 -0
- package/dist/lib/typeChecker/builtinGenerics.js +4 -2
- package/dist/lib/typeChecker/builtins.js +17 -2
- package/dist/lib/typeChecker/dataShape.d.ts +10 -0
- package/dist/lib/typeChecker/dataShape.js +21 -0
- package/dist/lib/typeChecker/diagnosticExplanations.js +64 -0
- package/dist/lib/typeChecker/diagnostics.d.ts +37 -2
- package/dist/lib/typeChecker/diagnostics.js +37 -2
- package/dist/lib/typeChecker/flowBuilder.d.ts +7 -5
- package/dist/lib/typeChecker/flowBuilder.js +76 -23
- package/dist/lib/typeChecker/index.js +8 -0
- package/dist/lib/typeChecker/inference.js +1 -1
- package/dist/lib/typeChecker/paramRedeclaration.d.ts +15 -0
- package/dist/lib/typeChecker/paramRedeclaration.js +38 -0
- package/dist/lib/typeChecker/resultUnion.js +18 -2
- package/dist/lib/typeChecker/scopes.js +8 -1
- package/dist/lib/typeChecker/staticInitRules.d.ts +8 -1
- package/dist/lib/typeChecker/staticInitRules.js +16 -0
- package/dist/lib/typeChecker/synthesizer.js +37 -7
- package/dist/lib/typeChecker/typeKey.js +1 -1
- package/dist/lib/typeChecker/typeWalker.js +2 -2
- package/dist/lib/typeChecker/utils.d.ts +1 -1
- package/dist/lib/typeChecker/utils.js +41 -2
- package/dist/lib/typeChecker/validate.d.ts +5 -0
- package/dist/lib/typeChecker/validate.js +14 -0
- package/dist/lib/typeChecker/validateStaticInit.js +5 -10
- package/dist/lib/typeChecker/validation.d.ts +4 -3
- package/dist/lib/typeChecker/validation.js +6 -5
- package/dist/lib/typeChecker/valueArgReferences.d.ts +17 -0
- package/dist/lib/typeChecker/valueArgReferences.js +215 -0
- package/dist/lib/typeChecker/valueParamSubstitution.js +2 -2
- package/dist/lib/types/typeHints.d.ts +3 -1
- package/dist/lib/utils/formatType.js +8 -4
- package/dist/lib/utils/termcolors.d.ts +7 -1
- package/dist/lib/utils/termcolors.js +6 -0
- package/dist/scripts/agency.js +94 -9
- package/package.json +2 -2
- package/stdlib/agency/eval.js +22 -31
- package/stdlib/agency/local.agency +73 -16
- package/stdlib/agency/local.js +619 -126
- package/stdlib/agency.agency +34 -27
- package/stdlib/agency.js +411 -800
- package/stdlib/agent.js +36 -51
- package/stdlib/agents/agency/coding.agency +5 -4
- package/stdlib/agents/agency/coding.js +66 -82
- package/stdlib/agents/agency/expert.js +22 -31
- package/stdlib/agents/agency/researcher.js +22 -31
- package/stdlib/agents/agency/review.js +41 -58
- package/stdlib/agents/agency/verifier.js +28 -40
- package/stdlib/agents/coding.agency +2 -0
- package/stdlib/agents/coding.js +47 -40
- package/stdlib/agents/composable/promptRewriter.js +10 -13
- package/stdlib/agents/composable/researcher.js +16 -22
- package/stdlib/agents/composable/utils.js +12 -15
- package/stdlib/agents/data.js +22 -31
- package/stdlib/agents/expert.js +22 -31
- package/stdlib/agents/explorer.js +22 -31
- package/stdlib/agents/lib/expertGuidance.js +17 -23
- package/stdlib/agents/lib/feedback.js +45 -63
- package/stdlib/agents/lib/search.js +34 -49
- package/stdlib/agents/lib/shared.js +22 -31
- package/stdlib/agents/lib/toolkits.agency +64 -0
- package/stdlib/agents/lib/toolkits.js +320 -113
- package/stdlib/agents/oracle.js +22 -31
- package/stdlib/agents/planner.agency +2 -2
- package/stdlib/agents/planner.js +97 -145
- package/stdlib/agents/researcher.js +35 -49
- package/stdlib/agents/review.agency +4 -3
- package/stdlib/agents/review.js +45 -37
- package/stdlib/agents/skills/coding/gh-pr-and-issues.md +100 -93
- package/stdlib/agents/skills/coding/gh-repos-and-releases.md +2 -2
- package/stdlib/agents/typescript/review.js +23 -31
- package/stdlib/agents/verifier.js +29 -41
- package/stdlib/agents/writing/review.js +59 -85
- package/stdlib/agents/writing/rewrite.js +18 -23
- package/stdlib/args.js +10 -13
- package/stdlib/array.js +82 -121
- package/stdlib/auth/keyring.js +34 -46
- package/stdlib/auth/oauth.js +34 -46
- package/stdlib/aws/s3.js +52 -70
- package/stdlib/calendar.js +50 -68
- package/stdlib/capabilities.js +3 -3
- package/stdlib/clipboard.js +20 -26
- package/stdlib/concurrency.js +16 -22
- package/stdlib/data/connector.js +34 -49
- package/stdlib/data/finance/dbnomics.js +32 -43
- package/stdlib/data/finance/edgar.js +53 -73
- package/stdlib/data/finance/fred.js +74 -103
- package/stdlib/data/news/gdelt.js +31 -42
- package/stdlib/data/people/littlesis.js +127 -180
- package/stdlib/data/social/bluesky.js +94 -132
- package/stdlib/data/tech/hackernews.js +142 -201
- package/stdlib/data/tech/yc.js +126 -179
- package/stdlib/data/usaspending.js +79 -111
- package/stdlib/data/wikidata.js +110 -157
- package/stdlib/date.js +106 -157
- package/stdlib/docs/agent/index.md +2 -0
- package/stdlib/docs/cli/local.md +106 -12
- package/stdlib/docs/diagnostics/checking.md +88 -0
- package/stdlib/docs/diagnostics/index.md +9 -2
- package/stdlib/docs/diagnostics/names.md +10 -0
- package/stdlib/docs/diagnostics/static-init.md +15 -0
- package/stdlib/docs/diagnostics/tools.md +2 -2
- package/stdlib/docs/guide/error-handling.md +60 -5
- package/stdlib/docs/guide/guards.md +6 -4
- package/stdlib/docs/guide/using-local-models.md +108 -2
- package/stdlib/docs/stdlib/agency/local.md +134 -32
- package/stdlib/docs/stdlib/agents/coding.md +2 -2
- package/stdlib/docs/stdlib/agents/lib/toolkits.md +46 -13
- package/stdlib/docs/stdlib/agents/review.md +3 -2
- package/stdlib/docs/stdlib/github.md +53 -50
- package/stdlib/docs/stdlib/ocr.md +192 -0
- package/stdlib/docs/stdlib/policy.md +6 -7
- package/stdlib/docs/stdlib/supervise.md +2 -2
- package/stdlib/docs/stdlib/thread.md +70 -24
- package/stdlib/docs/stdlib/toolbox.md +3 -3
- package/stdlib/fs.js +52 -70
- package/stdlib/git.js +154 -211
- package/stdlib/github.agency +3 -0
- package/stdlib/github.js +149 -203
- package/stdlib/http.js +28 -37
- package/stdlib/image.js +10 -13
- package/stdlib/index.js +198 -291
- package/stdlib/llm.agency +2 -2
- package/stdlib/llm.js +65 -91
- package/stdlib/markdown.js +36 -50
- package/stdlib/math.js +35 -49
- package/stdlib/mcp.js +34 -49
- package/stdlib/memory.js +68 -95
- package/stdlib/messaging/email.js +28 -37
- package/stdlib/messaging/imessage.js +12 -15
- package/stdlib/messaging/sms.js +12 -15
- package/stdlib/notes/apple.js +75 -101
- package/stdlib/object.js +52 -76
- package/stdlib/ocr.agency +158 -0
- package/stdlib/ocr.js +1153 -0
- package/stdlib/path.js +46 -67
- package/stdlib/policy.agency +16 -24
- package/stdlib/policy.js +170 -262
- package/stdlib/safeBash/actions.js +31 -42
- package/stdlib/safeBash.js +295 -414
- package/stdlib/shell.js +62 -86
- package/stdlib/skills.js +198 -281
- package/stdlib/speech.js +42 -57
- package/stdlib/spill.js +65 -91
- package/stdlib/statelog.js +52 -76
- package/stdlib/strategy.js +46 -67
- package/stdlib/supervise.js +11 -13
- package/stdlib/syntax.js +28 -40
- package/stdlib/system.js +94 -133
- package/stdlib/tag.js +40 -58
- package/stdlib/thread.agency +54 -0
- package/stdlib/thread.js +554 -186
- package/stdlib/toolbox.agency +21 -37
- package/stdlib/toolbox.js +415 -757
- package/stdlib/ui/chart.js +28 -40
- package/stdlib/ui/cli.js +58 -85
- package/stdlib/ui/layout.js +112 -166
- package/stdlib/ui/table.js +46 -67
- package/stdlib/ui.js +340 -508
- package/stdlib/validation.js +83 -121
- package/stdlib/weather.js +24 -33
- package/stdlib/web/browser.js +12 -15
- package/stdlib/web/search.js +20 -26
- package/stdlib/wikipedia.js +28 -37
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
__registerGlobalsInit,
|
|
61
61
|
__registerCallbacksInit,
|
|
62
62
|
registerModuleFingerprint as __registerModuleFingerprint,
|
|
63
|
-
|
|
63
|
+
runtimeFailure,
|
|
64
64
|
isSuccess,
|
|
65
65
|
isFailure,
|
|
66
66
|
stampFailureBoundary,
|
|
@@ -126,8 +126,8 @@ const graph = __globalCtx.graph;
|
|
|
126
126
|
function approve(value) {
|
|
127
127
|
return { type: "approve", value };
|
|
128
128
|
}
|
|
129
|
-
function reject(
|
|
130
|
-
return { type: "reject", value };
|
|
129
|
+
function reject(reason) {
|
|
130
|
+
return { type: "reject", value: reason };
|
|
131
131
|
}
|
|
132
132
|
function propagate() {
|
|
133
133
|
return { type: "propagate" };
|
|
@@ -423,7 +423,7 @@ async function __oneShotAgent_impl(target, prompt) {
|
|
|
423
423
|
await runner5.step(1, async (runner6) => {
|
|
424
424
|
__stack.locals.reply = await __call(formatTurnFailure, {
|
|
425
425
|
type: "positional",
|
|
426
|
-
args: [
|
|
426
|
+
args: [__bstack.locals.f]
|
|
427
427
|
});
|
|
428
428
|
if (hasInterrupts(__stack.locals.reply)) {
|
|
429
429
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -506,15 +506,12 @@ async function __oneShotAgent_impl(target, prompt) {
|
|
|
506
506
|
functionName: "oneShotAgent"
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
-
return
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
args: __stack.args
|
|
516
|
-
}
|
|
517
|
-
);
|
|
509
|
+
return runtimeFailure(__error, {
|
|
510
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
511
|
+
destructiveRan: __self.__destructiveRan,
|
|
512
|
+
functionName: "oneShotAgent",
|
|
513
|
+
args: __stack.args
|
|
514
|
+
});
|
|
518
515
|
} finally {
|
|
519
516
|
__stateStack()?.pop();
|
|
520
517
|
if (__functionCompleted) {
|
|
@@ -1643,7 +1640,7 @@ Session cost: ${__stack.locals.roundedCost}`]
|
|
|
1643
1640
|
}
|
|
1644
1641
|
return {
|
|
1645
1642
|
messages: __threads(),
|
|
1646
|
-
data:
|
|
1643
|
+
data: runtimeFailure(__error, { functionName: "main" })
|
|
1647
1644
|
};
|
|
1648
1645
|
}
|
|
1649
1646
|
});
|
|
@@ -1680,7 +1677,7 @@ Agent crashed: ${__error.message}`);
|
|
|
1680
1677
|
}
|
|
1681
1678
|
var stdin_default = graph;
|
|
1682
1679
|
const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line": 41, "col": 2 }, "2": { "line": 45, "col": 2 }, "3": { "line": 46, "col": 2 }, "4": { "line": 47, "col": 2 }, "5": { "line": 57, "col": 2 }, "6": { "line": 58, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_0": { "4.0": { "line": 48, "col": 4 }, "4.1": { "line": 51, "col": 18 }, "4.2.0": { "line": 51, "col": 4 }, "4.2.1": { "line": 52, "col": 6 }, "4.2.2": { "line": 53, "col": 25 }, "4.2.3.0": { "line": 53, "col": 11 }, "4.2.3.1": { "line": 54, "col": 6 }, "4.2.3": { "line": 53, "col": 11 }, "4.2": { "line": 51, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:main": { "2": { "line": 68, "col": 2 }, "3": { "line": 76, "col": 2 }, "4": { "line": 79, "col": 2 }, "6": { "line": 86, "col": 2 }, "7": { "line": 90, "col": 2 }, "8": { "line": 96, "col": 63 }, "9": { "line": 96, "col": 2 }, "10": { "line": 97, "col": 2 }, "11": { "line": 98, "col": 2 }, "12": { "line": 104, "col": 2 }, "13": { "line": 109, "col": 2 }, "14": { "line": 110, "col": 2 }, "15": { "line": 111, "col": 2 }, "16": { "line": 115, "col": 2 }, "17": { "line": 116, "col": 2 }, "18": { "line": 119, "col": 15 }, "19": { "line": 119, "col": 2 }, "20": { "line": 122, "col": 2 }, "21": { "line": 123, "col": 2 }, "22": { "line": 124, "col": 2 }, "23": { "line": 125, "col": 2 }, "24": { "line": 138, "col": 2 }, "25": { "line": 142, "col": 2 }, "26": { "line": 146, "col": 15 }, "27": { "line": 146, "col": 2 }, "28": { "line": 148, "col": 2 }, "29": { "line": 152, "col": 2 }, "30": { "line": 155, "col": 2 }, "31": { "line": 156, "col": 2 }, "33": { "line": 162, "col": 2 }, "34": { "line": 163, "col": 2 }, "35": { "line": 169, "col": 14 }, "36": { "line": 169, "col": 2 }, "37": { "line": 175, "col": 2 }, "39": { "line": 187, "col": 2 }, "40": { "line": 196, "col": 2 }, "3.0": { "line": 77, "col": 4 }, "4.0": { "line": 80, "col": 4 }, "6.0": { "line": 87, "col": 4 }, "6.1": { "line": 88, "col": 4 }, "11.0": { "line": 99, "col": 22 }, "11.2": { "line": 99, "col": 4 }, "11.3": { "line": 100, "col": 10 }, "11.4": { "line": 100, "col": 4 }, "11.5": { "line": 101, "col": 4 }, "11.6": { "line": 102, "col": 4 }, "23.0": { "line": 126, "col": 4 }, "23.1": { "line": 128, "col": 6 }, "23.2": { "line": 127, "col": 4 }, "23.3": { "line": 132, "col": 4 }, "23.4": { "line": 133, "col": 4 }, "23.5": { "line": 135, "col": 4 }, "31.0": { "line": 157, "col": 4 }, "34.0": { "line": 164, "col": 4 }, "37.0": { "line": 177, "col": 6 }, "37.1": { "line": 176, "col": 4 }, "37.2": { "line": 181, "col": 4 }, "39.0": { "line": 188, "col": 4 }, "39.1": { "line": 189, "col": 20 }, "39.2": { "line": 189, "col": 4 }, "39.3": { "line": 191, "col": 6 }, "39.4": { "line": 190, "col": 4 }, "40.0": { "line": 197, "col": 4 }, "40.1.0": { "line": 199, "col": 6 }, "40.1.1.0": { "line": 201, "col": 8 }, "40.1.1": { "line": 200, "col": 6 }, "40.1.2": { "line": 203, "col": 6 }, "40.1": { "line": 198, "col": 4 }, "40.2": { "line": 205, "col": 10 }, "40.3": { "line": 205, "col": 4 }, "40.5": { "line": 206, "col": 28 }, "40.6": { "line": 206, "col": 4 }, "40.7": { "line": 207, "col": 10 }, "40.8": { "line": 207, "col": 4 }, "40.9": { "line": 209, "col": 4 }, "40.10": { "line": 210, "col": 4 }, "40.11": { "line": 211, "col": 10 }, "40.12": { "line": 211, "col": 4 }, "40.13": { "line": 212, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_1": {}, "dist/lib/agents/agency-agent/agent.agency:__block_2": { "40.13.0": { "line": 213, "col": 6 } } };
|
|
1683
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "
|
|
1680
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "54e48be8365083a20f0224bcd479cc8d1519a808d43fbad162c19948613e33a1", import.meta.url);
|
|
1684
1681
|
export {
|
|
1685
1682
|
__getCheckpoints,
|
|
1686
1683
|
__invokeFunction,
|
|
@@ -76,8 +76,8 @@ const graph = __globalCtx.graph;
|
|
|
76
76
|
function approve(value) {
|
|
77
77
|
return { type: "approve", value };
|
|
78
78
|
}
|
|
79
|
-
function reject(
|
|
80
|
-
return { type: "reject", value };
|
|
79
|
+
function reject(reason) {
|
|
80
|
+
return { type: "reject", value: reason };
|
|
81
81
|
}
|
|
82
82
|
function propagate() {
|
|
83
83
|
return { type: "propagate" };
|
|
@@ -176,7 +176,7 @@ const BrainContext = z.object({ "interactive": z.boolean(), "grounding": z.strin
|
|
|
176
176
|
const AgentBrain = z.object({ "name": z.string(), "description": z.string(), "session": z.string(), "startTargets": z.array(z.string()), "init": z.string(), "runTurn": z.string() });
|
|
177
177
|
var stdin_default = graph;
|
|
178
178
|
const __sourceMap = {};
|
|
179
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/brain.agency", "
|
|
179
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/brain.agency", "3f61515fc79421600a5d3fa34afb0233c858cbb7df13e23b46298fff10fb75c8", import.meta.url);
|
|
180
180
|
export {
|
|
181
181
|
AgentBrain,
|
|
182
182
|
BrainContext,
|
|
@@ -10,7 +10,7 @@ import { edit } from "std::fs"
|
|
|
10
10
|
import { setMemoryId } from "std::memory"
|
|
11
11
|
import { Attachment, systemMessage } from "std::thread"
|
|
12
12
|
|
|
13
|
-
import { generateImageFile } from "../../lib/images.agency"
|
|
13
|
+
import { generateImageFile, viewImageFile } from "../../lib/images.agency"
|
|
14
14
|
import { getMcpTools } from "../../lib/mcp.agency"
|
|
15
15
|
import { getCapabilities, getSlowModel, getSlowProvider } from "../../shared.agency"
|
|
16
16
|
import { AgentBrain, BrainContext } from "../brain.agency"
|
|
@@ -49,6 +49,7 @@ static const mainAgentTools = [
|
|
|
49
49
|
writingAgent,
|
|
50
50
|
rewriteAgent,
|
|
51
51
|
generateImageFile,
|
|
52
|
+
viewImageFile,
|
|
52
53
|
...readOnlyFileTools(),
|
|
53
54
|
edit.partial(useAgentCwd: true),
|
|
54
55
|
]
|
|
@@ -4,7 +4,7 @@ import { now, elapsedTime } from "agency-lang/stdlib/date.js";
|
|
|
4
4
|
import { edit } from "agency-lang/stdlib/fs.js";
|
|
5
5
|
import { setMemoryId } from "agency-lang/stdlib/memory.js";
|
|
6
6
|
import { systemMessage, Attachment } from "agency-lang/stdlib/thread.js";
|
|
7
|
-
import { generateImageFile } from "../../lib/images.js";
|
|
7
|
+
import { generateImageFile, viewImageFile } from "../../lib/images.js";
|
|
8
8
|
import { getMcpTools } from "../../lib/mcp.js";
|
|
9
9
|
import { getCapabilities, getSlowModel, getSlowProvider } from "../../shared.js";
|
|
10
10
|
import { AgentBrain, BrainContext } from "../brain.js";
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
__registerGlobalsInit,
|
|
54
54
|
__registerCallbacksInit,
|
|
55
55
|
registerModuleFingerprint as __registerModuleFingerprint,
|
|
56
|
-
|
|
56
|
+
runtimeFailure,
|
|
57
57
|
isSuccess,
|
|
58
58
|
isFailure,
|
|
59
59
|
stampFailureBoundary,
|
|
@@ -121,8 +121,8 @@ const graph = __globalCtx.graph;
|
|
|
121
121
|
function approve(value) {
|
|
122
122
|
return { type: "approve", value };
|
|
123
123
|
}
|
|
124
|
-
function reject(
|
|
125
|
-
return { type: "reject", value };
|
|
124
|
+
function reject(reason) {
|
|
125
|
+
return { type: "reject", value: reason };
|
|
126
126
|
}
|
|
127
127
|
function propagate() {
|
|
128
128
|
return { type: "propagate" };
|
|
@@ -214,6 +214,7 @@ __registerTool(setMemoryId);
|
|
|
214
214
|
__registerTool(systemMessage);
|
|
215
215
|
__registerTool(Attachment);
|
|
216
216
|
__registerTool(generateImageFile);
|
|
217
|
+
__registerTool(viewImageFile);
|
|
217
218
|
__registerTool(getMcpTools);
|
|
218
219
|
__registerTool(getCapabilities);
|
|
219
220
|
__registerTool(getSlowModel);
|
|
@@ -255,7 +256,7 @@ async function __initializeStatic(__ctx) {
|
|
|
255
256
|
} finally {
|
|
256
257
|
getRuntimeContext().ctx.popHandler();
|
|
257
258
|
}
|
|
258
|
-
mainAgentTools = __deepFreeze([__readStatic(researchAgent, "researchAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.agency"), __readStatic(codeAgent, "codeAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency"), __readStatic(reviewAgent, "reviewAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.agency"), __readStatic(oracleAgent, "oracleAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.agency"), __readStatic(explorerAgent, "explorerAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.agency"), __readStatic(writingAgent, "writingAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/writing.agency"), __readStatic(rewriteAgent, "rewriteAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/rewrite.agency"), __readStatic(generateImageFile, "generateImageFile", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/images.agency"), ...await __call(readOnlyFileTools, {
|
|
259
|
+
mainAgentTools = __deepFreeze([__readStatic(researchAgent, "researchAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.agency"), __readStatic(codeAgent, "codeAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency"), __readStatic(reviewAgent, "reviewAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.agency"), __readStatic(oracleAgent, "oracleAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.agency"), __readStatic(explorerAgent, "explorerAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.agency"), __readStatic(writingAgent, "writingAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/writing.agency"), __readStatic(rewriteAgent, "rewriteAgent", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/brains/coordinator/subagents/rewrite.agency"), __readStatic(generateImageFile, "generateImageFile", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/images.agency"), __readStatic(viewImageFile, "viewImageFile", "/Users/adityabhargava/agency-lang/packages/agency-lang/dist/lib/agents/agency-agent/lib/images.agency"), ...await __call(readOnlyFileTools, {
|
|
259
260
|
type: "positional",
|
|
260
261
|
args: []
|
|
261
262
|
}), await __callMethod(__readStatic(edit, "edit", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/fs.agency"), "partial", {
|
|
@@ -475,15 +476,12 @@ async function __coordinatorInit_impl(context) {
|
|
|
475
476
|
functionName: "coordinatorInit"
|
|
476
477
|
});
|
|
477
478
|
}
|
|
478
|
-
return
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
args: __stack.args
|
|
485
|
-
}
|
|
486
|
-
);
|
|
479
|
+
return runtimeFailure(__error, {
|
|
480
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
481
|
+
destructiveRan: __self.__destructiveRan,
|
|
482
|
+
functionName: "coordinatorInit",
|
|
483
|
+
args: __stack.args
|
|
484
|
+
});
|
|
487
485
|
} finally {
|
|
488
486
|
__stateStack()?.pop();
|
|
489
487
|
if (__functionCompleted) {
|
|
@@ -787,15 +785,12 @@ async function __mainAgent_impl(prompt) {
|
|
|
787
785
|
functionName: "mainAgent"
|
|
788
786
|
});
|
|
789
787
|
}
|
|
790
|
-
return
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
args: __stack.args
|
|
797
|
-
}
|
|
798
|
-
);
|
|
788
|
+
return runtimeFailure(__error, {
|
|
789
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
790
|
+
destructiveRan: __self.__destructiveRan,
|
|
791
|
+
functionName: "mainAgent",
|
|
792
|
+
args: __stack.args
|
|
793
|
+
});
|
|
799
794
|
} finally {
|
|
800
795
|
__stateStack()?.pop();
|
|
801
796
|
if (__functionCompleted) {
|
|
@@ -938,15 +933,12 @@ async function __promptText_impl(prompt) {
|
|
|
938
933
|
functionName: "promptText"
|
|
939
934
|
});
|
|
940
935
|
}
|
|
941
|
-
return
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
args: __stack.args
|
|
948
|
-
}
|
|
949
|
-
);
|
|
936
|
+
return runtimeFailure(__error, {
|
|
937
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
938
|
+
destructiveRan: __self.__destructiveRan,
|
|
939
|
+
functionName: "promptText",
|
|
940
|
+
args: __stack.args
|
|
941
|
+
});
|
|
950
942
|
} finally {
|
|
951
943
|
__stateStack()?.pop();
|
|
952
944
|
if (__functionCompleted) {
|
|
@@ -1084,15 +1076,12 @@ async function __replyText_impl(name, result) {
|
|
|
1084
1076
|
functionName: "replyText"
|
|
1085
1077
|
});
|
|
1086
1078
|
}
|
|
1087
|
-
return
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
args: __stack.args
|
|
1094
|
-
}
|
|
1095
|
-
);
|
|
1079
|
+
return runtimeFailure(__error, {
|
|
1080
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1081
|
+
destructiveRan: __self.__destructiveRan,
|
|
1082
|
+
functionName: "replyText",
|
|
1083
|
+
args: __stack.args
|
|
1084
|
+
});
|
|
1096
1085
|
} finally {
|
|
1097
1086
|
__stateStack()?.pop();
|
|
1098
1087
|
if (__functionCompleted) {
|
|
@@ -1128,7 +1117,7 @@ const replyText = __AgencyFunction.create({
|
|
|
1128
1117
|
toolDefinition: {
|
|
1129
1118
|
name: "replyText",
|
|
1130
1119
|
description: "No description provided.",
|
|
1131
|
-
schema: z.object({ "name": z.string(), "result": z.union([z.object({ __type: z.literal("resultType"), success: z.literal(true), value: z.string() }), z.object({ __type: z.literal("resultType"), success: z.literal(false), error: z.any() })]) })
|
|
1120
|
+
schema: z.object({ "name": z.string(), "result": z.union([z.object({ __type: z.literal("resultType"), success: z.literal(true), value: z.string() }), z.object({ __type: z.literal("resultType"), success: z.literal(false), error: z.string(), data: z.record(z.any()) })]) })
|
|
1132
1121
|
},
|
|
1133
1122
|
exported: false
|
|
1134
1123
|
}, __toolRegistry);
|
|
@@ -1225,15 +1214,12 @@ async function __researchTurn_impl(userMsg) {
|
|
|
1225
1214
|
functionName: "researchTurn"
|
|
1226
1215
|
});
|
|
1227
1216
|
}
|
|
1228
|
-
return
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
args: __stack.args
|
|
1235
|
-
}
|
|
1236
|
-
);
|
|
1217
|
+
return runtimeFailure(__error, {
|
|
1218
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1219
|
+
destructiveRan: __self.__destructiveRan,
|
|
1220
|
+
functionName: "researchTurn",
|
|
1221
|
+
args: __stack.args
|
|
1222
|
+
});
|
|
1237
1223
|
} finally {
|
|
1238
1224
|
__stateStack()?.pop();
|
|
1239
1225
|
if (__functionCompleted) {
|
|
@@ -1376,15 +1362,12 @@ async function __oracleTurn_impl(userMsg) {
|
|
|
1376
1362
|
functionName: "oracleTurn"
|
|
1377
1363
|
});
|
|
1378
1364
|
}
|
|
1379
|
-
return
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
args: __stack.args
|
|
1386
|
-
}
|
|
1387
|
-
);
|
|
1365
|
+
return runtimeFailure(__error, {
|
|
1366
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1367
|
+
destructiveRan: __self.__destructiveRan,
|
|
1368
|
+
functionName: "oracleTurn",
|
|
1369
|
+
args: __stack.args
|
|
1370
|
+
});
|
|
1388
1371
|
} finally {
|
|
1389
1372
|
__stateStack()?.pop();
|
|
1390
1373
|
if (__functionCompleted) {
|
|
@@ -1527,15 +1510,12 @@ async function __explorerTurn_impl(userMsg) {
|
|
|
1527
1510
|
functionName: "explorerTurn"
|
|
1528
1511
|
});
|
|
1529
1512
|
}
|
|
1530
|
-
return
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
args: __stack.args
|
|
1537
|
-
}
|
|
1538
|
-
);
|
|
1513
|
+
return runtimeFailure(__error, {
|
|
1514
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1515
|
+
destructiveRan: __self.__destructiveRan,
|
|
1516
|
+
functionName: "explorerTurn",
|
|
1517
|
+
args: __stack.args
|
|
1518
|
+
});
|
|
1539
1519
|
} finally {
|
|
1540
1520
|
__stateStack()?.pop();
|
|
1541
1521
|
if (__functionCompleted) {
|
|
@@ -1944,15 +1924,12 @@ async function __coordinatorRunTurn_impl(target, prompt) {
|
|
|
1944
1924
|
functionName: "coordinatorRunTurn"
|
|
1945
1925
|
});
|
|
1946
1926
|
}
|
|
1947
|
-
return
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
args: __stack.args
|
|
1954
|
-
}
|
|
1955
|
-
);
|
|
1927
|
+
return runtimeFailure(__error, {
|
|
1928
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1929
|
+
destructiveRan: __self.__destructiveRan,
|
|
1930
|
+
functionName: "coordinatorRunTurn",
|
|
1931
|
+
args: __stack.args
|
|
1932
|
+
});
|
|
1956
1933
|
} finally {
|
|
1957
1934
|
__stateStack()?.pop();
|
|
1958
1935
|
if (__functionCompleted) {
|
|
@@ -2067,15 +2044,12 @@ async function __coordinatorBrain_impl() {
|
|
|
2067
2044
|
functionName: "coordinatorBrain"
|
|
2068
2045
|
});
|
|
2069
2046
|
}
|
|
2070
|
-
return
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
args: __stack.args
|
|
2077
|
-
}
|
|
2078
|
-
);
|
|
2047
|
+
return runtimeFailure(__error, {
|
|
2048
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
2049
|
+
destructiveRan: __self.__destructiveRan,
|
|
2050
|
+
functionName: "coordinatorBrain",
|
|
2051
|
+
args: __stack.args
|
|
2052
|
+
});
|
|
2079
2053
|
} finally {
|
|
2080
2054
|
__stateStack()?.pop();
|
|
2081
2055
|
if (__functionCompleted) {
|
|
@@ -2102,8 +2076,8 @@ const coordinatorBrain = __AgencyFunction.create({
|
|
|
2102
2076
|
exported: true
|
|
2103
2077
|
}, __toolRegistry);
|
|
2104
2078
|
var stdin_default = graph;
|
|
2105
|
-
const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorInit": { "1": { "line":
|
|
2106
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "
|
|
2079
|
+
const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorInit": { "1": { "line": 57, "col": 6 }, "2": { "line": 57, "col": 2 }, "3": { "line": 63, "col": 6 }, "4": { "line": 63, "col": 2 }, "5": { "line": 69, "col": 2 }, "6": { "line": 70, "col": 2 }, "7": { "line": 73, "col": 2 }, "2.0": { "line": 59, "col": 6 }, "2.1": { "line": 58, "col": 4 }, "2.2": { "line": 61, "col": 4 }, "4.0": { "line": 65, "col": 6 }, "4.1": { "line": 64, "col": 4 }, "4.2": { "line": 67, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:mainAgent": { "2": { "line": 80, "col": 2 }, "3": { "line": 81, "col": 2 }, "4": { "line": 112, "col": 2 }, "3.0": { "line": 82, "col": 4 }, "3.1.1": { "line": 84, "col": 6 }, "3.1.2": { "line": 85, "col": 24 }, "3.1.3": { "line": 85, "col": 6 }, "3.1.4": { "line": 89, "col": 6 }, "3.1.5": { "line": 90, "col": 6 }, "3.1": { "line": 83, "col": 4 }, "3.3": { "line": 100, "col": 11 }, "3.4": { "line": 102, "col": 8 }, "3.5": { "line": 96, "col": 4 }, "3.6": { "line": 105, "col": 4 }, "3.7.0": { "line": 107, "col": 6 }, "3.7.1": { "line": 108, "col": 6 }, "3.7": { "line": 106, "col": 4 }, "3.8": { "line": 110, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:promptText": { "1": { "line": 118, "col": 9 }, "2": { "line": 118, "col": 9 }, "3": { "line": 118, "col": 2 }, "2.0": { "line": 118, "col": 9 }, "2.1": { "line": 119, "col": 20 }, "2.2": { "line": 119, "col": 20 }, "2.3": { "line": 118, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:replyText": { "1": { "line": 126, "col": 6 }, "2": { "line": 126, "col": 2 }, "3": { "line": 129, "col": 2 }, "2.0": { "line": 127, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:researchTurn": { "1": { "line": 133, "col": 37 }, "2": { "line": 133, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:oracleTurn": { "1": { "line": 141, "col": 2 }, "2": { "line": 142, "col": 2 }, "3": { "line": 145, "col": 2 }, "2.0": { "line": 143, "col": 36 }, "2.1": { "line": 143, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:explorerTurn": { "1": { "line": 149, "col": 2 }, "2": { "line": 150, "col": 2 }, "3": { "line": 153, "col": 2 }, "2.0": { "line": 151, "col": 38 }, "2.1": { "line": 151, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorRunTurn": { "1": { "line": 160, "col": 9 }, "2": { "line": 160, "col": 2 }, "1.0": { "line": 161, "col": 24 }, "1.1": { "line": 161, "col": 14 }, "1.2": { "line": 161, "col": 14 }, "1.3": { "line": 162, "col": 31 }, "1.4": { "line": 162, "col": 18 }, "1.5": { "line": 162, "col": 18 }, "1.6": { "line": 163, "col": 27 }, "1.7": { "line": 163, "col": 16 }, "1.8": { "line": 163, "col": 16 }, "1.9": { "line": 164, "col": 31 }, "1.10": { "line": 164, "col": 18 }, "1.11": { "line": 164, "col": 18 }, "1.12": { "line": 165, "col": 28 }, "1.13": { "line": 165, "col": 16 }, "1.14": { "line": 165, "col": 16 }, "1.15": { "line": 166, "col": 30 }, "1.16": { "line": 166, "col": 17 }, "1.17": { "line": 166, "col": 17 }, "1.18": { "line": 167, "col": 30 }, "1.19": { "line": 167, "col": 17 }, "1.20": { "line": 167, "col": 17 }, "1.21": { "line": 168, "col": 9 }, "1.22": { "line": 168, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorBrain": { "1": { "line": 173, "col": 2 } } };
|
|
2080
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "51fae42c747cbc264d1d2d4bf4c318959d496a1336bd87b630753b61a0429790", import.meta.url);
|
|
2107
2081
|
export {
|
|
2108
2082
|
__getCheckpoints,
|
|
2109
2083
|
__invokeFunction,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
__registerGlobalsInit,
|
|
33
33
|
__registerCallbacksInit,
|
|
34
34
|
registerModuleFingerprint as __registerModuleFingerprint,
|
|
35
|
-
|
|
35
|
+
runtimeFailure,
|
|
36
36
|
isFailure,
|
|
37
37
|
stampFailureBoundary,
|
|
38
38
|
__nn,
|
|
@@ -94,8 +94,8 @@ const graph = __globalCtx.graph;
|
|
|
94
94
|
function approve(value) {
|
|
95
95
|
return { type: "approve", value };
|
|
96
96
|
}
|
|
97
|
-
function reject(
|
|
98
|
-
return { type: "reject", value };
|
|
97
|
+
function reject(reason) {
|
|
98
|
+
return { type: "reject", value: reason };
|
|
99
99
|
}
|
|
100
100
|
function propagate() {
|
|
101
101
|
return { type: "propagate" };
|
|
@@ -324,15 +324,12 @@ async function __announce_impl(agentName, userMsg) {
|
|
|
324
324
|
functionName: "announce"
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
-
return
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
args: __stack.args
|
|
334
|
-
}
|
|
335
|
-
);
|
|
327
|
+
return runtimeFailure(__error, {
|
|
328
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
329
|
+
destructiveRan: __self.__destructiveRan,
|
|
330
|
+
functionName: "announce",
|
|
331
|
+
args: __stack.args
|
|
332
|
+
});
|
|
336
333
|
} finally {
|
|
337
334
|
__stateStack()?.pop();
|
|
338
335
|
if (__functionCompleted) {
|
|
@@ -468,15 +465,12 @@ async function __stripControlChars_impl(text) {
|
|
|
468
465
|
functionName: "stripControlChars"
|
|
469
466
|
});
|
|
470
467
|
}
|
|
471
|
-
return
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
args: __stack.args
|
|
478
|
-
}
|
|
479
|
-
);
|
|
468
|
+
return runtimeFailure(__error, {
|
|
469
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
470
|
+
destructiveRan: __self.__destructiveRan,
|
|
471
|
+
functionName: "stripControlChars",
|
|
472
|
+
args: __stack.args
|
|
473
|
+
});
|
|
480
474
|
} finally {
|
|
481
475
|
__stateStack()?.pop();
|
|
482
476
|
if (__functionCompleted) {
|
|
@@ -511,7 +505,7 @@ const stripControlChars = __AgencyFunction.create({
|
|
|
511
505
|
}, __toolRegistry);
|
|
512
506
|
var stdin_default = graph;
|
|
513
507
|
const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency:announce": { "1": { "line": 11, "col": 31 }, "2": { "line": 11, "col": 2 }, "3": { "line": 12, "col": 2 }, "4": { "line": 15, "col": 8 }, "5": { "line": 15, "col": 2 }, "3.0": { "line": 13, "col": 11 }, "3.1": { "line": 13, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency:stripControlChars": { "1": { "line": 21, "col": 2 }, "2": { "line": 22, "col": 20 }, "3": { "line": 22, "col": 2 }, "4": { "line": 27, "col": 2 }, "3.0.0": { "line": 24, "col": 6 }, "3.0": { "line": 23, "col": 4 } } };
|
|
514
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", "
|
|
508
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", "155f4481fbf4cad6842b4fcad4e7c9b7b5cf01e20f9c860826e5f5fb0c6a7f6a", import.meta.url);
|
|
515
509
|
export {
|
|
516
510
|
__getCheckpoints,
|
|
517
511
|
__invokeFunction,
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
registerModuleFingerprint as __registerModuleFingerprint,
|
|
36
36
|
success,
|
|
37
37
|
failure,
|
|
38
|
+
runtimeFailure,
|
|
38
39
|
isFailure,
|
|
39
40
|
stampFailureBoundary,
|
|
40
41
|
__eq,
|
|
@@ -95,8 +96,8 @@ const graph = __globalCtx.graph;
|
|
|
95
96
|
function approve(value) {
|
|
96
97
|
return { type: "approve", value };
|
|
97
98
|
}
|
|
98
|
-
function reject(
|
|
99
|
-
return { type: "reject", value };
|
|
99
|
+
function reject(reason) {
|
|
100
|
+
return { type: "reject", value: reason };
|
|
100
101
|
}
|
|
101
102
|
function propagate() {
|
|
102
103
|
return { type: "propagate" };
|
|
@@ -284,15 +285,12 @@ async function __timeBudget_impl(maxSeconds, fallback) {
|
|
|
284
285
|
functionName: "timeBudget"
|
|
285
286
|
});
|
|
286
287
|
}
|
|
287
|
-
return
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
args: __stack.args
|
|
294
|
-
}
|
|
295
|
-
);
|
|
288
|
+
return runtimeFailure(__error, {
|
|
289
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
290
|
+
destructiveRan: __self.__destructiveRan,
|
|
291
|
+
functionName: "timeBudget",
|
|
292
|
+
args: __stack.args
|
|
293
|
+
});
|
|
296
294
|
} finally {
|
|
297
295
|
__stateStack()?.pop();
|
|
298
296
|
if (__functionCompleted) {
|
|
@@ -413,15 +411,12 @@ async function __costBudget_impl(maxDollars, fallback) {
|
|
|
413
411
|
functionName: "costBudget"
|
|
414
412
|
});
|
|
415
413
|
}
|
|
416
|
-
return
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
args: __stack.args
|
|
423
|
-
}
|
|
424
|
-
);
|
|
414
|
+
return runtimeFailure(__error, {
|
|
415
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
416
|
+
destructiveRan: __self.__destructiveRan,
|
|
417
|
+
functionName: "costBudget",
|
|
418
|
+
args: __stack.args
|
|
419
|
+
});
|
|
425
420
|
} finally {
|
|
426
421
|
__stateStack()?.pop();
|
|
427
422
|
if (__functionCompleted) {
|
|
@@ -563,15 +558,12 @@ async function __describeTrip_impl(trip) {
|
|
|
563
558
|
functionName: "describeTrip"
|
|
564
559
|
});
|
|
565
560
|
}
|
|
566
|
-
return
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
args: __stack.args
|
|
573
|
-
}
|
|
574
|
-
);
|
|
561
|
+
return runtimeFailure(__error, {
|
|
562
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
563
|
+
destructiveRan: __self.__destructiveRan,
|
|
564
|
+
functionName: "describeTrip",
|
|
565
|
+
args: __stack.args
|
|
566
|
+
});
|
|
575
567
|
} finally {
|
|
576
568
|
__stateStack()?.pop();
|
|
577
569
|
if (__functionCompleted) {
|
|
@@ -716,7 +708,7 @@ async function __budgeted_impl(label, block) {
|
|
|
716
708
|
});
|
|
717
709
|
await runner2.step(1, async (runner3) => {
|
|
718
710
|
__functionCompleted = true;
|
|
719
|
-
runner3.halt(failure(__stack.locals.__hoist_0, { checkpoint: getRuntimeContext().ctx.getResultCheckpoint(), functionName: "budgeted", args: __stack.args }));
|
|
711
|
+
runner3.halt(failure(__stack.locals.__hoist_0, null, { checkpoint: getRuntimeContext().ctx.getResultCheckpoint(), functionName: "budgeted", args: __stack.args }));
|
|
720
712
|
return;
|
|
721
713
|
});
|
|
722
714
|
}
|
|
@@ -740,7 +732,7 @@ async function __budgeted_impl(label, block) {
|
|
|
740
732
|
body: async (runner2) => {
|
|
741
733
|
await runner2.step(0, async (runner3) => {
|
|
742
734
|
__functionCompleted = true;
|
|
743
|
-
runner3.halt(failure(`${__stack.locals.result.error}`, { checkpoint: getRuntimeContext().ctx.getResultCheckpoint(), functionName: "budgeted", args: __stack.args }));
|
|
735
|
+
runner3.halt(failure(`${__stack.locals.result.error}`, null, { checkpoint: getRuntimeContext().ctx.getResultCheckpoint(), functionName: "budgeted", args: __stack.args }));
|
|
744
736
|
return;
|
|
745
737
|
});
|
|
746
738
|
}
|
|
@@ -752,7 +744,7 @@ async function __budgeted_impl(label, block) {
|
|
|
752
744
|
body: async (runner2) => {
|
|
753
745
|
await runner2.step(0, async (runner3) => {
|
|
754
746
|
__functionCompleted = true;
|
|
755
|
-
runner3.halt(failure(`it returned no answer`, { checkpoint: getRuntimeContext().ctx.getResultCheckpoint(), functionName: "budgeted", args: __stack.args }));
|
|
747
|
+
runner3.halt(failure(`it returned no answer`, null, { checkpoint: getRuntimeContext().ctx.getResultCheckpoint(), functionName: "budgeted", args: __stack.args }));
|
|
756
748
|
return;
|
|
757
749
|
});
|
|
758
750
|
}
|
|
@@ -789,15 +781,12 @@ async function __budgeted_impl(label, block) {
|
|
|
789
781
|
functionName: "budgeted"
|
|
790
782
|
});
|
|
791
783
|
}
|
|
792
|
-
return
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
args: __stack.args
|
|
799
|
-
}
|
|
800
|
-
);
|
|
784
|
+
return runtimeFailure(__error, {
|
|
785
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
786
|
+
destructiveRan: __self.__destructiveRan,
|
|
787
|
+
functionName: "budgeted",
|
|
788
|
+
args: __stack.args
|
|
789
|
+
});
|
|
801
790
|
} finally {
|
|
802
791
|
__stateStack()?.pop();
|
|
803
792
|
if (__functionCompleted) {
|
|
@@ -846,7 +835,7 @@ const budgeted = __AgencyFunction.create({
|
|
|
846
835
|
}, __toolRegistry);
|
|
847
836
|
var stdin_default = graph;
|
|
848
837
|
const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency:timeBudget": { "1": { "line": 9, "col": 2 }, "2": { "line": 12, "col": 2 }, "1.0": { "line": 10, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency:costBudget": { "1": { "line": 17, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency:describeTrip": { "1": { "line": 21, "col": 2 }, "2": { "line": 24, "col": 2 }, "1.0": { "line": 22, "col": 33 }, "1.1": { "line": 22, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency:budgeted": { "1": { "line": 38, "col": 2 }, "2": { "line": 39, "col": 2 }, "3": { "line": 40, "col": 2 }, "4": { "line": 49, "col": 2 }, "5": { "line": 52, "col": 6 }, "6": { "line": 52, "col": 2 }, "7": { "line": 55, "col": 2 }, "8": { "line": 58, "col": 2 }, "3.0": { "line": 41, "col": 4 }, "4.0": { "line": 50, "col": 19 }, "4.1": { "line": 50, "col": 4 }, "6.0": { "line": 53, "col": 4 }, "7.0": { "line": 56, "col": 4 } } };
|
|
849
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency", "
|
|
838
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.agency", "13760f7485ecdb8baa4977e6a24a5e09d8c279ca2dc4cb7547a8e5056532622c", import.meta.url);
|
|
850
839
|
export {
|
|
851
840
|
__getCheckpoints,
|
|
852
841
|
__invokeFunction,
|