clawsql 0.2.1 → 0.2.2
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/README.md +25 -5
- package/dist/bin/clawsql.js +0 -0
- package/dist/cli/agent/handler.d.ts +13 -31
- package/dist/cli/agent/handler.d.ts.map +1 -1
- package/dist/cli/agent/handler.js +107 -149
- package/dist/cli/agent/handler.js.map +1 -1
- package/dist/cli/agent/index.d.ts +2 -1
- package/dist/cli/agent/index.d.ts.map +1 -1
- package/dist/cli/agent/index.js +7 -1
- package/dist/cli/agent/index.js.map +1 -1
- package/dist/cli/agent/openclaw-integration.d.ts +83 -25
- package/dist/cli/agent/openclaw-integration.d.ts.map +1 -1
- package/dist/cli/agent/openclaw-integration.js +305 -194
- package/dist/cli/agent/openclaw-integration.js.map +1 -1
- package/dist/cli/commands/cleanup.d.ts.map +1 -1
- package/dist/cli/commands/cleanup.js +26 -15
- package/dist/cli/commands/cleanup.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +0 -4
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +309 -469
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/openclaw.d.ts +9 -0
- package/dist/cli/commands/openclaw.d.ts.map +1 -0
- package/dist/cli/commands/openclaw.js +236 -0
- package/dist/cli/commands/openclaw.js.map +1 -0
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +260 -6
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/repl.js +1 -1
- package/dist/cli/repl.js.map +1 -1
- package/dist/cli/utils/ai-config.d.ts +32 -0
- package/dist/cli/utils/ai-config.d.ts.map +1 -0
- package/dist/cli/utils/ai-config.js +78 -0
- package/dist/cli/utils/ai-config.js.map +1 -0
- package/dist/cli/utils/docker-files.d.ts.map +1 -1
- package/dist/cli/utils/docker-files.js +2 -0
- package/dist/cli/utils/docker-files.js.map +1 -1
- package/docker/openclaw/entrypoint.sh +102 -0
- package/docker/openclaw/openclaw.json +4 -1
- package/docker/orchestrator/orchestrator-schema.sql +837 -0
- package/docker-compose.yml +22 -14
- package/init/metadata.sql +14 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,6 +42,13 @@ npm run build
|
|
|
42
42
|
Start with a pre-configured demo MySQL cluster:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
+
# Install ClawSQL
|
|
46
|
+
npm install -g clawsql
|
|
47
|
+
|
|
48
|
+
# Pull required Docker images (do this once)
|
|
49
|
+
clawsql install --demo
|
|
50
|
+
|
|
51
|
+
# Start the platform
|
|
45
52
|
clawsql
|
|
46
53
|
> /start --demo
|
|
47
54
|
```
|
|
@@ -71,6 +78,12 @@ After starting, register the instances using your host IP:
|
|
|
71
78
|
Start the platform and connect to your existing MySQL instances:
|
|
72
79
|
|
|
73
80
|
```bash
|
|
81
|
+
# Install ClawSQL
|
|
82
|
+
npm install -g clawsql
|
|
83
|
+
|
|
84
|
+
# Pull required Docker images
|
|
85
|
+
clawsql install
|
|
86
|
+
|
|
74
87
|
# Start the interactive CLI
|
|
75
88
|
clawsql
|
|
76
89
|
|
|
@@ -133,11 +146,18 @@ When started with `--demo`, MySQL containers use host networking to simulate rea
|
|
|
133
146
|
### Platform Lifecycle
|
|
134
147
|
|
|
135
148
|
```bash
|
|
136
|
-
/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
/
|
|
149
|
+
/install [--demo] # Pull Docker images (required before first start)
|
|
150
|
+
# --demo: Include MySQL demo cluster images
|
|
151
|
+
# --detail: Show verbose output
|
|
152
|
+
|
|
153
|
+
/start [--demo] # Start ClawSQL platform
|
|
154
|
+
# --demo: Start with demo MySQL cluster
|
|
155
|
+
# --pull: Force pull missing images
|
|
156
|
+
|
|
157
|
+
/stop # Stop all services
|
|
158
|
+
/status # Show platform status (images, containers, services)
|
|
159
|
+
/cleanup # Remove all containers and data
|
|
160
|
+
/doctor # Run diagnostics and suggest fixes
|
|
141
161
|
```
|
|
142
162
|
|
|
143
163
|
### Configuration
|
package/dist/bin/clawsql.js
CHANGED
|
File without changes
|
|
@@ -4,17 +4,11 @@
|
|
|
4
4
|
* Handles natural language input via OpenClaw or direct LLM calls.
|
|
5
5
|
*/
|
|
6
6
|
import { CLIContext } from '../registry.js';
|
|
7
|
-
/**
|
|
8
|
-
* Agent configuration
|
|
9
|
-
*/
|
|
10
7
|
export interface AgentConfig {
|
|
11
8
|
enabled: boolean;
|
|
12
9
|
provider: 'anthropic' | 'openai' | 'openclaw';
|
|
13
10
|
maxIterations: number;
|
|
14
11
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Streaming callback type
|
|
17
|
-
*/
|
|
18
12
|
export type StreamCallback = (chunk: string) => void;
|
|
19
13
|
/**
|
|
20
14
|
* AI Agent for ClawSQL CLI
|
|
@@ -22,52 +16,40 @@ export type StreamCallback = (chunk: string) => void;
|
|
|
22
16
|
export declare class AIAgent {
|
|
23
17
|
private provider;
|
|
24
18
|
private tools;
|
|
25
|
-
private
|
|
19
|
+
private history;
|
|
26
20
|
private config;
|
|
27
|
-
private
|
|
21
|
+
private openclawReady;
|
|
28
22
|
constructor(ctx: CLIContext, config?: Partial<AgentConfig>);
|
|
29
|
-
/**
|
|
30
|
-
* Create the LLM provider based on configuration
|
|
31
|
-
*/
|
|
32
|
-
private createProvider;
|
|
33
|
-
/**
|
|
34
|
-
* Check if the agent is properly configured
|
|
35
|
-
*/
|
|
36
23
|
isConfigured(): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Get the provider name
|
|
39
|
-
*/
|
|
40
24
|
getProviderName(): string;
|
|
41
25
|
/**
|
|
42
|
-
* Process
|
|
43
|
-
* @param input The user's natural language input
|
|
44
|
-
* @param onChunk Optional callback for streaming output chunks
|
|
45
|
-
* @param signal Optional AbortSignal to cancel the operation
|
|
26
|
+
* Process natural language input
|
|
46
27
|
*/
|
|
47
28
|
process(input: string, onChunk?: StreamCallback, signal?: AbortSignal): Promise<string>;
|
|
48
29
|
/**
|
|
49
|
-
*
|
|
30
|
+
* Try processing via OpenClaw gateway
|
|
50
31
|
*/
|
|
51
|
-
private
|
|
32
|
+
private tryOpenClaw;
|
|
52
33
|
/**
|
|
53
|
-
*
|
|
34
|
+
* Process via direct LLM provider
|
|
54
35
|
*/
|
|
55
|
-
private
|
|
36
|
+
private processWithLLM;
|
|
56
37
|
/**
|
|
57
|
-
* Send
|
|
38
|
+
* Send chat request to LLM
|
|
58
39
|
*/
|
|
59
|
-
private
|
|
40
|
+
private chat;
|
|
60
41
|
/**
|
|
61
42
|
* Execute tool calls
|
|
62
43
|
*/
|
|
63
44
|
private executeTools;
|
|
45
|
+
/**
|
|
46
|
+
* Create LLM provider instance
|
|
47
|
+
*/
|
|
48
|
+
private createProvider;
|
|
64
49
|
/**
|
|
65
50
|
* Clear conversation history
|
|
66
51
|
*/
|
|
67
52
|
reset(): void;
|
|
68
53
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Create an AI agent instance
|
|
71
|
-
*/
|
|
72
54
|
export declare function createAIAgent(ctx: CLIContext, config?: Partial<AgentConfig>): AIAgent;
|
|
73
55
|
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/cli/agent/handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/cli/agent/handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAW5C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAmDrD;;GAEG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,KAAK,CAAsC;IACnD,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,aAAa,CAAwB;gBAEjC,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IAU1D,YAAY,IAAI,OAAO;IAKvB,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAkB7F;;OAEG;YACW,WAAW;IA2BzB;;OAEG;YACW,cAAc;IAwC5B;;OAEG;YACW,IAAI;IAYlB;;OAEG;YACW,YAAY;IAyB1B;;OAEG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd;AAMD,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAErF"}
|
|
@@ -10,9 +10,15 @@ exports.createAIAgent = createAIAgent;
|
|
|
10
10
|
const anthropic_js_1 = require("./providers/anthropic.js");
|
|
11
11
|
const openai_js_1 = require("./providers/openai.js");
|
|
12
12
|
const index_js_1 = require("./tools/index.js");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const openclaw_integration_js_1 = require("./openclaw-integration.js");
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Constants
|
|
16
|
+
// ============================================================================
|
|
17
|
+
const DEFAULT_CONFIG = {
|
|
18
|
+
enabled: true,
|
|
19
|
+
provider: 'openclaw',
|
|
20
|
+
maxIterations: 5,
|
|
21
|
+
};
|
|
16
22
|
const SYSTEM_PROMPT = `You are an AI assistant for ClawSQL, a MySQL cluster management system.
|
|
17
23
|
|
|
18
24
|
You help users manage MySQL clusters through natural language commands. You have access to tools that let you:
|
|
@@ -30,121 +36,106 @@ Always be helpful and provide accurate information about the cluster state.
|
|
|
30
36
|
If you cannot perform an action (like unsafe SQL), explain why.
|
|
31
37
|
|
|
32
38
|
Available clusters and instances are managed by Orchestrator and ProxySQL.`;
|
|
39
|
+
const OPENCLAW_CONTEXT = `You are the ClawSQL assistant for MySQL cluster management.
|
|
40
|
+
|
|
41
|
+
CRITICAL: Use the 'clawsql' skill. Execute commands EXACTLY as shown:
|
|
42
|
+
- Topology: clawsql --command /topology
|
|
43
|
+
- Health: clawsql --command /health
|
|
44
|
+
- Clusters: clawsql --command /clusters
|
|
45
|
+
- SQL queries: clawsql --command "/sql YOUR_QUERY_HERE"
|
|
46
|
+
|
|
47
|
+
For user questions about databases/tables/users, execute SQL directly:
|
|
48
|
+
- SHOW DATABASES
|
|
49
|
+
- SHOW TABLES FROM database_name
|
|
50
|
+
- SELECT User, Host FROM mysql.user
|
|
51
|
+
|
|
52
|
+
NEVER say "I cannot" or make excuses. Execute the command. If it fails, show the actual error.`;
|
|
53
|
+
const NOT_CONFIGURED_MSG = 'AI features are not configured. Install OpenClaw (recommended) or set ANTHROPIC_API_KEY or OPENAI_API_KEY environment variable.';
|
|
54
|
+
// ============================================================================
|
|
55
|
+
// AIAgent Class
|
|
56
|
+
// ============================================================================
|
|
33
57
|
/**
|
|
34
58
|
* AI Agent for ClawSQL CLI
|
|
35
59
|
*/
|
|
36
60
|
class AIAgent {
|
|
37
61
|
provider = null;
|
|
38
62
|
tools;
|
|
39
|
-
|
|
63
|
+
history = [];
|
|
40
64
|
config;
|
|
41
|
-
|
|
65
|
+
openclawReady = null;
|
|
42
66
|
constructor(ctx, config) {
|
|
43
|
-
this.config = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
maxIterations: 5,
|
|
47
|
-
...config,
|
|
48
|
-
};
|
|
49
|
-
// Initialize provider (may be null for openclaw mode)
|
|
67
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
68
|
+
this.tools = (0, index_js_1.createAgentTools)(ctx);
|
|
69
|
+
// Initialize direct LLM provider if not using OpenClaw
|
|
50
70
|
if (this.config.provider !== 'openclaw') {
|
|
51
71
|
this.provider = this.createProvider();
|
|
52
72
|
}
|
|
53
|
-
this.tools = (0, index_js_1.createAgentTools)(ctx);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Create the LLM provider based on configuration
|
|
57
|
-
*/
|
|
58
|
-
createProvider() {
|
|
59
|
-
switch (this.config.provider) {
|
|
60
|
-
case 'openai':
|
|
61
|
-
return new openai_js_1.OpenAIProvider();
|
|
62
|
-
case 'anthropic':
|
|
63
|
-
default:
|
|
64
|
-
return new anthropic_js_1.AnthropicProvider();
|
|
65
|
-
}
|
|
66
73
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Check if the agent is properly configured
|
|
69
|
-
*/
|
|
70
74
|
isConfigured() {
|
|
71
|
-
if (this.config.provider === 'openclaw')
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
75
|
+
if (this.config.provider === 'openclaw')
|
|
76
|
+
return true;
|
|
74
77
|
return this.config.enabled && (this.provider?.isConfigured() ?? false);
|
|
75
78
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Get the provider name
|
|
78
|
-
*/
|
|
79
79
|
getProviderName() {
|
|
80
80
|
return this.config.provider;
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
* Process
|
|
84
|
-
* @param input The user's natural language input
|
|
85
|
-
* @param onChunk Optional callback for streaming output chunks
|
|
86
|
-
* @param signal Optional AbortSignal to cancel the operation
|
|
83
|
+
* Process natural language input
|
|
87
84
|
*/
|
|
88
85
|
async process(input, onChunk, signal) {
|
|
89
|
-
// Try OpenClaw first
|
|
86
|
+
// Try OpenClaw first
|
|
90
87
|
if (this.config.provider === 'openclaw') {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
// Fall through to direct LLM
|
|
113
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
114
|
-
console.error('OpenClaw not available, falling back to direct LLM:', msg);
|
|
88
|
+
const response = await this.tryOpenClaw(input, onChunk, signal);
|
|
89
|
+
if (response !== null)
|
|
90
|
+
return response;
|
|
91
|
+
}
|
|
92
|
+
// Fall back to direct LLM
|
|
93
|
+
if (!this.provider?.isConfigured()) {
|
|
94
|
+
onChunk?.(NOT_CONFIGURED_MSG);
|
|
95
|
+
return NOT_CONFIGURED_MSG;
|
|
96
|
+
}
|
|
97
|
+
const response = await this.processWithLLM(input, signal);
|
|
98
|
+
onChunk?.(response);
|
|
99
|
+
return response;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Try processing via OpenClaw gateway
|
|
103
|
+
*/
|
|
104
|
+
async tryOpenClaw(input, onChunk, signal) {
|
|
105
|
+
try {
|
|
106
|
+
if (this.openclawReady === null) {
|
|
107
|
+
this.openclawReady = await (0, openclaw_integration_js_1.isOpenClawAvailable)();
|
|
115
108
|
}
|
|
109
|
+
if (!this.openclawReady)
|
|
110
|
+
return null;
|
|
111
|
+
const prompt = `${OPENCLAW_CONTEXT}\n\nUser query: ${input}`;
|
|
112
|
+
const options = { signal };
|
|
113
|
+
return onChunk
|
|
114
|
+
? await (0, openclaw_integration_js_1.sendToOpenClawStream)(prompt, onChunk, options)
|
|
115
|
+
: await (0, openclaw_integration_js_1.sendToOpenClaw)(prompt, options);
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (error instanceof Error && error.name === 'AbortError')
|
|
119
|
+
throw error;
|
|
120
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
121
|
+
console.error('OpenClaw unavailable, falling back:', msg);
|
|
122
|
+
return null;
|
|
120
123
|
}
|
|
121
|
-
return this.processWithLLM(input, signal);
|
|
122
124
|
}
|
|
123
125
|
/**
|
|
124
|
-
* Process
|
|
126
|
+
* Process via direct LLM provider
|
|
125
127
|
*/
|
|
126
128
|
async processWithLLM(input, signal) {
|
|
127
|
-
|
|
128
|
-
this.conversationHistory.push({
|
|
129
|
-
role: 'user',
|
|
130
|
-
content: input,
|
|
131
|
-
});
|
|
129
|
+
this.history.push({ role: 'user', content: input });
|
|
132
130
|
try {
|
|
133
|
-
let
|
|
134
|
-
let
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
this.conversationHistory.push({
|
|
142
|
-
role: 'assistant',
|
|
143
|
-
content: response.content || '',
|
|
144
|
-
});
|
|
145
|
-
// Add tool results
|
|
146
|
-
for (const result of toolResults) {
|
|
147
|
-
this.conversationHistory.push({
|
|
131
|
+
let response = await this.chat(signal);
|
|
132
|
+
let iterations = 0;
|
|
133
|
+
while (response.toolUse && iterations < this.config.maxIterations) {
|
|
134
|
+
iterations++;
|
|
135
|
+
const results = await this.executeTools(response.toolUse);
|
|
136
|
+
this.history.push({ role: 'assistant', content: response.content ?? '' });
|
|
137
|
+
for (const result of results) {
|
|
138
|
+
this.history.push({
|
|
148
139
|
role: 'user',
|
|
149
140
|
content: JSON.stringify({
|
|
150
141
|
type: 'tool_result',
|
|
@@ -154,104 +145,71 @@ class AIAgent {
|
|
|
154
145
|
}),
|
|
155
146
|
});
|
|
156
147
|
}
|
|
157
|
-
|
|
158
|
-
response = await this.sendChat(signal);
|
|
148
|
+
response = await this.chat(signal);
|
|
159
149
|
}
|
|
160
|
-
// Add final assistant response to history
|
|
161
150
|
if (response.content) {
|
|
162
|
-
this.
|
|
163
|
-
role: 'assistant',
|
|
164
|
-
content: response.content,
|
|
165
|
-
});
|
|
151
|
+
this.history.push({ role: 'assistant', content: response.content });
|
|
166
152
|
}
|
|
167
|
-
return response.content
|
|
153
|
+
return response.content ?? 'No response generated.';
|
|
168
154
|
}
|
|
169
155
|
catch (error) {
|
|
170
|
-
|
|
171
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
156
|
+
if (error instanceof Error && error.name === 'AbortError')
|
|
172
157
|
throw error;
|
|
173
|
-
}
|
|
174
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
175
|
-
return `Error: ${message}`;
|
|
158
|
+
return `Error: ${error instanceof Error ? error.message : String(error)}`;
|
|
176
159
|
}
|
|
177
160
|
}
|
|
178
161
|
/**
|
|
179
|
-
*
|
|
180
|
-
*/
|
|
181
|
-
buildOpenClawContext() {
|
|
182
|
-
return `You are the ClawSQL assistant for MySQL cluster management.
|
|
183
|
-
|
|
184
|
-
CRITICAL: Use the 'clawsql' skill. Execute commands EXACTLY as shown:
|
|
185
|
-
- Topology: clawsql --command /topology
|
|
186
|
-
- Health: clawsql --command /health
|
|
187
|
-
- Clusters: clawsql --command /clusters
|
|
188
|
-
- SQL queries: clawsql --command "/sql YOUR_QUERY_HERE"
|
|
189
|
-
|
|
190
|
-
For user questions about databases/tables/users, execute SQL directly:
|
|
191
|
-
- SHOW DATABASES
|
|
192
|
-
- SHOW TABLES FROM database_name
|
|
193
|
-
- SELECT User, Host FROM mysql.user
|
|
194
|
-
|
|
195
|
-
NEVER say "I cannot" or make excuses. Execute the command. If it fails, show the actual error.`;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Send a chat request to the LLM
|
|
162
|
+
* Send chat request to LLM
|
|
199
163
|
*/
|
|
200
|
-
async
|
|
201
|
-
if (!this.provider)
|
|
164
|
+
async chat(signal) {
|
|
165
|
+
if (!this.provider)
|
|
202
166
|
throw new Error('No LLM provider configured');
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return {
|
|
206
|
-
content: response.content,
|
|
207
|
-
toolUse: response.toolUse,
|
|
208
|
-
};
|
|
167
|
+
const response = await this.provider.chat([{ role: 'system', content: SYSTEM_PROMPT }, ...this.history], this.tools, { signal });
|
|
168
|
+
return { content: response.content, toolUse: response.toolUse };
|
|
209
169
|
}
|
|
210
170
|
/**
|
|
211
171
|
* Execute tool calls
|
|
212
172
|
*/
|
|
213
173
|
async executeTools(toolUse) {
|
|
214
|
-
|
|
215
|
-
for (const tool of toolUse) {
|
|
174
|
+
return Promise.all(toolUse.map(async (tool) => {
|
|
216
175
|
const toolDef = this.tools.find(t => t.name === tool.name);
|
|
217
176
|
if (!toolDef) {
|
|
218
|
-
|
|
177
|
+
return {
|
|
219
178
|
tool_use_id: tool.id,
|
|
220
179
|
content: JSON.stringify({ error: `Unknown tool: ${tool.name}` }),
|
|
221
180
|
is_error: true,
|
|
222
|
-
}
|
|
223
|
-
continue;
|
|
181
|
+
};
|
|
224
182
|
}
|
|
225
183
|
try {
|
|
226
184
|
const result = await toolDef.execute(tool.input, null);
|
|
227
|
-
|
|
228
|
-
tool_use_id: tool.id,
|
|
229
|
-
content: JSON.stringify(result),
|
|
230
|
-
});
|
|
185
|
+
return { tool_use_id: tool.id, content: JSON.stringify(result) };
|
|
231
186
|
}
|
|
232
187
|
catch (error) {
|
|
233
|
-
|
|
188
|
+
return {
|
|
234
189
|
tool_use_id: tool.id,
|
|
235
|
-
content: JSON.stringify({
|
|
236
|
-
error: error instanceof Error ? error.message : String(error),
|
|
237
|
-
}),
|
|
190
|
+
content: JSON.stringify({ error: error instanceof Error ? error.message : String(error) }),
|
|
238
191
|
is_error: true,
|
|
239
|
-
}
|
|
192
|
+
};
|
|
240
193
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Create LLM provider instance
|
|
198
|
+
*/
|
|
199
|
+
createProvider() {
|
|
200
|
+
return this.config.provider === 'openai' ? new openai_js_1.OpenAIProvider() : new anthropic_js_1.AnthropicProvider();
|
|
243
201
|
}
|
|
244
202
|
/**
|
|
245
203
|
* Clear conversation history
|
|
246
204
|
*/
|
|
247
205
|
reset() {
|
|
248
|
-
this.
|
|
206
|
+
this.history = [];
|
|
249
207
|
}
|
|
250
208
|
}
|
|
251
209
|
exports.AIAgent = AIAgent;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
210
|
+
// ============================================================================
|
|
211
|
+
// Factory
|
|
212
|
+
// ============================================================================
|
|
255
213
|
function createAIAgent(ctx, config) {
|
|
256
214
|
return new AIAgent(ctx, config);
|
|
257
215
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/cli/agent/handler.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/cli/agent/handler.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAwQH,sCAEC;AAlQD,2DAA6D;AAC7D,qDAAuD;AACvD,+CAAoD;AAEpD,uEAImC;AAcnC,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,cAAc,GAAgB;IAClC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;2EAgBqD,CAAC;AAE5E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;+FAasE,CAAC;AAEhG,MAAM,kBAAkB,GAAG,iIAAiI,CAAC;AAE7J,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E;;GAEG;AACH,MAAa,OAAO;IACV,QAAQ,GAAuB,IAAI,CAAC;IAC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,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACvD,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;YACnE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,WAAW,EAAE,IAAI,CAAC,EAAE;oBACpB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC1F,QAAQ,EAAE,IAAI;iBACf,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;OAEG;IACK,cAAc;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,0BAAc,EAAE,CAAC,CAAC,CAAC,IAAI,gCAAiB,EAAE,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;CACF;AAhLD,0BAgLC;AAED,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,SAAgB,aAAa,CAAC,GAAe,EAAE,MAA6B;IAC1E,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -10,5 +10,6 @@ export { loadAIConfig } from './providers/base.js';
|
|
|
10
10
|
export { AnthropicProvider, getAnthropicProvider } from './providers/anthropic.js';
|
|
11
11
|
export { OpenAIProvider, getOpenAIProvider } from './providers/openai.js';
|
|
12
12
|
export { createAgentTools } from './tools/index.js';
|
|
13
|
-
export { OpenClawAgent, createOpenClawAgent, isOpenClawAvailable, isDockerOpenClawAvailable, isLocalOpenClawAvailable, isGatewayHealthy, getOpenClawStatus, ensureOpenClawRunning, sendToOpenClaw, scheduleCron, sendNotification, writeToMemory, } from './openclaw-integration.js';
|
|
13
|
+
export { OpenClawAgent, createOpenClawAgent, isOpenClawAvailable, isDockerOpenClawAvailable, isLocalOpenClawAvailable, isGatewayHealthy, getOpenClawStatus, ensureOpenClawRunning, sendToOpenClaw, sendToOpenClawStream, scheduleCron, sendNotification, writeToMemory, getModelProviderInfo, configureModelProvider, testOpenClawConnection, getDetailedOpenClawStatus, SUPPORTED_PROVIDERS, } from './openclaw-integration.js';
|
|
14
|
+
export type { ModelProviderInfo, OpenClawOptions, OpenClawStatus } from './openclaw-integration.js';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/agent/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/agent/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/cli/agent/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Exports for the AI agent system.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.writeToMemory = exports.sendNotification = exports.scheduleCron = exports.sendToOpenClaw = exports.ensureOpenClawRunning = exports.getOpenClawStatus = exports.isGatewayHealthy = exports.isLocalOpenClawAvailable = exports.isDockerOpenClawAvailable = exports.isOpenClawAvailable = exports.createOpenClawAgent = exports.OpenClawAgent = exports.createAgentTools = exports.getOpenAIProvider = exports.OpenAIProvider = exports.getAnthropicProvider = exports.AnthropicProvider = exports.loadAIConfig = exports.createAIAgent = exports.AIAgent = void 0;
|
|
8
|
+
exports.SUPPORTED_PROVIDERS = exports.getDetailedOpenClawStatus = exports.testOpenClawConnection = exports.configureModelProvider = exports.getModelProviderInfo = exports.writeToMemory = exports.sendNotification = exports.scheduleCron = exports.sendToOpenClawStream = exports.sendToOpenClaw = exports.ensureOpenClawRunning = exports.getOpenClawStatus = exports.isGatewayHealthy = exports.isLocalOpenClawAvailable = exports.isDockerOpenClawAvailable = exports.isOpenClawAvailable = exports.createOpenClawAgent = exports.OpenClawAgent = exports.createAgentTools = exports.getOpenAIProvider = exports.OpenAIProvider = exports.getAnthropicProvider = exports.AnthropicProvider = exports.loadAIConfig = exports.createAIAgent = exports.AIAgent = void 0;
|
|
9
9
|
var handler_js_1 = require("./handler.js");
|
|
10
10
|
Object.defineProperty(exports, "AIAgent", { enumerable: true, get: function () { return handler_js_1.AIAgent; } });
|
|
11
11
|
Object.defineProperty(exports, "createAIAgent", { enumerable: true, get: function () { return handler_js_1.createAIAgent; } });
|
|
@@ -29,7 +29,13 @@ Object.defineProperty(exports, "isGatewayHealthy", { enumerable: true, get: func
|
|
|
29
29
|
Object.defineProperty(exports, "getOpenClawStatus", { enumerable: true, get: function () { return openclaw_integration_js_1.getOpenClawStatus; } });
|
|
30
30
|
Object.defineProperty(exports, "ensureOpenClawRunning", { enumerable: true, get: function () { return openclaw_integration_js_1.ensureOpenClawRunning; } });
|
|
31
31
|
Object.defineProperty(exports, "sendToOpenClaw", { enumerable: true, get: function () { return openclaw_integration_js_1.sendToOpenClaw; } });
|
|
32
|
+
Object.defineProperty(exports, "sendToOpenClawStream", { enumerable: true, get: function () { return openclaw_integration_js_1.sendToOpenClawStream; } });
|
|
32
33
|
Object.defineProperty(exports, "scheduleCron", { enumerable: true, get: function () { return openclaw_integration_js_1.scheduleCron; } });
|
|
33
34
|
Object.defineProperty(exports, "sendNotification", { enumerable: true, get: function () { return openclaw_integration_js_1.sendNotification; } });
|
|
34
35
|
Object.defineProperty(exports, "writeToMemory", { enumerable: true, get: function () { return openclaw_integration_js_1.writeToMemory; } });
|
|
36
|
+
Object.defineProperty(exports, "getModelProviderInfo", { enumerable: true, get: function () { return openclaw_integration_js_1.getModelProviderInfo; } });
|
|
37
|
+
Object.defineProperty(exports, "configureModelProvider", { enumerable: true, get: function () { return openclaw_integration_js_1.configureModelProvider; } });
|
|
38
|
+
Object.defineProperty(exports, "testOpenClawConnection", { enumerable: true, get: function () { return openclaw_integration_js_1.testOpenClawConnection; } });
|
|
39
|
+
Object.defineProperty(exports, "getDetailedOpenClawStatus", { enumerable: true, get: function () { return openclaw_integration_js_1.getDetailedOpenClawStatus; } });
|
|
40
|
+
Object.defineProperty(exports, "SUPPORTED_PROVIDERS", { enumerable: true, get: function () { return openclaw_integration_js_1.SUPPORTED_PROVIDERS; } });
|
|
35
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/agent/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,2CAAsD;AAA7C,qGAAA,OAAO,OAAA;AAAE,2GAAA,aAAa,OAAA;AAG/B,+CAAmD;AAA1C,uGAAA,YAAY,OAAA;AACrB,yDAAmF;AAA1E,iHAAA,iBAAiB,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAChD,mDAA0E;AAAjE,2GAAA,cAAc,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AAC1C,6CAAoD;AAA3C,4GAAA,gBAAgB,OAAA;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/agent/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,2CAAsD;AAA7C,qGAAA,OAAO,OAAA;AAAE,2GAAA,aAAa,OAAA;AAG/B,+CAAmD;AAA1C,uGAAA,YAAY,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