agency-lang 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/agents/agency-agent/agent.agency +7 -1
- package/dist/lib/agents/agency-agent/agent.js +31 -15
- package/dist/lib/agents/agency-agent/subagents/code.agency +59 -26
- package/dist/lib/agents/agency-agent/subagents/code.js +193 -29
- package/dist/lib/cli/commands.d.ts +9 -24
- package/dist/lib/cli/commands.js +26 -266
- package/dist/lib/cli/precompile.d.ts +3 -18
- package/dist/lib/cli/precompile.js +18 -66
- package/dist/lib/cli/precompile.test.js +16 -39
- package/dist/lib/compiler/buildSession.d.ts +113 -0
- package/dist/lib/compiler/buildSession.js +360 -0
- package/dist/lib/compiler/buildSession.test.d.ts +1 -0
- package/dist/lib/compiler/buildSession.test.js +195 -0
- package/dist/lib/runtime/agencyLlm.d.ts +7 -0
- package/dist/lib/runtime/agencyLlm.js +2 -0
- package/dist/lib/stdlib/threads.js +22 -2
- package/dist/lib/stdlib/version.d.ts +1 -1
- package/dist/lib/stdlib/version.js +1 -1
- package/package.json +1 -1
- package/stdlib/capabilities.agency +1 -1
- package/stdlib/capabilities.js +1 -1
- package/stdlib/data/wikidata.agency +269 -0
- package/stdlib/data/wikidata.js +2975 -0
- package/stdlib/thread.agency +12 -2
- package/stdlib/thread.js +32 -9
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
currentProvider,
|
|
84
84
|
resolveMaxToolCallRounds,
|
|
85
85
|
} from "./shared.agency"
|
|
86
|
-
import { codeAgent } from "./subagents/code.agency"
|
|
86
|
+
import { codeAgent, setCodeOneShot } from "./subagents/code.agency"
|
|
87
87
|
import { explorerAgent } from "./subagents/explorer.agency"
|
|
88
88
|
import { oracleAgent } from "./subagents/oracle.agency"
|
|
89
89
|
import { researchAgent } from "./subagents/research.agency"
|
|
@@ -1434,6 +1434,12 @@ node main() {
|
|
|
1434
1434
|
setLlmOptions({ maxToolResultChars: maxResultChars })
|
|
1435
1435
|
}
|
|
1436
1436
|
|
|
1437
|
+
// One-shot autonomy: tell the code subagent there is no human to answer
|
|
1438
|
+
// questions and no next turn, so it must drive to a finished artifact.
|
|
1439
|
+
// Set before any dispatch so both the pinned `--agent code` path and the
|
|
1440
|
+
// coordinator (which calls codeAgent as a tool) pick it up.
|
|
1441
|
+
setCodeOneShot(runningOneShot)
|
|
1442
|
+
|
|
1437
1443
|
// Validate the target subagent name up front (empty = coordinator).
|
|
1438
1444
|
if (startAgent != "" && !START_AGENTS.includes(startAgent)) {
|
|
1439
1445
|
print(
|
|
@@ -30,7 +30,7 @@ import { configureSearch, setSearchBackend, getSearchBackend, availableBackendIt
|
|
|
30
30
|
import { getModelSettings, loadSettings } from "./lib/settings.js";
|
|
31
31
|
import { truncate, formatArgs, formatToolResponse } from "./lib/utils.js";
|
|
32
32
|
import { configureModels, configureLocalModel, enableAgentMemory, getResolvedSlots, applyResolved, promoteAll, currentProvider, resolveMaxToolCallRounds } from "./shared.js";
|
|
33
|
-
import { codeAgent } from "./subagents/code.js";
|
|
33
|
+
import { codeAgent, setCodeOneShot } from "./subagents/code.js";
|
|
34
34
|
import { explorerAgent } from "./subagents/explorer.js";
|
|
35
35
|
import { oracleAgent } from "./subagents/oracle.js";
|
|
36
36
|
import { researchAgent } from "./subagents/research.js";
|
|
@@ -291,6 +291,7 @@ __registerTool(promoteAll);
|
|
|
291
291
|
__registerTool(currentProvider);
|
|
292
292
|
__registerTool(resolveMaxToolCallRounds);
|
|
293
293
|
__registerTool(codeAgent);
|
|
294
|
+
__registerTool(setCodeOneShot);
|
|
294
295
|
__registerTool(explorerAgent);
|
|
295
296
|
__registerTool(oracleAgent);
|
|
296
297
|
__registerTool(researchAgent);
|
|
@@ -7952,7 +7953,22 @@ graph.node("main", async (__state) => {
|
|
|
7952
7953
|
await runner.step(25, async (runner2) => {
|
|
7953
7954
|
__self.__retryable = false;
|
|
7954
7955
|
});
|
|
7955
|
-
await runner.
|
|
7956
|
+
await runner.step(26, async (runner2) => {
|
|
7957
|
+
__self.__retryable = false;
|
|
7958
|
+
const __funcResult = await __call(setCodeOneShot, {
|
|
7959
|
+
type: "positional",
|
|
7960
|
+
args: [__stack.locals.runningOneShot]
|
|
7961
|
+
});
|
|
7962
|
+
if (hasInterrupts(__funcResult)) {
|
|
7963
|
+
await getRuntimeContext().ctx.pendingPromises.awaitAll();
|
|
7964
|
+
runner2.halt({
|
|
7965
|
+
...__state,
|
|
7966
|
+
data: __funcResult
|
|
7967
|
+
});
|
|
7968
|
+
return;
|
|
7969
|
+
}
|
|
7970
|
+
});
|
|
7971
|
+
await runner.ifElse(27, [
|
|
7956
7972
|
{
|
|
7957
7973
|
condition: async () => !__eq(__stack.locals.startAgent, ``) && !await __callMethod(__readStatic(START_AGENTS, "START_AGENTS", "dist/lib/agents/agency-agent/agent.agency"), "includes", {
|
|
7958
7974
|
type: "positional",
|
|
@@ -7988,9 +8004,9 @@ graph.node("main", async (__state) => {
|
|
|
7988
8004
|
}
|
|
7989
8005
|
}
|
|
7990
8006
|
]);
|
|
7991
|
-
await runner.step(
|
|
8007
|
+
await runner.step(28, async (runner2) => {
|
|
7992
8008
|
});
|
|
7993
|
-
await runner.ifElse(
|
|
8009
|
+
await runner.ifElse(29, [
|
|
7994
8010
|
{
|
|
7995
8011
|
condition: async () => __stack.locals.seededInteractive,
|
|
7996
8012
|
body: async (runner2) => {
|
|
@@ -8075,13 +8091,13 @@ graph.node("main", async (__state) => {
|
|
|
8075
8091
|
}
|
|
8076
8092
|
}
|
|
8077
8093
|
]);
|
|
8078
|
-
await runner.step(
|
|
8094
|
+
await runner.step(30, async (runner2) => {
|
|
8079
8095
|
__self.__retryable = false;
|
|
8080
8096
|
});
|
|
8081
|
-
await runner.step(
|
|
8097
|
+
await runner.step(31, async (runner2) => {
|
|
8082
8098
|
__stack.locals.forceOneShot = __stack.locals.args.flags.print || __stack.locals.hasQuery;
|
|
8083
8099
|
});
|
|
8084
|
-
await runner.ifElse(
|
|
8100
|
+
await runner.ifElse(32, [
|
|
8085
8101
|
{
|
|
8086
8102
|
condition: async () => __stack.locals.forceOneShot || !await __call(isTTY, {
|
|
8087
8103
|
type: "positional",
|
|
@@ -8154,9 +8170,9 @@ graph.node("main", async (__state) => {
|
|
|
8154
8170
|
}
|
|
8155
8171
|
}
|
|
8156
8172
|
]);
|
|
8157
|
-
await runner.step(32, async (runner2) => {
|
|
8158
|
-
});
|
|
8159
8173
|
await runner.step(33, async (runner2) => {
|
|
8174
|
+
});
|
|
8175
|
+
await runner.step(34, async (runner2) => {
|
|
8160
8176
|
__self.__retryable = false;
|
|
8161
8177
|
const __funcResult = await __call(setTitle, {
|
|
8162
8178
|
type: "positional",
|
|
@@ -8171,7 +8187,7 @@ graph.node("main", async (__state) => {
|
|
|
8171
8187
|
return;
|
|
8172
8188
|
}
|
|
8173
8189
|
});
|
|
8174
|
-
await runner.step(
|
|
8190
|
+
await runner.step(35, async (runner2) => {
|
|
8175
8191
|
__self.__retryable = false;
|
|
8176
8192
|
const __funcResult = await __call(clearScreen, {
|
|
8177
8193
|
type: "positional",
|
|
@@ -8186,7 +8202,7 @@ graph.node("main", async (__state) => {
|
|
|
8186
8202
|
return;
|
|
8187
8203
|
}
|
|
8188
8204
|
});
|
|
8189
|
-
await runner.step(
|
|
8205
|
+
await runner.step(36, async (runner2) => {
|
|
8190
8206
|
const __funcResult = await __call(printHeader, {
|
|
8191
8207
|
type: "positional",
|
|
8192
8208
|
args: []
|
|
@@ -8200,7 +8216,7 @@ graph.node("main", async (__state) => {
|
|
|
8200
8216
|
return;
|
|
8201
8217
|
}
|
|
8202
8218
|
});
|
|
8203
|
-
await runner.step(
|
|
8219
|
+
await runner.step(37, async (runner2) => {
|
|
8204
8220
|
__stack.locals.handler = await __call(setupSession, {
|
|
8205
8221
|
type: "positional",
|
|
8206
8222
|
args: [true]
|
|
@@ -8214,7 +8230,7 @@ graph.node("main", async (__state) => {
|
|
|
8214
8230
|
return;
|
|
8215
8231
|
}
|
|
8216
8232
|
});
|
|
8217
|
-
await runner.step(
|
|
8233
|
+
await runner.step(38, async (runner2) => {
|
|
8218
8234
|
const __funcResult = await __call(startInteractive, {
|
|
8219
8235
|
type: "positional",
|
|
8220
8236
|
args: [__stack.locals.handler, ``, ``]
|
|
@@ -8230,7 +8246,7 @@ graph.node("main", async (__state) => {
|
|
|
8230
8246
|
});
|
|
8231
8247
|
});
|
|
8232
8248
|
if (runner.halted) return runner.haltResult;
|
|
8233
|
-
await runner.hook(
|
|
8249
|
+
await runner.hook(39, async () => {
|
|
8234
8250
|
await callHook({
|
|
8235
8251
|
name: "onNodeEnd",
|
|
8236
8252
|
data: {
|
|
@@ -8296,7 +8312,7 @@ Agent crashed: ${__error.message}`);
|
|
|
8296
8312
|
}
|
|
8297
8313
|
}
|
|
8298
8314
|
var stdin_default = graph;
|
|
8299
|
-
const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:__cb_top_0": { "1": { "line": 159, "col": 2 }, "1.0": { "line": 160, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_1": { "1": { "line": 165, "col": 2 }, "1.0.0": { "line": 166, "col": 4 }, "1.0.1": { "line": 167, "col": 6 }, "1.0.2": { "line": 168, "col": 11 }, "1.0.3": { "line": 169, "col": 6 }, "1.0.4": { "line": 171, "col": 6 }, "1.0": { "line": 166, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_2": { "1": { "line": 177, "col": 2 }, "1.0": { "line": 178, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_3": { "1": { "line": 183, "col": 2 }, "1.0": { "line": 184, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_4": { "1": { "line": 224, "col": 2 }, "1.0": { "line": 225, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_showTraces": { "1": { "line": 155, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:retryReasonLabel": { "1": { "line": 195, "col": 2 }, "2": { "line": 198, "col": 2 }, "3": { "line": 201, "col": 2 }, "4": { "line": 204, "col": 2 }, "5": { "line": 207, "col": 2 }, "6": { "line": 210, "col": 2 }, "7": { "line": 213, "col": 2 }, "1.0": { "line": 196, "col": 4 }, "2.0": { "line": 199, "col": 4 }, "3.0": { "line": 202, "col": 4 }, "4.0": { "line": 205, "col": 4 }, "5.0": { "line": 208, "col": 4 }, "6.0": { "line": 211, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:formatTurnFailure": { "1": { "line": 240, "col": 2 }, "2": { "line": 243, "col": 2 }, "3": { "line": 246, "col": 2 }, "4": { "line": 249, "col": 2 }, "1.0": { "line": 241, "col": 4 }, "2.0": { "line": 244, "col": 4 }, "3.0": { "line": 247, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:renderLLMCallResponse": { "1": { "line": 266, "col": 2 }, "2": { "line": 267, "col": 2 }, "3": { "line": 270, "col": 2 }, "5": { "line": 275, "col": 2 }, "2.0": { "line": 268, "col": 4 }, "3.0.0": { "line": 272, "col": 6 }, "3.0": { "line": 271, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:loadAgentsMd": { "1": { "line": 286, "col": 2 }, "2": { "line": 289, "col": 2 }, "3": { "line": 290, "col": 2 }, "4": { "line": 293, "col": 2 }, "1.0": { "line": 287, "col": 4 }, "2.0": { "line": 289, "col": 2 }, "3.0": { "line": 291, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:builtinPalette": { "1": { "line": 307, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:mergedPalette": { "1": { "line": 324, "col": 2 }, "2": { "line": 325, "col": 2 }, "3": { "line": 332, "col": 2 }, "4": { "line": 333, "col": 2 }, "5": { "line": 336, "col": 2 }, "2.0": { "line": 326, "col": 4 }, "2.1.0": { "line": 328, "col": 6 }, "2.1": { "line": 327, "col": 4 }, "2.2": { "line": 330, "col": 4 }, "4.0": { "line": 334, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:switchModel": { "1": { "line": 363, "col": 2 }, "2": { "line": 364, "col": 2 }, "3": { "line": 367, "col": 2 }, "4": { "line": 371, "col": 2 }, "5": { "line": 372, "col": 2 }, "7": { "line": 382, "col": 2 }, "9": { "line": 390, "col": 2 }, "10": { "line": 391, "col": 2 }, "11": { "line": 392, "col": 2 }, "12": { "line": 401, "col": 2 }, "13": { "line": 402, "col": 2 }, "15": { "line": 410, "col": 2 }, "16": { "line": 411, "col": 2 }, "17": { "line": 412, "col": 2 }, "2.0": { "line": 365, "col": 4 }, "5.0": { "line": 373, "col": 4 }, "5.1": { "line": 376, "col": 4 }, "7.0": { "line": 383, "col": 4 }, "7.1": { "line": 385, "col": 4 }, "13.0": { "line": 403, "col": 4 }, "13.1": { "line": 404, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:reactToSlotChange": { "1": { "line": 424, "col": 2 }, "3": { "line": 435, "col": 2 }, "1.0": { "line": 425, "col": 4 }, "1.1": { "line": 432, "col": 4 }, "1.3": { "line": 433, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:modelChoiceItems": { "1": { "line": 441, "col": 2 }, "2": { "line": 442, "col": 2 }, "4": { "line": 449, "col": 2 }, "2.0": { "line": 443, "col": 4 }, "2.1": { "line": 444, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:parseModelsFilters": { "1": { "line": 456, "col": 2 }, "2": { "line": 457, "col": 2 }, "3": { "line": 460, "col": 2 }, "4": { "line": 461, "col": 2 }, "5": { "line": 464, "col": 2 }, "2.0": { "line": 458, "col": 4 }, "4.0": { "line": 462, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runTurn": { "2": { "line": 477, "col": 2 }, "3": { "line": 478, "col": 2 }, "4": { "line": 481, "col": 2 }, "5": { "line": 484, "col": 2 }, "7": { "line": 488, "col": 2 }, "9": { "line": 493, "col": 2 }, "11": { "line": 499, "col": 2 }, "13": { "line": 514, "col": 2 }, "15": { "line": 542, "col": 2 }, "17": { "line": 587, "col": 2 }, "19": { "line": 601, "col": 2 }, "21": { "line": 643, "col": 2 }, "22": { "line": 644, "col": 2 }, "24": { "line": 653, "col": 2 }, "3.0": { "line": 479, "col": 4 }, "4.0": { "line": 482, "col": 4 }, "5.0": { "line": 485, "col": 4 }, "5.1": { "line": 486, "col": 4 }, "7.0": { "line": 489, "col": 4 }, "7.1": { "line": 490, "col": 4 }, "7.2": { "line": 491, "col": 4 }, "9.0": { "line": 494, "col": 4 }, "9.1": { "line": 497, "col": 4 }, "11.0": { "line": 500, "col": 4 }, "11.1": { "line": 501, "col": 4 }, "11.2.0": { "line": 509, "col": 6 }, "11.2.1": { "line": 510, "col": 6 }, "11.2": { "line": 508, "col": 4 }, "11.4": { "line": 512, "col": 4 }, "13.1": { "line": 522, "col": 4 }, "13.2": { "line": 523, "col": 4 }, "13.3": { "line": 524, "col": 4 }, "13.4.0": { "line": 526, "col": 6 }, "13.4.1": { "line": 527, "col": 6 }, "13.4": { "line": 525, "col": 4 }, "13.5": { "line": 529, "col": 4 }, "13.6": { "line": 530, "col": 4 }, "13.7.0": { "line": 532, "col": 6 }, "13.7.1": { "line": 533, "col": 6 }, "13.7.2.0": { "line": 535, "col": 8 }, "13.7.2": { "line": 534, "col": 6 }, "13.7": { "line": 531, "col": 4 }, "13.9": { "line": 540, "col": 4 }, "15.0": { "line": 543, "col": 4 }, "15.1.0": { "line": 545, "col": 6 }, "15.1": { "line": 544, "col": 4 }, "15.2.0": { "line": 548, "col": 6 }, "15.2.1": { "line": 549, "col": 6 }, "15.2.2.0": { "line": 551, "col": 8 }, "15.2.2.1.0": { "line": 553, "col": 10 }, "15.2.2.1": { "line": 552, "col": 8 }, "15.2.2": { "line": 550, "col": 6 }, "15.2.4": { "line": 556, "col": 6 }, "15.2.5": { "line": 557, "col": 6 }, "15.2.6.0": { "line": 565, "col": 8 }, "15.2.6": { "line": 564, "col": 6 }, "15.2.7": { "line": 567, "col": 6 }, "15.2": { "line": 547, "col": 4 }, "15.4": { "line": 569, "col": 4 }, "15.5": { "line": 573, "col": 4 }, "15.6": { "line": 574, "col": 4 }, "15.7.0": { "line": 576, "col": 6 }, "15.7": { "line": 575, "col": 4 }, "15.8": { "line": 578, "col": 4 }, "15.9.0": { "line": 580, "col": 6 }, "15.9.1.0": { "line": 582, "col": 8 }, "15.9.1": { "line": 581, "col": 6 }, "15.9": { "line": 579, "col": 4 }, "15.11": { "line": 585, "col": 4 }, "17.0": { "line": 588, "col": 4 }, "17.1": { "line": 589, "col": 4 }, "17.2.0": { "line": 591, "col": 6 }, "17.2.1": { "line": 592, "col": 6 }, "17.2": { "line": 590, "col": 4 }, "17.4.0": { "line": 595, "col": 6 }, "17.4": { "line": 594, "col": 4 }, "17.6": { "line": 599, "col": 4 }, "19.0.0": { "line": 603, "col": 6 }, "19.0.1": { "line": 608, "col": 6 }, "19.0": { "line": 602, "col": 4 }, "19.2": { "line": 610, "col": 4 }, "19.3.0": { "line": 612, "col": 6 }, "19.3": { "line": 611, "col": 4 }, "19.5": { "line": 617, "col": 4 }, "19.6.0": { "line": 625, "col": 6 }, "19.6": { "line": 624, "col": 4 }, "19.7": { "line": 627, "col": 4 }, "19.8": { "line": 628, "col": 4 }, "19.9": { "line": 629, "col": 4 }, "19.10.0": { "line": 631, "col": 6 }, "19.10": { "line": 630, "col": 4 }, "19.12": { "line": 633, "col": 4 }, "19.13": { "line": 634, "col": 4 }, "22.0": { "line": 644, "col": 2 }, "22.1.0": { "line": 646, "col": 6 }, "22.1.1": { "line": 648, "col": 6 }, "22.1": { "line": 645, "col": 4 }, "22.3": { "line": 650, "col": 9 }, "22.4": { "line": 651, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:resolveEditInputs": { "1": { "line": 839, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_0": { "1.0.0": { "line": 841, "col": 6 }, "1.0": { "line": 840, "col": 4 }, "1.1": { "line": 843, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:generateImageFile": { "2": { "line": 871, "col": 2 }, "3": { "line": 872, "col": 2 }, "4": { "line": 873, "col": 2 }, "6": { "line": 879, "col": 2 }, "7": { "line": 885, "col": 2 }, "9": { "line": 891, "col": 2 }, "10": { "line": 892, "col": 2 }, "4.0": { "line": 874, "col": 4 }, "7.0": { "line": 886, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:mainAgent": { "1": { "line": 905, "col": 2 }, "3": { "line": 919, "col": 2 }, "1.0": { "line": 906, "col": 4 }, "1.1.1": { "line": 911, "col": 6 }, "1.1.2": { "line": 912, "col": 6 }, "1.1": { "line": 907, "col": 4 }, "1.3": { "line": 914, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReplyVia": { "1": { "line": 928, "col": 2 }, "2": { "line": 929, "col": 2 }, "4": { "line": 932, "col": 2 }, "6": { "line": 935, "col": 2 }, "8": { "line": 938, "col": 2 }, "10": { "line": 941, "col": 2 }, "12": { "line": 947, "col": 2 }, "13": { "line": 948, "col": 2 }, "15": { "line": 953, "col": 2 }, "16": { "line": 960, "col": 2 }, "18": { "line": 963, "col": 2 }, "19": { "line": 966, "col": 2 }, "20": { "line": 967, "col": 2 }, "2.0": { "line": 930, "col": 4 }, "4.0": { "line": 933, "col": 4 }, "6.0": { "line": 936, "col": 4 }, "8.0": { "line": 939, "col": 4 }, "10.0": { "line": 942, "col": 4 }, "13.0": { "line": 949, "col": 4 }, "15.1": { "line": 958, "col": 4 }, "16.0": { "line": 961, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_1": { "18.0": { "line": 964, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReply": { "1": { "line": 977, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:roundedCost": { "1": { "line": 981, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:_buildStatus": { "1": { "line": 985, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:sample": { "1": { "line": 993, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:printHeader": { "1": { "line": 997, "col": 2 }, "2": { "line": 998, "col": 2 }, "3": { "line": 1020, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_2": { "2.0": { "line": 1005, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_3": { "2.0.0": { "line": 1006, "col": 6 }, "2.0.1": { "line": 1014, "col": 6 }, "2.0.2": { "line": 1015, "col": 6 } }, "dist/lib/agents/agency-agent/agent.agency:__block_4": { "2.0.0.0": { "line": 1007, "col": 8 }, "2.0.0.1": { "line": 1008, "col": 8 }, "2.0.0.2": { "line": 1009, "col": 8 }, "2.0.0.3": { "line": 1010, "col": 8 }, "2.0.0.4": { "line": 1011, "col": 8 }, "2.0.0.5": { "line": 1012, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:__block_5": { "2.0.2.0": { "line": 1016, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:printPolicyHelp": { "1": { "line": 1026, "col": 2 }, "2": { "line": 1027, "col": 2 }, "3": { "line": 1030, "col": 2 }, "4": { "line": 1031, "col": 2 }, "5": { "line": 1032, "col": 2 }, "5.0": { "line": 1033, "col": 4 }, "5.1": { "line": 1034, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:givePolicyChoice": { "1": { "line": 1039, "col": 2 }, "2": { "line": 1040, "col": 2 }, "3": { "line": 1041, "col": 2 }, "4": { "line": 1052, "col": 2 }, "5": { "line": 1053, "col": 9 }, "6": { "line": 1053, "col": 2 }, "5.0": { "line": 1054, "col": 17 }, "5.1": { "line": 1054, "col": 17 }, "5.2": { "line": 1055, "col": 21 }, "5.3": { "line": 1055, "col": 21 } }, "dist/lib/agents/agency-agent/agent.agency:setupSession": { "2": { "line": 1071, "col": 2 }, "3": { "line": 1076, "col": 2 }, "4": { "line": 1077, "col": 2 }, "5": { "line": 1083, "col": 2 }, "6": { "line": 1084, "col": 2 }, "7": { "line": 1086, "col": 2 }, "9": { "line": 1134, "col": 2 }, "3.0": { "line": 1076, "col": 2 }, "7.1": { "line": 1091, "col": 4 }, "7.2.1": { "line": 1097, "col": 6 }, "7.2.2": { "line": 1098, "col": 6 }, "7.2.4": { "line": 1103, "col": 6 }, "7.2.5.0": { "line": 1104, "col": 6 }, "7.2.5.1": { "line": 1105, "col": 8 }, "7.2.5.2": { "line": 1110, "col": 8 }, "7.2.5": { "line": 1104, "col": 6 }, "7.2.7": { "line": 1112, "col": 6 }, "7.2": { "line": 1092, "col": 4 }, "7.4": { "line": 1115, "col": 4 }, "7.5.0": { "line": 1116, "col": 4 }, "7.5.1.0.0": { "line": 1119, "col": 10 }, "7.5.1.0.1": { "line": 1120, "col": 10 }, "7.5.1.0.2": { "line": 1122, "col": 10 }, "7.5.1.0": { "line": 1118, "col": 8 }, "7.5.1.2": { "line": 1125, "col": 8 }, "7.5.1.3": { "line": 1126, "col": 8 }, "7.5.1": { "line": 1117, "col": 6 }, "7.5.3": { "line": 1129, "col": 6 }, "7.5": { "line": 1116, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line": 1148, "col": 2 }, "2": { "line": 1149, "col": 2 }, "3": { "line": 1150, "col": 2 }, "4": { "line": 1151, "col": 2 }, "5": { "line": 1164, "col": 2 }, "4.1": { "line": 1155, "col": 4 }, "4.2.0": { "line": 1156, "col": 4 }, "4.2.1": { "line": 1157, "col": 6 }, "4.2.2": { "line": 1158, "col": 11 }, "4.2.3": { "line": 1159, "col": 6 }, "4.2": { "line": 1156, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runSeedTurn": { "1": { "line": 1171, "col": 2 }, "2": { "line": 1172, "col": 2 }, "3": { "line": 1173, "col": 2 }, "3.0": { "line": 1173, "col": 2 }, "3.1.0": { "line": 1175, "col": 6 }, "3.1.1": { "line": 1177, "col": 6 }, "3.1": { "line": 1174, "col": 4 }, "3.3": { "line": 1179, "col": 9 }, "3.4": { "line": 1180, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:startInteractive": { "1": { "line": 1191, "col": 2 }, "3": { "line": 1206, "col": 2 }, "1.0.0": { "line": 1193, "col": 6 }, "1.0": { "line": 1192, "col": 4 }, "1.1": { "line": 1195, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:main": { "2": { "line": 1212, "col": 2 }, "3": { "line": 1298, "col": 2 }, "4": { "line": 1301, "col": 2 }, "6": { "line": 1307, "col": 2 }, "7": { "line": 1311, "col": 2 }, "8": { "line": 1318, "col": 2 }, "9": { "line": 1319, "col": 2 }, "10": { "line": 1320, "col": 2 }, "11": { "line": 1321, "col": 2 }, "12": { "line": 1327, "col": 2 }, "14": { "line": 1409, "col": 2 }, "15": { "line": 1410, "col": 2 }, "16": { "line": 1411, "col": 2 }, "17": { "line": 1412, "col": 2 }, "18": { "line": 1416, "col": 2 }, "19": { "line": 1417, "col": 2 }, "20": { "line": 1427, "col": 2 }, "21": { "line": 1428, "col": 2 }, "23": { "line": 1431, "col": 2 }, "24": { "line": 1432, "col": 2 }, "26": { "line": 1437, "col": 2 }, "28": { "line": 1452, "col": 2 }, "30": { "line": 1471, "col": 2 }, "31": { "line": 1472, "col": 2 }, "33": { "line": 1490, "col": 2 }, "34": { "line": 1491, "col": 2 }, "35": { "line": 1492, "col": 2 }, "36": { "line": 1493, "col": 2 }, "37": { "line": 1494, "col": 2 }, "3.0": { "line": 1299, "col": 4 }, "4.0": { "line": 1302, "col": 4 }, "6.0": { "line": 1308, "col": 4 }, "6.1": { "line": 1309, "col": 4 }, "11.0": { "line": 1322, "col": 4 }, "11.1": { "line": 1325, "col": 4 }, "12.1.0": { "line": 1331, "col": 6 }, "12.1.1": { "line": 1332, "col": 6 }, "12.1": { "line": 1330, "col": 4 }, "12.3.0": { "line": 1335, "col": 6 }, "12.3.1": { "line": 1336, "col": 6 }, "12.3.2": { "line": 1337, "col": 6 }, "12.3": { "line": 1334, "col": 4 }, "12.5": { "line": 1339, "col": 4 }, "12.6.0": { "line": 1341, "col": 6 }, "12.6": { "line": 1340, "col": 4 }, "12.8": { "line": 1346, "col": 4 }, "12.9.0": { "line": 1354, "col": 6 }, "12.9": { "line": 1353, "col": 4 }, "12.10": { "line": 1356, "col": 4 }, "12.11": { "line": 1357, "col": 4 }, "12.12": { "line": 1360, "col": 4 }, "12.13": { "line": 1364, "col": 4 }, "12.15": { "line": 1368, "col": 4 }, "12.16": { "line": 1369, "col": 4 }, "12.17": { "line": 1370, "col": 4 }, "12.18": { "line": 1371, "col": 4 }, "12.19.0.0": { "line": 1374, "col": 8 }, "12.19.0.1": { "line": 1376, "col": 8 }, "12.19.0.2": { "line": 1378, "col": 8 }, "12.19.0.3": { "line": 1380, "col": 8 }, "12.19.0.4": { "line": 1385, "col": 8 }, "12.19.0": { "line": 1373, "col": 6 }, "12.19": { "line": 1372, "col": 4 }, "12.20": { "line": 1388, "col": 4 }, "12.21": { "line": 1389, "col": 4 }, "12.22.0": { "line": 1391, "col": 6 }, "12.22": { "line": 1390, "col": 4 }, "12.23.0": { "line": 1394, "col": 6 }, "12.23": { "line": 1393, "col": 4 }, "12.24": { "line": 1396, "col": 4 }, "12.25": { "line": 1402, "col": 4 }, "12.26": { "line": 1403, "col": 4 }, "21.0": { "line": 1429, "col": 4 }, "24.0": { "line": 1433, "col": 4 }, "26.0": { "line": 1438, "col": 4 }, "26.1": { "line": 1443, "col": 4 }, "28.0": { "line": 1453, "col": 4 }, "28.1": { "line": 1454, "col": 4 }, "28.2": { "line": 1455, "col": 4 }, "28.3": { "line": 1456, "col": 4 }, "28.4": { "line": 1457, "col": 4 }, "28.5": { "line": 1458, "col": 4 }, "31.0": { "line": 1473, "col": 4 }, "31.1.0": { "line": 1475, "col": 6 }, "31.1.1.0": { "line": 1477, "col": 8 }, "31.1.1": { "line": 1476, "col": 6 }, "31.1.2": { "line": 1479, "col": 6 }, "31.1": { "line": 1474, "col": 4 }, "31.2": { "line": 1481, "col": 4 }, "31.3": { "line": 1482, "col": 4 } } };
|
|
8315
|
+
const __sourceMap = { "dist/lib/agents/agency-agent/agent.agency:__cb_top_0": { "1": { "line": 159, "col": 2 }, "1.0": { "line": 160, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_1": { "1": { "line": 165, "col": 2 }, "1.0.0": { "line": 166, "col": 4 }, "1.0.1": { "line": 167, "col": 6 }, "1.0.2": { "line": 168, "col": 11 }, "1.0.3": { "line": 169, "col": 6 }, "1.0.4": { "line": 171, "col": 6 }, "1.0": { "line": 166, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_2": { "1": { "line": 177, "col": 2 }, "1.0": { "line": 178, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_3": { "1": { "line": 183, "col": 2 }, "1.0": { "line": 184, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__cb_top_4": { "1": { "line": 224, "col": 2 }, "1.0": { "line": 225, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_showTraces": { "1": { "line": 155, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:retryReasonLabel": { "1": { "line": 195, "col": 2 }, "2": { "line": 198, "col": 2 }, "3": { "line": 201, "col": 2 }, "4": { "line": 204, "col": 2 }, "5": { "line": 207, "col": 2 }, "6": { "line": 210, "col": 2 }, "7": { "line": 213, "col": 2 }, "1.0": { "line": 196, "col": 4 }, "2.0": { "line": 199, "col": 4 }, "3.0": { "line": 202, "col": 4 }, "4.0": { "line": 205, "col": 4 }, "5.0": { "line": 208, "col": 4 }, "6.0": { "line": 211, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:formatTurnFailure": { "1": { "line": 240, "col": 2 }, "2": { "line": 243, "col": 2 }, "3": { "line": 246, "col": 2 }, "4": { "line": 249, "col": 2 }, "1.0": { "line": 241, "col": 4 }, "2.0": { "line": 244, "col": 4 }, "3.0": { "line": 247, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:renderLLMCallResponse": { "1": { "line": 266, "col": 2 }, "2": { "line": 267, "col": 2 }, "3": { "line": 270, "col": 2 }, "5": { "line": 275, "col": 2 }, "2.0": { "line": 268, "col": 4 }, "3.0.0": { "line": 272, "col": 6 }, "3.0": { "line": 271, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:loadAgentsMd": { "1": { "line": 286, "col": 2 }, "2": { "line": 289, "col": 2 }, "3": { "line": 290, "col": 2 }, "4": { "line": 293, "col": 2 }, "1.0": { "line": 287, "col": 4 }, "2.0": { "line": 289, "col": 2 }, "3.0": { "line": 291, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:builtinPalette": { "1": { "line": 307, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:mergedPalette": { "1": { "line": 324, "col": 2 }, "2": { "line": 325, "col": 2 }, "3": { "line": 332, "col": 2 }, "4": { "line": 333, "col": 2 }, "5": { "line": 336, "col": 2 }, "2.0": { "line": 326, "col": 4 }, "2.1.0": { "line": 328, "col": 6 }, "2.1": { "line": 327, "col": 4 }, "2.2": { "line": 330, "col": 4 }, "4.0": { "line": 334, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:switchModel": { "1": { "line": 363, "col": 2 }, "2": { "line": 364, "col": 2 }, "3": { "line": 367, "col": 2 }, "4": { "line": 371, "col": 2 }, "5": { "line": 372, "col": 2 }, "7": { "line": 382, "col": 2 }, "9": { "line": 390, "col": 2 }, "10": { "line": 391, "col": 2 }, "11": { "line": 392, "col": 2 }, "12": { "line": 401, "col": 2 }, "13": { "line": 402, "col": 2 }, "15": { "line": 410, "col": 2 }, "16": { "line": 411, "col": 2 }, "17": { "line": 412, "col": 2 }, "2.0": { "line": 365, "col": 4 }, "5.0": { "line": 373, "col": 4 }, "5.1": { "line": 376, "col": 4 }, "7.0": { "line": 383, "col": 4 }, "7.1": { "line": 385, "col": 4 }, "13.0": { "line": 403, "col": 4 }, "13.1": { "line": 404, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:reactToSlotChange": { "1": { "line": 424, "col": 2 }, "3": { "line": 435, "col": 2 }, "1.0": { "line": 425, "col": 4 }, "1.1": { "line": 432, "col": 4 }, "1.3": { "line": 433, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:modelChoiceItems": { "1": { "line": 441, "col": 2 }, "2": { "line": 442, "col": 2 }, "4": { "line": 449, "col": 2 }, "2.0": { "line": 443, "col": 4 }, "2.1": { "line": 444, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:parseModelsFilters": { "1": { "line": 456, "col": 2 }, "2": { "line": 457, "col": 2 }, "3": { "line": 460, "col": 2 }, "4": { "line": 461, "col": 2 }, "5": { "line": 464, "col": 2 }, "2.0": { "line": 458, "col": 4 }, "4.0": { "line": 462, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runTurn": { "2": { "line": 477, "col": 2 }, "3": { "line": 478, "col": 2 }, "4": { "line": 481, "col": 2 }, "5": { "line": 484, "col": 2 }, "7": { "line": 488, "col": 2 }, "9": { "line": 493, "col": 2 }, "11": { "line": 499, "col": 2 }, "13": { "line": 514, "col": 2 }, "15": { "line": 542, "col": 2 }, "17": { "line": 587, "col": 2 }, "19": { "line": 601, "col": 2 }, "21": { "line": 643, "col": 2 }, "22": { "line": 644, "col": 2 }, "24": { "line": 653, "col": 2 }, "3.0": { "line": 479, "col": 4 }, "4.0": { "line": 482, "col": 4 }, "5.0": { "line": 485, "col": 4 }, "5.1": { "line": 486, "col": 4 }, "7.0": { "line": 489, "col": 4 }, "7.1": { "line": 490, "col": 4 }, "7.2": { "line": 491, "col": 4 }, "9.0": { "line": 494, "col": 4 }, "9.1": { "line": 497, "col": 4 }, "11.0": { "line": 500, "col": 4 }, "11.1": { "line": 501, "col": 4 }, "11.2.0": { "line": 509, "col": 6 }, "11.2.1": { "line": 510, "col": 6 }, "11.2": { "line": 508, "col": 4 }, "11.4": { "line": 512, "col": 4 }, "13.1": { "line": 522, "col": 4 }, "13.2": { "line": 523, "col": 4 }, "13.3": { "line": 524, "col": 4 }, "13.4.0": { "line": 526, "col": 6 }, "13.4.1": { "line": 527, "col": 6 }, "13.4": { "line": 525, "col": 4 }, "13.5": { "line": 529, "col": 4 }, "13.6": { "line": 530, "col": 4 }, "13.7.0": { "line": 532, "col": 6 }, "13.7.1": { "line": 533, "col": 6 }, "13.7.2.0": { "line": 535, "col": 8 }, "13.7.2": { "line": 534, "col": 6 }, "13.7": { "line": 531, "col": 4 }, "13.9": { "line": 540, "col": 4 }, "15.0": { "line": 543, "col": 4 }, "15.1.0": { "line": 545, "col": 6 }, "15.1": { "line": 544, "col": 4 }, "15.2.0": { "line": 548, "col": 6 }, "15.2.1": { "line": 549, "col": 6 }, "15.2.2.0": { "line": 551, "col": 8 }, "15.2.2.1.0": { "line": 553, "col": 10 }, "15.2.2.1": { "line": 552, "col": 8 }, "15.2.2": { "line": 550, "col": 6 }, "15.2.4": { "line": 556, "col": 6 }, "15.2.5": { "line": 557, "col": 6 }, "15.2.6.0": { "line": 565, "col": 8 }, "15.2.6": { "line": 564, "col": 6 }, "15.2.7": { "line": 567, "col": 6 }, "15.2": { "line": 547, "col": 4 }, "15.4": { "line": 569, "col": 4 }, "15.5": { "line": 573, "col": 4 }, "15.6": { "line": 574, "col": 4 }, "15.7.0": { "line": 576, "col": 6 }, "15.7": { "line": 575, "col": 4 }, "15.8": { "line": 578, "col": 4 }, "15.9.0": { "line": 580, "col": 6 }, "15.9.1.0": { "line": 582, "col": 8 }, "15.9.1": { "line": 581, "col": 6 }, "15.9": { "line": 579, "col": 4 }, "15.11": { "line": 585, "col": 4 }, "17.0": { "line": 588, "col": 4 }, "17.1": { "line": 589, "col": 4 }, "17.2.0": { "line": 591, "col": 6 }, "17.2.1": { "line": 592, "col": 6 }, "17.2": { "line": 590, "col": 4 }, "17.4.0": { "line": 595, "col": 6 }, "17.4": { "line": 594, "col": 4 }, "17.6": { "line": 599, "col": 4 }, "19.0.0": { "line": 603, "col": 6 }, "19.0.1": { "line": 608, "col": 6 }, "19.0": { "line": 602, "col": 4 }, "19.2": { "line": 610, "col": 4 }, "19.3.0": { "line": 612, "col": 6 }, "19.3": { "line": 611, "col": 4 }, "19.5": { "line": 617, "col": 4 }, "19.6.0": { "line": 625, "col": 6 }, "19.6": { "line": 624, "col": 4 }, "19.7": { "line": 627, "col": 4 }, "19.8": { "line": 628, "col": 4 }, "19.9": { "line": 629, "col": 4 }, "19.10.0": { "line": 631, "col": 6 }, "19.10": { "line": 630, "col": 4 }, "19.12": { "line": 633, "col": 4 }, "19.13": { "line": 634, "col": 4 }, "22.0": { "line": 644, "col": 2 }, "22.1.0": { "line": 646, "col": 6 }, "22.1.1": { "line": 648, "col": 6 }, "22.1": { "line": 645, "col": 4 }, "22.3": { "line": 650, "col": 9 }, "22.4": { "line": 651, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:resolveEditInputs": { "1": { "line": 839, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_0": { "1.0.0": { "line": 841, "col": 6 }, "1.0": { "line": 840, "col": 4 }, "1.1": { "line": 843, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:generateImageFile": { "2": { "line": 871, "col": 2 }, "3": { "line": 872, "col": 2 }, "4": { "line": 873, "col": 2 }, "6": { "line": 879, "col": 2 }, "7": { "line": 885, "col": 2 }, "9": { "line": 891, "col": 2 }, "10": { "line": 892, "col": 2 }, "4.0": { "line": 874, "col": 4 }, "7.0": { "line": 886, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:mainAgent": { "1": { "line": 905, "col": 2 }, "3": { "line": 919, "col": 2 }, "1.0": { "line": 906, "col": 4 }, "1.1.1": { "line": 911, "col": 6 }, "1.1.2": { "line": 912, "col": 6 }, "1.1": { "line": 907, "col": 4 }, "1.3": { "line": 914, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReplyVia": { "1": { "line": 928, "col": 2 }, "2": { "line": 929, "col": 2 }, "4": { "line": 932, "col": 2 }, "6": { "line": 935, "col": 2 }, "8": { "line": 938, "col": 2 }, "10": { "line": 941, "col": 2 }, "12": { "line": 947, "col": 2 }, "13": { "line": 948, "col": 2 }, "15": { "line": 953, "col": 2 }, "16": { "line": 960, "col": 2 }, "18": { "line": 963, "col": 2 }, "19": { "line": 966, "col": 2 }, "20": { "line": 967, "col": 2 }, "2.0": { "line": 930, "col": 4 }, "4.0": { "line": 933, "col": 4 }, "6.0": { "line": 936, "col": 4 }, "8.0": { "line": 939, "col": 4 }, "10.0": { "line": 942, "col": 4 }, "13.0": { "line": 949, "col": 4 }, "15.1": { "line": 958, "col": 4 }, "16.0": { "line": 961, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_1": { "18.0": { "line": 964, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:agentReply": { "1": { "line": 977, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:roundedCost": { "1": { "line": 981, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:_buildStatus": { "1": { "line": 985, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:sample": { "1": { "line": 993, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:printHeader": { "1": { "line": 997, "col": 2 }, "2": { "line": 998, "col": 2 }, "3": { "line": 1020, "col": 2 } }, "dist/lib/agents/agency-agent/agent.agency:__block_2": { "2.0": { "line": 1005, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:__block_3": { "2.0.0": { "line": 1006, "col": 6 }, "2.0.1": { "line": 1014, "col": 6 }, "2.0.2": { "line": 1015, "col": 6 } }, "dist/lib/agents/agency-agent/agent.agency:__block_4": { "2.0.0.0": { "line": 1007, "col": 8 }, "2.0.0.1": { "line": 1008, "col": 8 }, "2.0.0.2": { "line": 1009, "col": 8 }, "2.0.0.3": { "line": 1010, "col": 8 }, "2.0.0.4": { "line": 1011, "col": 8 }, "2.0.0.5": { "line": 1012, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:__block_5": { "2.0.2.0": { "line": 1016, "col": 8 } }, "dist/lib/agents/agency-agent/agent.agency:printPolicyHelp": { "1": { "line": 1026, "col": 2 }, "2": { "line": 1027, "col": 2 }, "3": { "line": 1030, "col": 2 }, "4": { "line": 1031, "col": 2 }, "5": { "line": 1032, "col": 2 }, "5.0": { "line": 1033, "col": 4 }, "5.1": { "line": 1034, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:givePolicyChoice": { "1": { "line": 1039, "col": 2 }, "2": { "line": 1040, "col": 2 }, "3": { "line": 1041, "col": 2 }, "4": { "line": 1052, "col": 2 }, "5": { "line": 1053, "col": 9 }, "6": { "line": 1053, "col": 2 }, "5.0": { "line": 1054, "col": 17 }, "5.1": { "line": 1054, "col": 17 }, "5.2": { "line": 1055, "col": 21 }, "5.3": { "line": 1055, "col": 21 } }, "dist/lib/agents/agency-agent/agent.agency:setupSession": { "2": { "line": 1071, "col": 2 }, "3": { "line": 1076, "col": 2 }, "4": { "line": 1077, "col": 2 }, "5": { "line": 1083, "col": 2 }, "6": { "line": 1084, "col": 2 }, "7": { "line": 1086, "col": 2 }, "9": { "line": 1134, "col": 2 }, "3.0": { "line": 1076, "col": 2 }, "7.1": { "line": 1091, "col": 4 }, "7.2.1": { "line": 1097, "col": 6 }, "7.2.2": { "line": 1098, "col": 6 }, "7.2.4": { "line": 1103, "col": 6 }, "7.2.5.0": { "line": 1104, "col": 6 }, "7.2.5.1": { "line": 1105, "col": 8 }, "7.2.5.2": { "line": 1110, "col": 8 }, "7.2.5": { "line": 1104, "col": 6 }, "7.2.7": { "line": 1112, "col": 6 }, "7.2": { "line": 1092, "col": 4 }, "7.4": { "line": 1115, "col": 4 }, "7.5.0": { "line": 1116, "col": 4 }, "7.5.1.0.0": { "line": 1119, "col": 10 }, "7.5.1.0.1": { "line": 1120, "col": 10 }, "7.5.1.0.2": { "line": 1122, "col": 10 }, "7.5.1.0": { "line": 1118, "col": 8 }, "7.5.1.2": { "line": 1125, "col": 8 }, "7.5.1.3": { "line": 1126, "col": 8 }, "7.5.1": { "line": 1117, "col": 6 }, "7.5.3": { "line": 1129, "col": 6 }, "7.5": { "line": 1116, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:oneShotAgent": { "1": { "line": 1148, "col": 2 }, "2": { "line": 1149, "col": 2 }, "3": { "line": 1150, "col": 2 }, "4": { "line": 1151, "col": 2 }, "5": { "line": 1164, "col": 2 }, "4.1": { "line": 1155, "col": 4 }, "4.2.0": { "line": 1156, "col": 4 }, "4.2.1": { "line": 1157, "col": 6 }, "4.2.2": { "line": 1158, "col": 11 }, "4.2.3": { "line": 1159, "col": 6 }, "4.2": { "line": 1156, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:_runSeedTurn": { "1": { "line": 1171, "col": 2 }, "2": { "line": 1172, "col": 2 }, "3": { "line": 1173, "col": 2 }, "3.0": { "line": 1173, "col": 2 }, "3.1.0": { "line": 1175, "col": 6 }, "3.1.1": { "line": 1177, "col": 6 }, "3.1": { "line": 1174, "col": 4 }, "3.3": { "line": 1179, "col": 9 }, "3.4": { "line": 1180, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:startInteractive": { "1": { "line": 1191, "col": 2 }, "3": { "line": 1206, "col": 2 }, "1.0.0": { "line": 1193, "col": 6 }, "1.0": { "line": 1192, "col": 4 }, "1.1": { "line": 1195, "col": 4 } }, "dist/lib/agents/agency-agent/agent.agency:main": { "2": { "line": 1212, "col": 2 }, "3": { "line": 1298, "col": 2 }, "4": { "line": 1301, "col": 2 }, "6": { "line": 1307, "col": 2 }, "7": { "line": 1311, "col": 2 }, "8": { "line": 1318, "col": 2 }, "9": { "line": 1319, "col": 2 }, "10": { "line": 1320, "col": 2 }, "11": { "line": 1321, "col": 2 }, "12": { "line": 1327, "col": 2 }, "14": { "line": 1409, "col": 2 }, "15": { "line": 1410, "col": 2 }, "16": { "line": 1411, "col": 2 }, "17": { "line": 1412, "col": 2 }, "18": { "line": 1416, "col": 2 }, "19": { "line": 1417, "col": 2 }, "20": { "line": 1427, "col": 2 }, "21": { "line": 1428, "col": 2 }, "23": { "line": 1431, "col": 2 }, "24": { "line": 1432, "col": 2 }, "26": { "line": 1440, "col": 2 }, "27": { "line": 1443, "col": 2 }, "29": { "line": 1458, "col": 2 }, "31": { "line": 1477, "col": 2 }, "32": { "line": 1478, "col": 2 }, "34": { "line": 1496, "col": 2 }, "35": { "line": 1497, "col": 2 }, "36": { "line": 1498, "col": 2 }, "37": { "line": 1499, "col": 2 }, "38": { "line": 1500, "col": 2 }, "3.0": { "line": 1299, "col": 4 }, "4.0": { "line": 1302, "col": 4 }, "6.0": { "line": 1308, "col": 4 }, "6.1": { "line": 1309, "col": 4 }, "11.0": { "line": 1322, "col": 4 }, "11.1": { "line": 1325, "col": 4 }, "12.1.0": { "line": 1331, "col": 6 }, "12.1.1": { "line": 1332, "col": 6 }, "12.1": { "line": 1330, "col": 4 }, "12.3.0": { "line": 1335, "col": 6 }, "12.3.1": { "line": 1336, "col": 6 }, "12.3.2": { "line": 1337, "col": 6 }, "12.3": { "line": 1334, "col": 4 }, "12.5": { "line": 1339, "col": 4 }, "12.6.0": { "line": 1341, "col": 6 }, "12.6": { "line": 1340, "col": 4 }, "12.8": { "line": 1346, "col": 4 }, "12.9.0": { "line": 1354, "col": 6 }, "12.9": { "line": 1353, "col": 4 }, "12.10": { "line": 1356, "col": 4 }, "12.11": { "line": 1357, "col": 4 }, "12.12": { "line": 1360, "col": 4 }, "12.13": { "line": 1364, "col": 4 }, "12.15": { "line": 1368, "col": 4 }, "12.16": { "line": 1369, "col": 4 }, "12.17": { "line": 1370, "col": 4 }, "12.18": { "line": 1371, "col": 4 }, "12.19.0.0": { "line": 1374, "col": 8 }, "12.19.0.1": { "line": 1376, "col": 8 }, "12.19.0.2": { "line": 1378, "col": 8 }, "12.19.0.3": { "line": 1380, "col": 8 }, "12.19.0.4": { "line": 1385, "col": 8 }, "12.19.0": { "line": 1373, "col": 6 }, "12.19": { "line": 1372, "col": 4 }, "12.20": { "line": 1388, "col": 4 }, "12.21": { "line": 1389, "col": 4 }, "12.22.0": { "line": 1391, "col": 6 }, "12.22": { "line": 1390, "col": 4 }, "12.23.0": { "line": 1394, "col": 6 }, "12.23": { "line": 1393, "col": 4 }, "12.24": { "line": 1396, "col": 4 }, "12.25": { "line": 1402, "col": 4 }, "12.26": { "line": 1403, "col": 4 }, "21.0": { "line": 1429, "col": 4 }, "24.0": { "line": 1433, "col": 4 }, "27.0": { "line": 1444, "col": 4 }, "27.1": { "line": 1449, "col": 4 }, "29.0": { "line": 1459, "col": 4 }, "29.1": { "line": 1460, "col": 4 }, "29.2": { "line": 1461, "col": 4 }, "29.3": { "line": 1462, "col": 4 }, "29.4": { "line": 1463, "col": 4 }, "29.5": { "line": 1464, "col": 4 }, "32.0": { "line": 1479, "col": 4 }, "32.1.0": { "line": 1481, "col": 6 }, "32.1.1.0": { "line": 1483, "col": 8 }, "32.1.1": { "line": 1482, "col": 6 }, "32.1.2": { "line": 1485, "col": 6 }, "32.1": { "line": 1480, "col": 4 }, "32.2": { "line": 1487, "col": 4 }, "32.3": { "line": 1488, "col": 4 } } };
|
|
8300
8316
|
export {
|
|
8301
8317
|
Session,
|
|
8302
8318
|
__cb_top_0,
|
|
@@ -27,7 +27,7 @@ import { skillsDir } from "std::skills"
|
|
|
27
27
|
import { systemMessage } from "std::thread"
|
|
28
28
|
|
|
29
29
|
import { agentNames } from "../lib/config.agency"
|
|
30
|
-
import { withWebSearch } from "../lib/search.agency"
|
|
30
|
+
import { withWebSearch, getSearchBackend } from "../lib/search.agency"
|
|
31
31
|
import { oracleAgent } from "./oracle.agency"
|
|
32
32
|
import { review, renderFeedback, feedbackHasErrors } from "./review.agency"
|
|
33
33
|
|
|
@@ -72,30 +72,16 @@ You are the **code specialist** of a multi-thread Agency-language
|
|
|
72
72
|
assistant. You handle anything that touches code or the file system:
|
|
73
73
|
writing, editing, running, and typechecking Agency or shell code.
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
`agency compile`, ...)
|
|
86
|
-
Pick whichever matches the question rather than guessing.
|
|
87
|
-
|
|
88
|
-
- If the research involves something else (a research question,
|
|
89
|
-
an external API, a Wikipedia summary, or a URL fetch), call
|
|
90
|
-
`handoff(reason)` — the only valid target for you is the research
|
|
91
|
-
specialist, so just pass a brief reason. The runtime will re-route
|
|
92
|
-
the user's original message there.
|
|
93
|
-
|
|
94
|
-
**Bias toward staying in the code thread.** Most follow-up messages
|
|
95
|
-
("can you make it faster?", "fix the error", "what about edge
|
|
96
|
-
cases?") are continuations of the current coding task, NOT new
|
|
97
|
-
categories. Only call `handoff` when the message clearly needs
|
|
98
|
-
research-specialist tools.
|
|
75
|
+
For Agency-language questions (syntax, control flow, types, the CLI),
|
|
76
|
+
call the bundled docs tools — they are authoritative for Agency:
|
|
77
|
+
* `docSkill` — the language guide (syntax, types, error handling,
|
|
78
|
+
built-ins, callbacks, advanced types)
|
|
79
|
+
* `cliSkill` — the CLI reference (`agency run`, `agency test`, ...)
|
|
80
|
+
Pick whichever matches the question rather than guessing.
|
|
81
|
+
|
|
82
|
+
**Stay focused on the current task.** Most follow-ups ("can you make it
|
|
83
|
+
faster?", "fix the error", "what about edge cases?") are continuations
|
|
84
|
+
of the current work, not new categories.
|
|
99
85
|
|
|
100
86
|
## Style
|
|
101
87
|
|
|
@@ -359,6 +345,44 @@ export static const codeTools: any[] = [
|
|
|
359
345
|
oracleAgent.partial(allowHandoff: false),
|
|
360
346
|
]
|
|
361
347
|
|
|
348
|
+
// Appended to the system prompt only when a web-search backend is active
|
|
349
|
+
// (see `withWebSearch`, which already wires the search tool onto the llm()
|
|
350
|
+
// call). The prompt just needs to tell the model it HAS the capability — on
|
|
351
|
+
// the cloud path `configureSearch` defaults to hosted web search.
|
|
352
|
+
static const WEB_SEARCH_NOTE = """
|
|
353
|
+
You have **web search**. Use it directly whenever a task needs current or
|
|
354
|
+
external information — a fact to verify, a library or API to check, a
|
|
355
|
+
dataset or leaderboard to consult. Do NOT ask the user to look things up,
|
|
356
|
+
and do NOT decline a task as "needs research / out of scope": search for
|
|
357
|
+
what you need and keep going."""
|
|
358
|
+
|
|
359
|
+
// Appended in one-shot / autonomous mode (`agency agent -p`), where there is
|
|
360
|
+
// no human to answer questions and no next turn. Gated on `_oneShot` so the
|
|
361
|
+
// interactive REPL keeps its normal ask-when-unsure behavior.
|
|
362
|
+
static const ONE_SHOT_NOTE = """
|
|
363
|
+
You are running in **one-shot, autonomous mode**: no human will answer
|
|
364
|
+
questions and there is NO next turn. Therefore:
|
|
365
|
+
- NEVER end your turn by asking a clarifying question or waiting for input.
|
|
366
|
+
If something is ambiguous, state the most reasonable assumption and
|
|
367
|
+
proceed.
|
|
368
|
+
- NEVER defer work to "the next turn" or hand back a plan — do it now.
|
|
369
|
+
- NEVER end with an empty response or zero tool calls. If the task is hard,
|
|
370
|
+
underspecified, or outside your usual area, still take a concrete first
|
|
371
|
+
action toward it and write your best attempt to the required file — an
|
|
372
|
+
imperfect artifact on disk always beats producing nothing.
|
|
373
|
+
- Leave the task COMPLETE on disk: write the required file(s), then verify
|
|
374
|
+
(compile, run, run any tests) and fix what fails before you stop.
|
|
375
|
+
- If you are running low on tool budget, spend the remaining calls
|
|
376
|
+
producing and saving the best COMPLETE artifact you can. A working file
|
|
377
|
+
on disk beats a perfect plan that was never written."""
|
|
378
|
+
|
|
379
|
+
// Set by `agent.agency` (`setCodeOneShot`) before the first dispatch when the
|
|
380
|
+
// run is non-interactive. Gates `ONE_SHOT_NOTE`.
|
|
381
|
+
let _oneShot = false
|
|
382
|
+
export def setCodeOneShot(oneShot: boolean) {
|
|
383
|
+
_oneShot = oneShot
|
|
384
|
+
}
|
|
385
|
+
|
|
362
386
|
// only add system message the first time
|
|
363
387
|
let _first = true
|
|
364
388
|
|
|
@@ -397,7 +421,16 @@ export def codeAgent(userMsg: string, allowHandoff: boolean) {
|
|
|
397
421
|
firstIteration = false
|
|
398
422
|
iterations += 1
|
|
399
423
|
if (_first) {
|
|
400
|
-
|
|
424
|
+
// Compose the system prompt from the static base plus the
|
|
425
|
+
// capabilities that are actually active this run.
|
|
426
|
+
let sys = codeSysPrompt
|
|
427
|
+
if (getSearchBackend() != "off") {
|
|
428
|
+
sys = "${sys}\n\n${WEB_SEARCH_NOTE}"
|
|
429
|
+
}
|
|
430
|
+
if (_oneShot) {
|
|
431
|
+
sys = "${sys}\n\n${ONE_SHOT_NOTE}"
|
|
432
|
+
}
|
|
433
|
+
systemMessage(sys)
|
|
401
434
|
_first = false
|
|
402
435
|
}
|
|
403
436
|
reply = llm(
|