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.
Files changed (46) hide show
  1. package/README.md +25 -5
  2. package/dist/bin/clawsql.js +0 -0
  3. package/dist/cli/agent/handler.d.ts +13 -31
  4. package/dist/cli/agent/handler.d.ts.map +1 -1
  5. package/dist/cli/agent/handler.js +107 -149
  6. package/dist/cli/agent/handler.js.map +1 -1
  7. package/dist/cli/agent/index.d.ts +2 -1
  8. package/dist/cli/agent/index.d.ts.map +1 -1
  9. package/dist/cli/agent/index.js +7 -1
  10. package/dist/cli/agent/index.js.map +1 -1
  11. package/dist/cli/agent/openclaw-integration.d.ts +83 -25
  12. package/dist/cli/agent/openclaw-integration.d.ts.map +1 -1
  13. package/dist/cli/agent/openclaw-integration.js +305 -194
  14. package/dist/cli/agent/openclaw-integration.js.map +1 -1
  15. package/dist/cli/commands/cleanup.d.ts.map +1 -1
  16. package/dist/cli/commands/cleanup.js +26 -15
  17. package/dist/cli/commands/cleanup.js.map +1 -1
  18. package/dist/cli/commands/doctor.d.ts +0 -4
  19. package/dist/cli/commands/doctor.d.ts.map +1 -1
  20. package/dist/cli/commands/doctor.js +309 -469
  21. package/dist/cli/commands/doctor.js.map +1 -1
  22. package/dist/cli/commands/openclaw.d.ts +9 -0
  23. package/dist/cli/commands/openclaw.d.ts.map +1 -0
  24. package/dist/cli/commands/openclaw.js +236 -0
  25. package/dist/cli/commands/openclaw.js.map +1 -0
  26. package/dist/cli/commands/start.d.ts.map +1 -1
  27. package/dist/cli/commands/start.js +260 -6
  28. package/dist/cli/commands/start.js.map +1 -1
  29. package/dist/cli/index.d.ts.map +1 -1
  30. package/dist/cli/index.js +2 -0
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/cli/repl.js +1 -1
  33. package/dist/cli/repl.js.map +1 -1
  34. package/dist/cli/utils/ai-config.d.ts +32 -0
  35. package/dist/cli/utils/ai-config.d.ts.map +1 -0
  36. package/dist/cli/utils/ai-config.js +78 -0
  37. package/dist/cli/utils/ai-config.js.map +1 -0
  38. package/dist/cli/utils/docker-files.d.ts.map +1 -1
  39. package/dist/cli/utils/docker-files.js +2 -0
  40. package/dist/cli/utils/docker-files.js.map +1 -1
  41. package/docker/openclaw/entrypoint.sh +102 -0
  42. package/docker/openclaw/openclaw.json +4 -1
  43. package/docker/orchestrator/orchestrator-schema.sql +837 -0
  44. package/docker-compose.yml +22 -14
  45. package/init/metadata.sql +14 -2
  46. package/package.json +1 -1
@@ -18,23 +18,25 @@ services:
18
18
  image: ghcr.io/openclaw/openclaw:latest
19
19
  container_name: openclaw
20
20
  hostname: openclaw
21
- ports:
22
- - "18789:18789" # Gateway WebSocket port
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
- - OPENCLAW_GATEWAY_BIND=lan
28
- - OPENCLAW_STATE_DIR=/data/.openclaw
26
+ - OPENCLAW_STATE_DIR=/data/state
29
27
  - OPENCLAW_WORKSPACE_DIR=/data/workspace
30
- # Optional: configure AI provider (defaults to bundled qwen)
31
- - OPENCLAW_MODEL_PROVIDER=${OPENCLAW_MODEL_PROVIDER:-}
32
- - OPENCLAW_MODEL_API_KEY=${OPENCLAW_MODEL_API_KEY:-}
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/openclaw.json:/data/.openclaw/openclaw.json:ro
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://openclaw:18789
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/openarkcode/orchestrator:latest
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
- -- Recreate clawsql user with mysql_native_password for Orchestrator compatibility
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawsql",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "MySQL Cluster Automation and Operations Management System",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",