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/docker-compose.yml
CHANGED
|
@@ -18,23 +18,25 @@ services:
|
|
|
18
18
|
image: ghcr.io/openclaw/openclaw:latest
|
|
19
19
|
container_name: openclaw
|
|
20
20
|
hostname: openclaw
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- "18790:18790" # Control UI port
|
|
21
|
+
network_mode: host
|
|
22
|
+
entrypoint: ["/bin/bash", "/entrypoint.sh"]
|
|
24
23
|
environment:
|
|
25
24
|
- OPENCLAW_GATEWAY_PORT=18789
|
|
26
25
|
- OPENCLAW_GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN:-clawsql-openclaw-token}
|
|
27
|
-
-
|
|
28
|
-
- OPENCLAW_STATE_DIR=/data/.openclaw
|
|
26
|
+
- OPENCLAW_STATE_DIR=/data/state
|
|
29
27
|
- OPENCLAW_WORKSPACE_DIR=/data/workspace
|
|
30
|
-
#
|
|
31
|
-
-
|
|
32
|
-
-
|
|
28
|
+
# Auto-injected AI configuration from host environment
|
|
29
|
+
# For custom Anthropic-compatible endpoints (e.g., DashScope, OpenRouter)
|
|
30
|
+
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
|
31
|
+
- ANTHROPIC_BASE_URL=${ANTHROPIC_BASE_URL:-}
|
|
32
|
+
- ANTHROPIC_MODEL=${ANTHROPIC_MODEL:-}
|
|
33
|
+
# OpenAI configuration
|
|
34
|
+
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
35
|
+
- OPENAI_BASE_URL=${OPENAI_BASE_URL:-}
|
|
36
|
+
- OPENAI_MODEL=${OPENAI_MODEL:-}
|
|
33
37
|
volumes:
|
|
34
38
|
- openclaw-data:/data
|
|
35
|
-
- ./docker/openclaw/
|
|
36
|
-
networks:
|
|
37
|
-
- clawsql-network
|
|
39
|
+
- ./docker/openclaw/entrypoint.sh:/entrypoint.sh:ro
|
|
38
40
|
restart: unless-stopped
|
|
39
41
|
healthcheck:
|
|
40
42
|
test: ["CMD-SHELL", "curl -f http://localhost:18789/health || exit 1"]
|
|
@@ -64,7 +66,7 @@ services:
|
|
|
64
66
|
- PROXYSQL_ADMIN_PORT=6032
|
|
65
67
|
- PROMETHEUS_URL=http://prometheus:9090
|
|
66
68
|
# OpenClaw Gateway for AI operations
|
|
67
|
-
- OPENCLAW_GATEWAY_URL=ws://
|
|
69
|
+
- OPENCLAW_GATEWAY_URL=ws://host.containers.internal:18789
|
|
68
70
|
- OPENCLAW_GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN:-clawsql-openclaw-token}
|
|
69
71
|
# Metadata Database (shared with Orchestrator)
|
|
70
72
|
- METADATA_DB_HOST=${METADATA_DB_HOST:-metadata-mysql}
|
|
@@ -107,13 +109,18 @@ services:
|
|
|
107
109
|
# Uses shared metadata MySQL database
|
|
108
110
|
# =============================================================================
|
|
109
111
|
orchestrator:
|
|
110
|
-
image: docker.io/
|
|
112
|
+
image: docker.io/percona/percona-orchestrator:latest
|
|
111
113
|
container_name: orchestrator
|
|
112
114
|
hostname: orchestrator
|
|
113
115
|
ports:
|
|
114
116
|
- "3000:3000"
|
|
115
117
|
volumes:
|
|
116
|
-
- ./docker/orchestrator/orchestrator.conf.json:/etc/orchestrator.conf.json
|
|
118
|
+
- ./docker/orchestrator/orchestrator.conf.json:/etc/orchestrator/orchestrator.conf.json
|
|
119
|
+
- orchestrator-data:/var/lib/orchestrator
|
|
120
|
+
depends_on:
|
|
121
|
+
metadata-mysql:
|
|
122
|
+
condition: service_healthy
|
|
123
|
+
required: false
|
|
117
124
|
networks:
|
|
118
125
|
- clawsql-network
|
|
119
126
|
restart: unless-stopped
|
|
@@ -254,6 +261,7 @@ networks:
|
|
|
254
261
|
# Volumes
|
|
255
262
|
# =============================================================================
|
|
256
263
|
volumes:
|
|
264
|
+
orchestrator-data:
|
|
257
265
|
metadata-mysql-data:
|
|
258
266
|
proxysql-data:
|
|
259
267
|
prometheus-data:
|
package/init/metadata.sql
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
-- Metadata MySQL initialization script
|
|
2
|
-
--
|
|
2
|
+
-- Creates database and user for ClawSQL
|
|
3
|
+
-- Orchestrator creates its own schema during startup
|
|
4
|
+
-- ClawSQL tables are created after Orchestrator is ready
|
|
5
|
+
|
|
6
|
+
-- =============================================================================
|
|
7
|
+
-- User Setup (mysql_native_password for Orchestrator compatibility)
|
|
8
|
+
-- =============================================================================
|
|
3
9
|
|
|
4
10
|
-- Drop the user created by MYSQL_USER env var (which uses caching_sha2_password)
|
|
5
11
|
DROP USER IF EXISTS 'clawsql'@'%';
|
|
6
12
|
|
|
7
|
-
-- Recreate with mysql_native_password
|
|
13
|
+
-- Recreate with mysql_native_password for Orchestrator compatibility
|
|
8
14
|
CREATE USER 'clawsql'@'%' IDENTIFIED WITH mysql_native_password BY 'clawsql_password';
|
|
9
15
|
GRANT ALL PRIVILEGES ON *.* TO 'clawsql'@'%' WITH GRANT OPTION;
|
|
10
16
|
|
|
17
|
+
-- Create database for Orchestrator and ClawSQL
|
|
18
|
+
CREATE DATABASE IF NOT EXISTS clawsql_meta;
|
|
19
|
+
|
|
11
20
|
FLUSH PRIVILEGES;
|
|
21
|
+
|
|
22
|
+
-- Note: Orchestrator creates its own tables during startup
|
|
23
|
+
-- ClawSQL application tables are created by the start command after Orchestrator is healthy
|