@better-openclaw/core 1.0.10 → 1.0.12

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 (80) hide show
  1. package/dist/bare-metal-partition.test.mjs +1 -1
  2. package/dist/composer.snapshot.test.mjs +1 -1
  3. package/dist/composer.test.mjs +1 -1
  4. package/dist/generate.d.mts.map +1 -1
  5. package/dist/generate.mjs +7 -1
  6. package/dist/generate.mjs.map +1 -1
  7. package/dist/generate.test.mjs +1 -1
  8. package/dist/generators/bare-metal-install.test.mjs +1 -1
  9. package/dist/generators/caddy.test.d.mts +1 -0
  10. package/dist/generators/caddy.test.mjs +45 -0
  11. package/dist/generators/caddy.test.mjs.map +1 -0
  12. package/dist/generators/env.test.d.mts +1 -0
  13. package/dist/generators/env.test.mjs +60 -0
  14. package/dist/generators/env.test.mjs.map +1 -0
  15. package/dist/generators/health-check.d.mts +18 -0
  16. package/dist/generators/health-check.d.mts.map +1 -0
  17. package/dist/generators/health-check.mjs +705 -0
  18. package/dist/generators/health-check.mjs.map +1 -0
  19. package/dist/generators/health-check.test.d.mts +1 -0
  20. package/dist/generators/health-check.test.mjs +85 -0
  21. package/dist/generators/health-check.test.mjs.map +1 -0
  22. package/dist/generators/scripts.test.d.mts +1 -0
  23. package/dist/generators/scripts.test.mjs +52 -0
  24. package/dist/generators/scripts.test.mjs.map +1 -0
  25. package/dist/generators/traefik.test.mjs +1 -1
  26. package/dist/generators/traefik.test.mjs.map +1 -1
  27. package/dist/index.d.mts +4 -2
  28. package/dist/index.mjs +3 -1
  29. package/dist/{magic-string.es-1uTtupLe.mjs → magic-string.es-CfFonO_S.mjs} +1 -1
  30. package/dist/{magic-string.es-1uTtupLe.mjs.map → magic-string.es-CfFonO_S.mjs.map} +1 -1
  31. package/dist/manifest-DSGl8ITO.mjs +1110 -0
  32. package/dist/manifest-DSGl8ITO.mjs.map +1 -0
  33. package/dist/migrations.d.mts.map +1 -1
  34. package/dist/migrations.mjs.map +1 -1
  35. package/dist/migrations.test.mjs +1 -1
  36. package/dist/migrations.test.mjs.map +1 -1
  37. package/dist/presets/registry.test.mjs +1 -1
  38. package/dist/resolver.test.mjs +1 -1
  39. package/dist/schema.test.mjs +1 -1
  40. package/dist/services/definitions/convex.mjs.map +1 -1
  41. package/dist/services/definitions/desktop-environment.mjs.map +1 -1
  42. package/dist/services/definitions/index.d.mts +2 -2
  43. package/dist/services/definitions/index.mjs +3 -3
  44. package/dist/services/definitions/index.mjs.map +1 -1
  45. package/dist/services/definitions/mission-control.mjs.map +1 -1
  46. package/dist/services/definitions/stream-gateway.mjs.map +1 -1
  47. package/dist/services/registry.test.mjs +1 -1
  48. package/dist/skills/registry.d.mts.map +1 -1
  49. package/dist/skills/registry.mjs +44 -0
  50. package/dist/skills/registry.mjs.map +1 -1
  51. package/dist/skills/skill-manifest.d.mts +20 -0
  52. package/dist/skills/skill-manifest.d.mts.map +1 -0
  53. package/dist/skills/skill-manifest.mjs +20 -0
  54. package/dist/skills/skill-manifest.mjs.map +1 -0
  55. package/dist/validator.test.mjs +1 -1
  56. package/dist/version-manager.test.mjs +1 -1
  57. package/dist/version-manager.test.mjs.map +1 -1
  58. package/dist/{vi.2VT5v0um-YSByewHe.mjs → vi.2VT5v0um-BgmKutxR.mjs} +2 -2
  59. package/dist/{vi.2VT5v0um-YSByewHe.mjs.map → vi.2VT5v0um-BgmKutxR.mjs.map} +1 -1
  60. package/package.json +1 -1
  61. package/src/generate.ts +15 -3
  62. package/src/generators/caddy.test.ts +56 -0
  63. package/src/generators/env.test.ts +73 -0
  64. package/src/generators/health-check.test.ts +118 -0
  65. package/src/generators/health-check.ts +812 -0
  66. package/src/generators/scripts.test.ts +60 -0
  67. package/src/generators/traefik.test.ts +9 -17
  68. package/src/index.ts +12 -6
  69. package/src/migrations.test.ts +1 -1
  70. package/src/migrations.ts +1 -5
  71. package/src/services/definitions/convex.ts +2 -4
  72. package/src/services/definitions/desktop-environment.ts +1 -9
  73. package/src/services/definitions/index.ts +6 -6
  74. package/src/services/definitions/mission-control.ts +2 -4
  75. package/src/services/definitions/stream-gateway.ts +1 -2
  76. package/src/skills/manifest.json +1333 -0
  77. package/src/skills/registry.ts +55 -71
  78. package/src/skills/skill-manifest.ts +57 -0
  79. package/src/version-manager.test.ts +15 -4
  80. package/tsdown.config.ts +6 -6
@@ -0,0 +1,60 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { generateScripts } from "./scripts.js";
3
+
4
+ describe("generateScripts", () => {
5
+ it("generates all 5 expected scripts", () => {
6
+ const result = generateScripts();
7
+
8
+ const expectedScripts = [
9
+ "scripts/start.sh",
10
+ "scripts/stop.sh",
11
+ "scripts/update.sh",
12
+ "scripts/backup.sh",
13
+ "scripts/status.sh",
14
+ ];
15
+
16
+ for (const script of expectedScripts) {
17
+ expect(result).toHaveProperty(script);
18
+ expect(result[script]!.length).toBeGreaterThan(0);
19
+ }
20
+ });
21
+
22
+ it("start.sh calls docker compose up", () => {
23
+ const result = generateScripts();
24
+ expect(result["scripts/start.sh"]).toContain("docker compose");
25
+ expect(result["scripts/start.sh"]).toContain("up");
26
+ });
27
+
28
+ it("stop.sh calls docker compose down", () => {
29
+ const result = generateScripts();
30
+ expect(result["scripts/stop.sh"]).toContain("docker compose");
31
+ expect(result["scripts/stop.sh"]).toContain("down");
32
+ });
33
+
34
+ it("update.sh calls docker compose pull", () => {
35
+ const result = generateScripts();
36
+ expect(result["scripts/update.sh"]).toContain("docker compose");
37
+ expect(result["scripts/update.sh"]).toContain("pull");
38
+ });
39
+
40
+ it("backup.sh references volumes or backup", () => {
41
+ const result = generateScripts();
42
+ const backup = result["scripts/backup.sh"]!;
43
+ expect(backup).toBeDefined();
44
+ expect(backup.length).toBeGreaterThan(50);
45
+ });
46
+
47
+ it("status.sh calls docker compose ps", () => {
48
+ const result = generateScripts();
49
+ expect(result["scripts/status.sh"]).toContain("docker compose");
50
+ expect(result["scripts/status.sh"]).toContain("ps");
51
+ });
52
+
53
+ it("all scripts start with bash shebang", () => {
54
+ const result = generateScripts();
55
+
56
+ for (const [, content] of Object.entries(result)) {
57
+ expect(content.startsWith("#!/")).toBe(true);
58
+ }
59
+ });
60
+ });
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { generateTraefikConfig } from "./traefik.js";
3
- import type { ResolverOutput } from "../types.js";
4
2
  import { resolve } from "../resolver.js";
3
+ import type { ResolverOutput } from "../types.js";
4
+ import { generateTraefikConfig } from "./traefik.js";
5
5
 
6
6
  function resolveWith(services: string[]): ResolverOutput {
7
7
  return resolve({ services, skillPacks: [], proxy: "traefik", gpu: false });
@@ -28,9 +28,7 @@ describe("generateTraefikConfig", () => {
28
28
  const redisLabels = serviceLabels.get("redis");
29
29
  expect(redisLabels).toBeDefined();
30
30
  expect(redisLabels!["traefik.enable"]).toBe("true");
31
- expect(redisLabels!["traefik.http.routers.redis.rule"]).toBe(
32
- "Host(`redis.example.com`)",
33
- );
31
+ expect(redisLabels!["traefik.http.routers.redis.rule"]).toBe("Host(`redis.example.com`)");
34
32
  expect(redisLabels!["traefik.http.routers.redis.entrypoints"]).toBe("websecure");
35
33
  expect(redisLabels!["traefik.http.routers.redis.tls.certresolver"]).toBe("letsencrypt");
36
34
  expect(redisLabels!["traefik.http.services.redis.loadbalancer.server.port"]).toBe("6379");
@@ -42,9 +40,7 @@ describe("generateTraefikConfig", () => {
42
40
 
43
41
  const redisLabels = serviceLabels.get("redis")!;
44
42
  expect(redisLabels["traefik.http.routers.redis-http.entrypoints"]).toBe("web");
45
- expect(redisLabels["traefik.http.routers.redis-http.middlewares"]).toBe(
46
- "redirect-to-https",
47
- );
43
+ expect(redisLabels["traefik.http.routers.redis-http.middlewares"]).toBe("redirect-to-https");
48
44
  });
49
45
 
50
46
  it("assigns root domain to gateway", () => {
@@ -53,9 +49,7 @@ describe("generateTraefikConfig", () => {
53
49
 
54
50
  const gwLabels = serviceLabels.get("openclaw-gateway");
55
51
  expect(gwLabels).toBeDefined();
56
- expect(gwLabels!["traefik.http.routers.gateway.rule"]).toBe(
57
- "Host(`example.com`)",
58
- );
52
+ expect(gwLabels!["traefik.http.routers.gateway.rule"]).toBe("Host(`example.com`)");
59
53
  expect(gwLabels!["traefik.http.services.gateway.loadbalancer.server.port"]).toBe("18789");
60
54
  });
61
55
 
@@ -65,9 +59,9 @@ describe("generateTraefikConfig", () => {
65
59
 
66
60
  const traefikLabels = serviceLabels.get("traefik");
67
61
  expect(traefikLabels).toBeDefined();
68
- expect(
69
- traefikLabels!["traefik.http.middlewares.redirect-to-https.redirectscheme.scheme"],
70
- ).toBe("https");
62
+ expect(traefikLabels!["traefik.http.middlewares.redirect-to-https.redirectscheme.scheme"]).toBe(
63
+ "https",
64
+ );
71
65
  expect(
72
66
  traefikLabels!["traefik.http.middlewares.redirect-to-https.redirectscheme.permanent"],
73
67
  ).toBe("true");
@@ -90,8 +84,6 @@ describe("generateTraefikConfig", () => {
90
84
  const labels = serviceLabels.get("open-webui");
91
85
  expect(labels).toBeDefined();
92
86
  // Router name has hyphens removed
93
- expect(labels!["traefik.http.routers.openwebui.rule"]).toBe(
94
- "Host(`open-webui.example.com`)",
95
- );
87
+ expect(labels!["traefik.http.routers.openwebui.rule"]).toBe("Host(`open-webui.example.com`)");
96
88
  });
97
89
  });
package/src/index.ts CHANGED
@@ -8,17 +8,22 @@ export {
8
8
  } from "./bare-metal-partition.js";
9
9
  export type { ComposeResult } from "./composer.js";
10
10
  export { compose, composeMultiFile } from "./composer.js";
11
+ // ─── Errors ─────────────────────────────────────────────────────────────────
12
+ export { StackConfigError, ValidationError } from "./errors.js";
11
13
  export { generate, generateServicesDoc } from "./generate.js";
12
14
  export { generateCaddyfile } from "./generators/caddy.js";
13
15
  export type { EnvVarGroup } from "./generators/env.js";
14
16
  export { generateEnvFiles, getStructuredEnvVars } from "./generators/env.js";
15
17
  export { generateGrafanaConfig, generateGrafanaDashboard } from "./generators/grafana.js";
18
+ export { generateHealthCheck } from "./generators/health-check.js";
16
19
  export { generateN8nWorkflows } from "./generators/n8n-workflows.js";
17
20
  export { generatePostgresInit, getDbRequirements } from "./generators/postgres-init.js";
18
21
  export { generatePrometheusConfig } from "./generators/prometheus.js";
19
22
  export { generateReadme } from "./generators/readme.js";
20
23
  export { generateScripts } from "./generators/scripts.js";
21
24
  export { generateSkillFiles } from "./generators/skills.js";
25
+ // ─── Config Migrations ──────────────────────────────────────────────────────
26
+ export { CURRENT_CONFIG_VERSION, migrateConfig, needsMigration } from "./migrations.js";
22
27
  // ─── Presets ────────────────────────────────────────────────────────────────
23
28
  export { getAllPresets, getPresetById, presetRegistry } from "./presets/registry.js";
24
29
  export { resolve } from "./resolver.js";
@@ -68,6 +73,13 @@ export {
68
73
  getSkillPackById,
69
74
  skillPackRegistry,
70
75
  } from "./skills/registry.js";
76
+ // ─── Skill Manifest ─────────────────────────────────────────────────────────
77
+ export type { SkillManifestEntry } from "./skills/skill-manifest.js";
78
+ export {
79
+ getAllManifestSkills,
80
+ getManifestSkillById,
81
+ getManifestSkillCount,
82
+ } from "./skills/skill-manifest.js";
71
83
  // ─── Types ──────────────────────────────────────────────────────────────────
72
84
  export type {
73
85
  AddedDependency,
@@ -109,12 +121,6 @@ export type {
109
121
  export { SERVICE_CATEGORIES } from "./types.js";
110
122
  export { validate } from "./validator.js";
111
123
 
112
- // ─── Config Migrations ──────────────────────────────────────────────────────
113
- export { migrateConfig, needsMigration, CURRENT_CONFIG_VERSION } from "./migrations.js";
114
-
115
- // ─── Errors ─────────────────────────────────────────────────────────────────
116
- export { StackConfigError, ValidationError } from "./errors.js";
117
-
118
124
  // ─── Version Manager ────────────────────────────────────────────────────────
119
125
  export {
120
126
  checkCompatibility,
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { migrateConfig, needsMigration, CURRENT_CONFIG_VERSION } from "./migrations.js";
2
+ import { CURRENT_CONFIG_VERSION, migrateConfig, needsMigration } from "./migrations.js";
3
3
 
4
4
  describe("config migrations", () => {
5
5
  it("migrates v1 config to current version", () => {
package/src/migrations.ts CHANGED
@@ -1,5 +1,3 @@
1
- import type { GenerationInput } from "./types.js";
2
-
3
1
  export const CURRENT_CONFIG_VERSION = 2;
4
2
 
5
3
  type MigrationFn = (input: Record<string, unknown>) => Record<string, unknown>;
@@ -21,9 +19,7 @@ export function migrateConfig(input: Record<string, unknown>): Record<string, un
21
19
  let version = (input.configVersion as number) ?? 1;
22
20
 
23
21
  if (version > CURRENT_CONFIG_VERSION) {
24
- throw new Error(
25
- `No migration path from config version ${version}`,
26
- );
22
+ throw new Error(`No migration path from config version ${version}`);
27
23
  }
28
24
 
29
25
  let current = { ...input };
@@ -64,8 +64,7 @@ export const convexDefinition: ServiceDefinition = {
64
64
  key: "DATABASE_URL",
65
65
  defaultValue: "",
66
66
  secret: true,
67
- description:
68
- "Optional Postgres connection string for production (leave empty to use SQLite)",
67
+ description: "Optional Postgres connection string for production (leave empty to use SQLite)",
69
68
  required: false,
70
69
  },
71
70
  {
@@ -106,8 +105,7 @@ export const convexDefinition: ServiceDefinition = {
106
105
  openclawEnvVars: [],
107
106
 
108
107
  docsUrl: "https://github.com/get-convex/convex-backend",
109
- selfHostedDocsUrl:
110
- "https://github.com/get-convex/convex-backend/blob/main/self-hosted/README.md",
108
+ selfHostedDocsUrl: "https://github.com/get-convex/convex-backend/blob/main/self-hosted/README.md",
111
109
  tags: ["convex", "database", "reactive", "real-time", "backend", "self-hosted"],
112
110
  maturity: "stable",
113
111
 
@@ -124,15 +124,7 @@ export const desktopEnvironmentDefinition: ServiceDefinition = {
124
124
  ],
125
125
 
126
126
  docsUrl: "https://www.kasmweb.com/docs/latest/index.html",
127
- tags: [
128
- "computer-use",
129
- "vnc",
130
- "desktop",
131
- "screen-capture",
132
- "automation",
133
- "obs",
134
- "kasm",
135
- ],
127
+ tags: ["computer-use", "vnc", "desktop", "screen-capture", "automation", "obs", "kasm"],
136
128
  maturity: "experimental",
137
129
 
138
130
  requires: [],
@@ -7,10 +7,10 @@ export { calComDefinition } from "./cal-com.js";
7
7
  export { chromadbDefinition } from "./chromadb.js";
8
8
  export { claudeCodeDefinition } from "./claude-code.js";
9
9
  export { codeServerDefinition } from "./code-server.js";
10
+ export { codexDefinition } from "./codex.js";
10
11
  export { comfyuiDefinition } from "./comfyui.js";
11
12
  export { convexDefinition } from "./convex.js";
12
13
  export { convexDashboardDefinition } from "./convex-dashboard.js";
13
- export { codexDefinition } from "./codex.js";
14
14
  export { coolifyDefinition } from "./coolify.js";
15
15
  export { desktopEnvironmentDefinition } from "./desktop-environment.js";
16
16
  export { difyDefinition } from "./dify.js";
@@ -35,8 +35,8 @@ export { matomoDefinition } from "./matomo.js";
35
35
  export { matrixSynapseDefinition } from "./matrix-synapse.js";
36
36
  export { mattermostDefinition } from "./mattermost.js";
37
37
  export { meilisearchDefinition } from "./meilisearch.js";
38
- export { missionControlDefinition } from "./mission-control.js";
39
38
  export { minioDefinition } from "./minio.js";
39
+ export { missionControlDefinition } from "./mission-control.js";
40
40
  export { mixpostDefinition } from "./mixpost.js";
41
41
  export { motionCanvasDefinition } from "./motion-canvas.js";
42
42
  export { n8nDefinition } from "./n8n.js";
@@ -66,8 +66,8 @@ export { tailscaleDefinition } from "./tailscale.js";
66
66
  export { temporalDefinition } from "./temporal.js";
67
67
  export { traefikDefinition } from "./traefik.js";
68
68
  export { umamiDefinition } from "./umami.js";
69
- export { usesendDefinition } from "./usesend.js";
70
69
  export { uptimeKumaDefinition } from "./uptime-kuma.js";
70
+ export { usesendDefinition } from "./usesend.js";
71
71
  export { valkeyDefinition } from "./valkey.js";
72
72
  export { watchtowerDefinition } from "./watchtower.js";
73
73
  export { weaviateDefinition } from "./weaviate.js";
@@ -84,10 +84,10 @@ import { calComDefinition } from "./cal-com.js";
84
84
  import { chromadbDefinition } from "./chromadb.js";
85
85
  import { claudeCodeDefinition } from "./claude-code.js";
86
86
  import { codeServerDefinition } from "./code-server.js";
87
+ import { codexDefinition } from "./codex.js";
87
88
  import { comfyuiDefinition } from "./comfyui.js";
88
89
  import { convexDefinition } from "./convex.js";
89
90
  import { convexDashboardDefinition } from "./convex-dashboard.js";
90
- import { codexDefinition } from "./codex.js";
91
91
  import { coolifyDefinition } from "./coolify.js";
92
92
  import { desktopEnvironmentDefinition } from "./desktop-environment.js";
93
93
  import { difyDefinition } from "./dify.js";
@@ -112,8 +112,8 @@ import { matomoDefinition } from "./matomo.js";
112
112
  import { matrixSynapseDefinition } from "./matrix-synapse.js";
113
113
  import { mattermostDefinition } from "./mattermost.js";
114
114
  import { meilisearchDefinition } from "./meilisearch.js";
115
- import { missionControlDefinition } from "./mission-control.js";
116
115
  import { minioDefinition } from "./minio.js";
116
+ import { missionControlDefinition } from "./mission-control.js";
117
117
  import { mixpostDefinition } from "./mixpost.js";
118
118
  import { motionCanvasDefinition } from "./motion-canvas.js";
119
119
  import { n8nDefinition } from "./n8n.js";
@@ -143,8 +143,8 @@ import { tailscaleDefinition } from "./tailscale.js";
143
143
  import { temporalDefinition } from "./temporal.js";
144
144
  import { traefikDefinition } from "./traefik.js";
145
145
  import { umamiDefinition } from "./umami.js";
146
- import { usesendDefinition } from "./usesend.js";
147
146
  import { uptimeKumaDefinition } from "./uptime-kuma.js";
147
+ import { usesendDefinition } from "./usesend.js";
148
148
  import { valkeyDefinition } from "./valkey.js";
149
149
  import { watchtowerDefinition } from "./watchtower.js";
150
150
  import { weaviateDefinition } from "./weaviate.js";
@@ -32,8 +32,7 @@ export const missionControlDefinition: ServiceDefinition = {
32
32
  key: "CONVEX_SELF_HOSTED_URL",
33
33
  defaultValue: "http://convex:3210",
34
34
  secret: false,
35
- description:
36
- "Internal Docker URL for pushing Convex functions during build",
35
+ description: "Internal Docker URL for pushing Convex functions during build",
37
36
  required: true,
38
37
  },
39
38
  {
@@ -52,8 +51,7 @@ export const missionControlDefinition: ServiceDefinition = {
52
51
  skills: [],
53
52
  openclawEnvVars: [],
54
53
 
55
- docsUrl:
56
- "https://github.com/bidewio/better-openclaw/tree/main/packages/mission-control",
54
+ docsUrl: "https://github.com/bidewio/better-openclaw/tree/main/packages/mission-control",
57
55
  selfHostedDocsUrl:
58
56
  "https://github.com/bidewio/better-openclaw/tree/main/packages/mission-control",
59
57
  tags: ["openclaw", "dashboard", "monitoring", "agents", "analytics", "convex"],
@@ -50,8 +50,7 @@ export const streamGatewayDefinition: ServiceDefinition = {
50
50
  key: "TIKTOK_STREAM_URL",
51
51
  defaultValue: "",
52
52
  secret: true,
53
- description:
54
- "Full TikTok RTMP URL from TikTok Studio (leave empty to skip TikTok relay)",
53
+ description: "Full TikTok RTMP URL from TikTok Studio (leave empty to skip TikTok relay)",
55
54
  required: false,
56
55
  },
57
56
  {