agency-lang 0.20.0 → 0.21.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 +7 -14
- package/dist/lib/agents/agency-agent/agent.js +154 -110
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency +49 -8
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.js +488 -85
- package/dist/lib/agents/agency-agent/brains/coordinator/learn.agency +59 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/learn.js +669 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/bundledSkills.agency +26 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/bundledSkills.js +401 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/presetTools.agency +122 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/presetTools.js +1545 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-large.md +28 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/main-small.md +14 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/skills/presets.md +60 -0
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.agency +9 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.js +19 -5
- package/dist/lib/agents/agency-agent/lib/agentSource.agency +11 -0
- package/dist/lib/agents/agency-agent/lib/agentSource.js +230 -0
- package/dist/lib/agents/agency-agent/lib/args.agency +4 -0
- package/dist/lib/agents/agency-agent/lib/args.js +6 -2
- package/dist/lib/agents/agency-agent/lib/commandPalette.agency +2 -0
- package/dist/lib/agents/agency-agent/lib/commandPalette.js +4 -2
- package/dist/lib/agents/agency-agent/lib/config.agency +7 -0
- package/dist/lib/agents/agency-agent/lib/config.js +119 -3
- package/dist/lib/agents/agency-agent/lib/header.agency +5 -0
- package/dist/lib/agents/agency-agent/lib/header.js +40 -7
- package/dist/lib/agents/agency-agent/lib/learned.agency +104 -0
- package/dist/lib/agents/agency-agent/lib/learned.js +1587 -0
- package/dist/lib/agents/agency-agent/lib/modelRequest.agency +243 -0
- package/dist/lib/agents/agency-agent/lib/modelRequest.js +2701 -0
- package/dist/lib/agents/agency-agent/lib/presetRules.agency +193 -0
- package/dist/lib/agents/agency-agent/lib/presetRules.js +3423 -0
- package/dist/lib/agents/agency-agent/lib/presets.agency +377 -0
- package/dist/lib/agents/agency-agent/lib/presets.js +5259 -0
- package/dist/lib/agents/agency-agent/lib/repl.agency +68 -15
- package/dist/lib/agents/agency-agent/lib/repl.js +932 -193
- package/dist/lib/agents/agency-agent/lib/resolution.agency +27 -36
- package/dist/lib/agents/agency-agent/lib/resolution.js +338 -170
- package/dist/lib/agents/agency-agent/lib/session.agency +217 -147
- package/dist/lib/agents/agency-agent/lib/session.js +2990 -1434
- package/dist/lib/agents/agency-agent/lib/settings.agency +69 -47
- package/dist/lib/agents/agency-agent/lib/settings.js +790 -231
- package/dist/lib/agents/agency-agent/lib/slashCommands/policy.agency +55 -0
- package/dist/lib/agents/agency-agent/lib/slashCommands/policy.js +828 -0
- package/dist/lib/agents/agency-agent/lib/toolLimits.agency +62 -0
- package/dist/lib/agents/agency-agent/lib/toolLimits.js +797 -0
- package/dist/lib/agents/agency-agent/lib/turn.agency +7 -0
- package/dist/lib/agents/agency-agent/lib/turn.js +103 -3
- package/dist/lib/agents/agency-agent/shared.agency +45 -75
- package/dist/lib/agents/agency-agent/shared.js +281 -291
- package/dist/lib/analysis/interrupts.d.ts +1 -1
- package/dist/lib/backends/agencyGenerator.d.ts +1 -1
- package/dist/lib/backends/agencyGenerator.js +2 -2
- package/dist/lib/backends/typescriptBuilder.d.ts +1 -1
- package/dist/lib/backends/typescriptBuilder.js +4 -4
- package/dist/lib/backends/typescriptGenerator/builtins.js +1 -1
- package/dist/lib/backends/typescriptGenerator.d.ts +1 -1
- package/dist/lib/cli/agent.d.ts +1 -1
- package/dist/lib/cli/commands.d.ts +11 -2
- package/dist/lib/cli/commands.js +24 -10
- package/dist/lib/cli/coverage.d.ts +1 -1
- package/dist/lib/cli/debug.d.ts +1 -1
- package/dist/lib/cli/deploy/bundle.d.ts +1 -1
- package/dist/lib/cli/deploy/deploy.d.ts +1 -1
- package/dist/lib/cli/doc.d.ts +1 -1
- package/dist/lib/cli/docLedger.d.ts +1 -1
- package/dist/lib/cli/doctor.d.ts +1 -1
- package/dist/lib/cli/eval/grade.d.ts +1 -1
- package/dist/lib/cli/eval/ls.d.ts +1 -1
- package/dist/lib/cli/eval/optimize.d.ts +1 -1
- package/dist/lib/cli/eval/run.d.ts +1 -1
- package/dist/lib/cli/help.js +1 -1
- package/dist/lib/cli/interrupts.d.ts +1 -1
- package/dist/lib/cli/literate.d.ts +1 -1
- package/dist/lib/cli/local.d.ts +10 -9
- package/dist/lib/cli/local.js +46 -30
- package/dist/lib/cli/localFlag.d.ts +1 -1
- package/dist/lib/cli/logsView.d.ts +1 -1
- package/dist/lib/cli/mcp.d.ts +6 -6
- package/dist/lib/cli/mcp.js +30 -10
- package/dist/lib/cli/modelFlag.d.ts +1 -1
- package/dist/lib/cli/moduleTypeWarning.d.ts +16 -0
- package/dist/lib/cli/moduleTypeWarning.js +67 -0
- package/dist/lib/cli/pack.d.ts +1 -1
- package/dist/lib/cli/policy.d.ts +1 -1
- package/dist/lib/cli/precompile.d.ts +1 -1
- package/dist/lib/cli/precompile.js +5 -16
- package/dist/lib/cli/remote/commands/util.d.ts +1 -1
- package/dist/lib/cli/remote/exportedEndpoints.d.ts +1 -1
- package/dist/lib/cli/review.d.ts +1 -1
- package/dist/lib/cli/runAgencyAgent.d.ts +1 -1
- package/dist/lib/cli/runBundledAgent.d.ts +1 -1
- package/dist/lib/cli/runBundledAgent.js +1 -1
- package/dist/lib/cli/stageConfiguredAgent.js +1 -1
- package/dist/lib/cli/test.d.ts +1 -1
- package/dist/lib/cli/test.js +8 -21
- package/dist/lib/cli/util.d.ts +3 -2
- package/dist/lib/cli/util.js +8 -6
- package/dist/lib/cli/watch.d.ts +1 -1
- package/dist/lib/compiler/buildManifest.js +1 -1
- package/dist/lib/compiler/buildSession.d.ts +8 -1
- package/dist/lib/compiler/buildSession.js +13 -11
- package/dist/lib/compiler/compile.d.ts +1 -1
- package/dist/lib/compiler/compileClosure.d.ts +1 -1
- package/dist/lib/compiler/defaultSession.d.ts +1 -1
- package/dist/lib/compiler/depFingerprint.d.ts +1 -1
- package/dist/lib/compiler/manifestTracker.d.ts +1 -1
- package/dist/lib/compiler/splice/cache.d.ts +1 -1
- package/dist/lib/compiler/splice/eligibility.d.ts +1 -1
- package/dist/lib/compiler/splice/generatorEffects.d.ts +1 -1
- package/dist/lib/compiler/splice/runGenerator.d.ts +1 -1
- package/dist/lib/compiler/typecheck.d.ts +1 -1
- package/dist/lib/{config.d.ts → config/config.d.ts} +34 -18
- package/dist/lib/{config.js → config/config.js} +42 -68
- package/dist/lib/config/mcpServers.d.ts +30 -0
- package/dist/lib/config/mcpServers.js +79 -0
- package/dist/lib/config/merge.d.ts +13 -0
- package/dist/lib/config/merge.js +51 -0
- package/dist/lib/config/paths.d.ts +7 -0
- package/dist/lib/config/paths.js +62 -0
- package/dist/lib/config/public.d.ts +2 -0
- package/dist/lib/config/public.js +3 -0
- package/dist/lib/config/target.d.ts +30 -0
- package/dist/lib/config/target.js +64 -0
- package/dist/lib/eval/grading/agencyRunner.d.ts +1 -1
- package/dist/lib/eval/grading/gradeRun.d.ts +1 -1
- package/dist/lib/eval/grading/gradeSuite.d.ts +1 -1
- package/dist/lib/eval/grading/gradingModule.d.ts +1 -1
- package/dist/lib/eval/run/batchBudget.d.ts +1 -1
- package/dist/lib/eval/run/runAgent.d.ts +1 -1
- package/dist/lib/eval/run/runSuite.d.ts +1 -1
- package/dist/lib/eval/run/seed.d.ts +1 -1
- package/dist/lib/eval/run/seed.js +2 -1
- package/dist/lib/eval/run/spawnRunner.js +1 -1
- package/dist/lib/eval/run/subprocess.d.ts +1 -1
- package/dist/lib/eval/run/subprocess.js +1 -1
- package/dist/lib/formatter.d.ts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/linter/registry.d.ts +1 -1
- package/dist/lib/logsViewer/conversation.d.ts +2 -0
- package/dist/lib/logsViewer/conversation.js +13 -2
- package/dist/lib/logsViewer/search.js +15 -0
- package/dist/lib/logsViewer/thresholds.js +1 -1
- package/dist/lib/logsViewer/treeRows.js +59 -14
- package/dist/lib/logsViewer/types.d.ts +1 -1
- package/dist/lib/logsViewer/views/treeReducer.js +7 -2
- package/dist/lib/lsp/diagnostics.d.ts +1 -1
- package/dist/lib/lsp/formatting.d.ts +1 -1
- package/dist/lib/lsp/server.js +13 -9
- package/dist/lib/lsp/workspace.d.ts +2 -1
- package/dist/lib/lsp/workspace.js +14 -5
- package/dist/lib/optimize/mutator.d.ts +1 -1
- package/dist/lib/optimize/mutator.js +1 -1
- package/dist/lib/optimize/optimizer.d.ts +1 -1
- package/dist/lib/parseCache.d.ts +1 -1
- package/dist/lib/parser.d.ts +1 -1
- package/dist/lib/preprocessors/expandSplices.d.ts +1 -1
- package/dist/lib/preprocessors/expandSplices.js +1 -1
- package/dist/lib/preprocessors/typescriptPreprocessor.d.ts +1 -1
- package/dist/lib/preprocessors/typescriptPreprocessor.js +1 -1
- package/dist/lib/runDirectory/codeIdentity.d.ts +1 -1
- package/dist/lib/runDirectory/codeIdentity.js +1 -1
- package/dist/lib/runtime/agencyFunction.d.ts +8 -0
- package/dist/lib/runtime/agencyFunction.js +18 -0
- package/dist/lib/runtime/builtinPolicies.js +65 -20
- package/dist/lib/runtime/cliInterruptResolution.d.ts +2 -2
- package/dist/lib/runtime/configOverrides.d.ts +2 -2
- package/dist/lib/runtime/configOverrides.js +1 -1
- package/dist/lib/runtime/cost.d.ts +3 -1
- package/dist/lib/runtime/cost.js +3 -1
- package/dist/lib/runtime/costTelemetry.d.ts +2 -2
- package/dist/lib/runtime/costTelemetry.js +2 -2
- package/dist/lib/runtime/index.d.ts +1 -1
- package/dist/lib/runtime/interrupts.d.ts +6 -5
- package/dist/lib/runtime/interrupts.js +25 -23
- package/dist/lib/runtime/invocationOptions.d.ts +1 -1
- package/dist/lib/runtime/invocationUsage.d.ts +47 -20
- package/dist/lib/runtime/invocationUsage.js +104 -42
- package/dist/lib/runtime/ipc.d.ts +2 -2
- package/dist/lib/runtime/ipc.js +1 -1
- package/dist/lib/runtime/memory/manager.js +3 -4
- package/dist/lib/runtime/memory/types.d.ts +1 -1
- package/dist/lib/runtime/node.d.ts +4 -4
- package/dist/lib/runtime/node.js +20 -34
- package/dist/lib/runtime/pause.d.ts +2 -2
- package/dist/lib/runtime/policy.d.ts +3 -2
- package/dist/lib/runtime/policy.js +3 -2
- package/dist/lib/runtime/policyUpdate.d.ts +14 -0
- package/dist/lib/runtime/policyUpdate.js +50 -0
- package/dist/lib/runtime/recordPaidUsage.d.ts +3 -6
- package/dist/lib/runtime/recordPaidUsage.js +7 -13
- package/dist/lib/runtime/replyAttachments.js +1 -1
- package/dist/lib/runtime/resumeSetup.d.ts +7 -0
- package/dist/lib/runtime/resumeSetup.js +26 -0
- package/dist/lib/runtime/rewind.js +2 -6
- package/dist/lib/runtime/servedInvocationLifecycle.js +1 -1
- package/dist/lib/runtime/simpleOpenAIClient.js +1 -1
- package/dist/lib/runtime/state/checkpointStore.d.ts +6 -0
- package/dist/lib/runtime/state/checkpointStore.js +12 -0
- package/dist/lib/runtime/state/context.js +7 -3
- package/dist/lib/runtime/state/schemas.d.ts +2 -0
- package/dist/lib/runtime/state/schemas.js +1 -0
- package/dist/lib/runtime/subprocess-bootstrap.js +1 -1
- package/dist/lib/runtime/types.d.ts +9 -6
- package/dist/lib/runtime/utils.d.ts +2 -2
- package/dist/lib/runtime/utils.js +0 -1
- package/dist/lib/serve/http/adapter.d.ts +2 -3
- package/dist/lib/serve/http/adapter.js +0 -1
- package/dist/lib/serve/metadata.d.ts +1 -1
- package/dist/lib/serve/testOutcome.d.ts +2 -2
- package/dist/lib/serve/testOutcome.js +21 -24
- package/dist/lib/stdlib/abortReason.d.ts +5 -0
- package/dist/lib/stdlib/abortReason.js +11 -0
- package/dist/lib/stdlib/cli.d.ts +5 -0
- package/dist/lib/stdlib/cli.js +42 -10
- package/dist/lib/stdlib/embedding.js +0 -5
- package/dist/lib/stdlib/ffmpeg.d.ts +20 -0
- package/dist/lib/stdlib/ffmpeg.js +152 -0
- package/dist/lib/stdlib/image.js +1 -3
- package/dist/lib/stdlib/localModels.d.ts +21 -19
- package/dist/lib/stdlib/localModels.js +71 -62
- package/dist/lib/stdlib/mcp.d.ts +9 -9
- package/dist/lib/stdlib/mcp.js +2 -4
- package/dist/lib/stdlib/policy.d.ts +1 -0
- package/dist/lib/stdlib/policy.js +1 -0
- package/dist/lib/stdlib/speech.d.ts +8 -8
- package/dist/lib/stdlib/speech.js +72 -34
- package/dist/lib/stdlib/thread.d.ts +9 -9
- package/dist/lib/stdlib/thread.js +20 -11
- package/dist/lib/symbolTable.d.ts +1 -1
- package/dist/lib/typeChecker/builtins.d.ts +1 -1
- package/dist/lib/typeChecker/builtins.js +1 -1
- package/dist/lib/typeChecker/index.d.ts +1 -1
- package/dist/lib/typeChecker/resolveVariable.js +1 -1
- package/dist/lib/typeChecker/templateNames.d.ts +1 -1
- package/dist/lib/typeChecker/testUtils.d.ts +1 -1
- package/dist/lib/typeChecker/types.d.ts +1 -1
- package/dist/lib/utils.d.ts +0 -8
- package/dist/lib/utils.js +0 -35
- package/dist/scripts/agency.js +41 -23
- package/package.json +6 -1
- package/stdlib/agency/local.agency +1 -1
- package/stdlib/agency/local.js +2 -2
- package/stdlib/agents/agency/review.agency +20 -14
- package/stdlib/agents/agency/review.js +235 -72
- package/stdlib/docs/cli/config.md +36 -0
- package/stdlib/docs/guide/agency-config-file.md +37 -2
- package/stdlib/docs/guide/error-handling.md +3 -4
- package/stdlib/docs/guide/mcp.md +3 -1
- package/stdlib/docs/stdlib/agency/local.md +1 -1
- package/stdlib/docs/stdlib/agents/agency/review.md +1 -1
- package/stdlib/docs/stdlib/policy.md +77 -29
- package/stdlib/docs/stdlib/skills.md +10 -0
- package/stdlib/docs/stdlib/speech.md +19 -10
- package/stdlib/docs/stdlib/thread.md +16 -13
- package/stdlib/docs/stdlib/toolbox.md +109 -16
- package/stdlib/policy.agency +364 -75
- package/stdlib/policy.js +2673 -853
- package/stdlib/skills.agency +1 -1
- package/stdlib/skills.js +29 -6
- package/stdlib/speech.agency +15 -5
- package/stdlib/speech.js +31 -16
- package/stdlib/thread.agency +8 -5
- package/stdlib/thread.js +7 -6
- package/stdlib/toolbox.agency +650 -77
- package/stdlib/toolbox.js +6101 -1950
|
@@ -14,10 +14,12 @@ import { mergedPalette } from "./lib/commandPalette.agency"
|
|
|
14
14
|
import { getHeader } from "./lib/header.agency"
|
|
15
15
|
import { maybeLoadMcp } from "./lib/mcp.agency"
|
|
16
16
|
import { printPolicyHelp } from "./lib/policy.agency"
|
|
17
|
+
import { activePreset, startPreset } from "./lib/presets.agency"
|
|
17
18
|
import { installSessionHooks, startInteractive } from "./lib/repl.agency"
|
|
18
19
|
import { chooseSession, startSession } from "./lib/resume.agency"
|
|
19
20
|
import { pickModelsForAgent, maybeEnableMemory } from "./lib/session.agency"
|
|
20
21
|
import { loadSettings } from "./lib/settings.agency"
|
|
22
|
+
import { applyToolLimits, limitFlagsFromArgs, setStartupLimitFlags } from "./lib/toolLimits.agency"
|
|
21
23
|
import { setDebug, setVerbose, setInteractive } from "./lib/trace.agency"
|
|
22
24
|
import {
|
|
23
25
|
setBrain,
|
|
@@ -28,7 +30,7 @@ import {
|
|
|
28
30
|
resolveStartTarget,
|
|
29
31
|
} from "./lib/turn.agency"
|
|
30
32
|
import { formatTurnFailure } from "./lib/utils.agency"
|
|
31
|
-
import {
|
|
33
|
+
import { getCapabilities } from "./shared.agency"
|
|
32
34
|
|
|
33
35
|
// UI mode select — one-line swap between the alt-screen TUI and the
|
|
34
36
|
// line-mode REPL. Both modules expose the same `repl` / `pushMessage`
|
|
@@ -136,6 +138,8 @@ node main() {
|
|
|
136
138
|
startAgent = resolvedStartTarget
|
|
137
139
|
}
|
|
138
140
|
|
|
141
|
+
// The preset must be chosen before models resolve: it is one of their layers.
|
|
142
|
+
startPreset(args.flags.preset ?? "", loadSettings())
|
|
139
143
|
pickModelsForAgent(args)
|
|
140
144
|
|
|
141
145
|
// Persistent knowledge graph, gated on the capability profile. Must run
|
|
@@ -146,19 +150,8 @@ node main() {
|
|
|
146
150
|
// coordinator. Must run before the first turn (mcpTools ordering contract).
|
|
147
151
|
maybeLoadMcp(loadSettings())
|
|
148
152
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
isOneShot,
|
|
152
|
-
)
|
|
153
|
-
setLlmOptions({
|
|
154
|
-
maxToolCallRounds: maxRounds
|
|
155
|
-
})
|
|
156
|
-
const maxResultChars = args.flags["max-tool-result-chars"]
|
|
157
|
-
if (maxResultChars != null) {
|
|
158
|
-
setLlmOptions({
|
|
159
|
-
maxToolResultChars: maxResultChars
|
|
160
|
-
})
|
|
161
|
-
}
|
|
153
|
+
setStartupLimitFlags(limitFlagsFromArgs(args))
|
|
154
|
+
applyToolLimits(activePreset(), isOneShot)
|
|
162
155
|
|
|
163
156
|
const capsMaxTokens = getCapabilities().maxTokens
|
|
164
157
|
if (capsMaxTokens != null) {
|
|
@@ -14,14 +14,16 @@ import { mergedPalette } from "./lib/commandPalette.js";
|
|
|
14
14
|
import { getHeader } from "./lib/header.js";
|
|
15
15
|
import { maybeLoadMcp } from "./lib/mcp.js";
|
|
16
16
|
import { printPolicyHelp } from "./lib/policy.js";
|
|
17
|
+
import { activePreset, startPreset } from "./lib/presets.js";
|
|
17
18
|
import { installSessionHooks, startInteractive } from "./lib/repl.js";
|
|
18
19
|
import { chooseSession, startSession } from "./lib/resume.js";
|
|
19
20
|
import { pickModelsForAgent, maybeEnableMemory } from "./lib/session.js";
|
|
20
21
|
import { loadSettings } from "./lib/settings.js";
|
|
22
|
+
import { applyToolLimits, limitFlagsFromArgs, setStartupLimitFlags } from "./lib/toolLimits.js";
|
|
21
23
|
import { setDebug, setVerbose, setInteractive } from "./lib/trace.js";
|
|
22
24
|
import { setBrain, runTurn, runSession, setPolicyArg, resolveBrainName, resolveStartTarget } from "./lib/turn.js";
|
|
23
25
|
import { formatTurnFailure } from "./lib/utils.js";
|
|
24
|
-
import {
|
|
26
|
+
import { getCapabilities } from "./shared.js";
|
|
25
27
|
import { fileURLToPath } from "url";
|
|
26
28
|
import __process from "process";
|
|
27
29
|
import { readFileSync } from "fs";
|
|
@@ -69,7 +71,6 @@ import {
|
|
|
69
71
|
stampFailureBoundary,
|
|
70
72
|
__tryCall,
|
|
71
73
|
__eq,
|
|
72
|
-
__nn,
|
|
73
74
|
AgencyFunction as __AgencyFunction,
|
|
74
75
|
__call,
|
|
75
76
|
__callMethod,
|
|
@@ -185,7 +186,7 @@ function registerTools(tools) {
|
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "
|
|
189
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "2b22b23fb06991c0126dc2154846365ebc1cb5c85005532280436b1b2191ae99", import.meta.url);
|
|
189
190
|
__registerTool(print);
|
|
190
191
|
__registerTool(printJSON);
|
|
191
192
|
__registerTool(input);
|
|
@@ -242,6 +243,8 @@ __registerTool(mergedPalette);
|
|
|
242
243
|
__registerTool(getHeader);
|
|
243
244
|
__registerTool(maybeLoadMcp);
|
|
244
245
|
__registerTool(printPolicyHelp);
|
|
246
|
+
__registerTool(activePreset);
|
|
247
|
+
__registerTool(startPreset);
|
|
245
248
|
__registerTool(installSessionHooks);
|
|
246
249
|
__registerTool(startInteractive);
|
|
247
250
|
__registerTool(chooseSession);
|
|
@@ -249,6 +252,9 @@ __registerTool(startSession);
|
|
|
249
252
|
__registerTool(pickModelsForAgent);
|
|
250
253
|
__registerTool(maybeEnableMemory);
|
|
251
254
|
__registerTool(loadSettings);
|
|
255
|
+
__registerTool(applyToolLimits);
|
|
256
|
+
__registerTool(limitFlagsFromArgs);
|
|
257
|
+
__registerTool(setStartupLimitFlags);
|
|
252
258
|
__registerTool(setDebug);
|
|
253
259
|
__registerTool(setVerbose);
|
|
254
260
|
__registerTool(setInteractive);
|
|
@@ -259,7 +265,6 @@ __registerTool(setPolicyArg);
|
|
|
259
265
|
__registerTool(resolveBrainName);
|
|
260
266
|
__registerTool(resolveStartTarget);
|
|
261
267
|
__registerTool(formatTurnFailure);
|
|
262
|
-
__registerTool(resolveMaxToolCallRounds);
|
|
263
268
|
__registerTool(getCapabilities);
|
|
264
269
|
async function __initializeGlobals(__ctx) {
|
|
265
270
|
if (__ctx.globals.isInitialized("dist/lib/agents/agency-agent/agent.agency")) {
|
|
@@ -1015,6 +1020,42 @@ graph.node("main", async (__state) => {
|
|
|
1015
1020
|
});
|
|
1016
1021
|
});
|
|
1017
1022
|
await runner.step(24, async (runner2) => {
|
|
1023
|
+
});
|
|
1024
|
+
await runner.step(25, async (runner2) => {
|
|
1025
|
+
__stack.locals.__hoist_6 = await __call(loadSettings, {
|
|
1026
|
+
type: "positional",
|
|
1027
|
+
args: []
|
|
1028
|
+
});
|
|
1029
|
+
if (hasInterrupts(__stack.locals.__hoist_6)) {
|
|
1030
|
+
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1031
|
+
runner2.halt({
|
|
1032
|
+
...__state,
|
|
1033
|
+
data: __stack.locals.__hoist_6
|
|
1034
|
+
});
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
if (isAborted(__stack.locals.__hoist_6)) {
|
|
1038
|
+
throw __stack.locals.__hoist_6.toError();
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
await runner.step(26, async (runner2) => {
|
|
1042
|
+
const __funcResult = await __call(startPreset, {
|
|
1043
|
+
type: "positional",
|
|
1044
|
+
args: [__stack.locals.args.flags.preset ?? ``, __stack.locals.__hoist_6]
|
|
1045
|
+
});
|
|
1046
|
+
if (hasInterrupts(__funcResult)) {
|
|
1047
|
+
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1048
|
+
runner2.halt({
|
|
1049
|
+
...__state,
|
|
1050
|
+
data: __funcResult
|
|
1051
|
+
});
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
if (isAborted(__funcResult)) {
|
|
1055
|
+
throw __funcResult.toError();
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
await runner.step(27, async (runner2) => {
|
|
1018
1059
|
const __funcResult = await __call(pickModelsForAgent, {
|
|
1019
1060
|
type: "positional",
|
|
1020
1061
|
args: [__stack.locals.args]
|
|
@@ -1031,7 +1072,7 @@ graph.node("main", async (__state) => {
|
|
|
1031
1072
|
throw __funcResult.toError();
|
|
1032
1073
|
}
|
|
1033
1074
|
});
|
|
1034
|
-
await runner.step(
|
|
1075
|
+
await runner.step(28, async (runner2) => {
|
|
1035
1076
|
const __funcResult = await __call(maybeEnableMemory, {
|
|
1036
1077
|
type: "positional",
|
|
1037
1078
|
args: []
|
|
@@ -1048,27 +1089,27 @@ graph.node("main", async (__state) => {
|
|
|
1048
1089
|
throw __funcResult.toError();
|
|
1049
1090
|
}
|
|
1050
1091
|
});
|
|
1051
|
-
await runner.step(
|
|
1052
|
-
__stack.locals.
|
|
1092
|
+
await runner.step(29, async (runner2) => {
|
|
1093
|
+
__stack.locals.__hoist_7 = await __call(loadSettings, {
|
|
1053
1094
|
type: "positional",
|
|
1054
1095
|
args: []
|
|
1055
1096
|
});
|
|
1056
|
-
if (hasInterrupts(__stack.locals.
|
|
1097
|
+
if (hasInterrupts(__stack.locals.__hoist_7)) {
|
|
1057
1098
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1058
1099
|
runner2.halt({
|
|
1059
1100
|
...__state,
|
|
1060
|
-
data: __stack.locals.
|
|
1101
|
+
data: __stack.locals.__hoist_7
|
|
1061
1102
|
});
|
|
1062
1103
|
return;
|
|
1063
1104
|
}
|
|
1064
|
-
if (isAborted(__stack.locals.
|
|
1065
|
-
throw __stack.locals.
|
|
1105
|
+
if (isAborted(__stack.locals.__hoist_7)) {
|
|
1106
|
+
throw __stack.locals.__hoist_7.toError();
|
|
1066
1107
|
}
|
|
1067
1108
|
});
|
|
1068
|
-
await runner.step(
|
|
1109
|
+
await runner.step(30, async (runner2) => {
|
|
1069
1110
|
const __funcResult = await __call(maybeLoadMcp, {
|
|
1070
1111
|
type: "positional",
|
|
1071
|
-
args: [__stack.locals.
|
|
1112
|
+
args: [__stack.locals.__hoist_7]
|
|
1072
1113
|
});
|
|
1073
1114
|
if (hasInterrupts(__funcResult)) {
|
|
1074
1115
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1082,29 +1123,27 @@ graph.node("main", async (__state) => {
|
|
|
1082
1123
|
throw __funcResult.toError();
|
|
1083
1124
|
}
|
|
1084
1125
|
});
|
|
1085
|
-
await runner.step(
|
|
1086
|
-
__stack.locals.
|
|
1126
|
+
await runner.step(31, async (runner2) => {
|
|
1127
|
+
__stack.locals.__hoist_8 = await __call(limitFlagsFromArgs, {
|
|
1087
1128
|
type: "positional",
|
|
1088
|
-
args: [
|
|
1129
|
+
args: [__stack.locals.args]
|
|
1089
1130
|
});
|
|
1090
|
-
if (hasInterrupts(__stack.locals.
|
|
1131
|
+
if (hasInterrupts(__stack.locals.__hoist_8)) {
|
|
1091
1132
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1092
1133
|
runner2.halt({
|
|
1093
1134
|
...__state,
|
|
1094
|
-
data: __stack.locals.
|
|
1135
|
+
data: __stack.locals.__hoist_8
|
|
1095
1136
|
});
|
|
1096
1137
|
return;
|
|
1097
1138
|
}
|
|
1098
|
-
if (isAborted(__stack.locals.
|
|
1099
|
-
throw __stack.locals.
|
|
1139
|
+
if (isAborted(__stack.locals.__hoist_8)) {
|
|
1140
|
+
throw __stack.locals.__hoist_8.toError();
|
|
1100
1141
|
}
|
|
1101
1142
|
});
|
|
1102
|
-
await runner.step(
|
|
1103
|
-
const __funcResult = await __call(
|
|
1143
|
+
await runner.step(32, async (runner2) => {
|
|
1144
|
+
const __funcResult = await __call(setStartupLimitFlags, {
|
|
1104
1145
|
type: "positional",
|
|
1105
|
-
args: [
|
|
1106
|
-
"maxToolCallRounds": __stack.locals.maxRounds
|
|
1107
|
-
}]
|
|
1146
|
+
args: [__stack.locals.__hoist_8]
|
|
1108
1147
|
});
|
|
1109
1148
|
if (hasInterrupts(__funcResult)) {
|
|
1110
1149
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1118,56 +1157,61 @@ graph.node("main", async (__state) => {
|
|
|
1118
1157
|
throw __funcResult.toError();
|
|
1119
1158
|
}
|
|
1120
1159
|
});
|
|
1121
|
-
await runner.step(
|
|
1122
|
-
__stack.locals.
|
|
1160
|
+
await runner.step(33, async (runner2) => {
|
|
1161
|
+
__stack.locals.__hoist_9 = await __call(activePreset, {
|
|
1162
|
+
type: "positional",
|
|
1163
|
+
args: []
|
|
1164
|
+
});
|
|
1165
|
+
if (hasInterrupts(__stack.locals.__hoist_9)) {
|
|
1166
|
+
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1167
|
+
runner2.halt({
|
|
1168
|
+
...__state,
|
|
1169
|
+
data: __stack.locals.__hoist_9
|
|
1170
|
+
});
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
if (isAborted(__stack.locals.__hoist_9)) {
|
|
1174
|
+
throw __stack.locals.__hoist_9.toError();
|
|
1175
|
+
}
|
|
1123
1176
|
});
|
|
1124
|
-
await runner.
|
|
1125
|
-
{
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1137
|
-
runner3.halt({
|
|
1138
|
-
...__state,
|
|
1139
|
-
data: __funcResult
|
|
1140
|
-
});
|
|
1141
|
-
return;
|
|
1142
|
-
}
|
|
1143
|
-
if (isAborted(__funcResult)) {
|
|
1144
|
-
throw __funcResult.toError();
|
|
1145
|
-
}
|
|
1146
|
-
});
|
|
1147
|
-
}
|
|
1177
|
+
await runner.step(34, async (runner2) => {
|
|
1178
|
+
const __funcResult = await __call(applyToolLimits, {
|
|
1179
|
+
type: "positional",
|
|
1180
|
+
args: [__stack.locals.__hoist_9, __stack.locals.isOneShot]
|
|
1181
|
+
});
|
|
1182
|
+
if (hasInterrupts(__funcResult)) {
|
|
1183
|
+
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1184
|
+
runner2.halt({
|
|
1185
|
+
...__state,
|
|
1186
|
+
data: __funcResult
|
|
1187
|
+
});
|
|
1188
|
+
return;
|
|
1148
1189
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1190
|
+
if (isAborted(__funcResult)) {
|
|
1191
|
+
throw __funcResult.toError();
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1194
|
+
await runner.step(35, async (runner2) => {
|
|
1195
|
+
__stack.locals.__hoist_10 = await __call(getCapabilities, {
|
|
1152
1196
|
type: "positional",
|
|
1153
1197
|
args: []
|
|
1154
1198
|
});
|
|
1155
|
-
if (hasInterrupts(__stack.locals.
|
|
1199
|
+
if (hasInterrupts(__stack.locals.__hoist_10)) {
|
|
1156
1200
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1157
1201
|
runner2.halt({
|
|
1158
1202
|
...__state,
|
|
1159
|
-
data: __stack.locals.
|
|
1203
|
+
data: __stack.locals.__hoist_10
|
|
1160
1204
|
});
|
|
1161
1205
|
return;
|
|
1162
1206
|
}
|
|
1163
|
-
if (isAborted(__stack.locals.
|
|
1164
|
-
throw __stack.locals.
|
|
1207
|
+
if (isAborted(__stack.locals.__hoist_10)) {
|
|
1208
|
+
throw __stack.locals.__hoist_10.toError();
|
|
1165
1209
|
}
|
|
1166
1210
|
});
|
|
1167
|
-
await runner.step(
|
|
1168
|
-
__stack.locals.capsMaxTokens = __stack.locals.
|
|
1211
|
+
await runner.step(36, async (runner2) => {
|
|
1212
|
+
__stack.locals.capsMaxTokens = __stack.locals.__hoist_10.maxTokens;
|
|
1169
1213
|
});
|
|
1170
|
-
await runner.ifElse(
|
|
1214
|
+
await runner.ifElse(37, [
|
|
1171
1215
|
{
|
|
1172
1216
|
condition: async () => !__eq(__stack.locals.capsMaxTokens, null),
|
|
1173
1217
|
body: async (runner2) => {
|
|
@@ -1193,27 +1237,27 @@ graph.node("main", async (__state) => {
|
|
|
1193
1237
|
}
|
|
1194
1238
|
}
|
|
1195
1239
|
]);
|
|
1196
|
-
await runner.step(
|
|
1197
|
-
__stack.locals.
|
|
1240
|
+
await runner.step(38, async (runner2) => {
|
|
1241
|
+
__stack.locals.__hoist_11 = await __call(cwd, {
|
|
1198
1242
|
type: "positional",
|
|
1199
1243
|
args: []
|
|
1200
1244
|
});
|
|
1201
|
-
if (hasInterrupts(__stack.locals.
|
|
1245
|
+
if (hasInterrupts(__stack.locals.__hoist_11)) {
|
|
1202
1246
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1203
1247
|
runner2.halt({
|
|
1204
1248
|
...__state,
|
|
1205
|
-
data: __stack.locals.
|
|
1249
|
+
data: __stack.locals.__hoist_11
|
|
1206
1250
|
});
|
|
1207
1251
|
return;
|
|
1208
1252
|
}
|
|
1209
|
-
if (isAborted(__stack.locals.
|
|
1210
|
-
throw __stack.locals.
|
|
1253
|
+
if (isAborted(__stack.locals.__hoist_11)) {
|
|
1254
|
+
throw __stack.locals.__hoist_11.toError();
|
|
1211
1255
|
}
|
|
1212
1256
|
});
|
|
1213
|
-
await runner.step(
|
|
1257
|
+
await runner.step(39, async (runner2) => {
|
|
1214
1258
|
const __funcResult = await __call(setAgentCwd, {
|
|
1215
1259
|
type: "positional",
|
|
1216
|
-
args: [__stack.locals.
|
|
1260
|
+
args: [__stack.locals.__hoist_11]
|
|
1217
1261
|
});
|
|
1218
1262
|
if (hasInterrupts(__funcResult)) {
|
|
1219
1263
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1227,12 +1271,12 @@ graph.node("main", async (__state) => {
|
|
|
1227
1271
|
throw __funcResult.toError();
|
|
1228
1272
|
}
|
|
1229
1273
|
});
|
|
1230
|
-
await runner.ifElse(
|
|
1274
|
+
await runner.ifElse(40, [
|
|
1231
1275
|
{
|
|
1232
1276
|
condition: async () => __stack.locals.isOneShot && (__stack.locals.args.flags.continue || !__eq(__stack.locals.args.flags.resume, null)),
|
|
1233
1277
|
body: async (runner2) => {
|
|
1234
1278
|
await runner2.step(0, async (runner3) => {
|
|
1235
|
-
__stack.locals.
|
|
1279
|
+
__stack.locals.__hoist_12 = await __callMethod(color, "red", {
|
|
1236
1280
|
type: "positional",
|
|
1237
1281
|
args: [`--continue and --resume need an interactive session; one-shot runs are not saved.`]
|
|
1238
1282
|
});
|
|
@@ -1240,7 +1284,7 @@ graph.node("main", async (__state) => {
|
|
|
1240
1284
|
await runner2.step(1, async (runner3) => {
|
|
1241
1285
|
const __funcResult = await __call(print, {
|
|
1242
1286
|
type: "positional",
|
|
1243
|
-
args: [__stack.locals.
|
|
1287
|
+
args: [__stack.locals.__hoist_12]
|
|
1244
1288
|
});
|
|
1245
1289
|
if (hasInterrupts(__funcResult)) {
|
|
1246
1290
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1263,9 +1307,9 @@ graph.node("main", async (__state) => {
|
|
|
1263
1307
|
}
|
|
1264
1308
|
}
|
|
1265
1309
|
]);
|
|
1266
|
-
await runner.step(
|
|
1310
|
+
await runner.step(41, async (runner2) => {
|
|
1267
1311
|
});
|
|
1268
|
-
await runner.ifElse(
|
|
1312
|
+
await runner.ifElse(42, [
|
|
1269
1313
|
{
|
|
1270
1314
|
condition: async () => !__stack.locals.isOneShot,
|
|
1271
1315
|
body: async (runner2) => {
|
|
@@ -1287,26 +1331,26 @@ graph.node("main", async (__state) => {
|
|
|
1287
1331
|
}
|
|
1288
1332
|
});
|
|
1289
1333
|
await runner2.step(1, async (runner3) => {
|
|
1290
|
-
__stack.locals.
|
|
1334
|
+
__stack.locals.__hoist_13 = await __call(mergedPalette, {
|
|
1291
1335
|
type: "positional",
|
|
1292
1336
|
args: []
|
|
1293
1337
|
});
|
|
1294
|
-
if (hasInterrupts(__stack.locals.
|
|
1338
|
+
if (hasInterrupts(__stack.locals.__hoist_13)) {
|
|
1295
1339
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1296
1340
|
runner3.halt({
|
|
1297
1341
|
...__state,
|
|
1298
|
-
data: __stack.locals.
|
|
1342
|
+
data: __stack.locals.__hoist_13
|
|
1299
1343
|
});
|
|
1300
1344
|
return;
|
|
1301
1345
|
}
|
|
1302
|
-
if (isAborted(__stack.locals.
|
|
1303
|
-
throw __stack.locals.
|
|
1346
|
+
if (isAborted(__stack.locals.__hoist_13)) {
|
|
1347
|
+
throw __stack.locals.__hoist_13.toError();
|
|
1304
1348
|
}
|
|
1305
1349
|
});
|
|
1306
1350
|
await runner2.step(2, async (runner3) => {
|
|
1307
1351
|
const __funcResult = await __call(setSlashPalette, {
|
|
1308
1352
|
type: "positional",
|
|
1309
|
-
args: [__stack.locals.
|
|
1353
|
+
args: [__stack.locals.__hoist_13]
|
|
1310
1354
|
});
|
|
1311
1355
|
if (hasInterrupts(__funcResult)) {
|
|
1312
1356
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1321,26 +1365,26 @@ graph.node("main", async (__state) => {
|
|
|
1321
1365
|
}
|
|
1322
1366
|
});
|
|
1323
1367
|
await runner2.step(3, async (runner3) => {
|
|
1324
|
-
__stack.locals.
|
|
1368
|
+
__stack.locals.__hoist_14 = await __call(chooseSession, {
|
|
1325
1369
|
type: "positional",
|
|
1326
1370
|
args: [__stack.locals.args.flags.continue, __stack.locals.args.flags.resume ?? null]
|
|
1327
1371
|
});
|
|
1328
|
-
if (hasInterrupts(__stack.locals.
|
|
1372
|
+
if (hasInterrupts(__stack.locals.__hoist_14)) {
|
|
1329
1373
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1330
1374
|
runner3.halt({
|
|
1331
1375
|
...__state,
|
|
1332
|
-
data: __stack.locals.
|
|
1376
|
+
data: __stack.locals.__hoist_14
|
|
1333
1377
|
});
|
|
1334
1378
|
return;
|
|
1335
1379
|
}
|
|
1336
|
-
if (isAborted(__stack.locals.
|
|
1337
|
-
throw __stack.locals.
|
|
1380
|
+
if (isAborted(__stack.locals.__hoist_14)) {
|
|
1381
|
+
throw __stack.locals.__hoist_14.toError();
|
|
1338
1382
|
}
|
|
1339
1383
|
});
|
|
1340
1384
|
await runner2.step(4, async (runner3) => {
|
|
1341
1385
|
const __funcResult = await __call(startSession, {
|
|
1342
1386
|
type: "positional",
|
|
1343
|
-
args: [__stack.locals.
|
|
1387
|
+
args: [__stack.locals.__hoist_14, __stack.locals.brain]
|
|
1344
1388
|
});
|
|
1345
1389
|
if (hasInterrupts(__funcResult)) {
|
|
1346
1390
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1357,7 +1401,7 @@ graph.node("main", async (__state) => {
|
|
|
1357
1401
|
}
|
|
1358
1402
|
}
|
|
1359
1403
|
]);
|
|
1360
|
-
await runner.ifElse(
|
|
1404
|
+
await runner.ifElse(43, [
|
|
1361
1405
|
{
|
|
1362
1406
|
condition: async () => __stack.locals.isOneShot,
|
|
1363
1407
|
body: async (runner2) => {
|
|
@@ -1405,26 +1449,26 @@ graph.node("main", async (__state) => {
|
|
|
1405
1449
|
}
|
|
1406
1450
|
]);
|
|
1407
1451
|
await runner2.step(2, async (runner3) => {
|
|
1408
|
-
__stack.locals.
|
|
1452
|
+
__stack.locals.__hoist_15 = await __call(oneShotAgent, {
|
|
1409
1453
|
type: "positional",
|
|
1410
1454
|
args: [__stack.locals.startAgent, __stack.locals.prompt]
|
|
1411
1455
|
});
|
|
1412
|
-
if (hasInterrupts(__stack.locals.
|
|
1456
|
+
if (hasInterrupts(__stack.locals.__hoist_15)) {
|
|
1413
1457
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1414
1458
|
runner3.halt({
|
|
1415
1459
|
...__state,
|
|
1416
|
-
data: __stack.locals.
|
|
1460
|
+
data: __stack.locals.__hoist_15
|
|
1417
1461
|
});
|
|
1418
1462
|
return;
|
|
1419
1463
|
}
|
|
1420
|
-
if (isAborted(__stack.locals.
|
|
1421
|
-
throw __stack.locals.
|
|
1464
|
+
if (isAborted(__stack.locals.__hoist_15)) {
|
|
1465
|
+
throw __stack.locals.__hoist_15.toError();
|
|
1422
1466
|
}
|
|
1423
1467
|
});
|
|
1424
1468
|
await runner2.step(3, async (runner3) => {
|
|
1425
1469
|
const __funcResult = await __call(print, {
|
|
1426
1470
|
type: "positional",
|
|
1427
|
-
args: [__stack.locals.
|
|
1471
|
+
args: [__stack.locals.__hoist_15]
|
|
1428
1472
|
});
|
|
1429
1473
|
if (hasInterrupts(__funcResult)) {
|
|
1430
1474
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1439,33 +1483,33 @@ graph.node("main", async (__state) => {
|
|
|
1439
1483
|
}
|
|
1440
1484
|
});
|
|
1441
1485
|
await runner2.step(4, async (runner3) => {
|
|
1442
|
-
__stack.locals.
|
|
1486
|
+
__stack.locals.__hoist_16 = await __call(getCost, {
|
|
1443
1487
|
type: "positional",
|
|
1444
1488
|
args: []
|
|
1445
1489
|
});
|
|
1446
|
-
if (hasInterrupts(__stack.locals.
|
|
1490
|
+
if (hasInterrupts(__stack.locals.__hoist_16)) {
|
|
1447
1491
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1448
1492
|
runner3.halt({
|
|
1449
1493
|
...__state,
|
|
1450
|
-
data: __stack.locals.
|
|
1494
|
+
data: __stack.locals.__hoist_16
|
|
1451
1495
|
});
|
|
1452
1496
|
return;
|
|
1453
1497
|
}
|
|
1454
|
-
if (isAborted(__stack.locals.
|
|
1455
|
-
throw __stack.locals.
|
|
1498
|
+
if (isAborted(__stack.locals.__hoist_16)) {
|
|
1499
|
+
throw __stack.locals.__hoist_16.toError();
|
|
1456
1500
|
}
|
|
1457
1501
|
});
|
|
1458
1502
|
await runner2.step(5, async (runner3) => {
|
|
1459
|
-
__stack.locals.
|
|
1503
|
+
__stack.locals.__hoist_17 = await __callMethod(__stack.locals.__hoist_16, "toFixed", {
|
|
1460
1504
|
type: "positional",
|
|
1461
1505
|
args: [4]
|
|
1462
1506
|
});
|
|
1463
1507
|
});
|
|
1464
1508
|
await runner2.step(6, async (runner3) => {
|
|
1465
|
-
__stack.locals.roundedCost = `$${__stack.locals.
|
|
1509
|
+
__stack.locals.roundedCost = `$${__stack.locals.__hoist_17}`;
|
|
1466
1510
|
});
|
|
1467
1511
|
await runner2.step(7, async (runner3) => {
|
|
1468
|
-
__stack.locals.
|
|
1512
|
+
__stack.locals.__hoist_18 = await __callMethod(color, "dim", {
|
|
1469
1513
|
type: "positional",
|
|
1470
1514
|
args: [`
|
|
1471
1515
|
Session cost: ${__stack.locals.roundedCost}`]
|
|
@@ -1474,7 +1518,7 @@ Session cost: ${__stack.locals.roundedCost}`]
|
|
|
1474
1518
|
await runner2.step(8, async (runner3) => {
|
|
1475
1519
|
const __funcResult = await __call(print, {
|
|
1476
1520
|
type: "positional",
|
|
1477
|
-
args: [__stack.locals.
|
|
1521
|
+
args: [__stack.locals.__hoist_18]
|
|
1478
1522
|
});
|
|
1479
1523
|
if (hasInterrupts(__funcResult)) {
|
|
1480
1524
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1526,26 +1570,26 @@ Session cost: ${__stack.locals.roundedCost}`]
|
|
|
1526
1570
|
}
|
|
1527
1571
|
});
|
|
1528
1572
|
await runner2.step(11, async (runner3) => {
|
|
1529
|
-
__stack.locals.
|
|
1573
|
+
__stack.locals.__hoist_19 = await __call(getHeader, {
|
|
1530
1574
|
type: "positional",
|
|
1531
1575
|
args: [__stack.locals.brain.name]
|
|
1532
1576
|
});
|
|
1533
|
-
if (hasInterrupts(__stack.locals.
|
|
1577
|
+
if (hasInterrupts(__stack.locals.__hoist_19)) {
|
|
1534
1578
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
1535
1579
|
runner3.halt({
|
|
1536
1580
|
...__state,
|
|
1537
|
-
data: __stack.locals.
|
|
1581
|
+
data: __stack.locals.__hoist_19
|
|
1538
1582
|
});
|
|
1539
1583
|
return;
|
|
1540
1584
|
}
|
|
1541
|
-
if (isAborted(__stack.locals.
|
|
1542
|
-
throw __stack.locals.
|
|
1585
|
+
if (isAborted(__stack.locals.__hoist_19)) {
|
|
1586
|
+
throw __stack.locals.__hoist_19.toError();
|
|
1543
1587
|
}
|
|
1544
1588
|
});
|
|
1545
1589
|
await runner2.step(12, async (runner3) => {
|
|
1546
1590
|
const __funcResult = await __call(print, {
|
|
1547
1591
|
type: "positional",
|
|
1548
|
-
args: [__stack.locals.
|
|
1592
|
+
args: [__stack.locals.__hoist_19]
|
|
1549
1593
|
});
|
|
1550
1594
|
if (hasInterrupts(__funcResult)) {
|
|
1551
1595
|
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
@@ -1613,7 +1657,7 @@ Session cost: ${__stack.locals.roundedCost}`]
|
|
|
1613
1657
|
});
|
|
1614
1658
|
});
|
|
1615
1659
|
if (runner.halted) return runner.haltResult;
|
|
1616
|
-
await runner.hook(
|
|
1660
|
+
await runner.hook(44, async () => {
|
|
1617
1661
|
await callHook({
|
|
1618
1662
|
name: "onNodeEnd",
|
|
1619
1663
|
data: {
|
|
@@ -1695,7 +1739,7 @@ Agent crashed: ${__error.message}`);
|
|
|
1695
1739
|
}
|
|
1696
1740
|
}
|
|
1697
1741
|
var stdin_default = graph;
|
|
1698
|
-
const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line":
|
|
1742
|
+
const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line": 43, "col": 2 }, "2": { "line": 47, "col": 2 }, "3": { "line": 48, "col": 2 }, "4": { "line": 49, "col": 2 }, "5": { "line": 59, "col": 2 }, "6": { "line": 60, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_0": { "4.0": { "line": 50, "col": 4 }, "4.1": { "line": 53, "col": 18 }, "4.2.0": { "line": 53, "col": 4 }, "4.2.1": { "line": 54, "col": 6 }, "4.2.2": { "line": 55, "col": 25 }, "4.2.3.0": { "line": 55, "col": 11 }, "4.2.3.1": { "line": 56, "col": 6 }, "4.2.3": { "line": 55, "col": 11 }, "4.2": { "line": 53, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:main": { "2": { "line": 70, "col": 2 }, "3": { "line": 78, "col": 2 }, "4": { "line": 81, "col": 2 }, "6": { "line": 88, "col": 2 }, "7": { "line": 92, "col": 2 }, "8": { "line": 98, "col": 63 }, "9": { "line": 98, "col": 2 }, "10": { "line": 99, "col": 2 }, "11": { "line": 100, "col": 2 }, "12": { "line": 106, "col": 2 }, "13": { "line": 111, "col": 2 }, "14": { "line": 112, "col": 2 }, "15": { "line": 113, "col": 2 }, "16": { "line": 117, "col": 2 }, "17": { "line": 118, "col": 2 }, "18": { "line": 121, "col": 15 }, "19": { "line": 121, "col": 2 }, "20": { "line": 124, "col": 2 }, "21": { "line": 125, "col": 2 }, "22": { "line": 126, "col": 2 }, "23": { "line": 127, "col": 2 }, "25": { "line": 141, "col": 39 }, "26": { "line": 141, "col": 2 }, "27": { "line": 142, "col": 2 }, "28": { "line": 146, "col": 2 }, "29": { "line": 150, "col": 15 }, "30": { "line": 150, "col": 2 }, "31": { "line": 152, "col": 23 }, "32": { "line": 152, "col": 2 }, "33": { "line": 153, "col": 18 }, "34": { "line": 153, "col": 2 }, "36": { "line": 155, "col": 2 }, "37": { "line": 156, "col": 2 }, "38": { "line": 162, "col": 14 }, "39": { "line": 162, "col": 2 }, "40": { "line": 168, "col": 2 }, "42": { "line": 180, "col": 2 }, "43": { "line": 189, "col": 2 }, "3.0": { "line": 79, "col": 4 }, "4.0": { "line": 82, "col": 4 }, "6.0": { "line": 89, "col": 4 }, "6.1": { "line": 90, "col": 4 }, "11.0": { "line": 101, "col": 22 }, "11.2": { "line": 101, "col": 4 }, "11.3": { "line": 102, "col": 10 }, "11.4": { "line": 102, "col": 4 }, "11.5": { "line": 103, "col": 4 }, "11.6": { "line": 104, "col": 4 }, "23.0": { "line": 128, "col": 4 }, "23.1": { "line": 130, "col": 6 }, "23.2": { "line": 129, "col": 4 }, "23.3": { "line": 134, "col": 4 }, "23.4": { "line": 135, "col": 4 }, "23.5": { "line": 137, "col": 4 }, "37.0": { "line": 157, "col": 4 }, "40.0": { "line": 170, "col": 6 }, "40.1": { "line": 169, "col": 4 }, "40.2": { "line": 174, "col": 4 }, "42.0": { "line": 181, "col": 4 }, "42.1": { "line": 182, "col": 20 }, "42.2": { "line": 182, "col": 4 }, "42.3": { "line": 184, "col": 6 }, "42.4": { "line": 183, "col": 4 }, "43.0": { "line": 190, "col": 4 }, "43.1.0": { "line": 192, "col": 6 }, "43.1.1.0": { "line": 194, "col": 8 }, "43.1.1": { "line": 193, "col": 6 }, "43.1.2": { "line": 196, "col": 6 }, "43.1": { "line": 191, "col": 4 }, "43.2": { "line": 198, "col": 10 }, "43.3": { "line": 198, "col": 4 }, "43.5": { "line": 199, "col": 28 }, "43.6": { "line": 199, "col": 4 }, "43.7": { "line": 200, "col": 10 }, "43.8": { "line": 200, "col": 4 }, "43.9": { "line": 202, "col": 4 }, "43.10": { "line": 203, "col": 4 }, "43.11": { "line": 204, "col": 10 }, "43.12": { "line": 204, "col": 4 }, "43.13": { "line": 205, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_1": {}, "dist/lib/agents/agency-agent/agent.agency:__block_2": { "43.13.0": { "line": 206, "col": 6 } } };
|
|
1699
1743
|
export {
|
|
1700
1744
|
__getCheckpoints,
|
|
1701
1745
|
__invokeFunction,
|