nextclaw 0.44.0 → 0.44.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 +1 -1
- package/dist/{nextclaw-cli-app-scOxgGRP.js → nextclaw-cli-app-B_ffeXOD.js} +192 -1
- package/dist/nextclaw-cli-app-B_ffeXOD.js.map +1 -0
- package/package.json +14 -13
- package/resources/USAGE.md +36 -4
- package/resources/apps/nextclaw-personal-organizer/README.md +1 -1
- package/ui-dist/assets/{api-DvpQWjTS.js → api-DNLQPHfQ.js} +5 -5
- package/ui-dist/assets/api-DNLQPHfQ.js.gz +0 -0
- package/ui-dist/assets/{appearance-settings-page-U0m0ktu3.js → appearance-settings-page-BlAFMOGV.js} +1 -1
- package/ui-dist/assets/appearance-settings-page-BlAFMOGV.js.gz +0 -0
- package/ui-dist/assets/{book-open-DRofSTWr.js → book-open-BryfPTTa.js} +1 -1
- package/ui-dist/assets/{channels-list-page-BURQarD0.js → channels-list-page-Cfbgubyv.js} +2 -2
- package/ui-dist/assets/channels-list-page-Cfbgubyv.js.gz +0 -0
- package/ui-dist/assets/{config-split-page-BrAQYTIl.js → config-split-page-Dd8xG0Jk.js} +1 -1
- package/ui-dist/assets/config-split-page-Dd8xG0Jk.js.gz +0 -0
- package/ui-dist/assets/{confirm-dialog-DDJomLnO.js → confirm-dialog-CZIWjnJ6.js} +2 -2
- package/ui-dist/assets/confirm-dialog-CZIWjnJ6.js.gz +0 -0
- package/ui-dist/assets/{createLucideIcon-DzkNHr5Z.js → createLucideIcon-BxwVe8ZD.js} +1 -1
- package/ui-dist/assets/desktop-capabilities-page-C6YxsHeV.js +1 -0
- package/ui-dist/assets/desktop-capabilities-page-C6YxsHeV.js.gz +0 -0
- package/ui-dist/assets/desktop-update-config-BVN4QPJn.js +1 -0
- package/ui-dist/assets/desktop-update-config-BVN4QPJn.js.gz +0 -0
- package/ui-dist/assets/{dist-NskPB_yW.js → dist-BRloKr3S.js} +1 -1
- package/ui-dist/assets/dist-BRloKr3S.js.gz +0 -0
- package/ui-dist/assets/{dist-DXbLo2b1.js → dist-Cd8Nm3BW.js} +1 -1
- package/ui-dist/assets/dist-Cd8Nm3BW.js.gz +0 -0
- package/ui-dist/assets/doc-browser-Bzgqmmiu.js +1 -0
- package/ui-dist/assets/doc-browser-Bzgqmmiu.js.gz +0 -0
- package/ui-dist/assets/doc-browser-D0qI0Z_R.js +1 -0
- package/ui-dist/assets/{doc-browser-context-CnKV4gJy.js → doc-browser-context-3JGufiMA.js} +1 -1
- package/ui-dist/assets/doc-browser-context-3JGufiMA.js.gz +0 -0
- package/ui-dist/assets/{extensions-DvlFMpAs.js → extensions-Dedd2oDI.js} +1 -1
- package/ui-dist/assets/extensions-Dedd2oDI.js.gz +0 -0
- package/ui-dist/assets/{form-actions-UnPEZBkx.js → form-actions-FWCEof3V.js} +1 -1
- package/ui-dist/assets/index-CXkHcESm.css +1 -0
- package/ui-dist/assets/index-CXkHcESm.css.gz +0 -0
- package/ui-dist/assets/index-D25tRg1p.js +109 -0
- package/ui-dist/assets/index-D25tRg1p.js.gz +0 -0
- package/ui-dist/assets/loader-circle-BoyCoFps.js +1 -0
- package/ui-dist/assets/mcp-marketplace-page-Cn-9CDh3.js +1 -0
- package/ui-dist/assets/mcp-marketplace-page-e9Rmfz-d.js +10 -0
- package/ui-dist/assets/mcp-marketplace-page-e9Rmfz-d.js.gz +0 -0
- package/ui-dist/assets/model-config-page-C173Ssil.js +1 -0
- package/ui-dist/assets/model-config-page-C173Ssil.js.gz +0 -0
- package/ui-dist/assets/{navigation-link-NjUdG6Vp.js → navigation-link-DTPOvGGL.js} +1 -1
- package/ui-dist/assets/navigation-link-DTPOvGGL.js.gz +0 -0
- package/ui-dist/assets/plus-D1R4Vipq.js +1 -0
- package/ui-dist/assets/privacy-settings-page-CRserBVF.js +1 -0
- package/ui-dist/assets/privacy-settings-page-CRserBVF.js.gz +0 -0
- package/ui-dist/assets/providers-config-page-C8jUtnZb.js +1 -0
- package/ui-dist/assets/providers-config-page-C8jUtnZb.js.gz +0 -0
- package/ui-dist/assets/react-BAzO6LZS.js +8 -0
- package/ui-dist/assets/react-BAzO6LZS.js.gz +0 -0
- package/ui-dist/assets/{refresh-cw-CkeninE0.js → refresh-cw-BCj-yjde.js} +1 -1
- package/ui-dist/assets/remote-6BHWP5zi.js +1 -0
- package/ui-dist/assets/{rotate-cw-DP33PuXU.js → rotate-cw-BPnW4qUl.js} +1 -1
- package/ui-dist/assets/runtime-config-page-aeQ1Dryz.js +1 -0
- package/ui-dist/assets/runtime-config-page-aeQ1Dryz.js.gz +0 -0
- package/ui-dist/assets/{save-Cw2Xz-pB.js → save-KT0MumfJ.js} +1 -1
- package/ui-dist/assets/{search-C2CFAVvd.js → search-Cv1Hx_nx.js} +1 -1
- package/ui-dist/assets/{search-config-page-dqNT0Swf.js → search-config-page-b283V-fo.js} +1 -1
- package/ui-dist/assets/search-config-page-b283V-fo.js.gz +0 -0
- package/ui-dist/assets/{secrets-config-page-De6J3wVx.js → secrets-config-page-ss7x3BOo.js} +2 -2
- package/ui-dist/assets/secrets-config-page-ss7x3BOo.js.gz +0 -0
- package/ui-dist/assets/security-config-HHz62oxH.js +1 -0
- package/ui-dist/assets/{select-DSuMhwVP.js → select-BVgD4EpG.js} +1 -1
- package/ui-dist/assets/select-BVgD4EpG.js.gz +0 -0
- package/ui-dist/assets/skeleton-ChUmcyys.js +1 -0
- package/ui-dist/assets/{tag-chip-DFBLgsGf.js → tag-chip-DZ4ircUB.js} +1 -1
- package/ui-dist/assets/x-BWDRfVWL.js +1 -0
- package/ui-dist/index.html +21 -21
- package/ui-dist/index.html.gz +0 -0
- package/dist/nextclaw-cli-app-scOxgGRP.js.map +0 -1
- package/ui-dist/assets/api-DvpQWjTS.js.gz +0 -0
- package/ui-dist/assets/appearance-settings-page-U0m0ktu3.js.gz +0 -0
- package/ui-dist/assets/channels-list-page-BURQarD0.js.gz +0 -0
- package/ui-dist/assets/config-split-page-BrAQYTIl.js.gz +0 -0
- package/ui-dist/assets/confirm-dialog-DDJomLnO.js.gz +0 -0
- package/ui-dist/assets/desktop-update-config-BzZFhMv9.js +0 -1
- package/ui-dist/assets/desktop-update-config-BzZFhMv9.js.gz +0 -0
- package/ui-dist/assets/dist-DXbLo2b1.js.gz +0 -0
- package/ui-dist/assets/dist-NskPB_yW.js.gz +0 -0
- package/ui-dist/assets/doc-browser-DB22tQKU.js +0 -1
- package/ui-dist/assets/doc-browser-context-CnKV4gJy.js.gz +0 -0
- package/ui-dist/assets/doc-browser-sJjw9fl5.js +0 -1
- package/ui-dist/assets/doc-browser-sJjw9fl5.js.gz +0 -0
- package/ui-dist/assets/extensions-DvlFMpAs.js.gz +0 -0
- package/ui-dist/assets/index-Dc_ZMkmo.css +0 -1
- package/ui-dist/assets/index-Dc_ZMkmo.css.gz +0 -0
- package/ui-dist/assets/index-N1HnesBp.js +0 -109
- package/ui-dist/assets/index-N1HnesBp.js.gz +0 -0
- package/ui-dist/assets/loader-circle-BlPXxgDB.js +0 -1
- package/ui-dist/assets/mcp-marketplace-page-BIgFTbMq.js +0 -9
- package/ui-dist/assets/mcp-marketplace-page-BIgFTbMq.js.gz +0 -0
- package/ui-dist/assets/mcp-marketplace-page-CZN4ovdK.js +0 -1
- package/ui-dist/assets/model-config-page-CnSm7kfa.js +0 -1
- package/ui-dist/assets/model-config-page-CnSm7kfa.js.gz +0 -0
- package/ui-dist/assets/navigation-link-NjUdG6Vp.js.gz +0 -0
- package/ui-dist/assets/plus-DVXol9Q5.js +0 -1
- package/ui-dist/assets/privacy-settings-page-DVn2HU7W.js +0 -1
- package/ui-dist/assets/privacy-settings-page-DVn2HU7W.js.gz +0 -0
- package/ui-dist/assets/providers-config-page-CzHJS3eg.js +0 -1
- package/ui-dist/assets/providers-config-page-CzHJS3eg.js.gz +0 -0
- package/ui-dist/assets/react-DCVbGroo.js +0 -8
- package/ui-dist/assets/react-DCVbGroo.js.gz +0 -0
- package/ui-dist/assets/remote-B2lsJF1c.js +0 -1
- package/ui-dist/assets/runtime-config-page-D69buyGp.js +0 -1
- package/ui-dist/assets/runtime-config-page-D69buyGp.js.gz +0 -0
- package/ui-dist/assets/search-config-page-dqNT0Swf.js.gz +0 -0
- package/ui-dist/assets/secrets-config-page-De6J3wVx.js.gz +0 -0
- package/ui-dist/assets/security-config-Dcu9C4OL.js +0 -1
- package/ui-dist/assets/select-DSuMhwVP.js.gz +0 -0
- package/ui-dist/assets/skeleton-QoWydNLp.js +0 -1
- package/ui-dist/assets/x-BXvAzpjb.js +0 -1
package/dist/cli/app/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t as createNextclawDistribution } from "../../nextclaw-distribution.uti
|
|
|
3
3
|
import { NextclawDistributionService } from "@nextclaw/service";
|
|
4
4
|
//#region src/cli/app/index.ts
|
|
5
5
|
NextclawDistributionService.configureRuntime(createNextclawDistribution(import.meta.url));
|
|
6
|
-
const { nextclawCliProgram } = await import("../../nextclaw-cli-app-
|
|
6
|
+
const { nextclawCliProgram } = await import("../../nextclaw-cli-app-B_ffeXOD.js");
|
|
7
7
|
await nextclawCliProgram.parseAsync(process.argv);
|
|
8
8
|
//#endregion
|
|
9
9
|
export {};
|
|
@@ -12,6 +12,7 @@ import { access, mkdtemp, readFile, rm, stat } from "node:fs/promises";
|
|
|
12
12
|
import { AppBundleService, AppHomeService, AppInstanceInventoryService, AppInstanceStorageService, AppPlatformTargetService, AppPublishService, AppPublishValidationService } from "@nextclaw/app-runtime";
|
|
13
13
|
import { McpServiceAppRuntimeService, NextclawHarnessError, buildServiceActionId, getServiceAppManifestPath, mergeServiceAppRuntimeActions, readServiceAppManifest } from "@nextclaw/kernel";
|
|
14
14
|
import { format, promisify } from "node:util";
|
|
15
|
+
import { formatNextClawAppInstallCommand } from "@nextclaw/shared";
|
|
15
16
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
16
17
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
17
18
|
//#endregion
|
|
@@ -4874,6 +4875,179 @@ var AppValidatePublishCommandController = class {
|
|
|
4874
4875
|
};
|
|
4875
4876
|
};
|
|
4876
4877
|
//#endregion
|
|
4878
|
+
//#region src/cli/app/services/app-packages/app-marketplace-query.service.ts
|
|
4879
|
+
const DEFAULT_APPS_MARKETPLACE_API_BASE = "https://apps-registry.nextclaw.io";
|
|
4880
|
+
var AppMarketplaceQueryService = class {
|
|
4881
|
+
constructor(params = {}) {
|
|
4882
|
+
this.params = params;
|
|
4883
|
+
}
|
|
4884
|
+
search = async (options = {}) => {
|
|
4885
|
+
const search = new URLSearchParams();
|
|
4886
|
+
if (options.query?.trim()) search.set("q", options.query.trim());
|
|
4887
|
+
if (options.tag?.trim()) search.set("tag", options.tag.trim());
|
|
4888
|
+
if (options.cursor?.trim()) search.set("cursor", options.cursor.trim());
|
|
4889
|
+
search.set("limit", String(this.normalizeLimit(options.limit)));
|
|
4890
|
+
return this.normalizeSearchResult(await this.request(`/api/v2/apps/items?${search.toString()}`));
|
|
4891
|
+
};
|
|
4892
|
+
info = async (selector) => {
|
|
4893
|
+
const normalized = selector.trim();
|
|
4894
|
+
if (!normalized) throw new Error("Marketplace app selector is required.");
|
|
4895
|
+
return this.normalizeItem(await this.request(`/api/v1/apps/items/${encodeURIComponent(normalized)}`));
|
|
4896
|
+
};
|
|
4897
|
+
request = async (pathname) => {
|
|
4898
|
+
const response = await (this.params.fetchImpl ?? fetch)(`${this.apiBaseUrl}${pathname}`, { headers: { accept: "application/json" } });
|
|
4899
|
+
const payload = await response.json().catch(() => null);
|
|
4900
|
+
if (!response.ok || !payload?.ok) throw new Error(`Apps marketplace request failed: ${response.status} ${response.statusText}`);
|
|
4901
|
+
return payload.data;
|
|
4902
|
+
};
|
|
4903
|
+
normalizeSearchResult = (result) => ({
|
|
4904
|
+
...result,
|
|
4905
|
+
items: result.items.map((item) => this.normalizeItem(item))
|
|
4906
|
+
});
|
|
4907
|
+
normalizeItem = (item) => ({
|
|
4908
|
+
...item,
|
|
4909
|
+
install: {
|
|
4910
|
+
spec: item.install.spec,
|
|
4911
|
+
registry: item.install.registry
|
|
4912
|
+
}
|
|
4913
|
+
});
|
|
4914
|
+
get apiBaseUrl() {
|
|
4915
|
+
return (this.params.apiBaseUrl ?? DEFAULT_APPS_MARKETPLACE_API_BASE).replace(/\/+$/, "");
|
|
4916
|
+
}
|
|
4917
|
+
normalizeLimit = (limit) => {
|
|
4918
|
+
if (limit === void 0) return 24;
|
|
4919
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error("--limit must be an integer between 1 and 100.");
|
|
4920
|
+
return limit;
|
|
4921
|
+
};
|
|
4922
|
+
};
|
|
4923
|
+
//#endregion
|
|
4924
|
+
//#region src/cli/app/services/local-api/app-package-live.service.ts
|
|
4925
|
+
var AppPackageLiveService = class {
|
|
4926
|
+
constructor(params = {}) {
|
|
4927
|
+
this.params = params;
|
|
4928
|
+
}
|
|
4929
|
+
list = async () => await this.requireApiClient().request({ path: "/api/app-packages" });
|
|
4930
|
+
info = async (appId) => await this.requireApiClient().request({ path: `/api/app-packages/${encodeURIComponent(this.requireId(appId))}` });
|
|
4931
|
+
listOperations = async () => await this.requireApiClient().request({ path: "/api/app-package-operations" });
|
|
4932
|
+
install = async (source, registryUrl) => await this.requireApiClient().request({
|
|
4933
|
+
path: "/api/app-package-operations/install",
|
|
4934
|
+
method: "POST",
|
|
4935
|
+
body: {
|
|
4936
|
+
source: this.requireSource(source),
|
|
4937
|
+
registryUrl
|
|
4938
|
+
}
|
|
4939
|
+
});
|
|
4940
|
+
enable = async (appId) => await this.changeEnabled(appId, "enable");
|
|
4941
|
+
disable = async (appId) => await this.changeEnabled(appId, "disable");
|
|
4942
|
+
update = async (appId, options) => await this.requireApiClient().request({
|
|
4943
|
+
path: `/api/app-package-operations/${encodeURIComponent(this.requireId(appId))}/update`,
|
|
4944
|
+
method: "POST",
|
|
4945
|
+
body: options
|
|
4946
|
+
});
|
|
4947
|
+
rollback = async (appId, version) => await this.requireApiClient().request({
|
|
4948
|
+
path: `/api/app-package-operations/${encodeURIComponent(this.requireId(appId))}/rollback`,
|
|
4949
|
+
method: "POST",
|
|
4950
|
+
body: { version: this.requireVersion(version) }
|
|
4951
|
+
});
|
|
4952
|
+
uninstall = async (appId, purgeData) => await this.requireApiClient().request({
|
|
4953
|
+
path: `/api/app-package-operations/${encodeURIComponent(this.requireId(appId))}/uninstall`,
|
|
4954
|
+
method: "POST",
|
|
4955
|
+
body: { purgeData }
|
|
4956
|
+
});
|
|
4957
|
+
changeEnabled = async (appId, action) => await this.requireApiClient().request({
|
|
4958
|
+
path: `/api/app-packages/${encodeURIComponent(this.requireId(appId))}/${action}`,
|
|
4959
|
+
method: "POST"
|
|
4960
|
+
});
|
|
4961
|
+
requireApiClient = () => {
|
|
4962
|
+
const client = this.params.createApiClient ? this.params.createApiClient() : createLocalUiApiClient();
|
|
4963
|
+
if (!client) throw new Error("NextClaw UI runtime is not running; start NextClaw before managing Apps.");
|
|
4964
|
+
return client;
|
|
4965
|
+
};
|
|
4966
|
+
requireId = (value) => this.requireValue(value, "App id");
|
|
4967
|
+
requireSource = (value) => this.requireValue(value, "App install source");
|
|
4968
|
+
requireVersion = (value) => this.requireValue(value, "App version");
|
|
4969
|
+
requireValue = (value, name) => {
|
|
4970
|
+
const normalized = value.trim();
|
|
4971
|
+
if (!normalized) throw new Error(`${name} is required.`);
|
|
4972
|
+
return normalized;
|
|
4973
|
+
};
|
|
4974
|
+
};
|
|
4975
|
+
//#endregion
|
|
4976
|
+
//#region src/cli/app/controllers/app-packages/app-package-command.controller.ts
|
|
4977
|
+
var AppPackageCommandController = class {
|
|
4978
|
+
constructor(liveService = new AppPackageLiveService(), marketplaceService = new AppMarketplaceQueryService()) {
|
|
4979
|
+
this.liveService = liveService;
|
|
4980
|
+
this.marketplaceService = marketplaceService;
|
|
4981
|
+
}
|
|
4982
|
+
searchMarketplace = async (options) => {
|
|
4983
|
+
const { query, tag, cursor, limit } = options;
|
|
4984
|
+
const result = await this.marketplaceService.search({
|
|
4985
|
+
query,
|
|
4986
|
+
tag,
|
|
4987
|
+
cursor,
|
|
4988
|
+
limit: limit === void 0 ? void 0 : Number(limit)
|
|
4989
|
+
});
|
|
4990
|
+
this.write(result, options, this.formatMarketplaceSearch);
|
|
4991
|
+
};
|
|
4992
|
+
marketplaceInfo = async (selector, options) => this.write(await this.marketplaceService.info(selector), options, this.formatMarketplaceInfo);
|
|
4993
|
+
list = async (options) => this.write(await this.liveService.list(), options, this.formatList);
|
|
4994
|
+
info = async (appId, options) => this.write(await this.liveService.info(appId), options, this.formatApp);
|
|
4995
|
+
operations = async (options) => this.write(await this.liveService.listOperations(), options, this.formatOperations);
|
|
4996
|
+
install = async (source, options) => this.write(await this.liveService.install(source, options.registry), options, this.formatOperation);
|
|
4997
|
+
enable = async (appId, options) => this.write(await this.liveService.enable(appId), options, this.formatApp);
|
|
4998
|
+
disable = async (appId, options) => this.write(await this.liveService.disable(appId), options, this.formatApp);
|
|
4999
|
+
update = async (appId, options) => this.write(await this.liveService.update(appId, {
|
|
5000
|
+
version: options.version,
|
|
5001
|
+
registryUrl: options.registry
|
|
5002
|
+
}), options, this.formatOperation);
|
|
5003
|
+
rollback = async (appId, options) => this.write(await this.liveService.rollback(appId, options.version), options, this.formatOperation);
|
|
5004
|
+
uninstall = async (appId, options) => {
|
|
5005
|
+
const { purgeData, confirm } = options;
|
|
5006
|
+
if (purgeData) this.requirePurgeConfirmation(appId, confirm);
|
|
5007
|
+
this.write(await this.liveService.uninstall(appId, purgeData === true), options, this.formatOperation);
|
|
5008
|
+
};
|
|
5009
|
+
write = (result, options, format) => {
|
|
5010
|
+
process.stdout.write(options.json ? `${JSON.stringify(result, null, 2)}\n` : format(result));
|
|
5011
|
+
};
|
|
5012
|
+
formatMarketplaceSearch = (result) => {
|
|
5013
|
+
if (result.items.length === 0) return "No Marketplace Apps found.\n";
|
|
5014
|
+
return `${result.items.map((item) => this.formatMarketplaceInfo(item).trim()).join("\n\n")}\n`;
|
|
5015
|
+
};
|
|
5016
|
+
formatMarketplaceInfo = (item) => [
|
|
5017
|
+
`${item.name} (${item.appId})`,
|
|
5018
|
+
` summary: ${item.summary}`,
|
|
5019
|
+
` version: ${item.latestVersion}`,
|
|
5020
|
+
` author: ${item.author}`,
|
|
5021
|
+
` tags: ${item.tags.join(", ") || "-"}`,
|
|
5022
|
+
` install: ${formatNextClawAppInstallCommand(item.install.spec)}`
|
|
5023
|
+
].join("\n") + "\n";
|
|
5024
|
+
formatList = (result) => {
|
|
5025
|
+
if (result.entries.length === 0) return "Apps: none\n";
|
|
5026
|
+
return `${result.entries.map((app) => this.formatApp(app).trim()).join("\n\n")}\n`;
|
|
5027
|
+
};
|
|
5028
|
+
formatApp = (app) => [
|
|
5029
|
+
`${app.name} (${app.id})`,
|
|
5030
|
+
` version: ${app.activeVersion}`,
|
|
5031
|
+
` enabled: ${app.enabled ? "yes" : "no"}`,
|
|
5032
|
+
` built-in: ${app.builtIn ? "yes" : "no"}`,
|
|
5033
|
+
` versions: ${app.installedVersions.join(", ")}`
|
|
5034
|
+
].join("\n") + "\n";
|
|
5035
|
+
formatOperations = (result) => {
|
|
5036
|
+
if (result.entries.length === 0) return "App operations: none\n";
|
|
5037
|
+
return `${result.entries.map((operation) => this.formatOperation(operation).trim()).join("\n\n")}\n`;
|
|
5038
|
+
};
|
|
5039
|
+
formatOperation = (operation) => [
|
|
5040
|
+
`App operation ${operation.id}`,
|
|
5041
|
+
` action: ${operation.action}`,
|
|
5042
|
+
` status: ${operation.status}`,
|
|
5043
|
+
` app: ${operation.appId ?? operation.source ?? "-"}`,
|
|
5044
|
+
operation.error ? ` error: ${operation.error}` : ""
|
|
5045
|
+
].filter(Boolean).join("\n") + "\n";
|
|
5046
|
+
requirePurgeConfirmation = (appId, confirmation) => {
|
|
5047
|
+
if (confirmation?.trim() !== appId.trim()) throw new Error("--purge-data requires --confirm <app-id> matching the exact App id.");
|
|
5048
|
+
};
|
|
5049
|
+
};
|
|
5050
|
+
//#endregion
|
|
4877
5051
|
//#region src/cli/app/register-app-commands.ts
|
|
4878
5052
|
function registerAppCommands(program) {
|
|
4879
5053
|
const app = program.command("app").description("Develop, validate, and publish NextClaw apps");
|
|
@@ -4885,6 +5059,7 @@ function registerAppCommands(program) {
|
|
|
4885
5059
|
const appPack = new AppPackCommandController();
|
|
4886
5060
|
const appValidatePublish = new AppValidatePublishCommandController();
|
|
4887
5061
|
const appPublish = new AppPublishCommandController();
|
|
5062
|
+
const appPackages = new AppPackageCommandController();
|
|
4888
5063
|
app.command("pack <app-dir>").description("Pack one declared platform target as a NextClaw App artifact").requiredOption("--target <target-key>", "Pack a declared platform target").requiredOption("--out <path>", "Write the .napp artifact to a specific path").option("--json", "Output JSON", false).action(async (target, opts) => appPack.pack(target, opts));
|
|
4889
5064
|
app.command("validate-publish <app-dir>").description("Validate a NextClaw Mini App before Marketplace submission").option("--meta <path>", "Use a custom marketplace metadata file").option("--artifacts <dir>", "Use target-keyed .napp artifacts from a directory").option("--json", "Output JSON", false).action(async (target, opts) => appValidatePublish.validate(target, opts));
|
|
4890
5065
|
app.command("publish <app-dir>").description("Submit a NextClaw Mini App to the App Marketplace").option("--meta <path>", "Use a custom marketplace metadata file").option("--artifacts <dir>", "Publish target-keyed .napp artifacts from a directory").option("--allow-warnings", "Submit after reviewing validation warnings", false).option("--json", "Output JSON", false).action(async (target, opts) => appPublish.publish(target, opts));
|
|
@@ -4895,6 +5070,21 @@ function registerAppCommands(program) {
|
|
|
4895
5070
|
data.command("delete <data-id>").description("Permanently delete a retained App data instance").requiredOption("--confirm <app-id>", "Confirm the exact App id").option("--json", "Output JSON", false).action(async (dataId, opts) => appData.deleteRetained(dataId, opts));
|
|
4896
5071
|
app.command("call <service-app-dir> <action-name>").description("Call a Service App action through the real runtime").option("--input <json>", "JSON object input for the action").option("--json", "Output JSON", false).action(async (target, actionName, opts) => appCall.call(target, actionName, opts));
|
|
4897
5072
|
app.command("restart <app-id>").description("Restart a live Service App runtime in the running NextClaw UI").option("--json", "Output JSON", false).action(async (appId, opts) => appRestart.restart(appId, opts));
|
|
5073
|
+
registerAppPackageCommands(app, appPackages);
|
|
5074
|
+
}
|
|
5075
|
+
function registerAppPackageCommands(app, appPackages) {
|
|
5076
|
+
const marketplace = app.command("marketplace").description("Browse NextClaw App Marketplace");
|
|
5077
|
+
marketplace.command("search").description("Search Apps in NextClaw App Marketplace").option("-q, --query <text>", "Search text").option("--tag <tag>", "Filter by tag").option("--cursor <cursor>", "Continue from a marketplace cursor").option("--limit <n>", "Maximum number of items").option("--json", "Output JSON", false).action(async (opts) => appPackages.searchMarketplace(opts));
|
|
5078
|
+
marketplace.command("info <selector>").description("Show an App Marketplace item").option("--json", "Output JSON", false).action(async (selector, opts) => appPackages.marketplaceInfo(selector, opts));
|
|
5079
|
+
app.command("list").description("List Apps installed in the running NextClaw host").option("--json", "Output JSON", false).action(async (opts) => appPackages.list(opts));
|
|
5080
|
+
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));
|
|
5081
|
+
app.command("operations").description("List App install, update, rollback, and uninstall operations").option("--json", "Output JSON", false).action(async (opts) => appPackages.operations(opts));
|
|
5082
|
+
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));
|
|
5083
|
+
app.command("enable <app-id>").description("Enable an installed App").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.enable(appId, opts));
|
|
5084
|
+
app.command("disable <app-id>").description("Disable an installed App").option("--json", "Output JSON", false).action(async (appId, opts) => appPackages.disable(appId, opts));
|
|
5085
|
+
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));
|
|
5086
|
+
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));
|
|
5087
|
+
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));
|
|
4898
5088
|
}
|
|
4899
5089
|
//#endregion
|
|
4900
5090
|
//#region src/cli/app/register-project-commands.ts
|
|
@@ -4913,6 +5103,7 @@ function registerSessionCommands(program, nextclaw) {
|
|
|
4913
5103
|
sessions.command("rename <session-id> <label>").description("Rename a session").option("--json", "Output JSON", false).action((sessionId, label, options) => commands.rename(sessionId, label, options));
|
|
4914
5104
|
sessions.command("set-project <session-id> <directory>").description("Bind a session to an existing project directory").option("--json", "Output JSON", false).action((sessionId, directory, options) => commands.setProject(sessionId, directory, options));
|
|
4915
5105
|
sessions.command("clear-project <session-id>").description("Clear a session project binding").option("--json", "Output JSON", false).action((sessionId, options) => commands.clearProject(sessionId, options));
|
|
5106
|
+
sessions.command("delete <session-id>").description("Permanently delete a session").requiredOption("--confirm <session-id>", "Confirm the exact session id").option("--json", "Output JSON", false).action((sessionId, options) => commands.delete(sessionId, options));
|
|
4916
5107
|
}
|
|
4917
5108
|
//#endregion
|
|
4918
5109
|
//#region src/cli/app/controllers/exec-command.controller.ts
|
|
@@ -5164,4 +5355,4 @@ program.command("usage").description("Show observed LLM usage snapshots, history
|
|
|
5164
5355
|
//#endregion
|
|
5165
5356
|
export { program as nextclawCliProgram };
|
|
5166
5357
|
|
|
5167
|
-
//# sourceMappingURL=nextclaw-cli-app-
|
|
5358
|
+
//# sourceMappingURL=nextclaw-cli-app-B_ffeXOD.js.map
|