clawsql 0.2.1 → 0.2.3
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 +111 -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 +92 -25
- package/dist/cli/agent/openclaw-integration.d.ts.map +1 -1
- package/dist/cli/agent/openclaw-integration.js +312 -195
- 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 +232 -581
- 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 +264 -8
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +7 -34
- package/dist/cli/commands/status.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;AAuDrD;;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,110 @@ 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 HTTP requests to the ClawSQL API at http://host.containers.internal:8080 (or http://localhost:8080 if that fails):
|
|
42
|
+
|
|
43
|
+
Available endpoints:
|
|
44
|
+
- GET /health - Health check
|
|
45
|
+
- GET /api/v1/clusters - List all discovered clusters
|
|
46
|
+
- GET /api/v1/instances - List all MySQL instances
|
|
47
|
+
- GET /api/v1/monitoring/metrics - System metrics
|
|
48
|
+
- GET /api/v1/failover/config - Failover configuration
|
|
49
|
+
|
|
50
|
+
Execute commands using curl:
|
|
51
|
+
- Clusters: curl -s http://host.containers.internal:8080/api/v1/clusters
|
|
52
|
+
- Instances: curl -s http://host.containers.internal:8080/api/v1/instances
|
|
53
|
+
- Health: curl -s http://host.containers.internal:8080/health
|
|
54
|
+
|
|
55
|
+
For user questions about MySQL clusters, instances, or system status, call the appropriate API.
|
|
56
|
+
NEVER say "I cannot" or make excuses. Execute the API request. If it fails, try localhost:8080 instead of host.containers.internal:8080, then show the actual error.`;
|
|
57
|
+
const NOT_CONFIGURED_MSG = 'AI features are not configured. Install OpenClaw (recommended) or set ANTHROPIC_API_KEY or OPENAI_API_KEY environment variable.';
|
|
58
|
+
// ============================================================================
|
|
59
|
+
// AIAgent Class
|
|
60
|
+
// ============================================================================
|
|
33
61
|
/**
|
|
34
62
|
* AI Agent for ClawSQL CLI
|
|
35
63
|
*/
|
|
36
64
|
class AIAgent {
|
|
37
65
|
provider = null;
|
|
38
66
|
tools;
|
|
39
|
-
|
|
67
|
+
history = [];
|
|
40
68
|
config;
|
|
41
|
-
|
|
69
|
+
openclawReady = null;
|
|
42
70
|
constructor(ctx, config) {
|
|
43
|
-
this.config = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
maxIterations: 5,
|
|
47
|
-
...config,
|
|
48
|
-
};
|
|
49
|
-
// Initialize provider (may be null for openclaw mode)
|
|
71
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
72
|
+
this.tools = (0, index_js_1.createAgentTools)(ctx);
|
|
73
|
+
// Initialize direct LLM provider if not using OpenClaw
|
|
50
74
|
if (this.config.provider !== 'openclaw') {
|
|
51
75
|
this.provider = this.createProvider();
|
|
52
76
|
}
|
|
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
77
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Check if the agent is properly configured
|
|
69
|
-
*/
|
|
70
78
|
isConfigured() {
|
|
71
|
-
if (this.config.provider === 'openclaw')
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
79
|
+
if (this.config.provider === 'openclaw')
|
|
80
|
+
return true;
|
|
74
81
|
return this.config.enabled && (this.provider?.isConfigured() ?? false);
|
|
75
82
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Get the provider name
|
|
78
|
-
*/
|
|
79
83
|
getProviderName() {
|
|
80
84
|
return this.config.provider;
|
|
81
85
|
}
|
|
82
86
|
/**
|
|
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
|
|
87
|
+
* Process natural language input
|
|
87
88
|
*/
|
|
88
89
|
async process(input, onChunk, signal) {
|
|
89
|
-
// Try OpenClaw first
|
|
90
|
+
// Try OpenClaw first
|
|
90
91
|
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);
|
|
92
|
+
const response = await this.tryOpenClaw(input, onChunk, signal);
|
|
93
|
+
if (response !== null)
|
|
94
|
+
return response;
|
|
95
|
+
}
|
|
96
|
+
// Fall back to direct LLM
|
|
97
|
+
if (!this.provider?.isConfigured()) {
|
|
98
|
+
onChunk?.(NOT_CONFIGURED_MSG);
|
|
99
|
+
return NOT_CONFIGURED_MSG;
|
|
100
|
+
}
|
|
101
|
+
const response = await this.processWithLLM(input, signal);
|
|
102
|
+
onChunk?.(response);
|
|
103
|
+
return response;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Try processing via OpenClaw gateway
|
|
107
|
+
*/
|
|
108
|
+
async tryOpenClaw(input, onChunk, signal) {
|
|
109
|
+
try {
|
|
110
|
+
if (this.openclawReady === null) {
|
|
111
|
+
this.openclawReady = await (0, openclaw_integration_js_1.isOpenClawAvailable)();
|
|
115
112
|
}
|
|
113
|
+
if (!this.openclawReady)
|
|
114
|
+
return null;
|
|
115
|
+
const prompt = `${OPENCLAW_CONTEXT}\n\nUser query: ${input}`;
|
|
116
|
+
const options = { signal };
|
|
117
|
+
return onChunk
|
|
118
|
+
? await (0, openclaw_integration_js_1.sendToOpenClawStream)(prompt, onChunk, options)
|
|
119
|
+
: await (0, openclaw_integration_js_1.sendToOpenClaw)(prompt, options);
|
|
116
120
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
catch (error) {
|
|
122
|
+
if (error instanceof Error && error.name === 'AbortError')
|
|
123
|
+
throw error;
|
|
124
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
125
|
+
console.error('OpenClaw unavailable, falling back:', msg);
|
|
126
|
+
return null;
|
|
120
127
|
}
|
|
121
|
-
return this.processWithLLM(input, signal);
|
|
122
128
|
}
|
|
123
129
|
/**
|
|
124
|
-
* Process
|
|
130
|
+
* Process via direct LLM provider
|
|
125
131
|
*/
|
|
126
132
|
async processWithLLM(input, signal) {
|
|
127
|
-
|
|
128
|
-
this.conversationHistory.push({
|
|
129
|
-
role: 'user',
|
|
130
|
-
content: input,
|
|
131
|
-
});
|
|
133
|
+
this.history.push({ role: 'user', content: input });
|
|
132
134
|
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({
|
|
135
|
+
let response = await this.chat(signal);
|
|
136
|
+
let iterations = 0;
|
|
137
|
+
while (response.toolUse && iterations < this.config.maxIterations) {
|
|
138
|
+
iterations++;
|
|
139
|
+
const results = await this.executeTools(response.toolUse);
|
|
140
|
+
this.history.push({ role: 'assistant', content: response.content ?? '' });
|
|
141
|
+
for (const result of results) {
|
|
142
|
+
this.history.push({
|
|
148
143
|
role: 'user',
|
|
149
144
|
content: JSON.stringify({
|
|
150
145
|
type: 'tool_result',
|
|
@@ -154,104 +149,71 @@ class AIAgent {
|
|
|
154
149
|
}),
|
|
155
150
|
});
|
|
156
151
|
}
|
|
157
|
-
|
|
158
|
-
response = await this.sendChat(signal);
|
|
152
|
+
response = await this.chat(signal);
|
|
159
153
|
}
|
|
160
|
-
// Add final assistant response to history
|
|
161
154
|
if (response.content) {
|
|
162
|
-
this.
|
|
163
|
-
role: 'assistant',
|
|
164
|
-
content: response.content,
|
|
165
|
-
});
|
|
155
|
+
this.history.push({ role: 'assistant', content: response.content });
|
|
166
156
|
}
|
|
167
|
-
return response.content
|
|
157
|
+
return response.content ?? 'No response generated.';
|
|
168
158
|
}
|
|
169
159
|
catch (error) {
|
|
170
|
-
|
|
171
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
160
|
+
if (error instanceof Error && error.name === 'AbortError')
|
|
172
161
|
throw error;
|
|
173
|
-
}
|
|
174
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
175
|
-
return `Error: ${message}`;
|
|
162
|
+
return `Error: ${error instanceof Error ? error.message : String(error)}`;
|
|
176
163
|
}
|
|
177
164
|
}
|
|
178
165
|
/**
|
|
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
|
|
166
|
+
* Send chat request to LLM
|
|
199
167
|
*/
|
|
200
|
-
async
|
|
201
|
-
if (!this.provider)
|
|
168
|
+
async chat(signal) {
|
|
169
|
+
if (!this.provider)
|
|
202
170
|
throw new Error('No LLM provider configured');
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return {
|
|
206
|
-
content: response.content,
|
|
207
|
-
toolUse: response.toolUse,
|
|
208
|
-
};
|
|
171
|
+
const response = await this.provider.chat([{ role: 'system', content: SYSTEM_PROMPT }, ...this.history], this.tools, { signal });
|
|
172
|
+
return { content: response.content, toolUse: response.toolUse };
|
|
209
173
|
}
|
|
210
174
|
/**
|
|
211
175
|
* Execute tool calls
|
|
212
176
|
*/
|
|
213
177
|
async executeTools(toolUse) {
|
|
214
|
-
|
|
215
|
-
for (const tool of toolUse) {
|
|
178
|
+
return Promise.all(toolUse.map(async (tool) => {
|
|
216
179
|
const toolDef = this.tools.find(t => t.name === tool.name);
|
|
217
180
|
if (!toolDef) {
|
|
218
|
-
|
|
181
|
+
return {
|
|
219
182
|
tool_use_id: tool.id,
|
|
220
183
|
content: JSON.stringify({ error: `Unknown tool: ${tool.name}` }),
|
|
221
184
|
is_error: true,
|
|
222
|
-
}
|
|
223
|
-
continue;
|
|
185
|
+
};
|
|
224
186
|
}
|
|
225
187
|
try {
|
|
226
188
|
const result = await toolDef.execute(tool.input, null);
|
|
227
|
-
|
|
228
|
-
tool_use_id: tool.id,
|
|
229
|
-
content: JSON.stringify(result),
|
|
230
|
-
});
|
|
189
|
+
return { tool_use_id: tool.id, content: JSON.stringify(result) };
|
|
231
190
|
}
|
|
232
191
|
catch (error) {
|
|
233
|
-
|
|
192
|
+
return {
|
|
234
193
|
tool_use_id: tool.id,
|
|
235
|
-
content: JSON.stringify({
|
|
236
|
-
error: error instanceof Error ? error.message : String(error),
|
|
237
|
-
}),
|
|
194
|
+
content: JSON.stringify({ error: error instanceof Error ? error.message : String(error) }),
|
|
238
195
|
is_error: true,
|
|
239
|
-
}
|
|
196
|
+
};
|
|
240
197
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Create LLM provider instance
|
|
202
|
+
*/
|
|
203
|
+
createProvider() {
|
|
204
|
+
return this.config.provider === 'openai' ? new openai_js_1.OpenAIProvider() : new anthropic_js_1.AnthropicProvider();
|
|
243
205
|
}
|
|
244
206
|
/**
|
|
245
207
|
* Clear conversation history
|
|
246
208
|
*/
|
|
247
209
|
reset() {
|
|
248
|
-
this.
|
|
210
|
+
this.history = [];
|
|
249
211
|
}
|
|
250
212
|
}
|
|
251
213
|
exports.AIAgent = AIAgent;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
214
|
+
// ============================================================================
|
|
215
|
+
// Factory
|
|
216
|
+
// ============================================================================
|
|
255
217
|
function createAIAgent(ctx, config) {
|
|
256
218
|
return new AIAgent(ctx, config);
|
|
257
219
|
}
|
|
@@ -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;;;AA4QH,sCAEC;AAtQD,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,EAA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,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,2GA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