@happycastle/oh-my-openclaw 0.6.0 → 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';
@@ -121,7 +118,7 @@ export function runSetup(options) {
121
118
  }
122
119
  export function registerSetupCli(ctx) {
123
120
  ctx.program
124
- .command('setup')
121
+ .command('omoc-setup')
125
122
  .description('Inject OmOC agent definitions into your OpenClaw config')
126
123
  .option('--force', 'Overwrite existing OmOC agent configs', false)
127
124
  .option('--dry-run', 'Preview changes without writing', false)
package/dist/cli.js CHANGED
@@ -180,7 +180,7 @@ function install(installDir) {
180
180
  console.log('Available commands:');
181
181
  console.log(` ${BLUE}/ultrawork [task]${RESET} — Full automation (plan → execute → verify)`);
182
182
  console.log(` ${BLUE}/plan [task]${RESET} — Create a plan only`);
183
- console.log(` ${BLUE}/start-work${RESET} — Execute existing plan`);
183
+ console.log(` ${BLUE}/start_work${RESET} — Execute existing plan`);
184
184
  console.log(`\nSend a message to your OpenClaw agent to get started!`);
185
185
  console.log(`\n${DIM}Tip: Ask your agent "Read the oh-my-openclaw skill and tell me what it does"${RESET}\n`);
186
186
  }
package/dist/index.js CHANGED
@@ -118,9 +118,9 @@ export default function register(api) {
118
118
  workspaceDir: ctx.workspaceDir,
119
119
  logger: ctx.logger,
120
120
  });
121
- }, { commands: ['setup'] });
122
- registry.cli.push('setup');
123
- api.logger.info(`[${PLUGIN_ID}] CLI command registered (setup)`);
121
+ }, { commands: ['omoc-setup'] });
122
+ registry.cli.push('omoc-setup');
123
+ api.logger.info(`[${PLUGIN_ID}] CLI command registered (omoc-setup)`);
124
124
  }
125
125
  catch (err) {
126
126
  api.logger.error(`[${PLUGIN_ID}] Failed to register CLI:`, err);
@@ -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.0",
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.0",
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",