galaxy-opc 0.3.6 → 0.3.8

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 (2) hide show
  1. package/bin/cli.mjs +20 -4
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -244,6 +244,19 @@ async function installPlugin() {
244
244
  console.error(gray(" 请手动运行: openclaw plugins install galaxy-opc-plugin\n"));
245
245
  process.exit(1);
246
246
  }
247
+
248
+ // better-sqlite3 是 native 模块,需要针对当前 Node.js 版本编译
249
+ const pluginDir = path.join(STATE_DIR, "extensions", "galaxy-opc-plugin");
250
+ if (fs.existsSync(pluginDir)) {
251
+ console.log(dim("\n 编译原生模块(better-sqlite3)...\n"));
252
+ try {
253
+ await runCommand("npm", ["rebuild", "better-sqlite3", "--prefix", pluginDir]);
254
+ console.log(green(" ✓ 原生模块编译完成"));
255
+ } catch {
256
+ console.log(yellow(" ! 原生模块编译失败,请手动执行:"));
257
+ console.log(gray(` cd ${pluginDir} && npm rebuild better-sqlite3`));
258
+ }
259
+ }
247
260
  }
248
261
 
249
262
  // ─── setup:配置 AI 模型 + 写入 openclaw.json ───────────────────────────────
@@ -424,14 +437,17 @@ async function cmdSetup() {
424
437
  console.log(`
425
438
  ${bold(green("安装完成!"))}
426
439
 
427
- 启动命令:
440
+ ${bold("启动命令:")}
428
441
  ${cyan("openclaw gateway")}
429
442
 
430
- 管理后台(需带 token):
431
- ${cyan(`http://localhost:18789/opc/admin?token=${gatewayToken}`)}
443
+ ${bold("启动后访问:")}
444
+ 对话界面: ${cyan("http://localhost:18789")}
445
+ 管理后台: ${cyan(`http://localhost:18789/opc/admin?token=${gatewayToken}`)}
432
446
 
433
- 后台驻守(开机自启):
447
+ ${bold("后台驻守(开机自启):")}
434
448
  ${cyan("openclaw onboard --install-daemon")}
449
+
450
+ ${dim("提示:插件在 gateway 启动时自动加载,无需额外操作。")}
435
451
  `);
436
452
  if (defaultModel) console.log(` 当前模型: ${cyan(defaultModel)}\n`);
437
453
  separator("═");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "galaxy-opc",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "星环 Galaxy OPC — 一人公司孵化与赋能平台 AI 员工系统",
5
5
  "keywords": [
6
6
  "ai",