@happycastle/oh-my-openclaw 0.6.1 → 0.6.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.
@@ -17,8 +17,8 @@ type Logger = {
17
17
  };
18
18
  export declare function findConfigPath(workspaceDir?: string): string | undefined;
19
19
  /**
20
- * Lenient JSON5 parser: strips // and /* comments, removes trailing commas,
21
- * then delegates to JSON.parse.
20
+ * Parse OpenClaw config using JSON5 (matches OpenClaw's own parser).
21
+ * Handles comments, trailing commas, unquoted keys, multi-line strings, etc.
22
22
  */
23
23
  export declare function parseConfig(raw: string): ConfigShape;
24
24
  export declare function serializeConfig(config: ConfigShape): string;
package/dist/cli/setup.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
+ import JSON5 from 'json5';
3
4
  import { OMOC_AGENT_CONFIGS } from '../agents/agent-configs.js';
4
5
  const CONFIG_FILENAMES = [
5
6
  'openclaw.json5',
@@ -32,15 +33,11 @@ export function findConfigPath(workspaceDir) {
32
33
  return undefined;
33
34
  }
34
35
  /**
35
- * Lenient JSON5 parser: strips // and /* comments, removes trailing commas,
36
- * then delegates to JSON.parse.
36
+ * Parse OpenClaw config using JSON5 (matches OpenClaw's own parser).
37
+ * Handles comments, trailing commas, unquoted keys, multi-line strings, etc.
37
38
  */
38
39
  export function parseConfig(raw) {
39
- const stripped = raw
40
- .replace(/\/\/.*$/gm, '')
41
- .replace(/\/\*[\s\S]*?\*\//g, '')
42
- .replace(/,\s*([\]}])/g, '$1');
43
- return JSON.parse(stripped);
40
+ return JSON5.parse(raw);
44
41
  }
45
42
  export function serializeConfig(config) {
46
43
  return JSON.stringify(config, null, 2) + '\n';
@@ -2,7 +2,7 @@
2
2
  "id": "oh-my-openclaw",
3
3
  "name": "Oh-My-OpenClaw",
4
4
  "description": "Multi-agent orchestration plugin \u2014 11 agents, category-based model routing, todo enforcer, ralph loop, agent setup CLI, and custom tools",
5
- "version": "0.6.1",
5
+ "version": "0.6.2",
6
6
  "skills": ["skills"],
7
7
  "configSchema": {
8
8
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happycastle/oh-my-openclaw",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Oh-My-OpenClaw plugin — multi-agent orchestration, todo enforcer, ralph loop, and custom tools for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -49,7 +49,8 @@
49
49
  "license": "MIT",
50
50
  "author": "happycastle",
51
51
  "dependencies": {
52
- "@sinclair/typebox": "^0.34.0"
52
+ "@sinclair/typebox": "^0.34.0",
53
+ "json5": "^2.2.3"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@types/node": "^25.3.0",