@better-openclaw/core 1.0.24 → 1.0.25

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 (170) hide show
  1. package/dist/addon-stack.cjs +673 -0
  2. package/dist/addon-stack.cjs.map +1 -0
  3. package/dist/addon-stack.d.cts +23 -0
  4. package/dist/addon-stack.d.cts.map +1 -0
  5. package/dist/addon-stack.d.mts +23 -0
  6. package/dist/addon-stack.d.mts.map +1 -0
  7. package/dist/addon-stack.mjs +671 -0
  8. package/dist/addon-stack.mjs.map +1 -0
  9. package/dist/addon-stack.test.cjs +349 -0
  10. package/dist/addon-stack.test.cjs.map +1 -0
  11. package/dist/addon-stack.test.d.cts +1 -0
  12. package/dist/addon-stack.test.d.mts +1 -0
  13. package/dist/addon-stack.test.mjs +349 -0
  14. package/dist/addon-stack.test.mjs.map +1 -0
  15. package/dist/bare-metal-partition.test.cjs +20 -20
  16. package/dist/bare-metal-partition.test.cjs.map +1 -1
  17. package/dist/bare-metal-partition.test.mjs +2 -2
  18. package/dist/composer.cjs +4 -0
  19. package/dist/composer.cjs.map +1 -1
  20. package/dist/composer.d.cts +24 -1
  21. package/dist/composer.d.cts.map +1 -1
  22. package/dist/composer.d.mts +24 -1
  23. package/dist/composer.d.mts.map +1 -1
  24. package/dist/composer.mjs +1 -1
  25. package/dist/composer.mjs.map +1 -1
  26. package/dist/composer.snapshot.test.cjs +20 -20
  27. package/dist/composer.snapshot.test.cjs.map +1 -1
  28. package/dist/composer.snapshot.test.mjs +2 -2
  29. package/dist/composer.test.cjs +53 -53
  30. package/dist/composer.test.cjs.map +1 -1
  31. package/dist/composer.test.mjs +2 -2
  32. package/dist/deployers/strip-host-ports.test.cjs +26 -26
  33. package/dist/deployers/strip-host-ports.test.cjs.map +1 -1
  34. package/dist/deployers/strip-host-ports.test.mjs +1 -1
  35. package/dist/generate.cjs +2 -2
  36. package/dist/generate.mjs +3 -3
  37. package/dist/generate.test.cjs +55 -55
  38. package/dist/generate.test.cjs.map +1 -1
  39. package/dist/generate.test.mjs +1 -1
  40. package/dist/generators/bare-metal-install.test.cjs +18 -18
  41. package/dist/generators/bare-metal-install.test.cjs.map +1 -1
  42. package/dist/generators/bare-metal-install.test.mjs +1 -1
  43. package/dist/generators/caddy.test.cjs +13 -13
  44. package/dist/generators/caddy.test.cjs.map +1 -1
  45. package/dist/generators/caddy.test.mjs +1 -1
  46. package/dist/generators/clone-repos.test.cjs +27 -27
  47. package/dist/generators/clone-repos.test.cjs.map +1 -1
  48. package/dist/generators/clone-repos.test.mjs +1 -1
  49. package/dist/generators/env.test.cjs +17 -17
  50. package/dist/generators/env.test.cjs.map +1 -1
  51. package/dist/generators/env.test.mjs +1 -1
  52. package/dist/generators/health-check.test.cjs +39 -39
  53. package/dist/generators/health-check.test.cjs.map +1 -1
  54. package/dist/generators/health-check.test.mjs +1 -1
  55. package/dist/generators/scripts.test.cjs +39 -39
  56. package/dist/generators/scripts.test.cjs.map +1 -1
  57. package/dist/generators/scripts.test.mjs +1 -1
  58. package/dist/generators/traefik.test.cjs +32 -32
  59. package/dist/generators/traefik.test.cjs.map +1 -1
  60. package/dist/generators/traefik.test.mjs +1 -1
  61. package/dist/index.cjs +20 -4
  62. package/dist/index.d.cts +5 -4
  63. package/dist/index.d.mts +5 -4
  64. package/dist/index.mjs +7 -6
  65. package/dist/migrations.test.cjs +16 -16
  66. package/dist/migrations.test.cjs.map +1 -1
  67. package/dist/migrations.test.mjs +1 -1
  68. package/dist/presets/registry.test.cjs +14 -14
  69. package/dist/presets/registry.test.cjs.map +1 -1
  70. package/dist/presets/registry.test.mjs +1 -1
  71. package/dist/resolver.test.cjs +95 -95
  72. package/dist/resolver.test.cjs.map +1 -1
  73. package/dist/resolver.test.mjs +1 -1
  74. package/dist/{schema-eX44HhRp.d.mts → schema-CKBRu-Rt.d.cts} +295 -2
  75. package/dist/schema-CKBRu-Rt.d.cts.map +1 -0
  76. package/dist/{schema-tn5RK8CM.d.cts → schema-Dn-_Jpb6.d.mts} +295 -2
  77. package/dist/schema-Dn-_Jpb6.d.mts.map +1 -0
  78. package/dist/schema.cjs +138 -1
  79. package/dist/schema.cjs.map +1 -1
  80. package/dist/schema.d.cts +2 -2
  81. package/dist/schema.d.mts +2 -2
  82. package/dist/schema.mjs +130 -2
  83. package/dist/schema.mjs.map +1 -1
  84. package/dist/schema.test.cjs +86 -86
  85. package/dist/schema.test.cjs.map +1 -1
  86. package/dist/schema.test.mjs +1 -1
  87. package/dist/services/definitions/browserless.cjs +4 -1
  88. package/dist/services/definitions/browserless.cjs.map +1 -1
  89. package/dist/services/definitions/browserless.mjs +4 -1
  90. package/dist/services/definitions/browserless.mjs.map +1 -1
  91. package/dist/services/definitions/convex.cjs +43 -1
  92. package/dist/services/definitions/convex.cjs.map +1 -1
  93. package/dist/services/definitions/convex.mjs +43 -1
  94. package/dist/services/definitions/convex.mjs.map +1 -1
  95. package/dist/services/definitions/grafana.cjs +11 -1
  96. package/dist/services/definitions/grafana.cjs.map +1 -1
  97. package/dist/services/definitions/grafana.mjs +11 -1
  98. package/dist/services/definitions/grafana.mjs.map +1 -1
  99. package/dist/services/definitions/meilisearch.cjs +11 -1
  100. package/dist/services/definitions/meilisearch.cjs.map +1 -1
  101. package/dist/services/definitions/meilisearch.mjs +11 -1
  102. package/dist/services/definitions/meilisearch.mjs.map +1 -1
  103. package/dist/services/definitions/minio.cjs +3 -1
  104. package/dist/services/definitions/minio.cjs.map +1 -1
  105. package/dist/services/definitions/minio.mjs +3 -1
  106. package/dist/services/definitions/minio.mjs.map +1 -1
  107. package/dist/services/definitions/n8n.cjs +11 -1
  108. package/dist/services/definitions/n8n.cjs.map +1 -1
  109. package/dist/services/definitions/n8n.mjs +11 -1
  110. package/dist/services/definitions/n8n.mjs.map +1 -1
  111. package/dist/services/definitions/ollama.cjs +3 -1
  112. package/dist/services/definitions/ollama.cjs.map +1 -1
  113. package/dist/services/definitions/ollama.mjs +3 -1
  114. package/dist/services/definitions/ollama.mjs.map +1 -1
  115. package/dist/services/definitions/qdrant.cjs +3 -1
  116. package/dist/services/definitions/qdrant.cjs.map +1 -1
  117. package/dist/services/definitions/qdrant.mjs +3 -1
  118. package/dist/services/definitions/qdrant.mjs.map +1 -1
  119. package/dist/services/definitions/searxng.cjs +8 -1
  120. package/dist/services/definitions/searxng.cjs.map +1 -1
  121. package/dist/services/definitions/searxng.mjs +8 -1
  122. package/dist/services/definitions/searxng.mjs.map +1 -1
  123. package/dist/services/definitions/uptime-kuma.cjs +8 -1
  124. package/dist/services/definitions/uptime-kuma.cjs.map +1 -1
  125. package/dist/services/definitions/uptime-kuma.mjs +8 -1
  126. package/dist/services/definitions/uptime-kuma.mjs.map +1 -1
  127. package/dist/services/registry.test.cjs +36 -36
  128. package/dist/services/registry.test.cjs.map +1 -1
  129. package/dist/services/registry.test.mjs +1 -1
  130. package/dist/{vi.2VT5v0um-C_jmO7m2.mjs → test.CTcmp4Su-ClCHJ3FA.mjs} +6793 -6403
  131. package/dist/test.CTcmp4Su-ClCHJ3FA.mjs.map +1 -0
  132. package/dist/{vi.2VT5v0um-iVBt6Fyq.cjs → test.CTcmp4Su-DlzTarwH.cjs} +6793 -6403
  133. package/dist/test.CTcmp4Su-DlzTarwH.cjs.map +1 -0
  134. package/dist/track-analytics.test.cjs +28 -28
  135. package/dist/track-analytics.test.cjs.map +1 -1
  136. package/dist/track-analytics.test.mjs +1 -1
  137. package/dist/types.cjs.map +1 -1
  138. package/dist/types.d.cts +10 -2
  139. package/dist/types.d.cts.map +1 -1
  140. package/dist/types.d.mts +10 -2
  141. package/dist/types.d.mts.map +1 -1
  142. package/dist/types.mjs.map +1 -1
  143. package/dist/validator.test.cjs +15 -15
  144. package/dist/validator.test.cjs.map +1 -1
  145. package/dist/validator.test.mjs +2 -2
  146. package/dist/version-manager.test.cjs +37 -37
  147. package/dist/version-manager.test.cjs.map +1 -1
  148. package/dist/version-manager.test.mjs +1 -1
  149. package/package.json +4 -4
  150. package/src/__snapshots__/composer.snapshot.test.ts.snap +5 -0
  151. package/src/addon-stack.test.ts +490 -0
  152. package/src/addon-stack.ts +998 -0
  153. package/src/composer.ts +4 -4
  154. package/src/index.ts +20 -2
  155. package/src/schema.ts +183 -0
  156. package/src/services/definitions/browserless.ts +3 -0
  157. package/src/services/definitions/convex.ts +31 -0
  158. package/src/services/definitions/grafana.ts +9 -0
  159. package/src/services/definitions/meilisearch.ts +9 -0
  160. package/src/services/definitions/minio.ts +2 -0
  161. package/src/services/definitions/n8n.ts +9 -0
  162. package/src/services/definitions/ollama.ts +2 -0
  163. package/src/services/definitions/qdrant.ts +2 -0
  164. package/src/services/definitions/searxng.ts +3 -0
  165. package/src/services/definitions/uptime-kuma.ts +3 -0
  166. package/src/types.ts +18 -0
  167. package/dist/schema-eX44HhRp.d.mts.map +0 -1
  168. package/dist/schema-tn5RK8CM.d.cts.map +0 -1
  169. package/dist/vi.2VT5v0um-C_jmO7m2.mjs.map +0 -1
  170. package/dist/vi.2VT5v0um-iVBt6Fyq.cjs.map +0 -1
package/src/composer.ts CHANGED
@@ -23,7 +23,7 @@ function getOpenclawImage(variant: OpenclawImageVariant, version: string): strin
23
23
  }
24
24
 
25
25
  /** Creates a YAML scalar that is always quoted — avoids YAML 1.1 bare `no` → false. */
26
- function quotedStr(value: string): Scalar {
26
+ export function quotedStr(value: string): Scalar {
27
27
  const s = new Scalar(value);
28
28
  s.type = Scalar.QUOTE_DOUBLE;
29
29
  return s;
@@ -53,7 +53,7 @@ const CATEGORY_PROFILE_MAP: Partial<Record<ServiceCategory, { file: string; prof
53
53
  "saas-boilerplate": { file: "docker-compose.saas.yml", profile: "saas" },
54
54
  };
55
55
 
56
- const YAML_OPTIONS = { lineWidth: 120, nullStr: "" };
56
+ export const YAML_OPTIONS = { lineWidth: 120, nullStr: "" };
57
57
 
58
58
  // ── Shared Gateway Builder ──────────────────────────────────────────────────
59
59
 
@@ -222,7 +222,7 @@ function buildGatewayServices(
222
222
 
223
223
  // ── Shared Companion Service Builder ────────────────────────────────────────
224
224
 
225
- function buildCompanionService(
225
+ export function buildCompanionService(
226
226
  def: ResolverOutput["services"][number]["definition"],
227
227
  resolved: ResolverOutput,
228
228
  options: ComposeOptions,
@@ -445,7 +445,7 @@ function buildCompanionService(
445
445
  *
446
446
  * Returns null when no setup is needed (no PostgreSQL or no DB requirements).
447
447
  */
448
- function buildPostgresSetup(resolved: ResolverOutput): Record<string, unknown> | null {
448
+ export function buildPostgresSetup(resolved: ResolverOutput): Record<string, unknown> | null {
449
449
  const hasPostgres = resolved.services.some((s) => s.definition.id === "postgresql");
450
450
  if (!hasPostgres) return null;
451
451
 
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
- // ─── Schemas ────────────────────────────────────────────────────────────────
1
+ // ─── Addon Stack (Clawexa) ──────────────────────────────────────────────────
2
+ export { generateAddonStack, updateAddonStack } from "./addon-stack.js";
2
3
 
3
4
  // ─── Core Engines ───────────────────────────────────────────────────────────
4
5
  export {
@@ -7,7 +8,7 @@ export {
7
8
  resolvedWithOnlyServices,
8
9
  } from "./bare-metal-partition.js";
9
10
  export type { ComposeResult } from "./composer.js";
10
- export { compose, composeMultiFile } from "./composer.js";
11
+ export { buildCompanionService, buildPostgresSetup, compose, composeMultiFile, quotedStr, YAML_OPTIONS } from "./composer.js";
11
12
  // ─── PaaS Deployers ─────────────────────────────────────────────────────────
12
13
  export type {
13
14
  DeployInput as PaasDeployInput,
@@ -71,6 +72,10 @@ export {
71
72
  } from "./presets/registry.js";
72
73
  export { resolve } from "./resolver.js";
73
74
  export {
75
+ AddonStackInputSchema,
76
+ AddonStackResultSchema,
77
+ AddonStackUpdateInputSchema,
78
+ AddonStackUpdateResultSchema,
74
79
  AddedDependencySchema,
75
80
  ApiErrorSchema,
76
81
  BuildContextSchema,
@@ -79,6 +84,8 @@ export {
79
84
  DeploymentTypeSchema,
80
85
  DeploySchema,
81
86
  DeployTargetSchema,
87
+ EnvQuirkFixSchema,
88
+ EnvQuirkSchema,
82
89
  EnvVariableSchema,
83
90
  ErrorSchema,
84
91
  GenerationInputSchema,
@@ -93,6 +100,7 @@ export {
93
100
  PlatformSchema,
94
101
  PortMappingSchema,
95
102
  PresetSchema,
103
+ ProxyRouteSchema,
96
104
  ProxyTypeSchema,
97
105
  ResolvedServiceSchema,
98
106
  ResolverOutputSchema,
@@ -102,6 +110,8 @@ export {
102
110
  ServiceDefinitionSchema,
103
111
  SkillBindingSchema,
104
112
  SkillPackSchema,
113
+ SkippedServiceReasonSchema,
114
+ SkippedServiceSchema,
105
115
  ValidateRequestSchema,
106
116
  ValidateResponseSchema,
107
117
  VolumeMappingSchema,
@@ -130,6 +140,10 @@ export {
130
140
  } from "./skills/skill-manifest.js";
131
141
  // ─── Types ──────────────────────────────────────────────────────────────────
132
142
  export type {
143
+ AddonStackInput,
144
+ AddonStackResult,
145
+ AddonStackUpdateInput,
146
+ AddonStackUpdateResult,
133
147
  AddedDependency,
134
148
  AiProvider,
135
149
  ApiError,
@@ -140,6 +154,8 @@ export type {
140
154
  DeploymentTarget,
141
155
  DeploymentType,
142
156
  DeployTarget,
157
+ EnvQuirk,
158
+ EnvQuirkFix,
143
159
  EnvVariable,
144
160
  GeneratedFiles,
145
161
  GenerationInput,
@@ -157,6 +173,7 @@ export type {
157
173
  Platform,
158
174
  PortMapping,
159
175
  Preset,
176
+ ProxyRoute,
160
177
  ProxyType,
161
178
  ResolvedService,
162
179
  ResolverError,
@@ -168,6 +185,7 @@ export type {
168
185
  ServiceDefinition,
169
186
  SkillBinding,
170
187
  SkillPack,
188
+ SkippedService,
171
189
  ValidateRequest,
172
190
  ValidateResponse,
173
191
  VolumeMapping,
package/src/schema.ts CHANGED
@@ -178,6 +178,24 @@ export const BuildContextSchema = z.object({
178
178
  target: z.string().optional(),
179
179
  });
180
180
 
181
+ // ─── Env Quirks (for addon stack generation) ────────────────────────────────
182
+
183
+ export const EnvQuirkFixSchema = z.object({
184
+ type: z.enum(["set_value", "generate_hex", "generate_base64url", "sync_with"]),
185
+ /** Fixed value to set (for set_value type). */
186
+ value: z.string().optional(),
187
+ /** Minimum bytes for generated secrets (for generate_hex/generate_base64url). */
188
+ minBytes: z.number().int().min(1).optional(),
189
+ /** Key to synchronize with (for sync_with type). */
190
+ syncKey: z.string().optional(),
191
+ });
192
+
193
+ export const EnvQuirkSchema = z.object({
194
+ key: z.string(),
195
+ issue: z.enum(["empty_string_crashes", "min_length", "must_sync"]),
196
+ fix: EnvQuirkFixSchema,
197
+ });
198
+
181
199
  // ─── Service Definition ─────────────────────────────────────────────────────
182
200
 
183
201
  export const ServiceDefinitionSchema = z.object({
@@ -236,6 +254,18 @@ export const ServiceDefinitionSchema = z.object({
236
254
  // Bare-metal native (install/run on host when no Docker)
237
255
  nativeSupported: z.boolean().optional(),
238
256
  nativeRecipes: z.array(NativeRecipeSchema).optional(),
257
+
258
+ // Clawexa addon metadata
259
+ /** Whether the service works with cap_drop: ALL (default: undefined = not audited). */
260
+ capDropCompatible: z.boolean().optional(),
261
+ /** Pre-built Docker image for cloud-init deployment (replaces build: directives). */
262
+ prebuiltImage: z.string().optional(),
263
+ /** Default reverse proxy path (e.g. "/n8n", "/grafana"). */
264
+ proxyPath: z.string().optional(),
265
+ /** Linux capabilities needed at first boot (e.g. ["CHOWN", "SETGID"]). */
266
+ firstBootCapabilities: z.array(z.string()).optional(),
267
+ /** Known environment variable quirks that need special handling. */
268
+ envQuirks: z.array(EnvQuirkSchema).optional(),
239
269
  });
240
270
 
241
271
  // ─── Skill Pack ─────────────────────────────────────────────────────────────
@@ -364,6 +394,159 @@ export const ComposeOptionsSchema = z.object({
364
394
  openclawInstallMethod: OpenclawInstallMethodSchema.default("docker"),
365
395
  });
366
396
 
397
+ // ─── Addon Stack (Clawexa) ───────────────────────────────────────────────────
398
+
399
+ export const SkippedServiceReasonSchema = z.enum([
400
+ "missing_credentials",
401
+ "no_image",
402
+ "platform_unsupported",
403
+ "conflict",
404
+ "gpu_required",
405
+ "unknown_service",
406
+ "resolution_error",
407
+ ]);
408
+
409
+ export const SkippedServiceSchema = z.object({
410
+ serviceId: z.string(),
411
+ reason: SkippedServiceReasonSchema,
412
+ details: z.string(),
413
+ requiredCredentials: z.array(z.string()).optional(),
414
+ });
415
+
416
+ export const ProxyRouteSchema = z.object({
417
+ serviceId: z.string(),
418
+ path: z.string(),
419
+ port: z.number().int(),
420
+ protocol: z.enum(["http", "https", "ws"]).default("http"),
421
+ stripPrefix: z.boolean().default(true),
422
+ });
423
+
424
+ export const AddonStackInputSchema = z.object({
425
+ /** Instance identifier (used for project name sanitization). */
426
+ instanceId: z.string().min(1),
427
+ /** Addon service IDs to deploy. */
428
+ services: z.array(z.string()),
429
+ /** Optional skill packs. */
430
+ skillPacks: z.array(z.string()).default([]),
431
+ /** Platform architecture. */
432
+ platform: PlatformSchema.default("linux/amd64"),
433
+ /** OpenClaw version running on the instance. */
434
+ openclawVersion: z.string().default("latest"),
435
+ /** Services already running on the instance (to detect conflicts). */
436
+ existingServices: z.array(z.string()).default([]),
437
+ /** Ports already in use on the host. */
438
+ reservedPorts: z.array(z.number().int()).default([]),
439
+ /** Whether to generate secrets (default: true). */
440
+ generateSecrets: z.boolean().default(true),
441
+ /** User-provided credentials for services that need them. */
442
+ credentials: z.record(z.string(), z.record(z.string(), z.string())).default({}),
443
+ /** Port overrides for specific services. */
444
+ portOverrides: z.record(z.string(), z.record(z.string(), z.number().int().min(1).max(65535))).optional(),
445
+ /** Whether the host has GPU support. */
446
+ gpu: z.boolean().default(false),
447
+ /** AI providers configured on this instance. */
448
+ aiProviders: z.array(AiProviderSchema).default([]),
449
+ /** Pre-built image overrides (serviceId → image:tag). */
450
+ prebuiltImages: z.record(z.string(), z.string()).default({}),
451
+ });
452
+
453
+ export const AddonStackResultSchema = z.object({
454
+ /** Single docker-compose.override.yml content. */
455
+ composeOverride: z.string(),
456
+ /** Complete .env file with all secrets generated. */
457
+ envFile: z.string(),
458
+ /** Structured env vars for UI display / credential management. */
459
+ envVars: z.array(z.object({
460
+ serviceName: z.string(),
461
+ vars: z.array(z.object({
462
+ key: z.string(),
463
+ description: z.string(),
464
+ value: z.string(),
465
+ secret: z.boolean(),
466
+ })),
467
+ })),
468
+ /** SKILL.md files keyed by slug. */
469
+ skillFiles: z.record(z.string(), z.string()),
470
+ /** OpenClaw config additions (skills.entries to merge). */
471
+ openclawConfigPatch: z.object({
472
+ skills: z.object({
473
+ entries: z.record(z.string(), z.object({ enabled: z.boolean() })),
474
+ }),
475
+ }),
476
+ /** Port mapping for reverse proxy configuration. */
477
+ proxyRoutes: z.array(ProxyRouteSchema),
478
+ /** Metadata. */
479
+ metadata: z.object({
480
+ serviceCount: z.number(),
481
+ skillCount: z.number(),
482
+ estimatedMemoryMB: z.number(),
483
+ resolvedServices: z.array(z.string()),
484
+ skippedServices: z.array(SkippedServiceSchema),
485
+ generatedSecretKeys: z.array(z.string()),
486
+ portAssignments: z.record(z.string(), z.number()),
487
+ }),
488
+ /** Warnings (non-fatal issues). */
489
+ warnings: z.array(z.string()),
490
+ });
491
+
492
+ export const AddonStackUpdateInputSchema = z.object({
493
+ instanceId: z.string().min(1),
494
+ /** Current compose override YAML (from the running instance). */
495
+ currentCompose: z.string(),
496
+ /** Current .env content. */
497
+ currentEnv: z.string(),
498
+ /** Services to add. */
499
+ addServices: z.array(z.string()).default([]),
500
+ /** Services to remove. */
501
+ removeServices: z.array(z.string()).default([]),
502
+ /** Whether to generate secrets for newly added services (default: true). */
503
+ generateSecrets: z.boolean().default(true),
504
+ /** User-provided credentials for new services. */
505
+ credentials: z.record(z.string(), z.record(z.string(), z.string())).default({}),
506
+ /** Port overrides for specific services. */
507
+ portOverrides: z.record(z.string(), z.record(z.string(), z.number().int().min(1).max(65535))).optional(),
508
+ /** Reserved ports. */
509
+ reservedPorts: z.array(z.number().int()).default([]),
510
+ platform: PlatformSchema.default("linux/amd64"),
511
+ openclawVersion: z.string().default("latest"),
512
+ aiProviders: z.array(AiProviderSchema).default([]),
513
+ prebuiltImages: z.record(z.string(), z.string()).default({}),
514
+ });
515
+
516
+ export const AddonStackUpdateResultSchema = z.object({
517
+ /** Updated compose override (merged with existing). */
518
+ composeOverride: z.string(),
519
+ /** Updated .env (existing values preserved, new ones added). */
520
+ envFile: z.string(),
521
+ /** Only NEW skill files to deploy. */
522
+ newSkillFiles: z.record(z.string(), z.string()),
523
+ /** Skill slugs to remove from openclaw.json. */
524
+ removedSkillSlugs: z.array(z.string()),
525
+ /** Config patch to apply. */
526
+ openclawConfigPatch: z.object({
527
+ skills: z.object({
528
+ add: z.record(z.string(), z.object({ enabled: z.boolean() })),
529
+ remove: z.array(z.string()),
530
+ }),
531
+ }),
532
+ /** New proxy routes to add. */
533
+ addProxyRoutes: z.array(ProxyRouteSchema),
534
+ /** Proxy routes to remove (service IDs). */
535
+ removeProxyRoutes: z.array(z.string()),
536
+ /** Services that need their images pulled. */
537
+ imagesToPull: z.array(z.string()),
538
+ /** Services to restart (due to dependency changes). */
539
+ restartRequired: z.array(z.string()),
540
+ /** Metadata. */
541
+ metadata: z.object({
542
+ added: z.array(z.string()),
543
+ removed: z.array(z.string()),
544
+ unchanged: z.array(z.string()),
545
+ estimatedMemoryDelta: z.number(),
546
+ }),
547
+ warnings: z.array(z.string()),
548
+ });
549
+
367
550
  // ─── API Request/Response ───────────────────────────────────────────────────
368
551
 
369
552
  export const ValidateRequestSchema = z.object({
@@ -81,4 +81,7 @@ export const browserlessDefinition: ServiceDefinition = {
81
81
 
82
82
  minMemoryMB: 512,
83
83
  gpuRequired: false,
84
+ capDropCompatible: false,
85
+ proxyPath: "/browserless",
86
+ firstBootCapabilities: ["SYS_ADMIN"],
84
87
  };
@@ -89,6 +89,14 @@ export const convexDefinition: ServiceDefinition = {
89
89
  "Admin key for CLI access. Generate with: docker compose exec convex ./generate_admin_key.sh",
90
90
  required: false,
91
91
  },
92
+ {
93
+ key: "CONVEX_INSTANCE_SECRET",
94
+ defaultValue: "${INSTANCE_SECRET}",
95
+ secret: true,
96
+ description:
97
+ "Convex instance secret used by Mission Control (synced with INSTANCE_SECRET)",
98
+ required: false,
99
+ },
92
100
  ],
93
101
  healthcheck: {
94
102
  test: "curl -f http://localhost:3210/version",
@@ -118,4 +126,27 @@ export const convexDefinition: ServiceDefinition = {
118
126
 
119
127
  minMemoryMB: 256,
120
128
  gpuRequired: false,
129
+ capDropCompatible: false,
130
+ envQuirks: [
131
+ {
132
+ key: "DISABLE_BEACON",
133
+ issue: "empty_string_crashes" as const,
134
+ fix: { type: "set_value" as const, value: "true" },
135
+ },
136
+ {
137
+ key: "INSTANCE_SECRET",
138
+ issue: "min_length" as const,
139
+ fix: { type: "generate_hex" as const, minBytes: 32 },
140
+ },
141
+ {
142
+ key: "CONVEX_SELF_HOSTED_ADMIN_KEY",
143
+ issue: "min_length" as const,
144
+ fix: { type: "generate_hex" as const, minBytes: 32 },
145
+ },
146
+ {
147
+ key: "INSTANCE_SECRET",
148
+ issue: "must_sync" as const,
149
+ fix: { type: "sync_with" as const, syncKey: "CONVEX_INSTANCE_SECRET" },
150
+ },
151
+ ],
121
152
  };
@@ -80,4 +80,13 @@ export const grafanaDefinition: ServiceDefinition = {
80
80
 
81
81
  minMemoryMB: 256,
82
82
  gpuRequired: false,
83
+ capDropCompatible: true,
84
+ proxyPath: "/grafana",
85
+ envQuirks: [
86
+ {
87
+ key: "GF_SECURITY_ADMIN_PASSWORD",
88
+ issue: "min_length" as const,
89
+ fix: { type: "generate_base64url" as const, minBytes: 16 },
90
+ },
91
+ ],
83
92
  };
@@ -80,4 +80,13 @@ export const meilisearchDefinition: ServiceDefinition = {
80
80
 
81
81
  minMemoryMB: 256,
82
82
  gpuRequired: false,
83
+ capDropCompatible: true,
84
+ proxyPath: "/meilisearch",
85
+ envQuirks: [
86
+ {
87
+ key: "MEILI_MASTER_KEY",
88
+ issue: "min_length" as const,
89
+ fix: { type: "generate_base64url" as const, minBytes: 24 },
90
+ },
91
+ ],
83
92
  };
@@ -102,4 +102,6 @@ export const minioDefinition: ServiceDefinition = {
102
102
 
103
103
  minMemoryMB: 256,
104
104
  gpuRequired: false,
105
+ capDropCompatible: true,
106
+ proxyPath: "/minio",
105
107
  };
@@ -150,4 +150,13 @@ export const n8nDefinition: ServiceDefinition = {
150
150
 
151
151
  minMemoryMB: 512,
152
152
  gpuRequired: false,
153
+ capDropCompatible: true,
154
+ proxyPath: "/n8n",
155
+ envQuirks: [
156
+ {
157
+ key: "DB_POSTGRESDB_PASSWORD",
158
+ issue: "must_sync" as const,
159
+ fix: { type: "sync_with" as const, syncKey: "N8N_DB_PASSWORD" },
160
+ },
161
+ ],
153
162
  };
@@ -65,4 +65,6 @@ export const ollamaDefinition: ServiceDefinition = {
65
65
 
66
66
  minMemoryMB: 2048,
67
67
  gpuRequired: false,
68
+ capDropCompatible: false,
69
+ proxyPath: "/ollama",
68
70
  };
@@ -79,4 +79,6 @@ export const qdrantDefinition: ServiceDefinition = {
79
79
 
80
80
  minMemoryMB: 512,
81
81
  gpuRequired: false,
82
+ capDropCompatible: true,
83
+ proxyPath: "/qdrant",
82
84
  };
@@ -65,4 +65,7 @@ export const searxngDefinition: ServiceDefinition = {
65
65
 
66
66
  minMemoryMB: 256,
67
67
  gpuRequired: false,
68
+ capDropCompatible: false,
69
+ proxyPath: "/searxng",
70
+ firstBootCapabilities: ["CHOWN", "SETGID", "SETUID"],
68
71
  };
@@ -50,4 +50,7 @@ export const uptimeKumaDefinition: ServiceDefinition = {
50
50
 
51
51
  minMemoryMB: 256,
52
52
  gpuRequired: false,
53
+ capDropCompatible: false,
54
+ proxyPath: "/uptime-kuma",
55
+ firstBootCapabilities: ["CHOWN", "SETGID", "SETUID"],
53
56
  };
package/src/types.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import type { z } from "zod";
2
2
  import type {
3
+ AddonStackInputSchema,
4
+ AddonStackResultSchema,
5
+ AddonStackUpdateInputSchema,
6
+ AddonStackUpdateResultSchema,
3
7
  AddedDependencySchema,
4
8
  AiProviderSchema,
5
9
  ApiErrorSchema,
@@ -9,6 +13,8 @@ import type {
9
13
  DeploymentTypeSchema,
10
14
  DeploySchema,
11
15
  DeployTargetSchema,
16
+ EnvQuirkFixSchema,
17
+ EnvQuirkSchema,
12
18
  EnvVariableSchema,
13
19
  ErrorSchema,
14
20
  GenerationInputSchema,
@@ -24,6 +30,7 @@ import type {
24
30
  PlatformSchema,
25
31
  PortMappingSchema,
26
32
  PresetSchema,
33
+ ProxyRouteSchema,
27
34
  ProxyTypeSchema,
28
35
  ResolvedServiceSchema,
29
36
  ResolverOutputSchema,
@@ -33,6 +40,7 @@ import type {
33
40
  ServiceDefinitionSchema,
34
41
  SkillBindingSchema,
35
42
  SkillPackSchema,
43
+ SkippedServiceSchema,
36
44
  ValidateRequestSchema,
37
45
  ValidateResponseSchema,
38
46
  VolumeMappingSchema,
@@ -86,6 +94,16 @@ export type ValidateRequest = z.infer<typeof ValidateRequestSchema>;
86
94
  export type ValidateResponse = z.infer<typeof ValidateResponseSchema>;
87
95
  export type ApiError = z.infer<typeof ApiErrorSchema>;
88
96
 
97
+ // Addon Stack (Clawexa)
98
+ export type EnvQuirkFix = z.infer<typeof EnvQuirkFixSchema>;
99
+ export type EnvQuirk = z.infer<typeof EnvQuirkSchema>;
100
+ export type ProxyRoute = z.infer<typeof ProxyRouteSchema>;
101
+ export type SkippedService = z.infer<typeof SkippedServiceSchema>;
102
+ export type AddonStackInput = z.infer<typeof AddonStackInputSchema>;
103
+ export type AddonStackResult = z.infer<typeof AddonStackResultSchema>;
104
+ export type AddonStackUpdateInput = z.infer<typeof AddonStackUpdateInputSchema>;
105
+ export type AddonStackUpdateResult = z.infer<typeof AddonStackUpdateResultSchema>;
106
+
89
107
  // ─── Additional Types ───────────────────────────────────────────────────────
90
108
 
91
109
  export interface ResolverInput {
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-eX44HhRp.d.mts","names":[],"sources":["../src/schema.ts"],"mappings":";;;cAIa,qBAAA,EAAqB,CAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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