@liustack/modlens 3.18.1 → 3.18.2

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.18.2 - 2026-08-17
4
+
5
+ - **dsh: the settings card no longer sets off Safari's password manager ([#56](https://github.com/liustack/modlens/issues/56)).** Safari's iCloud Keychain offers to enable autofill for any site carrying a password input, then shows its bubble whenever that field is focused. Here it did so for a field that is always empty: API keys live in `~/.modlens/config.json` and the host route reports only whether one is stored, never the key itself. `autocomplete="off"` cannot turn it off either, because WebKit ignores it on password fields on purpose. The field is masked with `-webkit-text-security` now, which hides the characters without ever being a password field, and it keeps a key meant for one machine out of a synced keychain. Where a browser lacks that property the field stays a password input: the nuisance is worth more than an API key rendered in clear text while somebody types it.
6
+ Two things worth knowing rather than discovering. A password input carries a protected state into the accessibility tree and screen readers stop reading characters back because of it, while masking is only paint, so VoiceOver and NVDA will read this field aloud and ARIA has nothing that restores the difference. It is accepted here because the field is empty in normal use, so what can be read back is what you are typing at that moment rather than a stored secret. And dsh's own model settings still contain password inputs, so Safari's site-level offer to enable autofill can still appear from those; what this removes is the bubble on the modlens field. Thanks to @RSJguoke, whose report named the WebKit behaviour and the reason `autocomplete` cannot help.
7
+
3
8
  ## 3.18.1 - 2026-08-17
4
9
 
5
10
  - **dsh: pasted files are collected instead of piling up forever ([#51](https://github.com/liustack/modlens/issues/51)).** The paste-to-path route cannot delete its file when the request ends: the path it returns is what goes into the composer, so the file has to outlive the response and survive until the model reads it. Nothing collected them afterwards, so every paste left a directory behind for as long as dsh stayed installed. The attachment route already cleaned up after itself, which is why only this half leaked, and the reporter spotted exactly that asymmetry.
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 most capable vision plugin for DeepSeek Harness (dsh):** one command, `npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.18.1`, 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)).
37
+ **🥇 The most capable vision plugin for DeepSeek Harness (dsh):** one command, `npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.18.2`, 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.18.1`,dsh 背后的纯文本 DeepSeek 模型即可通过原生 `modlens_read_image` 工具读图。更新就是再跑一遍同一条命令。这里点名版本号而不用 `@latest` 是有意的:pnpm 11 会扣住最近 24 小时内发布的版本,dist-tag 只在剩下的里面解析,用 `@latest` 装到的会是一天前发布的那个([细节](docs/harness-setup.zh-CN.md#保持更新))。
37
+ **🥇 全网最强的 DeepSeek Harness(dsh)外挂视觉识别插件:**一条命令 `npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.18.2`,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.18.1
72
+ npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.18.2
73
73
  ```
74
74
 
75
75
  装完即有 `modlens_read_image` 工具,选「(modlens vision)」模型变体即可直接粘贴识图。引擎配置同样在 `~/.modlens`,详见[宿主接入](docs/harness-setup.zh-CN.md)。
package/dist/main.js CHANGED
@@ -4565,7 +4565,7 @@ function parsePositiveInt(raw, flag) {
4565
4565
  }
4566
4566
  return Number.parseInt(raw, 10);
4567
4567
  }
4568
- program.name("modlens").description("Plug-in vision for text-only LLMs: image in, structured JSON evidence out").version("3.18.1");
4568
+ program.name("modlens").description("Plug-in vision for text-only LLMs: image in, structured JSON evidence out").version("3.18.2");
4569
4569
  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(
4570
4570
  "--extra-body <json>",
4571
4571
  `JSON merged into the API request body, e.g. '{"thinking":{"type":"disabled"}}'`
@@ -4675,7 +4675,7 @@ program.command("doctor").description(
4675
4675
  configPath: CONFIG_PATH,
4676
4676
  // Lets doctor name an installed skill copy that is older than
4677
4677
  // the CLI reporting on it (issue #33).
4678
- version: "3.18.1"
4678
+ version: "3.18.2"
4679
4679
  });
4680
4680
  const output = options.json ? JSON.stringify(report, null, 2) : renderDoctorReport(report);
4681
4681
  process.stdout.write(`${output}
@@ -55,7 +55,7 @@ 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.18.1
58
+ npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.18.2
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.
@@ -81,7 +81,7 @@ modlens ships often, and both install shapes freeze at whatever version they
81
81
  got. On dsh, re-run the install with the version named:
82
82
 
83
83
  ```sh
84
- npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.18.1
84
+ npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.18.2
85
85
  ```
86
86
 
87
87
  `npm view @liustack/modlens version` prints the current one, and this page is
@@ -55,7 +55,7 @@ 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.18.1
58
+ npx -y @deepseek-ai/dsh plugin --profile web add @liustack/modlens@3.18.2
59
59
  ```
60
60
 
61
61
  这会注册一个 `modlens_read_image` 工具,它的 schema 随每次请求抵达模型(不靠触发启发式),运行同一个包里自带的 modlens CLI,并把结构化证据作为工具的标准 JSON 输出返回。引擎、复用授权和 guard 规则仍在 `~/.modlens/config.json` 里,与其他所有 harness 共享。dsh 还在开发者预览阶段,插件接口可能变化。这个插件刻意保持很小的接触面(原生工具注册、视觉变体所用的 llm 适配层、附件读取器,以及一个 agent 执行前钩子),其中任何一处变动,它都会大声报错而不是无声退化。
@@ -71,7 +71,7 @@ dsh 的网页用户面前没有终端,所以引擎设置有一张卡片,在*
71
71
  modlens 发布很频繁,而两种安装形态都会冻结在装进来的那个版本上。dsh 上重跑一遍安装即可,版本号要点名:
72
72
 
73
73
  ```sh
74
- npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.18.1
74
+ npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.18.2
75
75
  ```
76
76
 
77
77
  `npm view @liustack/modlens version` 可以查到当前版本号,本页的版本号则由发布流程自动写入。
@@ -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.18.1
166
+ npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.18.2
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.18.1'
181
+ - '@liustack/modlens@3.18.2'
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.18.1
147
+ npx -y @deepseek-ai/dsh plugin --profile <name> add @liustack/modlens@3.18.2
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.18.1
153
153
 
154
154
  ```yaml
155
155
  minimumReleaseAgeExclude:
156
- - '@liustack/modlens@3.18.1'
156
+ - '@liustack/modlens@3.18.2'
157
157
  ```
158
158
 
159
159
  或者只为这一条命令解除冷静期,注意它解除的是这条命令解析到的所有包,不只 modlens:
package/dsh/client.js CHANGED
@@ -287,6 +287,71 @@ window.__ModuleLoader__.load({
287
287
  return payload
288
288
  }
289
289
 
290
+ /**
291
+ * How to render the API key field so the characters are hidden.
292
+ *
293
+ * A real password input makes Safari's iCloud Keychain offer to enable
294
+ * autofill for the site and then pop its bubble on every focus, for a
295
+ * field that is always empty: the key lives in the config file and the
296
+ * host never sends it here, only whether one is stored. `autocomplete`
297
+ * cannot turn that off, because WebKit ignores it on password fields on
298
+ * purpose (issue #56). Masking with text-security gets the same hidden
299
+ * characters without ever being a password field, and it also keeps a key
300
+ * meant for one machine out of a synced keychain.
301
+ *
302
+ * Feature-detected rather than assumed. Where the property is missing the
303
+ * field stays a password input: the nuisance is worth more than the
304
+ * alternative, which is somebody's API key rendered in clear text while
305
+ * they type it.
306
+ *
307
+ * This is a trade, not a free win, and the cost falls on people who are
308
+ * not in the room. A password input carries a protected state into the
309
+ * accessibility tree, and screen readers stop reading characters back
310
+ * because of it. Masking is only paint: VoiceOver and NVDA will read this
311
+ * key aloud, and ARIA has no equivalent to restore. Selection and copy
312
+ * also become possible, and an IME candidate window shows what is being
313
+ * typed above the field. Accepted here because the field is empty in
314
+ * normal use (the key lives in the config file and is never sent to the
315
+ * browser), so what a screen reader can read back is what the user is
316
+ * typing at that moment, not a stored secret.
317
+ */
318
+ /**
319
+ * Whether this browser masks a text field's characters. Only the prefixed
320
+ * property exists: there is no unprefixed `text-security`, so probing for
321
+ * one would be dead code that reads like a real path.
322
+ *
323
+ * A throwing `supports` counts as no support. The spec says the two
324
+ * argument form returns false for an unknown property rather than
325
+ * throwing, but this runs inside render, where an exception takes the
326
+ * whole settings surface down instead of costing one field.
327
+ */
328
+ function supportsTextSecurity() {
329
+ try {
330
+ return (
331
+ typeof CSS === 'object' &&
332
+ CSS !== null &&
333
+ typeof CSS.supports === 'function' &&
334
+ CSS.supports('-webkit-text-security', 'disc') === true
335
+ )
336
+ } catch {
337
+ return false
338
+ }
339
+ }
340
+
341
+ function secretFieldProps() {
342
+ if (!supportsTextSecurity()) {
343
+ return { type: 'password' }
344
+ }
345
+ return {
346
+ type: 'text',
347
+ autoComplete: 'off',
348
+ autoCorrect: 'off',
349
+ autoCapitalize: 'off',
350
+ spellCheck: false,
351
+ style: { WebkitTextSecurity: 'disc' },
352
+ }
353
+ }
354
+
290
355
  function ConfigCard(react, ui) {
291
356
  var h = react.createElement
292
357
  var Input = ui.Input
@@ -411,19 +476,21 @@ window.__ModuleLoader__.load({
411
476
  noteState[1]('')
412
477
  }
413
478
 
479
+ var inputProps = (key, placeholder) => ({
480
+ value: draft[key],
481
+ placeholder: placeholder,
482
+ onChange: (event) => {
483
+ set(key, event.target.value)
484
+ },
485
+ })
414
486
  var textField = (label, key, type, placeholder) =>
415
- fieldRow(
416
- label,
417
- h(Input, {
418
- type: type,
419
- value: draft[key],
420
- placeholder: placeholder,
421
- onChange: (event) => {
422
- set(key, event.target.value)
423
- },
424
- }),
425
- key,
426
- )
487
+ fieldRow(label, h(Input, Object.assign(inputProps(key, placeholder), { type: type })), key)
488
+ // Its own function rather than a `type` string the caller has to
489
+ // spell right. A sentinel compared with `===` fails open: one
490
+ // typo, or a later edit passing 'text', and the key renders in
491
+ // clear text with every test still green.
492
+ var secretField = (label, key, placeholder) =>
493
+ fieldRow(label, h(Input, Object.assign(inputProps(key, placeholder), secretFieldProps())), key)
427
494
 
428
495
  // Auto mode: the probes say which harnesses exist on this
429
496
  // machine. Found ones get a checkbox with their status; missing
@@ -436,7 +503,7 @@ window.__ModuleLoader__.load({
436
503
  var probe = probes.find((candidate) => candidate.harness === name)
437
504
  return probe ? probe.cliFound : false
438
505
  }).map((name) => {
439
- var probe = probes && probes.find((candidate) => candidate.harness === name)
506
+ var probe = probes?.find((candidate) => candidate.harness === name)
440
507
  return h(
441
508
  'label',
442
509
  {
@@ -531,7 +598,7 @@ window.__ModuleLoader__.load({
531
598
  ),
532
599
  'clinote',
533
600
  )
534
- : textField(t.apiKey, 'apiKey', 'password', current.hasKey ? t.stored : t.unset),
601
+ : secretField(t.apiKey, 'apiKey', current.hasKey ? t.stored : t.unset),
535
602
  draft.provider === '' || keyless ? null : textField(t.baseUrl, 'baseUrl', 'text', t.fallback),
536
603
  draft.provider === '' ? null : textField(t.model, 'model', 'text', t.fallback),
537
604
  // Where these values are coming from, said once, because the
@@ -779,7 +846,7 @@ window.__ModuleLoader__.load({
779
846
  try {
780
847
  mountCard(scope)
781
848
  } catch (error) {
782
- console.error('[modlens] settings card skipped: ' + error)
849
+ console.error(`[modlens] settings card skipped: ${error}`)
783
850
  }
784
851
  })
785
852
  .catch(() => {})
@@ -791,7 +858,7 @@ window.__ModuleLoader__.load({
791
858
  try {
792
859
  react = require('react')
793
860
  } catch (error) {
794
- console.error('[modlens] settings card skipped: ' + error)
861
+ console.error(`[modlens] settings card skipped: ${error}`)
795
862
  return
796
863
  }
797
864
  var ui = require('@deepseek-ai/dsh-client-ui-primitives')
@@ -819,7 +886,12 @@ window.__ModuleLoader__.load({
819
886
 
820
887
  exports.apply = apply
821
888
  // Exposed for the repo's tests only; not part of the plugin contract.
822
- exports.__card = { nextDraft: nextDraft, savePayload: savePayload }
889
+ exports.__card = {
890
+ nextDraft: nextDraft,
891
+ savePayload: savePayload,
892
+ secretFieldProps: secretFieldProps,
893
+ ConfigCard: ConfigCard,
894
+ }
823
895
  // `slots` is optional, so it is not required here: registerCard checks.
824
896
  exports.inject = []
825
897
  return module.exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liustack/modlens",
3
- "version": "3.18.1",
3
+ "version": "3.18.2",
4
4
  "description": "Plug-in vision for text-only LLMs, powered by the free Antigravity CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,11 +20,11 @@ powershell -ExecutionPolicy Bypass -File <skill-dir>\scripts\run.ps1 <args>
20
20
 
21
21
  It resolves a working runtime (PATH `modlens`, then `npx`, then `bunx`) and forwards your arguments unchanged. Exit 78 means no runtime: relay the `nextSteps` from its stderr JSON instead of retrying.
22
22
 
23
- If your harness forbids running scripts, reason through the same order by hand and run the first line that works (the pinned version is 3.18.1):
23
+ If your harness forbids running scripts, reason through the same order by hand and run the first line that works (the pinned version is 3.18.2):
24
24
 
25
- 1. A `modlens` on `PATH` whose major version is 3 and is at least 3.18.1: `modlens <args>`.
26
- 2. Otherwise, if `npx` exists: `npx --yes --package @liustack/modlens@3.18.1 modlens <args>`.
27
- 3. Otherwise, if `bunx` exists: `bunx --bun @liustack/modlens@3.18.1 <args>`.
25
+ 1. A `modlens` on `PATH` whose major version is 3 and is at least 3.18.2: `modlens <args>`.
26
+ 2. Otherwise, if `npx` exists: `npx --yes --package @liustack/modlens@3.18.2 modlens <args>`.
27
+ 3. Otherwise, if `bunx` exists: `bunx --bun @liustack/modlens@3.18.2 <args>`.
28
28
  4. Otherwise tell the user no JavaScript runtime was found and that installing Node 22.19+ (https://nodejs.org) or Bun (https://bun.sh) is the next step. Do not claim modlens itself failed.
29
29
 
30
30
  `references/runtime.md` documents the pin and the diagnostic fields.
@@ -8,7 +8,7 @@ shell syntax.
8
8
 
9
9
  ## Pinned version
10
10
 
11
- - Pinned CLI version: 3.18.1
11
+ - Pinned CLI version: 3.18.2
12
12
  - npm package: `@liustack/modlens`
13
13
  - CLI binary name: `modlens`
14
14
 
@@ -24,7 +24,7 @@ $ErrorActionPreference = 'Stop'
24
24
  # package.json version, and the release script rewrites it on every bump.
25
25
  $Package = '@liustack/modlens'
26
26
  $Bin = 'modlens'
27
- $Pinned = '3.18.1'
27
+ $Pinned = '3.18.2'
28
28
  # -------------------------------------------------------------------------------
29
29
 
30
30
  $NativeNote = 'no native artifact is published for this tool yet; phase A ships npm launch paths only'
@@ -22,7 +22,7 @@ set -eu
22
22
  # package.json version, and the release script rewrites it on every bump.
23
23
  PKG="@liustack/modlens"
24
24
  BIN="modlens"
25
- PINNED="3.18.1"
25
+ PINNED="3.18.2"
26
26
  # -------------------------------------------------------------------------------
27
27
 
28
28
  NATIVE_NOTE="no native artifact is published for this tool yet; phase A ships npm launch paths only"