@nextclaw/app-runtime 0.13.2 → 0.13.3
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/README.md +21 -223
- package/dist/controllers/publish.controller.d.ts.map +1 -1
- package/dist/controllers/publish.controller.js +2 -1
- package/dist/controllers/publish.controller.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/types/app-publish.types.d.ts +0 -1
- package/dist/types/app-publish.types.d.ts.map +1 -1
- package/dist/types/app-publish.types.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,239 +1,37 @@
|
|
|
1
1
|
# NextClaw App Runtime
|
|
2
2
|
|
|
3
|
-
`@nextclaw/app-runtime`
|
|
3
|
+
`@nextclaw/app-runtime` is the independently published runtime package that powers NextClaw Mini Apps. It owns artifact validation, package formats, local package state, and the runtime contracts used by the NextClaw host.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install Mini Apps
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- `napp inspect <app-dir>`:校验应用目录与 manifest
|
|
9
|
-
- `napp doctor`:检查本机 NApp/WASI HTTP 开发运行环境
|
|
10
|
-
- `napp build <app-dir> --install`:安装模板依赖并构建 TS/WASI HTTP 后端
|
|
11
|
-
- `napp run <app-dir|app-id>`:启动本地宿主,支持目录运行和已安装应用运行
|
|
12
|
-
- `napp dev <app-dir>`:当前等价于 `run`
|
|
13
|
-
- `napp pack <app-dir>`:把应用目录打成 `.napp` 分发包;独立应用默认使用轻量 `source`,组合包默认使用安全的 `bundle`
|
|
14
|
-
- `napp validate-publish <app-dir>`:本地做发布前校验并输出体积/包内容 warning
|
|
15
|
-
- `napp publish <app-dir>`:把应用目录发布到官方 apps registry;独立应用默认使用 `source`,组合包默认使用 `bundle`
|
|
16
|
-
- `napp install <app-dir|bundle.napp|app-id[@version]>`:从本地或 registry 安装应用
|
|
17
|
-
- `napp update <app-id>`:更新已安装应用
|
|
18
|
-
- `napp uninstall <app-id>`:卸载已安装应用,默认保留受管实例数据;增加 `--purge-data` 才会同时删除
|
|
19
|
-
- `napp list`:列出已安装应用
|
|
20
|
-
- `napp info <app-id>`:查看已安装应用详情
|
|
21
|
-
- `napp registry [get|set|reset]`:查看或切换 registry
|
|
22
|
-
- `napp permissions <app-id>`:查看应用权限状态
|
|
23
|
-
- `napp grant <app-id> --document scope=/path`:写入目录授权
|
|
24
|
-
- `napp revoke <app-id> --document scope`:撤销目录授权
|
|
25
|
-
|
|
26
|
-
## 安装
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npm install -g @nextclaw/app-runtime
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
安装后可用:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
napp --help
|
|
36
|
-
napp --version
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
当前版本先聚焦“独立可运行的微应用宿主 + 可分发、可安装、可更新、可授权的 CLI/runtime 闭环”。普通用户入口推荐通过 NextClaw 的 `nextclaw-app-runtime` skill 编排这些命令。
|
|
40
|
-
|
|
41
|
-
## 应用目录
|
|
42
|
-
|
|
43
|
-
```text
|
|
44
|
-
manifest.json
|
|
45
|
-
main/
|
|
46
|
-
app.wasm
|
|
47
|
-
package.json # ts-http / ts-http-lite 模板存在
|
|
48
|
-
src/ # ts-http / ts-http-lite 模板存在
|
|
49
|
-
ui/
|
|
50
|
-
index.html
|
|
51
|
-
assets/
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## 当前 MVP 范围
|
|
55
|
-
|
|
56
|
-
- `main` 执行形态:`wasm` 或 `wasi-http-component`
|
|
57
|
-
- UI 装载:本地静态服务
|
|
58
|
-
- 宿主桥接:`/__napp/*`
|
|
59
|
-
- WASI HTTP 业务 API:`/api/*`
|
|
60
|
-
- 权限词汇:`documentAccess`、`allowedDomains`、`storage`、`capabilities`
|
|
61
|
-
- 当前 Wasm 执行底座:Node 原生 `WebAssembly` 与 Wasmtime `serve`
|
|
62
|
-
- 分发包形态:`.napp`(底层为 zip,支持 `source` / `bundle` 双模式)
|
|
63
|
-
- 安装目录:`~/.nextclaw/apps/packages/<app-id>/<version>/`
|
|
64
|
-
- 受管实例目录:`~/.nextclaw/apps/instances/<app-id>/default/`
|
|
65
|
-
- 受管实例分类:`data/`、`config/`、`state/`、`cache/`、`tmp/`、`logs/`,并由 `metadata.json` 记录稳定身份
|
|
66
|
-
- 旧用户数据目录:`~/.nextclaw/apps/data/<app-id>/`(首次使用时原子迁移到受管实例)
|
|
67
|
-
- 本地 registry:`~/.nextclaw/apps/registry.json`
|
|
68
|
-
- 本地 config:`~/.nextclaw/apps/config.json`
|
|
69
|
-
- 默认 registry:`https://apps-registry.nextclaw.io/api/v1/apps/registry/`
|
|
70
|
-
|
|
71
|
-
## 当前 MVP 工作流
|
|
72
|
-
|
|
73
|
-
开发者工作流:
|
|
7
|
+
Use the NextClaw CLI for every user or AI-facing Mini App action:
|
|
74
8
|
|
|
75
9
|
```bash
|
|
76
|
-
napp
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
10
|
+
nextclaw app install <app-id|local-app-directory|bundle.napp>
|
|
11
|
+
nextclaw app list
|
|
12
|
+
nextclaw app info <app-id>
|
|
13
|
+
nextclaw app enable <app-id>
|
|
14
|
+
nextclaw app disable <app-id>
|
|
15
|
+
nextclaw app update <app-id>
|
|
16
|
+
nextclaw app rollback <app-id> --version <version>
|
|
17
|
+
nextclaw app uninstall <app-id> --confirm <app-id>
|
|
84
18
|
```
|
|
85
19
|
|
|
86
|
-
|
|
20
|
+
The install source may be an App Marketplace identifier, a local app directory, or a local `.napp` bundle. The host records an operation receipt; use `nextclaw app operations --json` to inspect its progress and result.
|
|
87
21
|
|
|
88
|
-
|
|
89
|
-
napp doctor
|
|
90
|
-
napp create ./my-small-napp --template ts-http-lite
|
|
91
|
-
napp build ./my-small-napp --install
|
|
92
|
-
napp validate-publish ./my-small-napp
|
|
93
|
-
napp run ./my-small-napp --data ./my-small-napp/.napp/data
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
本地安装工作流:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
napp install ./my-first-napp
|
|
100
|
-
napp list
|
|
101
|
-
napp info nextclaw.my-first-napp
|
|
102
|
-
napp run nextclaw.my-first-napp
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
registry 安装与更新工作流:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
napp registry set https://registry.example.com/
|
|
109
|
-
napp install nextclaw.hello-notes
|
|
110
|
-
napp permissions nextclaw.hello-notes
|
|
111
|
-
napp grant nextclaw.hello-notes --document notes=/absolute/path/to/notes
|
|
112
|
-
napp run nextclaw.hello-notes
|
|
113
|
-
napp update nextclaw.hello-notes
|
|
114
|
-
```
|
|
22
|
+
## For Runtime Integrators
|
|
115
23
|
|
|
116
|
-
|
|
24
|
+
The package remains independently published so the NextClaw host and build tooling can consume its stable runtime contracts. Its package and registry implementation are not a second public product surface. Use the `nextclaw app` CLI and the NextClaw documentation for supported operations.
|
|
117
25
|
|
|
118
|
-
|
|
119
|
-
napp revoke nextclaw.my-first-napp --document notes
|
|
120
|
-
napp uninstall nextclaw.my-first-napp
|
|
121
|
-
napp uninstall nextclaw.my-first-napp --purge-data
|
|
122
|
-
```
|
|
26
|
+
## Package Formats
|
|
123
27
|
|
|
124
|
-
|
|
28
|
+
Mini Apps use a `.napp` container. A package may be distributed as either:
|
|
125
29
|
|
|
126
|
-
|
|
30
|
+
- `source`: source, UI assets, and manifest are materialized locally at install time.
|
|
31
|
+
- `bundle`: a ready-to-run `main/app.wasm` is included for deterministic or offline delivery.
|
|
127
32
|
|
|
128
|
-
|
|
129
|
-
nextclaw app data list --json
|
|
130
|
-
nextclaw app data delete <data-id> --confirm <app-id> --json
|
|
131
|
-
```
|
|
33
|
+
Both variants carry a manifest and checksums. The runtime installs package code separately from each managed App instance, so uninstalling a package can retain the instance data unless the caller explicitly requests data removal.
|
|
132
34
|
|
|
133
|
-
|
|
35
|
+
## Registry Metadata
|
|
134
36
|
|
|
135
|
-
|
|
136
|
-
nextclaw app dev <service-app-dir> --reset-data --confirm <app-id> --json
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## 示例
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
napp create ./my-first-napp
|
|
143
|
-
napp inspect ./my-first-napp
|
|
144
|
-
napp pack ./my-first-napp
|
|
145
|
-
napp install ./my-first-napp
|
|
146
|
-
napp list
|
|
147
|
-
napp info nextclaw.my-first-napp
|
|
148
|
-
napp permissions nextclaw.my-first-napp
|
|
149
|
-
napp run nextclaw.my-first-napp
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
模板选择建议:
|
|
153
|
-
|
|
154
|
-
- `ts-http`:默认推荐,开发体验优先,适合大多数普通前后端小应用
|
|
155
|
-
- `ts-http-lite`:体积优先,继续走官方 WASI HTTP 路线,但不使用默认 Hono 路由层
|
|
156
|
-
|
|
157
|
-
已有示例应用:
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
napp inspect ./apps/examples/hello-notes
|
|
161
|
-
napp pack ./apps/examples/hello-notes
|
|
162
|
-
napp publish ./apps/examples/hello-notes
|
|
163
|
-
napp install ./apps/examples/hello-notes
|
|
164
|
-
napp grant nextclaw.hello-notes --document notes=/absolute/path/to/notes
|
|
165
|
-
napp run ./apps/examples/hello-notes --document notes=/absolute/path/to/notes
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
registry 示例:
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
napp registry get
|
|
172
|
-
napp registry set https://registry.example.com/
|
|
173
|
-
napp install nextclaw.hello-notes
|
|
174
|
-
napp update nextclaw.hello-notes
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
官方 apps 入口:
|
|
178
|
-
|
|
179
|
-
- Web:`https://apps.nextclaw.io`
|
|
180
|
-
- Registry/API:`https://apps-registry.nextclaw.io`
|
|
181
|
-
|
|
182
|
-
## Bundle 结构
|
|
183
|
-
|
|
184
|
-
`.napp` bundle 的最小结构如下:
|
|
185
|
-
|
|
186
|
-
```text
|
|
187
|
-
manifest.json
|
|
188
|
-
main/
|
|
189
|
-
ui/
|
|
190
|
-
assets/
|
|
191
|
-
.napp/
|
|
192
|
-
bundle.json
|
|
193
|
-
checksums.json
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## 分发模式
|
|
197
|
-
|
|
198
|
-
`.napp` 仍然是统一容器,但现在支持两种分发模式:
|
|
199
|
-
|
|
200
|
-
- `source`:默认模式。包里主要是用户源码、UI、资源和 manifest;安装时本地物化成运行态,适合轻量分发。
|
|
201
|
-
- `bundle`:显式模式。包里直接带运行态 `main/app.wasm`,适合高级用户、确定性发布或离线场景。
|
|
202
|
-
|
|
203
|
-
命令示例:
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
napp validate-publish ./my-first-napp --mode source
|
|
207
|
-
napp pack ./my-first-napp --mode source
|
|
208
|
-
napp publish ./my-first-napp --mode source
|
|
209
|
-
napp pack ./my-first-napp --mode bundle
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Registry Metadata 结构
|
|
213
|
-
|
|
214
|
-
registry 按 npm 风格使用一个 base URL,再按 app id 拉取 metadata 文档。metadata 的最小结构如下:
|
|
215
|
-
|
|
216
|
-
```json
|
|
217
|
-
{
|
|
218
|
-
"name": "nextclaw.hello-notes",
|
|
219
|
-
"description": "Registry-hosted Hello Notes",
|
|
220
|
-
"dist-tags": {
|
|
221
|
-
"latest": "0.2.0"
|
|
222
|
-
},
|
|
223
|
-
"versions": {
|
|
224
|
-
"0.2.0": {
|
|
225
|
-
"name": "nextclaw.hello-notes",
|
|
226
|
-
"version": "0.2.0",
|
|
227
|
-
"publisher": {
|
|
228
|
-
"id": "nextclaw",
|
|
229
|
-
"name": "NextClaw Official"
|
|
230
|
-
},
|
|
231
|
-
"dist": {
|
|
232
|
-
"kind": "source",
|
|
233
|
-
"bundle": "./-/hello-notes-0.2.0.napp",
|
|
234
|
-
"sha256": "<sha256>"
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
```
|
|
37
|
+
The registry stores package metadata, versions, publisher identity, distribution location, and integrity data. It does not store a per-App install command: clients derive the single supported command from the app identifier.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.controller.d.ts","names":[],"sources":["../../src/controllers/publish.controller.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"publish.controller.d.ts","names":[],"sources":["../../src/controllers/publish.controller.ts"],"mappings":";;;cAGa,cAAA;EAAA,iBAEQ,cAAA;cAAA,cAAA,GAAgB,iBAAA;EAGnC,GAAA,GAAa,MAAA;IACX,YAAA;IACA,YAAA;IACA,UAAA;IACA,KAAA;IACA,IAAA;IACA,IAAA;IACA,KAAA,GAAQ,IAAA;EAAA,MACN,OAAA;AAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppPublishService } from "../services/app-publish.service.js";
|
|
2
|
+
import { formatNextClawAppInstallCommand } from "@nextclaw/shared";
|
|
2
3
|
//#region src/controllers/publish.controller.ts
|
|
3
4
|
var PublishCommand = class {
|
|
4
5
|
constructor(publishService = new AppPublishService()) {
|
|
@@ -30,7 +31,7 @@ var PublishCommand = class {
|
|
|
30
31
|
write(`${result.created ? "Published" : "Updated"} ${result.item.name} (${result.item.appId}) ${result.item.latestVersion}\n`);
|
|
31
32
|
write(`Distribution: ${result.distribution.path} (${result.distribution.mode})\n`);
|
|
32
33
|
if (result.item.webUrl) write(`Details: ${result.item.webUrl}\n`);
|
|
33
|
-
write(`Install: ${result.item.install.
|
|
34
|
+
write(`Install: ${formatNextClawAppInstallCommand(result.item.install.spec)}\n`);
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
37
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.controller.js","names":[],"sources":["../../src/controllers/publish.controller.ts"],"sourcesContent":["import { AppPublishService } from \"#app-runtime/services/app-publish.service.js\";\n\nexport class PublishCommand {\n constructor(\n private readonly publishService: AppPublishService = new AppPublishService(),\n ) {}\n\n run = async (params: {\n appDirectory: string;\n metadataPath?: string;\n apiBaseUrl?: string;\n token?: string;\n mode?: \"source\" | \"bundle\";\n json: boolean;\n write: (text: string) => void;\n }): Promise<void> => {\n const { appDirectory, metadataPath, apiBaseUrl, token, mode, json, write } = params;\n const result = await this.publishService.publish({\n appDirectory,\n metadataPath,\n apiBaseUrl,\n token,\n mode,\n });\n if (json) {\n write(`${JSON.stringify({ ok: true, publish: result }, null, 2)}\\n`);\n return;\n }\n if (result.item.publishStatus === \"pending\") {\n write(\n `Submitted ${result.item.name} (${result.item.appId}) ${result.item.latestVersion} for review.\\n`,\n );\n write(\"Status: pending\\n\");\n write(\"The app will appear in the App Marketplace after approval.\\n\");\n write(\"Manage submissions: https://platform.nextclaw.io/apps\\n\");\n return;\n }\n write(\n `${result.created ? \"Published\" : \"Updated\"} ${result.item.name} (${result.item.appId}) ${result.item.latestVersion}\\n`,\n );\n write(`Distribution: ${result.distribution.path} (${result.distribution.mode})\\n`);\n if (result.item.webUrl) {\n write(`Details: ${result.item.webUrl}\\n`);\n }\n write(`Install: ${result.item.install.
|
|
1
|
+
{"version":3,"file":"publish.controller.js","names":[],"sources":["../../src/controllers/publish.controller.ts"],"sourcesContent":["import { AppPublishService } from \"#app-runtime/services/app-publish.service.js\";\nimport { formatNextClawAppInstallCommand } from \"@nextclaw/shared\";\n\nexport class PublishCommand {\n constructor(\n private readonly publishService: AppPublishService = new AppPublishService(),\n ) {}\n\n run = async (params: {\n appDirectory: string;\n metadataPath?: string;\n apiBaseUrl?: string;\n token?: string;\n mode?: \"source\" | \"bundle\";\n json: boolean;\n write: (text: string) => void;\n }): Promise<void> => {\n const { appDirectory, metadataPath, apiBaseUrl, token, mode, json, write } = params;\n const result = await this.publishService.publish({\n appDirectory,\n metadataPath,\n apiBaseUrl,\n token,\n mode,\n });\n if (json) {\n write(`${JSON.stringify({ ok: true, publish: result }, null, 2)}\\n`);\n return;\n }\n if (result.item.publishStatus === \"pending\") {\n write(\n `Submitted ${result.item.name} (${result.item.appId}) ${result.item.latestVersion} for review.\\n`,\n );\n write(\"Status: pending\\n\");\n write(\"The app will appear in the App Marketplace after approval.\\n\");\n write(\"Manage submissions: https://platform.nextclaw.io/apps\\n\");\n return;\n }\n write(\n `${result.created ? \"Published\" : \"Updated\"} ${result.item.name} (${result.item.appId}) ${result.item.latestVersion}\\n`,\n );\n write(`Distribution: ${result.distribution.path} (${result.distribution.mode})\\n`);\n if (result.item.webUrl) {\n write(`Details: ${result.item.webUrl}\\n`);\n }\n write(`Install: ${formatNextClawAppInstallCommand(result.item.install.spec)}\\n`);\n };\n}\n"],"mappings":";;;AAGA,IAAa,iBAAb,MAA4B;CAC1B,YACE,iBAAqD,IAAI,mBAAmB,EAC5E;AADiB,OAAA,iBAAA;;CAGnB,MAAM,OAAO,WAQQ;EACnB,MAAM,EAAE,cAAc,cAAc,YAAY,OAAO,MAAM,MAAM,UAAU;EAC7E,MAAM,SAAS,MAAM,KAAK,eAAe,QAAQ;GAC/C;GACA;GACA;GACA;GACA;GACD,CAAC;AACF,MAAI,MAAM;AACR,SAAM,GAAG,KAAK,UAAU;IAAE,IAAI;IAAM,SAAS;IAAQ,EAAE,MAAM,EAAE,CAAC,IAAI;AACpE;;AAEF,MAAI,OAAO,KAAK,kBAAkB,WAAW;AAC3C,SACE,aAAa,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,cAAc,gBACnF;AACD,SAAM,oBAAoB;AAC1B,SAAM,+DAA+D;AACrE,SAAM,0DAA0D;AAChE;;AAEF,QACE,GAAG,OAAO,UAAU,cAAc,UAAU,GAAG,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,cAAc,IACrH;AACD,QAAM,iBAAiB,OAAO,aAAa,KAAK,IAAI,OAAO,aAAa,KAAK,KAAK;AAClF,MAAI,OAAO,KAAK,OACd,OAAM,YAAY,OAAO,KAAK,OAAO,IAAI;AAE3C,QAAM,YAAY,gCAAgC,OAAO,KAAK,QAAQ,KAAK,CAAC,IAAI"}
|
package/dist/package.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-publish.types.d.ts","names":[],"sources":["../../src/types/app-publish.types.ts"],"mappings":";;;;;cAQa,gCAAA;AAAA,KAGD,qBAAA;EACV,KAAA;EACA,WAAA;AAAA;AAAA,KAGU,sBAAA;EACV,IAAA;EACA,OAAA;EACA,WAAA,EAAa,MAAA;EACb,WAAA;EACA,eAAA,GAAkB,MAAA;EAClB,MAAA;EACA,IAAA;EACA,UAAA;EACA,QAAA;EACA,QAAA;EACA,SAAA,GAAY,YAAA;EACZ,OAAA,GAAU,qBAAA;AAAA;AAAA,KAGA,cAAA;EACV,IAAA;EACA,aAAA;AAAA;AAAA,KAGU,kBAAA;EACV,MAAA,EAAQ,iBAAA;EACR,YAAA;EACA,YAAA;EACA,SAAA;AAAA;AAAA,KAGG,qBAAA;EACH,IAAA;EACA,KAAA;EACA,IAAA;EACA,OAAA;EACA,OAAA;EACA,WAAA,EAAa,MAAA;EACb,WAAA;EACA,eAAA,GAAkB,MAAA;EAClB,MAAA;EACA,IAAA;EACA,UAAA;EACA,QAAA;EACA,QAAA;EACA,SAAA,EAAW,YAAA;EACX,OAAA,GAAU,qBAAA;EACV,gBAAA,EAAkB,mBAAA;EAClB,QAAA,EAAU,WAAA;EACV,WAAA,EAAa,cAAA;EACb,KAAA,EAAO,cAAA;AAAA;AAAA,KAGG,iBAAA,GAAoB,qBAAA;EAE1B,YAAA;EACA,YAAA;EACA,SAAA;AAAA;EAGA,YAAA;EACA,YAAA;EACA,SAAA,EAAW,kBAAA;AAAA;AAAA,KAIL,gBAAA;EACV,OAAA;EACA,IAAA;IACE,IAAA;IACA,KAAA;IACA,UAAA;IACA,OAAA;IACA,aAAA;IACA,IAAA;IACA,aAAA;IACA,MAAA;IACA,OAAA;MACE,IAAA;MACA,IAAA;MACA,
|
|
1
|
+
{"version":3,"file":"app-publish.types.d.ts","names":[],"sources":["../../src/types/app-publish.types.ts"],"mappings":";;;;;cAQa,gCAAA;AAAA,KAGD,qBAAA;EACV,KAAA;EACA,WAAA;AAAA;AAAA,KAGU,sBAAA;EACV,IAAA;EACA,OAAA;EACA,WAAA,EAAa,MAAA;EACb,WAAA;EACA,eAAA,GAAkB,MAAA;EAClB,MAAA;EACA,IAAA;EACA,UAAA;EACA,QAAA;EACA,QAAA;EACA,SAAA,GAAY,YAAA;EACZ,OAAA,GAAU,qBAAA;AAAA;AAAA,KAGA,cAAA;EACV,IAAA;EACA,aAAA;AAAA;AAAA,KAGU,kBAAA;EACV,MAAA,EAAQ,iBAAA;EACR,YAAA;EACA,YAAA;EACA,SAAA;AAAA;AAAA,KAGG,qBAAA;EACH,IAAA;EACA,KAAA;EACA,IAAA;EACA,OAAA;EACA,OAAA;EACA,WAAA,EAAa,MAAA;EACb,WAAA;EACA,eAAA,GAAkB,MAAA;EAClB,MAAA;EACA,IAAA;EACA,UAAA;EACA,QAAA;EACA,QAAA;EACA,SAAA,EAAW,YAAA;EACX,OAAA,GAAU,qBAAA;EACV,gBAAA,EAAkB,mBAAA;EAClB,QAAA,EAAU,WAAA;EACV,WAAA,EAAa,cAAA;EACb,KAAA,EAAO,cAAA;AAAA;AAAA,KAGG,iBAAA,GAAoB,qBAAA;EAE1B,YAAA;EACA,YAAA;EACA,SAAA;AAAA;EAGA,YAAA;EACA,YAAA;EACA,SAAA,EAAW,kBAAA;AAAA;AAAA,KAIL,gBAAA;EACV,OAAA;EACA,IAAA;IACE,IAAA;IACA,KAAA;IACA,UAAA;IACA,OAAA;IACA,aAAA;IACA,IAAA;IACA,aAAA;IACA,MAAA;IACA,OAAA;MACE,IAAA;MACA,IAAA;MACA,QAAA;IAAA;EAAA;EAGJ,YAAA;IACE,IAAA;IACA,MAAA;IACA,IAAA,EAAM,mBAAA;IACN,SAAA,GAAY,KAAA;MACV,MAAA,EAAQ,iBAAA;MACR,IAAA;MACA,MAAA;MACA,SAAA;IAAA;EAAA;EAGJ,SAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-publish.types.js","names":[],"sources":["../../src/types/app-publish.types.ts"],"sourcesContent":["import type { AppDistributionMode } from \"#app-runtime/types/app-bundle.types.js\";\nimport type {\n AppArtifactTarget,\n AppManifest,\n AppPermissions,\n} from \"#app-runtime/types/app-manifest.types.js\";\nimport type { AppPublisher } from \"#app-runtime/types/app-remote-registry.types.js\";\n\nexport const DEFAULT_APP_MARKETPLACE_API_BASE =\n \"https://apps-registry.nextclaw.io\";\n\nexport type AppMarketplaceVisuals = {\n cover: string;\n accentColor: string;\n};\n\nexport type AppMarketplaceMetadata = {\n slug: string;\n summary: string;\n summaryI18n: Record<string, string>;\n description?: string;\n descriptionI18n?: Record<string, string>;\n author: string;\n tags: string[];\n sourceRepo?: string;\n homepage?: string;\n featured?: boolean;\n publisher?: AppPublisher;\n visuals?: AppMarketplaceVisuals;\n};\n\nexport type AppPublishFile = {\n path: string;\n contentBase64: string;\n};\n\nexport type AppPublishArtifact = {\n target: AppArtifactTarget;\n bundleBase64: string;\n bundleSha256: string;\n sizeBytes: number;\n};\n\ntype AppPublishPayloadBase = {\n slug: string;\n appId: string;\n name: string;\n version: string;\n summary: string;\n summaryI18n: Record<string, string>;\n description?: string;\n descriptionI18n?: Record<string, string>;\n author: string;\n tags: string[];\n sourceRepo?: string;\n homepage?: string;\n featured: boolean;\n publisher: AppPublisher;\n visuals?: AppMarketplaceVisuals;\n distributionMode: AppDistributionMode;\n manifest: AppManifest;\n permissions: AppPermissions;\n files: AppPublishFile[];\n};\n\nexport type AppPublishPayload = AppPublishPayloadBase & (\n | {\n bundleBase64: string;\n bundleSha256: string;\n artifacts?: never;\n }\n | {\n bundleBase64?: never;\n bundleSha256?: never;\n artifacts: AppPublishArtifact[];\n }\n);\n\nexport type AppPublishResult = {\n created: boolean;\n item: {\n slug: string;\n appId: string;\n ownerScope: string;\n appName: string;\n publishStatus: \"pending\" | \"published\";\n name: string;\n latestVersion: string;\n webUrl?: string;\n install: {\n kind: \"registry\";\n spec: string;\n
|
|
1
|
+
{"version":3,"file":"app-publish.types.js","names":[],"sources":["../../src/types/app-publish.types.ts"],"sourcesContent":["import type { AppDistributionMode } from \"#app-runtime/types/app-bundle.types.js\";\nimport type {\n AppArtifactTarget,\n AppManifest,\n AppPermissions,\n} from \"#app-runtime/types/app-manifest.types.js\";\nimport type { AppPublisher } from \"#app-runtime/types/app-remote-registry.types.js\";\n\nexport const DEFAULT_APP_MARKETPLACE_API_BASE =\n \"https://apps-registry.nextclaw.io\";\n\nexport type AppMarketplaceVisuals = {\n cover: string;\n accentColor: string;\n};\n\nexport type AppMarketplaceMetadata = {\n slug: string;\n summary: string;\n summaryI18n: Record<string, string>;\n description?: string;\n descriptionI18n?: Record<string, string>;\n author: string;\n tags: string[];\n sourceRepo?: string;\n homepage?: string;\n featured?: boolean;\n publisher?: AppPublisher;\n visuals?: AppMarketplaceVisuals;\n};\n\nexport type AppPublishFile = {\n path: string;\n contentBase64: string;\n};\n\nexport type AppPublishArtifact = {\n target: AppArtifactTarget;\n bundleBase64: string;\n bundleSha256: string;\n sizeBytes: number;\n};\n\ntype AppPublishPayloadBase = {\n slug: string;\n appId: string;\n name: string;\n version: string;\n summary: string;\n summaryI18n: Record<string, string>;\n description?: string;\n descriptionI18n?: Record<string, string>;\n author: string;\n tags: string[];\n sourceRepo?: string;\n homepage?: string;\n featured: boolean;\n publisher: AppPublisher;\n visuals?: AppMarketplaceVisuals;\n distributionMode: AppDistributionMode;\n manifest: AppManifest;\n permissions: AppPermissions;\n files: AppPublishFile[];\n};\n\nexport type AppPublishPayload = AppPublishPayloadBase & (\n | {\n bundleBase64: string;\n bundleSha256: string;\n artifacts?: never;\n }\n | {\n bundleBase64?: never;\n bundleSha256?: never;\n artifacts: AppPublishArtifact[];\n }\n);\n\nexport type AppPublishResult = {\n created: boolean;\n item: {\n slug: string;\n appId: string;\n ownerScope: string;\n appName: string;\n publishStatus: \"pending\" | \"published\";\n name: string;\n latestVersion: string;\n webUrl?: string;\n install: {\n kind: \"registry\";\n spec: string;\n registry: string;\n };\n };\n distribution: {\n path?: string;\n sha256?: string;\n mode: AppDistributionMode;\n artifacts?: Array<{\n target: AppArtifactTarget;\n path?: string;\n sha256: string;\n sizeBytes: number;\n }>;\n };\n fileCount: number;\n};\n"],"mappings":";AAQA,MAAa,mCACX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/app-runtime",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Standalone micro app runtime and CLI for NextClaw apps.",
|
|
6
6
|
"type": "module",
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"README.md"
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"fflate": "^0.8.2"
|
|
59
|
+
"fflate": "^0.8.2",
|
|
60
|
+
"@nextclaw/shared": "0.4.29"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@types/node": "^20.17.6",
|