@nodetool-ai/agents 0.7.0-rc.11
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-executor.d.ts +62 -0
- package/dist/agent-executor.d.ts.map +1 -0
- package/dist/agent-executor.js +324 -0
- package/dist/agent-executor.js.map +1 -0
- package/dist/agent-step-executor.d.ts +28 -0
- package/dist/agent-step-executor.d.ts.map +1 -0
- package/dist/agent-step-executor.js +99 -0
- package/dist/agent-step-executor.js.map +1 -0
- package/dist/agent-workflow-runner.d.ts +31 -0
- package/dist/agent-workflow-runner.d.ts.map +1 -0
- package/dist/agent-workflow-runner.js +124 -0
- package/dist/agent-workflow-runner.js.map +1 -0
- package/dist/agent.d.ts +115 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +587 -0
- package/dist/agent.js.map +1 -0
- package/dist/base-agent.d.ts +42 -0
- package/dist/base-agent.d.ts.map +1 -0
- package/dist/base-agent.js +29 -0
- package/dist/base-agent.js.map +1 -0
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +8 -0
- package/dist/constants.js.map +1 -0
- package/dist/graph-builder.d.ts +49 -0
- package/dist/graph-builder.d.ts.map +1 -0
- package/dist/graph-builder.js +206 -0
- package/dist/graph-builder.js.map +1 -0
- package/dist/graph-planner.d.ts +56 -0
- package/dist/graph-planner.d.ts.map +1 -0
- package/dist/graph-planner.js +311 -0
- package/dist/graph-planner.js.map +1 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/js-sandbox.d.ts +84 -0
- package/dist/js-sandbox.d.ts.map +1 -0
- package/dist/js-sandbox.js +654 -0
- package/dist/js-sandbox.js.map +1 -0
- package/dist/multi-mode-agent.d.ts +86 -0
- package/dist/multi-mode-agent.d.ts.map +1 -0
- package/dist/multi-mode-agent.js +476 -0
- package/dist/multi-mode-agent.js.map +1 -0
- package/dist/output-format.d.ts +10 -0
- package/dist/output-format.d.ts.map +1 -0
- package/dist/output-format.js +17 -0
- package/dist/output-format.js.map +1 -0
- package/dist/parallel-task-executor.d.ts +87 -0
- package/dist/parallel-task-executor.d.ts.map +1 -0
- package/dist/parallel-task-executor.js +332 -0
- package/dist/parallel-task-executor.js.map +1 -0
- package/dist/prompts/graph-planner-prompt.d.ts +48 -0
- package/dist/prompts/graph-planner-prompt.d.ts.map +1 -0
- package/dist/prompts/graph-planner-prompt.js +180 -0
- package/dist/prompts/graph-planner-prompt.js.map +1 -0
- package/dist/reject-agentic-provider.d.ts +21 -0
- package/dist/reject-agentic-provider.d.ts.map +1 -0
- package/dist/reject-agentic-provider.js +32 -0
- package/dist/reject-agentic-provider.js.map +1 -0
- package/dist/simple-agent.d.ts +29 -0
- package/dist/simple-agent.d.ts.map +1 -0
- package/dist/simple-agent.js +54 -0
- package/dist/simple-agent.js.map +1 -0
- package/dist/step-executor.d.ts +162 -0
- package/dist/step-executor.d.ts.map +1 -0
- package/dist/step-executor.js +1114 -0
- package/dist/step-executor.js.map +1 -0
- package/dist/sub-agent-planner.d.ts +33 -0
- package/dist/sub-agent-planner.d.ts.map +1 -0
- package/dist/sub-agent-planner.js +203 -0
- package/dist/sub-agent-planner.js.map +1 -0
- package/dist/task-executor.d.ts +89 -0
- package/dist/task-executor.d.ts.map +1 -0
- package/dist/task-executor.js +359 -0
- package/dist/task-executor.js.map +1 -0
- package/dist/task-planner.d.ts +44 -0
- package/dist/task-planner.d.ts.map +1 -0
- package/dist/task-planner.js +532 -0
- package/dist/task-planner.js.map +1 -0
- package/dist/team/db-task-board.d.ts +54 -0
- package/dist/team/db-task-board.d.ts.map +1 -0
- package/dist/team/db-task-board.js +361 -0
- package/dist/team/db-task-board.js.map +1 -0
- package/dist/team/edge-message-bus.d.ts +51 -0
- package/dist/team/edge-message-bus.d.ts.map +1 -0
- package/dist/team/edge-message-bus.js +169 -0
- package/dist/team/edge-message-bus.js.map +1 -0
- package/dist/team/edge-task-board.d.ts +77 -0
- package/dist/team/edge-task-board.d.ts.map +1 -0
- package/dist/team/edge-task-board.js +140 -0
- package/dist/team/edge-task-board.js.map +1 -0
- package/dist/team/index.d.ts +16 -0
- package/dist/team/index.d.ts.map +1 -0
- package/dist/team/index.js +17 -0
- package/dist/team/index.js.map +1 -0
- package/dist/team/message-bus.d.ts +58 -0
- package/dist/team/message-bus.d.ts.map +1 -0
- package/dist/team/message-bus.js +151 -0
- package/dist/team/message-bus.js.map +1 -0
- package/dist/team/task-board.d.ts +106 -0
- package/dist/team/task-board.d.ts.map +1 -0
- package/dist/team/task-board.js +370 -0
- package/dist/team/task-board.js.map +1 -0
- package/dist/team/team-executor.d.ts +72 -0
- package/dist/team/team-executor.d.ts.map +1 -0
- package/dist/team/team-executor.js +466 -0
- package/dist/team/team-executor.js.map +1 -0
- package/dist/team/team-tools.d.ts +252 -0
- package/dist/team/team-tools.d.ts.map +1 -0
- package/dist/team/team-tools.js +412 -0
- package/dist/team/team-tools.js.map +1 -0
- package/dist/team/types.d.ts +198 -0
- package/dist/team/types.d.ts.map +1 -0
- package/dist/team/types.js +8 -0
- package/dist/team/types.js.map +1 -0
- package/dist/tools/add-edge-tool.d.ts +18 -0
- package/dist/tools/add-edge-tool.d.ts.map +1 -0
- package/dist/tools/add-edge-tool.js +92 -0
- package/dist/tools/add-edge-tool.js.map +1 -0
- package/dist/tools/add-node-tool.d.ts +22 -0
- package/dist/tools/add-node-tool.d.ts.map +1 -0
- package/dist/tools/add-node-tool.js +128 -0
- package/dist/tools/add-node-tool.js.map +1 -0
- package/dist/tools/asset-tools.d.ts +58 -0
- package/dist/tools/asset-tools.d.ts.map +1 -0
- package/dist/tools/asset-tools.js +191 -0
- package/dist/tools/asset-tools.js.map +1 -0
- package/dist/tools/base-tool.d.ts +25 -0
- package/dist/tools/base-tool.d.ts.map +1 -0
- package/dist/tools/base-tool.js +24 -0
- package/dist/tools/base-tool.js.map +1 -0
- package/dist/tools/browser-tools.d.ts +32 -0
- package/dist/tools/browser-tools.d.ts.map +1 -0
- package/dist/tools/browser-tools.js +208 -0
- package/dist/tools/browser-tools.js.map +1 -0
- package/dist/tools/calculator-tool.d.ts +24 -0
- package/dist/tools/calculator-tool.d.ts.map +1 -0
- package/dist/tools/calculator-tool.js +64 -0
- package/dist/tools/calculator-tool.js.map +1 -0
- package/dist/tools/claude-code-tools.d.ts +96 -0
- package/dist/tools/claude-code-tools.d.ts.map +1 -0
- package/dist/tools/claude-code-tools.js +463 -0
- package/dist/tools/claude-code-tools.js.map +1 -0
- package/dist/tools/code-tools.d.ts +26 -0
- package/dist/tools/code-tools.d.ts.map +1 -0
- package/dist/tools/code-tools.js +82 -0
- package/dist/tools/code-tools.js.map +1 -0
- package/dist/tools/control-tool.d.ts +47 -0
- package/dist/tools/control-tool.d.ts.map +1 -0
- package/dist/tools/control-tool.js +101 -0
- package/dist/tools/control-tool.js.map +1 -0
- package/dist/tools/create-plan-tool.d.ts +29 -0
- package/dist/tools/create-plan-tool.d.ts.map +1 -0
- package/dist/tools/create-plan-tool.js +355 -0
- package/dist/tools/create-plan-tool.js.map +1 -0
- package/dist/tools/create-task-tool.d.ts +28 -0
- package/dist/tools/create-task-tool.d.ts.map +1 -0
- package/dist/tools/create-task-tool.js +254 -0
- package/dist/tools/create-task-tool.js.map +1 -0
- package/dist/tools/dataseo-tools.d.ts +38 -0
- package/dist/tools/dataseo-tools.d.ts.map +1 -0
- package/dist/tools/dataseo-tools.js +329 -0
- package/dist/tools/dataseo-tools.js.map +1 -0
- package/dist/tools/email-tools.d.ts +76 -0
- package/dist/tools/email-tools.d.ts.map +1 -0
- package/dist/tools/email-tools.js +259 -0
- package/dist/tools/email-tools.js.map +1 -0
- package/dist/tools/filesystem-tools.d.ts +77 -0
- package/dist/tools/filesystem-tools.d.ts.map +1 -0
- package/dist/tools/filesystem-tools.js +334 -0
- package/dist/tools/filesystem-tools.js.map +1 -0
- package/dist/tools/find-model-tool.d.ts +25 -0
- package/dist/tools/find-model-tool.d.ts.map +1 -0
- package/dist/tools/find-model-tool.js +236 -0
- package/dist/tools/find-model-tool.js.map +1 -0
- package/dist/tools/finish-graph-tool.d.ts +23 -0
- package/dist/tools/finish-graph-tool.d.ts.map +1 -0
- package/dist/tools/finish-graph-tool.js +46 -0
- package/dist/tools/finish-graph-tool.js.map +1 -0
- package/dist/tools/finish-step-tool.d.ts +16 -0
- package/dist/tools/finish-step-tool.d.ts.map +1 -0
- package/dist/tools/finish-step-tool.js +68 -0
- package/dist/tools/finish-step-tool.js.map +1 -0
- package/dist/tools/google-tools.d.ts +44 -0
- package/dist/tools/google-tools.d.ts.map +1 -0
- package/dist/tools/google-tools.js +176 -0
- package/dist/tools/google-tools.js.map +1 -0
- package/dist/tools/http-tools.d.ts +56 -0
- package/dist/tools/http-tools.d.ts.map +1 -0
- package/dist/tools/http-tools.js +180 -0
- package/dist/tools/http-tools.js.map +1 -0
- package/dist/tools/js-code-tool.d.ts +30 -0
- package/dist/tools/js-code-tool.d.ts.map +1 -0
- package/dist/tools/js-code-tool.js +98 -0
- package/dist/tools/js-code-tool.js.map +1 -0
- package/dist/tools/local-get-node-info-tool.d.ts +19 -0
- package/dist/tools/local-get-node-info-tool.d.ts.map +1 -0
- package/dist/tools/local-get-node-info-tool.js +75 -0
- package/dist/tools/local-get-node-info-tool.js.map +1 -0
- package/dist/tools/local-list-nodes-tool.d.ts +19 -0
- package/dist/tools/local-list-nodes-tool.d.ts.map +1 -0
- package/dist/tools/local-list-nodes-tool.js +69 -0
- package/dist/tools/local-list-nodes-tool.js.map +1 -0
- package/dist/tools/local-search-nodes-tool.d.ts +21 -0
- package/dist/tools/local-search-nodes-tool.d.ts.map +1 -0
- package/dist/tools/local-search-nodes-tool.js +111 -0
- package/dist/tools/local-search-nodes-tool.js.map +1 -0
- package/dist/tools/math-tools.d.ts +156 -0
- package/dist/tools/math-tools.d.ts.map +1 -0
- package/dist/tools/math-tools.js +422 -0
- package/dist/tools/math-tools.js.map +1 -0
- package/dist/tools/mcp-tools.d.ts +413 -0
- package/dist/tools/mcp-tools.d.ts.map +1 -0
- package/dist/tools/mcp-tools.js +618 -0
- package/dist/tools/mcp-tools.js.map +1 -0
- package/dist/tools/media-tools.d.ts +277 -0
- package/dist/tools/media-tools.d.ts.map +1 -0
- package/dist/tools/media-tools.js +682 -0
- package/dist/tools/media-tools.js.map +1 -0
- package/dist/tools/model-tools.d.ts +25 -0
- package/dist/tools/model-tools.d.ts.map +1 -0
- package/dist/tools/model-tools.js +48 -0
- package/dist/tools/model-tools.js.map +1 -0
- package/dist/tools/openai-tools.d.ts +73 -0
- package/dist/tools/openai-tools.d.ts.map +1 -0
- package/dist/tools/openai-tools.js +193 -0
- package/dist/tools/openai-tools.js.map +1 -0
- package/dist/tools/pdf-tools.d.ts +152 -0
- package/dist/tools/pdf-tools.d.ts.map +1 -0
- package/dist/tools/pdf-tools.js +339 -0
- package/dist/tools/pdf-tools.js.map +1 -0
- package/dist/tools/plan-builder-tools.d.ts +72 -0
- package/dist/tools/plan-builder-tools.d.ts.map +1 -0
- package/dist/tools/plan-builder-tools.js +438 -0
- package/dist/tools/plan-builder-tools.js.map +1 -0
- package/dist/tools/search-tools.d.ts +39 -0
- package/dist/tools/search-tools.d.ts.map +1 -0
- package/dist/tools/search-tools.js +218 -0
- package/dist/tools/search-tools.js.map +1 -0
- package/dist/tools/serp-providers/dataforseo-provider.d.ts +14 -0
- package/dist/tools/serp-providers/dataforseo-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/dataforseo-provider.js +114 -0
- package/dist/tools/serp-providers/dataforseo-provider.js.map +1 -0
- package/dist/tools/serp-providers/index.d.ts +35 -0
- package/dist/tools/serp-providers/index.d.ts.map +1 -0
- package/dist/tools/serp-providers/index.js +14 -0
- package/dist/tools/serp-providers/index.js.map +1 -0
- package/dist/tools/serp-providers/serpapi-provider.d.ts +18 -0
- package/dist/tools/serp-providers/serpapi-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/serpapi-provider.js +66 -0
- package/dist/tools/serp-providers/serpapi-provider.js.map +1 -0
- package/dist/tools/tool-registry.d.ts +9 -0
- package/dist/tools/tool-registry.d.ts.map +1 -0
- package/dist/tools/tool-registry.js +17 -0
- package/dist/tools/tool-registry.js.map +1 -0
- package/dist/tools/vector-tools.d.ts +224 -0
- package/dist/tools/vector-tools.d.ts.map +1 -0
- package/dist/tools/vector-tools.js +582 -0
- package/dist/tools/vector-tools.js.map +1 -0
- package/dist/tools/workspace-tools.d.ts +58 -0
- package/dist/tools/workspace-tools.d.ts.map +1 -0
- package/dist/tools/workspace-tools.js +152 -0
- package/dist/tools/workspace-tools.js.map +1 -0
- package/dist/types.d.ts +65 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/json-parser.d.ts +15 -0
- package/dist/utils/json-parser.d.ts.map +1 -0
- package/dist/utils/json-parser.js +78 -0
- package/dist/utils/json-parser.js.map +1 -0
- package/dist/utils/remove-base64-images.d.ts +12 -0
- package/dist/utils/remove-base64-images.d.ts.map +1 -0
- package/dist/utils/remove-base64-images.js +20 -0
- package/dist/utils/remove-base64-images.js.map +1 -0
- package/dist/utils/wrap-generators-parallel.d.ts +11 -0
- package/dist/utils/wrap-generators-parallel.d.ts.map +1 -0
- package/dist/utils/wrap-generators-parallel.js +38 -0
- package/dist/utils/wrap-generators-parallel.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team Tools — Tools exposed to agents for inter-agent communication
|
|
3
|
+
* and shared task board interaction.
|
|
4
|
+
*
|
|
5
|
+
* These tools are automatically added to every agent in a team,
|
|
6
|
+
* giving them the ability to message teammates and manage tasks.
|
|
7
|
+
*/
|
|
8
|
+
import type { ProcessingContext } from "@nodetool-ai/runtime";
|
|
9
|
+
import { Tool } from "../tools/base-tool.js";
|
|
10
|
+
import type { AgentIdentity, IMessageBus, ITaskBoard } from "./types.js";
|
|
11
|
+
export declare class SendMessageTool extends Tool {
|
|
12
|
+
private agentId;
|
|
13
|
+
private bus;
|
|
14
|
+
private roster;
|
|
15
|
+
readonly name = "send_message";
|
|
16
|
+
readonly description = "Send a message to a specific teammate. Use this to request help, share findings, or coordinate work.";
|
|
17
|
+
readonly inputSchema: {
|
|
18
|
+
type: "object";
|
|
19
|
+
properties: {
|
|
20
|
+
to: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
subject: {
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
body: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
type: {
|
|
33
|
+
type: string;
|
|
34
|
+
enum: string[];
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
reply_to: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
required: string[];
|
|
43
|
+
};
|
|
44
|
+
constructor(agentId: string, bus: IMessageBus, roster: AgentIdentity[]);
|
|
45
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
46
|
+
userMessage(params: Record<string, unknown>): string;
|
|
47
|
+
}
|
|
48
|
+
export declare class BroadcastTool extends Tool {
|
|
49
|
+
private agentId;
|
|
50
|
+
private bus;
|
|
51
|
+
readonly name = "broadcast";
|
|
52
|
+
readonly description = "Send a message to all teammates at once. Use for announcements or sharing results with the whole team.";
|
|
53
|
+
readonly inputSchema: {
|
|
54
|
+
type: "object";
|
|
55
|
+
properties: {
|
|
56
|
+
subject: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
body: {
|
|
61
|
+
type: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
required: string[];
|
|
66
|
+
};
|
|
67
|
+
constructor(agentId: string, bus: IMessageBus);
|
|
68
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
69
|
+
userMessage(params: Record<string, unknown>): string;
|
|
70
|
+
}
|
|
71
|
+
export declare class CheckMessagesTool extends Tool {
|
|
72
|
+
private agentId;
|
|
73
|
+
private bus;
|
|
74
|
+
readonly name = "check_messages";
|
|
75
|
+
readonly description = "Check your inbox for messages from teammates. Returns and clears pending messages.";
|
|
76
|
+
readonly inputSchema: {
|
|
77
|
+
type: "object";
|
|
78
|
+
properties: {};
|
|
79
|
+
required: never[];
|
|
80
|
+
};
|
|
81
|
+
constructor(agentId: string, bus: IMessageBus);
|
|
82
|
+
process(): Promise<unknown>;
|
|
83
|
+
userMessage(): string;
|
|
84
|
+
}
|
|
85
|
+
export declare class CreateTaskTool extends Tool {
|
|
86
|
+
private agentId;
|
|
87
|
+
private board;
|
|
88
|
+
readonly name = "create_task";
|
|
89
|
+
readonly description = "Create a new task on the shared board for any teammate to claim. Use to delegate or decompose work.";
|
|
90
|
+
readonly inputSchema: {
|
|
91
|
+
type: "object";
|
|
92
|
+
properties: {
|
|
93
|
+
title: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
description: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
required_skills: {
|
|
102
|
+
type: string;
|
|
103
|
+
items: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
108
|
+
priority: {
|
|
109
|
+
type: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
depends_on: {
|
|
113
|
+
type: string;
|
|
114
|
+
items: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
required: string[];
|
|
121
|
+
};
|
|
122
|
+
constructor(agentId: string, board: ITaskBoard);
|
|
123
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
124
|
+
userMessage(params: Record<string, unknown>): string;
|
|
125
|
+
}
|
|
126
|
+
export declare class ListTasksTool extends Tool {
|
|
127
|
+
private agent;
|
|
128
|
+
private board;
|
|
129
|
+
readonly name = "list_tasks";
|
|
130
|
+
readonly description = "View the shared task board. Shows all tasks and their status. Optionally filter to only tasks you can claim.";
|
|
131
|
+
readonly inputSchema: {
|
|
132
|
+
type: "object";
|
|
133
|
+
properties: {
|
|
134
|
+
available_only: {
|
|
135
|
+
type: string;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
required: never[];
|
|
140
|
+
};
|
|
141
|
+
constructor(agent: AgentIdentity, board: ITaskBoard);
|
|
142
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
143
|
+
userMessage(): string;
|
|
144
|
+
}
|
|
145
|
+
export declare class ClaimTaskTool extends Tool {
|
|
146
|
+
private agentId;
|
|
147
|
+
private board;
|
|
148
|
+
readonly name = "claim_task";
|
|
149
|
+
readonly description = "Claim an open task from the board to work on. Only succeeds if the task is available.";
|
|
150
|
+
readonly inputSchema: {
|
|
151
|
+
type: "object";
|
|
152
|
+
properties: {
|
|
153
|
+
task_id: {
|
|
154
|
+
type: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
required: string[];
|
|
159
|
+
};
|
|
160
|
+
constructor(agentId: string, board: ITaskBoard);
|
|
161
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
162
|
+
userMessage(params: Record<string, unknown>): string;
|
|
163
|
+
}
|
|
164
|
+
export declare class CompleteTaskTool extends Tool {
|
|
165
|
+
private board;
|
|
166
|
+
readonly name = "complete_task";
|
|
167
|
+
readonly description = "Mark a task as done with a result. Use when you've finished the work on a claimed task.";
|
|
168
|
+
readonly inputSchema: {
|
|
169
|
+
type: "object";
|
|
170
|
+
properties: {
|
|
171
|
+
task_id: {
|
|
172
|
+
type: string;
|
|
173
|
+
description: string;
|
|
174
|
+
};
|
|
175
|
+
result: {
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
required: string[];
|
|
180
|
+
};
|
|
181
|
+
constructor(board: ITaskBoard);
|
|
182
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
183
|
+
userMessage(params: Record<string, unknown>): string;
|
|
184
|
+
}
|
|
185
|
+
export declare class FailTaskTool extends Tool {
|
|
186
|
+
private board;
|
|
187
|
+
readonly name = "fail_task";
|
|
188
|
+
readonly description = "Mark a task as failed with a reason. Use when you cannot complete the work.";
|
|
189
|
+
readonly inputSchema: {
|
|
190
|
+
type: "object";
|
|
191
|
+
properties: {
|
|
192
|
+
task_id: {
|
|
193
|
+
type: string;
|
|
194
|
+
description: string;
|
|
195
|
+
};
|
|
196
|
+
reason: {
|
|
197
|
+
type: string;
|
|
198
|
+
description: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
required: string[];
|
|
202
|
+
};
|
|
203
|
+
constructor(board: ITaskBoard);
|
|
204
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
205
|
+
userMessage(params: Record<string, unknown>): string;
|
|
206
|
+
}
|
|
207
|
+
export declare class DecomposeTaskTool extends Tool {
|
|
208
|
+
private agentId;
|
|
209
|
+
private board;
|
|
210
|
+
readonly name = "decompose_task";
|
|
211
|
+
readonly description = "Break a task into smaller subtasks. The parent task is blocked until all subtasks complete.";
|
|
212
|
+
readonly inputSchema: {
|
|
213
|
+
type: "object";
|
|
214
|
+
properties: {
|
|
215
|
+
task_id: {
|
|
216
|
+
type: string;
|
|
217
|
+
description: string;
|
|
218
|
+
};
|
|
219
|
+
subtasks: {
|
|
220
|
+
type: string;
|
|
221
|
+
items: {
|
|
222
|
+
type: string;
|
|
223
|
+
properties: {
|
|
224
|
+
title: {
|
|
225
|
+
type: string;
|
|
226
|
+
};
|
|
227
|
+
description: {
|
|
228
|
+
type: string;
|
|
229
|
+
};
|
|
230
|
+
required_skills: {
|
|
231
|
+
type: string;
|
|
232
|
+
items: {
|
|
233
|
+
type: string;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
priority: {
|
|
237
|
+
type: string;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
required: string[];
|
|
241
|
+
};
|
|
242
|
+
description: string;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
required: string[];
|
|
246
|
+
};
|
|
247
|
+
constructor(agentId: string, board: ITaskBoard);
|
|
248
|
+
process(_context: ProcessingContext, params: Record<string, unknown>): Promise<unknown>;
|
|
249
|
+
userMessage(params: Record<string, unknown>): string;
|
|
250
|
+
}
|
|
251
|
+
export declare function createTeamTools(agent: AgentIdentity, roster: AgentIdentity[], bus: IMessageBus, board: ITaskBoard): Tool[];
|
|
252
|
+
//# sourceMappingURL=team-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-tools.d.ts","sourceRoot":"","sources":["../../src/team/team-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIzE,qBAAa,eAAgB,SAAQ,IAAI;IAiCrC,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,MAAM;IAlChB,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,0GACqF;IACzG,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BlB;gBAGQ,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,WAAW,EAChB,MAAM,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pB,MAAM,EAAE,aAAa,EAAE,EACvB,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,UAAU,GAChB,IAAI,EAAE,CAYR"}
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team Tools — Tools exposed to agents for inter-agent communication
|
|
3
|
+
* and shared task board interaction.
|
|
4
|
+
*
|
|
5
|
+
* These tools are automatically added to every agent in a team,
|
|
6
|
+
* giving them the ability to message teammates and manage tasks.
|
|
7
|
+
*/
|
|
8
|
+
import { Tool } from "../tools/base-tool.js";
|
|
9
|
+
// ─── Messaging Tools ───
|
|
10
|
+
export class SendMessageTool extends Tool {
|
|
11
|
+
agentId;
|
|
12
|
+
bus;
|
|
13
|
+
roster;
|
|
14
|
+
name = "send_message";
|
|
15
|
+
description = "Send a message to a specific teammate. Use this to request help, share findings, or coordinate work.";
|
|
16
|
+
inputSchema = {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
to: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Agent ID of the recipient"
|
|
22
|
+
},
|
|
23
|
+
subject: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Short topic of the message"
|
|
26
|
+
},
|
|
27
|
+
body: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "Message content"
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
type: "string",
|
|
33
|
+
enum: ["request", "response", "info", "handoff"],
|
|
34
|
+
description: "Message type (default: info)"
|
|
35
|
+
},
|
|
36
|
+
reply_to: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "Message ID this is replying to (optional)"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
required: ["to", "subject", "body"]
|
|
42
|
+
};
|
|
43
|
+
constructor(agentId, bus, roster) {
|
|
44
|
+
super();
|
|
45
|
+
this.agentId = agentId;
|
|
46
|
+
this.bus = bus;
|
|
47
|
+
this.roster = roster;
|
|
48
|
+
}
|
|
49
|
+
async process(_context, params) {
|
|
50
|
+
const to = String(params.to);
|
|
51
|
+
if (to !== "all" && !this.roster.find((a) => a.id === to)) {
|
|
52
|
+
return {
|
|
53
|
+
error: `Unknown agent: ${to}. Available: ${this.roster.map((a) => a.id).join(", ")}`
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const msg = this.bus.send({
|
|
57
|
+
from: this.agentId,
|
|
58
|
+
to,
|
|
59
|
+
type: params.type ?? "info",
|
|
60
|
+
subject: String(params.subject),
|
|
61
|
+
body: String(params.body),
|
|
62
|
+
replyTo: params.reply_to ? String(params.reply_to) : undefined
|
|
63
|
+
});
|
|
64
|
+
return { status: "sent", messageId: msg.id };
|
|
65
|
+
}
|
|
66
|
+
userMessage(params) {
|
|
67
|
+
return `Sending message to ${params.to}: ${params.subject}`;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export class BroadcastTool extends Tool {
|
|
71
|
+
agentId;
|
|
72
|
+
bus;
|
|
73
|
+
name = "broadcast";
|
|
74
|
+
description = "Send a message to all teammates at once. Use for announcements or sharing results with the whole team.";
|
|
75
|
+
inputSchema = {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
subject: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "Short topic of the broadcast"
|
|
81
|
+
},
|
|
82
|
+
body: {
|
|
83
|
+
type: "string",
|
|
84
|
+
description: "Message content"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
required: ["subject", "body"]
|
|
88
|
+
};
|
|
89
|
+
constructor(agentId, bus) {
|
|
90
|
+
super();
|
|
91
|
+
this.agentId = agentId;
|
|
92
|
+
this.bus = bus;
|
|
93
|
+
}
|
|
94
|
+
async process(_context, params) {
|
|
95
|
+
const msg = this.bus.send({
|
|
96
|
+
from: this.agentId,
|
|
97
|
+
to: "all",
|
|
98
|
+
type: "info",
|
|
99
|
+
subject: String(params.subject),
|
|
100
|
+
body: String(params.body)
|
|
101
|
+
});
|
|
102
|
+
return { status: "broadcast_sent", messageId: msg.id };
|
|
103
|
+
}
|
|
104
|
+
userMessage(params) {
|
|
105
|
+
return `Broadcasting to team: ${params.subject}`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
export class CheckMessagesTool extends Tool {
|
|
109
|
+
agentId;
|
|
110
|
+
bus;
|
|
111
|
+
name = "check_messages";
|
|
112
|
+
description = "Check your inbox for messages from teammates. Returns and clears pending messages.";
|
|
113
|
+
inputSchema = {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {},
|
|
116
|
+
required: []
|
|
117
|
+
};
|
|
118
|
+
constructor(agentId, bus) {
|
|
119
|
+
super();
|
|
120
|
+
this.agentId = agentId;
|
|
121
|
+
this.bus = bus;
|
|
122
|
+
}
|
|
123
|
+
async process() {
|
|
124
|
+
const messages = this.bus.receive(this.agentId);
|
|
125
|
+
if (messages.length === 0) {
|
|
126
|
+
return { messages: [], note: "No new messages" };
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
messages: messages.map((m) => ({
|
|
130
|
+
id: m.id,
|
|
131
|
+
from: m.from,
|
|
132
|
+
type: m.type,
|
|
133
|
+
subject: m.subject,
|
|
134
|
+
body: m.body,
|
|
135
|
+
taskId: m.taskId,
|
|
136
|
+
timestamp: m.timestamp
|
|
137
|
+
}))
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
userMessage() {
|
|
141
|
+
return "Checking messages";
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// ─── Task Board Tools ───
|
|
145
|
+
export class CreateTaskTool extends Tool {
|
|
146
|
+
agentId;
|
|
147
|
+
board;
|
|
148
|
+
name = "create_task";
|
|
149
|
+
description = "Create a new task on the shared board for any teammate to claim. Use to delegate or decompose work.";
|
|
150
|
+
inputSchema = {
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {
|
|
153
|
+
title: { type: "string", description: "Short task title" },
|
|
154
|
+
description: {
|
|
155
|
+
type: "string",
|
|
156
|
+
description: "Detailed description of what needs to be done"
|
|
157
|
+
},
|
|
158
|
+
required_skills: {
|
|
159
|
+
type: "array",
|
|
160
|
+
items: { type: "string" },
|
|
161
|
+
description: "Skill tags needed (matches agent skills)"
|
|
162
|
+
},
|
|
163
|
+
priority: {
|
|
164
|
+
type: "number",
|
|
165
|
+
description: "Priority 0-9 (0=highest, default=5)"
|
|
166
|
+
},
|
|
167
|
+
depends_on: {
|
|
168
|
+
type: "array",
|
|
169
|
+
items: { type: "string" },
|
|
170
|
+
description: "Task IDs that must complete first"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
required: ["title", "description"]
|
|
174
|
+
};
|
|
175
|
+
constructor(agentId, board) {
|
|
176
|
+
super();
|
|
177
|
+
this.agentId = agentId;
|
|
178
|
+
this.board = board;
|
|
179
|
+
}
|
|
180
|
+
async process(_context, params) {
|
|
181
|
+
try {
|
|
182
|
+
const task = this.board.create({
|
|
183
|
+
title: String(params.title),
|
|
184
|
+
description: String(params.description),
|
|
185
|
+
createdBy: this.agentId,
|
|
186
|
+
requiredSkills: params.required_skills ?? [],
|
|
187
|
+
priority: typeof params.priority === "number" ? params.priority : 5,
|
|
188
|
+
dependsOn: params.depends_on ?? []
|
|
189
|
+
});
|
|
190
|
+
return { status: "created", taskId: task.id, title: task.title };
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
return { error: String(e) };
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
userMessage(params) {
|
|
197
|
+
return `Creating task: ${params.title}`;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
export class ListTasksTool extends Tool {
|
|
201
|
+
agent;
|
|
202
|
+
board;
|
|
203
|
+
name = "list_tasks";
|
|
204
|
+
description = "View the shared task board. Shows all tasks and their status. Optionally filter to only tasks you can claim.";
|
|
205
|
+
inputSchema = {
|
|
206
|
+
type: "object",
|
|
207
|
+
properties: {
|
|
208
|
+
available_only: {
|
|
209
|
+
type: "boolean",
|
|
210
|
+
description: "If true, only show tasks you can claim (open, dependencies met, skills match)"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
required: []
|
|
214
|
+
};
|
|
215
|
+
constructor(agent, board) {
|
|
216
|
+
super();
|
|
217
|
+
this.agent = agent;
|
|
218
|
+
this.board = board;
|
|
219
|
+
}
|
|
220
|
+
async process(_context, params) {
|
|
221
|
+
const tasks = params.available_only
|
|
222
|
+
? this.board.getAvailable(this.agent)
|
|
223
|
+
: this.board.getSnapshot();
|
|
224
|
+
return {
|
|
225
|
+
tasks: tasks.map((t) => ({
|
|
226
|
+
id: t.id,
|
|
227
|
+
title: t.title,
|
|
228
|
+
description: t.description,
|
|
229
|
+
status: t.status,
|
|
230
|
+
claimedBy: t.claimedBy,
|
|
231
|
+
priority: t.priority,
|
|
232
|
+
requiredSkills: t.requiredSkills,
|
|
233
|
+
dependsOn: t.dependsOn,
|
|
234
|
+
parentTaskId: t.parentTaskId
|
|
235
|
+
}))
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
userMessage() {
|
|
239
|
+
return "Listing tasks on the board";
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
export class ClaimTaskTool extends Tool {
|
|
243
|
+
agentId;
|
|
244
|
+
board;
|
|
245
|
+
name = "claim_task";
|
|
246
|
+
description = "Claim an open task from the board to work on. Only succeeds if the task is available.";
|
|
247
|
+
inputSchema = {
|
|
248
|
+
type: "object",
|
|
249
|
+
properties: {
|
|
250
|
+
task_id: { type: "string", description: "ID of the task to claim" }
|
|
251
|
+
},
|
|
252
|
+
required: ["task_id"]
|
|
253
|
+
};
|
|
254
|
+
constructor(agentId, board) {
|
|
255
|
+
super();
|
|
256
|
+
this.agentId = agentId;
|
|
257
|
+
this.board = board;
|
|
258
|
+
}
|
|
259
|
+
async process(_context, params) {
|
|
260
|
+
const taskId = String(params.task_id);
|
|
261
|
+
const success = this.board.claim(taskId, this.agentId);
|
|
262
|
+
if (success) {
|
|
263
|
+
this.board.startWork(taskId, this.agentId);
|
|
264
|
+
const task = this.board.get(taskId);
|
|
265
|
+
return {
|
|
266
|
+
status: "claimed_and_working",
|
|
267
|
+
task: task
|
|
268
|
+
? { id: task.id, title: task.title, description: task.description }
|
|
269
|
+
: undefined
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
error: "Could not claim task. It may already be claimed, not open, or dependencies are not met."
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
userMessage(params) {
|
|
277
|
+
return `Claiming task ${params.task_id}`;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
export class CompleteTaskTool extends Tool {
|
|
281
|
+
board;
|
|
282
|
+
name = "complete_task";
|
|
283
|
+
description = "Mark a task as done with a result. Use when you've finished the work on a claimed task.";
|
|
284
|
+
inputSchema = {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: {
|
|
287
|
+
task_id: { type: "string", description: "ID of the task to complete" },
|
|
288
|
+
result: {
|
|
289
|
+
description: "The output/result of the completed task"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
required: ["task_id", "result"]
|
|
293
|
+
};
|
|
294
|
+
constructor(board) {
|
|
295
|
+
super();
|
|
296
|
+
this.board = board;
|
|
297
|
+
}
|
|
298
|
+
async process(_context, params) {
|
|
299
|
+
const success = this.board.complete(String(params.task_id), {
|
|
300
|
+
result: params.result
|
|
301
|
+
});
|
|
302
|
+
if (success) {
|
|
303
|
+
this.board.resolveParents();
|
|
304
|
+
return { status: "completed" };
|
|
305
|
+
}
|
|
306
|
+
return { error: "Could not complete task. Is it claimed/working by you?" };
|
|
307
|
+
}
|
|
308
|
+
userMessage(params) {
|
|
309
|
+
return `Completing task ${params.task_id}`;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
export class FailTaskTool extends Tool {
|
|
313
|
+
board;
|
|
314
|
+
name = "fail_task";
|
|
315
|
+
description = "Mark a task as failed with a reason. Use when you cannot complete the work.";
|
|
316
|
+
inputSchema = {
|
|
317
|
+
type: "object",
|
|
318
|
+
properties: {
|
|
319
|
+
task_id: {
|
|
320
|
+
type: "string",
|
|
321
|
+
description: "ID of the task to mark as failed"
|
|
322
|
+
},
|
|
323
|
+
reason: { type: "string", description: "Why the task failed" }
|
|
324
|
+
},
|
|
325
|
+
required: ["task_id", "reason"]
|
|
326
|
+
};
|
|
327
|
+
constructor(board) {
|
|
328
|
+
super();
|
|
329
|
+
this.board = board;
|
|
330
|
+
}
|
|
331
|
+
async process(_context, params) {
|
|
332
|
+
const success = this.board.fail(String(params.task_id), String(params.reason));
|
|
333
|
+
return success
|
|
334
|
+
? { status: "marked_failed" }
|
|
335
|
+
: { error: "Could not mark task as failed" };
|
|
336
|
+
}
|
|
337
|
+
userMessage(params) {
|
|
338
|
+
return `Marking task ${params.task_id} as failed`;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
export class DecomposeTaskTool extends Tool {
|
|
342
|
+
agentId;
|
|
343
|
+
board;
|
|
344
|
+
name = "decompose_task";
|
|
345
|
+
description = "Break a task into smaller subtasks. The parent task is blocked until all subtasks complete.";
|
|
346
|
+
inputSchema = {
|
|
347
|
+
type: "object",
|
|
348
|
+
properties: {
|
|
349
|
+
task_id: { type: "string", description: "Parent task ID to decompose" },
|
|
350
|
+
subtasks: {
|
|
351
|
+
type: "array",
|
|
352
|
+
items: {
|
|
353
|
+
type: "object",
|
|
354
|
+
properties: {
|
|
355
|
+
title: { type: "string" },
|
|
356
|
+
description: { type: "string" },
|
|
357
|
+
required_skills: {
|
|
358
|
+
type: "array",
|
|
359
|
+
items: { type: "string" }
|
|
360
|
+
},
|
|
361
|
+
priority: { type: "number" }
|
|
362
|
+
},
|
|
363
|
+
required: ["title", "description"]
|
|
364
|
+
},
|
|
365
|
+
description: "List of subtasks to create"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
required: ["task_id", "subtasks"]
|
|
369
|
+
};
|
|
370
|
+
constructor(agentId, board) {
|
|
371
|
+
super();
|
|
372
|
+
this.agentId = agentId;
|
|
373
|
+
this.board = board;
|
|
374
|
+
}
|
|
375
|
+
async process(_context, params) {
|
|
376
|
+
try {
|
|
377
|
+
const subtaskDefs = params.subtasks.map((s) => ({
|
|
378
|
+
title: String(s.title),
|
|
379
|
+
description: String(s.description),
|
|
380
|
+
createdBy: this.agentId,
|
|
381
|
+
requiredSkills: s.required_skills ?? [],
|
|
382
|
+
priority: typeof s.priority === "number" ? s.priority : 5
|
|
383
|
+
}));
|
|
384
|
+
const created = this.board.decompose(String(params.task_id), subtaskDefs);
|
|
385
|
+
return {
|
|
386
|
+
status: "decomposed",
|
|
387
|
+
subtasks: created.map((t) => ({ id: t.id, title: t.title }))
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
catch (e) {
|
|
391
|
+
return { error: String(e) };
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
userMessage(params) {
|
|
395
|
+
return `Decomposing task ${params.task_id}`;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
// ─── Helper: create all team tools for an agent ───
|
|
399
|
+
export function createTeamTools(agent, roster, bus, board) {
|
|
400
|
+
return [
|
|
401
|
+
new SendMessageTool(agent.id, bus, roster),
|
|
402
|
+
new BroadcastTool(agent.id, bus),
|
|
403
|
+
new CheckMessagesTool(agent.id, bus),
|
|
404
|
+
new CreateTaskTool(agent.id, board),
|
|
405
|
+
new ListTasksTool(agent, board),
|
|
406
|
+
new ClaimTaskTool(agent.id, board),
|
|
407
|
+
new CompleteTaskTool(board),
|
|
408
|
+
new FailTaskTool(board),
|
|
409
|
+
new DecomposeTaskTool(agent.id, board)
|
|
410
|
+
];
|
|
411
|
+
}
|
|
412
|
+
//# sourceMappingURL=team-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-tools.js","sourceRoot":"","sources":["../../src/team/team-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC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