@liustack/modlens 3.16.6 → 3.16.7
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/CHANGELOG.md +5 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/dist/main.js +61 -4
- package/docs/cli.md +1 -1
- package/docs/cli.zh-CN.md +1 -1
- package/docs/harness-setup.md +32 -2
- package/docs/harness-setup.zh-CN.md +14 -2
- package/docs/troubleshooting.md +2 -2
- package/docs/troubleshooting.zh-CN.md +2 -2
- package/dsh/client.js +612 -1
- package/dsh/index.js +376 -8
- package/package.json +1 -1
- package/skills/modlens/SKILL.md +4 -4
- package/skills/modlens/references/configure.md +4 -0
- package/skills/modlens/references/configure.zh-CN.md +4 -0
- package/skills/modlens/references/onboard.md +1 -1
- package/skills/modlens/references/runtime.md +1 -1
- package/skills/modlens/scripts/run.ps1 +1 -1
- package/skills/modlens/scripts/run.sh +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.16.7 - 2026-08-15
|
|
4
|
+
|
|
5
|
+
- **dsh: the vision engine has a settings card in the web UI ([#39](https://github.com/liustack/modlens/issues/39)).** Engine, API key, endpoint, model, and which local sign-ins a read may borrow, in Settings under Plugins, for the dsh users who never open a terminal. Expanding it probes the machine and lists the harnesses actually found, so auto mode is a choice between real options. The shared `~/.modlens/config.json` stays the one place those values live: the card reads and writes a loopback route that owns the file, so nothing is duplicated into a second store and every other harness sees the same edit. The host never sends a stored key to the browser, only whether one is stored, and a blank key field means leave the stored one alone. A cross-origin or non-loopback write is refused the way dsh fences its own API, since a page in the same browser could otherwise repoint someone's engine at an endpoint of its choosing. Not pinning an engine stays its own state rather than being collapsed into one, and a save carries only what it is about: toggling a grant never moves the pin or rewrites engine settings.
|
|
6
|
+
- **A key can be entered without it touching argv, shell history, or the chat.** `modlens config set gemini-api.apiKey` with the value omitted prompts for it with the echo hidden, and also accepts one piped line. The conversational path is not blocked, because it cannot be: most users hand their key to whatever agent is in front of them, and the onboarding still takes exactly the key they hand over. This is the clean path for the ones who would rather not, and the docs say which boundary each form actually holds.
|
|
7
|
+
|
|
3
8
|
## 3.16.6 - 2026-08-15
|
|
4
9
|
|
|
5
10
|
- **A `null` where the contract asks for nothing no longer fails the read ([#37](https://github.com/liustack/modlens/issues/37)).** The reported failure named `visual.notes`, which the validator only reports when the field is present in a shape it does not accept: leaving it out was always fine. `null` is the shape a model reaches for when it has nothing to say, and it is what the reporter's own workaround had to legalize, so that is what this fixes. An optional field holding `null` is now dropped before the check rather than passing through it, which keeps the read alive and keeps `null` out of the fields this contract declares: each one is absent or holds its declared type, as the schema always promised. A key a gateway adds on its own is dropped the same way when it is null. On a required field `null` is still a violation. The error also stopped calling everything missing, since reading `missing: visual.notes` about a field that was right there sends you looking in the wrong place.
|
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Issues are welcome any time: [open one](https://github.com/liustack/modlens/issu
|
|
|
34
34
|
|
|
35
35
|
## Highlights
|
|
36
36
|
|
|
37
|
-
**🥇 The first vision plugin for DeepSeek Harness (dsh):** one command, `npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.
|
|
37
|
+
**🥇 The first vision plugin for DeepSeek Harness (dsh):** one command, `npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.7`, and the text-only DeepSeek model behind dsh reads images through a native `modlens_read_image` tool. Updating is the same command again. The version is named rather than `@latest` on purpose: pnpm 11 holds back releases published in the last 24 hours and resolves the tag against what survives, so `@latest` would install whatever shipped a day ago ([details](docs/harness-setup.md#keeping-it-up-to-date)).
|
|
38
38
|
|
|
39
39
|
Pasting an image works two ways. **① Just paste.** On a text-only model the pasted image lands as a private temp file and its path enters the composer — the same interaction OpenCode and Pi ship — and the `modlens_read_image` tool takes it from there. **② Pick a `(modlens vision)` entry** in the model selector (it remembers your choice, so once is enough), then paste: the thumbnail stays visible in your message, closer to the Codex app feel, and the image is converted to structured evidence at request time, answered by the same underlying route. The plugin auto-discovers every provider route carrying text-only DeepSeek or GLM models and adds a wrapped entry per route (a stock install gets **`DeepSeek-V4-Flash (modlens vision)`** and **`DeepSeek-V4-Pro (modlens vision)`**; extra routes like opencode-go or zai get their own); the two families' own vision models are excluded automatically. Which paste route applies is the host's per-model call: only a model its metadata positively confirms text-only is taken over, anything unconfirmed is left alone, so vision models keep their native paste ([details](docs/harness-setup.md)).
|
|
40
40
|
|
package/README.zh-CN.md
CHANGED
|
@@ -34,7 +34,7 @@ DeepSeek 和 GLM 的主力对话模型是纯文本的,无法进行图片识别
|
|
|
34
34
|
|
|
35
35
|
## 亮点
|
|
36
36
|
|
|
37
|
-
**🥇 全网第一个支持 DeepSeek Harness(dsh)的外挂视觉识别插件:**一条命令 `npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.
|
|
37
|
+
**🥇 全网第一个支持 DeepSeek Harness(dsh)的外挂视觉识别插件:**一条命令 `npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.7`,dsh 背后的纯文本 DeepSeek 模型即可通过原生 `modlens_read_image` 工具读图。更新就是再跑一遍同一条命令。这里点名版本号而不用 `@latest` 是有意的:pnpm 11 会扣住最近 24 小时内发布的版本,dist-tag 只在剩下的里面解析,用 `@latest` 装到的会是一天前发布的那个([细节](docs/harness-setup.zh-CN.md#保持更新))。
|
|
38
38
|
|
|
39
39
|
DeepSeek Harness 粘贴识图有两种玩法。
|
|
40
40
|
|
|
@@ -69,7 +69,7 @@ agy # 浏览器完成
|
|
|
69
69
|
**DeepSeek Harness(dsh)用户不走 skill 流程**,本包就是原生 dsh 插件:
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.
|
|
72
|
+
npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.7
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
装完即有 `modlens_read_image` 工具,选「(modlens vision)」模型变体即可直接粘贴识图。引擎配置同样在 `~/.modlens`,详见[宿主接入](docs/harness-setup.zh-CN.md)。
|
package/dist/main.js
CHANGED
|
@@ -11,6 +11,7 @@ import * as dns from "dns/promises";
|
|
|
11
11
|
import { isIP } from "net";
|
|
12
12
|
import { createRequire } from "module";
|
|
13
13
|
import * as crypto from "crypto";
|
|
14
|
+
import * as readline from "readline";
|
|
14
15
|
function denyPatterns(guards) {
|
|
15
16
|
return stringPatterns(guards?.denyModels);
|
|
16
17
|
}
|
|
@@ -4152,6 +4153,53 @@ function recoverPastedImages(options = {}) {
|
|
|
4152
4153
|
}
|
|
4153
4154
|
return result;
|
|
4154
4155
|
}
|
|
4156
|
+
async function readSecret(promptText, stdin = process.stdin, stderr = process.stderr) {
|
|
4157
|
+
if (!stdin.isTTY) {
|
|
4158
|
+
stdin.setEncoding("utf8");
|
|
4159
|
+
let data = "";
|
|
4160
|
+
for await (const chunk of stdin) {
|
|
4161
|
+
data += chunk;
|
|
4162
|
+
if (data.includes("\n")) {
|
|
4163
|
+
break;
|
|
4164
|
+
}
|
|
4165
|
+
}
|
|
4166
|
+
const value = data.split("\n")[0].trim();
|
|
4167
|
+
if (value === "") {
|
|
4168
|
+
throw new Error("no key arrived on stdin (pipe one line, or run on a terminal)");
|
|
4169
|
+
}
|
|
4170
|
+
return value;
|
|
4171
|
+
}
|
|
4172
|
+
const rl = readline.createInterface({ input: stdin, output: stderr, terminal: true });
|
|
4173
|
+
const muted = rl;
|
|
4174
|
+
stderr.write(promptText);
|
|
4175
|
+
muted._writeToOutput = () => {
|
|
4176
|
+
};
|
|
4177
|
+
try {
|
|
4178
|
+
const value = await new Promise((resolve, reject) => {
|
|
4179
|
+
let settled = false;
|
|
4180
|
+
const settle = (action) => {
|
|
4181
|
+
if (!settled) {
|
|
4182
|
+
settled = true;
|
|
4183
|
+
action();
|
|
4184
|
+
}
|
|
4185
|
+
};
|
|
4186
|
+
rl.question("", (answer) => settle(() => resolve(answer)));
|
|
4187
|
+
rl.on("SIGINT", () => settle(() => reject(new Error("cancelled, nothing was saved"))));
|
|
4188
|
+
rl.on(
|
|
4189
|
+
"close",
|
|
4190
|
+
() => settle(() => reject(new Error("input ended before a key was entered")))
|
|
4191
|
+
);
|
|
4192
|
+
});
|
|
4193
|
+
const trimmed = value.trim();
|
|
4194
|
+
if (trimmed === "") {
|
|
4195
|
+
throw new Error("no key entered");
|
|
4196
|
+
}
|
|
4197
|
+
return trimmed;
|
|
4198
|
+
} finally {
|
|
4199
|
+
stderr.write("\n");
|
|
4200
|
+
rl.close();
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4155
4203
|
const program = new Command();
|
|
4156
4204
|
function parsePositiveInt(raw, flag) {
|
|
4157
4205
|
if (!/^\d+$/.test(raw.trim()) || Number.parseInt(raw, 10) <= 0) {
|
|
@@ -4159,7 +4207,7 @@ function parsePositiveInt(raw, flag) {
|
|
|
4159
4207
|
}
|
|
4160
4208
|
return Number.parseInt(raw, 10);
|
|
4161
4209
|
}
|
|
4162
|
-
program.name("modlens").description("Plug-in vision for text-only LLMs: image in, structured JSON evidence out").version("3.16.
|
|
4210
|
+
program.name("modlens").description("Plug-in vision for text-only LLMs: image in, structured JSON evidence out").version("3.16.7");
|
|
4163
4211
|
program.command("analyze", { isDefault: true }).description("Analyze an image into structured JSON evidence (default command)").requiredOption("-i, --input <path|url>", "Input image path or https URL").option("-o, --output <path>", "Write result JSON to a file").option("-m, --model <name>", "Provider model name").option("-p, --provider <name>", `Vision provider (${listProviders().join(", ")})`).option("--prompt <text>", "Extra focus for this image").option("--timeout <ms>", "Provider timeout in milliseconds", "180000").option("--provider-bin <path>", "Provider binary path (default: agy)").option("--workdir <path>", "Working directory for the provider").option(
|
|
4164
4212
|
"--extra-body <json>",
|
|
4165
4213
|
`JSON merged into the API request body, e.g. '{"thinking":{"type":"disabled"}}'`
|
|
@@ -4269,7 +4317,7 @@ program.command("doctor").description(
|
|
|
4269
4317
|
configPath: CONFIG_PATH,
|
|
4270
4318
|
// Lets doctor name an installed skill copy that is older than
|
|
4271
4319
|
// the CLI reporting on it (issue #33).
|
|
4272
|
-
version: "3.16.
|
|
4320
|
+
version: "3.16.7"
|
|
4273
4321
|
});
|
|
4274
4322
|
const output = options.json ? JSON.stringify(report, null, 2) : renderDoctorReport(report);
|
|
4275
4323
|
process.stdout.write(`${output}
|
|
@@ -4304,9 +4352,18 @@ config.command("init").description(`Create a starter config at ${CONFIG_PATH}`).
|
|
|
4304
4352
|
process.exitCode = 1;
|
|
4305
4353
|
}
|
|
4306
4354
|
});
|
|
4307
|
-
config.command("set <key>
|
|
4355
|
+
config.command("set <key> [value]").description(
|
|
4356
|
+
"Set a value. Omit the value for an apiKey to enter it at a hidden prompt (out of argv and shell history), or to read one piped line (out of argv; the command feeding the pipe is yours to keep out of history)"
|
|
4357
|
+
).action(async (key, value) => {
|
|
4308
4358
|
try {
|
|
4309
|
-
|
|
4359
|
+
let resolved = value;
|
|
4360
|
+
if (resolved === void 0) {
|
|
4361
|
+
if (!key.endsWith(".apiKey")) {
|
|
4362
|
+
throw new Error(`${key} needs a value: modlens config set ${key} <value>`);
|
|
4363
|
+
}
|
|
4364
|
+
resolved = await readSecret(`${key} (input hidden): `);
|
|
4365
|
+
}
|
|
4366
|
+
setConfigValue(key, resolved);
|
|
4310
4367
|
process.stdout.write(`Saved ${key} to ${CONFIG_PATH}
|
|
4311
4368
|
`);
|
|
4312
4369
|
} catch (error) {
|
package/docs/cli.md
CHANGED
|
@@ -97,6 +97,6 @@ Five providers: `antigravity-cli` (no key), `gemini-api` (fastest free route), `
|
|
|
97
97
|
Other subcommands:
|
|
98
98
|
|
|
99
99
|
- `modlens guard [--model <id>]`: should the engine run for the active model at all? Exit 0 allow, 1 deny, verdict as JSON.
|
|
100
|
-
- `modlens config <init|set|show>`:
|
|
100
|
+
- `modlens config <init|set|show>`: `set` with the value omitted on an `apiKey` field prompts for it with the echo hidden, so the key never enters argv, shell history, or the conversation with an agent driving the terminal. It also accepts one piped line (`pbpaste | modlens config set openai.apiKey`), which keeps the key out of argv, though whatever produced that pipe is still your own command to keep out of history. Keys are `provider`, `proxy` (HTTP/HTTPS proxy for the API providers, `HTTPS_PROXY`/`HTTP_PROXY` also honored), `reuse.<claude|codex|opencode|pi|grok>`, `guards.<denyModels|allowModels|denyWhenUnknown>`, and `<provider>.<apiKey|baseUrl|model|proxy|extraBody>`, plus `openai.structuredOutput` (that route only).
|
|
101
101
|
- `modlens doctor`: Node and node:sqlite, provider readiness, the failover chains for this machine, the detected harness, the guard's rules with a live verdict, and the Reuse section with per-harness grant decisions and discovered vision. Spends no quota; `--json` for a machine-readable report.
|
|
102
102
|
|
package/docs/cli.zh-CN.md
CHANGED
|
@@ -94,5 +94,5 @@ modlens recover-paste # pull a pasted image into a fil
|
|
|
94
94
|
其他子命令:
|
|
95
95
|
|
|
96
96
|
- `modlens guard [--model <id>]`:判断当前激活的模型到底该不该运行引擎。退出码 0 表示放行,1 表示拒绝,判定结果以 JSON 输出。
|
|
97
|
-
- `modlens config <init|set|show
|
|
97
|
+
- `modlens config <init|set|show>`:`set` 在 `apiKey` 字段上省略值会进入不回显的输入提示,密钥不进 argv、不进 shell 历史,也不进你与终端里那个 agent 的对话。它也接受从管道读一行(`pbpaste | modlens config set openai.apiKey`),这样密钥不进 argv,但产生这条管道的命令本身是否留在历史里,由你自己决定。可用的键有 `provider`、`proxy`(API provider 的 HTTP/HTTPS 代理,也认 `HTTPS_PROXY`/`HTTP_PROXY`)、`reuse.<claude|codex|opencode|pi|grok>`、`guards.<denyModels|allowModels|denyWhenUnknown>`,以及 `<provider>.<apiKey|baseUrl|model|proxy|extraBody>`,另有 `openai.structuredOutput`(仅这条路线用得上)。
|
|
98
98
|
- `modlens doctor`:报告 Node 与 node:sqlite、各 provider 的就绪状态、本机的故障转移链、检测到的 harness、guard 规则和一次现场判定,以及 Reuse 一节里按 harness 的授权决定与发现的视觉能力。不花任何额度,`--json` 输出机器可读报告。
|
package/docs/harness-setup.md
CHANGED
|
@@ -55,18 +55,33 @@ OpenCode with DeepSeek: `opencode auth login`, pick DeepSeek and paste the key (
|
|
|
55
55
|
dsh is different from the other harnesses: modlens plugs in as a native tool, not a prompt-triggered skill. The package itself is a dsh bundle, so one command installs it into a profile:
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
|
-
npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.
|
|
58
|
+
npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.7
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
This registers a `modlens_read_image` tool whose schema reaches the model on every request (no trigger heuristics), runs the modlens CLI shipped inside the same package, and returns the structured evidence as the tool's canonical JSON output. Engines, reuse grants, and guard rules stay in `~/.modlens/config.json`, shared with every other harness. dsh is in developer preview and its plugin surface may change; the plugin keeps its touch small (raw tool registration, the llm adapter surface for the vision variants, the attachment reader, and one agent pre-step hook) and degrades loudly if any of them moves.
|
|
62
62
|
|
|
63
|
+
### Configuring the engine from the web UI
|
|
64
|
+
|
|
65
|
+
dsh web users have no terminal in front of them, so the engine settings have a
|
|
66
|
+
card in **Settings → Plugins → Plugin configuration**: which engine reads
|
|
67
|
+
images, its key, endpoint and model, and which local sign-ins a read may
|
|
68
|
+
borrow. Expanding it probes this machine and lists the harnesses it actually
|
|
69
|
+
found, so the grants are a choice between real options rather than five names.
|
|
70
|
+
|
|
71
|
+
The values live where they always did, in `~/.modlens/config.json`, shared
|
|
72
|
+
with every other harness: the card reads and writes that file through a
|
|
73
|
+
loopback route, so an edit here is the same edit `modlens config set` makes.
|
|
74
|
+
The card never receives a stored key, only whether one is set, and leaving the
|
|
75
|
+
key field empty keeps the stored one. `settingsCard: false` in the plugin row
|
|
76
|
+
removes it, route included.
|
|
77
|
+
|
|
63
78
|
### Keeping it up to date
|
|
64
79
|
|
|
65
80
|
modlens ships often, and both install shapes freeze at whatever version they
|
|
66
81
|
got. On dsh, re-run the install with the version named:
|
|
67
82
|
|
|
68
83
|
```sh
|
|
69
|
-
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.
|
|
84
|
+
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.7
|
|
70
85
|
```
|
|
71
86
|
|
|
72
87
|
`npm view @liustack/modlens version` prints the current one, and this page is
|
|
@@ -101,6 +116,21 @@ install-time version, so re-run the install to overwrite it in place.
|
|
|
101
116
|
behind the CLI doing the reporting, which makes the drift visible before it
|
|
102
117
|
costs anyone a debugging session.
|
|
103
118
|
|
|
119
|
+
### A session that already holds an image
|
|
120
|
+
|
|
121
|
+
dsh refuses to switch a session that contains image attachments to a model
|
|
122
|
+
whose declared modalities exclude images, which includes every plain text-only
|
|
123
|
+
DeepSeek entry. The rule is dsh's and it is sound: a text-only model cannot
|
|
124
|
+
receive a history carrying image blocks, and the `(modlens vision)` variant is
|
|
125
|
+
switchable there not because it declares image input but because it converts
|
|
126
|
+
those blocks to evidence text at request time, which the plain entry does not
|
|
127
|
+
do ([#40](https://github.com/liustack/modlens/issues/40)).
|
|
128
|
+
|
|
129
|
+
Pasting through the first route above avoids the situation entirely: the image
|
|
130
|
+
becomes a file path and the session never holds an attachment, so nothing locks
|
|
131
|
+
the model selector. It only comes up after a paste on a variant or on a vision
|
|
132
|
+
model, where an attachment is the point.
|
|
133
|
+
|
|
104
134
|
### Paste-to-path (web profile)
|
|
105
135
|
|
|
106
136
|
Pasting an image into the dsh Web UI under a **text-only model** used to die at
|
|
@@ -55,17 +55,23 @@ OpenCode 接 DeepSeek:执行 `opencode auth login`,选择 DeepSeek 并粘贴
|
|
|
55
55
|
dsh 与其他 harness 不同:modlens 以原生工具的形式接入,而不是靠提示词触发的 skill。本包自身就是一个 dsh bundle,一条命令即可装进某个 profile:
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
|
-
npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.
|
|
58
|
+
npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.16.7
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
这会注册一个 `modlens_read_image` 工具,它的 schema 随每次请求抵达模型(不靠触发启发式),运行同一个包里自带的 modlens CLI,并把结构化证据作为工具的标准 JSON 输出返回。引擎、复用授权和 guard 规则仍在 `~/.modlens/config.json` 里,与其他所有 harness 共享。dsh 还在开发者预览阶段,插件接口可能变化。这个插件刻意保持很小的接触面(原生工具注册、视觉变体所用的 llm 适配层、附件读取器,以及一个 agent 执行前钩子),其中任何一处变动,它都会大声报错而不是无声退化。
|
|
62
62
|
|
|
63
|
+
### 在网页界面里配置引擎
|
|
64
|
+
|
|
65
|
+
dsh 的网页用户面前没有终端,所以引擎设置有一张卡片,在**设置 → 插件 → 插件配置**里:用哪个引擎读图、它的密钥、地址和模型,以及一次读取可以借用本机哪些已有登录。展开时会探测本机,只列出真正找到的 harness,让授权是在真实选项之间做选择,而不是面对五个名字。
|
|
66
|
+
|
|
67
|
+
这些值仍然住在 `~/.modlens/config.json`,与其他所有 harness 共享:卡片通过一条回环路由读写那个文件,所以在这里改一笔,和 `modlens config set` 改的是同一笔。卡片从不拿到已保存的密钥,只知道有没有;密钥框留空就不动已存的那个。在插件配置行里设 `settingsCard: false` 可以连同路由一起去掉它。
|
|
68
|
+
|
|
63
69
|
### 保持更新
|
|
64
70
|
|
|
65
71
|
modlens 发布很频繁,而两种安装形态都会冻结在装进来的那个版本上。dsh 上重跑一遍安装即可,版本号要点名:
|
|
66
72
|
|
|
67
73
|
```sh
|
|
68
|
-
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.
|
|
74
|
+
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.7
|
|
69
75
|
```
|
|
70
76
|
|
|
71
77
|
`npm view @liustack/modlens version` 可以查到当前版本号,本页的版本号则由发布流程自动写入。
|
|
@@ -82,6 +88,12 @@ npx -y @deepseek-ai/dsh plugin --profile <name> list
|
|
|
82
88
|
|
|
83
89
|
skill 类 harness 上,skill 是一个拷贝出来的文件夹,拷贝会保留安装时的版本,重跑安装原地覆盖即可。`modlens doctor` 会读出它能找到的每一份拷贝里钉住的版本,并标出落后于当前 CLI 的那些,让版本漂移在坑到人之前就先暴露出来。
|
|
84
90
|
|
|
91
|
+
### 会话里已经有图片时
|
|
92
|
+
|
|
93
|
+
会话里存在图片附件时,dsh 会拒绝切换到声明模态不含图片的模型,普通的 DeepSeek 纯文本条目都在此列。这条规则是 dsh 的,而且站得住:纯文本模型确实收不了带图片块的历史,而 `(modlens vision)` 变体之所以能切过去,靠的不是声明了图片输入,而是它在发请求时把那些块转成证据文本,普通条目没有这层转换([#40](https://github.com/liustack/modlens/issues/40))。
|
|
94
|
+
|
|
95
|
+
走上面第一条粘贴路线就不会遇到:图片变成文件路径,会话里从不存在附件,模型选择器也就不会被锁住。只有在变体或视觉模型上粘贴时才会产生附件,而那种场景下附件本来就是目的。
|
|
96
|
+
|
|
85
97
|
### 粘贴转路径(paste-to-path,web profile)
|
|
86
98
|
|
|
87
99
|
过去在 dsh Web UI 里,**纯文本模型**下粘贴图片会死在图片准入检查这一步。插件现在带了一个浏览器端半边(由 dsh 的客户端插件系统自动加载),恰好在这种情况下接管粘贴:图片字节发到插件在 dsh web 服务器上的 `/modlens/paste` 路由(仅回环地址,校验 magic byte,上限 25 MB),落成一个私有临时文件,输入框收到的则是纯文本的文件路径。这与 Pi、OpenCode、Claude Code 递给模型的形态一致,也正是 modlens skill 和 `modlens_read_image` 工具的首要触发条件。消息里不带图片附件,准入检查根本不会触发。
|
package/docs/troubleshooting.md
CHANGED
|
@@ -163,7 +163,7 @@ simply lands on an older one. Name the exact version instead, which pnpm treats
|
|
|
163
163
|
as a deliberate request rather than a resolution:
|
|
164
164
|
|
|
165
165
|
```sh
|
|
166
|
-
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.
|
|
166
|
+
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.7
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
`npm view @liustack/modlens version` prints the current one. pnpm 11 installs a named
|
|
@@ -178,7 +178,7 @@ file:
|
|
|
178
178
|
|
|
179
179
|
```yaml
|
|
180
180
|
minimumReleaseAgeExclude:
|
|
181
|
-
- '@liustack/modlens@3.16.
|
|
181
|
+
- '@liustack/modlens@3.16.7'
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
Or lift the gate for a single command, which lifts it for everything that
|
|
@@ -144,7 +144,7 @@ dsh profile 装到的是旧版 modlens。`dsh.bundle` 声明从 3.9.0 起才存
|
|
|
144
144
|
`@latest` 绕不开这一层,本页早先的说法是错的。冷静期先把候选版本过滤掉,dist-tag 才在剩下的里面解析,于是它直接落到了更旧的那个上。改成写死精确版本号,pnpm 会把它当作一次明确的指定,而不是一次解析:
|
|
145
145
|
|
|
146
146
|
```sh
|
|
147
|
-
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.
|
|
147
|
+
npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.7
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
`npm view @liustack/modlens version` 可以查到当前版本号。pnpm 11 会装上被点名的版本,11.1.3 起还会把它作为一条已批准的例外写进该 profile 的 `pnpm-workspace.yaml`,其余所有包和 modlens 以后的版本仍然留在窗口后面。
|
|
@@ -153,7 +153,7 @@ npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.16.6
|
|
|
153
153
|
|
|
154
154
|
```yaml
|
|
155
155
|
minimumReleaseAgeExclude:
|
|
156
|
-
- '@liustack/modlens@3.16.
|
|
156
|
+
- '@liustack/modlens@3.16.7'
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
或者只为这一条命令解除冷静期,注意它解除的是这条命令解析到的所有包,不只 modlens:
|