askui 0.24.0 → 0.25.0
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/cjs/core/models/anthropic/askui-agent.d.ts +13 -0
- package/dist/cjs/core/models/anthropic/askui-agent.js +195 -0
- package/dist/cjs/core/models/anthropic/claude-agent.d.ts +40 -0
- package/dist/cjs/core/models/anthropic/claude-agent.js +200 -0
- package/dist/cjs/core/models/anthropic/index.d.ts +4 -0
- package/dist/cjs/core/models/anthropic/index.js +9 -0
- package/dist/cjs/core/models/anthropic/tools/agent-errors.d.ts +2 -0
- package/dist/cjs/core/models/anthropic/tools/agent-errors.js +6 -0
- package/dist/cjs/core/models/anthropic/tools/base.d.ts +24 -0
- package/dist/cjs/core/models/anthropic/tools/base.js +66 -0
- package/dist/cjs/core/models/anthropic/tools/os-agent-tools.d.ts +113 -0
- package/dist/cjs/core/models/anthropic/tools/os-agent-tools.js +476 -0
- package/dist/cjs/core/ui-control-commands/index.d.ts +2 -0
- package/dist/cjs/core/ui-control-commands/index.js +5 -1
- package/dist/cjs/execution/dsl.d.ts +7 -4
- package/dist/cjs/execution/dsl.js +4 -1
- package/dist/cjs/execution/execution-runtime.d.ts +11 -1
- package/dist/cjs/execution/execution-runtime.js +5 -0
- package/dist/cjs/execution/inference-client.d.ts +9 -0
- package/dist/cjs/execution/inference-client.js +13 -5
- package/dist/cjs/execution/ui-control-client-dependency-builder.js +1 -1
- package/dist/cjs/execution/ui-control-client.d.ts +50 -0
- package/dist/cjs/execution/ui-control-client.js +61 -3
- package/dist/cjs/lib/interactive_cli/create-example-project.d.ts +1 -0
- package/dist/cjs/lib/interactive_cli/create-example-project.js +20 -3
- package/dist/cjs/main.d.ts +1 -0
- package/dist/cjs/main.js +5 -1
- package/dist/cjs/utils/base_64_image/base-64-image.d.ts +2 -1
- package/dist/cjs/utils/base_64_image/base-64-image.js +17 -2
- package/dist/esm/core/models/anthropic/askui-agent.d.ts +13 -0
- package/dist/esm/core/models/anthropic/askui-agent.js +191 -0
- package/dist/esm/core/models/anthropic/claude-agent.d.ts +40 -0
- package/dist/esm/core/models/anthropic/claude-agent.js +196 -0
- package/dist/esm/core/models/anthropic/index.d.ts +4 -0
- package/dist/esm/core/models/anthropic/index.js +2 -0
- package/dist/esm/core/models/anthropic/tools/agent-errors.d.ts +2 -0
- package/dist/esm/core/models/anthropic/tools/agent-errors.js +2 -0
- package/dist/esm/core/models/anthropic/tools/base.d.ts +24 -0
- package/dist/esm/core/models/anthropic/tools/base.js +59 -0
- package/dist/esm/core/models/anthropic/tools/os-agent-tools.d.ts +113 -0
- package/dist/esm/core/models/anthropic/tools/os-agent-tools.js +461 -0
- package/dist/esm/core/ui-control-commands/index.d.ts +2 -0
- package/dist/esm/core/ui-control-commands/index.js +2 -0
- package/dist/esm/execution/dsl.d.ts +7 -4
- package/dist/esm/execution/dsl.js +3 -0
- package/dist/esm/execution/execution-runtime.d.ts +11 -1
- package/dist/esm/execution/execution-runtime.js +5 -0
- package/dist/esm/execution/inference-client.d.ts +9 -0
- package/dist/esm/execution/inference-client.js +13 -5
- package/dist/esm/execution/ui-control-client-dependency-builder.js +1 -1
- package/dist/esm/execution/ui-control-client.d.ts +50 -0
- package/dist/esm/execution/ui-control-client.js +61 -3
- package/dist/esm/lib/interactive_cli/create-example-project.d.ts +1 -0
- package/dist/esm/lib/interactive_cli/create-example-project.js +20 -3
- package/dist/esm/main.d.ts +1 -0
- package/dist/esm/main.js +1 -0
- package/dist/esm/utils/base_64_image/base-64-image.d.ts +2 -1
- package/dist/esm/utils/base_64_image/base-64-image.js +17 -2
- package/dist/example_projects_templates/configs/vscode-settings.json +41 -0
- package/package.json +2 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { ToolCollection } from './tools/base';
|
|
11
|
+
import { logger } from '../../../lib/logger';
|
|
12
|
+
export class ClaudeAgent {
|
|
13
|
+
constructor(predictActResponseFunction) {
|
|
14
|
+
this.predictActResponseFunction = predictActResponseFunction;
|
|
15
|
+
this.maxTokens = 4096;
|
|
16
|
+
this.onlyNMostRecentImages = 3;
|
|
17
|
+
this.imageTruncationThreshold = 10;
|
|
18
|
+
this.systemPrompt = '';
|
|
19
|
+
this.model = 'claude-3-5-sonnet-20241022';
|
|
20
|
+
this.betas = ['computer-use-2024-10-22'];
|
|
21
|
+
this._toolCollection = undefined;
|
|
22
|
+
this.tools = [];
|
|
23
|
+
this.history = {};
|
|
24
|
+
}
|
|
25
|
+
setTools(tools) {
|
|
26
|
+
this._toolCollection = undefined;
|
|
27
|
+
this.tools = tools;
|
|
28
|
+
}
|
|
29
|
+
addTool(tool) {
|
|
30
|
+
this._toolCollection = undefined;
|
|
31
|
+
this.tools.push(tool);
|
|
32
|
+
}
|
|
33
|
+
listToolNames() {
|
|
34
|
+
return this.tools.map((tool) => tool.ToolName);
|
|
35
|
+
}
|
|
36
|
+
removeToolByName(toolName) {
|
|
37
|
+
this.tools = this.tools.filter((tool) => tool.ToolName !== toolName);
|
|
38
|
+
}
|
|
39
|
+
setSystemPrompt(systemPrompt) {
|
|
40
|
+
this.systemPrompt = systemPrompt;
|
|
41
|
+
}
|
|
42
|
+
IsConfigured() {
|
|
43
|
+
return this.tools.length > 0 && this.systemPrompt !== '';
|
|
44
|
+
}
|
|
45
|
+
get toolCollection() {
|
|
46
|
+
if (!this._toolCollection) {
|
|
47
|
+
this._toolCollection = new ToolCollection(this.tools);
|
|
48
|
+
}
|
|
49
|
+
return this._toolCollection;
|
|
50
|
+
}
|
|
51
|
+
setHistory(key, messages) {
|
|
52
|
+
this.history[key] = messages;
|
|
53
|
+
}
|
|
54
|
+
getHistory(key) {
|
|
55
|
+
return this.history[key] || [];
|
|
56
|
+
}
|
|
57
|
+
act(goal, options) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
if (!goal.trim()) {
|
|
60
|
+
throw new Error('Goal cannot be empty');
|
|
61
|
+
}
|
|
62
|
+
if (!this.IsConfigured()) {
|
|
63
|
+
throw new Error('Claude agent is not configured. Please configure the agent first.');
|
|
64
|
+
}
|
|
65
|
+
const messages = [];
|
|
66
|
+
if (options === null || options === void 0 ? void 0 : options.agentHistory) {
|
|
67
|
+
messages.push(...options.agentHistory);
|
|
68
|
+
}
|
|
69
|
+
if (options === null || options === void 0 ? void 0 : options.chatId) {
|
|
70
|
+
messages.push(...this.getHistory(options.chatId));
|
|
71
|
+
}
|
|
72
|
+
// Add the new goal as a user message
|
|
73
|
+
messages.push({
|
|
74
|
+
content: goal,
|
|
75
|
+
role: 'user',
|
|
76
|
+
});
|
|
77
|
+
if (this.onlyNMostRecentImages) {
|
|
78
|
+
ClaudeAgent.filterNMostRecentImages(messages, this.onlyNMostRecentImages, this.imageTruncationThreshold);
|
|
79
|
+
}
|
|
80
|
+
while (true) {
|
|
81
|
+
const response = yield this.predictActResponseFunction({
|
|
82
|
+
max_tokens: this.maxTokens,
|
|
83
|
+
messages,
|
|
84
|
+
model: this.model,
|
|
85
|
+
system: this.systemPrompt,
|
|
86
|
+
tools: (new ToolCollection(this.tools).toParams()),
|
|
87
|
+
betas: this.betas,
|
|
88
|
+
});
|
|
89
|
+
messages.push({
|
|
90
|
+
content: response.content,
|
|
91
|
+
role: 'assistant',
|
|
92
|
+
});
|
|
93
|
+
const toolResultContent = [];
|
|
94
|
+
for (const block of response.content) {
|
|
95
|
+
if (block.type === 'tool_use') {
|
|
96
|
+
logger.debug(`Agent will execute tool '${block.name}' with input '${JSON.stringify(block.input)}'`);
|
|
97
|
+
const toolUseBlock = block;
|
|
98
|
+
const result = yield this.toolCollection.run(toolUseBlock.name, toolUseBlock.input);
|
|
99
|
+
const toolResult = this.makeApiToolResult(result, toolUseBlock.id);
|
|
100
|
+
toolResultContent.push(toolResult);
|
|
101
|
+
}
|
|
102
|
+
if (block.type === 'thinking') {
|
|
103
|
+
logger.debug(`Agent is thinking: ${block.thinking}`);
|
|
104
|
+
}
|
|
105
|
+
if (block.type === 'text') {
|
|
106
|
+
logger.info(`Agent: ${block.text}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (toolResultContent.length === 0) {
|
|
110
|
+
if (options === null || options === void 0 ? void 0 : options.chatId) {
|
|
111
|
+
this.setHistory(options.chatId, messages);
|
|
112
|
+
}
|
|
113
|
+
return messages;
|
|
114
|
+
}
|
|
115
|
+
messages.push({
|
|
116
|
+
role: 'user',
|
|
117
|
+
content: toolResultContent,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
makeApiToolResult(result, toolUseId) {
|
|
123
|
+
const content = [];
|
|
124
|
+
let isError = false;
|
|
125
|
+
if (result.error) {
|
|
126
|
+
isError = true;
|
|
127
|
+
content.push({
|
|
128
|
+
type: 'text',
|
|
129
|
+
text: this.maybePrependSystemToolResult(result, result.error),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
if (result.output) {
|
|
134
|
+
content.push({
|
|
135
|
+
type: 'text',
|
|
136
|
+
text: this.maybePrependSystemToolResult(result, result.output),
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (result.base64Images) {
|
|
140
|
+
for (const base64Image of result.base64Images) {
|
|
141
|
+
content.push({
|
|
142
|
+
type: 'image',
|
|
143
|
+
source: {
|
|
144
|
+
type: 'base64',
|
|
145
|
+
media_type: 'image/png',
|
|
146
|
+
data: base64Image,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
type: 'tool_result',
|
|
154
|
+
tool_use_id: toolUseId,
|
|
155
|
+
content,
|
|
156
|
+
is_error: isError,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
maybePrependSystemToolResult(result, text) {
|
|
160
|
+
if (result.system) {
|
|
161
|
+
return `<system>${result.system}</system>\n${text}`;
|
|
162
|
+
}
|
|
163
|
+
return text;
|
|
164
|
+
}
|
|
165
|
+
static filterNMostRecentImages(messages, imagesToKeep, minRemovalThreshold = 10) {
|
|
166
|
+
const toolResultBlocks = messages
|
|
167
|
+
.flatMap((message) => (Array.isArray(message.content) ? message.content : []))
|
|
168
|
+
.filter((item) => typeof item === 'object'
|
|
169
|
+
&& 'type' in item
|
|
170
|
+
&& item.type === 'tool_result');
|
|
171
|
+
const totalImages = toolResultBlocks.reduce((count, result) => {
|
|
172
|
+
const content = Array.isArray(result.content) ? result.content : [];
|
|
173
|
+
return count + content.filter((item) => typeof item === 'object'
|
|
174
|
+
&& 'type' in item
|
|
175
|
+
&& item.type === 'image').length;
|
|
176
|
+
}, 0);
|
|
177
|
+
let imagesToRemove = totalImages - imagesToKeep;
|
|
178
|
+
imagesToRemove -= imagesToRemove % minRemovalThreshold;
|
|
179
|
+
if (imagesToRemove <= 0)
|
|
180
|
+
return;
|
|
181
|
+
for (const result of toolResultBlocks) {
|
|
182
|
+
if (Array.isArray(result.content)) {
|
|
183
|
+
const newContent = result.content.filter((item) => {
|
|
184
|
+
if ('type' in item && item.type === 'image') {
|
|
185
|
+
if (imagesToRemove > 0) {
|
|
186
|
+
imagesToRemove -= 1;
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return true;
|
|
191
|
+
});
|
|
192
|
+
result.content = newContent;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ToolResult {
|
|
2
|
+
output?: string;
|
|
3
|
+
error?: string;
|
|
4
|
+
base64Images?: string[];
|
|
5
|
+
system?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ToolFailure implements ToolResult {
|
|
8
|
+
error: string;
|
|
9
|
+
constructor(error: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class ToolError extends Error {
|
|
12
|
+
constructor(message: string);
|
|
13
|
+
}
|
|
14
|
+
export declare abstract class BaseAgentTool {
|
|
15
|
+
abstract execute(params: Record<string, any>): Promise<ToolResult>;
|
|
16
|
+
abstract toParams(): any;
|
|
17
|
+
get ToolName(): string;
|
|
18
|
+
}
|
|
19
|
+
export declare class ToolCollection {
|
|
20
|
+
private toolMap;
|
|
21
|
+
constructor(tools: BaseAgentTool[]);
|
|
22
|
+
toParams(): any[];
|
|
23
|
+
run(name: string, toolInput: Record<string, any>): Promise<ToolResult>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
import { AgentError } from './agent-errors';
|
|
12
|
+
export class ToolFailure {
|
|
13
|
+
constructor(error) {
|
|
14
|
+
this.error = error;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class ToolError extends Error {
|
|
18
|
+
constructor(message) {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = 'ToolError';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export class BaseAgentTool {
|
|
24
|
+
get ToolName() {
|
|
25
|
+
return this.constructor.name;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export class ToolCollection {
|
|
29
|
+
constructor(tools) {
|
|
30
|
+
this.toolMap = new Map();
|
|
31
|
+
tools.forEach((tool) => {
|
|
32
|
+
const params = tool.toParams();
|
|
33
|
+
this.toolMap.set(params.name, tool);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
toParams() {
|
|
37
|
+
return Array.from(this.toolMap.values()).map((tool) => tool.toParams());
|
|
38
|
+
}
|
|
39
|
+
run(name, toolInput) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const tool = this.toolMap.get(name);
|
|
42
|
+
if (!tool) {
|
|
43
|
+
return new ToolFailure(`Tool ${name} is invalid`);
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
return yield tool.execute(toolInput);
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
if (err instanceof AgentError) {
|
|
50
|
+
throw err;
|
|
51
|
+
}
|
|
52
|
+
if (err instanceof ToolError) {
|
|
53
|
+
return new ToolFailure(err.message);
|
|
54
|
+
}
|
|
55
|
+
return new ToolFailure(`Unknown error: ${err}`);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { BetaTool } from '@anthropic-ai/sdk/resources/beta/messages/messages';
|
|
2
|
+
import { MODIFIER_KEY, PC_KEY, ANDROID_KEY, PC_AND_MODIFIER_KEY } from '../../../../execution/dsl';
|
|
3
|
+
import { BaseAgentTool, ToolResult } from './base';
|
|
4
|
+
import { ExecutionRuntime } from '../../../../execution/execution-runtime';
|
|
5
|
+
import { ControlCommand } from '../../../ui-control-commands';
|
|
6
|
+
export declare class OsAgentHandler {
|
|
7
|
+
private AgentOsClient;
|
|
8
|
+
private TargetResolution;
|
|
9
|
+
private screenDimensions;
|
|
10
|
+
constructor(AgentOsClient: ExecutionRuntime, screenDimensions: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
});
|
|
14
|
+
static createInstance(AgentOsClient: ExecutionRuntime): Promise<OsAgentHandler>;
|
|
15
|
+
getTargetResolution(): {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
setTargetResolution(width: number, height: number): void;
|
|
20
|
+
takeScreenshot(): Promise<string>;
|
|
21
|
+
private scaleCoordinates;
|
|
22
|
+
requestControl(controlCommand: ControlCommand): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export declare class ScreenShotTool extends BaseAgentTool {
|
|
25
|
+
private osAgentHandler;
|
|
26
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
27
|
+
execute(): Promise<ToolResult>;
|
|
28
|
+
toParams(): BetaTool;
|
|
29
|
+
}
|
|
30
|
+
export declare class MouseMoveTool extends BaseAgentTool {
|
|
31
|
+
private osAgentHandler;
|
|
32
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
33
|
+
execute(command: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
}): Promise<ToolResult>;
|
|
37
|
+
toParams(): BetaTool;
|
|
38
|
+
}
|
|
39
|
+
export declare class MouseClickTool extends BaseAgentTool {
|
|
40
|
+
private osAgentHandler;
|
|
41
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
42
|
+
execute(command: {
|
|
43
|
+
button: 'left' | 'right' | 'middle';
|
|
44
|
+
doubleClick: boolean;
|
|
45
|
+
}): Promise<ToolResult>;
|
|
46
|
+
toParams(): BetaTool;
|
|
47
|
+
}
|
|
48
|
+
export declare class MouseScrollTool extends BaseAgentTool {
|
|
49
|
+
private osAgentHandler;
|
|
50
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
51
|
+
execute(command: {
|
|
52
|
+
dx: number;
|
|
53
|
+
dy: number;
|
|
54
|
+
}): Promise<ToolResult>;
|
|
55
|
+
toParams(): BetaTool;
|
|
56
|
+
}
|
|
57
|
+
export declare class DesktopKeyPressSequenceTool extends BaseAgentTool {
|
|
58
|
+
private osAgentHandler;
|
|
59
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
60
|
+
execute(command: {
|
|
61
|
+
key: PC_KEY;
|
|
62
|
+
firstModifier?: MODIFIER_KEY;
|
|
63
|
+
secondModifier?: MODIFIER_KEY;
|
|
64
|
+
}): Promise<ToolResult>;
|
|
65
|
+
toParams(): BetaTool;
|
|
66
|
+
}
|
|
67
|
+
export declare class DesktopSingleKeyPressTool extends BaseAgentTool {
|
|
68
|
+
private osAgentHandler;
|
|
69
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
70
|
+
execute(command: {
|
|
71
|
+
key: PC_AND_MODIFIER_KEY;
|
|
72
|
+
}): Promise<ToolResult>;
|
|
73
|
+
toParams(): BetaTool;
|
|
74
|
+
}
|
|
75
|
+
export declare class TypeTool extends BaseAgentTool {
|
|
76
|
+
private osAgentHandler;
|
|
77
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
78
|
+
execute(command: {
|
|
79
|
+
text: string;
|
|
80
|
+
}): Promise<ToolResult>;
|
|
81
|
+
toParams(): BetaTool;
|
|
82
|
+
}
|
|
83
|
+
export declare class AndroidSingleKeyPressTool extends BaseAgentTool {
|
|
84
|
+
private osAgentHandler;
|
|
85
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
86
|
+
execute(command: {
|
|
87
|
+
key: ANDROID_KEY;
|
|
88
|
+
}): Promise<ToolResult>;
|
|
89
|
+
toParams(): BetaTool;
|
|
90
|
+
}
|
|
91
|
+
export declare class AndroidSequenceKeyPressTool extends BaseAgentTool {
|
|
92
|
+
private osAgentHandler;
|
|
93
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
94
|
+
execute(command: {
|
|
95
|
+
keys: ANDROID_KEY[];
|
|
96
|
+
}): Promise<ToolResult>;
|
|
97
|
+
toParams(): BetaTool;
|
|
98
|
+
}
|
|
99
|
+
export declare class AgentErrorTool extends BaseAgentTool {
|
|
100
|
+
constructor();
|
|
101
|
+
execute(command: {
|
|
102
|
+
error: string;
|
|
103
|
+
}): Promise<ToolResult>;
|
|
104
|
+
toParams(): BetaTool;
|
|
105
|
+
}
|
|
106
|
+
export declare class ExecuteShellCommandTool extends BaseAgentTool {
|
|
107
|
+
private osAgentHandler;
|
|
108
|
+
constructor(osAgentHandler: OsAgentHandler);
|
|
109
|
+
execute(command: {
|
|
110
|
+
command: string;
|
|
111
|
+
}): Promise<ToolResult>;
|
|
112
|
+
toParams(): BetaTool;
|
|
113
|
+
}
|