nextclaw 0.46.0 → 0.47.0
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 +1 -1
- package/dist/{nextclaw-cli-app-BVdP2e0w.js → nextclaw-cli-app-wU9aUEKj.js} +233 -1
- package/dist/nextclaw-cli-app-wU9aUEKj.js.map +1 -0
- package/package.json +14 -14
- package/resources/apps/nextclaw-github-issue-watcher/README.md +43 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/Cargo.lock +455 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/Cargo.toml +27 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/src/bindings.rs +11177 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/src/lib.rs +307 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/clocks@0.2.6/monotonic-clock.wit +50 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/clocks@0.2.6/timezone.wit +55 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/clocks@0.2.6/wall-clock.wit +46 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/clocks@0.2.6/world.wit +11 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/config@0.2.0-draft-2024-09-27/package.wit +1 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/config@0.2.0-draft-2024-09-27/store.wit +9 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/http@0.2.6/handler.wit +49 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/http@0.2.6/package.wit +1 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/http@0.2.6/types.wit +688 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/io@0.2.6/error.wit +34 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/io@0.2.6/poll.wit +47 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/io@0.2.6/streams.wit +290 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/io@0.2.6/world.wit +10 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/deps/keyvalue@0.2.0-draft2/store.wit +124 -0
- package/resources/apps/nextclaw-github-issue-watcher/guest/wit/portable-service.wit +56 -0
- package/resources/apps/nextclaw-github-issue-watcher/manifest.json +34 -0
- package/resources/apps/nextclaw-github-issue-watcher/marketplace.json +18 -0
- package/resources/apps/nextclaw-github-issue-watcher/panels/nextclaw-github-issue-watcher-panel.panel/assets/app.js +148 -0
- package/resources/apps/nextclaw-github-issue-watcher/panels/nextclaw-github-issue-watcher-panel.panel/index.html +190 -0
- package/resources/apps/nextclaw-github-issue-watcher/panels/nextclaw-github-issue-watcher-panel.panel/panel-app.json +11 -0
- package/resources/apps/nextclaw-github-issue-watcher/service-components/nextclaw-github-issue-watcher-service/service-app.json +36 -0
- package/resources/apps/nextclaw-github-issue-watcher/service-components/nextclaw-github-issue-watcher-service/service.wasm +0 -0
- package/resources/apps/nextclaw-github-issue-watcher/tests/public-github-runner-smoke.tools.mjs +150 -0
- package/resources/apps/nextclaw-github-issue-watcher/tests/service-smoke.json +12 -0
- package/resources/apps/nextclaw-portable-runtime-lab/README.md +5 -3
- package/resources/apps/nextclaw-portable-runtime-lab/manifest.json +14 -2
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-contacts.panel/assets/app.js +21 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-contacts.panel/index.html +1 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-focus.panel/assets/app.js +21 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-focus.panel/index.html +1 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-notes.panel/assets/app.js +21 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-notes.panel/index.html +1 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-panel.panel/assets/app.js +201 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-panel.panel/assets/style.css +42 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-panel.panel/index.html +40 -19
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-panel.panel/panel-app.json +2 -2
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-todos.panel/assets/app.js +21 -0
- package/resources/apps/nextclaw-portable-runtime-lab/panels/nextclaw-portable-runtime-lab-todos.panel/index.html +1 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-capabilities/service-app.json +110 -3
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-capabilities/service.wasm +0 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-composition/service-app.json +12 -3
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-composition/service.wasm +0 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-provider/service-app.json +11 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-provider/service.wasm +0 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-resident/service.wasm +0 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-sqlite/service-app.json +37 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-sqlite/service.wasm +0 -0
- package/resources/apps/nextclaw-portable-runtime-lab/service-components/nextclaw-portable-runtime-lab-state/service.wasm +0 -0
- package/ui-dist/assets/{api-aEu9cEI8.js → api-n96IfCKb.js} +2 -2
- package/ui-dist/assets/{api-aEu9cEI8.js.gz → api-n96IfCKb.js.gz} +0 -0
- package/ui-dist/assets/{appearance-settings-page-z4DaHc_E.js → appearance-settings-page-C_AqxSF_.js} +1 -1
- package/ui-dist/assets/appearance-settings-page-C_AqxSF_.js.gz +0 -0
- package/ui-dist/assets/{channels-list-page-x07sGqsT.js → channels-list-page-uR-M4Ls8.js} +1 -1
- package/ui-dist/assets/channels-list-page-uR-M4Ls8.js.gz +0 -0
- package/ui-dist/assets/{confirm-dialog-BALTnP33.js → confirm-dialog-CHVBMpla.js} +1 -1
- package/ui-dist/assets/confirm-dialog-CHVBMpla.js.gz +0 -0
- package/ui-dist/assets/{desktop-capabilities-page-4-v3wKLV.js → desktop-capabilities-page-phMuNq1B.js} +1 -1
- package/ui-dist/assets/desktop-capabilities-page-phMuNq1B.js.gz +0 -0
- package/ui-dist/assets/{desktop-update-config-Cl-_XHqU.js → desktop-update-config-C77hkbor.js} +1 -1
- package/ui-dist/assets/desktop-update-config-C77hkbor.js.gz +0 -0
- package/ui-dist/assets/{extensions-DFQXmSwG.js → extensions-CQKXTqTI.js} +1 -1
- package/ui-dist/assets/extensions-CQKXTqTI.js.gz +0 -0
- package/ui-dist/assets/{index-zuqzAvNx.js → index-CLw9DuCJ.js} +4 -4
- package/ui-dist/assets/index-CLw9DuCJ.js.gz +0 -0
- package/ui-dist/assets/mcp-marketplace-page-CbWOamyW.js +1 -0
- package/ui-dist/assets/{mcp-marketplace-page-COUopIOc.js → mcp-marketplace-page-s9PTnSDT.js} +1 -1
- package/ui-dist/assets/mcp-marketplace-page-s9PTnSDT.js.gz +0 -0
- package/ui-dist/assets/{model-config-page-g9_-hZqZ.js → model-config-page-CxnCUWRW.js} +1 -1
- package/ui-dist/assets/model-config-page-CxnCUWRW.js.gz +0 -0
- package/ui-dist/assets/{privacy-settings-page-pNhQQT4r.js → privacy-settings-page-D8HZHHjL.js} +1 -1
- package/ui-dist/assets/privacy-settings-page-D8HZHHjL.js.gz +0 -0
- package/ui-dist/assets/{providers-config-page-DftW_6KU.js → providers-config-page-C0GIoGxm.js} +1 -1
- package/ui-dist/assets/providers-config-page-C0GIoGxm.js.gz +0 -0
- package/ui-dist/assets/remote-DvTCSAxQ.js +1 -0
- package/ui-dist/assets/{runtime-config-page-Cd9sOYvn.js → runtime-config-page-VNJZui5f.js} +1 -1
- package/ui-dist/assets/runtime-config-page-VNJZui5f.js.gz +0 -0
- package/ui-dist/assets/{search-config-page-BqoDbKpM.js → search-config-page-D3_qNXbB.js} +1 -1
- package/ui-dist/assets/search-config-page-D3_qNXbB.js.gz +0 -0
- package/ui-dist/assets/{secrets-config-page-GsahsEVw.js → secrets-config-page-Be4P1E8o.js} +1 -1
- package/ui-dist/assets/secrets-config-page-Be4P1E8o.js.gz +0 -0
- package/ui-dist/assets/security-config-BtcpKIhQ.js +1 -0
- package/ui-dist/assets/{tag-chip-ClBWeQ4p.js → tag-chip-Dc_NcCEe.js} +1 -1
- package/ui-dist/index.html +5 -5
- package/ui-dist/index.html.gz +0 -0
- package/dist/nextclaw-cli-app-BVdP2e0w.js.map +0 -1
- package/ui-dist/assets/appearance-settings-page-z4DaHc_E.js.gz +0 -0
- package/ui-dist/assets/channels-list-page-x07sGqsT.js.gz +0 -0
- package/ui-dist/assets/confirm-dialog-BALTnP33.js.gz +0 -0
- package/ui-dist/assets/desktop-capabilities-page-4-v3wKLV.js.gz +0 -0
- package/ui-dist/assets/desktop-update-config-Cl-_XHqU.js.gz +0 -0
- package/ui-dist/assets/extensions-DFQXmSwG.js.gz +0 -0
- package/ui-dist/assets/index-zuqzAvNx.js.gz +0 -0
- package/ui-dist/assets/mcp-marketplace-page-COUopIOc.js.gz +0 -0
- package/ui-dist/assets/mcp-marketplace-page-DxPPmYqh.js +0 -1
- package/ui-dist/assets/model-config-page-g9_-hZqZ.js.gz +0 -0
- package/ui-dist/assets/privacy-settings-page-pNhQQT4r.js.gz +0 -0
- package/ui-dist/assets/providers-config-page-DftW_6KU.js.gz +0 -0
- package/ui-dist/assets/remote-DS2TkMPm.js +0 -1
- package/ui-dist/assets/runtime-config-page-Cd9sOYvn.js.gz +0 -0
- package/ui-dist/assets/search-config-page-BqoDbKpM.js.gz +0 -0
- package/ui-dist/assets/secrets-config-page-GsahsEVw.js.gz +0 -0
- package/ui-dist/assets/security-config-BnHQyrtG.js +0 -1
package/dist/cli/app/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { NextclawDistributionService } from "@nextclaw/service";
|
|
|
5
5
|
const distribution = createNextclawDistribution(import.meta.url);
|
|
6
6
|
repairPackagedPortableRunnerPermissions(distribution);
|
|
7
7
|
NextclawDistributionService.configureRuntime(distribution);
|
|
8
|
-
const { nextclawCliProgram } = await import("../../nextclaw-cli-app-
|
|
8
|
+
const { nextclawCliProgram } = await import("../../nextclaw-cli-app-wU9aUEKj.js");
|
|
9
9
|
await nextclawCliProgram.parseAsync(process.argv);
|
|
10
10
|
//#endregion
|
|
11
11
|
export {};
|
|
@@ -5416,6 +5416,36 @@ var AppPackageLiveService = class {
|
|
|
5416
5416
|
method: "POST",
|
|
5417
5417
|
body: input
|
|
5418
5418
|
});
|
|
5419
|
+
inspectSecrets = async (appId) => await this.requireApiClient().request({ path: `/api/app-packages/${encodeURIComponent(this.requireId(appId))}/secrets` });
|
|
5420
|
+
inspectAiCapabilities = async (appId) => await this.requireApiClient().request({ path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/ai-capabilities` });
|
|
5421
|
+
verifyAiCapabilities = async (appId) => await this.requireApiClient().request({
|
|
5422
|
+
path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/ai-capabilities/verify`,
|
|
5423
|
+
method: "POST"
|
|
5424
|
+
});
|
|
5425
|
+
bindAiCapability = async (appId, input) => await this.requireApiClient().request({
|
|
5426
|
+
path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/ai-capabilities/bind`,
|
|
5427
|
+
method: "POST",
|
|
5428
|
+
body: input
|
|
5429
|
+
});
|
|
5430
|
+
unbindAiCapability = async (appId, input) => await this.requireApiClient().request({
|
|
5431
|
+
path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/ai-capabilities/unbind`,
|
|
5432
|
+
method: "POST",
|
|
5433
|
+
body: input
|
|
5434
|
+
});
|
|
5435
|
+
verifySecrets = async (appId) => await this.requireApiClient().request({
|
|
5436
|
+
path: `/api/app-packages/${encodeURIComponent(this.requireId(appId))}/secrets/verify`,
|
|
5437
|
+
method: "POST"
|
|
5438
|
+
});
|
|
5439
|
+
bindSecret = async (appId, input) => await this.requireApiClient().request({
|
|
5440
|
+
path: `/api/app-packages/${encodeURIComponent(this.requireId(appId))}/secrets/bind`,
|
|
5441
|
+
method: "POST",
|
|
5442
|
+
body: input
|
|
5443
|
+
});
|
|
5444
|
+
unbindSecret = async (appId, slotId) => await this.requireApiClient().request({
|
|
5445
|
+
path: `/api/app-packages/${encodeURIComponent(this.requireId(appId))}/secrets/unbind`,
|
|
5446
|
+
method: "POST",
|
|
5447
|
+
body: { slotId: this.requireValue(slotId, "Secret slot") }
|
|
5448
|
+
});
|
|
5419
5449
|
install = async (source, registryUrl) => await this.requireApiClient().request({
|
|
5420
5450
|
path: "/api/app-package-operations/install",
|
|
5421
5451
|
method: "POST",
|
|
@@ -5426,6 +5456,37 @@ var AppPackageLiveService = class {
|
|
|
5426
5456
|
});
|
|
5427
5457
|
enable = async (appId) => await this.changeEnabled(appId, "enable");
|
|
5428
5458
|
disable = async (appId) => await this.changeEnabled(appId, "disable");
|
|
5459
|
+
invoke = async (appId, actionName, input) => await this.requireApiClient().request({
|
|
5460
|
+
path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/actions/${encodeURIComponent(this.requireValue(actionName, "Action name"))}/invoke`,
|
|
5461
|
+
method: "POST",
|
|
5462
|
+
body: { input }
|
|
5463
|
+
});
|
|
5464
|
+
listJobs = async (appId) => await this.requireApiClient().request({ path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/jobs` });
|
|
5465
|
+
inspectJob = async (appId, jobId) => await this.requireApiClient().request({ path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/jobs/${encodeURIComponent(this.requireValue(jobId, "Job id"))}` });
|
|
5466
|
+
watchJob = async (appId, jobId, afterSequence) => {
|
|
5467
|
+
const query = afterSequence === void 0 ? "" : `?afterSequence=${afterSequence}`;
|
|
5468
|
+
return await this.requireApiClient().request({ path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/jobs/${encodeURIComponent(this.requireValue(jobId, "Job id"))}/watch${query}` });
|
|
5469
|
+
};
|
|
5470
|
+
cancelJob = async (appId, jobId) => await this.requireApiClient().request({
|
|
5471
|
+
path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/jobs/${encodeURIComponent(this.requireValue(jobId, "Job id"))}/cancel`,
|
|
5472
|
+
method: "POST"
|
|
5473
|
+
});
|
|
5474
|
+
listResidentInbox = async (appId, deadLettersOnly = false) => await this.requireApiClient().request({ path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/resident-inbox${deadLettersOnly ? "?deadLetters=true" : ""}` });
|
|
5475
|
+
replayResidentDeadLetter = async (appId, eventId) => await this.requireApiClient().request({
|
|
5476
|
+
path: `/api/service-apps/${encodeURIComponent(this.requireId(appId))}/resident-inbox/${encodeURIComponent(this.requireValue(eventId, "Event id"))}/replay`,
|
|
5477
|
+
method: "POST"
|
|
5478
|
+
});
|
|
5479
|
+
listVerificationRecords = async (filters = {}) => {
|
|
5480
|
+
const query = new URLSearchParams();
|
|
5481
|
+
if (filters.acceptanceId?.trim()) query.set("acceptanceId", filters.acceptanceId.trim());
|
|
5482
|
+
if (filters.appId?.trim()) query.set("appId", filters.appId.trim());
|
|
5483
|
+
if (filters.limit !== void 0) query.set("limit", String(filters.limit));
|
|
5484
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
5485
|
+
return await this.requireApiClient().request({ path: `/api/runtime-verification-records${suffix}` });
|
|
5486
|
+
};
|
|
5487
|
+
portableRuntimeAcceptanceContract = async (locale) => await this.requireApiClient().request({ path: `/api/portable-runtime/acceptance/contract${locale === "en" ? "?locale=en" : ""}` });
|
|
5488
|
+
portableRuntimeAcceptanceStatus = async (params = {}) => await this.requireApiClient().request({ path: this.portableRuntimeAcceptancePath("status", params) });
|
|
5489
|
+
exportPortableRuntimeAcceptance = async (params = {}) => await this.requireApiClient().request({ path: this.portableRuntimeAcceptancePath("export", params) });
|
|
5429
5490
|
update = async (appId, options) => await this.requireApiClient().request({
|
|
5430
5491
|
path: `/api/app-package-operations/${encodeURIComponent(this.requireId(appId))}/update`,
|
|
5431
5492
|
method: "POST",
|
|
@@ -5457,6 +5518,12 @@ var AppPackageLiveService = class {
|
|
|
5457
5518
|
return this.looksLikeLocalPath(source) ? path.resolve(source) : source;
|
|
5458
5519
|
};
|
|
5459
5520
|
looksLikeLocalPath = (value) => value.startsWith(".") || path.isAbsolute(value) || value.includes(path.sep) || value.endsWith(".napp");
|
|
5521
|
+
portableRuntimeAcceptancePath = (action, params) => {
|
|
5522
|
+
const query = new URLSearchParams();
|
|
5523
|
+
if (params.appId?.trim()) query.set("appId", params.appId.trim());
|
|
5524
|
+
if (params.locale === "en") query.set("locale", "en");
|
|
5525
|
+
return `/api/portable-runtime/acceptance/${action}${query.size > 0 ? `?${query.toString()}` : ""}`;
|
|
5526
|
+
};
|
|
5460
5527
|
requireVersion = (value) => this.requireValue(value, "App version");
|
|
5461
5528
|
requireValue = (value, name) => {
|
|
5462
5529
|
const normalized = value.trim();
|
|
@@ -5501,10 +5568,75 @@ var AppPackageCommandController = class {
|
|
|
5501
5568
|
requirementKind: options.requirementKind,
|
|
5502
5569
|
requirementId: options.requirementId
|
|
5503
5570
|
}), options, this.formatDependencyView);
|
|
5571
|
+
inspectSecrets = async (appId, options) => this.write(await this.liveService.inspectSecrets(appId), options, this.formatSecretReadiness);
|
|
5572
|
+
inspectAiCapabilities = async (appId, options) => this.write(await this.liveService.inspectAiCapabilities(appId), options, (value) => JSON.stringify(value, null, 2));
|
|
5573
|
+
verifyAiCapabilities = async (appId, options) => this.write(await this.liveService.verifyAiCapabilities(appId), options, (value) => JSON.stringify(value, null, 2));
|
|
5574
|
+
bindAiCapability = async (appId, options) => this.write(await this.liveService.bindAiCapability(appId, {
|
|
5575
|
+
kind: options.kind,
|
|
5576
|
+
slotId: options.slot,
|
|
5577
|
+
targetId: options.target
|
|
5578
|
+
}), options, (value) => JSON.stringify(value, null, 2));
|
|
5579
|
+
unbindAiCapability = async (appId, options) => this.write(await this.liveService.unbindAiCapability(appId, {
|
|
5580
|
+
kind: options.kind,
|
|
5581
|
+
slotId: options.slot
|
|
5582
|
+
}), options, (value) => JSON.stringify(value, null, 2));
|
|
5583
|
+
verifySecrets = async (appId, options) => this.write(await this.liveService.verifySecrets(appId), options, this.formatSecretReadiness);
|
|
5584
|
+
bindSecret = async (appId, options) => {
|
|
5585
|
+
const { slot, source, provider, id } = options;
|
|
5586
|
+
this.write(await this.liveService.bindSecret(appId, {
|
|
5587
|
+
slotId: slot,
|
|
5588
|
+
source,
|
|
5589
|
+
provider,
|
|
5590
|
+
id
|
|
5591
|
+
}), options, this.formatSecretReadiness);
|
|
5592
|
+
};
|
|
5593
|
+
unbindSecret = async (appId, options) => this.write(await this.liveService.unbindSecret(appId, options.slot), options, this.formatSecretReadiness);
|
|
5504
5594
|
operations = async (options) => this.write(await this.liveService.listOperations(), options, this.formatOperations);
|
|
5505
5595
|
install = async (source, options) => this.write(await this.liveService.install(source, options.registry), options, this.formatOperation);
|
|
5506
5596
|
enable = async (appId, options) => this.write(await this.liveService.enable(appId), options, this.formatApp);
|
|
5507
5597
|
disable = async (appId, options) => this.write(await this.liveService.disable(appId), options, this.formatApp);
|
|
5598
|
+
invoke = async (appId, actionName, options) => {
|
|
5599
|
+
const input = this.readInput(options.input);
|
|
5600
|
+
this.write(await this.liveService.invoke(appId, actionName, input), options, (result) => [
|
|
5601
|
+
`Installed App action ${result.actionId}`,
|
|
5602
|
+
` call: ${result.invocation?.callId ?? "-"}`,
|
|
5603
|
+
` trace: ${result.invocation?.traceId ?? "-"}`,
|
|
5604
|
+
` data version: ${result.invocation?.dataVersion ?? "-"}`,
|
|
5605
|
+
` verification: ${result.invocation?.verificationRunId ?? "-"}`,
|
|
5606
|
+
` result: ${JSON.stringify(result.result)}`
|
|
5607
|
+
].join("\n") + "\n");
|
|
5608
|
+
};
|
|
5609
|
+
verificationRecords = async (options) => {
|
|
5610
|
+
const { acceptance, app, limit: rawLimit } = options;
|
|
5611
|
+
const limit = rawLimit === void 0 ? void 0 : Number(rawLimit);
|
|
5612
|
+
if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1)) throw new Error("--limit must be a positive integer.");
|
|
5613
|
+
this.write(await this.liveService.listVerificationRecords({
|
|
5614
|
+
acceptanceId: acceptance,
|
|
5615
|
+
appId: app,
|
|
5616
|
+
limit
|
|
5617
|
+
}), options, (result) => result.entries.length === 0 ? "Verification records: none\n" : `${result.entries.map((record) => `${record.acceptanceId} ${record.status} ${record.entrySurface} ${record.actionOrEvent} ${record.verificationRunId}`).join("\n")}\n`);
|
|
5618
|
+
};
|
|
5619
|
+
acceptanceContract = async (options) => this.write(await this.liveService.portableRuntimeAcceptanceContract(options.locale), options, this.formatAcceptanceContract);
|
|
5620
|
+
acceptanceStatus = async (options) => this.write(await this.liveService.portableRuntimeAcceptanceStatus({
|
|
5621
|
+
appId: options.app,
|
|
5622
|
+
locale: options.locale
|
|
5623
|
+
}), options, this.formatAcceptanceStatus);
|
|
5624
|
+
acceptanceExport = async (options) => this.write(await this.liveService.exportPortableRuntimeAcceptance({
|
|
5625
|
+
appId: options.app,
|
|
5626
|
+
locale: options.locale
|
|
5627
|
+
}), {
|
|
5628
|
+
...options,
|
|
5629
|
+
json: true
|
|
5630
|
+
}, (value) => `${JSON.stringify(value, null, 2)}\n`);
|
|
5631
|
+
listJobs = async (appId, options) => this.write(await this.liveService.listJobs(appId), options, this.formatJobList);
|
|
5632
|
+
inspectJob = async (appId, jobId, options) => this.write(await this.liveService.inspectJob(appId, jobId), options, this.formatJob);
|
|
5633
|
+
watchJob = async (appId, jobId, options) => {
|
|
5634
|
+
const afterSequence = this.readAfterSequence(options.after);
|
|
5635
|
+
this.write(await this.liveService.watchJob(appId, jobId, afterSequence), options, this.formatJobWatch);
|
|
5636
|
+
};
|
|
5637
|
+
cancelJob = async (appId, jobId, options) => this.write(await this.liveService.cancelJob(appId, jobId), options, this.formatJob);
|
|
5638
|
+
listResidentInbox = async (appId, options) => this.write(await this.liveService.listResidentInbox(appId, options.deadLetters === true), options, this.formatResidentInbox);
|
|
5639
|
+
replayResidentDeadLetter = async (appId, eventId, options) => this.write(await this.liveService.replayResidentDeadLetter(appId, eventId), options, this.formatResidentEvent);
|
|
5508
5640
|
update = async (appId, options) => this.write(await this.liveService.update(appId, {
|
|
5509
5641
|
version: options.version,
|
|
5510
5642
|
registryUrl: options.registry
|
|
@@ -5547,11 +5679,41 @@ var AppPackageCommandController = class {
|
|
|
5547
5679
|
if (result.entries.length === 0) return "App operations: none\n";
|
|
5548
5680
|
return `${result.entries.map((operation) => this.formatOperation(operation).trim()).join("\n\n")}\n`;
|
|
5549
5681
|
};
|
|
5682
|
+
formatAcceptanceContract = (result) => [`Portable runtime acceptance contract ${result.contractFingerprint}`, ...result.definitions.map((definition) => ` ${definition.id} [${definition.category}] ${definition.presentation.title}`)].join("\n") + "\n";
|
|
5683
|
+
formatAcceptanceStatus = (result) => [
|
|
5684
|
+
`Portable runtime acceptance status for ${result.appId}`,
|
|
5685
|
+
result.identity.available ? ` product: ${result.identity.context.productVersion}; runtime: ${result.identity.context.runtimeVersion} (${result.identity.runtimeVersionSource})` : ` identity unavailable: ${result.identity.reason}`,
|
|
5686
|
+
` contract: ${result.contract.contractFingerprint}`,
|
|
5687
|
+
...result.entries.map((entry) => ` ${entry.id} ${entry.result.status} ${entry.presentation.title}${entry.result.latestRecord ? ` (${entry.result.latestRecord.finishedAt})` : ""}`)
|
|
5688
|
+
].join("\n") + "\n";
|
|
5689
|
+
formatJobList = (result) => result.entries.length === 0 ? "App jobs: none\n" : `${result.entries.map((job) => this.formatJob(job).trim()).join("\n\n")}\n`;
|
|
5690
|
+
formatJob = (job) => [
|
|
5691
|
+
`App job ${job.id}`,
|
|
5692
|
+
` status: ${job.status}`,
|
|
5693
|
+
` action: ${job.componentId}.${job.actionName}`,
|
|
5694
|
+
` call: ${job.callId}`,
|
|
5695
|
+
` trace: ${job.traceId}`,
|
|
5696
|
+
job.error ? ` error: ${job.error.code ?? "JOB_FAILED"} ${job.error.message}` : ""
|
|
5697
|
+
].filter(Boolean).join("\n") + "\n";
|
|
5698
|
+
formatJobWatch = (result) => [
|
|
5699
|
+
this.formatJob(result.job).trim(),
|
|
5700
|
+
` cursor: ${result.cursor}`,
|
|
5701
|
+
...result.events.map((event) => ` [${event.sequence}] ${event.type}`)
|
|
5702
|
+
].join("\n") + "\n";
|
|
5703
|
+
formatResidentInbox = (result) => result.entries.length === 0 ? `Resident inbox: none${result.frozen ? " (frozen)" : ""}\n` : `${result.entries.map((event) => this.formatResidentEvent(event).trim()).join("\n\n")}\n`;
|
|
5704
|
+
formatResidentEvent = (event) => [
|
|
5705
|
+
`Resident event ${event.eventId}`,
|
|
5706
|
+
` status: ${event.status}`,
|
|
5707
|
+
` stream: ${event.streamKey} #${event.sequence}`,
|
|
5708
|
+
` attempt: ${event.attempt}`,
|
|
5709
|
+
event.lastError ? ` error: ${event.lastError.code ?? "RESIDENT_RETRY"} ${event.lastError.message}` : ""
|
|
5710
|
+
].filter(Boolean).join("\n") + "\n";
|
|
5550
5711
|
formatDependencyView = (result) => [
|
|
5551
5712
|
`Dependency readiness: ${result.readiness.status}`,
|
|
5552
5713
|
...result.readiness.requirements.map((requirement) => ` requirement: ${requirement.componentId}/${requirement.kind}/${requirement.id}`),
|
|
5553
5714
|
...result.bindings.map((binding) => ` binding: ${binding.componentId}/${binding.requirementKind}/${binding.requirementId} -> ${binding.providerId}`)
|
|
5554
5715
|
].join("\n") + "\n";
|
|
5716
|
+
formatSecretReadiness = (result) => [`Secret readiness: ${result.readiness.status}`, ...result.slots.map((slot) => ` slot: ${slot.id} ${slot.status}${slot.binding ? ` (${slot.binding.source}/${slot.binding.provider ?? slot.binding.source}/${slot.binding.id})` : ""}${slot.errorCode ? ` [${slot.errorCode}]` : ""}`)].join("\n") + "\n";
|
|
5555
5717
|
formatOperation = (operation) => [
|
|
5556
5718
|
`App operation ${operation.id}`,
|
|
5557
5719
|
` action: ${operation.action}`,
|
|
@@ -5562,8 +5724,68 @@ var AppPackageCommandController = class {
|
|
|
5562
5724
|
requirePurgeConfirmation = (appId, confirmation) => {
|
|
5563
5725
|
if (confirmation?.trim() !== appId.trim()) throw new Error("--purge-data requires --confirm <app-id> matching the exact App id.");
|
|
5564
5726
|
};
|
|
5727
|
+
readInput = (raw) => {
|
|
5728
|
+
if (!raw) return {};
|
|
5729
|
+
try {
|
|
5730
|
+
const parsed = JSON.parse(raw);
|
|
5731
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("--input must be a JSON object.");
|
|
5732
|
+
return parsed;
|
|
5733
|
+
} catch (error) {
|
|
5734
|
+
throw new Error(error instanceof Error && error.message === "--input must be a JSON object." ? error.message : `--input is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
5735
|
+
}
|
|
5736
|
+
};
|
|
5737
|
+
readAfterSequence = (raw) => {
|
|
5738
|
+
if (raw === void 0) return void 0;
|
|
5739
|
+
const value = Number(raw);
|
|
5740
|
+
if (!Number.isInteger(value) || value < 0) throw new Error("--after must be a non-negative integer.");
|
|
5741
|
+
return value;
|
|
5742
|
+
};
|
|
5565
5743
|
};
|
|
5566
5744
|
//#endregion
|
|
5745
|
+
//#region src/cli/app/commands/register-portable-runtime-app-commands.ts
|
|
5746
|
+
function registerPortableRuntimeAppCommands(app, controller) {
|
|
5747
|
+
app.command("verification").description("Read real runtime verification records from the running host").option("--acceptance <id>", "Filter by stable acceptance id").option("--app <id>", "Filter by App id").option("--limit <n>", "Maximum records to return").option("--json", "Output JSON", false).action(async (opts) => controller.verificationRecords(opts));
|
|
5748
|
+
const acceptance = app.command("acceptance").description("Read the portable runtime acceptance contract and current evidence status");
|
|
5749
|
+
acceptance.command("contract").description("Read the stable portable runtime acceptance contract").option("--locale <locale>", "Presentation locale: zh-CN or en", "zh-CN").option("--json", "Output JSON", false).action(async (opts) => controller.acceptanceContract({
|
|
5750
|
+
...opts,
|
|
5751
|
+
locale: readAcceptanceLocale(opts.locale)
|
|
5752
|
+
}));
|
|
5753
|
+
acceptance.command("status").description("Read current portable runtime acceptance evidence status").option("--app <id>", "Acceptance App id").option("--locale <locale>", "Presentation locale: zh-CN or en", "zh-CN").option("--json", "Output JSON", false).action(async (opts) => controller.acceptanceStatus({
|
|
5754
|
+
...opts,
|
|
5755
|
+
locale: readAcceptanceLocale(opts.locale)
|
|
5756
|
+
}));
|
|
5757
|
+
acceptance.command("export").description("Export the portable runtime acceptance contract, identity, and evidence status as JSON").option("--app <id>", "Acceptance App id").option("--locale <locale>", "Presentation locale: zh-CN or en", "zh-CN").option("--json", "Output JSON", false).action(async (opts) => controller.acceptanceExport({
|
|
5758
|
+
...opts,
|
|
5759
|
+
locale: readAcceptanceLocale(opts.locale)
|
|
5760
|
+
}));
|
|
5761
|
+
registerAiCommands(app, controller);
|
|
5762
|
+
registerJobCommands(app, controller);
|
|
5763
|
+
registerResidentCommands(app, controller);
|
|
5764
|
+
}
|
|
5765
|
+
function registerAiCommands(app, controller) {
|
|
5766
|
+
const ai = app.command("ai-capabilities").description("Inspect and bind non-secret model and Agent slots for a Service App");
|
|
5767
|
+
ai.command("inspect <app-id>").option("--json", "Output JSON", false).action(async (id, opts) => controller.inspectAiCapabilities(id, opts));
|
|
5768
|
+
ai.command("verify <app-id>").option("--json", "Output JSON", false).action(async (id, opts) => controller.verifyAiCapabilities(id, opts));
|
|
5769
|
+
ai.command("bind <app-id>").requiredOption("--kind <kind>", "Slot kind: model or agent").requiredOption("--slot <id>", "Declared slot id").requiredOption("--target <id>", "Configured model or Agent id").option("--json", "Output JSON", false).action(async (id, opts) => controller.bindAiCapability(id, opts));
|
|
5770
|
+
ai.command("unbind <app-id>").requiredOption("--kind <kind>", "Slot kind: model or agent").requiredOption("--slot <id>", "Declared slot id").option("--json", "Output JSON", false).action(async (id, opts) => controller.unbindAiCapability(id, opts));
|
|
5771
|
+
}
|
|
5772
|
+
function registerJobCommands(app, controller) {
|
|
5773
|
+
const jobs = app.command("jobs").description("Inspect, replay, and cancel durable App Jobs through the running host");
|
|
5774
|
+
jobs.command("list <app-id>").description("List durable Jobs for one installed App instance").option("--json", "Output JSON", false).action(async (id, opts) => controller.listJobs(id, opts));
|
|
5775
|
+
jobs.command("inspect <app-id> <job-id>").description("Inspect one durable App Job").option("--json", "Output JSON", false).action(async (id, jobId, opts) => controller.inspectJob(id, jobId, opts));
|
|
5776
|
+
jobs.command("watch <app-id> <job-id>").description("Replay retained Job progress and stream output from a cursor").option("--after <sequence>", "Replay only events after this sequence").option("--json", "Output JSON", false).action(async (id, jobId, opts) => controller.watchJob(id, jobId, opts));
|
|
5777
|
+
jobs.command("cancel <app-id> <job-id>").description("Request cancellation; the Job remains pending until the runner confirms it").option("--json", "Output JSON", false).action(async (id, jobId, opts) => controller.cancelJob(id, jobId, opts));
|
|
5778
|
+
}
|
|
5779
|
+
function registerResidentCommands(app, controller) {
|
|
5780
|
+
const inbox = app.command("resident-inbox").description("Inspect and replay durable Resident events through the running host");
|
|
5781
|
+
inbox.command("list <app-id>").description("List retained Resident event delivery state").option("--dead-letters", "Show only dead-letter events", false).option("--json", "Output JSON", false).action(async (id, opts) => controller.listResidentInbox(id, opts));
|
|
5782
|
+
inbox.command("replay <app-id> <event-id>").description("Replay one dead-letter Resident event through the durable inbox").option("--json", "Output JSON", false).action(async (id, eventId, opts) => controller.replayResidentDeadLetter(id, eventId, opts));
|
|
5783
|
+
}
|
|
5784
|
+
function readAcceptanceLocale(value) {
|
|
5785
|
+
if (value === "zh-CN" || value === "en") return value;
|
|
5786
|
+
throw new Error("--locale must be zh-CN or en.");
|
|
5787
|
+
}
|
|
5788
|
+
//#endregion
|
|
5567
5789
|
//#region src/cli/app/register-app-commands.ts
|
|
5568
5790
|
function registerAppCommands(program, options = {}) {
|
|
5569
5791
|
const app = program.command("app").description("Develop, validate, and publish NextClaw apps");
|
|
@@ -5613,14 +5835,24 @@ function registerAppPackageCommands(app, appPackages) {
|
|
|
5613
5835
|
app.command("list").description("List Apps installed in the running NextClaw host").option("--json", "Output JSON", false).action(async (opts) => appPackages.list(opts));
|
|
5614
5836
|
app.command("info <app-id>").description("Show an App installed in the running NextClaw host").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.info(appId, opts));
|
|
5615
5837
|
registerAppDependencyCommands(app, appPackages);
|
|
5838
|
+
registerAppSecretCommands(app, appPackages);
|
|
5839
|
+
registerPortableRuntimeAppCommands(app, appPackages);
|
|
5616
5840
|
app.command("operations").description("List App install, update, rollback, and uninstall operations").option("--json", "Output JSON", false).action(async (opts) => appPackages.operations(opts));
|
|
5617
5841
|
app.command("install <source>").description("Install an App through the running NextClaw host").option("--registry <url>", "Registry URL for an App id").option("--json", "Output JSON", false).action(async (source, opts) => appPackages.install(source, opts));
|
|
5618
5842
|
app.command("enable <app-id>").description("Enable an installed App").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.enable(appId, opts));
|
|
5619
5843
|
app.command("disable <app-id>").description("Disable an installed App").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.disable(appId, opts));
|
|
5844
|
+
app.command("invoke <app-id> <action-name>").description("Call an Action on an enabled installed App through the running host").option("--input <json>", "JSON object input for the action").option("--json", "Output JSON", false).action(async (appId, actionName, opts) => appPackages.invoke(appId, actionName, opts));
|
|
5620
5845
|
app.command("update <app-id>").description("Update an App through the running NextClaw host").option("--version <version>", "Target version").option("--registry <url>", "Registry URL").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.update(appId, opts));
|
|
5621
5846
|
app.command("rollback <app-id>").description("Roll back an App to an installed version").requiredOption("--version <version>", "Installed version to activate").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.rollback(appId, opts));
|
|
5622
5847
|
app.command("uninstall <app-id>").description("Uninstall an App through the running NextClaw host").option("--purge-data", "Permanently delete App data", false).option("--confirm <app-id>", "Confirm the exact App id when purging data").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.uninstall(appId, opts));
|
|
5623
5848
|
}
|
|
5849
|
+
function registerAppSecretCommands(app, controller) {
|
|
5850
|
+
const secrets = app.command("secrets").description("Inspect and manage non-sensitive SecretRef bindings for an App");
|
|
5851
|
+
secrets.command("inspect <app-id>").description("Show declared Secret slots and non-sensitive bindings").option("--json", "Output JSON", false).action(async (appId, opts) => controller.inspectSecrets(appId, opts));
|
|
5852
|
+
secrets.command("verify <app-id>").description("Resolve each declared Secret binding without returning its value").option("--json", "Output JSON", false).action(async (appId, opts) => controller.verifySecrets(appId, opts));
|
|
5853
|
+
secrets.command("bind <app-id>").description("Bind one declared Secret slot to a configured Secret provider").requiredOption("--slot <id>", "Declared Secret slot id").requiredOption("--source <source>", "Secret source: env, file, or exec").option("--provider <id>", "Configured Secret provider id").requiredOption("--id <id>", "Secret id within the provider").option("--json", "Output JSON", false).action(async (appId, opts) => controller.bindSecret(appId, opts));
|
|
5854
|
+
secrets.command("unbind <app-id>").description("Remove a SecretRef binding from an App").requiredOption("--slot <id>", "Declared Secret slot id").option("--json", "Output JSON", false).action(async (appId, opts) => controller.unbindSecret(appId, opts));
|
|
5855
|
+
}
|
|
5624
5856
|
function registerAppDependencyCommands(app, controller) {
|
|
5625
5857
|
const dependencies = app.command("dependencies").description("Inspect and manage an App's capability and resource dependencies");
|
|
5626
5858
|
dependencies.command("inspect <app-id>").description("Inspect dependency readiness and available providers").option("--json", "Output JSON", false).action(async (appId, opts) => controller.inspectDependencies(appId, opts));
|
|
@@ -5909,4 +6141,4 @@ program.command("usage").description("Show observed LLM usage snapshots, history
|
|
|
5909
6141
|
//#endregion
|
|
5910
6142
|
export { program as nextclawCliProgram };
|
|
5911
6143
|
|
|
5912
|
-
//# sourceMappingURL=nextclaw-cli-app-
|
|
6144
|
+
//# sourceMappingURL=nextclaw-cli-app-wU9aUEKj.js.map
|