@better-openclaw/core 1.0.11 → 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 (34) 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.test.mjs +1 -1
  5. package/dist/generators/bare-metal-install.test.mjs +1 -1
  6. package/dist/generators/caddy.test.mjs +1 -1
  7. package/dist/generators/env.test.mjs +1 -1
  8. package/dist/generators/health-check.mjs.map +1 -1
  9. package/dist/generators/health-check.test.mjs +1 -1
  10. package/dist/generators/scripts.test.mjs +1 -1
  11. package/dist/generators/traefik.test.mjs +1 -1
  12. package/dist/{magic-string.es-1uTtupLe.mjs → magic-string.es-CfFonO_S.mjs} +1 -1
  13. package/dist/{magic-string.es-1uTtupLe.mjs.map → magic-string.es-CfFonO_S.mjs.map} +1 -1
  14. package/dist/manifest-DSGl8ITO.mjs +1110 -0
  15. package/dist/manifest-DSGl8ITO.mjs.map +1 -0
  16. package/dist/migrations.d.mts.map +1 -1
  17. package/dist/migrations.mjs.map +1 -1
  18. package/dist/migrations.test.mjs +1 -1
  19. package/dist/presets/registry.test.mjs +1 -1
  20. package/dist/resolver.test.mjs +1 -1
  21. package/dist/schema.test.mjs +1 -1
  22. package/dist/services/registry.test.mjs +1 -1
  23. package/dist/skills/skill-manifest.d.mts.map +1 -1
  24. package/dist/skills/skill-manifest.mjs +5 -13
  25. package/dist/skills/skill-manifest.mjs.map +1 -1
  26. package/dist/validator.test.mjs +1 -1
  27. package/dist/version-manager.test.mjs +1 -1
  28. package/dist/{vi.2VT5v0um-YSByewHe.mjs → vi.2VT5v0um-BgmKutxR.mjs} +2 -2
  29. package/dist/{vi.2VT5v0um-YSByewHe.mjs.map → vi.2VT5v0um-BgmKutxR.mjs.map} +1 -1
  30. package/package.json +1 -1
  31. package/src/generators/health-check.ts +46 -8
  32. package/src/migrations.ts +0 -1
  33. package/src/skills/manifest.json +1333 -0
  34. package/src/skills/skill-manifest.ts +27 -22
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-DSGl8ITO.mjs","names":[],"sources":["../src/skills/manifest.json"],"sourcesContent":[""],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.mts","names":[],"sources":["../src/migrations.ts"],"mappings":";cACa,sBAAA;AAAb;;;;AAAA,iBAiBgB,aAAA,CAAc,KAAA,EAAO,MAAA,oBAA0B,MAAA;AAA/D;;;AAAA,iBAwBgB,cAAA,CAAe,KAAA,EAAO,MAAA"}
1
+ {"version":3,"file":"migrations.d.mts","names":[],"sources":["../src/migrations.ts"],"mappings":";cAAa,sBAAA;AAAb;;;;AAAA,iBAiBgB,aAAA,CAAc,KAAA,EAAO,MAAA,oBAA0B,MAAA;AAA/D;;;AAAA,iBAwBgB,cAAA,CAAe,KAAA,EAAO,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.mjs","names":[],"sources":["../src/migrations.ts"],"sourcesContent":["\nexport const CURRENT_CONFIG_VERSION = 2;\n\ntype MigrationFn = (input: Record<string, unknown>) => Record<string, unknown>;\n\nconst migrations: Record<number, MigrationFn> = {\n\t// v1 → v2: ensure deploymentType field exists (defaulting to \"docker\")\n\t1: (input) => ({\n\t\t...input,\n\t\tconfigVersion: 2,\n\t\tdeploymentType: (input.deploymentType as string) ?? \"docker\",\n\t}),\n};\n\n/**\n * Applies sequential migrations to bring a config from its current version\n * to CURRENT_CONFIG_VERSION. Returns the config unchanged if already current.\n */\nexport function migrateConfig(input: Record<string, unknown>): Record<string, unknown> {\n\tlet version = (input.configVersion as number) ?? 1;\n\n\tif (version > CURRENT_CONFIG_VERSION) {\n\t\tthrow new Error(`No migration path from config version ${version}`);\n\t}\n\n\tlet current = { ...input };\n\n\twhile (version < CURRENT_CONFIG_VERSION) {\n\t\tconst migrationFn = migrations[version];\n\t\tif (!migrationFn) {\n\t\t\tthrow new Error(`No migration path from config version ${version}`);\n\t\t}\n\t\tcurrent = migrationFn(current);\n\t\tversion++;\n\t}\n\n\treturn current;\n}\n\n/**\n * Returns true if the config needs migration to the current version.\n */\nexport function needsMigration(input: Record<string, unknown>): boolean {\n\tconst version = (input.configVersion as number) ?? 1;\n\treturn version < CURRENT_CONFIG_VERSION;\n}\n"],"mappings":";AACA,MAAa,yBAAyB;AAItC,MAAM,aAA0C,EAE/C,IAAI,WAAW;CACd,GAAG;CACH,eAAe;CACf,gBAAiB,MAAM,kBAA6B;CACpD,GACD;;;;;AAMD,SAAgB,cAAc,OAAyD;CACtF,IAAI,UAAW,MAAM,iBAA4B;AAEjD,KAAI,UAAU,uBACb,OAAM,IAAI,MAAM,yCAAyC,UAAU;CAGpE,IAAI,UAAU,EAAE,GAAG,OAAO;AAE1B,QAAO,UAAU,wBAAwB;EACxC,MAAM,cAAc,WAAW;AAC/B,MAAI,CAAC,YACJ,OAAM,IAAI,MAAM,yCAAyC,UAAU;AAEpE,YAAU,YAAY,QAAQ;AAC9B;;AAGD,QAAO;;;;;AAMR,SAAgB,eAAe,OAAyC;AAEvE,SADiB,MAAM,iBAA4B,KAClC"}
1
+ {"version":3,"file":"migrations.mjs","names":[],"sources":["../src/migrations.ts"],"sourcesContent":["export const CURRENT_CONFIG_VERSION = 2;\n\ntype MigrationFn = (input: Record<string, unknown>) => Record<string, unknown>;\n\nconst migrations: Record<number, MigrationFn> = {\n\t// v1 → v2: ensure deploymentType field exists (defaulting to \"docker\")\n\t1: (input) => ({\n\t\t...input,\n\t\tconfigVersion: 2,\n\t\tdeploymentType: (input.deploymentType as string) ?? \"docker\",\n\t}),\n};\n\n/**\n * Applies sequential migrations to bring a config from its current version\n * to CURRENT_CONFIG_VERSION. Returns the config unchanged if already current.\n */\nexport function migrateConfig(input: Record<string, unknown>): Record<string, unknown> {\n\tlet version = (input.configVersion as number) ?? 1;\n\n\tif (version > CURRENT_CONFIG_VERSION) {\n\t\tthrow new Error(`No migration path from config version ${version}`);\n\t}\n\n\tlet current = { ...input };\n\n\twhile (version < CURRENT_CONFIG_VERSION) {\n\t\tconst migrationFn = migrations[version];\n\t\tif (!migrationFn) {\n\t\t\tthrow new Error(`No migration path from config version ${version}`);\n\t\t}\n\t\tcurrent = migrationFn(current);\n\t\tversion++;\n\t}\n\n\treturn current;\n}\n\n/**\n * Returns true if the config needs migration to the current version.\n */\nexport function needsMigration(input: Record<string, unknown>): boolean {\n\tconst version = (input.configVersion as number) ?? 1;\n\treturn version < CURRENT_CONFIG_VERSION;\n}\n"],"mappings":";AAAA,MAAa,yBAAyB;AAItC,MAAM,aAA0C,EAE/C,IAAI,WAAW;CACd,GAAG;CACH,eAAe;CACf,gBAAiB,MAAM,kBAA6B;CACpD,GACD;;;;;AAMD,SAAgB,cAAc,OAAyD;CACtF,IAAI,UAAW,MAAM,iBAA4B;AAEjD,KAAI,UAAU,uBACb,OAAM,IAAI,MAAM,yCAAyC,UAAU;CAGpE,IAAI,UAAU,EAAE,GAAG,OAAO;AAE1B,QAAO,UAAU,wBAAwB;EACxC,MAAM,cAAc,WAAW;AAC/B,MAAI,CAAC,YACJ,OAAM,IAAI,MAAM,yCAAyC,UAAU;AAEpE,YAAU,YAAY,QAAQ;AAC9B;;AAGD,QAAO;;;;;AAMR,SAAgB,eAAe,OAAyC;AAEvE,SADiB,MAAM,iBAA4B,KAClC"}
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-YSByewHe.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-BgmKutxR.mjs";
2
2
  import { CURRENT_CONFIG_VERSION, migrateConfig, needsMigration } from "./migrations.mjs";
3
3
 
4
4
  //#region src/migrations.test.ts
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "../vi.2VT5v0um-YSByewHe.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "../vi.2VT5v0um-BgmKutxR.mjs";
2
2
  import { getAllPresets, getPresetById } from "./registry.mjs";
3
3
 
4
4
  //#region src/presets/registry.test.ts
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-YSByewHe.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-BgmKutxR.mjs";
2
2
  import { resolve } from "./resolver.mjs";
3
3
 
4
4
  //#region src/resolver.test.ts
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-YSByewHe.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-BgmKutxR.mjs";
2
2
  import { EnvVariableSchema, GenerationInputSchema, HealthCheckSchema, PortMappingSchema, PresetSchema, ServiceCategorySchema, ServiceDefinitionSchema, SkillPackSchema, VolumeMappingSchema } from "./schema.mjs";
3
3
 
4
4
  //#region src/schema.test.ts
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "../vi.2VT5v0um-YSByewHe.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "../vi.2VT5v0um-BgmKutxR.mjs";
2
2
  import { getAllServices, getServiceById, getServicesByCategory, getServicesByTag } from "./registry.mjs";
3
3
 
4
4
  //#region src/services/registry.test.ts
@@ -1 +1 @@
1
- {"version":3,"file":"skill-manifest.d.mts","names":[],"sources":["../../src/skills/skill-manifest.ts"],"mappings":";UAMiB,kBAAA;EAAA;EAEhB,EAAA;;EAEA,IAAA;EAFA;EAIA,KAAA;EAAA;EAEA,QAAA;AAAA;;iBAyBe,oBAAA,CAAA,GAAwB,kBAAA;;iBAKxB,oBAAA,CAAqB,EAAA,WAAa,kBAAA;;iBAKlC,qBAAA,CAAA"}
1
+ {"version":3,"file":"skill-manifest.d.mts","names":[],"sources":["../../src/skills/skill-manifest.ts"],"mappings":";UAQiB,kBAAA;EAAA;EAEhB,EAAA;;EAEA,IAAA;EAFA;EAIA,KAAA;EAAA;EAEA,QAAA;AAAA;;iBAyBe,oBAAA,CAAA,GAAwB,kBAAA;;iBAMxB,oBAAA,CAAqB,EAAA,WAAa,kBAAA;;iBAMlC,qBAAA,CAAA"}
@@ -1,26 +1,18 @@
1
- import { readFileSync } from "node:fs";
2
- import { dirname, resolve } from "node:path";
3
- import { fileURLToPath } from "node:url";
1
+ import { t as manifest_default } from "../manifest-DSGl8ITO.mjs";
4
2
 
5
3
  //#region src/skills/skill-manifest.ts
6
- let _cache = null;
7
- function loadManifest() {
8
- if (_cache) return _cache;
9
- const raw = readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../../../skills/manifest.json"), "utf-8");
10
- _cache = JSON.parse(raw).skills;
11
- return _cache;
12
- }
4
+ const manifestData = manifest_default;
13
5
  /** Return all skills defined in the local manifest.json */
14
6
  function getAllManifestSkills() {
15
- return loadManifest();
7
+ return manifestData.skills;
16
8
  }
17
9
  /** Look up a single skill by ID */
18
10
  function getManifestSkillById(id) {
19
- return loadManifest().find((s) => s.id === id);
11
+ return manifestData.skills.find((s) => s.id === id);
20
12
  }
21
13
  /** Return the total count of curated skills */
22
14
  function getManifestSkillCount() {
23
- return loadManifest().length;
15
+ return manifestData.skills.length;
24
16
  }
25
17
 
26
18
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"skill-manifest.mjs","names":[],"sources":["../../src/skills/skill-manifest.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n// ── Types ───────────────────────────────────────────────────────────────────\n\nexport interface SkillManifestEntry {\n\t/** Unique skill identifier, e.g. \"gsap-animate\" */\n\tid: string;\n\t/** Relative path to the SKILL.md file */\n\tpath: string;\n\t/** Display emoji */\n\temoji: string;\n\t/** Docker service IDs this skill depends on (empty for frontend-only skills) */\n\tservices: string[];\n}\n\ninterface SkillManifest {\n\tskills: SkillManifestEntry[];\n}\n\n// ── Manifest loader ─────────────────────────────────────────────────────────\n\nlet _cache: SkillManifestEntry[] | null = null;\n\nfunction loadManifest(): SkillManifestEntry[] {\n\tif (_cache) return _cache;\n\t// Resolve the manifest relative to this file's location\n\t// This file is at packages/core/src/skills/skill-manifest.ts\n\t// The manifest is at skills/manifest.json (repo root / skills /)\n\tconst thisDir = dirname(fileURLToPath(import.meta.url));\n\tconst manifestPath = resolve(thisDir, \"../../../../skills/manifest.json\");\n\tconst raw = readFileSync(manifestPath, \"utf-8\");\n\tconst data = JSON.parse(raw) as SkillManifest;\n\t_cache = data.skills;\n\treturn _cache;\n}\n\n/** Return all skills defined in the local manifest.json */\nexport function getAllManifestSkills(): SkillManifestEntry[] {\n\treturn loadManifest();\n}\n\n/** Look up a single skill by ID */\nexport function getManifestSkillById(id: string): SkillManifestEntry | undefined {\n\treturn loadManifest().find((s) => s.id === id);\n}\n\n/** Return the total count of curated skills */\nexport function getManifestSkillCount(): number {\n\treturn loadManifest().length;\n}\n"],"mappings":";;;;;AAuBA,IAAI,SAAsC;AAE1C,SAAS,eAAqC;AAC7C,KAAI,OAAQ,QAAO;CAMnB,MAAM,MAAM,aADS,QADL,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC,EACjB,mCAAmC,EAClC,QAAQ;AAE/C,UADa,KAAK,MAAM,IAAI,CACd;AACd,QAAO;;;AAIR,SAAgB,uBAA6C;AAC5D,QAAO,cAAc;;;AAItB,SAAgB,qBAAqB,IAA4C;AAChF,QAAO,cAAc,CAAC,MAAM,MAAM,EAAE,OAAO,GAAG;;;AAI/C,SAAgB,wBAAgC;AAC/C,QAAO,cAAc,CAAC"}
1
+ {"version":3,"file":"skill-manifest.mjs","names":["manifestJson"],"sources":["../../src/skills/skill-manifest.ts"],"sourcesContent":["// import { readFileSync } from \"node:fs\";\n// import { dirname, resolve } from \"node:path\";\n// import { fileURLToPath } from \"node:url\";\n//import manifestJson from \"../../../../skills/manifest.json\" with { type: \"json\" };\nimport manifestJson from \"./manifest.json\" with { type: \"json\" };\n\n// ── Types ───────────────────────────────────────────────────────────────────\n\nexport interface SkillManifestEntry {\n\t/** Unique skill identifier, e.g. \"gsap-animate\" */\n\tid: string;\n\t/** Relative path to the SKILL.md file */\n\tpath: string;\n\t/** Display emoji */\n\temoji: string;\n\t/** Docker service IDs this skill depends on (empty for frontend-only skills) */\n\tservices: string[];\n}\n\ninterface SkillManifest {\n\tskills: SkillManifestEntry[];\n}\n\nconst manifestData = manifestJson as SkillManifest;\n\n// ── Manifest loader ─────────────────────────────────────────────────────────\n// let _cache: SkillManifestEntry[] | null = null;\n\n// function loadManifest(): SkillManifestEntry[] {\n// \tif (_cache) return _cache;\n// \t// Resolve the manifest relative to this file's location\n// \t// This file is at packages/core/src/skills/skill-manifest.ts\n// \t// The manifest is at skills/manifest.json (repo root / skills /)\n// \tconst thisDir = dirname(fileURLToPath(import.meta.url));\n// \tconst manifestPath = resolve(thisDir, \"../../../../skills/manifest.json\");\n// \tconst raw = readFileSync(manifestPath, \"utf-8\");\n// \tconst data = JSON.parse(raw) as SkillManifest;\n// \t_cache = data.skills;\n// \treturn _cache;\n// }\n/** Return all skills defined in the local manifest.json */\nexport function getAllManifestSkills(): SkillManifestEntry[] {\n\treturn manifestData.skills;\n\t//return loadManifest();\n}\n\n/** Look up a single skill by ID */\nexport function getManifestSkillById(id: string): SkillManifestEntry | undefined {\n\treturn manifestData.skills.find((s) => s.id === id);\n\t//return loadManifest().find((s) => s.id === id);\n}\n\n/** Return the total count of curated skills */\nexport function getManifestSkillCount(): number {\n\treturn manifestData.skills.length;\n\t//return loadManifest().length;\n}\n"],"mappings":";;;AAuBA,MAAM,eAAeA;;AAkBrB,SAAgB,uBAA6C;AAC5D,QAAO,aAAa;;;AAKrB,SAAgB,qBAAqB,IAA4C;AAChF,QAAO,aAAa,OAAO,MAAM,MAAM,EAAE,OAAO,GAAG;;;AAKpD,SAAgB,wBAAgC;AAC/C,QAAO,aAAa,OAAO"}
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-YSByewHe.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-BgmKutxR.mjs";
2
2
  import { resolve } from "./resolver.mjs";
3
3
  import { compose } from "./composer.mjs";
4
4
  import { validate } from "./validator.mjs";
@@ -1,4 +1,4 @@
1
- import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-YSByewHe.mjs";
1
+ import { n as describe, r as it, t as globalExpect } from "./vi.2VT5v0um-BgmKutxR.mjs";
2
2
  import { getAllServices, getServiceById } from "./services/registry.mjs";
3
3
  import { resolve } from "./resolver.mjs";
4
4
  import { checkCompatibility, getImageReference, getImageTag, pinImageTags } from "./version-manager.mjs";
@@ -9644,7 +9644,7 @@ function offsetToLineNumber(source, offset) {
9644
9644
  return line + 1;
9645
9645
  }
9646
9646
  async function saveInlineSnapshots(environment, snapshots) {
9647
- const MagicString = (await import("./magic-string.es-1uTtupLe.mjs")).default;
9647
+ const MagicString = (await import("./magic-string.es-CfFonO_S.mjs")).default;
9648
9648
  const files = new Set(snapshots.map((i) => i.file));
9649
9649
  await Promise.all(Array.from(files).map(async (file) => {
9650
9650
  const snaps = snapshots.filter((i) => i.file === file);
@@ -12913,4 +12913,4 @@ function getImporter(name) {
12913
12913
 
12914
12914
  //#endregion
12915
12915
  export { describe as n, it as r, globalExpect as t };
12916
- //# sourceMappingURL=vi.2VT5v0um-YSByewHe.mjs.map
12916
+ //# sourceMappingURL=vi.2VT5v0um-BgmKutxR.mjs.map