meshy-dsh 0.1.1 → 0.2.1
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 +23 -5
- package/README.zh.md +6 -2
- package/cordis.patch.yml +6 -3
- package/lib/client.js +3604 -0
- package/lib/client.viewer.js +4237 -0
- package/lib/index.js +133 -0
- package/package.json +15 -2
package/README.md
CHANGED
|
@@ -16,7 +16,8 @@ dsh plugin --profile web add github:meshy-dev/meshy-dsh
|
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
`dsh --profile web --dump-config` now shows a `# == meshy-dsh` layer, and typing `/` in `dsh web`
|
|
19
|
-
lists `meshy-3d-generation` and `meshy-3d-printing
|
|
19
|
+
lists `meshy-3d-generation` and `meshy-3d-printing` in a new session. Plugins belong to one
|
|
20
|
+
profile: install into each one you use (`web`, `tui`, `desktop`). Then ask for a model, for example "make a
|
|
20
21
|
low-poly treasure chest and export FBX". The agent checks the CLI, asks you to sign in if needed,
|
|
21
22
|
shows the cost and waits for your confirmation before it spends credits.
|
|
22
23
|
|
|
@@ -26,11 +27,27 @@ when it is missing and signs you in with `meshy auth login`; in mainland China i
|
|
|
26
27
|
calls on the China site. dsh removes credential-shaped variables from the agent's shell, so an
|
|
27
28
|
exported `MESHY_API_KEY` does not reach the CLI; the browser login does.
|
|
28
29
|
|
|
30
|
+
## Settings page and 3D preview
|
|
31
|
+
|
|
32
|
+
In Web and Desktop, a **Meshy** entry appears in the left sidebar. It opens a Meshy page with your
|
|
33
|
+
account and a few example requests: pick one and a new session opens with it filled in, ready to
|
|
34
|
+
edit and send. **Settings → Meshy** (also the plugin's page under **Plugins**) shows the
|
|
35
|
+
Meshy CLI version, whether and how you are signed in (browser or API key), which site (meshy.ai
|
|
36
|
+
or meshy.cn) and your credits. **Sign in to Meshy** shows the approval link with a QR code for your phone and the code
|
|
37
|
+
to check; the page picks up the approval by itself. Clicking a `.glb` file in the right sidebar, or
|
|
38
|
+
the card of a model the agent delivers, opens an interactive 3D preview (drag to orbit, scroll to
|
|
39
|
+
zoom, reset the view or let it turn) with its file size and triangle count. Models up to 256 MB
|
|
40
|
+
open, past dsh's 32 MB limit for previewing a whole file, because the preview reads them in 2 MB
|
|
41
|
+
pieces. tui and headless have
|
|
42
|
+
neither; the skills work the same everywhere.
|
|
43
|
+
|
|
29
44
|
## How it works
|
|
30
45
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
46
|
+
[`cordis.patch.yml`](cordis.patch.yml) mounts one more instance of dsh's built-in filesystem
|
|
47
|
+
skill provider over this package's `skills/` directory, so the skills load like any local skill,
|
|
48
|
+
and loads the package itself for the settings page: `lib/index.js` serves four authenticated
|
|
49
|
+
routes that run the Meshy CLI with fixed arguments, and `lib/client.js` (built from `src/client/`)
|
|
50
|
+
is the browser half, with three.js in a separate `lib/client.viewer.js` loaded on first use. A skill of the same name in
|
|
34
51
|
your project's `.dsh/skills` or `.agents/skills` takes precedence. `locale/` and `icon.svg` are
|
|
35
52
|
what dsh's Plugin Manager shows.
|
|
36
53
|
|
|
@@ -41,7 +58,8 @@ other agent host. Change them there.
|
|
|
41
58
|
## Development
|
|
42
59
|
|
|
43
60
|
```bash
|
|
44
|
-
npm
|
|
61
|
+
npm ci && npm run build # rebuild lib/client*.js from src/client/ (committed)
|
|
62
|
+
npm test # manifest, client wrappers, host routes, packed files
|
|
45
63
|
node scripts/sync-skills.mjs --check # skills/ matches the pinned meshy-3d-agent release
|
|
46
64
|
node scripts/smoke.mjs # install into a throwaway dsh and load the skills
|
|
47
65
|
node scripts/sync-skills.mjs --from ../meshy-3d-agent # try unreleased skills from a checkout
|
package/README.zh.md
CHANGED
|
@@ -12,13 +12,17 @@ dsh plugin --profile web add meshy-dsh
|
|
|
12
12
|
dsh plugin --profile web add github:meshy-dev/meshy-dsh
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
装好后,`dsh --profile web --dump-config` 里会出现 `# == meshy-dsh` 一层;在 `dsh web` 的输入框里输入 `/`,能看到 `meshy-3d-generation` 和 `meshy-3d-printing
|
|
15
|
+
装好后,`dsh --profile web --dump-config` 里会出现 `# == meshy-dsh` 一层;在 `dsh web` 的输入框里输入 `/`,能看到 `meshy-3d-generation` 和 `meshy-3d-printing`(装完要新开会话)。插件按 profile 安装,你用哪个 profile(`web`、`tui`、`desktop`)就要往哪个里装。然后直接提需求,比如"做一个低多边形的宝箱,导出 FBX"。agent 会先检查 CLI,需要时引导你登录,说明消耗的积分,等你确认后才开始生成。
|
|
16
16
|
|
|
17
17
|
需要 Node.js 22.12 或更新版本。没有 Meshy CLI 时 agent 会自动安装(`npm install -g meshy-cli@0.7`),并用 `meshy auth login` 帮你登录;在中国大陆请用 `meshy auth login --region cn`,在 meshy.cn 登录,账号和国际站相同,之后的调用都会走中国站。dsh 会从 agent 的 shell 里去掉带凭据特征的环境变量,所以你 export 的 `MESHY_API_KEY` 传不到 CLI,请使用浏览器登录。
|
|
18
18
|
|
|
19
|
+
## 设置页与 3D 预览
|
|
20
|
+
|
|
21
|
+
在 Web 和 Desktop 里,左侧栏会出现 **Meshy** 入口,打开后是 Meshy 页面:显示账号,并给出几个示例需求,点一个就会新开会话并填好需求,改一改再发送。**设置 → Meshy**(插件页里也有)会显示 Meshy CLI 版本、是否已登录及登录方式(浏览器或 API key)、所在站点(meshy.ai 或 meshy.cn)和积分。点**登录 Meshy**会显示批准链接、二维码和核对用的验证码,可以用手机扫码批准,页面会自动发现批准完成。在右侧栏点一个 `.glb` 文件,或点 agent 交付的模型卡片,会打开可交互的 3D 预览(拖动旋转,滚轮缩放,可复位视角或自动旋转),并显示文件大小和三角面数。预览会按 2 MB 分块读取模型,所以不受 dsh 整文件预览 32 MB 的上限限制,最大可预览 256 MB。tui 和 headless 没有这些界面,skill 在任何界面都一样能用。
|
|
22
|
+
|
|
19
23
|
## 工作方式
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
[`cordis.patch.yml`](cordis.patch.yml) 再挂一个 dsh 内置的文件系统 skill provider,只扫描本包的 `skills/` 目录,所以这些 skill 和本地 skill 的加载方式完全一样;同时加载本包自身来提供设置页:`lib/index.js` 提供四个需要鉴权的接口,用固定参数调用 Meshy CLI;`lib/client.js`(由 `src/client/` 构建)是浏览器端,three.js 单独放在首次使用时才加载的 `lib/client.viewer.js` 里。项目里 `.dsh/skills` 或 `.agents/skills` 下的同名 skill 优先。`locale/` 和 `icon.svg` 是 dsh 插件管理页显示的名称、简介和图标。
|
|
22
26
|
|
|
23
27
|
`skills/` 是 [meshy-3d-agent](https://github.com/meshy-dev/meshy-3d-agent) 里 CLI skill 的副本;那个仓库负责维护,也服务其他所有 agent 宿主。修改请提到那边。
|
|
24
28
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# One more instance of dsh's own filesystem skill provider, scanning only this
|
|
2
|
+
# package's skills/ (the path is resolved from wherever the package is installed:
|
|
3
|
+
# npm, GitHub or a local checkout), and this package's own row: in Web and Desktop
|
|
4
|
+
# it serves the Meshy settings page and the GLB preview, elsewhere it does nothing.
|
|
4
5
|
- insert:
|
|
5
6
|
- id: meshy
|
|
6
7
|
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
@@ -10,3 +11,5 @@
|
|
|
10
11
|
watch: false
|
|
11
12
|
customSkillDirs:
|
|
12
13
|
- !!js "process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('meshy-dsh/package.json'), '..', 'skills')"
|
|
14
|
+
- id: meshy-ui
|
|
15
|
+
name: 'meshy-dsh'
|