@petercjl/tuda 0.0.0-bootstrap.20261112 → 0.1.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/INSTALL.md ADDED
@@ -0,0 +1,11 @@
1
+ # 宿主原生画板插件
2
+
3
+ 宿主安装 `@petercjl/tuda@next` 到自己的私有运行时目录,读取 `capabilities.json` 的 `nativePlugin` 合同,校验 contract、desktopCompatibility、prepare 与鉴权交接要求,再使用自己的 Node.js 执行 `dist/board-plugin.js`。原生入口无需安装 Skill 或全局 CLI;用户无需手动安装。Tuda 桌面制品由宿主提供,包不会隐式下载桌面或授予服务权限。首次内置包可作为离线回退。
4
+
5
+ # Install Tuda for the current Agent
6
+
7
+ Send your Agent: “Install @petercjl/tuda and its companion Skill for yourself.”
8
+
9
+ The Agent installs this package, runs `tuda capabilities --json` and `tuda skill source --json`, resolves its own exact `using-tuda` Skill directory, then runs `tuda skill install --target <absolute-directory> --agent <current-agent> --json`. Verify with `skill status` and load the installed Skill using the host’s native discovery. A package install alone is incomplete. Existing unmanaged or edited directories are preserved.
10
+
11
+ Each selected Skill receives a physical copy of the required bundled CLI under `.runtime/`; it can execute with Node.js 22.12+ independently of the bootstrap npm installation. Canvas operations require Tuda desktop. The package does not grant model access. Installation changes only the selected target. Host discovery is confirmed by the Agent, separately from package installation.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Iterlay contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,93 @@
1
- # Tuda publishing bootstrap
1
+ # Tuda CLI 与画板插件
2
2
 
3
- This minimal prerelease establishes the npm package for GitHub Actions Trusted Publishing. It contains no runtime, credentials, or application data. The usable Tuda capability package is distributed through the next channel.
3
+ 宿主内置的画板插件使用 `nativePlugin` 合同:直接以 Node.js 22.12+ 执行包内 `dist/board-plugin.js`,通过 stdio MCP 提供画板管理、导入已有图片、布局、文字标注和导出。宿主准备兼容的 Tuda 桌面运行时,完成原生注册与内部授权;用户直接在当前 Agent 中使用。此入口仅提供画板操作,生成素材由调用方自己的媒体能力完成。
4
+
5
+ 初始发布渠道为 `@petercjl/tuda@next`。宿主按 `capabilities.json` 的 `nativePlugin.updates` 自动检查、下载并验证兼容版本,在下一次新连接启用;离线或更新失败继续使用当前版本。具体安装和更新合同见 [INSTALL.md](INSTALL.md) 与 [UPDATE.md](UPDATE.md)。独立 CLI 与配套 Skill 的安装方法见下文。
6
+
7
+ Tuda 把图片、视频与创作工作流放在同一张画布上。CLI 让你和 Coding Agent 通过命令生成图片、修改素材、制作视频、整理画板并导出结果,复用 App 已保存的模型服务与授权。
8
+
9
+ 安装 App 后首次打开会自动安装随包 CLI。新开终端后运行 `tuda help`。
10
+
11
+ 日常使用无需先打开 App:CLI 会连接已有服务,或自动启动隐藏的后台工作台,不弹窗口、不抢焦点,macOS 不显示 Dock 图标。后台复用 App 已保存的模型配置、授权和数据;CLI 退出或停止等待不会终止生成任务。主动打开 App(或调用 `open_tuda`)会显示同一工作区。由 CLI 启动的工作台关闭窗口后继续在后台运行;通过 App 的退出命令可完全退出。
12
+
13
+ 这仍依赖已安装的 App/Electron 运行时,并非独立的无桌面服务器程序。`--no-launch` 禁止自动启动;服务未运行时会返回连接错误。帮助、版本、工具列表和 Guard 描述可离线读取。
14
+
15
+ ```bash
16
+ tuda providers list --json
17
+ tuda image generate --prompt "极简咖啡杯插画" --out ./cup.png --json
18
+ tuda image edit --input ./cup.png --prompt "改成米白色" --out ./cup-light.png --json
19
+ tuda tasks wait <task-id> --out ./result.png --json
20
+ tuda tools list --json
21
+ ```
22
+
23
+ 完整工作台操作使用 `tuda call <operation> --input '<JSON>' --json`,操作与 schema 由 `tools list` 返回。
24
+
25
+ `--reference`、`image edit --input` 和 `assets import --input` 按原始文件字节数校验:每个非空素材最多 20 MiB(20,971,520 字节)。Base64 编码后的数据使用独立的媒体校验,不占用提示词的 100,000 字符额度;CLI 会先导入原始素材,再把受管路径用于生成,不会自动压缩图片。超限错误会包含文件名、实际大小和上限;可压缩后重试,或先通过 App 导入,再用 `tuda call` 传入受管路径。模型服务自身仍可能有更低的参考图限制。此修复需要更新 App 后台,仅更新 CLI 无法修复旧版 App 的导入校验。
26
+
27
+ ## 配置视频与旁白模型
28
+
29
+ 配置命令通过 App 主进程原子保存,不会提交生成任务。视频支持现有的 `ark`、`fal`、`openrouter`、`minimax` 协议;`audio` 是新增的独立 OpenAI-compatible TTS 配置,目前仅保存配置,尚未提供语音生成命令、音乐或音效模型。
30
+
31
+ ```bash
32
+ # 查看配置,不返回密钥
33
+ tuda providers list --kind video --json
34
+ tuda providers show <provider-id> --json
35
+
36
+ # 修改已有视频默认模型;保留地址、凭证及其它已保存模型
37
+ tuda models set --kind video --provider <provider-id> --model <model-id> --json
38
+
39
+ # 新增 TTS:从已有环境变量读取密钥,不把密钥放进命令参数
40
+ tuda providers set --kind audio --provider narration --name "旁白" \
41
+ --base-url https://api.openai.com --model gpt-4o-mini-tts --voice nova \
42
+ --api-key-env OPENAI_API_KEY --default --json
43
+
44
+ tuda providers set --kind audio --provider narration --voice alloy --json
45
+ tuda providers default narration --kind audio --json
46
+ tuda providers list --kind audio --json
47
+ tuda models list --provider narration --json
48
+ tuda providers remove narration --kind audio --json
49
+ ```
50
+
51
+ 新增视频服务使用 `providers set --kind video --type <协议> --base-url <地址> --model <模型>`,可用 `--provider` 自定 ID,省略则生成 ID。重复 `--saved-model <模型>` 会替换已保存列表,并始终包含 `--model` 指定的默认模型;省略则保留列表。`--default` 同时将此服务设为该类别默认服务。内置官方服务不可修改或删除,图片、文本配置暂不开放修改。
52
+
53
+ TTS 的 `--speech-endpoint` 默认 `/v1/audio/speech`,表示相对 `--base-url` 的接口路径;例如地址为 `https://api.openai.com/v1` 时可设 `/audio/speech`。模型及音色 ID 由服务商决定,保存配置不代表远端模型可用。`models list` 只列已保存模型,不查询远程目录。
54
+
55
+ 凭证可通过 `--api-key-env <变量名>` 或管道配合 `--api-key-stdin` 输入,二者不可同时使用;查询仅返回 `authConfigured`。省略凭证选项会保留原密钥;`--clear-api-key` 显式清除。App 使用系统安全存储加密,无法加密时整次修改回滚。不要把真实密钥放进 `tuda call --input`、聊天或日志。
56
+
57
+ fal / OpenRouter 视频可用 `--connection-provider <同类型图片服务ID>` 复用其地址和凭证。复用时不能设置独立密钥;用 `--connection-provider none` 解除关联,再设置独立连接。CLI 与 App 共用设置,需要配套运行包含此功能的新版后台服务;仅替换 CLI 无法让旧 App 支持配置操作。
58
+
59
+ `tuda guard descriptor` 可离线输出随包携带的 HOL Guard 命令描述;它不会安装 Guard 或改变 Agent 权限。生成/编辑、文件导出、配置安装与通用调用按影响分类,最终决策仍受 Guard 全局策略控制。参见 [说明](../docs/guard.md)。
60
+
61
+ Coding Agent 在 App 的设置 → Coding Agent 中一键安装 `using-tuda` Skill,或运行 `npx tuda add --agent <id>`。支持 `codex`、`claude-code`、`workbuddy`、`cursor`、`windsurf`、`cline`、`roo-cline`、`gemini-cli` 和 `opencode`;省略 `--agent` 时自动安装到已检测到的 Agent。WorkBuddy 的安装位置为 `~/.workbuddy/skills/using-tuda`。`using-tuda` 仅供手动调用:Codex 使用 `$using-tuda`,Claude Code 使用 `/using-tuda`,其他支持 Skills 的 Agent 直接按其 Skill 调用语法使用。迁移会移除 Codex/Claude Code 原来的 Tuda MCP 条目,保留其他服务。独立 CLI 的 Skill 入口使用命令调用;宿主原生画板入口单独提供 stdio MCP。
62
+
63
+ 指定 `--user-data-path` 或 `TUDA_USER_DATA_PATH` 时只连接指定工作区,不自动启动另一个工作区。生成默认等待,`--async` 提交即返回;结束等待不会取消远端任务。导出失败后可重试导出,不必重新生成。
64
+
65
+ 开发:`npm ci && npm run build`。发布前自动同步 App 的 Skill,版本保持一致。
66
+
67
+ ### 本地切图
68
+
69
+ ```sh
70
+ tuda image slice --path <受管图片路径> --board <画板ID> --rows 3 --columns 4 --out ./avatars --json
71
+ tuda image slice --input ./sheet.png --rows 3 --columns 4 --margin 12 --gap 8 --json
72
+ tuda image slice --node <节点ID> --board <画板ID> --crops '[{"x":10,"y":20,"width":300,"height":300}]' --json
73
+ ```
74
+
75
+ 复用 App 本地切图,不调用模型;保留原图,切片保存为受管 PNG 并加入画板。源参数三选一,宫格与 crops 互斥;每轴最多 8 格、最多 64 个区域。坐标、边距和间距均为原图像素;不自动去底、识别主体或统一输出尺寸。返回 images、crops、nodeIds 和可选 exportedPaths;--out 为目录,已有文件默认不覆盖。高级入口为 `tuda call slice_image --input '<JSON>' --json`,精确 schema 见 tools list。
76
+
77
+ ### 可复用图片模板
78
+
79
+ 模板规则保存到当前工作区的模板库,与 App 自定义模板共用。创建/更新模板不调用模型、不产生生成费用。
80
+
81
+ ```sh
82
+ tuda templates create --name "品牌海报" --prompt "米白背景、黑色大标题、充足留白" --category marketing
83
+ tuda templates list
84
+ tuda templates show 'custom:返回的ID'
85
+ tuda templates update 'custom:返回的ID' --description "品牌系列海报"
86
+ tuda image generate --template 'custom:返回的ID' --prompt "春季咖啡新品,标题:春日第一杯" --out poster.png
87
+ ```
88
+
89
+ `--prompt` 在创建/更新时表示固定模板规则,在生成时表示本次内容;使用模板不会修改模板本身。生成记录保留模板 ID,结果沿用普通图片任务的等待、导出和画板流程。编辑模板使用 `--mode edit`,配合 `image edit --template ... --input ... --prompt ...`。
90
+
91
+ 复杂模板可使用 `templates create --input template.json` 或 `templates update <id> --input patch.json`,支持 name、description、prompt、category、mode、useCase、fields(id/label/value)、extractionScenario;命令行字段覆盖文件中的同名字段。更新保留未提供的字段,修改 prompt 且未提供 fields 时清除旧结构字段。`--expected-prompt` 可拒绝覆盖已改变的规则。
92
+
93
+ 目前列表包含自定义模板,不包含内置预设。旧版 localStorage 模板会在打开升级后的工作台时迁入共享库;首次迁移前,纯后台 CLI 无法读取这些旧模板。旧客户端不支持新接口,须使用同版本的 App 后台和 CLI。模板不保证模型输出像素级一致,仍需检查生成结果。
@@ -0,0 +1,15 @@
1
+ # 第三方依赖与资源
2
+
3
+ 根目录 MIT 许可证适用于本项目贡献者拥有版权的原创代码,不替代第三方组件的许可证,也不授予 Iterlay 商标权。
4
+
5
+ JavaScript 依赖见 `package.json`、`pnpm-lock.yaml` 和 `cli/package-lock.json`。分发前应保留所用版本要求的版权及许可证声明。
6
+
7
+ FFmpeg / FFprobe 作为独立视频工具组件按需下载,不包含在应用安装包内。`scripts/prepare-ffmpeg.mjs` 调用 `scripts/build-ffmpeg.sh`,从校验过 SHA-256 的固定源码构建,禁止使用 nonfree 预编译替代物。源码仓库的 MIT 许可不覆盖这些工具。
8
+
9
+ 演示图片、图标及其他视觉资源需依据各自来源和授权使用;不要将源码许可证理解为对来源未核实资源的重新授权。
10
+
11
+ ## 视频工具组件分发
12
+
13
+ `ffmpeg6-r1` 组件包含 FFmpeg 6.0 和 x264 commit `b35605ace3ddf7c1a5d67a2eb553f034aef41d55`,启用 GPL 和 libx264,不启用 nonfree,最低系统版本为 macOS 14,架构为 ARM64。组件以 `iterlay-media-tools-ffmpeg6-r1-darwin-arm64.zip` 发布至 GitHub Release `media-tools-ffmpeg6-r1`;应用内清单固定其下载 URL、长度及 SHA-256。
14
+
15
+ 组件的 `licenses/` 目录包含 GPL-2.0 文本、FFmpeg 许可证说明和 README、x264 COPYING、与二进制精确对应的两个原始源码压缩包、构建脚本,以及记录编译器、完整 FFmpeg 配置、源地址和源码哈希的 `build-info.json`。这些材料随二进制同一归档分发并原样安装到用户数据目录,便于获取相应源代码和重建。分发者仍需遵循各组件许可条件;这些工具不适用本项目 MIT 许可证。
package/UPDATE.md ADDED
@@ -0,0 +1,11 @@
1
+ # 宿主原生插件自动更新
2
+
3
+ `nativePlugin.updates` 是原生入口的更新合同。宿主在启动或新建连接时按24小时持久节流检查 `@petercjl/tuda@next`,元数据请求最多1500毫秒;使用 npm registry 声明的完整性验证下载,将候选安装到私有不可变版本目录。自动更新限定0.x同minor、1.x以上同major,并校验 native contract、桌面协议与最低版本、准备和鉴权合同。通过验证后原子切换活动指针,新连接使用新版本;已有连接固定原版本。下载、校验或激活失败保留当前版本,离线继续工作。升级桌面合同或不兼容版本由宿主显式迁移。禁用、状态与策略由宿主管理,仅影响该宿主私有安装,不同步其他 Agent。
4
+
5
+ # Update Tuda for the current Agent
6
+
7
+ Send your Agent: “Update @petercjl/tuda and synchronize your companion Skill.”
8
+
9
+ Resolve the current Agent’s exact `using-tuda` directory. Read `tuda skill status --target <absolute-directory> --json`; if current, reuse it without reinstalling. Otherwise run `tuda update check --json` and, when authorized, `tuda update install --target <absolute-directory> --agent <current-agent> --json`. The update stages an exact npm version, validates and activates the selected target-owned runtime, and preserves a recoverable backup. It leaves the bootstrap installation unchanged and returns the active runtime entry. Use that entry for subsequent operations; a bootstrap package is not the installed runtime authority.
10
+
11
+ Local edits and unmanaged targets stop the operation. A failed staged update retains its directory for diagnosis; a failed activation restores the previous target. Recheck status and host discovery before reporting completion. Git checkouts update through Git. Offline or advisory update checks do not interrupt canvas work. Desktop releases use the in-app update button and retain local user data.
@@ -0,0 +1,443 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "@petercjl/tuda",
4
+ "version": "0.1.0",
5
+ "kind": "cli-skill",
6
+ "skills": [
7
+ "using-tuda"
8
+ ],
9
+ "platforms": {
10
+ "darwin": "development",
11
+ "win32": "customer"
12
+ },
13
+ "requiredRuntime": {
14
+ "node": ">=22.12.0",
15
+ "desktop": "Tuda for canvas operations"
16
+ },
17
+ "agentEligibility": "valid-name-with-generic-fallback",
18
+ "hostDiscoveryAuthority": "host",
19
+ "automaticUpdates": {
20
+ "enabled": true,
21
+ "install": false,
22
+ "intervalHours": 24,
23
+ "timeoutMs": 600,
24
+ "optOut": "TUDA_NO_UPDATE_CHECK=1"
25
+ },
26
+ "installationLifecycle": {
27
+ "skillRequired": true,
28
+ "updateRequiresSkillSync": true,
29
+ "required_components": [
30
+ "cli",
31
+ "skill"
32
+ ],
33
+ "install": "skill install --target <exact-directory>",
34
+ "update": "update install --target <exact-directory>",
35
+ "verification": "skill status --target <exact-directory> --json",
36
+ "agentNeutral": true,
37
+ "explicitDestination": true,
38
+ "hostDiscoveryVerificationRequired": true,
39
+ "physicalRuntimeIsolation": true,
40
+ "bootstrapNotice": "INSTALL.md"
41
+ },
42
+ "commandContracts": {
43
+ "version": {
44
+ "options": {
45
+ "--json": {
46
+ "type": "boolean"
47
+ }
48
+ },
49
+ "sideEffects": "none"
50
+ },
51
+ "capabilities": {
52
+ "options": {
53
+ "--json": {
54
+ "type": "boolean"
55
+ }
56
+ },
57
+ "sideEffects": "none"
58
+ },
59
+ "doctor": {
60
+ "options": {
61
+ "--json": {
62
+ "type": "boolean"
63
+ }
64
+ },
65
+ "sideEffects": "none"
66
+ },
67
+ "skill source": {
68
+ "options": {
69
+ "--json": {
70
+ "type": "boolean"
71
+ },
72
+ "--target": {
73
+ "type": "string",
74
+ "semantics": "exact Skill directory"
75
+ },
76
+ "--agent": {
77
+ "type": "string"
78
+ },
79
+ "--name": {
80
+ "type": "string"
81
+ }
82
+ },
83
+ "sideEffects": "none"
84
+ },
85
+ "skill status": {
86
+ "options": {
87
+ "--json": {
88
+ "type": "boolean"
89
+ },
90
+ "--target": {
91
+ "type": "string",
92
+ "semantics": "exact Skill directory"
93
+ },
94
+ "--agent": {
95
+ "type": "string"
96
+ },
97
+ "--name": {
98
+ "type": "string"
99
+ }
100
+ },
101
+ "sideEffects": "none"
102
+ },
103
+ "skill install": {
104
+ "options": {
105
+ "--json": {
106
+ "type": "boolean"
107
+ },
108
+ "--target": {
109
+ "type": "string",
110
+ "semantics": "exact Skill directory"
111
+ },
112
+ "--agent": {
113
+ "type": "string"
114
+ },
115
+ "--name": {
116
+ "type": "string"
117
+ }
118
+ },
119
+ "sideEffects": "local-write"
120
+ },
121
+ "skill update": {
122
+ "options": {
123
+ "--json": {
124
+ "type": "boolean"
125
+ },
126
+ "--target": {
127
+ "type": "string",
128
+ "semantics": "exact Skill directory"
129
+ },
130
+ "--agent": {
131
+ "type": "string"
132
+ },
133
+ "--name": {
134
+ "type": "string"
135
+ }
136
+ },
137
+ "sideEffects": "local-write"
138
+ },
139
+ "update check": {
140
+ "options": {
141
+ "--json": {
142
+ "type": "boolean"
143
+ },
144
+ "--channel": {
145
+ "type": "string",
146
+ "enum": [
147
+ "latest",
148
+ "next"
149
+ ]
150
+ }
151
+ },
152
+ "sideEffects": "none"
153
+ },
154
+ "update install": {
155
+ "options": {
156
+ "--json": {
157
+ "type": "boolean"
158
+ },
159
+ "--target": {
160
+ "type": "string",
161
+ "semantics": "exact Skill directory"
162
+ },
163
+ "--agent": {
164
+ "type": "string"
165
+ },
166
+ "--name": {
167
+ "type": "string"
168
+ },
169
+ "--channel": {
170
+ "type": "string",
171
+ "enum": [
172
+ "latest",
173
+ "next"
174
+ ]
175
+ }
176
+ },
177
+ "sideEffects": "package-and-skill-update"
178
+ },
179
+ "desktop prepare": {
180
+ "options": {
181
+ "--json": {
182
+ "type": "boolean"
183
+ },
184
+ "--app-path": {
185
+ "type": "string"
186
+ },
187
+ "--user-data-path": {
188
+ "type": "string"
189
+ },
190
+ "--startup-timeout": {
191
+ "type": "number",
192
+ "unit": "seconds",
193
+ "minimum": 1,
194
+ "maximum": 180
195
+ }
196
+ },
197
+ "sideEffects": "local-process-start"
198
+ }
199
+ },
200
+ "discoveryContract": {
201
+ "schemaVersion": 1,
202
+ "entryPoints": [
203
+ {
204
+ "argv": [
205
+ "capabilities",
206
+ "--json"
207
+ ],
208
+ "result": "manifest"
209
+ }
210
+ ],
211
+ "commandsField": "commandContracts",
212
+ "version": {
213
+ "command": "version",
214
+ "argv": [
215
+ "version",
216
+ "--json"
217
+ ],
218
+ "fields": {
219
+ "package": {
220
+ "field": "package",
221
+ "type": "string"
222
+ },
223
+ "version": {
224
+ "field": "version",
225
+ "type": "string"
226
+ }
227
+ }
228
+ },
229
+ "skillCollection": {
230
+ "namesField": "skills",
231
+ "default": "using-tuda",
232
+ "selector": {
233
+ "option": "--name",
234
+ "type": "string"
235
+ },
236
+ "enumeration": {
237
+ "argv": [
238
+ "skill",
239
+ "source",
240
+ "--json"
241
+ ],
242
+ "itemsField": "skills",
243
+ "completeField": "complete"
244
+ },
245
+ "namedSource": [
246
+ "skill",
247
+ "source",
248
+ "--name",
249
+ "{skill}",
250
+ "--json"
251
+ ]
252
+ }
253
+ },
254
+ "maintenanceContract": {
255
+ "schemaVersion": 1,
256
+ "agentEligibility": "valid-name-with-generic-fallback",
257
+ "hostDiscoveryAuthority": "host",
258
+ "targetOptions": {
259
+ "--target": {
260
+ "type": "string",
261
+ "kind": "skill-directory"
262
+ }
263
+ },
264
+ "source": {
265
+ "name": {
266
+ "field": "name",
267
+ "type": "string"
268
+ },
269
+ "package": {
270
+ "field": "package",
271
+ "type": "string"
272
+ },
273
+ "version": {
274
+ "field": "version",
275
+ "type": "string"
276
+ },
277
+ "path": {
278
+ "field": "sourcePath",
279
+ "type": "string"
280
+ }
281
+ },
282
+ "status": {
283
+ "name": {
284
+ "field": "name",
285
+ "type": "string"
286
+ },
287
+ "package": {
288
+ "field": "package",
289
+ "type": "string"
290
+ },
291
+ "version": {
292
+ "field": "version",
293
+ "type": "string"
294
+ },
295
+ "target": {
296
+ "field": "target",
297
+ "type": "string"
298
+ },
299
+ "installed": {
300
+ "field": "installed",
301
+ "type": "boolean"
302
+ },
303
+ "managed": {
304
+ "field": "managed",
305
+ "type": "boolean"
306
+ },
307
+ "current": {
308
+ "field": "current",
309
+ "type": "boolean"
310
+ },
311
+ "edited": {
312
+ "field": "edited",
313
+ "type": "boolean"
314
+ },
315
+ "verification": {
316
+ "field": "verification",
317
+ "type": "object"
318
+ },
319
+ "recovery": {
320
+ "field": "recovery",
321
+ "type": "object"
322
+ }
323
+ }
324
+ },
325
+ "nativePlugin": {
326
+ "contract": 1,
327
+ "profile": "boards-only",
328
+ "transport": "stdio-mcp",
329
+ "entry": "dist/board-plugin.js",
330
+ "requiresSkill": false,
331
+ "requiresDesktop": true,
332
+ "environment": {
333
+ "TUDA_USER_DATA_PATH": "exact private workspace directory",
334
+ "TUDA_APP_PATH": "compatible desktop root",
335
+ "TUDA_PLUGIN_SPACE": "fixed personal or enterprise space",
336
+ "TUDA_SPACE": "alias with precedence",
337
+ "TUDA_EMBEDDED_HOST": "host identity for isolated packaged desktop",
338
+ "TUDA_AUTH_HANDOFF_FILE": "host-private short-lived PKCE handoff file; never a model argument",
339
+ "TUDA_STARTUP_TIMEOUT_MS": "background readiness deadline, 1000..180000 ms; native plugin default 120000"
340
+ },
341
+ "generationTools": false,
342
+ "preparation": {
343
+ "argv": [
344
+ "desktop",
345
+ "prepare",
346
+ "--app-path",
347
+ "{appRoot}",
348
+ "--user-data-path",
349
+ "{userData}",
350
+ "--startup-timeout",
351
+ "120",
352
+ "--json"
353
+ ],
354
+ "readyField": "data.ready",
355
+ "instanceField": "data.instanceId",
356
+ "requiresAuth": false,
357
+ "sequence": [
358
+ "prepare",
359
+ "issue-instance-bound-handoff",
360
+ "tools/call"
361
+ ],
362
+ "contract": 1,
363
+ "resultSchema": {
364
+ "type": "object",
365
+ "required": [
366
+ "schemaVersion",
367
+ "ok",
368
+ "data"
369
+ ],
370
+ "properties": {
371
+ "schemaVersion": {
372
+ "const": 1
373
+ },
374
+ "ok": {
375
+ "const": true
376
+ },
377
+ "data": {
378
+ "type": "object",
379
+ "required": [
380
+ "ready",
381
+ "instanceId",
382
+ "protocolVersion"
383
+ ],
384
+ "properties": {
385
+ "ready": {
386
+ "const": true
387
+ },
388
+ "instanceId": {
389
+ "type": "string",
390
+ "pattern": "^[a-f0-9]{64}$"
391
+ },
392
+ "protocolVersion": {
393
+ "const": 1
394
+ }
395
+ },
396
+ "additionalProperties": false
397
+ }
398
+ }
399
+ }
400
+ },
401
+ "authHandoff": {
402
+ "contract": 1,
403
+ "transport": "private-file",
404
+ "environment": "TUDA_AUTH_HANDOFF_FILE",
405
+ "targetAppId": "tuda",
406
+ "required": [
407
+ "contract",
408
+ "origin",
409
+ "appId",
410
+ "code",
411
+ "verifier",
412
+ "expiresAt",
413
+ "instanceId"
414
+ ],
415
+ "instanceField": "instanceId",
416
+ "bindingSource": "nativePlugin.preparation.data.instanceId",
417
+ "sessionPersistence": "memory-only",
418
+ "sequence": [
419
+ "prepare-desktop",
420
+ "issue-handoff",
421
+ "write-instance-bound-file",
422
+ "tools/call"
423
+ ]
424
+ },
425
+ "desktopCompatibility": {
426
+ "contract": 1,
427
+ "protocolVersion": 1,
428
+ "minimumVersion": "0.1.0"
429
+ },
430
+ "updates": {
431
+ "contract": 1,
432
+ "owner": "host",
433
+ "package": "@petercjl/tuda",
434
+ "channel": "next",
435
+ "mode": "automatic",
436
+ "intervalHours": 24,
437
+ "timeoutMs": 1500,
438
+ "activation": "next-connection",
439
+ "compatibility": "same-minor-for-0.x-same-major-for-1.x",
440
+ "failure": "keep-active"
441
+ }
442
+ }
443
+ }