nextclaw 0.13.3 → 0.13.5

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/dist/cli/index.js +19 -10
  2. package/package.json +6 -6
package/dist/cli/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  import { existsSync as existsSync13, mkdirSync as mkdirSync8, readFileSync as readFileSync11, writeFileSync as writeFileSync7 } from "fs";
30
30
  import { join as join9, resolve as resolve12 } from "path";
31
31
  import { createInterface as createInterface3 } from "readline";
32
- import { fileURLToPath as fileURLToPath4 } from "url";
32
+ import { fileURLToPath as fileURLToPath5 } from "url";
33
33
  import { spawn as spawn3 } from "child_process";
34
34
 
35
35
  // src/cli/restart-coordinator.ts
@@ -1101,6 +1101,7 @@ function appendPluginCapabilityLines(lines, plugin) {
1101
1101
  // src/cli/commands/dev-first-party-plugin-load-paths.ts
1102
1102
  import fs from "fs";
1103
1103
  import path from "path";
1104
+ import { fileURLToPath as fileURLToPath2 } from "url";
1104
1105
  var readJsonFile = (filePath) => {
1105
1106
  try {
1106
1107
  const raw = fs.readFileSync(filePath, "utf-8");
@@ -1117,6 +1118,14 @@ var readString = (value) => {
1117
1118
  const trimmed = value.trim();
1118
1119
  return trimmed || void 0;
1119
1120
  };
1121
+ var resolveDevFirstPartyPluginDir = (explicitDir, moduleDir = path.dirname(fileURLToPath2(import.meta.url))) => {
1122
+ const configured = explicitDir?.trim();
1123
+ if (configured) {
1124
+ return configured;
1125
+ }
1126
+ const inferred = path.resolve(moduleDir, "../../../../extensions");
1127
+ return fs.existsSync(inferred) ? inferred : void 0;
1128
+ };
1120
1129
  var hasOpenClawExtensions = (pkg) => {
1121
1130
  const openclaw = pkg.openclaw;
1122
1131
  if (!openclaw || typeof openclaw !== "object" || Array.isArray(openclaw)) {
@@ -1168,7 +1177,7 @@ var readWorkspacePluginPackages = (workspaceExtensionsDir) => {
1168
1177
  return packages;
1169
1178
  };
1170
1179
  var resolveDevFirstPartyPluginLoadPaths = (config2, workspaceExtensionsDir) => {
1171
- const rootDir = workspaceExtensionsDir?.trim();
1180
+ const rootDir = resolveDevFirstPartyPluginDir(workspaceExtensionsDir);
1172
1181
  if (!rootDir) {
1173
1182
  return [];
1174
1183
  }
@@ -1193,7 +1202,7 @@ var resolveDevFirstPartyPluginLoadPaths = (config2, workspaceExtensionsDir) => {
1193
1202
  return loadPaths;
1194
1203
  };
1195
1204
  var resolveDevFirstPartyPluginInstallRoots = (config2, workspaceExtensionsDir) => {
1196
- const rootDir = workspaceExtensionsDir?.trim();
1205
+ const rootDir = resolveDevFirstPartyPluginDir(workspaceExtensionsDir);
1197
1206
  if (!rootDir) {
1198
1207
  return [];
1199
1208
  }
@@ -1480,7 +1489,7 @@ function toExtensionRegistry(pluginRegistry) {
1480
1489
 
1481
1490
  // src/cli/commands/plugins.ts
1482
1491
  function loadPluginRegistry(config2, workspaceDir) {
1483
- const workspaceExtensionsDir = process.env.NEXTCLAW_DEV_FIRST_PARTY_PLUGIN_DIR;
1492
+ const workspaceExtensionsDir = resolveDevFirstPartyPluginDir(process.env.NEXTCLAW_DEV_FIRST_PARTY_PLUGIN_DIR);
1484
1493
  const configWithDevPluginPaths = applyDevFirstPartyPluginLoadPaths(
1485
1494
  config2,
1486
1495
  workspaceExtensionsDir
@@ -4941,14 +4950,14 @@ function formatUserFacingError(error, maxChars = 320) {
4941
4950
  // src/cli/commands/cli-subcommand-launch.ts
4942
4951
  import { createRequire } from "module";
4943
4952
  import { extname, resolve as resolve9 } from "path";
4944
- import { fileURLToPath as fileURLToPath2 } from "url";
4953
+ import { fileURLToPath as fileURLToPath3 } from "url";
4945
4954
  var require2 = createRequire(import.meta.url);
4946
4955
  var resolveCliSubcommandEntry = (params) => {
4947
4956
  const argvEntry = params.argvEntry?.trim();
4948
4957
  if (argvEntry) {
4949
4958
  return resolve9(argvEntry);
4950
4959
  }
4951
- return fileURLToPath2(new URL("../index.js", params.importMetaUrl));
4960
+ return fileURLToPath3(new URL("../index.js", params.importMetaUrl));
4952
4961
  };
4953
4962
 
4954
4963
  // src/cli/commands/ncp/create-ui-ncp-agent.ts
@@ -8024,7 +8033,7 @@ ${stderr}`.trim();
8024
8033
  import { cpSync as cpSync3, existsSync as existsSync12, mkdirSync as mkdirSync7, readFileSync as readFileSync10, readdirSync as readdirSync3, rmSync as rmSync5, writeFileSync as writeFileSync6 } from "fs";
8025
8034
  import { createRequire as createRequire2 } from "module";
8026
8035
  import { dirname as dirname4, join as join8, resolve as resolve11 } from "path";
8027
- import { fileURLToPath as fileURLToPath3 } from "url";
8036
+ import { fileURLToPath as fileURLToPath4 } from "url";
8028
8037
  import { APP_NAME as APP_NAME3, getDataDir as getDataDir8 } from "@nextclaw/core";
8029
8038
  import { spawnSync as spawnSync3 } from "child_process";
8030
8039
  var WorkspaceManager = class {
@@ -8136,7 +8145,7 @@ var WorkspaceManager = class {
8136
8145
  if (override) {
8137
8146
  return override;
8138
8147
  }
8139
- const cliDir = resolve11(fileURLToPath3(new URL(".", import.meta.url)));
8148
+ const cliDir = resolve11(fileURLToPath4(new URL(".", import.meta.url)));
8140
8149
  const pkgRoot = resolve11(cliDir, "..", "..");
8141
8150
  const candidates = [join8(pkgRoot, "templates")];
8142
8151
  for (const candidate of candidates) {
@@ -8155,7 +8164,7 @@ var WorkspaceManager = class {
8155
8164
  console.error("npm not found. Please install Node.js >= 18.");
8156
8165
  process.exit(1);
8157
8166
  }
8158
- const cliDir = resolve11(fileURLToPath3(new URL(".", import.meta.url)));
8167
+ const cliDir = resolve11(fileURLToPath4(new URL(".", import.meta.url)));
8159
8168
  const pkgRoot = resolve11(cliDir, "..", "..");
8160
8169
  const pkgBridge = join8(pkgRoot, "bridge");
8161
8170
  const srcBridge = join8(pkgRoot, "..", "..", "bridge");
@@ -8310,7 +8319,7 @@ var CliRuntime = class {
8310
8319
  }
8311
8320
  const uiPort = typeof state.uiPort === "number" && Number.isFinite(state.uiPort) ? state.uiPort : 18791;
8312
8321
  const delayMs = typeof params.delayMs === "number" && Number.isFinite(params.delayMs) ? Math.max(0, Math.floor(params.delayMs)) : 100;
8313
- const cliPath = process.env.NEXTCLAW_SELF_RELAUNCH_CLI?.trim() || fileURLToPath4(new URL("./index.js", import.meta.url));
8322
+ const cliPath = process.env.NEXTCLAW_SELF_RELAUNCH_CLI?.trim() || fileURLToPath5(new URL("./index.js", import.meta.url));
8314
8323
  const startArgs = [cliPath, "start", "--ui-port", String(uiPort)];
8315
8324
  const serviceStatePath = resolve12(getDataDir9(), "run", "service.json");
8316
8325
  const helperScript = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextclaw",
3
- "version": "0.13.3",
3
+ "version": "0.13.5",
4
4
  "description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -39,15 +39,15 @@
39
39
  "chokidar": "^3.6.0",
40
40
  "commander": "^12.1.0",
41
41
  "yaml": "^2.8.1",
42
- "@nextclaw/mcp": "0.1.3",
43
42
  "@nextclaw/core": "0.9.4",
44
- "@nextclaw/ncp-mcp": "0.1.3",
43
+ "@nextclaw/mcp": "0.1.5",
44
+ "@nextclaw/ncp-mcp": "0.1.5",
45
+ "@nextclaw/ncp-agent-runtime": "0.2.1",
45
46
  "@nextclaw/ncp": "0.3.1",
46
47
  "@nextclaw/runtime": "0.2.4",
47
- "@nextclaw/ncp-agent-runtime": "0.2.1",
48
+ "@nextclaw/openclaw-compat": "0.3.9",
48
49
  "@nextclaw/ncp-toolkit": "0.4.1",
49
- "@nextclaw/server": "0.10.3",
50
- "@nextclaw/openclaw-compat": "0.3.7"
50
+ "@nextclaw/server": "0.10.5"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "^20.17.6",