nextclaw 0.18.12-beta.3 → 0.18.12-beta.4
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.
package/dist/cli/app/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as resolveUiConfig, a as compareNpmRuntimeVersions, c as getPackageVersion$1, d as openBrowser, f as printAgentResponse, g as resolveUiApiBase, h as resolveServiceLogPath, i as NpmRuntimeBundleService, l as isLoopbackHost, m as resolvePublicIp, n as NpmRuntimeUpdateSourceService, o as NpmRuntimeBundleLayoutStore, p as prompt, s as findExecutableOnPath, t as NpmRuntimeUpdateStateStore, u as isProcessRunning, v as resolveUiStaticDir, y as waitForExit } from "../../npm-runtime-update-state.store-BwM_B6eP.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";
|
|
@@ -168,7 +168,7 @@ function maskToken(value) {
|
|
|
168
168
|
if (value.length <= 12) return "<redacted>";
|
|
169
169
|
return `${value.slice(0, 6)}...${value.slice(-4)}`;
|
|
170
170
|
}
|
|
171
|
-
function normalizeOptionalString$
|
|
171
|
+
function normalizeOptionalString$9(value) {
|
|
172
172
|
if (typeof value !== "string") return;
|
|
173
173
|
const trimmed = value.trim();
|
|
174
174
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
@@ -266,8 +266,8 @@ var RemotePlatformClient = class {
|
|
|
266
266
|
if (tokenState.reason === "missing") throw new Error("NextClaw platform token is missing. Run \"nextclaw login\" first.");
|
|
267
267
|
if (tokenState.reason === "expired") throw new Error("NextClaw platform token expired. Run \"nextclaw login\" or browser sign-in again.");
|
|
268
268
|
if (tokenState.reason === "malformed") throw new Error("NextClaw platform token is invalid. Run \"nextclaw login\" again.");
|
|
269
|
-
const configuredApiBase = normalizeOptionalString$
|
|
270
|
-
const rawApiBase = normalizeOptionalString$
|
|
269
|
+
const configuredApiBase = normalizeOptionalString$9(config.remote.platformApiBase) ?? (typeof nextclawProvider?.apiBase === "string" ? nextclawProvider.apiBase.trim() : "");
|
|
270
|
+
const rawApiBase = normalizeOptionalString$9(opts.apiBase) ?? configuredApiBase;
|
|
271
271
|
if (!rawApiBase) throw new Error("Platform API base is missing. Pass --api-base, run nextclaw login, or set remote.platformApiBase.");
|
|
272
272
|
return {
|
|
273
273
|
platformBase: this.deps.resolvePlatformBase(rawApiBase),
|
|
@@ -276,14 +276,14 @@ var RemotePlatformClient = class {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
resolveLocalOrigin(config, opts) {
|
|
279
|
-
const explicitOrigin = normalizeOptionalString$
|
|
279
|
+
const explicitOrigin = normalizeOptionalString$9(opts.localOrigin);
|
|
280
280
|
if (explicitOrigin) return explicitOrigin.replace(/\/$/, "");
|
|
281
281
|
const state = this.deps.readManagedServiceState?.();
|
|
282
282
|
if (state && this.deps.isProcessRunning?.(state.pid) && Number.isFinite(state.uiPort)) return `http://127.0.0.1:${state.uiPort}`;
|
|
283
283
|
return `http://127.0.0.1:${typeof config.ui?.port === "number" && Number.isFinite(config.ui.port) ? config.ui.port : 55667}`;
|
|
284
284
|
}
|
|
285
285
|
resolveDisplayName(config, opts) {
|
|
286
|
-
return normalizeOptionalString$
|
|
286
|
+
return normalizeOptionalString$9(opts.name) ?? normalizeOptionalString$9(config.remote.deviceName) ?? hostname();
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
289
|
//#endregion
|
|
@@ -4493,7 +4493,7 @@ var RemoteConnector = class {
|
|
|
4493
4493
|
};
|
|
4494
4494
|
//#endregion
|
|
4495
4495
|
//#region ../nextclaw-remote/src/remote-status-store.ts
|
|
4496
|
-
function normalizeOptionalString$
|
|
4496
|
+
function normalizeOptionalString$8(value) {
|
|
4497
4497
|
if (typeof value !== "string") return;
|
|
4498
4498
|
const trimmed = value.trim();
|
|
4499
4499
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
@@ -4504,8 +4504,8 @@ function buildConfiguredRemoteState(config) {
|
|
|
4504
4504
|
enabled: Boolean(remote.enabled),
|
|
4505
4505
|
mode: "service",
|
|
4506
4506
|
state: remote.enabled ? "disconnected" : "disabled",
|
|
4507
|
-
...normalizeOptionalString$
|
|
4508
|
-
...normalizeOptionalString$
|
|
4507
|
+
...normalizeOptionalString$8(remote.deviceName) ? { deviceName: normalizeOptionalString$8(remote.deviceName) } : {},
|
|
4508
|
+
...normalizeOptionalString$8(remote.platformApiBase) ? { platformBase: normalizeOptionalString$8(remote.platformApiBase) } : {},
|
|
4509
4509
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4510
4510
|
};
|
|
4511
4511
|
}
|
|
@@ -4518,7 +4518,7 @@ function resolveRemoteStatusSnapshot(params) {
|
|
|
4518
4518
|
configuredEnabled: true,
|
|
4519
4519
|
runtime: {
|
|
4520
4520
|
...buildConfiguredRemoteState(params.config),
|
|
4521
|
-
deviceName: normalizeOptionalString$
|
|
4521
|
+
deviceName: normalizeOptionalString$8(params.config.remote.deviceName) ?? normalizeOptionalString$8(params.fallbackDeviceName) ?? hostname()
|
|
4522
4522
|
}
|
|
4523
4523
|
};
|
|
4524
4524
|
return {
|
|
@@ -5443,49 +5443,6 @@ function readDirectoryNames(directory) {
|
|
|
5443
5443
|
return readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
5444
5444
|
}
|
|
5445
5445
|
//#endregion
|
|
5446
|
-
//#region src/cli/launcher/npm-runtime-update-source.service.ts
|
|
5447
|
-
const DEFAULT_NPM_RUNTIME_UPDATE_BASE_URL = "https://Peiiii.github.io/nextclaw/npm-runtime-updates";
|
|
5448
|
-
function normalizeOptionalString$8(value) {
|
|
5449
|
-
if (typeof value !== "string") return null;
|
|
5450
|
-
const trimmed = value.trim();
|
|
5451
|
-
return trimmed ? trimmed : null;
|
|
5452
|
-
}
|
|
5453
|
-
function normalizeChannel(value) {
|
|
5454
|
-
return typeof value === "string" && value.trim().toLowerCase() === "beta" ? "beta" : "stable";
|
|
5455
|
-
}
|
|
5456
|
-
function resolvePackagedPublicKeyPath() {
|
|
5457
|
-
return resolve(dirname(fileURLToPath(import.meta.url)), "../../..", "resources", "update-bundle-public.pem");
|
|
5458
|
-
}
|
|
5459
|
-
var NpmRuntimeUpdateSourceService = class {
|
|
5460
|
-
env;
|
|
5461
|
-
platform;
|
|
5462
|
-
arch;
|
|
5463
|
-
constructor(options = {}) {
|
|
5464
|
-
this.env = options.env ?? process.env;
|
|
5465
|
-
this.platform = options.platform ?? process.platform;
|
|
5466
|
-
this.arch = options.arch ?? process.arch;
|
|
5467
|
-
}
|
|
5468
|
-
resolveChannel = (explicitChannel) => {
|
|
5469
|
-
return normalizeChannel(explicitChannel ?? this.env.NEXTCLAW_UPDATE_CHANNEL);
|
|
5470
|
-
};
|
|
5471
|
-
resolveManifestUrl = (channel, explicitManifestUrl) => {
|
|
5472
|
-
const manifestUrl = normalizeOptionalString$8(explicitManifestUrl) ?? normalizeOptionalString$8(this.env.NEXTCLAW_UPDATE_MANIFEST_URL);
|
|
5473
|
-
if (manifestUrl) return manifestUrl;
|
|
5474
|
-
const baseUrl = normalizeOptionalString$8(this.env.NEXTCLAW_UPDATE_MANIFEST_BASE_URL) ?? DEFAULT_NPM_RUNTIME_UPDATE_BASE_URL;
|
|
5475
|
-
return new URL(`${channel}/manifest-${channel}-${this.platform}-${this.arch}.json`, `${baseUrl.replace(/\/+$/, "")}/`).toString();
|
|
5476
|
-
};
|
|
5477
|
-
resolveBundlePublicKey = () => {
|
|
5478
|
-
const explicitPublicKey = normalizeOptionalString$8(this.env.NEXTCLAW_UPDATE_BUNDLE_PUBLIC_KEY);
|
|
5479
|
-
if (explicitPublicKey) return explicitPublicKey;
|
|
5480
|
-
const publicKeyPath = normalizeOptionalString$8(this.env.NEXTCLAW_UPDATE_BUNDLE_PUBLIC_KEY_PATH);
|
|
5481
|
-
if (!publicKeyPath || !existsSync(publicKeyPath)) {
|
|
5482
|
-
const packagedPublicKeyPath = resolvePackagedPublicKeyPath();
|
|
5483
|
-
return existsSync(packagedPublicKeyPath) ? readFileSync(packagedPublicKeyPath, "utf8").trim() : null;
|
|
5484
|
-
}
|
|
5485
|
-
return readFileSync(publicKeyPath, "utf8").trim();
|
|
5486
|
-
};
|
|
5487
|
-
};
|
|
5488
|
-
//#endregion
|
|
5489
5446
|
//#region src/cli/launcher/npm-runtime-update-command.service.ts
|
|
5490
5447
|
var NpmRuntimeUpdateCommandService = class {
|
|
5491
5448
|
run = async (opts) => {
|
|
@@ -5496,11 +5453,11 @@ var NpmRuntimeUpdateCommandService = class {
|
|
|
5496
5453
|
};
|
|
5497
5454
|
runManaged = async (opts) => {
|
|
5498
5455
|
const source = new NpmRuntimeUpdateSourceService();
|
|
5499
|
-
const
|
|
5456
|
+
const launcherVersion = getPackageVersion$1();
|
|
5457
|
+
const channel = source.resolveChannel(opts.channel, launcherVersion);
|
|
5500
5458
|
const manifestUrl = source.resolveManifestUrl(channel, opts.manifestUrl);
|
|
5501
5459
|
const layout = new NpmRuntimeBundleLayoutStore();
|
|
5502
|
-
const stateStore = new NpmRuntimeUpdateStateStore(layout.getStatePath());
|
|
5503
|
-
const launcherVersion = getPackageVersion$1();
|
|
5460
|
+
const stateStore = new NpmRuntimeUpdateStateStore(layout.getStatePath(), { defaultChannel: channel });
|
|
5504
5461
|
const bundleService = new NpmRuntimeBundleService({
|
|
5505
5462
|
layout,
|
|
5506
5463
|
stateStore,
|
|
@@ -15184,8 +15141,8 @@ const INITIAL_DOWNLOAD_PROGRESS = {
|
|
|
15184
15141
|
var NpmRuntimeUpdateHost = class {
|
|
15185
15142
|
source = new NpmRuntimeUpdateSourceService();
|
|
15186
15143
|
layout = new NpmRuntimeBundleLayoutStore();
|
|
15187
|
-
stateStore = new NpmRuntimeUpdateStateStore(this.layout.getStatePath());
|
|
15188
15144
|
launcherVersion = getPackageVersion$1();
|
|
15145
|
+
stateStore = new NpmRuntimeUpdateStateStore(this.layout.getStatePath(), { defaultChannel: this.source.resolveChannel(void 0, this.launcherVersion) });
|
|
15189
15146
|
bundleService = new NpmRuntimeBundleService({
|
|
15190
15147
|
layout: this.layout,
|
|
15191
15148
|
stateStore: this.stateStore,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { c as getPackageVersion$1, i as NpmRuntimeBundleService, o as NpmRuntimeBundleLayoutStore, r as inferDefaultNpmRuntimeReleaseChannel, t as NpmRuntimeUpdateStateStore } from "../../npm-runtime-update-state.store-BwM_B6eP.js";
|
|
3
3
|
import { createExternalCommandEnv } from "@nextclaw/core";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -26,7 +26,7 @@ var NpmRuntimeLauncher = class {
|
|
|
26
26
|
};
|
|
27
27
|
resolveRuntimeScriptPath = () => {
|
|
28
28
|
if (this.env.NEXTCLAW_DISABLE_RUNTIME_BUNDLE_LAUNCHER === "1" || this.env.NEXTCLAW_RUNTIME_BUNDLE_CHILD === "1") return this.resolvePackagedAppEntrypoint();
|
|
29
|
-
const stateStore = new NpmRuntimeUpdateStateStore(this.layout.getStatePath());
|
|
29
|
+
const stateStore = new NpmRuntimeUpdateStateStore(this.layout.getStatePath(), { defaultChannel: inferDefaultNpmRuntimeReleaseChannel(getPackageVersion$1()) });
|
|
30
30
|
const bundleService = new NpmRuntimeBundleService({
|
|
31
31
|
layout: this.layout,
|
|
32
32
|
stateStore,
|
|
@@ -383,49 +383,109 @@ function parseVersionParts(version) {
|
|
|
383
383
|
return version.split(/[.-]/).map((part) => Number(part)).map((part) => Number.isFinite(part) ? part : 0);
|
|
384
384
|
}
|
|
385
385
|
//#endregion
|
|
386
|
-
//#region src/cli/launcher/npm-runtime-update-
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
386
|
+
//#region src/cli/launcher/npm-runtime-update-source.service.ts
|
|
387
|
+
const DEFAULT_NPM_RUNTIME_UPDATE_BASE_URL = "https://Peiiii.github.io/nextclaw/npm-runtime-updates";
|
|
388
|
+
function normalizeOptionalString$1(value) {
|
|
389
|
+
if (typeof value !== "string") return null;
|
|
390
|
+
const trimmed = value.trim();
|
|
391
|
+
return trimmed ? trimmed : null;
|
|
392
|
+
}
|
|
393
|
+
function normalizeChannel$1(value) {
|
|
394
|
+
return typeof value === "string" && value.trim().toLowerCase() === "beta" ? "beta" : "stable";
|
|
395
|
+
}
|
|
396
|
+
function inferDefaultNpmRuntimeReleaseChannel(launcherVersion) {
|
|
397
|
+
return typeof launcherVersion === "string" && launcherVersion.toLowerCase().includes("-beta") ? "beta" : "stable";
|
|
398
|
+
}
|
|
399
|
+
function resolvePackagedPublicKeyPath() {
|
|
400
|
+
const moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
401
|
+
const candidates = [
|
|
402
|
+
resolve(moduleDir, "..", "resources", "update-bundle-public.pem"),
|
|
403
|
+
resolve(moduleDir, "../../..", "resources", "update-bundle-public.pem"),
|
|
404
|
+
resolve(moduleDir, "../../../..", "resources", "update-bundle-public.pem")
|
|
405
|
+
];
|
|
406
|
+
return candidates.find((candidate) => existsSync(candidate)) ?? candidates[0];
|
|
407
|
+
}
|
|
408
|
+
var NpmRuntimeUpdateSourceService = class {
|
|
409
|
+
env;
|
|
410
|
+
platform;
|
|
411
|
+
arch;
|
|
412
|
+
constructor(options = {}) {
|
|
413
|
+
this.env = options.env ?? process.env;
|
|
414
|
+
this.platform = options.platform ?? process.platform;
|
|
415
|
+
this.arch = options.arch ?? process.arch;
|
|
401
416
|
}
|
|
417
|
+
resolveChannel = (explicitChannel, launcherVersion) => {
|
|
418
|
+
if (explicitChannel !== void 0 || this.env.NEXTCLAW_UPDATE_CHANNEL !== void 0) return normalizeChannel$1(explicitChannel ?? this.env.NEXTCLAW_UPDATE_CHANNEL);
|
|
419
|
+
return inferDefaultNpmRuntimeReleaseChannel(launcherVersion);
|
|
420
|
+
};
|
|
421
|
+
resolveManifestUrl = (channel, explicitManifestUrl) => {
|
|
422
|
+
const manifestUrl = normalizeOptionalString$1(explicitManifestUrl) ?? normalizeOptionalString$1(this.env.NEXTCLAW_UPDATE_MANIFEST_URL);
|
|
423
|
+
if (manifestUrl) return manifestUrl;
|
|
424
|
+
const baseUrl = normalizeOptionalString$1(this.env.NEXTCLAW_UPDATE_MANIFEST_BASE_URL) ?? DEFAULT_NPM_RUNTIME_UPDATE_BASE_URL;
|
|
425
|
+
return new URL(`${channel}/manifest-${channel}-${this.platform}-${this.arch}.json`, `${baseUrl.replace(/\/+$/, "")}/`).toString();
|
|
426
|
+
};
|
|
427
|
+
resolveBundlePublicKey = () => {
|
|
428
|
+
const explicitPublicKey = normalizeOptionalString$1(this.env.NEXTCLAW_UPDATE_BUNDLE_PUBLIC_KEY);
|
|
429
|
+
if (explicitPublicKey) return explicitPublicKey;
|
|
430
|
+
const publicKeyPath = normalizeOptionalString$1(this.env.NEXTCLAW_UPDATE_BUNDLE_PUBLIC_KEY_PATH);
|
|
431
|
+
if (!publicKeyPath || !existsSync(publicKeyPath)) {
|
|
432
|
+
const packagedPublicKeyPath = resolvePackagedPublicKeyPath();
|
|
433
|
+
return existsSync(packagedPublicKeyPath) ? readFileSync(packagedPublicKeyPath, "utf8").trim() : null;
|
|
434
|
+
}
|
|
435
|
+
return readFileSync(publicKeyPath, "utf8").trim();
|
|
436
|
+
};
|
|
402
437
|
};
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/cli/launcher/npm-runtime-update-state.store.ts
|
|
440
|
+
function createDefaultState(channel) {
|
|
441
|
+
return {
|
|
442
|
+
channel,
|
|
443
|
+
currentVersion: null,
|
|
444
|
+
previousVersion: null,
|
|
445
|
+
candidateVersion: null,
|
|
446
|
+
candidateLaunchCount: 0,
|
|
447
|
+
lastKnownGoodVersion: null,
|
|
448
|
+
badVersions: [],
|
|
449
|
+
lastUpdateCheckAt: null,
|
|
450
|
+
downloadedVersion: null,
|
|
451
|
+
downloadedReleaseNotesUrl: null,
|
|
452
|
+
updatePreferences: {
|
|
453
|
+
automaticChecks: true,
|
|
454
|
+
autoDownload: true
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
}
|
|
403
458
|
function normalizeOptionalString(value) {
|
|
404
459
|
if (typeof value !== "string") return null;
|
|
405
460
|
const trimmed = value.trim();
|
|
406
461
|
return trimmed ? trimmed : null;
|
|
407
462
|
}
|
|
408
|
-
function normalizeChannel(value) {
|
|
409
|
-
|
|
463
|
+
function normalizeChannel(value, fallback) {
|
|
464
|
+
if (typeof value !== "string") return fallback;
|
|
465
|
+
const trimmed = value.trim().toLowerCase();
|
|
466
|
+
if (trimmed === "beta") return "beta";
|
|
467
|
+
if (trimmed === "stable") return "stable";
|
|
468
|
+
return fallback;
|
|
410
469
|
}
|
|
411
470
|
function normalizeStringArray(value) {
|
|
412
471
|
if (!Array.isArray(value)) return [];
|
|
413
472
|
return [...new Set(value.filter((entry) => typeof entry === "string").map((entry) => entry.trim()).filter(Boolean))];
|
|
414
473
|
}
|
|
415
474
|
function normalizeUpdatePreferences(value) {
|
|
416
|
-
|
|
475
|
+
const defaultState = createDefaultState("stable");
|
|
476
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return { ...defaultState.updatePreferences };
|
|
417
477
|
const record = value;
|
|
418
478
|
return {
|
|
419
|
-
automaticChecks: typeof record.automaticChecks === "boolean" ? record.automaticChecks :
|
|
420
|
-
autoDownload: typeof record.autoDownload === "boolean" ? record.autoDownload :
|
|
479
|
+
automaticChecks: typeof record.automaticChecks === "boolean" ? record.automaticChecks : defaultState.updatePreferences.automaticChecks,
|
|
480
|
+
autoDownload: typeof record.autoDownload === "boolean" ? record.autoDownload : defaultState.updatePreferences.autoDownload
|
|
421
481
|
};
|
|
422
482
|
}
|
|
423
|
-
function normalizeState(input) {
|
|
483
|
+
function normalizeState(input, defaultChannel) {
|
|
424
484
|
if (!input || typeof input !== "object" || Array.isArray(input)) throw new Error("npm runtime update state must be an object");
|
|
425
485
|
const record = input;
|
|
426
486
|
const candidateLaunchCount = Number(record.candidateLaunchCount);
|
|
427
487
|
return {
|
|
428
|
-
channel: normalizeChannel(record.channel),
|
|
488
|
+
channel: normalizeChannel(record.channel, defaultChannel),
|
|
429
489
|
currentVersion: normalizeOptionalString(record.currentVersion),
|
|
430
490
|
previousVersion: normalizeOptionalString(record.previousVersion),
|
|
431
491
|
candidateVersion: normalizeOptionalString(record.candidateVersion),
|
|
@@ -439,15 +499,20 @@ function normalizeState(input) {
|
|
|
439
499
|
};
|
|
440
500
|
}
|
|
441
501
|
var NpmRuntimeUpdateStateStore = class {
|
|
442
|
-
|
|
502
|
+
defaultChannel;
|
|
503
|
+
constructor(statePath, options = {}) {
|
|
443
504
|
this.statePath = statePath;
|
|
505
|
+
this.defaultChannel = options.defaultChannel ?? "stable";
|
|
444
506
|
}
|
|
445
507
|
read = () => {
|
|
446
|
-
if (!existsSync(this.statePath))
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
508
|
+
if (!existsSync(this.statePath)) {
|
|
509
|
+
const defaultState = createDefaultState(this.defaultChannel);
|
|
510
|
+
return {
|
|
511
|
+
...defaultState,
|
|
512
|
+
updatePreferences: { ...defaultState.updatePreferences }
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
return normalizeState(JSON.parse(readFileSync(this.statePath, "utf8")), this.defaultChannel);
|
|
451
516
|
};
|
|
452
517
|
write = (state) => {
|
|
453
518
|
mkdirSync(dirname(this.statePath), { recursive: true });
|
|
@@ -460,4 +525,4 @@ var NpmRuntimeUpdateStateStore = class {
|
|
|
460
525
|
};
|
|
461
526
|
};
|
|
462
527
|
//#endregion
|
|
463
|
-
export {
|
|
528
|
+
export { resolveUiConfig as _, compareNpmRuntimeVersions as a, getPackageVersion$1 as c, openBrowser as d, printAgentResponse as f, resolveUiApiBase as g, resolveServiceLogPath as h, NpmRuntimeBundleService as i, isLoopbackHost as l, resolvePublicIp as m, NpmRuntimeUpdateSourceService as n, NpmRuntimeBundleLayoutStore as o, prompt as p, inferDefaultNpmRuntimeReleaseChannel as r, findExecutableOnPath as s, NpmRuntimeUpdateStateStore as t, isProcessRunning as u, resolveUiStaticDir as v, waitForExit as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextclaw",
|
|
3
|
-
"version": "0.18.12-beta.
|
|
3
|
+
"version": "0.18.12-beta.4",
|
|
4
4
|
"description": "Lightweight personal AI assistant with CLI, multi-provider routing, and channel integrations.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"commander": "^12.1.0",
|
|
42
42
|
"jszip": "^3.10.1",
|
|
43
43
|
"yaml": "^2.8.1",
|
|
44
|
-
"@nextclaw/core": "0.12.13-beta.1",
|
|
45
44
|
"@nextclaw/companion": "0.1.1-beta.0",
|
|
46
|
-
"@nextclaw/
|
|
47
|
-
"@nextclaw/ncp": "0.5.6-beta.0",
|
|
48
|
-
"@nextclaw/ncp-mcp": "0.1.80-beta.0",
|
|
45
|
+
"@nextclaw/core": "0.12.13-beta.1",
|
|
49
46
|
"@nextclaw/mcp": "0.1.78-beta.0",
|
|
50
|
-
"@nextclaw/ncp-toolkit": "0.5.11-beta.0",
|
|
51
47
|
"@nextclaw/kernel": "0.1.2-beta.1",
|
|
48
|
+
"@nextclaw/ncp-agent-runtime": "0.3.16-beta.0",
|
|
49
|
+
"@nextclaw/ncp-toolkit": "0.5.11-beta.0",
|
|
50
|
+
"@nextclaw/ncp-mcp": "0.1.80-beta.0",
|
|
52
51
|
"@nextclaw/nextclaw-hermes-acp-bridge": "0.1.5-beta.0",
|
|
53
|
-
"@nextclaw/
|
|
52
|
+
"@nextclaw/ncp": "0.5.6-beta.0",
|
|
54
53
|
"@nextclaw/nextclaw-ncp-runtime-http-client": "0.1.5-beta.0",
|
|
55
54
|
"@nextclaw/nextclaw-ncp-runtime-stdio-client": "0.1.6-beta.0",
|
|
56
55
|
"@nextclaw/runtime": "0.2.45-beta.0",
|
|
56
|
+
"@nextclaw/remote": "0.1.90-beta.0",
|
|
57
57
|
"@nextclaw/server": "0.12.13-beta.0",
|
|
58
58
|
"@nextclaw/openclaw-compat": "1.0.13-beta.0"
|
|
59
59
|
},
|