meshy-dsh 0.3.4 → 0.3.6
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 +10 -1
- package/README.zh.md +5 -1
- package/lib/client.js +121 -13
- package/lib/index.js +67 -2
- package/package.json +3 -3
- package/skills/meshy-3d-generation/SKILL.md +19 -28
- package/skills/meshy-3d-generation/references/animation.md +1 -2
- package/skills/meshy-3d-generation/references/delivery.md +9 -29
- package/skills/meshy-3d-generation/references/pipelines.md +50 -15
- package/skills/meshy-3d-generation/references/setup.md +39 -72
- package/skills/meshy-3d-generation/references/troubleshooting.md +5 -7
- package/skills/meshy-3d-printing/SKILL.md +14 -25
- package/skills/meshy-3d-printing/references/creative-lab.md +1 -3
- package/skills/meshy-3d-printing/references/delivery.md +9 -29
- package/skills/meshy-3d-printing/references/printing.md +38 -8
- package/skills/meshy-3d-printing/references/setup.md +39 -72
- package/skills/meshy-3d-printing/references/troubleshooting.md +5 -7
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Shared by the generation and print workflows. Three things are settled before any job
|
|
4
4
|
starts: **how to run the CLI**, **whether a session already exists**, and **where files go**.
|
|
5
|
-
The supported CLI is **0.8.x, from 0.8.
|
|
6
|
-
separate token store is involved.
|
|
5
|
+
The supported CLI is **0.8.x, from 0.8.5,** on **Node.js 22.12 or newer**.
|
|
7
6
|
|
|
8
7
|
Contents: 1 runner · 2 reuse a session · 3 first login · 4 where files go · 5 one session
|
|
9
8
|
everywhere · 6 API keys · 7 the China site.
|
|
@@ -33,8 +32,8 @@ meshy --version
|
|
|
33
32
|
|
|
34
33
|
| Observation | What to do |
|
|
35
34
|
|---|---|
|
|
36
|
-
| `meshy --version` prints 0.8.
|
|
37
|
-
| no `meshy` command, or a version older than 0.8.
|
|
35
|
+
| `meshy --version` prints 0.8.5 or a later 0.8.x | run `meshy` |
|
|
36
|
+
| no `meshy` command, or a version older than 0.8.5 | install the newest 0.8.x (below), then run `meshy` |
|
|
38
37
|
| 0.9 or newer | keep it, since something else may rely on it, and run the temporary package |
|
|
39
38
|
| no Node.js, or Node older than 22.12 | stop and report it: the user installs Node.js 22.12+ |
|
|
40
39
|
|
|
@@ -43,15 +42,15 @@ npm install -g meshy-cli@0.8
|
|
|
43
42
|
```
|
|
44
43
|
|
|
45
44
|
Check and install without asking first; say in one line that you are installing it. Install at
|
|
46
|
-
most once: when `meshy --version` still reports a version older than 0.8.
|
|
45
|
+
most once: when `meshy --version` still reports a version older than 0.8.5 afterwards, the
|
|
47
46
|
registry this machine uses lags npm, so report that instead of installing again. Never use `sudo`
|
|
48
47
|
or change system policy: when the install is refused (permissions, a managed machine, a sandbox), use the temporary package
|
|
49
48
|
instead. It runs the same CLI without installing anything: put `npm exec --yes
|
|
50
|
-
--package=meshy-cli@0.8.
|
|
49
|
+
--package=meshy-cli@0.8.5 --` in front of the same arguments, and the exit code and the JSON on
|
|
51
50
|
stdout are forwarded unchanged. Recipes are written as `meshy …`; example:
|
|
52
51
|
|
|
53
52
|
```bash
|
|
54
|
-
npm exec --yes --package=meshy-cli@0.8.
|
|
53
|
+
npm exec --yes --package=meshy-cli@0.8.5 -- meshy auth status --format json --no-update-check
|
|
55
54
|
```
|
|
56
55
|
|
|
57
56
|
The first such call downloads the package into the npm cache; later calls reuse it. It names an
|
|
@@ -71,8 +70,7 @@ Every command, auth included, prints one `meshy.cli/v1` envelope on stdout (`ok`
|
|
|
71
70
|
the unauthenticated and unverified answers below are `ok: true` with exit 3.
|
|
72
71
|
|
|
73
72
|
- `authenticated: true`, `verified: true`, exit 0: continue with this account. **No new login.**
|
|
74
|
-
`result.account` names who is signed in when the site reports it
|
|
75
|
-
login made before CLI 0.8, and the China site for now).
|
|
73
|
+
`result.account` names who is signed in when the site reports it, and may be `null`.
|
|
76
74
|
- `authenticated: false`, exit 3: no usable credential; log in (next section).
|
|
77
75
|
- `authenticated: true`, `verified: false`, exit 3: a credential exists but verification failed —
|
|
78
76
|
which includes network and server errors, not just rejection. Do not start a login or delete
|
|
@@ -94,10 +92,8 @@ meshy auth login --device --format json --no-update-check
|
|
|
94
92
|
In mainland China, or when the user asks for the China site, add `--region cn`
|
|
95
93
|
([section 7](#7-the-china-site)): the code is then entered at `meshy.cn`.
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
to consume its result. Do not detach it with `&`, `nohup`, or a terminal launch and then
|
|
100
|
-
return. The CLI writes the verification instruction to **stderr**, before it starts polling:
|
|
95
|
+
The CLI writes the verification instruction to **stderr**, then polls until the user approves or
|
|
96
|
+
the code expires:
|
|
101
97
|
|
|
102
98
|
```text
|
|
103
99
|
Enter code WXYZ-1234 at https://www.meshy.ai/device
|
|
@@ -112,38 +108,17 @@ the chat — the CLI receives the credential itself.
|
|
|
112
108
|
|
|
113
109
|
### Keep the agent turn alive
|
|
114
110
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
chunk contains only npm startup output, read more from that same session.
|
|
127
|
-
3. Call `write_stdin` with that `session_id`, empty input and a bounded wait (e.g.
|
|
128
|
-
`yield_time_ms: 1000`–`10000`). While still running, repeat; no output means keep waiting.
|
|
129
|
-
The CLI already polls OAuth, so do not spawn another login or poll HTTP yourself.
|
|
130
|
-
4. Consume the actual exit code and final JSON. Only then verify `auth status` and continue
|
|
131
|
-
the original task in this turn. A tool yield/timeout is not an OAuth expiry.
|
|
132
|
-
|
|
133
|
-
If shell calls are wrapped by `functions.exec` and it returns a running `cell_id`, resume
|
|
134
|
-
that cell with `functions.wait`; once it returns the shell result, use its `session_id`
|
|
135
|
-
if present. Do not confuse the two IDs or leave an unawaited promise in a finished wrapper.
|
|
136
|
-
In Claude Code, start it with the Bash tool's `run_in_background`, read its output file until
|
|
137
|
-
the code line appears, then keep checking that output until the process exits. Other hosts use
|
|
138
|
-
their equivalent running-command wait tool. Send a brief progress
|
|
139
|
-
update during a long wait without ending the turn. Stop waiting on a terminal login error,
|
|
140
|
-
actual code expiry, user cancellation, or an explicit host limitation; report the reason.
|
|
141
|
-
Do not create recurring automations or a second task to keep a login alive.
|
|
142
|
-
|
|
143
|
-
The process keeps polling until the user approves or the code expires. While it polls, do not
|
|
144
|
-
start a second login, do not kill it, and do not ask the user to paste anything. On approval it
|
|
145
|
-
prints the envelope with `result.status: "logged_in"` and `result.verified: true` to stdout and
|
|
146
|
-
exits 0. Then:
|
|
111
|
+
Run the login as a running tool session and keep waiting on that **same** session in this turn,
|
|
112
|
+
with the host's own tool for reading a running command, until it exits. Browser approval ends
|
|
113
|
+
the CLI process, not your turn, and a process still running when the turn ends has nobody to
|
|
114
|
+
read its result. So do not detach it (`&`, `nohup`, a new terminal), do not end the turn with
|
|
115
|
+
"authorize and I will continue", and do not ask the user to reply "done". A tool yield or timeout
|
|
116
|
+
is not a code expiry. While it polls, do not start a second login, kill it or poll the API
|
|
117
|
+
yourself; send a brief progress note during a long wait. A host whose own skill says it wakes the
|
|
118
|
+
session when a background command exits follows that procedure instead.
|
|
119
|
+
|
|
120
|
+
On approval the CLI prints the envelope with `result.status: "logged_in"` and
|
|
121
|
+
`result.verified: true` to stdout and exits 0. Then:
|
|
147
122
|
|
|
148
123
|
1. Re-run `auth status`; `verified: true` is the proof, not the exit code of `login`.
|
|
149
124
|
2. **Continue the request the user originally made**, with the same inputs, output path and
|
|
@@ -164,26 +139,22 @@ Failure branches — each is a different recovery, so read the error rather than
|
|
|
164
139
|
"oauth_network"` and a `fetch failed` message, before any URL or code appears): the shell
|
|
165
140
|
cannot reach Meshy, so no login can finish there. Run the *same* command again with network
|
|
166
141
|
access or outside the sandbox, asking the user to allow it if the host requires approval. Do
|
|
167
|
-
not follow the error's `--with-key` hint, probe the network with `curl`, or
|
|
168
|
-
credential to reuse
|
|
169
|
-
|
|
170
|
-
|
|
142
|
+
not follow the error's `--with-key` hint, probe the network with `curl`, or look for a
|
|
143
|
+
credential to reuse (section 5).
|
|
144
|
+
- **The host cannot wait in the turn** (no tool reads a running command, or progress messages
|
|
145
|
+
reach the user only when the turn ends): use the two-step sign-in below.
|
|
171
146
|
|
|
172
|
-
###
|
|
147
|
+
### Two-step sign-in
|
|
173
148
|
|
|
174
|
-
|
|
175
|
-
Slack or Telegram), progress messages may arrive late or only when the turn ends, so a link shown
|
|
176
|
-
while the login waits never reaches them. Sign in in two steps instead (add `--region cn` to the
|
|
177
|
-
first for the China site):
|
|
149
|
+
Step one returns at once (add `--region cn` for the China site):
|
|
178
150
|
|
|
179
151
|
```bash
|
|
180
152
|
meshy auth login --device --no-wait --format json --no-update-check
|
|
181
153
|
```
|
|
182
154
|
|
|
183
|
-
It
|
|
184
|
-
`result.
|
|
185
|
-
|
|
186
|
-
in-app browser may not keep the sign-in), approve, and reply when done. When they reply:
|
|
155
|
+
It prints `result.verification_url` (the code is already in the link), `result.user_code` and
|
|
156
|
+
`result.flow_id`. Keep FLOW_ID in your notes, end the turn with the link and the code, and ask the
|
|
157
|
+
user to approve and reply. When they reply:
|
|
187
158
|
|
|
188
159
|
```bash
|
|
189
160
|
meshy auth login --device-flow FLOW_ID --format json --no-update-check
|
|
@@ -192,8 +163,7 @@ meshy auth login --device-flow FLOW_ID --format json --no-update-check
|
|
|
192
163
|
It waits while the approval is still pending, saves the session and prints
|
|
193
164
|
`result.status: "logged_in"`; verify `auth status` and continue the original request. An expired
|
|
194
165
|
or unknown flow means running step one again. A host whose question tool reaches the user can
|
|
195
|
-
instead ask with the link and wait for the answer in the same turn, then run step two.
|
|
196
|
-
DeepSeek Harness the `meshy_sign_in` tool replaces both steps (section 1).
|
|
166
|
+
instead ask with the link and wait for the answer in the same turn, then run step two.
|
|
197
167
|
|
|
198
168
|
Do not use `--manual` from an agent — it prompts on stdin for a pasted code. Never show a token, a device
|
|
199
169
|
code or a signed URL to the user or copy one into chat or a file: task results and sidecars
|
|
@@ -226,9 +196,8 @@ Existing files are never silently replaced. `download` refuses to overwrite unle
|
|
|
226
196
|
is passed, and `-o` refuses a target that holds anything but its own task's earlier output
|
|
227
197
|
(rerunning the same `-o` for the same task is fine). So an existing `chest.glb` is a decision — a
|
|
228
198
|
new name or, for `download`, an explicit overwrite — covered by what the user already authorized,
|
|
229
|
-
not a silent clobber.
|
|
230
|
-
|
|
231
|
-
to delete.
|
|
199
|
+
not a silent clobber. The sidecar `-o` leaves beside a model is described in
|
|
200
|
+
[delivery.md](delivery.md).
|
|
232
201
|
|
|
233
202
|
## 5. One session, both skills, any directory
|
|
234
203
|
|
|
@@ -237,14 +206,12 @@ are encrypted under a key the OS keeps (Keychain, DPAPI or the Secret Service; a
|
|
|
237
206
|
file where none is usable). Generation and printing, in either plugin, reuse it when run as the
|
|
238
207
|
same OS user with the same CLI configuration. Changing the working directory does not require
|
|
239
208
|
another login. Different users, machines, containers or configuration directories do not
|
|
240
|
-
automatically share sessions.
|
|
241
|
-
login over on its first write, and an older CLI then signs in once on its own.
|
|
209
|
+
automatically share sessions.
|
|
242
210
|
|
|
243
211
|
`MESHY_CONFIG_DIR` changes the config directory; `MESHY_CREDENTIALS_PATH` overrides the
|
|
244
|
-
credential file.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
fields), and do not copy tokens between plugins.
|
|
212
|
+
credential file. Keep these settings consistent. Only the CLI touches the config directory: never
|
|
213
|
+
read, copy, move, edit or delete a file there, never look for credentials anywhere else, and do
|
|
214
|
+
not copy tokens between plugins.
|
|
248
215
|
`auth list` reports profile kinds with masked credentials. `auth use <name>` changes the shared
|
|
249
216
|
active profile, so do not switch it independently in concurrent workflows.
|
|
250
217
|
|
|
@@ -259,9 +226,9 @@ Credential priority is `--api-key` > `MESHY_API_KEY` > explicit `--api-key-file`
|
|
|
259
226
|
Harness plugin's session > stored active profile. An existing environment key overrides browser login; report `source` when
|
|
260
227
|
diagnosing account selection, and do not change the user's environment or account implicitly.
|
|
261
228
|
|
|
262
|
-
DeepSeek Harness
|
|
263
|
-
|
|
264
|
-
|
|
229
|
+
In DeepSeek Harness an exported `MESHY_API_KEY` never reaches the CLI (dsh removes
|
|
230
|
+
credential-shaped variables); the plugin's sign-in (section 1) or an explicit `--api-key-file` is
|
|
231
|
+
used instead.
|
|
265
232
|
|
|
266
233
|
There is no automatic `.env` discovery. If the user chooses a project key file, pass its
|
|
267
234
|
explicit path on authenticated commands. **`auth status` ignores `--api-key-file`**,
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
Every command uses `--format json --no-update-check` and prints one envelope. Read the process
|
|
4
4
|
exit code and the envelope's `error`, `result` and `warnings`; preserve any task ID, operation
|
|
5
5
|
ID, downloaded files and recovery command even when `ok` is false. Auth results are in
|
|
6
|
-
`result` as well; see [setup.md](setup.md).
|
|
7
|
-
skill is no longer read by the CLI; take task IDs from it by hand.
|
|
6
|
+
`result` as well; see [setup.md](setup.md).
|
|
8
7
|
|
|
9
8
|
Contents: runner problems · authentication · exit codes · unknown submission, failure and
|
|
10
9
|
timeout · deleting a task · local files.
|
|
11
10
|
|
|
12
11
|
## Runner problems
|
|
13
12
|
|
|
14
|
-
- **`meshy: command not found`** or **a version older than 0.8.
|
|
13
|
+
- **`meshy: command not found`** or **a version older than 0.8.5**: install the newest 0.8.x as
|
|
15
14
|
Setup describes. If the install is refused, use the temporary package
|
|
16
|
-
(`npm exec --yes --package=meshy-cli@0.8.
|
|
15
|
+
(`npm exec --yes --package=meshy-cli@0.8.5 -- meshy …`) and carry on with the same job.
|
|
17
16
|
- **A global 0.9 or newer** answers `--version`. Do not uninstall or downgrade it; use the
|
|
18
17
|
temporary package for this work and mention the mismatch once.
|
|
19
18
|
- **Node older than 22.12** fails the CLI's own runtime gate. Report the required version and the
|
|
@@ -37,8 +36,7 @@ status does not honor it.
|
|
|
37
36
|
- **Login code expired or denied**: rerun the same `auth login --device` for a fresh code, and
|
|
38
37
|
show the new URL and code. Nothing paid is retried because a login timed out.
|
|
39
38
|
- **Works in another terminal**: compare status `source`, active profile, OS user and
|
|
40
|
-
config/API environment. An environment key overrides a stored OAuth session.
|
|
41
|
-
shell profiles or print secret values.
|
|
39
|
+
config/API environment. An environment key overrides a stored OAuth session.
|
|
42
40
|
- **`device_flow_not_supported`**: this API host has no device endpoint — the user logs in
|
|
43
41
|
from their own desktop terminal, or supplies their own key privately.
|
|
44
42
|
|
|
@@ -47,7 +45,7 @@ status does not honor it.
|
|
|
47
45
|
| Exit | Meaning | Recovery |
|
|
48
46
|
|---|---|---|
|
|
49
47
|
| 1 | Generic/server/protocol error or failed task | Inspect the error and any known task before deciding next steps. |
|
|
50
|
-
| 2 | Usage or operation conflict | Correct arguments/account/payload mismatch; do not invent a fresh operation ID to bypass a conflict. A local STL/OBJ/FBX `--model-url` lands here: pass it as an http(s) URL instead.
|
|
48
|
+
| 2 | Usage or operation conflict | Correct arguments/account/payload mismatch; do not invent a fresh operation ID to bypass a conflict. A local STL/OBJ/FBX `--model-url` lands here: pass it as an http(s) URL instead. |
|
|
51
49
|
| 3 | Authentication | Use the source-aware checks above; status also uses this for failed network verification. |
|
|
52
50
|
| 4 | Validation | Correct the rejected input or explain the unsupported request. |
|
|
53
51
|
| 5 | Not found | Check the resource, task ID and account; a task older than Meshy's 3-day retention is gone (see Delivery). |
|