nextclaw 0.33.1 → 0.33.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.
- package/dist/cli/app/index.js +29 -10
- package/dist/cli/app/index.js.map +1 -1
- package/package.json +10 -10
- package/resources/apps/nextclaw-personal-organizer/manifest.json +1 -1
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-calendar.panel/assets/app.js +8 -0
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-calendar.panel/assets/icon.svg +6 -0
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-calendar.panel/assets/style.css +2 -0
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-calendar.panel/index.html +10 -21
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-calendar.panel/panel-app.json +4 -4
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-todos.panel/assets/app.js +8 -0
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-todos.panel/assets/icon.svg +4 -0
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-todos.panel/assets/style.css +2 -0
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-todos.panel/index.html +10 -40
- package/resources/apps/nextclaw-personal-organizer/panels/nextclaw-personal-organizer-todos.panel/panel-app.json +4 -4
- package/resources/apps/nextclaw-personal-organizer/service-components/nextclaw-personal-organizer-data/index.mjs +44 -18
- package/ui-dist/assets/{appearance-settings-page-DlGXLgff.js → appearance-settings-page-KEYKkxHu.js} +1 -1
- package/ui-dist/assets/{channels-list-page-BEEk4Uc9.js → channels-list-page-eXLXPgKT.js} +1 -1
- package/ui-dist/assets/{chat-page-DUQXXqQm.js → chat-page-jfImLdsq.js} +1 -1
- package/ui-dist/assets/{desktop-update-config--zagjHic.js → desktop-update-config-C20U71k1.js} +1 -1
- package/ui-dist/assets/{index-Ba_o5fu9.js → index-BP0Hd2jI.js} +3 -3
- package/ui-dist/assets/{model-config-page-rrhFaque.js → model-config-page-CJCnaKOh.js} +1 -1
- package/ui-dist/assets/{provider-scoped-model-input-CFsfWEt9.js → provider-scoped-model-input-Dqu-ZoWG.js} +1 -1
- package/ui-dist/assets/{providers-config-page-D-TYFZsF.js → providers-config-page-C6fRN2rJ.js} +1 -1
- package/ui-dist/assets/remote-Xyv2c_W9.js +1 -0
- package/ui-dist/assets/{runtime-config-page-Br9j9Vxe.js → runtime-config-page-CtypMgLd.js} +1 -1
- package/ui-dist/assets/{search-config-page-B3fvzMd1.js → search-config-page-DhSFjYj4.js} +1 -1
- package/ui-dist/assets/{secrets-config-page-ClwTxtXd.js → secrets-config-page-BLGcyb1D.js} +1 -1
- package/ui-dist/index.html +1 -1
- package/ui-dist/assets/remote-BwVv_Qq-.js +0 -1
package/dist/cli/app/index.js
CHANGED
|
@@ -7,10 +7,11 @@ import { constants, existsSync, mkdirSync, readFileSync, writeFileSync } from "n
|
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import path, { join, resolve } from "node:path";
|
|
10
|
+
import { tmpdir } from "node:os";
|
|
10
11
|
import "@nextclaw/server";
|
|
11
12
|
import { NextclawDistributionService, NextclawServiceRuntime, readLearningLoopRuntimeConfig } from "@nextclaw/service";
|
|
13
|
+
import { access, mkdtemp, readFile, rm, stat } from "node:fs/promises";
|
|
12
14
|
import { McpServiceAppRuntimeService, buildServiceActionId, getServiceAppManifestPath, mergeServiceAppRuntimeActions, readServiceAppManifest } from "@nextclaw/kernel";
|
|
13
|
-
import { access, readFile, stat } from "node:fs/promises";
|
|
14
15
|
import { promisify } from "node:util";
|
|
15
16
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
16
17
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
@@ -3641,13 +3642,14 @@ var ServiceAppDevService = class {
|
|
|
3641
3642
|
if (!loaded) return this.buildDevReport(appPath, void 0, [], issues);
|
|
3642
3643
|
if (this.hasErrors(issues)) return this.buildDevReport(appPath, this.toServiceAppRecord(appPath, loaded.manifest, this.idleRuntimeStatus), [], issues);
|
|
3643
3644
|
const runtime = this.createRuntimeService();
|
|
3645
|
+
const dataDirectory = await this.createDevDataDirectory();
|
|
3644
3646
|
try {
|
|
3645
|
-
const startRecord = this.toServiceAppRecord(appPath, loaded.manifest, runtime);
|
|
3647
|
+
const startRecord = this.toServiceAppRecord(appPath, loaded.manifest, runtime, dataDirectory);
|
|
3646
3648
|
const runtimeActions = await runtime.listActions({
|
|
3647
3649
|
app: startRecord,
|
|
3648
3650
|
manifest: loaded.manifest
|
|
3649
3651
|
});
|
|
3650
|
-
const record = this.toServiceAppRecord(appPath, loaded.manifest, runtime);
|
|
3652
|
+
const record = this.toServiceAppRecord(appPath, loaded.manifest, runtime, dataDirectory);
|
|
3651
3653
|
const actions = mergeServiceAppRuntimeActions({
|
|
3652
3654
|
record,
|
|
3653
3655
|
manifest: loaded.manifest,
|
|
@@ -3656,7 +3658,14 @@ var ServiceAppDevService = class {
|
|
|
3656
3658
|
this.collectRuntimeIssues(record, actions, issues);
|
|
3657
3659
|
return this.buildDevReport(appPath, record, actions, issues);
|
|
3658
3660
|
} finally {
|
|
3659
|
-
|
|
3661
|
+
try {
|
|
3662
|
+
await runtime.dispose();
|
|
3663
|
+
} finally {
|
|
3664
|
+
await rm(dataDirectory, {
|
|
3665
|
+
recursive: true,
|
|
3666
|
+
force: true
|
|
3667
|
+
});
|
|
3668
|
+
}
|
|
3660
3669
|
}
|
|
3661
3670
|
};
|
|
3662
3671
|
call = async (target, actionName, input) => {
|
|
@@ -3676,18 +3685,19 @@ var ServiceAppDevService = class {
|
|
|
3676
3685
|
return this.buildCallReport(appPath, record, void 0, void 0, issues);
|
|
3677
3686
|
}
|
|
3678
3687
|
const runtime = this.createRuntimeService();
|
|
3688
|
+
const dataDirectory = await this.createDevDataDirectory();
|
|
3679
3689
|
try {
|
|
3680
|
-
const record = this.toServiceAppRecord(appPath, loaded.manifest, runtime);
|
|
3690
|
+
const record = this.toServiceAppRecord(appPath, loaded.manifest, runtime, dataDirectory);
|
|
3681
3691
|
const result = await runtime.invokeAction({
|
|
3682
3692
|
app: record,
|
|
3683
3693
|
manifest: loaded.manifest,
|
|
3684
3694
|
actionName: action,
|
|
3685
3695
|
input
|
|
3686
3696
|
});
|
|
3687
|
-
const nextRecord = this.toServiceAppRecord(appPath, loaded.manifest, runtime);
|
|
3697
|
+
const nextRecord = this.toServiceAppRecord(appPath, loaded.manifest, runtime, dataDirectory);
|
|
3688
3698
|
return this.buildCallReport(appPath, nextRecord, buildServiceActionId(loaded.manifest.id, action), result, issues);
|
|
3689
3699
|
} catch (error) {
|
|
3690
|
-
const record = this.toServiceAppRecord(appPath, loaded.manifest, runtime);
|
|
3700
|
+
const record = this.toServiceAppRecord(appPath, loaded.manifest, runtime, dataDirectory);
|
|
3691
3701
|
issues.push({
|
|
3692
3702
|
severity: "error",
|
|
3693
3703
|
code: "service.runtime.callFailed",
|
|
@@ -3695,7 +3705,14 @@ var ServiceAppDevService = class {
|
|
|
3695
3705
|
});
|
|
3696
3706
|
return this.buildCallReport(appPath, record, buildServiceActionId(loaded.manifest.id, action), void 0, issues);
|
|
3697
3707
|
} finally {
|
|
3698
|
-
|
|
3708
|
+
try {
|
|
3709
|
+
await runtime.dispose();
|
|
3710
|
+
} finally {
|
|
3711
|
+
await rm(dataDirectory, {
|
|
3712
|
+
recursive: true,
|
|
3713
|
+
force: true
|
|
3714
|
+
});
|
|
3715
|
+
}
|
|
3699
3716
|
}
|
|
3700
3717
|
};
|
|
3701
3718
|
loadServiceApp = async (appPath, issues) => {
|
|
@@ -3727,7 +3744,8 @@ var ServiceAppDevService = class {
|
|
|
3727
3744
|
return resolveConfigSecrets(loadConfig(configPath), { configPath });
|
|
3728
3745
|
};
|
|
3729
3746
|
idleRuntimeStatus = { getStatus: () => ({ status: "idle" }) };
|
|
3730
|
-
|
|
3747
|
+
createDevDataDirectory = async () => await mkdtemp(path.join(tmpdir(), "nextclaw-service-app-dev-data-"));
|
|
3748
|
+
toServiceAppRecord = (dirPath, manifest, runtime, dataDirectory) => {
|
|
3731
3749
|
const runtimeStatus = runtime.getStatus(manifest.id);
|
|
3732
3750
|
const record = {
|
|
3733
3751
|
id: manifest.id,
|
|
@@ -3739,7 +3757,8 @@ var ServiceAppDevService = class {
|
|
|
3739
3757
|
cwd: dirPath,
|
|
3740
3758
|
enabled: manifest.enabled,
|
|
3741
3759
|
protocol: manifest.protocol,
|
|
3742
|
-
status: manifest.enabled ? runtimeStatus.status : "stopped"
|
|
3760
|
+
status: manifest.enabled ? runtimeStatus.status : "stopped",
|
|
3761
|
+
dataDirectory
|
|
3743
3762
|
};
|
|
3744
3763
|
if (manifest.description) record.description = manifest.description;
|
|
3745
3764
|
if (runtimeStatus.lastError) record.lastError = runtimeStatus.lastError;
|