dsh-keys-manager 0.3.2 → 0.3.3

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
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to dsh-keys-manager are documented here. Assembled from `.changes/unreleased/` fragments by the release-prep workflow.
4
4
 
5
+ ## [0.3.3] - 2026-11-11
6
+
7
+ ### Changed
8
+
9
+ - Move the pinned @oh-my-pi toolchain to 18.18.8 and re-port the Cursor exec-frame handoff patch onto it.
10
+
11
+ ### Added
12
+
13
+ - Install the pinned catalog's thinking levels on extra-provider models, so DSH offers the reasoning-effort selector for them.
14
+ - Repair already-installed extra-provider profiles the same way, without touching a user-edited model list.
15
+
5
16
  ## [0.3.2] - 2026-11-10
6
17
 
7
18
  ### Fixed
package/README.md CHANGED
@@ -126,7 +126,7 @@ Providers the vendored pi-ai cannot speak are served by the companion
126
126
  - One grant per route, at `llm-omp-transports/<route>` — no key pool and no
127
127
  per-account rotation. Sign-in happens in the **Transport accounts** section of
128
128
  the Keys Manager page.
129
- - Models are generated from the pinned `@oh-my-pi/pi-catalog@18.12.3` table when
129
+ - Models are generated from the pinned `@oh-my-pi/pi-catalog@18.18.8` table when
130
130
  the transport is built, and the clients are unofficial: read the
131
131
  [transports package docs](packages/llm-omp/README.md) and its
132
132
  [known limits](packages/llm-omp/docs/known-limits.md) before relying on them.
@@ -137,7 +137,7 @@ Providers the vendored pi-ai cannot speak are served by the companion
137
137
  | `devin` | paste the landed callback URL | none — sign in again | 2 |
138
138
  | `google-gemini-cli` | loopback `8085` + paste fallback | on the credential seam | 7 |
139
139
  | `google-antigravity` | loopback `51121` + paste fallback | on the credential seam | 22 |
140
- | `factory-droid` | WorkOS device code (URL + user code) | one refresh in a 60 s window, keeps `orgId`/`region` | 62 |
140
+ | `factory-droid` | WorkOS device code (URL + user code) | one refresh in a 60 s window, keeps `orgId`/`region` | 77 |
141
141
  | `gitlab-duo` | PKCE loopback `localhost:8080/callback`, no port fallback, paste fallback | one refresh in a 60 s window | 16 |
142
142
  | `gitlab-duo-agent` | paste the `vscode://` URL | one refresh, echoes the `vscode` redirect | 1 |
143
143
 
package/README.zh-CN.md CHANGED
@@ -85,7 +85,7 @@ dsh plugin --profile web link .
85
85
  随附 pi-ai 无法支持的提供商由配套的 `dsh-llm-omp-transports` 组件提供:
86
86
 
87
87
  - 每条路由只有一条授权,位于 `llm-omp-transports/<route>`——没有 key 池,也没有按账户轮换。登录在 Keys Manager 页面的 **传输账户**(`Transport accounts`)区块完成。
88
- - 模型在构建传输包时由固定的 `@oh-my-pi/pi-catalog@18.12.3` 表生成,客户端均为非官方实现。依赖前请阅读[传输包文档](packages/llm-omp/README.md)与其[已知限制](packages/llm-omp/docs/known-limits.md)。
88
+ - 模型在构建传输包时由固定的 `@oh-my-pi/pi-catalog@18.18.8` 表生成,客户端均为非官方实现。依赖前请阅读[传输包文档](packages/llm-omp/README.md)与其[已知限制](packages/llm-omp/docs/known-limits.md)。
89
89
 
90
90
  | 路由 | 登录 | 刷新 | 模型行数 |
91
91
  |---|---|---|---|
@@ -93,7 +93,7 @@ dsh plugin --profile web link .
93
93
  | `devin` | 粘贴浏览器最终落到的地址 | 无 —— 需重新登录 | 2 |
94
94
  | `google-gemini-cli` | 回环 `8085` + 粘贴兜底 | 在凭据 seam 上 | 7 |
95
95
  | `google-antigravity` | 回环 `51121` + 粘贴兜底 | 在凭据 seam 上 | 22 |
96
- | `factory-droid` | WorkOS 设备码(网址 + 用户码) | 60 秒窗口内刷新一次,保留 `orgId`/`region` | 62 |
96
+ | `factory-droid` | WorkOS 设备码(网址 + 用户码) | 60 秒窗口内刷新一次,保留 `orgId`/`region` | 77 |
97
97
  | `gitlab-duo` | PKCE 回环 `localhost:8080/callback`,无端口回落,可粘贴兜底 | 60 秒窗口内刷新一次 | 16 |
98
98
  | `gitlab-duo-agent` | 粘贴 `vscode://` 链接 | 刷新一次,回显 `vscode` 重定向 | 1 |
99
99
 
@@ -1,26 +1,42 @@
1
1
  /**
2
- * Input modalities for the extra-provider model rows.
2
+ * Capabilities for the extra-provider model rows: input modalities and the
3
+ * thinking ladder.
3
4
  *
4
- * DSH's remote model discovery reports no input modalities for a route its
5
- * bundled catalog does not ship — which is every extra provider — so a profile
6
- * written from that answer makes even an image model look text-only. The pinned
7
- * omp catalog does know, so {@link EXTRA_IMAGE_MODELS} decides: a row whose id
8
- * is listed is `text + image`, everything else is text.
5
+ * DSH's remote model discovery reports neither, for a route its bundled catalog
6
+ * does not ship — which is every extra provider — so a profile written from that
7
+ * answer makes an image model look text-only and every reasoning model look
8
+ * non-reasoning. The pinned omp catalog knows both, so the generated indexes
9
+ * decide: {@link EXTRA_IMAGE_MODELS} names the image-capable ids and
10
+ * {@link EXTRA_REASONING_EFFORTS} carries the ladder each indexed row declares.
9
11
  *
10
12
  * @module dsh-keys-manager/capabilities
11
13
  */
12
14
  import type { ModelRecord } from './domain.js';
13
15
  /**
14
- * Fill the modalities of a discovery answer before it is written to a profile:
15
- * a discovered modality list always wins (DSH knows its own bundled routes),
16
- * an indexed id gets `text + image`, and every other row is plain text.
16
+ * Read a persisted `reasoningEfforts` declaration, keeping only what DSH accepts:
17
+ * one of its own thinking levels as the key, a non-empty wire string as the value,
18
+ * and `null` only on `off` ("supported, send nothing"). A declaration that offers
19
+ * no level beyond `off` is dropped whole — DSH refuses one ("no level beyond
20
+ * off"). Both a settings file and the store are hand-editable, so this is the one
21
+ * gate for the field. `undefined` means the row declares nothing.
22
+ */
23
+ export declare function sanitizeReasoningEfforts(raw: unknown): Record<string, string | null> | undefined;
24
+ /**
25
+ * Fill the capabilities of a discovery answer — or of a seed catalog — before it
26
+ * is written to a profile. A row that already declares them keeps them, an
27
+ * indexed row gains what the pin declares, and every other row is returned
28
+ * unchanged (no empty dict, no `false`).
17
29
  */
18
30
  export declare function mergeModelCapabilities(providerId: string, models: readonly ModelRecord[]): ModelRecord[];
19
31
  /**
20
- * Fill the image capability the index knows into rows of a profile this
21
- * manager wrote before the index existed. Only a row the pin marks image and
22
- * that carries no `input` at all changes; every other row is returned as it is,
23
- * so a repaired profile is byte-identical except for those rows.
32
+ * Fill the capabilities the index knows into rows of a profile this manager
33
+ * wrote before the index existed.
34
+ *
35
+ * A row changes when it carries no `input` and the pin marks it image, when it
36
+ * carries no `reasoningEfforts` and the pin describes its ladder, or — on an
37
+ * adaptive route — when the route's `compat.forceAdaptiveThinking` is missing
38
+ * even though the row brought its own ladder. Every other row is returned as it
39
+ * is, so a repaired profile is byte-identical except for those rows.
24
40
  * `undefined` means there is nothing to repair and nothing to write.
25
41
  */
26
- export declare function repairImageModalities(providerId: string, models: readonly ModelRecord[]): ModelRecord[] | undefined;
42
+ export declare function repairModelCapabilities(providerId: string, models: readonly ModelRecord[]): ModelRecord[] | undefined;
@@ -1,7 +1,19 @@
1
- import { EXTRA_IMAGE_MODELS } from './extra-capabilities.generated.js';
1
+ import { EXTRA_IMAGE_MODELS, EXTRA_REASONING_EFFORTS } from './extra-capabilities.generated.js';
2
2
  import { EXTRA_PROVIDER_MAP } from './providers.js';
3
3
  const TEXT_INPUT = ['text'];
4
4
  const TEXT_IMAGE_INPUT = ['text', 'image'];
5
+ /**
6
+ * One own entry of a generated index.
7
+ *
8
+ * The indexes are plain object literals, and the keys looked up here come from
9
+ * outside: a route id or a model id a remote listing or a hand-edited profile
10
+ * supplied. A plain `index[key]` would resolve an inherited member for a legal
11
+ * id like `constructor`, `toString` or `__proto__` and turn it into a catalog
12
+ * fact — a prototype member is not an entry the pin wrote.
13
+ */
14
+ function ownEntry(index, key) {
15
+ return Object.hasOwn(index, key) ? index[key] : undefined;
16
+ }
5
17
  /**
6
18
  * The image-capable ids of one extra route: `[]` when the pin describes the
7
19
  * route with no image model, `undefined` when the route is not an extra one
@@ -10,40 +22,106 @@ const TEXT_IMAGE_INPUT = ['text', 'image'];
10
22
  function imageIds(providerId) {
11
23
  if (!EXTRA_PROVIDER_MAP.has(providerId))
12
24
  return undefined;
13
- return EXTRA_IMAGE_MODELS[providerId] ?? [];
25
+ return ownEntry(EXTRA_IMAGE_MODELS, providerId) ?? [];
26
+ }
27
+ /** The reasoning declarations of one extra route, keyed by model id. */
28
+ function reasoningRows(providerId) {
29
+ return ownEntry(EXTRA_REASONING_EFFORTS, providerId) ?? {};
30
+ }
31
+ /**
32
+ * Apply the index to one row, returning the same reference when it already
33
+ * carries everything the pin declares.
34
+ *
35
+ * A declared modality or ladder always wins: discovery knows its own bundled
36
+ * routes, and a profile the user edited is theirs. The ladder is only added to a
37
+ * row that declares none, so an existing `reasoningEfforts` is never rewritten;
38
+ * an adaptive route's `compat` is merged, never replaced.
39
+ *
40
+ * `declareText` is the one difference between the two callers: a discovery or
41
+ * seed answer gets an explicit modality on every row, while a repair leaves a
42
+ * row the pin says nothing about exactly as it was — it must not rewrite a list
43
+ * it has no claim on.
44
+ */
45
+ function withCapabilities(model, imageSet, reasoning, declareText) {
46
+ let next = model;
47
+ if (next.input === undefined && (declareText || imageSet.has(next.id))) {
48
+ next = { ...next, input: imageSet.has(next.id) ? [...TEXT_IMAGE_INPUT] : [...TEXT_INPUT] };
49
+ }
50
+ // Own keys only: `constructor`/`toString`/`__proto__` are legal model ids and
51
+ // must stay undescribed rows rather than resolve `Object.prototype`.
52
+ const declared = ownEntry(reasoning, next.id);
53
+ if (declared !== undefined) {
54
+ // A ladder the row already carries always wins.
55
+ if (next.reasoningEfforts === undefined)
56
+ next = { ...next, reasoningEfforts: { ...declared.efforts } };
57
+ // The adaptive flag is a fact about the route, not about the ladder, so it is
58
+ // merged even into a row that declares its own levels — otherwise those levels
59
+ // would dispatch on DSH's budget path. A compat field the row sets is kept.
60
+ if (declared.adaptive === true && next.compat?.forceAdaptiveThinking === undefined) {
61
+ next = { ...next, compat: { ...next.compat, forceAdaptiveThinking: true } };
62
+ }
63
+ }
64
+ return next;
65
+ }
66
+ /** DSH's thinking levels; a declaration keyed by anything else is not one it reads. */
67
+ const DSH_THINKING_LEVELS = new Set(['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max']);
68
+ /**
69
+ * Read a persisted `reasoningEfforts` declaration, keeping only what DSH accepts:
70
+ * one of its own thinking levels as the key, a non-empty wire string as the value,
71
+ * and `null` only on `off` ("supported, send nothing"). A declaration that offers
72
+ * no level beyond `off` is dropped whole — DSH refuses one ("no level beyond
73
+ * off"). Both a settings file and the store are hand-editable, so this is the one
74
+ * gate for the field. `undefined` means the row declares nothing.
75
+ */
76
+ export function sanitizeReasoningEfforts(raw) {
77
+ if (raw === null || typeof raw !== 'object' || Array.isArray(raw))
78
+ return undefined;
79
+ const accepted = (level, value) => DSH_THINKING_LEVELS.has(level) &&
80
+ (level === 'off'
81
+ ? value === null || (typeof value === 'string' && value !== '')
82
+ : typeof value === 'string' && value !== '');
83
+ const declared = Object.entries(raw).filter((entry) => accepted(entry[0], entry[1]));
84
+ if (!declared.some(([level]) => level !== 'off'))
85
+ return undefined;
86
+ return Object.fromEntries(declared);
14
87
  }
15
88
  /**
16
- * Fill the modalities of a discovery answer before it is written to a profile:
17
- * a discovered modality list always wins (DSH knows its own bundled routes),
18
- * an indexed id gets `text + image`, and every other row is plain text.
89
+ * Fill the capabilities of a discovery answer — or of a seed catalog — before it
90
+ * is written to a profile. A row that already declares them keeps them, an
91
+ * indexed row gains what the pin declares, and every other row is returned
92
+ * unchanged (no empty dict, no `false`).
19
93
  */
20
94
  export function mergeModelCapabilities(providerId, models) {
21
95
  const image = imageIds(providerId);
22
96
  if (image === undefined)
23
97
  return [...models];
24
98
  const imageSet = new Set(image);
25
- return models.map(model => model.input !== undefined
26
- ? model
27
- : { ...model, input: imageSet.has(model.id) ? [...TEXT_IMAGE_INPUT] : [...TEXT_INPUT] });
99
+ const reasoning = reasoningRows(providerId);
100
+ return models.map(model => withCapabilities(model, imageSet, reasoning, true));
28
101
  }
29
102
  /**
30
- * Fill the image capability the index knows into rows of a profile this
31
- * manager wrote before the index existed. Only a row the pin marks image and
32
- * that carries no `input` at all changes; every other row is returned as it is,
33
- * so a repaired profile is byte-identical except for those rows.
103
+ * Fill the capabilities the index knows into rows of a profile this manager
104
+ * wrote before the index existed.
105
+ *
106
+ * A row changes when it carries no `input` and the pin marks it image, when it
107
+ * carries no `reasoningEfforts` and the pin describes its ladder, or — on an
108
+ * adaptive route — when the route's `compat.forceAdaptiveThinking` is missing
109
+ * even though the row brought its own ladder. Every other row is returned as it
110
+ * is, so a repaired profile is byte-identical except for those rows.
34
111
  * `undefined` means there is nothing to repair and nothing to write.
35
112
  */
36
- export function repairImageModalities(providerId, models) {
113
+ export function repairModelCapabilities(providerId, models) {
37
114
  const image = imageIds(providerId);
38
115
  if (image === undefined)
39
116
  return undefined;
40
117
  const imageSet = new Set(image);
118
+ const reasoning = reasoningRows(providerId);
41
119
  let repaired = false;
42
120
  const rows = models.map(model => {
43
- if (model.input !== undefined || !imageSet.has(model.id))
44
- return model;
45
- repaired = true;
46
- return { ...model, input: [...TEXT_IMAGE_INPUT] };
121
+ const next = withCapabilities(model, imageSet, reasoning, false);
122
+ if (next !== model)
123
+ repaired = true;
124
+ return next;
47
125
  });
48
126
  return repaired ? rows : undefined;
49
127
  }
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnD,MAAM,UAAU,GAAG,CAAC,MAAM,CAAU,CAAA;AACpC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAA;AAEnD;;;;GAIG;AACH,SAAS,QAAQ,CAAC,UAAkB;IAClC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC;QAAE,OAAO,SAAS,CAAA;IACzD,OAAO,kBAAkB,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;AAC7C,CAAC;AAED;;;;GAIG;A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AClC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACzC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAA;IAC/B,MAAM,SAAS,GAAG,aAAa,CAAC,UAAU,CAAC,CAAA;IAC3C,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC9B,MAAM,IAAI,GAAG,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;QAChE,IAAI,IAAI,KAAK,KAAK;YAAE,QAAQ,GAAG,IAAI,CAAA;QACnC,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;IACF,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAA;AACpC,CAAC"}
package/lib/domain.d.ts CHANGED
@@ -79,7 +79,11 @@ export interface ModelRecord {
79
79
  contextWindow?: number;
80
80
  maxTokens?: number;
81
81
  input?: Array<'text' | 'image'>;
82
- reasoningEfforts?: Record<string, unknown>;
82
+ /**
83
+ * DSH thinking levels → wire value. `null` is "supported, send nothing" and is
84
+ * only legal for `off`; every other level names a non-empty wire string.
85
+ */
86
+ reasoningEfforts?: Record<string, string | null>;
83
87
  compat?: Record<string, unknown>;
84
88
  }
85
89
  /** One managed provider and its adoption facts. */
@@ -2,10 +2,26 @@
2
2
  * Generated by scripts/generate-extra-capabilities.mjs — do not edit by hand;
3
3
  * run `pnpm run generate:capabilities` after bumping @oh-my-pi/pi-catalog.
4
4
  *
5
- * Source: @oh-my-pi/pi-catalog@18.12.6 src/models.json (sha256:b0d9516e8c6cb4254b720e1e2983635776f272057ea6624f753498a3ea883152).
5
+ * Source: @oh-my-pi/pi-catalog@18.18.8 src/models.json (sha256:3256ca28d788655c098b346dadb4d1317a1d9f591e42fc499641533c78e05612).
6
6
  *
7
- * The model ids the pinned catalog marks image-capable, per extra-provider
8
- * route. A route the catalog does not describe is absent: the pin has no
9
- * answer for it, so its rows keep the modality the seed catalog gives them.
7
+ * Two indexes over the same pin, both keyed by extra-provider route.
8
+ *
9
+ * {@link EXTRA_IMAGE_MODELS}: the model ids the pinned catalog marks
10
+ * image-capable. A route the catalog does not describe is absent: the pin has
11
+ * no answer for it, so its rows keep the modality the seed catalog gives them.
12
+ *
13
+ * {@link EXTRA_REASONING_EFFORTS}: the thinking ladder to declare on a row,
14
+ * with the wire value of each DSH level. Only the rows a catalog rule models
15
+ * are listed; every other row stays non-reasoning rather than guessed at.
16
+ */
17
+ /**
18
+ * One row's reasoning declaration.
10
19
  */
20
+ export interface ExtraReasoningRow {
21
+ /** Wire value per offered DSH thinking level; only `off` may be null. */
22
+ efforts: Readonly<Record<string, string | null>>;
23
+ /** The route needs `compat.forceAdaptiveThinking` for these efforts to dispatch. */
24
+ adaptive?: true;
25
+ }
11
26
  export declare const EXTRA_IMAGE_MODELS: Readonly<Record<string, readonly string[]>>;
27
+ export declare const EXTRA_REASONING_EFFORTS: Readonly<Record<string, Readonly<Record<string, ExtraReasoningRow>>>>;