agency-lang 0.18.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.js +59 -86
- 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/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.js +16 -22
- 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 +15 -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/cli/hostedModels.js +2 -1
- package/dist/lib/cli/local.d.ts +6 -1
- package/dist/lib/cli/local.js +74 -9
- package/dist/lib/cli/localFlag.d.ts +4 -3
- package/dist/lib/cli/localFlag.js +11 -4
- package/dist/lib/cli/mcp.js +2 -6
- package/dist/lib/config.d.ts +8 -0
- package/dist/lib/config.js +1 -0
- package/dist/lib/parsers/parsers.js +9 -9
- package/dist/lib/preprocessors/typescriptPreprocessor.js +1 -34
- package/dist/lib/runtime/agencyFunction.js +4 -2
- package/dist/lib/runtime/agentHome.d.ts +6 -0
- package/dist/lib/runtime/agentHome.js +14 -0
- package/dist/lib/runtime/builtinPolicies.js +30 -15
- package/dist/lib/runtime/builtins.d.ts +0 -4
- package/dist/lib/runtime/builtins.js +0 -3
- package/dist/lib/runtime/call.js +2 -2
- package/dist/lib/runtime/index.d.ts +2 -3
- package/dist/lib/runtime/index.js +2 -3
- 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/policy.d.ts +8 -0
- package/dist/lib/runtime/policy.js +30 -8
- 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/toolLoopGuards.d.ts +5 -0
- package/dist/lib/runtime/toolLoopGuards.js +6 -1
- package/dist/lib/runtime/validateChain.js +2 -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/agentSessions.js +23 -25
- 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/cli.js +12 -12
- package/dist/lib/stdlib/contained.d.ts +24 -1
- package/dist/lib/stdlib/contained.js +70 -17
- package/dist/lib/stdlib/fs.d.ts +9 -1
- package/dist/lib/stdlib/fs.js +20 -8
- package/dist/lib/stdlib/http.js +1 -2
- package/dist/lib/stdlib/llm.d.ts +11 -5
- package/dist/lib/stdlib/llm.js +15 -8
- package/dist/lib/stdlib/localModelManifest.d.ts +5 -5
- package/dist/lib/stdlib/localModelManifest.js +10 -22
- package/dist/lib/stdlib/localModels.d.ts +49 -8
- package/dist/lib/stdlib/localModels.js +266 -64
- package/dist/lib/stdlib/mcp.js +7 -6
- package/dist/lib/stdlib/mlxModelRecord.d.ts +26 -0
- package/dist/lib/stdlib/mlxModelRecord.js +60 -0
- package/dist/lib/stdlib/modelBackend.d.ts +17 -0
- package/dist/lib/stdlib/modelBackend.js +42 -0
- package/dist/lib/stdlib/oauth.js +15 -20
- package/dist/lib/stdlib/objectBytes.js +2 -4
- package/dist/lib/stdlib/shell.d.ts +2 -2
- package/dist/lib/stdlib/skills.d.ts +0 -18
- package/dist/lib/stdlib/skills.js +0 -22
- package/dist/lib/stdlib/speech.d.ts +5 -5
- package/dist/lib/stdlib/speech.js +44 -68
- package/dist/lib/stdlib/threads.js +1 -1
- 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 +2 -2
- 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/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 +53 -0
- package/dist/lib/typeChecker/diagnostics.d.ts +25 -0
- package/dist/lib/typeChecker/diagnostics.js +25 -0
- package/dist/lib/typeChecker/inference.js +1 -1
- package/dist/lib/typeChecker/resultUnion.js +18 -2
- package/dist/lib/typeChecker/scopes.js +8 -1
- 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/validation.d.ts +4 -3
- package/dist/lib/typeChecker/validation.js +6 -5
- 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/scripts/agency.js +3 -2
- package/package.json +2 -2
- package/stdlib/agency/eval.js +22 -31
- package/stdlib/agency/local.agency +49 -15
- package/stdlib/agency/local.js +362 -125
- 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.js +22 -31
- 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.js +76 -112
- 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.js +22 -31
- 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/cli/local.md +51 -12
- package/stdlib/docs/diagnostics/checking.md +88 -0
- package/stdlib/docs/diagnostics/index.md +5 -0
- package/stdlib/docs/guide/custom-providers.md +4 -1
- 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 +3 -2
- package/stdlib/docs/stdlib/agency/local.md +89 -31
- package/stdlib/docs/stdlib/fs.md +6 -5
- package/stdlib/docs/stdlib/llm.md +43 -12
- package/stdlib/docs/stdlib/policy.md +6 -7
- package/stdlib/docs/stdlib/shell.md +1 -1
- package/stdlib/docs/stdlib/skills.md +8 -8
- package/stdlib/docs/stdlib/supervise.md +2 -2
- package/stdlib/docs/stdlib/thread.md +14 -7
- package/stdlib/docs/stdlib/toolbox.md +25 -12
- package/stdlib/fs.agency +9 -4
- package/stdlib/fs.js +105 -79
- package/stdlib/git.js +154 -211
- package/stdlib/github.js +148 -202
- package/stdlib/http.js +28 -37
- package/stdlib/image.js +10 -13
- package/stdlib/index.js +198 -291
- package/stdlib/llm.agency +37 -5
- package/stdlib/llm.js +247 -96
- 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/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.agency +3 -3
- package/stdlib/shell.js +65 -89
- package/stdlib/skills.agency +8 -5
- package/stdlib/skills.js +234 -289
- 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 +3 -0
- package/stdlib/thread.js +125 -185
- package/stdlib/toolbox.agency +42 -50
- package/stdlib/toolbox.js +470 -815
- 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
- package/dist/lib/runtime/builtinTools.d.ts +0 -9
- package/dist/lib/runtime/builtinTools.js +0 -16
|
@@ -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", "b34d82660446614ec24362a0682b10bc70c7b302798ece7016ceab387819cefc", 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", "9dca0b935f7990aceeaf4506229ab0ebd6ac37ceba1adbf162c35d5fc132b454", import.meta.url);
|
|
180
180
|
export {
|
|
181
181
|
AgentBrain,
|
|
182
182
|
BrainContext,
|
|
@@ -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" };
|
|
@@ -475,15 +475,12 @@ async function __coordinatorInit_impl(context) {
|
|
|
475
475
|
functionName: "coordinatorInit"
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
|
-
return
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
args: __stack.args
|
|
485
|
-
}
|
|
486
|
-
);
|
|
478
|
+
return runtimeFailure(__error, {
|
|
479
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
480
|
+
destructiveRan: __self.__destructiveRan,
|
|
481
|
+
functionName: "coordinatorInit",
|
|
482
|
+
args: __stack.args
|
|
483
|
+
});
|
|
487
484
|
} finally {
|
|
488
485
|
__stateStack()?.pop();
|
|
489
486
|
if (__functionCompleted) {
|
|
@@ -787,15 +784,12 @@ async function __mainAgent_impl(prompt) {
|
|
|
787
784
|
functionName: "mainAgent"
|
|
788
785
|
});
|
|
789
786
|
}
|
|
790
|
-
return
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
args: __stack.args
|
|
797
|
-
}
|
|
798
|
-
);
|
|
787
|
+
return runtimeFailure(__error, {
|
|
788
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
789
|
+
destructiveRan: __self.__destructiveRan,
|
|
790
|
+
functionName: "mainAgent",
|
|
791
|
+
args: __stack.args
|
|
792
|
+
});
|
|
799
793
|
} finally {
|
|
800
794
|
__stateStack()?.pop();
|
|
801
795
|
if (__functionCompleted) {
|
|
@@ -938,15 +932,12 @@ async function __promptText_impl(prompt) {
|
|
|
938
932
|
functionName: "promptText"
|
|
939
933
|
});
|
|
940
934
|
}
|
|
941
|
-
return
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
args: __stack.args
|
|
948
|
-
}
|
|
949
|
-
);
|
|
935
|
+
return runtimeFailure(__error, {
|
|
936
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
937
|
+
destructiveRan: __self.__destructiveRan,
|
|
938
|
+
functionName: "promptText",
|
|
939
|
+
args: __stack.args
|
|
940
|
+
});
|
|
950
941
|
} finally {
|
|
951
942
|
__stateStack()?.pop();
|
|
952
943
|
if (__functionCompleted) {
|
|
@@ -1084,15 +1075,12 @@ async function __replyText_impl(name, result) {
|
|
|
1084
1075
|
functionName: "replyText"
|
|
1085
1076
|
});
|
|
1086
1077
|
}
|
|
1087
|
-
return
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
args: __stack.args
|
|
1094
|
-
}
|
|
1095
|
-
);
|
|
1078
|
+
return runtimeFailure(__error, {
|
|
1079
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1080
|
+
destructiveRan: __self.__destructiveRan,
|
|
1081
|
+
functionName: "replyText",
|
|
1082
|
+
args: __stack.args
|
|
1083
|
+
});
|
|
1096
1084
|
} finally {
|
|
1097
1085
|
__stateStack()?.pop();
|
|
1098
1086
|
if (__functionCompleted) {
|
|
@@ -1128,7 +1116,7 @@ const replyText = __AgencyFunction.create({
|
|
|
1128
1116
|
toolDefinition: {
|
|
1129
1117
|
name: "replyText",
|
|
1130
1118
|
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() })]) })
|
|
1119
|
+
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
1120
|
},
|
|
1133
1121
|
exported: false
|
|
1134
1122
|
}, __toolRegistry);
|
|
@@ -1225,15 +1213,12 @@ async function __researchTurn_impl(userMsg) {
|
|
|
1225
1213
|
functionName: "researchTurn"
|
|
1226
1214
|
});
|
|
1227
1215
|
}
|
|
1228
|
-
return
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
args: __stack.args
|
|
1235
|
-
}
|
|
1236
|
-
);
|
|
1216
|
+
return runtimeFailure(__error, {
|
|
1217
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1218
|
+
destructiveRan: __self.__destructiveRan,
|
|
1219
|
+
functionName: "researchTurn",
|
|
1220
|
+
args: __stack.args
|
|
1221
|
+
});
|
|
1237
1222
|
} finally {
|
|
1238
1223
|
__stateStack()?.pop();
|
|
1239
1224
|
if (__functionCompleted) {
|
|
@@ -1376,15 +1361,12 @@ async function __oracleTurn_impl(userMsg) {
|
|
|
1376
1361
|
functionName: "oracleTurn"
|
|
1377
1362
|
});
|
|
1378
1363
|
}
|
|
1379
|
-
return
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
args: __stack.args
|
|
1386
|
-
}
|
|
1387
|
-
);
|
|
1364
|
+
return runtimeFailure(__error, {
|
|
1365
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1366
|
+
destructiveRan: __self.__destructiveRan,
|
|
1367
|
+
functionName: "oracleTurn",
|
|
1368
|
+
args: __stack.args
|
|
1369
|
+
});
|
|
1388
1370
|
} finally {
|
|
1389
1371
|
__stateStack()?.pop();
|
|
1390
1372
|
if (__functionCompleted) {
|
|
@@ -1527,15 +1509,12 @@ async function __explorerTurn_impl(userMsg) {
|
|
|
1527
1509
|
functionName: "explorerTurn"
|
|
1528
1510
|
});
|
|
1529
1511
|
}
|
|
1530
|
-
return
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
args: __stack.args
|
|
1537
|
-
}
|
|
1538
|
-
);
|
|
1512
|
+
return runtimeFailure(__error, {
|
|
1513
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1514
|
+
destructiveRan: __self.__destructiveRan,
|
|
1515
|
+
functionName: "explorerTurn",
|
|
1516
|
+
args: __stack.args
|
|
1517
|
+
});
|
|
1539
1518
|
} finally {
|
|
1540
1519
|
__stateStack()?.pop();
|
|
1541
1520
|
if (__functionCompleted) {
|
|
@@ -1944,15 +1923,12 @@ async function __coordinatorRunTurn_impl(target, prompt) {
|
|
|
1944
1923
|
functionName: "coordinatorRunTurn"
|
|
1945
1924
|
});
|
|
1946
1925
|
}
|
|
1947
|
-
return
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
args: __stack.args
|
|
1954
|
-
}
|
|
1955
|
-
);
|
|
1926
|
+
return runtimeFailure(__error, {
|
|
1927
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1928
|
+
destructiveRan: __self.__destructiveRan,
|
|
1929
|
+
functionName: "coordinatorRunTurn",
|
|
1930
|
+
args: __stack.args
|
|
1931
|
+
});
|
|
1956
1932
|
} finally {
|
|
1957
1933
|
__stateStack()?.pop();
|
|
1958
1934
|
if (__functionCompleted) {
|
|
@@ -2067,15 +2043,12 @@ async function __coordinatorBrain_impl() {
|
|
|
2067
2043
|
functionName: "coordinatorBrain"
|
|
2068
2044
|
});
|
|
2069
2045
|
}
|
|
2070
|
-
return
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
args: __stack.args
|
|
2077
|
-
}
|
|
2078
|
-
);
|
|
2046
|
+
return runtimeFailure(__error, {
|
|
2047
|
+
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
2048
|
+
destructiveRan: __self.__destructiveRan,
|
|
2049
|
+
functionName: "coordinatorBrain",
|
|
2050
|
+
args: __stack.args
|
|
2051
|
+
});
|
|
2079
2052
|
} finally {
|
|
2080
2053
|
__stateStack()?.pop();
|
|
2081
2054
|
if (__functionCompleted) {
|
|
@@ -2103,7 +2076,7 @@ const coordinatorBrain = __AgencyFunction.create({
|
|
|
2103
2076
|
}, __toolRegistry);
|
|
2104
2077
|
var stdin_default = graph;
|
|
2105
2078
|
const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorInit": { "1": { "line": 56, "col": 6 }, "2": { "line": 56, "col": 2 }, "3": { "line": 62, "col": 6 }, "4": { "line": 62, "col": 2 }, "5": { "line": 68, "col": 2 }, "6": { "line": 69, "col": 2 }, "7": { "line": 72, "col": 2 }, "2.0": { "line": 58, "col": 6 }, "2.1": { "line": 57, "col": 4 }, "2.2": { "line": 60, "col": 4 }, "4.0": { "line": 64, "col": 6 }, "4.1": { "line": 63, "col": 4 }, "4.2": { "line": 66, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:mainAgent": { "2": { "line": 79, "col": 2 }, "3": { "line": 80, "col": 2 }, "4": { "line": 111, "col": 2 }, "3.0": { "line": 81, "col": 4 }, "3.1.1": { "line": 83, "col": 6 }, "3.1.2": { "line": 84, "col": 24 }, "3.1.3": { "line": 84, "col": 6 }, "3.1.4": { "line": 88, "col": 6 }, "3.1.5": { "line": 89, "col": 6 }, "3.1": { "line": 82, "col": 4 }, "3.3": { "line": 99, "col": 11 }, "3.4": { "line": 101, "col": 8 }, "3.5": { "line": 95, "col": 4 }, "3.6": { "line": 104, "col": 4 }, "3.7.0": { "line": 106, "col": 6 }, "3.7.1": { "line": 107, "col": 6 }, "3.7": { "line": 105, "col": 4 }, "3.8": { "line": 109, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:promptText": { "1": { "line": 117, "col": 9 }, "2": { "line": 117, "col": 9 }, "3": { "line": 117, "col": 2 }, "2.0": { "line": 117, "col": 9 }, "2.1": { "line": 118, "col": 20 }, "2.2": { "line": 118, "col": 20 }, "2.3": { "line": 117, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:replyText": { "1": { "line": 125, "col": 6 }, "2": { "line": 125, "col": 2 }, "3": { "line": 128, "col": 2 }, "2.0": { "line": 126, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:researchTurn": { "1": { "line": 132, "col": 37 }, "2": { "line": 132, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:oracleTurn": { "1": { "line": 140, "col": 2 }, "2": { "line": 141, "col": 2 }, "3": { "line": 144, "col": 2 }, "2.0": { "line": 142, "col": 36 }, "2.1": { "line": 142, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:explorerTurn": { "1": { "line": 148, "col": 2 }, "2": { "line": 149, "col": 2 }, "3": { "line": 152, "col": 2 }, "2.0": { "line": 150, "col": 38 }, "2.1": { "line": 150, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorRunTurn": { "1": { "line": 159, "col": 9 }, "2": { "line": 159, "col": 2 }, "1.0": { "line": 160, "col": 24 }, "1.1": { "line": 160, "col": 14 }, "1.2": { "line": 160, "col": 14 }, "1.3": { "line": 161, "col": 31 }, "1.4": { "line": 161, "col": 18 }, "1.5": { "line": 161, "col": 18 }, "1.6": { "line": 162, "col": 27 }, "1.7": { "line": 162, "col": 16 }, "1.8": { "line": 162, "col": 16 }, "1.9": { "line": 163, "col": 31 }, "1.10": { "line": 163, "col": 18 }, "1.11": { "line": 163, "col": 18 }, "1.12": { "line": 164, "col": 28 }, "1.13": { "line": 164, "col": 16 }, "1.14": { "line": 164, "col": 16 }, "1.15": { "line": 165, "col": 30 }, "1.16": { "line": 165, "col": 17 }, "1.17": { "line": 165, "col": 17 }, "1.18": { "line": 166, "col": 30 }, "1.19": { "line": 166, "col": 17 }, "1.20": { "line": 166, "col": 17 }, "1.21": { "line": 167, "col": 9 }, "1.22": { "line": 167, "col": 9 } }, "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorBrain": { "1": { "line": 172, "col": 2 } } };
|
|
2106
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "
|
|
2079
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "6898ad0d7f112a9c4b25c1cb2c377c389acb4a192388dba4526e85e789b9aeb2", import.meta.url);
|
|
2107
2080
|
export {
|
|
2108
2081
|
__getCheckpoints,
|
|
2109
2082
|
__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", "3c0fd0eedec77cd64736a9a6acf171b30556638693b7c1cd27269d7a73eefb89", 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", "0bbdccc56ac73aa9ed4cc214ab23f89a3d6675d5eefdea8c754a79931d1179c0", import.meta.url);
|
|
850
839
|
export {
|
|
851
840
|
__getCheckpoints,
|
|
852
841
|
__invokeFunction,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
__registerGlobalsInit,
|
|
37
37
|
__registerCallbacksInit,
|
|
38
38
|
registerModuleFingerprint as __registerModuleFingerprint,
|
|
39
|
-
|
|
39
|
+
runtimeFailure,
|
|
40
40
|
__eq,
|
|
41
41
|
AgencyFunction as __AgencyFunction,
|
|
42
42
|
__call,
|
|
@@ -95,8 +95,8 @@ const graph = __globalCtx.graph;
|
|
|
95
95
|
function approve(value) {
|
|
96
96
|
return { type: "approve", value };
|
|
97
97
|
}
|
|
98
|
-
function reject(
|
|
99
|
-
return { type: "reject", value };
|
|
98
|
+
function reject(reason) {
|
|
99
|
+
return { type: "reject", value: reason };
|
|
100
100
|
}
|
|
101
101
|
function propagate() {
|
|
102
102
|
return { type: "propagate" };
|
|
@@ -299,7 +299,7 @@ graph.node("main", async (__state) => {
|
|
|
299
299
|
}
|
|
300
300
|
return {
|
|
301
301
|
messages: __threads(),
|
|
302
|
-
data:
|
|
302
|
+
data: runtimeFailure(__error, { functionName: "main" })
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
});
|
|
@@ -454,7 +454,7 @@ graph.node("categorize", async (__state) => {
|
|
|
454
454
|
}
|
|
455
455
|
return {
|
|
456
456
|
messages: __threads(),
|
|
457
|
-
data:
|
|
457
|
+
data: runtimeFailure(__error, { functionName: "categorize" })
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
460
|
});
|
|
@@ -538,7 +538,7 @@ graph.node("scrapeRecipe", async (__state) => {
|
|
|
538
538
|
}
|
|
539
539
|
return {
|
|
540
540
|
messages: __threads(),
|
|
541
|
-
data:
|
|
541
|
+
data: runtimeFailure(__error, { functionName: "scrapeRecipe" })
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
544
|
});
|
|
@@ -622,7 +622,7 @@ graph.node("createIngredients", async (__state) => {
|
|
|
622
622
|
}
|
|
623
623
|
return {
|
|
624
624
|
messages: __threads(),
|
|
625
|
-
data:
|
|
625
|
+
data: runtimeFailure(__error, { functionName: "createIngredients" })
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
628
|
});
|
|
@@ -706,7 +706,7 @@ graph.node("createMeals", async (__state) => {
|
|
|
706
706
|
}
|
|
707
707
|
return {
|
|
708
708
|
messages: __threads(),
|
|
709
|
-
data:
|
|
709
|
+
data: runtimeFailure(__error, { functionName: "createMeals" })
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
712
|
});
|
|
@@ -811,7 +811,7 @@ Agent crashed: ${__error.message}`);
|
|
|
811
811
|
}
|
|
812
812
|
var stdin_default = graph;
|
|
813
813
|
const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency:main": { "1": { "line": 1, "col": 2 }, "2": { "line": 2, "col": 2 }, "3": { "line": 3, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency:categorize": { "1": { "line": 10, "col": 2 }, "2": { "line": 18, "col": 2 }, "3": { "line": 20, "col": 2 }, "4": { "line": 23, "col": 2 }, "5": { "line": 26, "col": 2 }, "3.0": { "line": 21, "col": 4 }, "4.0": { "line": 24, "col": 4 }, "5.0": { "line": 27, "col": 4 } }, "dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency:scrapeRecipe": { "1": { "line": 32, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency:createIngredients": { "1": { "line": 37, "col": 2 } }, "dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency:createMeals": { "1": { "line": 42, "col": 2 } } };
|
|
814
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency", "
|
|
814
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.agency", "75c56428dd9516bf01a33c05ed7ebd04a0dc32d2a5da38050a87bcf83ca3788b", import.meta.url);
|
|
815
815
|
export {
|
|
816
816
|
__categorizeNodeParams,
|
|
817
817
|
__createIngredientsNodeParams,
|