@motrix/mdxp 0.5.0 → 0.7.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/README.md +53 -1
- package/README.zh-CN.md +45 -1
- package/dist/connection.d.ts +3 -1
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/methods.d.ts +23 -21
- package/dist/methods.d.ts.map +1 -1
- package/dist/methods.js +2 -0
- package/dist/methods.js.map +1 -1
- package/dist/schemas/download-add.d.ts +7 -7
- package/dist/schemas/download-directories.d.ts +12 -0
- package/dist/schemas/download-directories.d.ts.map +1 -0
- package/dist/schemas/download-directories.js +15 -0
- package/dist/schemas/download-directories.js.map +1 -0
- package/dist/schemas/download.d.ts +9 -8
- package/dist/schemas/download.d.ts.map +1 -1
- package/dist/schemas/download.js +3 -0
- package/dist/schemas/download.js.map +1 -1
- package/dist/schemas/engine.d.ts +6 -6
- package/dist/schemas/events.d.ts +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/initialize.d.ts +6 -4
- package/dist/schemas/initialize.d.ts.map +1 -1
- package/dist/schemas/initialize.js +4 -0
- package/dist/schemas/initialize.js.map +1 -1
- package/dist/schemas/resource.d.ts +2 -2
- package/dist/schemas/selection.d.ts +8 -8
- package/dist/schemas/task.d.ts +38 -32
- package/dist/schemas/task.d.ts.map +1 -1
- package/dist/schemas/task.js +5 -0
- package/dist/schemas/task.js.map +1 -1
- package/dist/schemas/url.d.ts +9 -9
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +16 -1
- package/dist/tools.js.map +1 -1
- package/dist/transports/stdio.js.map +1 -1
- package/dist/transports/ws.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/connection.ts +6 -0
- package/src/index.ts +5 -1
- package/src/methods.ts +2 -0
- package/src/schemas/download-directories.ts +26 -0
- package/src/schemas/download.ts +3 -0
- package/src/schemas/index.ts +1 -0
- package/src/schemas/initialize.ts +4 -0
- package/src/schemas/task.ts +8 -0
- package/src/tools.ts +20 -0
- package/src/types.ts +6 -0
package/README.md
CHANGED
|
@@ -57,6 +57,9 @@ re-exported from `@motrix/mdxp` (see [Entry points](#entry-points)), so you
|
|
|
57
57
|
rarely need to import `vscode-jsonrpc` directly. ESM-only; requires
|
|
58
58
|
Node.js ≥ 18 or a modern bundler.
|
|
59
59
|
|
|
60
|
+
For development, keep `@types/node` on the Node.js 24 LTS major and update
|
|
61
|
+
within that major. The newest Node.js Current release is not the type baseline.
|
|
62
|
+
|
|
60
63
|
### Entry points
|
|
61
64
|
|
|
62
65
|
| Import | Installs a RAL? | Use it from |
|
|
@@ -154,8 +157,14 @@ const hello = await conn.sendRequest('motrix/initialize', {
|
|
|
154
157
|
|
|
155
158
|
console.log(hello.server.name, hello.server.version)
|
|
156
159
|
console.log(hello.capabilities.selectionKinds) // e.g. ['direct', 'hls', 'mux']
|
|
160
|
+
const canRevealTask = hello.capabilities.taskReveal ?? false
|
|
157
161
|
```
|
|
158
162
|
|
|
163
|
+
`capabilities.taskReveal` is optional on the wire so existing protocol 1.0
|
|
164
|
+
servers remain valid. `InitializeResultSchema` normalizes an absent value to
|
|
165
|
+
`false`; clients that do not parse the result should use `?? false` and hide or
|
|
166
|
+
disable reveal actions.
|
|
167
|
+
|
|
159
168
|
### Add a download (client → server)
|
|
160
169
|
|
|
161
170
|
`download/add` is the public, agent-facing entry point. It accepts a direct
|
|
@@ -195,8 +204,19 @@ const { tasks, total } = await conn.sendRequest('task/list', {
|
|
|
195
204
|
await conn.sendRequest('task/pause', { taskId: task.id })
|
|
196
205
|
await conn.sendRequest('task/resume', { taskId: task.id })
|
|
197
206
|
await conn.sendRequest('task/remove', { taskId: task.id, deleteFiles: false })
|
|
207
|
+
|
|
208
|
+
// Invoke only from an explicit user gesture after capability negotiation.
|
|
209
|
+
if (hello.capabilities.taskReveal ?? false) {
|
|
210
|
+
await conn.sendRequest('task/reveal', { taskId: task.id })
|
|
211
|
+
}
|
|
198
212
|
```
|
|
199
213
|
|
|
214
|
+
`task/reveal` asks the desktop host to reveal the task's output in the platform
|
|
215
|
+
file manager. Its strict payload accepts only `taskId`, never an arbitrary local
|
|
216
|
+
path. It is registered in `Tools` for schema discovery but intentionally omitted
|
|
217
|
+
from `toAgentToolCatalog()` because opening a file-manager window is a UI side
|
|
218
|
+
effect and must be initiated by the user.
|
|
219
|
+
|
|
200
220
|
### Resolve a page (server → client)
|
|
201
221
|
|
|
202
222
|
The desktop app asks a client whether it can handle a page (`url/probe`), then
|
|
@@ -336,7 +356,11 @@ const tools = toAgentToolCatalog()
|
|
|
336
356
|
| `toAgentToolCatalog()` | function | The `agentFacing` subset as JSON-Schema tools. |
|
|
337
357
|
| `SERVER_INITIATED_METHODS` | const | Methods the server calls on the client (`url/probe`, `url/resolve`). |
|
|
338
358
|
| `*Schema` | Zod schema | Every wire shape, for runtime validation. |
|
|
339
|
-
| `MessageReader` · `MessageWriter` · `MessageConnection` · `CancellationToken` · `CancellationTokenSource` · `Disposable` | re-export | `vscode-jsonrpc` primitives used across the API. Platform transport classes (`StreamMessageReader`/`Writer`, `BrowserMessageReader`/`Writer`) are re-exported from `./node` and `./browser`. |
|
|
359
|
+
| `MessageReader` · `MessageWriter` · `MessageConnection` · `CancellationToken` · `CancellationTokenSource` · `ResponseError` · `Disposable` | re-export | `vscode-jsonrpc` primitives used across the API. Platform transport classes (`StreamMessageReader`/`Writer`, `BrowserMessageReader`/`Writer`) are re-exported from `./node` and `./browser`. |
|
|
360
|
+
|
|
361
|
+
Throw `ResponseError` imported from `@motrix/mdxp` when an RPC handler needs
|
|
362
|
+
to preserve an error code and data. Importing that class from another installed
|
|
363
|
+
copy of `vscode-jsonrpc` can cause it to be serialized as an internal error.
|
|
340
364
|
|
|
341
365
|
### Methods
|
|
342
366
|
|
|
@@ -351,6 +375,7 @@ const tools = toAgentToolCatalog()
|
|
|
351
375
|
| `task/get` | client → server | ✓ | Get one task by id. |
|
|
352
376
|
| `task/pause` · `task/resume` | client → server | ✓ | Pause / resume a task. |
|
|
353
377
|
| `task/remove` | client → server | ✓ | Remove a task, optionally deleting files. |
|
|
378
|
+
| `task/reveal` | client → server | | Reveal a task's output in the platform file manager; user gesture only. |
|
|
354
379
|
| `stats/get` | client → server | ✓ | Aggregate global stats (speeds + counts). |
|
|
355
380
|
| `engine/status` | client → server | ✓ | Engine lifecycle state + feature report. |
|
|
356
381
|
| `url/probe` | **server → client** | | Can this client's adapters handle a page? |
|
|
@@ -405,3 +430,30 @@ const tools = toAgentToolCatalog()
|
|
|
405
430
|
## License
|
|
406
431
|
|
|
407
432
|
[MIT](./LICENSE) © Dr_rOot
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
## Download directories (since 0.7.0)
|
|
436
|
+
|
|
437
|
+
An authenticated extension may call `download/directories` with `{}` when
|
|
438
|
+
`motrix/initialize.capabilities.downloadDirectories === true`. The response is
|
|
439
|
+
`{ defaultSaveDir: string | null, favorites: string[], recent: string[] }`.
|
|
440
|
+
Paths belong to the target Motrix host (container paths for Docker). Favorites
|
|
441
|
+
are bounded to 20 entries and recent directories to 10; paths are at most 4096
|
|
442
|
+
characters and cannot contain NUL. An unavailable default is reported as null.
|
|
443
|
+
This method is not agent-facing and must not be exposed on unary HTTP.
|
|
444
|
+
|
|
445
|
+
That same capability enables optional `download/submit.saveDir`. Only paths
|
|
446
|
+
returned by the host are selectable. The host revalidates against its current
|
|
447
|
+
settings and filesystem policy before accepting a task, including Server allowed
|
|
448
|
+
roots and symlink resolution. An invalid/stale choice must be rejected, never
|
|
449
|
+
silently replaced with the default. This API does not browse arbitrary paths or
|
|
450
|
+
create folders. Omitting `saveDir` retains the current default-directory behavior.
|
|
451
|
+
|
|
452
|
+
Clients must not send `saveDir` to older hosts: older schemas may silently strip
|
|
453
|
+
unknown fields. Bind a selection to its backend and authenticated instance, retain
|
|
454
|
+
that binding when restoring drafts, and use a new idempotency key after changing
|
|
455
|
+
the destination. Retrying the same key with a different explicit destination is
|
|
456
|
+
an invalid request. A pre-dispatch directory rejection uses `InvalidParams` with
|
|
457
|
+
`data.appCode: "download-directory-unavailable"`; filesystem details are not
|
|
458
|
+
included. Filesystem checks are not an OS sandbox: a local process that can
|
|
459
|
+
replace directories concurrently is outside this guarantee.
|
package/README.zh-CN.md
CHANGED
|
@@ -50,6 +50,9 @@ npm install @motrix/mdxp
|
|
|
50
50
|
[入口点](#入口点)),因此你几乎无需直接 import `vscode-jsonrpc`。仅 ESM;需要
|
|
51
51
|
Node.js ≥ 18 或现代 bundler。
|
|
52
52
|
|
|
53
|
+
开发时,`@types/node` 保持在 Node.js 24 LTS 主版本内升级,不跟随最新的
|
|
54
|
+
Node.js Current 主版本。
|
|
55
|
+
|
|
53
56
|
### 入口点
|
|
54
57
|
|
|
55
58
|
| import | 是否装 RAL | 使用场景 |
|
|
@@ -140,8 +143,13 @@ const hello = await conn.sendRequest('motrix/initialize', {
|
|
|
140
143
|
|
|
141
144
|
console.log(hello.server.name, hello.server.version)
|
|
142
145
|
console.log(hello.capabilities.selectionKinds) // 例如 ['direct', 'hls', 'mux']
|
|
146
|
+
const canRevealTask = hello.capabilities.taskReveal ?? false
|
|
143
147
|
```
|
|
144
148
|
|
|
149
|
+
`capabilities.taskReveal` 在 wire 上是可选字段,以便既有的 protocol 1.0 server 继续有效。
|
|
150
|
+
`InitializeResultSchema` 会把缺失值归一为 `false`;未解析 result 的 client 应使用
|
|
151
|
+
`?? false`,并隐藏或禁用“在文件管理器中显示”操作。
|
|
152
|
+
|
|
145
153
|
### 添加下载(client → server)
|
|
146
154
|
|
|
147
155
|
`download/add` 是面向 agent 的公开入口,接受直连 URL 列表、magnet 链接或 base64
|
|
@@ -180,8 +188,17 @@ const { tasks, total } = await conn.sendRequest('task/list', {
|
|
|
180
188
|
await conn.sendRequest('task/pause', { taskId: task.id })
|
|
181
189
|
await conn.sendRequest('task/resume', { taskId: task.id })
|
|
182
190
|
await conn.sendRequest('task/remove', { taskId: task.id, deleteFiles: false })
|
|
191
|
+
|
|
192
|
+
// 仅在能力协商通过后,由明确的用户手势触发。
|
|
193
|
+
if (hello.capabilities.taskReveal ?? false) {
|
|
194
|
+
await conn.sendRequest('task/reveal', { taskId: task.id })
|
|
195
|
+
}
|
|
183
196
|
```
|
|
184
197
|
|
|
198
|
+
`task/reveal` 请求桌面端在系统文件管理器中显示该 task 的输出。其严格载荷只接受
|
|
199
|
+
`taskId`,绝不接受任意本地路径。它会注册在 `Tools` 中以便发现 schema,但不会进入
|
|
200
|
+
`toAgentToolCatalog()`;打开文件管理器属于 UI 副作用,必须由用户发起。
|
|
201
|
+
|
|
185
202
|
### 解析页面(server → client)
|
|
186
203
|
|
|
187
204
|
桌面端会先问某个 client 能否处理这个页面(`url/probe`),再请它抽取出可下载的资源
|
|
@@ -318,7 +335,11 @@ const tools = toAgentToolCatalog()
|
|
|
318
335
|
| `toAgentToolCatalog()` | function | 取 `agentFacing` 子集,转成 JSON-Schema tools。 |
|
|
319
336
|
| `SERVER_INITIATED_METHODS` | const | 由 server 向 client 发起的 method(`url/probe`、`url/resolve`)。 |
|
|
320
337
|
| `*Schema` | Zod schema | 全部 wire 形态,供运行时校验。 |
|
|
321
|
-
| `MessageReader` · `MessageWriter` · `MessageConnection` · `CancellationToken` · `CancellationTokenSource` · `Disposable` | re-export | 本包 API 中用到的 `vscode-jsonrpc` primitive。平台 transport class(`StreamMessageReader`/`Writer`、`BrowserMessageReader`/`Writer`)从 `./node` 与 `./browser` re-export。 |
|
|
338
|
+
| `MessageReader` · `MessageWriter` · `MessageConnection` · `CancellationToken` · `CancellationTokenSource` · `ResponseError` · `Disposable` | re-export | 本包 API 中用到的 `vscode-jsonrpc` primitive。平台 transport class(`StreamMessageReader`/`Writer`、`BrowserMessageReader`/`Writer`)从 `./node` 与 `./browser` re-export。 |
|
|
339
|
+
|
|
340
|
+
RPC handler 需要保留错误码和 data 时,应抛出从 `@motrix/mdxp` 导入的
|
|
341
|
+
`ResponseError`。从另一份 `vscode-jsonrpc` 实例导入该类,可能导致错误被序列化
|
|
342
|
+
为内部错误。
|
|
322
343
|
|
|
323
344
|
### Methods
|
|
324
345
|
|
|
@@ -333,6 +354,7 @@ const tools = toAgentToolCatalog()
|
|
|
333
354
|
| `task/get` | client → server | ✓ | 按 id 取单个 task。 |
|
|
334
355
|
| `task/pause` · `task/resume` | client → server | ✓ | 暂停 / 恢复 task。 |
|
|
335
356
|
| `task/remove` | client → server | ✓ | 移除 task,可选一并删除文件。 |
|
|
357
|
+
| `task/reveal` | client → server | | 在系统文件管理器中显示 task 输出;仅限用户手势。 |
|
|
336
358
|
| `stats/get` | client → server | ✓ | 取聚合的全局统计(速度 + 计数)。 |
|
|
337
359
|
| `engine/status` | client → server | ✓ | 取下载引擎的生命周期状态与 feature report。 |
|
|
338
360
|
| `url/probe` | **server → client** | | 该 client 的 adapter 能否处理某页面? |
|
|
@@ -386,3 +408,25 @@ const tools = toAgentToolCatalog()
|
|
|
386
408
|
## License
|
|
387
409
|
|
|
388
410
|
[MIT](./LICENSE) © Dr_rOot
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
## 下载目录(自 0.7.0 起)
|
|
414
|
+
|
|
415
|
+
已认证的扩展在 `motrix/initialize.capabilities.downloadDirectories === true`
|
|
416
|
+
时,可以使用空参数 `{}` 调用 `download/directories`。响应为
|
|
417
|
+
`{ defaultSaveDir: string | null, favorites: string[], recent: string[] }`。
|
|
418
|
+
路径属于目标 Motrix 主机;Docker 中为容器内路径。收藏最多 20 项,最近目录
|
|
419
|
+
最多 10 项,路径最长 4096 个字符且不能包含 NUL。不可用的默认目录返回 null。
|
|
420
|
+
该方法不是 agent-facing 接口,不得通过 unary HTTP 暴露。
|
|
421
|
+
|
|
422
|
+
此能力同时启用可选的 `download/submit.saveDir`。只能选择目标返回的目录;
|
|
423
|
+
任务受理前,目标必须依据当前设置、目录状态及文件系统策略重新校验。Server
|
|
424
|
+
继续执行允许目录范围和符号链接校验。失效目录必须拒绝,不得静默改存默认目录。
|
|
425
|
+
接口不支持任意目录浏览或新建目录;省略 `saveDir` 保留原有默认目录行为。
|
|
426
|
+
|
|
427
|
+
旧版可能静默丢弃未知字段,因此未协商该能力时不得发送 `saveDir`。客户端需将
|
|
428
|
+
目录选择绑定到后端配置和已认证实例,恢复草稿时保留绑定;修改目录后应生成新的
|
|
429
|
+
幂等键。同一幂等键更换显式目录属于无效请求。受理前的目录拒绝使用
|
|
430
|
+
`InvalidParams`,并携带 `data.appCode: "download-directory-unavailable"`,
|
|
431
|
+
不返回底层文件系统错误细节。目录校验不是操作系统沙箱,不能防御有权限并发替换
|
|
432
|
+
目录的本地进程。
|
package/dist/connection.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { CancellationToken, MessageConnection, MessageReader, MessageWriter } from 'vscode-jsonrpc';
|
|
2
|
-
import type { CancelRequestParams, DownloadAddParams, DownloadAddResult, DownloadCancelParams, DownloadCancelResult, DownloadSubmitParams, DownloadSubmitResult, EngineStatusParams, EngineStatusResult, InitializeParams, InitializeResult, PairRevokedParams, StatsGetParams, StatsResult, StatsUpdateParams, SystemPingParams, SystemPingResult, TaskCompletedParams, TaskErrorParams, TaskGetParams, TaskGetResult, TaskListParams, TaskListResult, TaskPauseParams, TaskPauseResult, TaskProgressParams, TaskRemoveParams, TaskRemoveResult, TaskResumeParams, TaskResumeResult, UrlProbeParams, UrlProbeResult, UrlResolveParams, UrlResolveResult } from './types.js';
|
|
2
|
+
import type { CancelRequestParams, DownloadAddParams, DownloadAddResult, DownloadCancelParams, DownloadCancelResult, DownloadDirectoriesParams, DownloadDirectoriesResult, DownloadSubmitParams, DownloadSubmitResult, EngineStatusParams, EngineStatusResult, InitializeParams, InitializeResult, PairRevokedParams, StatsGetParams, StatsResult, StatsUpdateParams, SystemPingParams, SystemPingResult, TaskCompletedParams, TaskErrorParams, TaskGetParams, TaskGetResult, TaskListParams, TaskListResult, TaskPauseParams, TaskPauseResult, TaskProgressParams, TaskRemoveParams, TaskRemoveResult, TaskResumeParams, TaskResumeResult, TaskRevealParams, TaskRevealResult, UrlProbeParams, UrlProbeResult, UrlResolveParams, UrlResolveResult } from './types.js';
|
|
3
3
|
export interface MdxpRequestMap {
|
|
4
4
|
'motrix/initialize': [InitializeParams, InitializeResult];
|
|
5
5
|
'download/submit': [DownloadSubmitParams, DownloadSubmitResult];
|
|
6
|
+
'download/directories': [DownloadDirectoriesParams, DownloadDirectoriesResult];
|
|
6
7
|
'download/cancel': [DownloadCancelParams, DownloadCancelResult];
|
|
7
8
|
'url/probe': [UrlProbeParams, UrlProbeResult];
|
|
8
9
|
'url/resolve': [UrlResolveParams, UrlResolveResult];
|
|
@@ -13,6 +14,7 @@ export interface MdxpRequestMap {
|
|
|
13
14
|
'task/pause': [TaskPauseParams, TaskPauseResult];
|
|
14
15
|
'task/resume': [TaskResumeParams, TaskResumeResult];
|
|
15
16
|
'task/remove': [TaskRemoveParams, TaskRemoveResult];
|
|
17
|
+
'task/reveal': [TaskRevealParams, TaskRevealResult];
|
|
16
18
|
'stats/get': [StatsGetParams, StatsResult];
|
|
17
19
|
'engine/status': [EngineStatusParams, EngineStatusResult];
|
|
18
20
|
}
|
package/dist/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACd,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,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AI,IAAI,CAAA;IAEf,qEAAqE;IACrE,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAA;CAChC;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,GACpB,cAAc,CAwChB"}
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACd,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,YAAY,CAAA;AAGnB,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAA;IACzD,iBAAiB,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;IAC/D,sBAAsB,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC,CAAA;IAC9E,iBAAiB,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;IAC/D,WAAW,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;IAC7C,aA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G;IACH,SAAS,CAAC,CAAC,SAAS,MAAM,cAAc,EACtC,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,CACP,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5B,KAAK,EAAE,iBAAiB,KACrB,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACxD,IAAI,CAAA;IAEP,gBAAgB,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAClD,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC7B,IAAI,CAAA;IAEP,cAAc,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAChD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,GAChD,IAAI,CAAA;IAEP,OAAO,IAAI,IAAI,CAAA;IAEf,qEAAqE;IACrE,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAA;CAChC;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,GACpB,cAAc,CAwChB"}
|
package/dist/connection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAsHxD,MAAM,UAAU,oBAAoB,CAClC,MAAqB,EACrB,MAAqB;IAErB,MAAM,GAAG,GAAG,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAEnD,OAAO;QACL,MAAM,EAAE,G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version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;yBAET,CAAC,KAAK;6BACF,CAAC,KAAK;6BACN,CAAC,KAAK;4BACP,CAAC,KAAK;4BACN,CAAC,KAAK;+BACH,CAAC,KAAK;2BAGV,CAAC,KAAK;kCACC,CAAC,KAAK;+BACT,CAAC,KAAK;0BACX,CAAC,KAAK;qCACK,CAAC,KAAK;0BACjB,CAAC,KAAK;EACV,CAAA;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAEpE,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CASrD;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,aAAa,GACnB,SAAS,CAEX"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { Disposable, MessageConnection, MessageReader, MessageWriter, } from 'vscode-jsonrpc';
|
|
2
|
-
export { CancellationToken, CancellationTokenSource } from 'vscode-jsonrpc';
|
|
2
|
+
export { CancellationToken, CancellationTokenSource, ResponseError, } from 'vscode-jsonrpc';
|
|
3
3
|
export type { MdxpConnection, MdxpNotificationMap, MdxpRequestMap, } from './connection.js';
|
|
4
4
|
export { createMdxpConnection } from './connection.js';
|
|
5
5
|
export type { ErrorCode, MdxpError, MdxpErrorData } from './errors.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAA;AACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,GACd,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,cAAc,GACf,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACtE,OAAO,EACL,UAAU,EACV,aAAa,EACb,eAAe,EACf,aAAa,GACd,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAGrD,cAAc,oBAAoB,CAAA;AAClC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxD,OAAO,EACL,wBAAwB,EACxB,KAAK,EACL,kBAAkB,GACnB,MAAM,YAAY,CAAA;AAEnB,mBAAmB,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// MDXP — Motrix Download eXchange Protocol
|
|
2
2
|
// Public API surface for both Motrix desktop and the browser extension.
|
|
3
|
-
export { CancellationToken, CancellationTokenSource } from 'vscode-jsonrpc';
|
|
3
|
+
export { CancellationToken, CancellationTokenSource, ResponseError, } from 'vscode-jsonrpc';
|
|
4
4
|
export { createMdxpConnection } from './connection.js';
|
|
5
5
|
export { ErrorCodes, isMotrixError, isProtocolError, makeMdxpError, } from './errors.js';
|
|
6
6
|
export { Methods, Notifications } from './methods.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,wEAAwE;AAYxE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,wEAAwE;AAYxE,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,GACd,MAAM,gBAAgB,CAAA;AAMvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EACL,UAAU,EACV,aAAa,EACb,eAAe,EACf,aAAa,GACd,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAErD,qDAAqD;AACrD,cAAc,oBAAoB,CAAA;AAGlC,wCAAwC;AACxC,OAAO,EACL,wBAAwB,EACxB,KAAK,EACL,kBAAkB,GACnB,MAAM,YAAY,CAAA"}
|
package/dist/methods.d.ts
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
export declare const Methods: Readonly<{
|
|
2
|
-
readonly MotrixInitialize:
|
|
3
|
-
readonly DownloadSubmit:
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
2
|
+
readonly MotrixInitialize: 'motrix/initialize';
|
|
3
|
+
readonly DownloadSubmit: 'download/submit';
|
|
4
|
+
readonly DownloadDirectories: 'download/directories';
|
|
5
|
+
readonly DownloadCancel: 'download/cancel';
|
|
6
|
+
readonly UrlProbe: 'url/probe';
|
|
7
|
+
readonly UrlResolve: 'url/resolve';
|
|
8
|
+
readonly SystemPing: 'system/ping';
|
|
9
|
+
readonly DownloadAdd: 'download/add';
|
|
10
|
+
readonly TaskList: 'task/list';
|
|
11
|
+
readonly TaskGet: 'task/get';
|
|
12
|
+
readonly TaskPause: 'task/pause';
|
|
13
|
+
readonly TaskResume: 'task/resume';
|
|
14
|
+
readonly TaskRemove: 'task/remove';
|
|
15
|
+
readonly TaskReveal: 'task/reveal';
|
|
16
|
+
readonly StatsGet: 'stats/get';
|
|
17
|
+
readonly EngineStatus: 'engine/status';
|
|
16
18
|
}>;
|
|
17
19
|
export type Method = (typeof Methods)[keyof typeof Methods];
|
|
18
20
|
export declare const Notifications: Readonly<{
|
|
19
|
-
readonly MotrixInitialized:
|
|
20
|
-
readonly TaskProgress:
|
|
21
|
-
readonly TaskCompleted:
|
|
22
|
-
readonly TaskError:
|
|
23
|
-
readonly PairRevoked:
|
|
24
|
-
readonly CancelRequest:
|
|
25
|
-
readonly StatsUpdate:
|
|
21
|
+
readonly MotrixInitialized: 'motrix/initialized';
|
|
22
|
+
readonly TaskProgress: '$/task/progress';
|
|
23
|
+
readonly TaskCompleted: '$/task/completed';
|
|
24
|
+
readonly TaskError: '$/task/error';
|
|
25
|
+
readonly PairRevoked: '$/pair/revoked';
|
|
26
|
+
readonly CancelRequest: '$/cancelRequest';
|
|
27
|
+
readonly StatsUpdate: '$/stats';
|
|
26
28
|
}>;
|
|
27
29
|
export type Notification = (typeof Notifications)[keyof typeof Notifications];
|
|
28
30
|
//# sourceMappingURL=methods.d.ts.map
|
package/dist/methods.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../src/methods.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../src/methods.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO;+BACA,mBAAmB;6BACrB,iBAAiB;kCACZ,sBAAsB;6BAC3B,iBAAiB;uBACvB,WAAW;yBACT,aAAa;yBACb,aAAa;0BAEZ,cAAc;uBACjB,WAAW;sBACZ,UAAU;wBACR,YAAY;yBACX,aAAa;yBACb,aAAa;yBACb,aAAa;uBACf,WAAW;2BACP,eAAe;EACpB,CAAA;AAEX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAA;AAK3D,eAAO,MAAM,aAAa;gCACL,oBAAoB;2BACzB,iBAAiB;4BAChB,kBAAkB;wBACtB,cAAc;0BACZ,gBAAgB;4BACd,iBAAiB;0BAEnB,SAAS;EACb,CAAA;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA"}
|
package/dist/methods.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export const Methods = Object.freeze({
|
|
3
3
|
MotrixInitialize: 'motrix/initialize',
|
|
4
4
|
DownloadSubmit: 'download/submit',
|
|
5
|
+
DownloadDirectories: 'download/directories',
|
|
5
6
|
DownloadCancel: 'download/cancel',
|
|
6
7
|
UrlProbe: 'url/probe',
|
|
7
8
|
UrlResolve: 'url/resolve',
|
|
@@ -13,6 +14,7 @@ export const Methods = Object.freeze({
|
|
|
13
14
|
TaskPause: 'task/pause',
|
|
14
15
|
TaskResume: 'task/resume',
|
|
15
16
|
TaskRemove: 'task/remove',
|
|
17
|
+
TaskReveal: 'task/reveal',
|
|
16
18
|
StatsGet: 'stats/get',
|
|
17
19
|
EngineStatus: 'engine/status',
|
|
18
20
|
});
|
package/dist/methods.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../src/methods.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACnC,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,4BAA4B;IAC5B,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,eAAe;CACrB,CAAC,CAAA;AAIX,6DAA6D;AAC7D,yEAAyE;AACzE,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,iBAAiB,EAAE,oBAAoB;IACvC,YAAY,EAAE,iBAAiB;IAC/B,aAAa,EAAE,kBAAkB;IACjC,SAAS,EAAE,cAAc;IACzB,WAAW,EAAE,gBAAgB;IAC7B,aAAa,EAAE,iBAAiB;IAChC,4DAA4D;IAC5D,WAAW,EAAE,SAAS;CACd,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../src/methods.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACnC,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,iBAAiB;IACjC,mBAAmB,EAAE,sBAAsB;IAC3C,cAAc,EAAE,iBAAiB;IACjC,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,4BAA4B;IAC5B,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,eAAe;CACrB,CAAC,CAAA;AAIX,6DAA6D;AAC7D,yEAAyE;AACzE,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,iBAAiB,EAAE,oBAAoB;IACvC,YAAY,EAAE,iBAAiB;IAC/B,aAAa,EAAE,kBAAkB;IACjC,SAAS,EAAE,cAAc;IACzB,WAAW,EAAE,gBAAgB;IAC7B,aAAa,EAAE,iBAAiB;IAChC,4DAA4D;IAC5D,WAAW,EAAE,SAAS;CACd,CAAC,CAAA"}
|
|
@@ -37,22 +37,22 @@ export declare const DownloadAddParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
37
37
|
export declare const DownloadAddResultSchema: z.ZodObject<{
|
|
38
38
|
id: z.ZodString;
|
|
39
39
|
type: z.ZodEnum<{
|
|
40
|
-
magnet: "magnet";
|
|
41
|
-
http: "http";
|
|
42
|
-
ftp: "ftp";
|
|
43
40
|
bt: "bt";
|
|
41
|
+
ftp: "ftp";
|
|
42
|
+
http: "http";
|
|
43
|
+
magnet: "magnet";
|
|
44
44
|
metalink: "metalink";
|
|
45
45
|
}>;
|
|
46
46
|
name: z.ZodString;
|
|
47
47
|
status: z.ZodEnum<{
|
|
48
|
+
completed: "completed";
|
|
49
|
+
downloading: "downloading";
|
|
48
50
|
error: "error";
|
|
49
|
-
queued: "queued";
|
|
50
51
|
fetching_metadata: "fetching_metadata";
|
|
51
|
-
|
|
52
|
+
finalizing: "finalizing";
|
|
52
53
|
paused: "paused";
|
|
54
|
+
queued: "queued";
|
|
53
55
|
seeding: "seeding";
|
|
54
|
-
finalizing: "finalizing";
|
|
55
|
-
completed: "completed";
|
|
56
56
|
}>;
|
|
57
57
|
progress: z.ZodNumber;
|
|
58
58
|
bytesDone: z.ZodNumber;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Native paths belong to the target Motrix host, never the browser machine. */
|
|
3
|
+
export declare const DownloadDirectoryPathSchema: z.ZodString;
|
|
4
|
+
export declare const DownloadDirectoriesParamsSchema: z.ZodObject<{}, z.core.$strict>;
|
|
5
|
+
export declare const DownloadDirectoriesResultSchema: z.ZodObject<{
|
|
6
|
+
defaultSaveDir: z.ZodNullable<z.ZodString>;
|
|
7
|
+
favorites: z.ZodArray<z.ZodString>;
|
|
8
|
+
recent: z.ZodArray<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type DownloadDirectoriesParams = z.infer<typeof DownloadDirectoriesParamsSchema>;
|
|
11
|
+
export type DownloadDirectoriesResult = z.infer<typeof DownloadDirectoriesResultSchema>;
|
|
12
|
+
//# sourceMappingURL=download-directories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download-directories.d.ts","sourceRoot":"","sources":["../../src/schemas/download-directories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,gFAAgF;AAChF,eAAO,MAAM,2BAA2B,aAOrC,CAAA;AAEH,eAAO,MAAM,+BAA+B,iCAAwB,CAAA;AACpE,eAAO,MAAM,+BAA+B;;;;iBAK1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA;AACD,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Native paths belong to the target Motrix host, never the browser machine. */
|
|
3
|
+
export const DownloadDirectoryPathSchema = z
|
|
4
|
+
.string()
|
|
5
|
+
.min(1)
|
|
6
|
+
.max(4096)
|
|
7
|
+
.refine((value) => !value.includes('\0'), 'Directory paths must not contain NUL');
|
|
8
|
+
export const DownloadDirectoriesParamsSchema = z.object({}).strict();
|
|
9
|
+
export const DownloadDirectoriesResultSchema = z.object({
|
|
10
|
+
/** Null when the configured default is currently unavailable. */
|
|
11
|
+
defaultSaveDir: DownloadDirectoryPathSchema.nullable(),
|
|
12
|
+
favorites: z.array(DownloadDirectoryPathSchema).max(20),
|
|
13
|
+
recent: z.array(DownloadDirectoryPathSchema).max(10),
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=download-directories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download-directories.js","sourceRoot":"","sources":["../../src/schemas/download-directories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,gFAAgF;AAChF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,IAAI,CAAC;KACT,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAChC,sCAAsC,CACvC,CAAA;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAA;AACpE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,iEAAiE;IACjE,cAAc,EAAE,2BAA2B,CAAC,QAAQ,EAAE;IACtD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACvD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CACrD,CAAC,CAAA"}
|
|
@@ -19,9 +19,9 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
19
19
|
secure: z.ZodDefault<z.ZodBoolean>;
|
|
20
20
|
httpOnly: z.ZodDefault<z.ZodBoolean>;
|
|
21
21
|
sameSite: z.ZodDefault<z.ZodEnum<{
|
|
22
|
-
strict: "strict";
|
|
23
22
|
lax: "lax";
|
|
24
23
|
none: "none";
|
|
24
|
+
strict: "strict";
|
|
25
25
|
unspecified: "unspecified";
|
|
26
26
|
}>>;
|
|
27
27
|
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -42,9 +42,9 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
42
42
|
secure: z.ZodDefault<z.ZodBoolean>;
|
|
43
43
|
httpOnly: z.ZodDefault<z.ZodBoolean>;
|
|
44
44
|
sameSite: z.ZodDefault<z.ZodEnum<{
|
|
45
|
-
strict: "strict";
|
|
46
45
|
lax: "lax";
|
|
47
46
|
none: "none";
|
|
47
|
+
strict: "strict";
|
|
48
48
|
unspecified: "unspecified";
|
|
49
49
|
}>>;
|
|
50
50
|
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -52,8 +52,8 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
52
52
|
refererPolicy: z.ZodDefault<z.ZodString>;
|
|
53
53
|
}, z.core.$strip>;
|
|
54
54
|
container: z.ZodDefault<z.ZodEnum<{
|
|
55
|
-
mp4: "mp4";
|
|
56
55
|
mkv: "mkv";
|
|
56
|
+
mp4: "mp4";
|
|
57
57
|
ts: "ts";
|
|
58
58
|
}>>;
|
|
59
59
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -69,9 +69,9 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
69
69
|
secure: z.ZodDefault<z.ZodBoolean>;
|
|
70
70
|
httpOnly: z.ZodDefault<z.ZodBoolean>;
|
|
71
71
|
sameSite: z.ZodDefault<z.ZodEnum<{
|
|
72
|
-
strict: "strict";
|
|
73
72
|
lax: "lax";
|
|
74
73
|
none: "none";
|
|
74
|
+
strict: "strict";
|
|
75
75
|
unspecified: "unspecified";
|
|
76
76
|
}>>;
|
|
77
77
|
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -79,8 +79,8 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
79
79
|
refererPolicy: z.ZodDefault<z.ZodString>;
|
|
80
80
|
}, z.core.$strip>;
|
|
81
81
|
container: z.ZodDefault<z.ZodEnum<{
|
|
82
|
-
mp4: "mp4";
|
|
83
82
|
mkv: "mkv";
|
|
83
|
+
mp4: "mp4";
|
|
84
84
|
}>>;
|
|
85
85
|
}, z.core.$strip>, z.ZodObject<{
|
|
86
86
|
kind: z.ZodLiteral<"mux">;
|
|
@@ -95,9 +95,9 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
95
95
|
secure: z.ZodDefault<z.ZodBoolean>;
|
|
96
96
|
httpOnly: z.ZodDefault<z.ZodBoolean>;
|
|
97
97
|
sameSite: z.ZodDefault<z.ZodEnum<{
|
|
98
|
-
strict: "strict";
|
|
99
98
|
lax: "lax";
|
|
100
99
|
none: "none";
|
|
100
|
+
strict: "strict";
|
|
101
101
|
unspecified: "unspecified";
|
|
102
102
|
}>>;
|
|
103
103
|
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -115,9 +115,9 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
115
115
|
secure: z.ZodDefault<z.ZodBoolean>;
|
|
116
116
|
httpOnly: z.ZodDefault<z.ZodBoolean>;
|
|
117
117
|
sameSite: z.ZodDefault<z.ZodEnum<{
|
|
118
|
-
strict: "strict";
|
|
119
118
|
lax: "lax";
|
|
120
119
|
none: "none";
|
|
120
|
+
strict: "strict";
|
|
121
121
|
unspecified: "unspecified";
|
|
122
122
|
}>>;
|
|
123
123
|
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -125,13 +125,14 @@ export declare const DownloadSubmitParamsSchema: z.ZodObject<{
|
|
|
125
125
|
refererPolicy: z.ZodDefault<z.ZodString>;
|
|
126
126
|
}, z.core.$strip>;
|
|
127
127
|
container: z.ZodDefault<z.ZodEnum<{
|
|
128
|
-
mp4: "mp4";
|
|
129
128
|
mkv: "mkv";
|
|
129
|
+
mp4: "mp4";
|
|
130
130
|
}>>;
|
|
131
131
|
}, z.core.$strip>, z.ZodObject<{
|
|
132
132
|
kind: z.ZodLiteral<"magnet">;
|
|
133
133
|
uri: z.ZodString;
|
|
134
134
|
}, z.core.$strip>], "kind">;
|
|
135
|
+
saveDir: z.ZodOptional<z.ZodString>;
|
|
135
136
|
meta: z.ZodObject<{
|
|
136
137
|
suggestedFilename: z.ZodString;
|
|
137
138
|
qualityLabel: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/schemas/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/schemas/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBrC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;iBAErC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;iBAErC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;iBAErC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA"}
|
package/dist/schemas/download.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { DownloadDirectoryPathSchema } from './download-directories.js';
|
|
2
3
|
import { SelectionSchema } from './selection.js';
|
|
3
4
|
export const DownloadSubmitParamsSchema = z.object({
|
|
4
5
|
source: z.object({
|
|
@@ -8,6 +9,8 @@ export const DownloadSubmitParamsSchema = z.object({
|
|
|
8
9
|
siteHint: z.string().max(64).optional(),
|
|
9
10
|
}),
|
|
10
11
|
selection: SelectionSchema,
|
|
12
|
+
/** Only when capabilities.downloadDirectories is true; must be a listed path. */
|
|
13
|
+
saveDir: DownloadDirectoryPathSchema.optional(),
|
|
11
14
|
meta: z.object({
|
|
12
15
|
suggestedFilename: z.string().max(255),
|
|
13
16
|
qualityLabel: z.string().max(64),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../src/schemas/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,CAAC,MAAM,0BAA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C,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CACpB,CAAC,CAAA"}
|
package/dist/schemas/engine.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const EngineStateSchema: z.ZodEnum<{
|
|
3
|
-
|
|
4
|
-
starting: "starting";
|
|
3
|
+
failed: "failed";
|
|
5
4
|
ready: "ready";
|
|
6
5
|
restarting: "restarting";
|
|
7
|
-
|
|
6
|
+
starting: "starting";
|
|
7
|
+
stopped: "stopped";
|
|
8
8
|
}>;
|
|
9
9
|
/** Capability-discovery info; all fields are external-safe. `features` is the
|
|
10
10
|
* raw engine feature-string list (e.g. contains 'SQLite3-Persistence'). */
|
|
@@ -19,11 +19,11 @@ export declare const EngineFeatureReportSchema: z.ZodObject<{
|
|
|
19
19
|
export declare const EngineStatusParamsSchema: z.ZodObject<{}, z.core.$strict>;
|
|
20
20
|
export declare const EngineStatusResultSchema: z.ZodObject<{
|
|
21
21
|
state: z.ZodEnum<{
|
|
22
|
-
|
|
23
|
-
starting: "starting";
|
|
22
|
+
failed: "failed";
|
|
24
23
|
ready: "ready";
|
|
25
24
|
restarting: "restarting";
|
|
26
|
-
|
|
25
|
+
starting: "starting";
|
|
26
|
+
stopped: "stopped";
|
|
27
27
|
}>;
|
|
28
28
|
featureReport: z.ZodNullable<z.ZodObject<{
|
|
29
29
|
version: z.ZodString;
|
package/dist/schemas/events.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ export declare const TaskProgressParamsSchema: z.ZodObject<{
|
|
|
6
6
|
speedBps: z.ZodNumber;
|
|
7
7
|
etaSec: z.ZodNullable<z.ZodNumber>;
|
|
8
8
|
phase: z.ZodEnum<{
|
|
9
|
-
queued: "queued";
|
|
10
9
|
downloading: "downloading";
|
|
11
10
|
finalizing: "finalizing";
|
|
12
11
|
muxing: "muxing";
|
|
12
|
+
queued: "queued";
|
|
13
13
|
}>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
export declare const TaskCompletedParamsSchema: z.ZodObject<{
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|