@eko-ai/eko 2.0.2-alpha.6 → 2.0.2-alpha.8
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/agent/base.d.ts +1 -0
- package/dist/agent/base.d.ts.map +1 -1
- package/dist/agent/browser/browser_base.d.ts +1 -1
- package/dist/agent/browser/browser_base.d.ts.map +1 -1
- package/dist/agent/browser/browser_labels.d.ts.map +1 -1
- package/dist/agent/browser/browser_screen.d.ts.map +1 -1
- package/dist/agent/browser/build_dom_tree.d.ts.map +1 -1
- package/dist/agent/computer.d.ts.map +1 -1
- package/dist/index.cjs.js +45 -20
- package/dist/index.esm.js +45 -20
- package/dist/prompt/agent.d.ts +1 -1
- package/dist/prompt/agent.d.ts.map +1 -1
- package/dist/prompt/plan.d.ts.map +1 -1
- package/dist/tools/human_interact.d.ts +1 -1
- package/dist/tools/human_interact.d.ts.map +1 -1
- package/dist/types/tools.types.d.ts +2 -1
- package/dist/types/tools.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/agent/base.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare class Agent {
|
|
|
25
25
|
protected system_auto_tools(agentNode: WorkflowAgent): Tool[];
|
|
26
26
|
private removeDuplicateToolUse;
|
|
27
27
|
protected initMessages(agentContext: AgentContext, tools?: Tool[]): LanguageModelV1Prompt;
|
|
28
|
+
protected extSysPrompt(): string;
|
|
28
29
|
private listTools;
|
|
29
30
|
protected controlMcpTools(agentContext: AgentContext, messages: LanguageModelV1Prompt, loopNum: number): Promise<{
|
|
30
31
|
mcpTools: boolean;
|
package/dist/agent/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/agent/base.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;A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,EAAE,qBAAqB,GAC9B,OAAO,CAAC,IAAI,CAAC;YAsDF,OAAO;cAqKL,aAAa,CAAC,GAAG,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAgB3E,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,KAAK,IAAI,IAAI,EAAE,CAElB;IAED,IAAI,eAAe,uBAElB;IAED,IAAI,SAAS,2BAEZ;CACF"}
|
|
@@ -22,7 +22,7 @@ export default abstract class BaseBrowserAgent extends Agent {
|
|
|
22
22
|
title: string;
|
|
23
23
|
}>;
|
|
24
24
|
protected go_back(agentContext: AgentContext): Promise<void>;
|
|
25
|
-
protected extract_content(agentContext: AgentContext): Promise<string>;
|
|
25
|
+
protected extract_content(agentContext: AgentContext, variable_name?: string): Promise<string>;
|
|
26
26
|
protected controlMcpTools(agentContext: AgentContext, messages: LanguageModelV1Prompt, loopNum: number): Promise<{
|
|
27
27
|
mcpTools: boolean;
|
|
28
28
|
mcpParams?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser_base.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,gBAAiB,SAAQ,KAAK;IAC1D,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC;QACjE,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,YAAY,GAAG,WAAW,CAAC;KACvC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C;KAChB,CAAC;IAaF,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,qBAAqB,GAAG;QACzD,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,OAAO,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,GAAG,IAAI;IAyCR,SAAS,CAAC,QAAQ,CAAC,cAAc,CAC/B,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EAC9B,IAAI,EAAE,GAAG,EAAE,GACV,OAAO,CAAC,GAAG,CAAC;cAEC,kBAAkB,CAChC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;CAG9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser_labels.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_labels.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,sBAAuB,SAAQ,gBAAgB;gBAC/D,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"browser_labels.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_labels.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,gBAAgB,CAAC;AA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,CAAC,OAAO,CACxB,YAAY,EAAE,YAAY,EAC1B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,KAAK,CACtB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GACtD,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,aAAa,CAC9B,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC;IAEhB,OAAO,CAAC,cAAc;cAsUN,cAAc,CAC5B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,IAAI,CAAC;CA4BjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_dom_tree.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/build_dom_tree.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"build_dom_tree.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/build_dom_tree.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,SA2pBjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer.d.ts","sourceRoot":"","sources":["../../src/agent/computer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,eAAO,MAAM,UAAU,aAAa,CAAC;AAErC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AAM,CACvB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,OAAO,CACxB,YAAY,EAAE,YAAY,EAC1B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,KAAK,CACtB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,MAAM,CACvB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,aAAa,CAC9B,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC;IAEhB,OAAO,CAAC,cAAc;cAyON,cAAc,CAC5B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,IAAI,CAAC;CAuCjB"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -15673,13 +15673,12 @@ const TOOL_NAME$3 = "human_interact";
|
|
|
15673
15673
|
class HumanInteractTool {
|
|
15674
15674
|
constructor() {
|
|
15675
15675
|
this.name = TOOL_NAME$3;
|
|
15676
|
+
this.noPlan = true;
|
|
15676
15677
|
this.description = `AI interacts with humans:
|
|
15677
15678
|
confirm: Ask the user to confirm whether to execute an operation, especially when performing dangerous actions such as deleting system files.
|
|
15678
15679
|
input: Prompt the user to enter text; for example, when a task is ambiguous, the AI can choose to ask the user for details, and the user can respond by inputting.
|
|
15679
15680
|
select: Allow the user to make a choice; in situations that require selection, the AI can ask the user to make a decision.
|
|
15680
15681
|
request_help: Request assistance from the user; for instance, when an operation is blocked, the AI can ask the user for help, such as needing to log into a website or solve a CAPTCHA.`;
|
|
15681
|
-
this.planDescription =
|
|
15682
|
-
"AI interacts with humans, when performing dangerous operations such as deleting files, you can request confirmation from humans";
|
|
15683
15682
|
this.parameters = {
|
|
15684
15683
|
type: "object",
|
|
15685
15684
|
properties: {
|
|
@@ -15951,12 +15950,15 @@ UTC datetime: {datetime}
|
|
|
15951
15950
|
</root>
|
|
15952
15951
|
`;
|
|
15953
15952
|
const HUMAN_PROMPT = `
|
|
15953
|
+
* HUMAN INTERACT
|
|
15954
15954
|
During the task execution process, you can use the \`${TOOL_NAME$3}\` tool to interact with humans, please call it in the following situations:
|
|
15955
15955
|
- When performing dangerous operations such as deleting files, confirmation from humans is required
|
|
15956
15956
|
- When encountering obstacles while accessing websites, such as requiring user login, you need to request human assistance
|
|
15957
|
+
- When requesting login, please only call the function when a login dialog box is clearly displayed.
|
|
15957
15958
|
- Try not to use the \`${TOOL_NAME$3}\` tool
|
|
15958
15959
|
`;
|
|
15959
15960
|
const VARIABLE_PROMPT = `
|
|
15961
|
+
* VARIABLE STORAGE
|
|
15960
15962
|
If you need to read and write the input/output variables in the node, require the use of the \`${TOOL_NAME$1}\` tool.
|
|
15961
15963
|
`;
|
|
15962
15964
|
const FOR_EACH_NODE = `
|
|
@@ -15981,8 +15983,8 @@ const WATCH_NODE = `
|
|
|
15981
15983
|
const WATCH_PROMPT = `
|
|
15982
15984
|
\`watch\`: monitor changes in webpage DOM or file content, when executing to the watch node, require the use of the \`${TOOL_NAME}\` tool.
|
|
15983
15985
|
`;
|
|
15984
|
-
function getAgentSystemPrompt(agent, agentNode, context, tools,
|
|
15985
|
-
let prompt = "";
|
|
15986
|
+
function getAgentSystemPrompt(agent, agentNode, context, tools, extSysPrompt) {
|
|
15987
|
+
let prompt = extSysPrompt || "";
|
|
15986
15988
|
let nodePrompt = "";
|
|
15987
15989
|
let agentNodeXml = agentNode.xml;
|
|
15988
15990
|
let hasWatch = agentNodeXml.indexOf("</watch>") > -1;
|
|
@@ -16005,7 +16007,7 @@ function getAgentSystemPrompt(agent, agentNode, context, tools, systemPrompt) {
|
|
|
16005
16007
|
prompt += WATCH_PROMPT;
|
|
16006
16008
|
nodePrompt += WATCH_NODE;
|
|
16007
16009
|
}
|
|
16008
|
-
return
|
|
16010
|
+
return AGENT_SYSTEM_TEMPLATE
|
|
16009
16011
|
.replace("{name}", config.name)
|
|
16010
16012
|
.replace("{agent}", agent.Name)
|
|
16011
16013
|
.replace("{description}", agent.Description)
|
|
@@ -16186,7 +16188,7 @@ class Agent {
|
|
|
16186
16188
|
let messages = [
|
|
16187
16189
|
{
|
|
16188
16190
|
role: "system",
|
|
16189
|
-
content: getAgentSystemPrompt(this, agentContext.agentChain.agent, agentContext.context, tools),
|
|
16191
|
+
content: getAgentSystemPrompt(this, agentContext.agentChain.agent, agentContext.context, tools, this.extSysPrompt()),
|
|
16190
16192
|
},
|
|
16191
16193
|
{
|
|
16192
16194
|
role: "user",
|
|
@@ -16200,6 +16202,9 @@ class Agent {
|
|
|
16200
16202
|
];
|
|
16201
16203
|
return messages;
|
|
16202
16204
|
}
|
|
16205
|
+
extSysPrompt() {
|
|
16206
|
+
return "";
|
|
16207
|
+
}
|
|
16203
16208
|
async listTools(agentNode, context, mcpClient, mcpParams) {
|
|
16204
16209
|
let list = await mcpClient.listTools({
|
|
16205
16210
|
taskId: context.taskId,
|
|
@@ -16601,7 +16606,7 @@ Your task is to understand the user's requirements, dynamically plan the user's
|
|
|
16601
16606
|
2. Analyze the Agents that need to be used based on the user's requirements.
|
|
16602
16607
|
3. Generate the Agent calling plan based on the analysis results.
|
|
16603
16608
|
4. About agent name, please do not arbitrarily fabricate non-existent agent names.
|
|
16604
|
-
5. You only need to provide the steps to complete the user's task, steps
|
|
16609
|
+
5. You only need to provide the steps to complete the user's task, key steps only, no need to be too detailed.
|
|
16605
16610
|
6. Please strictly follow the output format and example output.
|
|
16606
16611
|
7. The output language should follow the language corresponding to the user's task.
|
|
16607
16612
|
|
|
@@ -16762,7 +16767,9 @@ function getPlanSystemPrompt(agents) {
|
|
|
16762
16767
|
.map((agent) => {
|
|
16763
16768
|
return (`<agent name="${agent.Name}">\n` +
|
|
16764
16769
|
`Description: ${agent.PlanDescription || agent.Description}\nTools:\n` +
|
|
16765
|
-
agent.Tools.
|
|
16770
|
+
agent.Tools.filter((tool) => !tool.noPlan)
|
|
16771
|
+
.map((tool) => `- ${tool.name}: ${tool.planDescription || tool.description || ""}`)
|
|
16772
|
+
.join("\n") +
|
|
16766
16773
|
`\n</agent>`);
|
|
16767
16774
|
})
|
|
16768
16775
|
.join("\n\n");
|
|
@@ -17674,6 +17681,7 @@ This is a computer GUI interface, observe the execution through screenshots, and
|
|
|
17674
17681
|
},
|
|
17675
17682
|
{
|
|
17676
17683
|
name: "wait",
|
|
17684
|
+
noPlan: true,
|
|
17677
17685
|
description: "Wait for specified duration",
|
|
17678
17686
|
parameters: {
|
|
17679
17687
|
type: "object",
|
|
@@ -17698,7 +17706,7 @@ This is a computer GUI interface, observe the execution through screenshots, and
|
|
|
17698
17706
|
let lastMessage = messages[messages.length - 1];
|
|
17699
17707
|
if (lastMessage.role == "tool" &&
|
|
17700
17708
|
lastMessage.content.filter((t) => t.type == "tool-result").length > 0) {
|
|
17701
|
-
await sleep(
|
|
17709
|
+
await sleep(300);
|
|
17702
17710
|
let result = await this.screenshot(agentContext);
|
|
17703
17711
|
let image = toImage(result.imageBase64);
|
|
17704
17712
|
messages.push({
|
|
@@ -17735,13 +17743,13 @@ class BaseBrowserAgent extends Agent {
|
|
|
17735
17743
|
async go_back(agentContext) {
|
|
17736
17744
|
try {
|
|
17737
17745
|
await this.execute_script(agentContext, () => {
|
|
17738
|
-
|
|
17746
|
+
window.navigation.back();
|
|
17739
17747
|
}, []);
|
|
17740
17748
|
await sleep(100);
|
|
17741
17749
|
}
|
|
17742
17750
|
catch (e) { }
|
|
17743
17751
|
}
|
|
17744
|
-
async extract_content(agentContext) {
|
|
17752
|
+
async extract_content(agentContext, variable_name) {
|
|
17745
17753
|
let content = await this.execute_script(agentContext, () => {
|
|
17746
17754
|
return window.document.body.innerText
|
|
17747
17755
|
.replaceAll(/\n+/g, "\n")
|
|
@@ -17749,7 +17757,11 @@ class BaseBrowserAgent extends Agent {
|
|
|
17749
17757
|
.trim();
|
|
17750
17758
|
}, []);
|
|
17751
17759
|
let pageInfo = await this.get_current_page(agentContext);
|
|
17752
|
-
|
|
17760
|
+
let result = `title: ${pageInfo.title}\npage_url: ${pageInfo.url}\npage_content: \n${content}`;
|
|
17761
|
+
if (variable_name) {
|
|
17762
|
+
agentContext.context.variables.set(variable_name, result);
|
|
17763
|
+
}
|
|
17764
|
+
return result;
|
|
17753
17765
|
}
|
|
17754
17766
|
async controlMcpTools(agentContext, messages, loopNum) {
|
|
17755
17767
|
if (loopNum > 0) {
|
|
@@ -17951,6 +17963,10 @@ function run_build_dom_tree() {
|
|
|
17951
17963
|
for (let i = 0; i < includeAttributes.length; i++) {
|
|
17952
17964
|
let key = includeAttributes[i];
|
|
17953
17965
|
let value = node.attributes[key];
|
|
17966
|
+
if (key == "class" && value && value.length > 30) {
|
|
17967
|
+
let classList = value.split(" ").slice(0, 3);
|
|
17968
|
+
value = classList.join(" ");
|
|
17969
|
+
}
|
|
17954
17970
|
if (key && value) {
|
|
17955
17971
|
attributes_str += ` ${key}="${value}"`;
|
|
17956
17972
|
}
|
|
@@ -18464,15 +18480,17 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18464
18480
|
- Screenshot help verify element positions and relationships. Labels may sometimes overlap, so extracted elements are used to verify the correct elements.
|
|
18465
18481
|
- In addition to screenshot, simplified information about interactive elements is returned, with element indexes corresponding to those in the screenshot.
|
|
18466
18482
|
- This tool can ONLY screenshot the VISIBLE content. If a complete content is required, use 'extract_content' instead.
|
|
18483
|
+
- If the webpage content hasn't loaded, please use the \`wait\` tool to allow time for the content to load.
|
|
18467
18484
|
* ELEMENT INTERACTION:
|
|
18468
18485
|
- Only use indexes that exist in the provided element list
|
|
18469
18486
|
- Each element has a unique index number (e.g., "[33]:<button>")
|
|
18470
18487
|
- Elements marked with "[]:" are non-interactive (for context only)
|
|
18471
|
-
*
|
|
18488
|
+
* ERROR HANDLING:
|
|
18472
18489
|
- If no suitable elements exist, use other functions to complete the task
|
|
18473
18490
|
- If stuck, try alternative approaches, don't refuse tasks
|
|
18474
18491
|
- Handle popups/cookies by accepting or closing them
|
|
18475
|
-
- Use scroll to find elements you are looking for
|
|
18492
|
+
- Use scroll to find elements you are looking for
|
|
18493
|
+
- When extracting content, prioritize using extract_content, only scroll when you need to load more content`;
|
|
18476
18494
|
const _tools_ = [];
|
|
18477
18495
|
super({
|
|
18478
18496
|
name: AGENT_NAME,
|
|
@@ -18533,6 +18551,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18533
18551
|
break;
|
|
18534
18552
|
}
|
|
18535
18553
|
}
|
|
18554
|
+
await sleep(50);
|
|
18536
18555
|
let screenshot = await this.screenshot(agentContext);
|
|
18537
18556
|
let pseudoHtml = element_result.element_str;
|
|
18538
18557
|
return {
|
|
@@ -18708,7 +18727,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18708
18727
|
},
|
|
18709
18728
|
{
|
|
18710
18729
|
name: "extract_content",
|
|
18711
|
-
description: "Extract the text content of the current webpage.",
|
|
18730
|
+
description: "Extract the text content of the current webpage, obtain webpage data through this tool.",
|
|
18712
18731
|
parameters: {
|
|
18713
18732
|
type: "object",
|
|
18714
18733
|
properties: {},
|
|
@@ -18747,6 +18766,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18747
18766
|
},
|
|
18748
18767
|
{
|
|
18749
18768
|
name: "wait",
|
|
18769
|
+
noPlan: true,
|
|
18750
18770
|
description: "Wait for specified duration",
|
|
18751
18771
|
parameters: {
|
|
18752
18772
|
type: "object",
|
|
@@ -18771,8 +18791,9 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18771
18791
|
let lastTool = this.lastToolResult(messages);
|
|
18772
18792
|
if (lastTool &&
|
|
18773
18793
|
lastTool.toolName !== "extract_content" &&
|
|
18774
|
-
lastTool.toolName !== "get_all_tabs"
|
|
18775
|
-
|
|
18794
|
+
lastTool.toolName !== "get_all_tabs" &&
|
|
18795
|
+
lastTool.toolName !== "variable_storage") {
|
|
18796
|
+
await sleep(300);
|
|
18776
18797
|
let result = await this.screenshot_and_html(agentContext);
|
|
18777
18798
|
let image = toImage(result.imageBase64);
|
|
18778
18799
|
messages.push({
|
|
@@ -19061,7 +19082,7 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
19061
19082
|
},
|
|
19062
19083
|
{
|
|
19063
19084
|
name: "extract_content",
|
|
19064
|
-
description: "Extract the text content of the current webpage.",
|
|
19085
|
+
description: "Extract the text content of the current webpage, obtain webpage data through this tool.",
|
|
19065
19086
|
parameters: {
|
|
19066
19087
|
type: "object",
|
|
19067
19088
|
properties: {},
|
|
@@ -19147,6 +19168,7 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
19147
19168
|
},
|
|
19148
19169
|
{
|
|
19149
19170
|
name: "wait",
|
|
19171
|
+
noPlan: true,
|
|
19150
19172
|
description: "Wait for specified duration",
|
|
19151
19173
|
parameters: {
|
|
19152
19174
|
type: "object",
|
|
@@ -19169,8 +19191,11 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
19169
19191
|
}
|
|
19170
19192
|
async handleMessages(agentContext, messages) {
|
|
19171
19193
|
let lastTool = this.lastToolResult(messages);
|
|
19172
|
-
if (lastTool &&
|
|
19173
|
-
|
|
19194
|
+
if (lastTool &&
|
|
19195
|
+
lastTool.toolName !== "extract_content" &&
|
|
19196
|
+
lastTool.toolName !== "get_all_tabs" &&
|
|
19197
|
+
lastTool.toolName !== "variable_storage") {
|
|
19198
|
+
await sleep(300);
|
|
19174
19199
|
let result = await this.screenshot(agentContext);
|
|
19175
19200
|
let image = toImage(result.imageBase64);
|
|
19176
19201
|
messages.push({
|
package/dist/index.esm.js
CHANGED
|
@@ -15638,13 +15638,12 @@ const TOOL_NAME$3 = "human_interact";
|
|
|
15638
15638
|
class HumanInteractTool {
|
|
15639
15639
|
constructor() {
|
|
15640
15640
|
this.name = TOOL_NAME$3;
|
|
15641
|
+
this.noPlan = true;
|
|
15641
15642
|
this.description = `AI interacts with humans:
|
|
15642
15643
|
confirm: Ask the user to confirm whether to execute an operation, especially when performing dangerous actions such as deleting system files.
|
|
15643
15644
|
input: Prompt the user to enter text; for example, when a task is ambiguous, the AI can choose to ask the user for details, and the user can respond by inputting.
|
|
15644
15645
|
select: Allow the user to make a choice; in situations that require selection, the AI can ask the user to make a decision.
|
|
15645
15646
|
request_help: Request assistance from the user; for instance, when an operation is blocked, the AI can ask the user for help, such as needing to log into a website or solve a CAPTCHA.`;
|
|
15646
|
-
this.planDescription =
|
|
15647
|
-
"AI interacts with humans, when performing dangerous operations such as deleting files, you can request confirmation from humans";
|
|
15648
15647
|
this.parameters = {
|
|
15649
15648
|
type: "object",
|
|
15650
15649
|
properties: {
|
|
@@ -15916,12 +15915,15 @@ UTC datetime: {datetime}
|
|
|
15916
15915
|
</root>
|
|
15917
15916
|
`;
|
|
15918
15917
|
const HUMAN_PROMPT = `
|
|
15918
|
+
* HUMAN INTERACT
|
|
15919
15919
|
During the task execution process, you can use the \`${TOOL_NAME$3}\` tool to interact with humans, please call it in the following situations:
|
|
15920
15920
|
- When performing dangerous operations such as deleting files, confirmation from humans is required
|
|
15921
15921
|
- When encountering obstacles while accessing websites, such as requiring user login, you need to request human assistance
|
|
15922
|
+
- When requesting login, please only call the function when a login dialog box is clearly displayed.
|
|
15922
15923
|
- Try not to use the \`${TOOL_NAME$3}\` tool
|
|
15923
15924
|
`;
|
|
15924
15925
|
const VARIABLE_PROMPT = `
|
|
15926
|
+
* VARIABLE STORAGE
|
|
15925
15927
|
If you need to read and write the input/output variables in the node, require the use of the \`${TOOL_NAME$1}\` tool.
|
|
15926
15928
|
`;
|
|
15927
15929
|
const FOR_EACH_NODE = `
|
|
@@ -15946,8 +15948,8 @@ const WATCH_NODE = `
|
|
|
15946
15948
|
const WATCH_PROMPT = `
|
|
15947
15949
|
\`watch\`: monitor changes in webpage DOM or file content, when executing to the watch node, require the use of the \`${TOOL_NAME}\` tool.
|
|
15948
15950
|
`;
|
|
15949
|
-
function getAgentSystemPrompt(agent, agentNode, context, tools,
|
|
15950
|
-
let prompt = "";
|
|
15951
|
+
function getAgentSystemPrompt(agent, agentNode, context, tools, extSysPrompt) {
|
|
15952
|
+
let prompt = extSysPrompt || "";
|
|
15951
15953
|
let nodePrompt = "";
|
|
15952
15954
|
let agentNodeXml = agentNode.xml;
|
|
15953
15955
|
let hasWatch = agentNodeXml.indexOf("</watch>") > -1;
|
|
@@ -15970,7 +15972,7 @@ function getAgentSystemPrompt(agent, agentNode, context, tools, systemPrompt) {
|
|
|
15970
15972
|
prompt += WATCH_PROMPT;
|
|
15971
15973
|
nodePrompt += WATCH_NODE;
|
|
15972
15974
|
}
|
|
15973
|
-
return
|
|
15975
|
+
return AGENT_SYSTEM_TEMPLATE
|
|
15974
15976
|
.replace("{name}", config.name)
|
|
15975
15977
|
.replace("{agent}", agent.Name)
|
|
15976
15978
|
.replace("{description}", agent.Description)
|
|
@@ -16151,7 +16153,7 @@ class Agent {
|
|
|
16151
16153
|
let messages = [
|
|
16152
16154
|
{
|
|
16153
16155
|
role: "system",
|
|
16154
|
-
content: getAgentSystemPrompt(this, agentContext.agentChain.agent, agentContext.context, tools),
|
|
16156
|
+
content: getAgentSystemPrompt(this, agentContext.agentChain.agent, agentContext.context, tools, this.extSysPrompt()),
|
|
16155
16157
|
},
|
|
16156
16158
|
{
|
|
16157
16159
|
role: "user",
|
|
@@ -16165,6 +16167,9 @@ class Agent {
|
|
|
16165
16167
|
];
|
|
16166
16168
|
return messages;
|
|
16167
16169
|
}
|
|
16170
|
+
extSysPrompt() {
|
|
16171
|
+
return "";
|
|
16172
|
+
}
|
|
16168
16173
|
async listTools(agentNode, context, mcpClient, mcpParams) {
|
|
16169
16174
|
let list = await mcpClient.listTools({
|
|
16170
16175
|
taskId: context.taskId,
|
|
@@ -16566,7 +16571,7 @@ Your task is to understand the user's requirements, dynamically plan the user's
|
|
|
16566
16571
|
2. Analyze the Agents that need to be used based on the user's requirements.
|
|
16567
16572
|
3. Generate the Agent calling plan based on the analysis results.
|
|
16568
16573
|
4. About agent name, please do not arbitrarily fabricate non-existent agent names.
|
|
16569
|
-
5. You only need to provide the steps to complete the user's task, steps
|
|
16574
|
+
5. You only need to provide the steps to complete the user's task, key steps only, no need to be too detailed.
|
|
16570
16575
|
6. Please strictly follow the output format and example output.
|
|
16571
16576
|
7. The output language should follow the language corresponding to the user's task.
|
|
16572
16577
|
|
|
@@ -16727,7 +16732,9 @@ function getPlanSystemPrompt(agents) {
|
|
|
16727
16732
|
.map((agent) => {
|
|
16728
16733
|
return (`<agent name="${agent.Name}">\n` +
|
|
16729
16734
|
`Description: ${agent.PlanDescription || agent.Description}\nTools:\n` +
|
|
16730
|
-
agent.Tools.
|
|
16735
|
+
agent.Tools.filter((tool) => !tool.noPlan)
|
|
16736
|
+
.map((tool) => `- ${tool.name}: ${tool.planDescription || tool.description || ""}`)
|
|
16737
|
+
.join("\n") +
|
|
16731
16738
|
`\n</agent>`);
|
|
16732
16739
|
})
|
|
16733
16740
|
.join("\n\n");
|
|
@@ -17639,6 +17646,7 @@ This is a computer GUI interface, observe the execution through screenshots, and
|
|
|
17639
17646
|
},
|
|
17640
17647
|
{
|
|
17641
17648
|
name: "wait",
|
|
17649
|
+
noPlan: true,
|
|
17642
17650
|
description: "Wait for specified duration",
|
|
17643
17651
|
parameters: {
|
|
17644
17652
|
type: "object",
|
|
@@ -17663,7 +17671,7 @@ This is a computer GUI interface, observe the execution through screenshots, and
|
|
|
17663
17671
|
let lastMessage = messages[messages.length - 1];
|
|
17664
17672
|
if (lastMessage.role == "tool" &&
|
|
17665
17673
|
lastMessage.content.filter((t) => t.type == "tool-result").length > 0) {
|
|
17666
|
-
await sleep(
|
|
17674
|
+
await sleep(300);
|
|
17667
17675
|
let result = await this.screenshot(agentContext);
|
|
17668
17676
|
let image = toImage(result.imageBase64);
|
|
17669
17677
|
messages.push({
|
|
@@ -17700,13 +17708,13 @@ class BaseBrowserAgent extends Agent {
|
|
|
17700
17708
|
async go_back(agentContext) {
|
|
17701
17709
|
try {
|
|
17702
17710
|
await this.execute_script(agentContext, () => {
|
|
17703
|
-
|
|
17711
|
+
window.navigation.back();
|
|
17704
17712
|
}, []);
|
|
17705
17713
|
await sleep(100);
|
|
17706
17714
|
}
|
|
17707
17715
|
catch (e) { }
|
|
17708
17716
|
}
|
|
17709
|
-
async extract_content(agentContext) {
|
|
17717
|
+
async extract_content(agentContext, variable_name) {
|
|
17710
17718
|
let content = await this.execute_script(agentContext, () => {
|
|
17711
17719
|
return window.document.body.innerText
|
|
17712
17720
|
.replaceAll(/\n+/g, "\n")
|
|
@@ -17714,7 +17722,11 @@ class BaseBrowserAgent extends Agent {
|
|
|
17714
17722
|
.trim();
|
|
17715
17723
|
}, []);
|
|
17716
17724
|
let pageInfo = await this.get_current_page(agentContext);
|
|
17717
|
-
|
|
17725
|
+
let result = `title: ${pageInfo.title}\npage_url: ${pageInfo.url}\npage_content: \n${content}`;
|
|
17726
|
+
if (variable_name) {
|
|
17727
|
+
agentContext.context.variables.set(variable_name, result);
|
|
17728
|
+
}
|
|
17729
|
+
return result;
|
|
17718
17730
|
}
|
|
17719
17731
|
async controlMcpTools(agentContext, messages, loopNum) {
|
|
17720
17732
|
if (loopNum > 0) {
|
|
@@ -17916,6 +17928,10 @@ function run_build_dom_tree() {
|
|
|
17916
17928
|
for (let i = 0; i < includeAttributes.length; i++) {
|
|
17917
17929
|
let key = includeAttributes[i];
|
|
17918
17930
|
let value = node.attributes[key];
|
|
17931
|
+
if (key == "class" && value && value.length > 30) {
|
|
17932
|
+
let classList = value.split(" ").slice(0, 3);
|
|
17933
|
+
value = classList.join(" ");
|
|
17934
|
+
}
|
|
17919
17935
|
if (key && value) {
|
|
17920
17936
|
attributes_str += ` ${key}="${value}"`;
|
|
17921
17937
|
}
|
|
@@ -18429,15 +18445,17 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18429
18445
|
- Screenshot help verify element positions and relationships. Labels may sometimes overlap, so extracted elements are used to verify the correct elements.
|
|
18430
18446
|
- In addition to screenshot, simplified information about interactive elements is returned, with element indexes corresponding to those in the screenshot.
|
|
18431
18447
|
- This tool can ONLY screenshot the VISIBLE content. If a complete content is required, use 'extract_content' instead.
|
|
18448
|
+
- If the webpage content hasn't loaded, please use the \`wait\` tool to allow time for the content to load.
|
|
18432
18449
|
* ELEMENT INTERACTION:
|
|
18433
18450
|
- Only use indexes that exist in the provided element list
|
|
18434
18451
|
- Each element has a unique index number (e.g., "[33]:<button>")
|
|
18435
18452
|
- Elements marked with "[]:" are non-interactive (for context only)
|
|
18436
|
-
*
|
|
18453
|
+
* ERROR HANDLING:
|
|
18437
18454
|
- If no suitable elements exist, use other functions to complete the task
|
|
18438
18455
|
- If stuck, try alternative approaches, don't refuse tasks
|
|
18439
18456
|
- Handle popups/cookies by accepting or closing them
|
|
18440
|
-
- Use scroll to find elements you are looking for
|
|
18457
|
+
- Use scroll to find elements you are looking for
|
|
18458
|
+
- When extracting content, prioritize using extract_content, only scroll when you need to load more content`;
|
|
18441
18459
|
const _tools_ = [];
|
|
18442
18460
|
super({
|
|
18443
18461
|
name: AGENT_NAME,
|
|
@@ -18498,6 +18516,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18498
18516
|
break;
|
|
18499
18517
|
}
|
|
18500
18518
|
}
|
|
18519
|
+
await sleep(50);
|
|
18501
18520
|
let screenshot = await this.screenshot(agentContext);
|
|
18502
18521
|
let pseudoHtml = element_result.element_str;
|
|
18503
18522
|
return {
|
|
@@ -18673,7 +18692,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18673
18692
|
},
|
|
18674
18693
|
{
|
|
18675
18694
|
name: "extract_content",
|
|
18676
|
-
description: "Extract the text content of the current webpage.",
|
|
18695
|
+
description: "Extract the text content of the current webpage, obtain webpage data through this tool.",
|
|
18677
18696
|
parameters: {
|
|
18678
18697
|
type: "object",
|
|
18679
18698
|
properties: {},
|
|
@@ -18712,6 +18731,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18712
18731
|
},
|
|
18713
18732
|
{
|
|
18714
18733
|
name: "wait",
|
|
18734
|
+
noPlan: true,
|
|
18715
18735
|
description: "Wait for specified duration",
|
|
18716
18736
|
parameters: {
|
|
18717
18737
|
type: "object",
|
|
@@ -18736,8 +18756,9 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18736
18756
|
let lastTool = this.lastToolResult(messages);
|
|
18737
18757
|
if (lastTool &&
|
|
18738
18758
|
lastTool.toolName !== "extract_content" &&
|
|
18739
|
-
lastTool.toolName !== "get_all_tabs"
|
|
18740
|
-
|
|
18759
|
+
lastTool.toolName !== "get_all_tabs" &&
|
|
18760
|
+
lastTool.toolName !== "variable_storage") {
|
|
18761
|
+
await sleep(300);
|
|
18741
18762
|
let result = await this.screenshot_and_html(agentContext);
|
|
18742
18763
|
let image = toImage(result.imageBase64);
|
|
18743
18764
|
messages.push({
|
|
@@ -19026,7 +19047,7 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
19026
19047
|
},
|
|
19027
19048
|
{
|
|
19028
19049
|
name: "extract_content",
|
|
19029
|
-
description: "Extract the text content of the current webpage.",
|
|
19050
|
+
description: "Extract the text content of the current webpage, obtain webpage data through this tool.",
|
|
19030
19051
|
parameters: {
|
|
19031
19052
|
type: "object",
|
|
19032
19053
|
properties: {},
|
|
@@ -19112,6 +19133,7 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
19112
19133
|
},
|
|
19113
19134
|
{
|
|
19114
19135
|
name: "wait",
|
|
19136
|
+
noPlan: true,
|
|
19115
19137
|
description: "Wait for specified duration",
|
|
19116
19138
|
parameters: {
|
|
19117
19139
|
type: "object",
|
|
@@ -19134,8 +19156,11 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
19134
19156
|
}
|
|
19135
19157
|
async handleMessages(agentContext, messages) {
|
|
19136
19158
|
let lastTool = this.lastToolResult(messages);
|
|
19137
|
-
if (lastTool &&
|
|
19138
|
-
|
|
19159
|
+
if (lastTool &&
|
|
19160
|
+
lastTool.toolName !== "extract_content" &&
|
|
19161
|
+
lastTool.toolName !== "get_all_tabs" &&
|
|
19162
|
+
lastTool.toolName !== "variable_storage") {
|
|
19163
|
+
await sleep(300);
|
|
19139
19164
|
let result = await this.screenshot(agentContext);
|
|
19140
19165
|
let image = toImage(result.imageBase64);
|
|
19141
19166
|
messages.push({
|
package/dist/prompt/agent.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { Agent } from "../agent";
|
|
|
2
2
|
import Context from "../core/context";
|
|
3
3
|
import { WorkflowAgent } from "../types/core.types";
|
|
4
4
|
import { Tool } from "../types";
|
|
5
|
-
export declare function getAgentSystemPrompt(agent: Agent, agentNode: WorkflowAgent, context: Context, tools?: Tool[],
|
|
5
|
+
export declare function getAgentSystemPrompt(agent: Agent, agentNode: WorkflowAgent, context: Context, tools?: Tool[], extSysPrompt?: string): string;
|
|
6
6
|
export declare function getAgentUserPrompt(agent: Agent, agentNode: WorkflowAgent, context: Context, tools?: Tool[]): string;
|
|
7
7
|
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/prompt/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMpD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/prompt/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMpD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgEhC,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE,IAAI,EAAE,EACd,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAkCR;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE,IAAI,EAAE,GACb,MAAM,CAaR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/prompt/plan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AA8KjC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/prompt/plan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AA8KjC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CA+B3D;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAWR"}
|
|
@@ -5,7 +5,7 @@ export declare const TOOL_NAME = "human_interact";
|
|
|
5
5
|
export default class HumanInteractTool implements Tool {
|
|
6
6
|
readonly name: string;
|
|
7
7
|
readonly description: string;
|
|
8
|
-
readonly
|
|
8
|
+
readonly noPlan: boolean;
|
|
9
9
|
readonly parameters: JSONSchema7;
|
|
10
10
|
constructor();
|
|
11
11
|
execute(args: Record<string, unknown>, agentContext: AgentContext): Promise<ToolResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"human_interact.d.ts","sourceRoot":"","sources":["../../src/tools/human_interact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,IAAI;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAa;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"human_interact.d.ts","sourceRoot":"","sources":["../../src/tools/human_interact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,IAAI;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAa;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAQ;IAChC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;;IA0C3B,OAAO,CACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,UAAU,CAAC;CAsEvB"}
|
|
@@ -52,7 +52,8 @@ export interface ToolExecuter {
|
|
|
52
52
|
export interface Tool extends ToolExecuter {
|
|
53
53
|
readonly name: string;
|
|
54
54
|
readonly description?: string;
|
|
55
|
-
readonly planDescription?: string;
|
|
56
55
|
readonly parameters: JSONSchema7;
|
|
56
|
+
readonly noPlan?: boolean;
|
|
57
|
+
readonly planDescription?: string;
|
|
57
58
|
}
|
|
58
59
|
//# sourceMappingURL=tools.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.types.d.ts","sourceRoot":"","sources":["../../src/types/tools.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,UAAU,GAClB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC;CACzB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,WAAW,CAAC;CAC3B,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;CAC1B,GACD;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,WAAW,CAAC;KACzB,CAAC;CACH,CAAC;AAEN,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EACH;QACE;YACE,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;SACd;KACF,GACD;QACE;YACE,I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