agency-lang 0.19.0 → 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.js +37 -30
- 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/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.js +19 -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 +11 -3
- 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/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/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/constants.d.ts +4 -0
- package/dist/lib/constants.js +4 -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 +8 -2
- package/dist/lib/runtime/index.js +5 -2
- 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/statelogClient.d.ts +1 -1
- 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 +12 -3
- package/dist/lib/templates/backends/typescriptGenerator/resultCheckpointSetup.d.ts +1 -1
- package/dist/lib/templates/backends/typescriptGenerator/resultCheckpointSetup.js +5 -2
- package/dist/scripts/agency.js +25 -5
- package/package.json +1 -1
- package/stdlib/agency/eval.js +19 -12
- package/stdlib/agency/local.js +58 -51
- 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.js +19 -12
- 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.js +52 -45
- 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.js +19 -12
- 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/cli/run.md +31 -3
- package/stdlib/docs/guide/checkpointing.md +28 -2
- package/stdlib/docs/guide/interrupts-from-typescript.md +40 -0
- package/stdlib/fs.js +28 -21
- package/stdlib/git.js +67 -60
- package/stdlib/github.js +64 -57
- 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.js +19 -12
- 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.js +73 -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", "54e48be8365083a20f0224bcd479cc8d1519a808d43fbad162c19948613e33a1", 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", "3f61515fc79421600a5d3fa34afb0233c858cbb7df13e23b46298fff10fb75c8", 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
|
};
|
|
@@ -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);
|
|
@@ -310,8 +316,8 @@ async function __coordinatorInit_impl(context) {
|
|
|
310
316
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
311
317
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "coordinatorInit", threads: __setupData.threads });
|
|
312
318
|
let __resultCheckpointId = -1;
|
|
313
|
-
if (__ctx._pendingArgOverrides) {
|
|
314
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
319
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
320
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
315
321
|
__ctx._pendingArgOverrides = void 0;
|
|
316
322
|
if ("context" in __overrides) {
|
|
317
323
|
context = __overrides["context"];
|
|
@@ -458,7 +464,7 @@ async function __coordinatorInit_impl(context) {
|
|
|
458
464
|
return runner.haltResult;
|
|
459
465
|
}
|
|
460
466
|
} catch (__error) {
|
|
461
|
-
if (__error instanceof
|
|
467
|
+
if (__error instanceof RunControlSignal) {
|
|
462
468
|
throw __error;
|
|
463
469
|
}
|
|
464
470
|
if (__error instanceof AgencyAbort) {
|
|
@@ -531,8 +537,8 @@ async function __mainAgent_impl(prompt) {
|
|
|
531
537
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
532
538
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "mainAgent", threads: __setupData.threads });
|
|
533
539
|
let __resultCheckpointId = -1;
|
|
534
|
-
if (__ctx._pendingArgOverrides) {
|
|
535
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
540
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
541
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
536
542
|
__ctx._pendingArgOverrides = void 0;
|
|
537
543
|
if ("prompt" in __overrides) {
|
|
538
544
|
prompt = __overrides["prompt"];
|
|
@@ -767,7 +773,7 @@ async function __mainAgent_impl(prompt) {
|
|
|
767
773
|
return runner.haltResult;
|
|
768
774
|
}
|
|
769
775
|
} catch (__error) {
|
|
770
|
-
if (__error instanceof
|
|
776
|
+
if (__error instanceof RunControlSignal) {
|
|
771
777
|
throw __error;
|
|
772
778
|
}
|
|
773
779
|
if (__error instanceof AgencyAbort) {
|
|
@@ -840,8 +846,8 @@ async function __promptText_impl(prompt) {
|
|
|
840
846
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
841
847
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "promptText", threads: __setupData.threads });
|
|
842
848
|
let __resultCheckpointId = -1;
|
|
843
|
-
if (__ctx._pendingArgOverrides) {
|
|
844
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
849
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
850
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
845
851
|
__ctx._pendingArgOverrides = void 0;
|
|
846
852
|
if ("prompt" in __overrides) {
|
|
847
853
|
prompt = __overrides["prompt"];
|
|
@@ -915,7 +921,7 @@ async function __promptText_impl(prompt) {
|
|
|
915
921
|
return runner.haltResult;
|
|
916
922
|
}
|
|
917
923
|
} catch (__error) {
|
|
918
|
-
if (__error instanceof
|
|
924
|
+
if (__error instanceof RunControlSignal) {
|
|
919
925
|
throw __error;
|
|
920
926
|
}
|
|
921
927
|
if (__error instanceof AgencyAbort) {
|
|
@@ -989,8 +995,8 @@ async function __replyText_impl(name, result) {
|
|
|
989
995
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
990
996
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "replyText", threads: __setupData.threads });
|
|
991
997
|
let __resultCheckpointId = -1;
|
|
992
|
-
if (__ctx._pendingArgOverrides) {
|
|
993
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
998
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
999
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
994
1000
|
__ctx._pendingArgOverrides = void 0;
|
|
995
1001
|
if ("name" in __overrides) {
|
|
996
1002
|
name = __overrides["name"];
|
|
@@ -1058,7 +1064,7 @@ async function __replyText_impl(name, result) {
|
|
|
1058
1064
|
return runner.haltResult;
|
|
1059
1065
|
}
|
|
1060
1066
|
} catch (__error) {
|
|
1061
|
-
if (__error instanceof
|
|
1067
|
+
if (__error instanceof RunControlSignal) {
|
|
1062
1068
|
throw __error;
|
|
1063
1069
|
}
|
|
1064
1070
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1138,8 +1144,8 @@ async function __researchTurn_impl(userMsg) {
|
|
|
1138
1144
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1139
1145
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "researchTurn", threads: __setupData.threads });
|
|
1140
1146
|
let __resultCheckpointId = -1;
|
|
1141
|
-
if (__ctx._pendingArgOverrides) {
|
|
1142
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1147
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1148
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1143
1149
|
__ctx._pendingArgOverrides = void 0;
|
|
1144
1150
|
if ("userMsg" in __overrides) {
|
|
1145
1151
|
userMsg = __overrides["userMsg"];
|
|
@@ -1196,7 +1202,7 @@ async function __researchTurn_impl(userMsg) {
|
|
|
1196
1202
|
return runner.haltResult;
|
|
1197
1203
|
}
|
|
1198
1204
|
} catch (__error) {
|
|
1199
|
-
if (__error instanceof
|
|
1205
|
+
if (__error instanceof RunControlSignal) {
|
|
1200
1206
|
throw __error;
|
|
1201
1207
|
}
|
|
1202
1208
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1269,8 +1275,8 @@ async function __oracleTurn_impl(userMsg) {
|
|
|
1269
1275
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1270
1276
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "oracleTurn", threads: __setupData.threads });
|
|
1271
1277
|
let __resultCheckpointId = -1;
|
|
1272
|
-
if (__ctx._pendingArgOverrides) {
|
|
1273
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1278
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1279
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1274
1280
|
__ctx._pendingArgOverrides = void 0;
|
|
1275
1281
|
if ("userMsg" in __overrides) {
|
|
1276
1282
|
userMsg = __overrides["userMsg"];
|
|
@@ -1344,7 +1350,7 @@ async function __oracleTurn_impl(userMsg) {
|
|
|
1344
1350
|
return runner.haltResult;
|
|
1345
1351
|
}
|
|
1346
1352
|
} catch (__error) {
|
|
1347
|
-
if (__error instanceof
|
|
1353
|
+
if (__error instanceof RunControlSignal) {
|
|
1348
1354
|
throw __error;
|
|
1349
1355
|
}
|
|
1350
1356
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1417,8 +1423,8 @@ async function __explorerTurn_impl(userMsg) {
|
|
|
1417
1423
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1418
1424
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "explorerTurn", threads: __setupData.threads });
|
|
1419
1425
|
let __resultCheckpointId = -1;
|
|
1420
|
-
if (__ctx._pendingArgOverrides) {
|
|
1421
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1426
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1427
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1422
1428
|
__ctx._pendingArgOverrides = void 0;
|
|
1423
1429
|
if ("userMsg" in __overrides) {
|
|
1424
1430
|
userMsg = __overrides["userMsg"];
|
|
@@ -1492,7 +1498,7 @@ async function __explorerTurn_impl(userMsg) {
|
|
|
1492
1498
|
return runner.haltResult;
|
|
1493
1499
|
}
|
|
1494
1500
|
} catch (__error) {
|
|
1495
|
-
if (__error instanceof
|
|
1501
|
+
if (__error instanceof RunControlSignal) {
|
|
1496
1502
|
throw __error;
|
|
1497
1503
|
}
|
|
1498
1504
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1566,8 +1572,8 @@ async function __coordinatorRunTurn_impl(target, prompt) {
|
|
|
1566
1572
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1567
1573
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "coordinatorRunTurn", threads: __setupData.threads });
|
|
1568
1574
|
let __resultCheckpointId = -1;
|
|
1569
|
-
if (__ctx._pendingArgOverrides) {
|
|
1570
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1575
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1576
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1571
1577
|
__ctx._pendingArgOverrides = void 0;
|
|
1572
1578
|
if ("target" in __overrides) {
|
|
1573
1579
|
target = __overrides["target"];
|
|
@@ -1906,7 +1912,7 @@ async function __coordinatorRunTurn_impl(target, prompt) {
|
|
|
1906
1912
|
return runner.haltResult;
|
|
1907
1913
|
}
|
|
1908
1914
|
} catch (__error) {
|
|
1909
|
-
if (__error instanceof
|
|
1915
|
+
if (__error instanceof RunControlSignal) {
|
|
1910
1916
|
throw __error;
|
|
1911
1917
|
}
|
|
1912
1918
|
if (__error instanceof AgencyAbort) {
|
|
@@ -1985,8 +1991,8 @@ async function __coordinatorBrain_impl() {
|
|
|
1985
1991
|
__self.__destructiveRan = __self.__destructiveRan ?? false;
|
|
1986
1992
|
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", scopeName: "coordinatorBrain", threads: __setupData.threads });
|
|
1987
1993
|
let __resultCheckpointId = -1;
|
|
1988
|
-
if (__ctx._pendingArgOverrides) {
|
|
1989
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1994
|
+
if (__ctx._pendingArgOverrides?.moduleId === __stack.moduleId && __ctx._pendingArgOverrides?.scopeName === __stack.scopeName) {
|
|
1995
|
+
const __overrides = __ctx._pendingArgOverrides.values;
|
|
1990
1996
|
__ctx._pendingArgOverrides = void 0;
|
|
1991
1997
|
}
|
|
1992
1998
|
try {
|
|
@@ -2026,7 +2032,7 @@ async function __coordinatorBrain_impl() {
|
|
|
2026
2032
|
return runner.haltResult;
|
|
2027
2033
|
}
|
|
2028
2034
|
} catch (__error) {
|
|
2029
|
-
if (__error instanceof
|
|
2035
|
+
if (__error instanceof RunControlSignal) {
|
|
2030
2036
|
throw __error;
|
|
2031
2037
|
}
|
|
2032
2038
|
if (__error instanceof AgencyAbort) {
|
|
@@ -2077,7 +2083,6 @@ const coordinatorBrain = __AgencyFunction.create({
|
|
|
2077
2083
|
}, __toolRegistry);
|
|
2078
2084
|
var stdin_default = graph;
|
|
2079
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
|
-
__registerModuleFingerprint("dist/lib/agents/agency-agent/brains/coordinator/coordinator.agency", "51fae42c747cbc264d1d2d4bf4c318959d496a1336bd87b630753b61a0429790", import.meta.url);
|
|
2081
2086
|
export {
|
|
2082
2087
|
__getCheckpoints,
|
|
2083
2088
|
__invokeFunction,
|
|
@@ -2099,6 +2104,7 @@ export {
|
|
|
2099
2104
|
interrupt,
|
|
2100
2105
|
isDebugger,
|
|
2101
2106
|
isInterrupt,
|
|
2107
|
+
isPaused,
|
|
2102
2108
|
mainAgent,
|
|
2103
2109
|
oracleTurn,
|
|
2104
2110
|
promptText,
|
|
@@ -2106,5 +2112,6 @@ export {
|
|
|
2106
2112
|
replyText,
|
|
2107
2113
|
researchTurn,
|
|
2108
2114
|
respondToInterrupts,
|
|
2115
|
+
resumeFromCheckpoint,
|
|
2109
2116
|
rewindFrom
|
|
2110
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", "155f4481fbf4cad6842b4fcad4e7c9b7b5cf01e20f9c860826e5f5fb0c6a7f6a", 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
|
};
|