nextclaw 0.18.12-beta.7 → 0.18.12-beta.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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { _ as resolveUiApiBase, a as compareNpmRuntimeVersions, b as waitForExit, c as findListeningProcessByPort, d as isProcessRunning, f as openBrowser, g as resolveServiceLogPath, h as resolvePublicIp, i as NpmRuntimeBundleService, l as getPackageVersion$1, m as prompt, n as NpmRuntimeUpdateSourceService, o as NpmRuntimeBundleLayoutStore, p as printAgentResponse, s as findExecutableOnPath, t as NpmRuntimeUpdateStateStore, u as isLoopbackHost, v as resolveUiConfig, y as resolveUiStaticDir } from "../../npm-runtime-update-state.store-uaYppWyO.js";
2
+ import { S as waitForExit, _ as resolvePublicIp, a as compareNpmRuntimeVersions, b as resolveUiConfig, c as NpmRuntimeBundleLayoutStore, d as getPackageVersion$1, f as isLoopbackHost, g as prompt, h as printAgentResponse, i as NpmRuntimeBundleService, l as findExecutableOnPath, m as openBrowser, n as NpmRuntimeUpdateSourceService, o as resolveEffectiveNpmRuntimeVersion, p as isProcessRunning, t as NpmRuntimeUpdateStateStore, u as findListeningProcessByPort, v as resolveServiceLogPath, x as resolveUiStaticDir, y as resolveUiApiBase } from "../../npm-runtime-update-state.store-75vzvn0B.js";
3
3
  import { createRequire } from "node:module";
4
4
  import * as NextclawCore from "@nextclaw/core";
5
5
  import { APP_NAME, APP_TAGLINE, AgentRouteResolver, BUILTIN_MAIN_AGENT_ID, ChannelManager, CommandRegistry, ConfigSchema, ContextBuilder, CronService, CronTool, DEFAULT_WORKSPACE_DIR, DEFAULT_WORKSPACE_PATH, DisposableStore, EditFileTool, ExecTool, ExtensionToolAdapter, FileLogSink, GatewayTool, InputBudgetPruner, LLMProvider, ListDirTool, MemoryGetTool, MemorySearchTool, MessageBus, MessageTool, ProviderManager, ReadFileTool, RequestedSkillsMetadataReader, SessionManager, SessionsHistoryTool, SessionsListTool, SkillsLoader, Tool, ToolRegistry, WebFetchTool, WebSearchTool, WriteFileTool, buildConfigSchema, buildMinimalSystemExecutionPrompt, buildReloadPlan, buildToolCatalogEntries, createAgentProfile, createAssistantStreamDeltaControlMessage, createAssistantStreamResetControlMessage, createGlobalTypedEventBus, createTypedEventKey, createTypingStopControlMessage, diffConfigPaths, expandHome, findEffectiveAgentProfile, getAppLogger, getConfigPath, getDataDir, getDataPath, getLoggingRuntime, getWorkspacePath, hasSecretRef, loadConfig, normalizeInlineSecretRefs, parseAgentScopedSessionKey, parseThinkingLevel, readSessionProjectRoot, redactConfigObject, removeAgentProfile, resolveAppLogPath, resolveConfigSecrets, resolveDefaultAgentProfileId, resolveEffectiveAgentProfiles, resolveLocalUiBaseUrl, resolveProviderRuntime, resolveSessionWorkspacePath, resolveThinkingLevel, saveConfig, toDisposable, updateAgentProfile } from "@nextclaw/core";
@@ -5236,10 +5236,14 @@ var NpmRuntimeUpdateManager = class {
5236
5236
  };
5237
5237
  syncStateFromCurrentPointer = () => {
5238
5238
  const currentPointer = this.options.layout.readCurrentPointer();
5239
- if (!currentPointer) return;
5239
+ const effectiveCurrentVersion = resolveEffectiveNpmRuntimeVersion({
5240
+ launcherVersion: this.launcherVersion,
5241
+ currentBundleVersion: currentPointer?.version ?? null
5242
+ });
5243
+ if (!effectiveCurrentVersion) return;
5240
5244
  this.options.stateStore.update((state) => ({
5241
5245
  ...state,
5242
- currentVersion: state.currentVersion ?? currentPointer.version
5246
+ currentVersion: effectiveCurrentVersion
5243
5247
  }));
5244
5248
  };
5245
5249
  toSnapshotFromState = (state, patch) => {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as NpmRuntimeBundleService, l as getPackageVersion$1, o as NpmRuntimeBundleLayoutStore, r as inferDefaultNpmRuntimeReleaseChannel, t as NpmRuntimeUpdateStateStore } from "../../npm-runtime-update-state.store-uaYppWyO.js";
2
+ import { c as NpmRuntimeBundleLayoutStore, d as getPackageVersion$1, i as NpmRuntimeBundleService, r as inferDefaultNpmRuntimeReleaseChannel, s as shouldPreferPackagedNpmRuntime, t as NpmRuntimeUpdateStateStore } from "../../npm-runtime-update-state.store-75vzvn0B.js";
3
3
  import { createExternalCommandEnv } from "@nextclaw/core";
4
4
  import { dirname, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -33,7 +33,12 @@ var NpmRuntimeLauncher = class {
33
33
  launcherVersion: getPackageVersion$1()
34
34
  });
35
35
  try {
36
- return bundleService.resolveCurrentBundle()?.runtimeScriptPath ?? this.resolvePackagedAppEntrypoint();
36
+ const currentBundle = bundleService.resolveCurrentBundle();
37
+ if (currentBundle && shouldPreferPackagedNpmRuntime({
38
+ launcherVersion: getPackageVersion$1(),
39
+ currentBundleVersion: currentBundle.manifest.runtimeVersion ?? currentBundle.manifest.bundleVersion
40
+ })) return this.resolvePackagedAppEntrypoint();
41
+ return currentBundle?.runtimeScriptPath ?? this.resolvePackagedAppEntrypoint();
37
42
  } catch (error) {
38
43
  console.error(`Cannot start current runtime bundle: ${error instanceof Error ? error.message : String(error)}`);
39
44
  console.error("Falling back to the packaged npm launcher runtime.");
@@ -471,6 +471,19 @@ function compareNpmRuntimeVersions(left, right) {
471
471
  }
472
472
  return left.localeCompare(right);
473
473
  }
474
+ function resolveEffectiveNpmRuntimeVersion(params) {
475
+ const launcherVersion = params.launcherVersion?.trim() || null;
476
+ const currentBundleVersion = params.currentBundleVersion?.trim() || null;
477
+ if (!launcherVersion) return currentBundleVersion;
478
+ if (!currentBundleVersion) return launcherVersion;
479
+ return compareNpmRuntimeVersions(launcherVersion, currentBundleVersion) > 0 ? launcherVersion : currentBundleVersion;
480
+ }
481
+ function shouldPreferPackagedNpmRuntime(params) {
482
+ const launcherVersion = params.launcherVersion?.trim() || null;
483
+ const currentBundleVersion = params.currentBundleVersion?.trim() || null;
484
+ if (!launcherVersion || !currentBundleVersion) return false;
485
+ return resolveEffectiveNpmRuntimeVersion(params) === launcherVersion;
486
+ }
474
487
  function parseVersionParts(version) {
475
488
  return version.split(/[.-]/).map((part) => Number(part)).map((part) => Number.isFinite(part) ? part : 0);
476
489
  }
@@ -617,4 +630,4 @@ var NpmRuntimeUpdateStateStore = class {
617
630
  };
618
631
  };
619
632
  //#endregion
620
- export { resolveUiApiBase as _, compareNpmRuntimeVersions as a, waitForExit as b, findListeningProcessByPort as c, isProcessRunning as d, openBrowser as f, resolveServiceLogPath as g, resolvePublicIp as h, NpmRuntimeBundleService as i, getPackageVersion$1 as l, prompt as m, NpmRuntimeUpdateSourceService as n, NpmRuntimeBundleLayoutStore as o, printAgentResponse as p, inferDefaultNpmRuntimeReleaseChannel as r, findExecutableOnPath as s, NpmRuntimeUpdateStateStore as t, isLoopbackHost as u, resolveUiConfig as v, resolveUiStaticDir as y };
633
+ export { waitForExit as S, resolvePublicIp as _, compareNpmRuntimeVersions as a, resolveUiConfig as b, NpmRuntimeBundleLayoutStore as c, getPackageVersion$1 as d, isLoopbackHost as f, prompt as g, printAgentResponse as h, NpmRuntimeBundleService as i, findExecutableOnPath as l, openBrowser as m, NpmRuntimeUpdateSourceService as n, resolveEffectiveNpmRuntimeVersion as o, isProcessRunning as p, inferDefaultNpmRuntimeReleaseChannel as r, shouldPreferPackagedNpmRuntime as s, NpmRuntimeUpdateStateStore as t, findListeningProcessByPort as u, resolveServiceLogPath as v, resolveUiStaticDir as x, resolveUiApiBase as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextclaw",
3
- "version": "0.18.12-beta.7",
3
+ "version": "0.18.12-beta.8",
4
4
  "description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -42,20 +42,20 @@
42
42
  "jszip": "^3.10.1",
43
43
  "yaml": "^2.8.1",
44
44
  "@nextclaw/companion": "0.1.1-beta.1",
45
- "@nextclaw/core": "0.12.13-beta.1",
46
45
  "@nextclaw/mcp": "0.1.78-beta.1",
46
+ "@nextclaw/core": "0.12.13-beta.1",
47
47
  "@nextclaw/ncp": "0.5.6-beta.0",
48
+ "@nextclaw/kernel": "0.1.2-beta.2",
49
+ "@nextclaw/ncp-mcp": "0.1.80-beta.1",
48
50
  "@nextclaw/ncp-agent-runtime": "0.3.16-beta.1",
49
- "@nextclaw/ncp-toolkit": "0.5.11-beta.0",
50
51
  "@nextclaw/nextclaw-hermes-acp-bridge": "0.1.5-beta.1",
51
- "@nextclaw/kernel": "0.1.2-beta.2",
52
52
  "@nextclaw/nextclaw-ncp-runtime-http-client": "0.1.5-beta.1",
53
- "@nextclaw/ncp-mcp": "0.1.80-beta.1",
54
- "@nextclaw/server": "0.12.13-beta.1",
53
+ "@nextclaw/nextclaw-ncp-runtime-stdio-client": "0.1.6-beta.1",
54
+ "@nextclaw/ncp-toolkit": "0.5.11-beta.0",
55
55
  "@nextclaw/remote": "0.1.90-beta.1",
56
56
  "@nextclaw/openclaw-compat": "1.0.13-beta.1",
57
- "@nextclaw/nextclaw-ncp-runtime-stdio-client": "0.1.6-beta.1",
58
- "@nextclaw/runtime": "0.2.45-beta.0"
57
+ "@nextclaw/runtime": "0.2.45-beta.0",
58
+ "@nextclaw/server": "0.12.13-beta.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/node": "^20.17.6",