agency-lang 0.18.2 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/agents/agency-agent/agent.js +23 -10
- package/dist/lib/agents/agency-agent/brains/brain.js +9 -2
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency +2 -1
- package/dist/lib/agents/agency-agent/brains/coordinator/coordinator.js +41 -33
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/announce.js +16 -9
- package/dist/lib/agents/agency-agent/brains/coordinator/lib/budgets.js +22 -15
- package/dist/lib/agents/agency-agent/brains/coordinator/prompts/codeSample.js +36 -15
- 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 +31 -24
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/code.js +64 -57
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/explorer.js +13 -6
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/oracle.js +13 -6
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/research.js +13 -6
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/review.js +28 -21
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/rewrite.js +16 -9
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/supervisor.js +49 -42
- package/dist/lib/agents/agency-agent/brains/coordinator/subagents/writing.js +13 -6
- package/dist/lib/agents/agency-agent/brains/registry.js +16 -9
- package/dist/lib/agents/agency-agent/brains/simple/simple.js +19 -12
- package/dist/lib/agents/agency-agent/images/images.js +9 -2
- package/dist/lib/agents/agency-agent/lib/agentName.js +13 -6
- package/dist/lib/agents/agency-agent/lib/args.js +16 -9
- package/dist/lib/agents/agency-agent/lib/attachments.js +16 -9
- package/dist/lib/agents/agency-agent/lib/budget.js +13 -6
- package/dist/lib/agents/agency-agent/lib/capabilities.js +43 -36
- package/dist/lib/agents/agency-agent/lib/capabilitiesUi.js +37 -30
- package/dist/lib/agents/agency-agent/lib/commandPalette.js +16 -9
- package/dist/lib/agents/agency-agent/lib/config.js +13 -6
- package/dist/lib/agents/agency-agent/lib/grounding.js +16 -9
- package/dist/lib/agents/agency-agent/lib/header.js +31 -24
- package/dist/lib/agents/agency-agent/lib/images.agency +19 -1
- package/dist/lib/agents/agency-agent/lib/images.js +192 -12
- package/dist/lib/agents/agency-agent/lib/mcp.js +28 -21
- package/dist/lib/agents/agency-agent/lib/modelFilters.js +13 -6
- package/dist/lib/agents/agency-agent/lib/models.js +40 -33
- package/dist/lib/agents/agency-agent/lib/policy.js +19 -12
- package/dist/lib/agents/agency-agent/lib/projectContext.js +16 -9
- package/dist/lib/agents/agency-agent/lib/repl.js +49 -42
- package/dist/lib/agents/agency-agent/lib/resolution.js +31 -24
- package/dist/lib/agents/agency-agent/lib/resume.js +34 -27
- package/dist/lib/agents/agency-agent/lib/search.js +58 -51
- package/dist/lib/agents/agency-agent/lib/session.js +31 -24
- package/dist/lib/agents/agency-agent/lib/sessionTitle.js +25 -18
- package/dist/lib/agents/agency-agent/lib/sessions.js +40 -33
- package/dist/lib/agents/agency-agent/lib/settings.js +28 -21
- package/dist/lib/agents/agency-agent/lib/slots.js +19 -12
- package/dist/lib/agents/agency-agent/lib/trace.js +46 -39
- package/dist/lib/agents/agency-agent/lib/transcript.js +19 -12
- package/dist/lib/agents/agency-agent/lib/turn.js +43 -36
- package/dist/lib/agents/agency-agent/lib/utils/renderLLMCallResponse.js +13 -6
- package/dist/lib/agents/agency-agent/lib/utils.js +34 -27
- package/dist/lib/agents/agency-agent/shared.js +85 -78
- package/dist/lib/agents/eval/goalJudge.js +20 -7
- package/dist/lib/agents/eval/judge.js +14 -5
- package/dist/lib/agents/eval/judgePairwise.js +14 -5
- package/dist/lib/agents/eval/rubricJudge.js +20 -7
- package/dist/lib/agents/optimize/gepaReflect.js +14 -5
- package/dist/lib/agents/optimize/mutatePrompt.js +14 -5
- package/dist/lib/agents/policy/agent.js +47 -34
- package/dist/lib/agents/review/agent.js +24 -9
- package/dist/lib/backends/typescriptBuilder/nodeWrapperParams.js +4 -2
- package/dist/lib/backends/typescriptBuilder/sectionAssembler.d.ts +4 -0
- package/dist/lib/backends/typescriptBuilder/sectionAssembler.js +7 -0
- package/dist/lib/backends/typescriptBuilder.d.ts +4 -1
- package/dist/lib/backends/typescriptBuilder.js +14 -3
- package/dist/lib/backends/typescriptGenerator/validationDescriptor.js +27 -14
- package/dist/lib/backends/typescriptGenerator.js +6 -11
- package/dist/lib/cli/childEnv.d.ts +2 -0
- package/dist/lib/cli/childEnv.js +11 -1
- package/dist/lib/cli/commands.d.ts +2 -1
- package/dist/lib/cli/commands.js +2 -4
- package/dist/lib/cli/local.d.ts +10 -0
- package/dist/lib/cli/local.js +104 -1
- 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/resumeCarrier.d.ts +7 -0
- package/dist/lib/cli/resumeCarrier.js +19 -0
- package/dist/lib/cli/resumeOverrides.d.ts +7 -0
- package/dist/lib/cli/resumeOverrides.js +30 -0
- 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/compile.d.ts +3 -0
- package/dist/lib/compiler/compile.js +22 -2
- package/dist/lib/compiler/compileSandboxed.d.ts +1 -0
- package/dist/lib/compiler/compileSandboxed.js +5 -1
- package/dist/lib/compiler/compileValidatedClosure.d.ts +1 -0
- package/dist/lib/compiler/compileValidatedClosure.js +3 -1
- package/dist/lib/compiler/initDepGraph.d.ts +5 -0
- package/dist/lib/compiler/initDepGraph.js +56 -4
- package/dist/lib/config.d.ts +16 -0
- package/dist/lib/config.js +7 -0
- package/dist/lib/constants.d.ts +4 -0
- package/dist/lib/constants.js +4 -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/preprocessors/importResolver.d.ts +2 -12
- package/dist/lib/preprocessors/importResolver.js +13 -16
- package/dist/lib/runtime/builtinPolicies.js +14 -0
- package/dist/lib/runtime/checkpointTestHelpers.d.ts +2 -0
- package/dist/lib/runtime/checkpointTestHelpers.js +20 -0
- package/dist/lib/runtime/cliEntry.d.ts +8 -0
- package/dist/lib/runtime/cliEntry.js +53 -0
- package/dist/lib/runtime/debugger.js +5 -2
- package/dist/lib/runtime/errors.d.ts +12 -1
- package/dist/lib/runtime/errors.js +16 -1
- package/dist/lib/runtime/externalSignals.d.ts +25 -0
- package/dist/lib/runtime/externalSignals.js +48 -0
- package/dist/lib/runtime/hooks.d.ts +4 -0
- package/dist/lib/runtime/hooks.js +8 -2
- package/dist/lib/runtime/index.d.ts +9 -3
- package/dist/lib/runtime/index.js +6 -3
- package/dist/lib/runtime/interrupts.d.ts +26 -0
- package/dist/lib/runtime/interrupts.js +116 -78
- package/dist/lib/runtime/node.d.ts +1 -0
- package/dist/lib/runtime/node.js +107 -117
- package/dist/lib/runtime/pause.d.ts +33 -0
- package/dist/lib/runtime/pause.js +48 -0
- package/dist/lib/runtime/result.js +6 -1
- package/dist/lib/runtime/resumeSetup.d.ts +34 -0
- package/dist/lib/runtime/resumeSetup.js +87 -0
- package/dist/lib/runtime/rewind.js +12 -33
- package/dist/lib/runtime/runner.d.ts +11 -0
- package/dist/lib/runtime/runner.js +47 -3
- package/dist/lib/runtime/state/context.d.ts +12 -1
- package/dist/lib/runtime/state/context.js +12 -0
- package/dist/lib/runtime/state/schemas.d.ts +107 -0
- package/dist/lib/runtime/state/schemas.js +6 -0
- package/dist/lib/runtime/state/stateStack.d.ts +7 -5
- package/dist/lib/runtime/state/stateStack.js +17 -9
- 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 +26 -0
- package/dist/lib/statelogClient.d.ts +1 -1
- package/dist/lib/stdlib/approvedPath.d.ts +13 -0
- package/dist/lib/stdlib/approvedPath.js +26 -0
- package/dist/lib/stdlib/contained.d.ts +13 -1
- package/dist/lib/stdlib/contained.js +35 -5
- 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 +33 -51
- package/dist/lib/stdlib/localModels.js +208 -356
- package/dist/lib/stdlib/mlxModelRecord.js +1 -1
- package/dist/lib/stdlib/mlxServerModels.d.ts +10 -0
- package/dist/lib/stdlib/mlxServerModels.js +32 -0
- package/dist/lib/stdlib/modelBackend.d.ts +29 -0
- package/dist/lib/stdlib/modelBackend.js +149 -7
- 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/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/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 +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/imports.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/imports.js +13 -4
- package/dist/lib/templates/backends/typescriptGenerator/resultCheckpointSetup.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/resultCheckpointSetup.js +5 -2
- package/dist/lib/testFormat/schema.d.ts +15 -0
- package/dist/lib/testFormat/schema.js +10 -0
- package/dist/lib/typeChecker/diagnosticExplanations.js +11 -0
- package/dist/lib/typeChecker/diagnostics.d.ts +12 -2
- package/dist/lib/typeChecker/diagnostics.js +12 -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/paramRedeclaration.d.ts +15 -0
- package/dist/lib/typeChecker/paramRedeclaration.js +38 -0
- package/dist/lib/typeChecker/staticInitRules.d.ts +8 -1
- package/dist/lib/typeChecker/staticInitRules.js +16 -0
- package/dist/lib/typeChecker/validateStaticInit.js +5 -10
- package/dist/lib/typeChecker/valueArgReferences.d.ts +17 -0
- package/dist/lib/typeChecker/valueArgReferences.js +215 -0
- package/dist/lib/utils/termcolors.d.ts +7 -1
- package/dist/lib/utils/termcolors.js +6 -0
- package/dist/scripts/agency.js +116 -12
- package/package.json +2 -2
- package/stdlib/agency/eval.js +19 -12
- package/stdlib/agency/local.agency +26 -3
- package/stdlib/agency/local.js +312 -49
- package/stdlib/agency.js +127 -120
- package/stdlib/agent.js +25 -18
- package/stdlib/agents/agency/coding.js +38 -29
- package/stdlib/agents/agency/expert.js +19 -12
- package/stdlib/agents/agency/researcher.js +19 -12
- package/stdlib/agents/agency/review.js +32 -23
- package/stdlib/agents/agency/verifier.js +22 -15
- package/stdlib/agents/coding.agency +2 -0
- package/stdlib/agents/coding.js +44 -21
- package/stdlib/agents/composable/promptRewriter.js +13 -6
- package/stdlib/agents/composable/researcher.js +16 -9
- package/stdlib/agents/composable/utils.js +13 -6
- package/stdlib/agents/data.js +19 -12
- package/stdlib/agents/expert.js +19 -12
- package/stdlib/agents/explorer.js +19 -12
- package/stdlib/agents/lib/expertGuidance.js +16 -9
- package/stdlib/agents/lib/feedback.js +28 -21
- package/stdlib/agents/lib/search.js +25 -18
- package/stdlib/agents/lib/shared.js +19 -12
- package/stdlib/agents/lib/toolkits.agency +64 -0
- package/stdlib/agents/lib/toolkits.js +290 -40
- package/stdlib/agents/oracle.js +19 -12
- package/stdlib/agents/planner.js +52 -45
- package/stdlib/agents/researcher.js +29 -20
- package/stdlib/agents/review.agency +4 -3
- package/stdlib/agents/review.js +42 -18
- 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 -14
- package/stdlib/agents/verifier.js +22 -15
- package/stdlib/agents/writing/review.js +41 -32
- package/stdlib/agents/writing/rewrite.js +20 -11
- package/stdlib/args.js +13 -6
- package/stdlib/array.js +49 -42
- package/stdlib/auth/keyring.js +22 -15
- package/stdlib/auth/oauth.js +22 -15
- package/stdlib/aws/s3.js +28 -21
- package/stdlib/calendar.js +28 -21
- package/stdlib/capabilities.js +9 -2
- package/stdlib/clipboard.js +16 -9
- package/stdlib/concurrency.js +16 -9
- package/stdlib/data/connector.js +25 -18
- package/stdlib/data/finance/dbnomics.js +22 -15
- package/stdlib/data/finance/edgar.js +31 -24
- package/stdlib/data/finance/fred.js +40 -33
- package/stdlib/data/news/gdelt.js +22 -15
- package/stdlib/data/people/littlesis.js +64 -57
- package/stdlib/data/social/bluesky.js +49 -42
- package/stdlib/data/tech/hackernews.js +70 -63
- package/stdlib/data/tech/yc.js +64 -57
- package/stdlib/data/usaspending.js +43 -36
- package/stdlib/data/wikidata.js +58 -51
- package/stdlib/date.js +61 -54
- package/stdlib/docs/agent/index.md +2 -0
- package/stdlib/docs/cli/local.md +58 -3
- package/stdlib/docs/cli/run.md +31 -3
- package/stdlib/docs/diagnostics/index.md +4 -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/checkpointing.md +28 -2
- package/stdlib/docs/guide/interrupts-from-typescript.md +40 -0
- package/stdlib/docs/guide/using-local-models.md +105 -0
- package/stdlib/docs/stdlib/agency/local.md +65 -21
- 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/thread.md +63 -24
- package/stdlib/fs.js +28 -21
- package/stdlib/git.js +67 -60
- package/stdlib/github.agency +3 -0
- package/stdlib/github.js +65 -58
- package/stdlib/http.js +19 -12
- package/stdlib/image.js +13 -6
- package/stdlib/index.js +103 -96
- package/stdlib/llm.js +37 -30
- package/stdlib/markdown.js +25 -18
- package/stdlib/math.js +25 -18
- package/stdlib/mcp.js +25 -18
- package/stdlib/memory.js +37 -30
- package/stdlib/messaging/email.js +19 -12
- package/stdlib/messaging/imessage.js +13 -6
- package/stdlib/messaging/sms.js +13 -6
- package/stdlib/notes/apple.js +37 -30
- package/stdlib/object.js +34 -27
- package/stdlib/ocr.agency +158 -0
- package/stdlib/ocr.js +1160 -0
- package/stdlib/path.js +31 -24
- package/stdlib/policy.js +88 -81
- package/stdlib/safeBash/actions.js +22 -15
- package/stdlib/safeBash.js +130 -123
- package/stdlib/shell.js +34 -27
- package/stdlib/skills.js +94 -87
- package/stdlib/speech.js +25 -18
- package/stdlib/spill.js +37 -30
- package/stdlib/statelog.js +34 -27
- package/stdlib/strategy.js +31 -24
- package/stdlib/supervise.js +13 -6
- package/stdlib/syntax.js +22 -15
- package/stdlib/system.js +49 -42
- package/stdlib/tag.js +28 -21
- package/stdlib/thread.agency +51 -0
- package/stdlib/thread.js +501 -66
- package/stdlib/toolbox.js +136 -129
- package/stdlib/ui/chart.js +22 -15
- package/stdlib/ui/cli.js +37 -30
- package/stdlib/ui/layout.js +64 -57
- package/stdlib/ui/table.js +31 -24
- package/stdlib/ui.js +178 -171
- package/stdlib/validation.js +49 -42
- package/stdlib/weather.js +19 -12
- package/stdlib/web/browser.js +13 -6
- package/stdlib/web/search.js +16 -9
- package/stdlib/wikipedia.js +19 -12
|
@@ -47,13 +47,16 @@ import {
|
|
|
47
47
|
resolveCliInterrupts,
|
|
48
48
|
reportBudgetExceededAndExit,
|
|
49
49
|
isDebugger,
|
|
50
|
+
isPaused,
|
|
50
51
|
respondToInterrupts as _respondToInterrupts,
|
|
51
52
|
respondToInterruptsForServe as _respondToInterruptsForServe,
|
|
53
|
+
resumeFromCheckpoint as _resumeFromCheckpoint,
|
|
54
|
+
resumeCliFromCheckpoint as _resumeCliFromCheckpoint,
|
|
52
55
|
rewindFrom as _rewindFrom,
|
|
53
56
|
runExportedFunction as _runExportedFunction,
|
|
54
57
|
runExportedFunctionForServe as _runExportedFunctionForServe,
|
|
55
58
|
runNodeForServe as _runNodeForServe,
|
|
56
|
-
|
|
59
|
+
RunControlSignal,
|
|
57
60
|
AgencyAbort,
|
|
58
61
|
AbortedResult,
|
|
59
62
|
isAborted,
|
|
@@ -78,7 +81,8 @@ import {
|
|
|
78
81
|
functionRefReviver as __functionRefReviver,
|
|
79
82
|
DeterministicClient as __DeterministicClient,
|
|
80
83
|
installFetchMock as __installFetchMock,
|
|
81
|
-
createLogger as __createLogger
|
|
84
|
+
createLogger as __createLogger,
|
|
85
|
+
runCliEntry
|
|
82
86
|
} from "agency-lang/runtime";
|
|
83
87
|
const __filename = fileURLToPath(import.meta.url);
|
|
84
88
|
const __dirname = path.dirname(__filename);
|
|
@@ -135,8 +139,10 @@ function propagate() {
|
|
|
135
139
|
function pass() {
|
|
136
140
|
return { type: "pass" };
|
|
137
141
|
}
|
|
138
|
-
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata });
|
|
142
|
+
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
|
|
143
|
+
const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
|
|
139
144
|
const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
|
|
145
|
+
const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
|
|
140
146
|
const __invokeFunction = (fn, namedArgs) => _runExportedFunction({ ctx: __globalCtx, fn, namedArgs, initializeGlobals: __initializeGlobals });
|
|
141
147
|
const __invokeFunctionForServe = (fn, namedArgs, invocation) => _runExportedFunctionForServe({ ctx: __globalCtx, fn, namedArgs, invocation, initializeGlobals: __initializeGlobals });
|
|
142
148
|
const __invokeNodeForServe = (nodeName, data, invocation) => _runNodeForServe({ ctx: __globalCtx, nodeName, data, invocation, initializeGlobals: __initializeGlobals });
|
|
@@ -179,6 +185,7 @@ function registerTools(tools) {
|
|
|
179
185
|
}
|
|
180
186
|
}
|
|
181
187
|
}
|
|
188
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "999bad9373c6463c93b8af1dd3b5296e396908808edf7c699b0b7bfae769c2d5", import.meta.url);
|
|
182
189
|
__registerTool(print);
|
|
183
190
|
__registerTool(printJSON);
|
|
184
191
|
__registerTool(input);
|
|
@@ -283,8 +290,8 @@ async function __oneShotAgent_impl(target, prompt) {
|
|
|
283
290
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
284
291
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/agent.agency", scopeName: "oneShotAgent", threads: __setupData.threads });
|
|
285
292
|
let __resultCheckpointId = -1;
|
|
286
|
-
if (__ctx._pendingArgOverrides) {
|
|
287
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
293
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
294
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
288
295
|
__ctx._pendingArgOverrides = void 0;
|
|
289
296
|
if ("target" in __overrides) {
|
|
290
297
|
target = __overrides["target"];
|
|
@@ -488,7 +495,7 @@ async function __oneShotAgent_impl(target, prompt) {
|
|
|
488
495
|
return runner.haltResult;
|
|
489
496
|
}
|
|
490
497
|
} catch (__error) {
|
|
491
|
-
if (__error instanceof
|
|
498
|
+
if (__error instanceof RunControlSignal) {
|
|
492
499
|
throw __error;
|
|
493
500
|
}
|
|
494
501
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1620,7 +1627,7 @@ Session cost: ${__stack.locals.roundedCost}`]
|
|
|
1620
1627
|
data: void 0
|
|
1621
1628
|
};
|
|
1622
1629
|
} catch (__error) {
|
|
1623
|
-
if (__error instanceof
|
|
1630
|
+
if (__error instanceof RunControlSignal) {
|
|
1624
1631
|
throw __error;
|
|
1625
1632
|
}
|
|
1626
1633
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1644,7 +1651,7 @@ Session cost: ${__stack.locals.roundedCost}`]
|
|
|
1644
1651
|
};
|
|
1645
1652
|
}
|
|
1646
1653
|
});
|
|
1647
|
-
async function main({ messages: __invocationMessages, callbacks: __invocationCallbacks, config: __invocationConfig, traceId: __invocationTraceId, invocationInput: __invocationInput } = {}) {
|
|
1654
|
+
async function main({ messages: __invocationMessages, callbacks: __invocationCallbacks, config: __invocationConfig, traceId: __invocationTraceId, invocationInput: __invocationInput, abortSignal: __invocationAbortSignal, pauseSignal: __invocationPauseSignal } = {}) {
|
|
1648
1655
|
return runNode({
|
|
1649
1656
|
ctx: __globalCtx,
|
|
1650
1657
|
nodeName: "main",
|
|
@@ -1656,6 +1663,8 @@ async function main({ messages: __invocationMessages, callbacks: __invocationCal
|
|
|
1656
1663
|
traceId: __invocationTraceId
|
|
1657
1664
|
},
|
|
1658
1665
|
input: __invocationInput,
|
|
1666
|
+
abortSignal: __invocationAbortSignal,
|
|
1667
|
+
pauseSignal: __invocationPauseSignal,
|
|
1659
1668
|
initializeGlobals: __initializeGlobals
|
|
1660
1669
|
});
|
|
1661
1670
|
}
|
|
@@ -1666,7 +1675,10 @@ if (__process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
|
1666
1675
|
messages: new ThreadStore(),
|
|
1667
1676
|
data: {}
|
|
1668
1677
|
};
|
|
1669
|
-
const __result = await
|
|
1678
|
+
const __result = await runCliEntry({
|
|
1679
|
+
runMain: () => main(initialState),
|
|
1680
|
+
resume: __resumeFromCheckpoint
|
|
1681
|
+
});
|
|
1670
1682
|
await resolveCliInterrupts(__result, respondToInterrupts);
|
|
1671
1683
|
} catch (__error) {
|
|
1672
1684
|
reportBudgetExceededAndExit(__error);
|
|
@@ -1677,7 +1689,6 @@ Agent crashed: ${__error.message}`);
|
|
|
1677
1689
|
}
|
|
1678
1690
|
var stdin_default = graph;
|
|
1679
1691
|
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 } } };
|
|
1680
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/agent.agency", "b34d82660446614ec24362a0682b10bc70c7b302798ece7016ceab387819cefc", import.meta.url);
|
|
1681
1692
|
export {
|
|
1682
1693
|
__getCheckpoints,
|
|
1683
1694
|
__invokeFunction,
|
|
@@ -1696,9 +1707,11 @@ export {
|
|
|
1696
1707
|
interrupt,
|
|
1697
1708
|
isDebugger,
|
|
1698
1709
|
isInterrupt,
|
|
1710
|
+
isPaused,
|
|
1699
1711
|
main,
|
|
1700
1712
|
oneShotAgent,
|
|
1701
1713
|
reject,
|
|
1702
1714
|
respondToInterrupts,
|
|
1715
|
+
resumeFromCheckpoint,
|
|
1703
1716
|
rewindFrom
|
|
1704
1717
|
};
|
|
@@ -16,8 +16,11 @@ import {
|
|
|
16
16
|
isInterrupt,
|
|
17
17
|
hasInterrupts,
|
|
18
18
|
isDebugger,
|
|
19
|
+
isPaused,
|
|
19
20
|
respondToInterrupts as _respondToInterrupts,
|
|
20
21
|
respondToInterruptsForServe as _respondToInterruptsForServe,
|
|
22
|
+
resumeFromCheckpoint as _resumeFromCheckpoint,
|
|
23
|
+
resumeCliFromCheckpoint as _resumeCliFromCheckpoint,
|
|
21
24
|
rewindFrom as _rewindFrom,
|
|
22
25
|
runExportedFunction as _runExportedFunction,
|
|
23
26
|
runExportedFunctionForServe as _runExportedFunctionForServe,
|
|
@@ -85,8 +88,10 @@ function propagate() {
|
|
|
85
88
|
function pass() {
|
|
86
89
|
return { type: "pass" };
|
|
87
90
|
}
|
|
88
|
-
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata });
|
|
91
|
+
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
|
|
92
|
+
const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
|
|
89
93
|
const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
|
|
94
|
+
const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
|
|
90
95
|
const __invokeFunction = (fn, namedArgs) => _runExportedFunction({ ctx: __globalCtx, fn, namedArgs, initializeGlobals: __initializeGlobals });
|
|
91
96
|
const __invokeFunctionForServe = (fn, namedArgs, invocation) => _runExportedFunctionForServe({ ctx: __globalCtx, fn, namedArgs, invocation, initializeGlobals: __initializeGlobals });
|
|
92
97
|
const __invokeNodeForServe = (nodeName, data, invocation) => _runNodeForServe({ ctx: __globalCtx, nodeName, data, invocation, initializeGlobals: __initializeGlobals });
|
|
@@ -129,6 +134,7 @@ function registerTools(tools) {
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
}
|
|
137
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/brain.agency", "1dda5af8743ef5e2e7750334137f8df3c1ef915b3099fdd4485c345e21e86a3d", import.meta.url);
|
|
132
138
|
__registerTool(print);
|
|
133
139
|
__registerTool(printJSON);
|
|
134
140
|
__registerTool(input);
|
|
@@ -176,7 +182,6 @@ const BrainContext = z.object({ "interactive": z.boolean(), "grounding": z.strin
|
|
|
176
182
|
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
183
|
var stdin_default = graph;
|
|
178
184
|
const __sourceMap = {};
|
|
179
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/brain.agency", "9dca0b935f7990aceeaf4506229ab0ebd6ac37ceba1adbf162c35d5fc132b454", import.meta.url);
|
|
180
185
|
export {
|
|
181
186
|
AgentBrain,
|
|
182
187
|
BrainContext,
|
|
@@ -196,7 +201,9 @@ export {
|
|
|
196
201
|
interrupt,
|
|
197
202
|
isDebugger,
|
|
198
203
|
isInterrupt,
|
|
204
|
+
isPaused,
|
|
199
205
|
reject,
|
|
200
206
|
respondToInterrupts,
|
|
207
|
+
resumeFromCheckpoint,
|
|
201
208
|
rewindFrom
|
|
202
209
|
};
|
|
@@ -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";
|
|
@@ -36,13 +36,16 @@ import {
|
|
|
36
36
|
isInterrupt,
|
|
37
37
|
hasInterrupts,
|
|
38
38
|
isDebugger,
|
|
39
|
+
isPaused,
|
|
39
40
|
respondToInterrupts as _respondToInterrupts,
|
|
40
41
|
respondToInterruptsForServe as _respondToInterruptsForServe,
|
|
42
|
+
resumeFromCheckpoint as _resumeFromCheckpoint,
|
|
43
|
+
resumeCliFromCheckpoint as _resumeCliFromCheckpoint,
|
|
41
44
|
rewindFrom as _rewindFrom,
|
|
42
45
|
runExportedFunction as _runExportedFunction,
|
|
43
46
|
runExportedFunctionForServe as _runExportedFunctionForServe,
|
|
44
47
|
runNodeForServe as _runNodeForServe,
|
|
45
|
-
|
|
48
|
+
RunControlSignal,
|
|
46
49
|
AgencyAbort,
|
|
47
50
|
AbortedResult,
|
|
48
51
|
isAborted,
|
|
@@ -130,8 +133,10 @@ function propagate() {
|
|
|
130
133
|
function pass() {
|
|
131
134
|
return { type: "pass" };
|
|
132
135
|
}
|
|
133
|
-
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata });
|
|
136
|
+
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
|
|
137
|
+
const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
|
|
134
138
|
const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
|
|
139
|
+
const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
|
|
135
140
|
const __invokeFunction = (fn, namedArgs) => _runExportedFunction({ ctx: __globalCtx, fn, namedArgs, initializeGlobals: __initializeGlobals });
|
|
136
141
|
const __invokeFunctionForServe = (fn, namedArgs, invocation) => _runExportedFunctionForServe({ ctx: __globalCtx, fn, namedArgs, invocation, initializeGlobals: __initializeGlobals });
|
|
137
142
|
const __invokeNodeForServe = (nodeName, data, invocation) => _runNodeForServe({ ctx: __globalCtx, nodeName, data, invocation, initializeGlobals: __initializeGlobals });
|
|
@@ -174,6 +179,7 @@ function registerTools(tools) {
|
|
|
174
179
|
}
|
|
175
180
|
}
|
|
176
181
|
}
|
|
182
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "6791375d011ed3248e94b1139ef5a639e4aa79b4202c6c9a6a879bbfdada753e", import.meta.url);
|
|
177
183
|
__registerTool(print);
|
|
178
184
|
__registerTool(printJSON);
|
|
179
185
|
__registerTool(input);
|
|
@@ -214,6 +220,7 @@ __registerTool(setMemoryId);
|
|
|
214
220
|
__registerTool(systemMessage);
|
|
215
221
|
__registerTool(Attachment);
|
|
216
222
|
__registerTool(generateImageFile);
|
|
223
|
+
__registerTool(viewImageFile);
|
|
217
224
|
__registerTool(getMcpTools);
|
|
218
225
|
__registerTool(getCapabilities);
|
|
219
226
|
__registerTool(getSlowModel);
|
|
@@ -255,7 +262,7 @@ async function __initializeStatic(__ctx) {
|
|
|
255
262
|
} finally {
|
|
256
263
|
getRuntimeContext().ctx.popHandler();
|
|
257
264
|
}
|
|
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, {
|
|
265
|
+
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
266
|
type: "positional",
|
|
260
267
|
args: []
|
|
261
268
|
}), await __callMethod(__readStatic(edit, "edit", "/Users/adityabhargava/agency-lang/packages/agency-lang/stdlib/fs.agency"), "partial", {
|
|
@@ -309,8 +316,8 @@ async function __coordinatorInit_impl(context) {
|
|
|
309
316
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
310
317
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "coordinatorInit", threads: __setupData.threads });
|
|
311
318
|
let __resultCheckpointId = -1;
|
|
312
|
-
if (__ctx._pendingArgOverrides) {
|
|
313
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
319
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
320
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
314
321
|
__ctx._pendingArgOverrides = void 0;
|
|
315
322
|
if ("context" in __overrides) {
|
|
316
323
|
context = __overrides["context"];
|
|
@@ -457,7 +464,7 @@ async function __coordinatorInit_impl(context) {
|
|
|
457
464
|
return runner.haltResult;
|
|
458
465
|
}
|
|
459
466
|
} catch (__error) {
|
|
460
|
-
if (__error instanceof
|
|
467
|
+
if (__error instanceof RunControlSignal) {
|
|
461
468
|
throw __error;
|
|
462
469
|
}
|
|
463
470
|
if (__error instanceof AgencyAbort) {
|
|
@@ -530,8 +537,8 @@ async function __mainAgent_impl(prompt) {
|
|
|
530
537
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
531
538
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "mainAgent", threads: __setupData.threads });
|
|
532
539
|
let __resultCheckpointId = -1;
|
|
533
|
-
if (__ctx._pendingArgOverrides) {
|
|
534
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
540
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
541
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
535
542
|
__ctx._pendingArgOverrides = void 0;
|
|
536
543
|
if ("prompt" in __overrides) {
|
|
537
544
|
prompt = __overrides["prompt"];
|
|
@@ -766,7 +773,7 @@ async function __mainAgent_impl(prompt) {
|
|
|
766
773
|
return runner.haltResult;
|
|
767
774
|
}
|
|
768
775
|
} catch (__error) {
|
|
769
|
-
if (__error instanceof
|
|
776
|
+
if (__error instanceof RunControlSignal) {
|
|
770
777
|
throw __error;
|
|
771
778
|
}
|
|
772
779
|
if (__error instanceof AgencyAbort) {
|
|
@@ -839,8 +846,8 @@ async function __promptText_impl(prompt) {
|
|
|
839
846
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
840
847
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "promptText", threads: __setupData.threads });
|
|
841
848
|
let __resultCheckpointId = -1;
|
|
842
|
-
if (__ctx._pendingArgOverrides) {
|
|
843
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
849
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
850
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
844
851
|
__ctx._pendingArgOverrides = void 0;
|
|
845
852
|
if ("prompt" in __overrides) {
|
|
846
853
|
prompt = __overrides["prompt"];
|
|
@@ -914,7 +921,7 @@ async function __promptText_impl(prompt) {
|
|
|
914
921
|
return runner.haltResult;
|
|
915
922
|
}
|
|
916
923
|
} catch (__error) {
|
|
917
|
-
if (__error instanceof
|
|
924
|
+
if (__error instanceof RunControlSignal) {
|
|
918
925
|
throw __error;
|
|
919
926
|
}
|
|
920
927
|
if (__error instanceof AgencyAbort) {
|
|
@@ -988,8 +995,8 @@ async function __replyText_impl(name, result) {
|
|
|
988
995
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
989
996
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "replyText", threads: __setupData.threads });
|
|
990
997
|
let __resultCheckpointId = -1;
|
|
991
|
-
if (__ctx._pendingArgOverrides) {
|
|
992
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
998
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
999
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
993
1000
|
__ctx._pendingArgOverrides = void 0;
|
|
994
1001
|
if ("name" in __overrides) {
|
|
995
1002
|
name = __overrides["name"];
|
|
@@ -1057,7 +1064,7 @@ async function __replyText_impl(name, result) {
|
|
|
1057
1064
|
return runner.haltResult;
|
|
1058
1065
|
}
|
|
1059
1066
|
} catch (__error) {
|
|
1060
|
-
if (__error instanceof
|
|
1067
|
+
if (__error instanceof RunControlSignal) {
|
|
1061
1068
|
throw __error;
|
|
1062
1069
|
}
|
|
1063
1070
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1137,8 +1144,8 @@ async function __researchTurn_impl(userMsg) {
|
|
|
1137
1144
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1138
1145
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "researchTurn", threads: __setupData.threads });
|
|
1139
1146
|
let __resultCheckpointId = -1;
|
|
1140
|
-
if (__ctx._pendingArgOverrides) {
|
|
1141
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1147
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1148
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1142
1149
|
__ctx._pendingArgOverrides = void 0;
|
|
1143
1150
|
if ("userMsg" in __overrides) {
|
|
1144
1151
|
userMsg = __overrides["userMsg"];
|
|
@@ -1195,7 +1202,7 @@ async function __researchTurn_impl(userMsg) {
|
|
|
1195
1202
|
return runner.haltResult;
|
|
1196
1203
|
}
|
|
1197
1204
|
} catch (__error) {
|
|
1198
|
-
if (__error instanceof
|
|
1205
|
+
if (__error instanceof RunControlSignal) {
|
|
1199
1206
|
throw __error;
|
|
1200
1207
|
}
|
|
1201
1208
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1268,8 +1275,8 @@ async function __oracleTurn_impl(userMsg) {
|
|
|
1268
1275
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1269
1276
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "oracleTurn", threads: __setupData.threads });
|
|
1270
1277
|
let __resultCheckpointId = -1;
|
|
1271
|
-
if (__ctx._pendingArgOverrides) {
|
|
1272
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1278
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1279
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1273
1280
|
__ctx._pendingArgOverrides = void 0;
|
|
1274
1281
|
if ("userMsg" in __overrides) {
|
|
1275
1282
|
userMsg = __overrides["userMsg"];
|
|
@@ -1343,7 +1350,7 @@ async function __oracleTurn_impl(userMsg) {
|
|
|
1343
1350
|
return runner.haltResult;
|
|
1344
1351
|
}
|
|
1345
1352
|
} catch (__error) {
|
|
1346
|
-
if (__error instanceof
|
|
1353
|
+
if (__error instanceof RunControlSignal) {
|
|
1347
1354
|
throw __error;
|
|
1348
1355
|
}
|
|
1349
1356
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1416,8 +1423,8 @@ async function __explorerTurn_impl(userMsg) {
|
|
|
1416
1423
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1417
1424
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "explorerTurn", threads: __setupData.threads });
|
|
1418
1425
|
let __resultCheckpointId = -1;
|
|
1419
|
-
if (__ctx._pendingArgOverrides) {
|
|
1420
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1426
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1427
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1421
1428
|
__ctx._pendingArgOverrides = void 0;
|
|
1422
1429
|
if ("userMsg" in __overrides) {
|
|
1423
1430
|
userMsg = __overrides["userMsg"];
|
|
@@ -1491,7 +1498,7 @@ async function __explorerTurn_impl(userMsg) {
|
|
|
1491
1498
|
return runner.haltResult;
|
|
1492
1499
|
}
|
|
1493
1500
|
} catch (__error) {
|
|
1494
|
-
if (__error instanceof
|
|
1501
|
+
if (__error instanceof RunControlSignal) {
|
|
1495
1502
|
throw __error;
|
|
1496
1503
|
}
|
|
1497
1504
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1565,8 +1572,8 @@ async function __coordinatorRunTurn_impl(target, prompt) {
|
|
|
1565
1572
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1566
1573
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "coordinatorRunTurn", threads: __setupData.threads });
|
|
1567
1574
|
let __resultCheckpointId = -1;
|
|
1568
|
-
if (__ctx._pendingArgOverrides) {
|
|
1569
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1575
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1576
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1570
1577
|
__ctx._pendingArgOverrides = void 0;
|
|
1571
1578
|
if ("target" in __overrides) {
|
|
1572
1579
|
target = __overrides["target"];
|
|
@@ -1905,7 +1912,7 @@ async function __coordinatorRunTurn_impl(target, prompt) {
|
|
|
1905
1912
|
return runner.haltResult;
|
|
1906
1913
|
}
|
|
1907
1914
|
} catch (__error) {
|
|
1908
|
-
if (__error instanceof
|
|
1915
|
+
if (__error instanceof RunControlSignal) {
|
|
1909
1916
|
throw __error;
|
|
1910
1917
|
}
|
|
1911
1918
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1984,8 +1991,8 @@ async function __coordinatorBrain_impl() {
|
|
|
1984
1991
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1985
1992
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "coordinatorBrain", threads: __setupData.threads });
|
|
1986
1993
|
let __resultCheckpointId = -1;
|
|
1987
|
-
if (__ctx._pendingArgOverrides) {
|
|
1988
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1994
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1995
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1989
1996
|
__ctx._pendingArgOverrides = void 0;
|
|
1990
1997
|
}
|
|
1991
1998
|
try {
|
|
@@ -2025,7 +2032,7 @@ async function __coordinatorBrain_impl() {
|
|
|
2025
2032
|
return runner.haltResult;
|
|
2026
2033
|
}
|
|
2027
2034
|
} catch (__error) {
|
|
2028
|
-
if (__error instanceof
|
|
2035
|
+
if (__error instanceof RunControlSignal) {
|
|
2029
2036
|
throw __error;
|
|
2030
2037
|
}
|
|
2031
2038
|
if (__error instanceof AgencyAbort) {
|
|
@@ -2075,8 +2082,7 @@ const coordinatorBrain = __AgencyFunction.create({
|
|
|
2075
2082
|
exported: true
|
|
2076
2083
|
}, __toolRegistry);
|
|
2077
2084
|
var stdin_default = graph;
|
|
2078
|
-
const __sourceMap = { "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency:coordinatorInit": { "1": { "line":
|
|
2079
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "6898ad0d7f112a9c4b25c1cb2c377c389acb4a192388dba4526e85e789b9aeb2", import.meta.url);
|
|
2085
|
+
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
2086
|
export {
|
|
2081
2087
|
__getCheckpoints,
|
|
2082
2088
|
__invokeFunction,
|
|
@@ -2098,6 +2104,7 @@ export {
|
|
|
2098
2104
|
interrupt,
|
|
2099
2105
|
isDebugger,
|
|
2100
2106
|
isInterrupt,
|
|
2107
|
+
isPaused,
|
|
2101
2108
|
mainAgent,
|
|
2102
2109
|
oracleTurn,
|
|
2103
2110
|
promptText,
|
|
@@ -2105,5 +2112,6 @@ export {
|
|
|
2105
2112
|
replyText,
|
|
2106
2113
|
researchTurn,
|
|
2107
2114
|
respondToInterrupts,
|
|
2115
|
+
resumeFromCheckpoint,
|
|
2108
2116
|
rewindFrom
|
|
2109
2117
|
};
|
|
@@ -19,13 +19,16 @@ import {
|
|
|
19
19
|
isInterrupt,
|
|
20
20
|
hasInterrupts,
|
|
21
21
|
isDebugger,
|
|
22
|
+
isPaused,
|
|
22
23
|
respondToInterrupts as _respondToInterrupts,
|
|
23
24
|
respondToInterruptsForServe as _respondToInterruptsForServe,
|
|
25
|
+
resumeFromCheckpoint as _resumeFromCheckpoint,
|
|
26
|
+
resumeCliFromCheckpoint as _resumeCliFromCheckpoint,
|
|
24
27
|
rewindFrom as _rewindFrom,
|
|
25
28
|
runExportedFunction as _runExportedFunction,
|
|
26
29
|
runExportedFunctionForServe as _runExportedFunctionForServe,
|
|
27
30
|
runNodeForServe as _runNodeForServe,
|
|
28
|
-
|
|
31
|
+
RunControlSignal,
|
|
29
32
|
AgencyAbort,
|
|
30
33
|
AbortedResult,
|
|
31
34
|
isAborted,
|
|
@@ -103,8 +106,10 @@ function propagate() {
|
|
|
103
106
|
function pass() {
|
|
104
107
|
return { type: "pass" };
|
|
105
108
|
}
|
|
106
|
-
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata });
|
|
109
|
+
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal });
|
|
110
|
+
const resumeFromCheckpoint = (paused, opts) => _resumeFromCheckpoint({ ctx: __globalCtx, paused, metadata: opts?.metadata, abortSignal: opts?.abortSignal, pauseSignal: opts?.pauseSignal, invocation: opts?.invocation });
|
|
107
111
|
const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata });
|
|
112
|
+
const __resumeFromCheckpoint = (checkpoint2, overrides) => _resumeCliFromCheckpoint({ ctx: __globalCtx, checkpoint: checkpoint2, overrides });
|
|
108
113
|
const __invokeFunction = (fn, namedArgs) => _runExportedFunction({ ctx: __globalCtx, fn, namedArgs, initializeGlobals: __initializeGlobals });
|
|
109
114
|
const __invokeFunctionForServe = (fn, namedArgs, invocation) => _runExportedFunctionForServe({ ctx: __globalCtx, fn, namedArgs, invocation, initializeGlobals: __initializeGlobals });
|
|
110
115
|
const __invokeNodeForServe = (nodeName, data, invocation) => _runNodeForServe({ ctx: __globalCtx, nodeName, data, invocation, initializeGlobals: __initializeGlobals });
|
|
@@ -147,6 +152,7 @@ function registerTools(tools) {
|
|
|
147
152
|
}
|
|
148
153
|
}
|
|
149
154
|
}
|
|
155
|
+
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", "b8801fef45da41591a56ed1747192a103829712efebdd3e053a245bccda08b9d", import.meta.url);
|
|
150
156
|
__registerTool(print);
|
|
151
157
|
__registerTool(printJSON);
|
|
152
158
|
__registerTool(input);
|
|
@@ -207,8 +213,8 @@ async function __announce_impl(agentName, userMsg) {
|
|
|
207
213
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
208
214
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", scopeName: "announce", threads: __setupData.threads });
|
|
209
215
|
let __resultCheckpointId = -1;
|
|
210
|
-
if (__ctx._pendingArgOverrides) {
|
|
211
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
216
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
217
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
212
218
|
__ctx._pendingArgOverrides = void 0;
|
|
213
219
|
if ("agentName" in __overrides) {
|
|
214
220
|
agentName = __overrides["agentName"];
|
|
@@ -306,7 +312,7 @@ async function __announce_impl(agentName, userMsg) {
|
|
|
306
312
|
return runner.haltResult;
|
|
307
313
|
}
|
|
308
314
|
} catch (__error) {
|
|
309
|
-
if (__error instanceof
|
|
315
|
+
if (__error instanceof RunControlSignal) {
|
|
310
316
|
throw __error;
|
|
311
317
|
}
|
|
312
318
|
if (__error instanceof AgencyAbort) {
|
|
@@ -386,8 +392,8 @@ async function __stripControlChars_impl(text) {
|
|
|
386
392
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
387
393
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", scopeName: "stripControlChars", threads: __setupData.threads });
|
|
388
394
|
let __resultCheckpointId = -1;
|
|
389
|
-
if (__ctx._pendingArgOverrides) {
|
|
390
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
395
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
396
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
391
397
|
__ctx._pendingArgOverrides = void 0;
|
|
392
398
|
if ("text" in __overrides) {
|
|
393
399
|
text = __overrides["text"];
|
|
@@ -447,7 +453,7 @@ async function __stripControlChars_impl(text) {
|
|
|
447
453
|
return runner.haltResult;
|
|
448
454
|
}
|
|
449
455
|
} catch (__error) {
|
|
450
|
-
if (__error instanceof
|
|
456
|
+
if (__error instanceof RunControlSignal) {
|
|
451
457
|
throw __error;
|
|
452
458
|
}
|
|
453
459
|
if (__error instanceof AgencyAbort) {
|
|
@@ -505,7 +511,6 @@ const stripControlChars = __AgencyFunction.create({
|
|
|
505
511
|
}, __toolRegistry);
|
|
506
512
|
var stdin_default = graph;
|
|
507
513
|
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 } } };
|
|
508
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/lib/announce.agency", "3c0fd0eedec77cd64736a9a6acf171b30556638693b7c1cd27269d7a73eefb89", import.meta.url);
|
|
509
514
|
export {
|
|
510
515
|
__getCheckpoints,
|
|
511
516
|
__invokeFunction,
|
|
@@ -524,8 +529,10 @@ export {
|
|
|
524
529
|
interrupt,
|
|
525
530
|
isDebugger,
|
|
526
531
|
isInterrupt,
|
|
532
|
+
isPaused,
|
|
527
533
|
reject,
|
|
528
534
|
respondToInterrupts,
|
|
535
|
+
resumeFromCheckpoint,
|
|
529
536
|
rewindFrom,
|
|
530
537
|
stripControlChars
|
|
531
538
|
};
|