Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/webguhui/minimax-photo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ The bundled [editing skill](skills/minimax-photo/SKILL.md) guides command discov

## Tested environment

Requires MiniMax Code **3.1.2 or later**. This is the minimum API requirement, not a claim that every supported client version has been tested.

Tested on macOS Apple Silicon in MiniMax Code, initially with client **3.1.3-preview.4675**. Package **0.2.35** was installed on 2026-10-20; all 98 installed files matched the release. The runtime ZIP is **14,263,623 bytes**, without Electron or model weights.

- A single in-app request generated an image, returned it automatically and opened it as a new artwork. Semantic image editing also has a successful native Host test.
Expand All @@ -46,7 +48,8 @@ One historical open failure required a restart; its cause is unresolved. Natural
The editor_open_file tool reads an explicitly supplied local PNG/JPEG/WebP/PSD/pcraft file (up to 32 MB), checks its header, and sends a private copy to the connected editor as a new document. It does not scan directories or modify the original file. The task payload is stored under the plugin data directory; tool replies omit the file bytes.

- The Node service binds only to the Host-provided loopback address. It reads bundled assets from the plugin directory and stores projects, recovery snapshots, assistant drafts/replies/session IDs, image requests/results, editor jobs and exports under opaque `context.dataDir` paths. It does not read Host configuration, credentials or conversation databases.
- Images selected through file inputs are read in the page. Save/export uses the browser download dialog. The backend can read a PNG path supplied to `submit_image_result`; this is a privileged Agent tool, not an arbitrary-file HTTP endpoint. The Agent may write generated files into its working directory before returning them.
- Images selected through file inputs are read in the page. Save/export uses the browser download dialog.
- `submit_image_result` can read any local PNG path supplied by the Agent that the plugin process has OS permission to read (up to 16 MB). It is not restricted to the session working directory or `context.dataDir`; it checks the file and PNG contents, then saves a copy in plugin data without changing the source. `editor_open_file` likewise has no directory allowlist for its supported formats. Neither tool asks for a separate file-picker confirmation. These are privileged Agent tools, not arbitrary-file HTTP download endpoints. Only enable this plugin for Agents you trust with that local file access. The Agent may write generated files into its working directory before returning them.
- This package declares `agentAccess: ["session.run"]`. Sending a request runs a Host Agent that can access files, shell and MCP tools under Host permissions. Requests include the user's instructions and current artwork context; image tasks may include a reference image. Model/provider traffic is handled by the Host and its selected tools, not by an embedded API key.
- The MiniApp backend makes no direct external service requests. Provider destinations depend on the Host's enabled services; there is no fixed provider-host list in this package. The app does not automatically approve permission requests.
- PTC uses a Node worker thread with a QuickJS VM and a bounded editing API. It has no direct filesystem or network API. The MiniApp itself starts no shell subprocess; Host Agent tools may do so after a user request.
Expand Down
6 changes: 5 additions & 1 deletion plugins/webguhui/minimax-photo/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

## 已验证环境

最低要求为 MiniMax Code **3.1.2 或更新版本**。这是 API 兼容要求,不表示已测试所有符合要求的客户端版本。

在 macOS Apple Silicon 的 MiniMax Code 中验收,初始客户端版本为 3.1.3-preview.4675。当前包 **0.2.35** 已于 2026-10-20 实际安装,98 个文件与发布包一致,运行 ZIP **14,263,623 字节**,不含 Electron 或模型权重。

- 应用内一句需求完成文生图、自动回传和新画布打开;语义改图也已有真实宿主成功记录。
Expand All @@ -34,7 +36,9 @@

`editor_open_file` 读取明确提供的本机 PNG/JPEG/WebP/PSD/pcraft 文件(最多 32 MB),检查文件头后交给编辑器作为新文档打开。不扫描目录、不修改原文件。任务内容保存在插件数据目录,工具回复不含文件字节。

应用在宿主分配的本机端口运行,工程备份、草稿、回复、会话编号、图片和编辑任务存入宿主提供的 `context.dataDir`。不读取宿主配置、密钥或会话数据库。选择文件在页面中完成,保存使用下载对话框。图片回传 MCP 工具可读取 Agent 指定的 PNG 路径;不是任意文件下载接口。
应用在宿主分配的本机端口运行,工程备份、草稿、回复、会话编号、图片和编辑任务存入宿主提供的 `context.dataDir`。不读取宿主配置、密钥或会话数据库。选择文件在页面中完成,保存使用下载对话框。

`submit_image_result` 可读取 Agent 指定的任意本机 PNG 路径(最多 16 MB),前提是插件进程具有操作系统授予的读取权限。路径不限于会话工作目录或 `context.dataDir`;工具检查文件和 PNG 内容后,将副本存入插件数据目录,不修改原文件。`editor_open_file` 对支持的格式也没有目录白名单。两者均不会额外弹出文件选择确认框。这些是 Agent 工具,不是任意文件 HTTP 下载接口;仅向你信任其访问本机文件的 Agent 启用本插件。

发送需求会运行宿主 Agent,它可以按宿主权限使用文件、Shell 和 MCP;需求和参考图片可能交给用户配置的模型服务。应用不自带密钥,不自动批准权限。后台不直接请求外部服务,也不自行启动 Shell 子进程;Agent 工具可能执行这些操作。PTC 运行于独立 QuickJS 工作线程,仅暴露编辑 API。

Expand Down
23 changes: 23 additions & 0 deletions plugins/webguhui/minimax-photo/docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,29 @@ gzip -n -9 -f "$PHOTO_PACKAGE/miniapp/client/photocraft/photocraft_bg.wasm"

服务端以 `Content-Encoding: gzip` 提供压缩 WASM,避免超过社区单文件 16 MiB 限制。不要把未压缩 WASM 一起提交。无需 Electron、Trunk 或模型权重。此构建未开启 HEIF feature。

### WASM 文件校验

0.2.35 提交的编辑器文件 SHA-256 如下。压缩文件用于核对分发内容,解压后的哈希用于排除 gzip 元数据差异:

| 文件 | SHA-256 |
| --- | --- |
| `photocraft_bg.wasm.gz` | `89574eab535dc34de02e3eb007fb88b41f63dcf89f57f619b4631d934e1fb8a4` |
| 解压后的 `photocraft_bg.wasm` | `9993bdb94fe0ad397d858a40703a17d835cb145586deb27530d85ae919501d4d` |

在插件目录运行以下命令核对(需要 Python 3):

```sh
python3 - <<'PYTHON'
import gzip, hashlib
from pathlib import Path
payload = Path("miniapp/client/photocraft/photocraft_bg.wasm.gz").read_bytes()
print("gzip:", hashlib.sha256(payload).hexdigest())
print("wasm:", hashlib.sha256(gzip.decompress(payload)).hexdigest())
PYTHON
```

以上是仓库现有产物的校验值,不是跨工具链可重复构建的保证。上面的构建步骤尚未验证在不同 Rust/LLVM 版本下产生逐字节一致的 WASM;哈希不同时,先核对上游提交、补丁和工具链。更新引擎产物时同步更新此表。

`frame.js`、`frame.css` 和 `index.html` 是本包维护的页面适配文件,不由 wasm-bindgen 生成。iframe 使用同源资源以支持宿主的本机认证,通过固定方法集合、来源窗口检查和请求标识传递编辑操作;不要将其当作不可信代码的安全隔离边界。PTC 则在单独 QuickJS VM 中执行。

`cjk-ui.otf` 是 Noto Sans CJK JP Regular 的 UI 字符子集(SIL OFL 1.1),原字体来自 [noto-cjk](https://github.com/notofonts/noto-cjk)。该文件作为可分发字体资源直接提交;新增 UI 字符时需要用 fonttools `pyftsubset` 重新生成,保留三份 CJK 翻译目录使用的字符、假名和标点。它不是完整的中文排版字体,作品的特殊字形需另行导入对应字体。
Expand Down
Loading