@sagmans/dsh-provider-extra 0.8.0 → 0.9.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/README.md CHANGED
@@ -1,51 +1,79 @@
1
1
  # dsh-provider-extra
2
2
 
3
- Extra provider routes for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):
3
+ Extra provider routes for [DeepSeek
4
+ Harness](https://github.com/deepseek-ai/deepseek-harness):
4
5
 
5
- - **OpenCode Go:** sends the live conversation ID in `x-opencode-session` for routing and prompt caching.
6
- - **OpenAI Codex:** uses a ChatGPT subscription through pi-ai's OAuth flow and the harness credential store.
6
+ - **OpenCode Go:** sends the live conversation ID in `x-opencode-session` for
7
+ routing and prompt caching.
8
+ - **OpenAI Codex:** uses a ChatGPT subscription through pi-ai's OAuth flow and
9
+ the harness credential store.
7
10
 
8
- Published on npm as [`@sagmans/dsh-provider-extra`](https://www.npmjs.com/package/@sagmans/dsh-provider-extra); every release carries a provenance attestation built by the tag workflow, and no npm token is stored. The code is [MIT licensed](LICENSE).
11
+ Published on npm as
12
+ [`@sagmans/dsh-provider-extra`](https://www.npmjs.com/package/@sagmans/dsh-provider-extra);
13
+ every release carries a provenance attestation built by the tag workflow, and no
14
+ npm token is stored. The code is [MIT licensed](LICENSE).
9
15
 
10
16
  ## Opt-in canonical catalog
11
17
 
12
- Provider-extra remains optional. With no `catalog` Config, existing additive behavior stays unchanged.
13
- An opted-in profile can select ordered routes from any backend the installed pi-ai catalog provides, or from an endpoint you declare with its own protocol and base URL.
14
- A route lists its models explicitly, or curates the installed source catalog with `include`/`exclude` patterns that keep every installed fact.
15
- One validated snapshot owns listings, dispatch, and `agentDefaultModel`; managed settings overlays do not apply.
18
+ Provider-extra remains optional. With no `catalog` Config, existing additive
19
+ behavior stays unchanged.
20
+ An opted-in profile can select ordered routes from any backend the installed
21
+ pi-ai catalog provides, or from an endpoint you declare with its own protocol
22
+ and base URL.
23
+ A route lists its models explicitly, or curates the installed source catalog
24
+ with `include`/`exclude` patterns that keep every installed fact.
25
+ One validated snapshot owns listings, dispatch, and `agentDefaultModel`; managed
26
+ settings overlays do not apply.
16
27
 
17
28
  Read [catalog configuration and activation](docs/catalog.md) before adoption.
18
- The [shape example](docs/catalog-v1.example.json) validates with synthetic model identifiers and illustrative metadata, not a real provider/model selection.
29
+ The [shape example](docs/catalog-v1.example.json) validates with synthetic model
30
+ identifiers and illustrative metadata, not a real provider/model selection.
19
31
  Keep your model selection in your own profile Config, not in the plugin package.
20
- For source development, use the [clone-only setup command](docs/catalog.md#clone-only-development-setup) with an explicit private catalog file.
21
- Only the adopted profile disables competing provider/default rows. TUI and ordinary profiles require no changes.
32
+ For source development, use the [clone-only setup
33
+ command](docs/catalog.md#clone-only-development-setup) with an explicit private
34
+ catalog file.
35
+ Only the adopted profile disables competing provider/default rows. TUI and
36
+ ordinary profiles require no changes.
22
37
 
23
38
  Canonical default saves use the host profile `configEditor` when available.
24
- Unsupported hosts reject with `CONFIG_PERSISTENCE_UNAVAILABLE`, rather than writing legacy settings.
25
- Catalog presence does not prove endpoint availability, pricing, or metadata accuracy.
39
+ Unsupported hosts reject with `CONFIG_PERSISTENCE_UNAVAILABLE`, rather than
40
+ writing legacy settings.
41
+ Catalog presence does not prove endpoint availability, pricing, or metadata
42
+ accuracy.
26
43
 
27
44
  ## Requirements
28
45
 
29
- - Node.js 24 LTS (verified with 24.20.0).
46
+ - Node.js 24 LTS (verified with 24.22.1).
30
47
  - pnpm 11.21.0 for this repository.
31
- - A DeepSeek Harness install on the supported line: `>=0.1.5-rc.1 <0.3.0`, verified against `0.1.5-rc.2`, `0.1.5-rc.3`, `0.1.7-rc.2`, and `0.2.0-rc.2` (see [RELEASE.md](RELEASE.md#harness-matrix)). The plugin's harness peers stay open, so a profile resolves the host copy it already has rather than a second framework instance; the range itself is declared in `dsh.compatibility.dsh`.
48
+ - A DeepSeek Harness install on the supported line: `>=0.2.1-rc.1
49
+ <0.2.2-0 || >=0.2.2-rc.1 <0.2.3-0`, verified against `0.2.1-rc.2`,
50
+ `0.2.1-rc.3`, `0.2.2-rc.1`, and `0.2.2-rc.5` (see
51
+ [RELEASE.md](RELEASE.md#harness-matrix)). The range is declared in
52
+ `dsh.compatibility.dsh` and on every harness peer, so the harness refuses this
53
+ plugin on a host outside it instead of failing the first turn. Hosts before
54
+ `0.2.1-rc.1` ship the pi-ai `0.x` model catalog; use
55
+ `@sagmans/dsh-provider-extra@0.8.1` there.
32
56
 
33
57
  ## Install
34
58
 
35
- Register the bundle in each profile you use. Web and TUI are separate compositions:
59
+ Register the bundle in each profile you use. Web and TUI are separate
60
+ compositions:
36
61
 
37
62
  ```sh
38
63
  dsh plugin --profile web add @sagmans/dsh-provider-extra
39
64
  dsh plugin --profile tui add @sagmans/dsh-provider-extra
40
65
  ```
41
66
 
42
- A release of the harness CLI is installable without a launcher already on `PATH`:
67
+ A release of the harness CLI is installable without a launcher already on
68
+ `PATH`:
43
69
 
44
70
  ```sh
45
- pnpm dlx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add @sagmans/dsh-provider-extra
71
+ pnpm dlx @deepseek-ai/dsh@0.2.2-rc.5 plugin --profile web add @sagmans/dsh-provider-extra
46
72
  ```
47
73
 
48
- The package declares `dsh.bundle.patch`. The CLI adds it to the profile's bundle list, and its patch loads the compiled plugin automatically. A bare `pnpm link` is not the registration procedure.
74
+ The package declares `dsh.bundle.patch`. The CLI adds it to the profile's bundle
75
+ list, and its patch loads the compiled plugin automatically. A bare `pnpm link`
76
+ is not the registration procedure.
49
77
 
50
78
  To remove it from a profile:
51
79
 
@@ -54,7 +82,8 @@ dsh plugin --profile web remove @sagmans/dsh-provider-extra
54
82
  dsh plugin --profile tui remove @sagmans/dsh-provider-extra
55
83
  ```
56
84
 
57
- These commands remove the profile dependency and bundle activation, not stored credentials. Restart the affected profiles after adding or removing the bundle.
85
+ These commands remove the profile dependency and bundle activation, not stored
86
+ credentials. Restart the affected profiles after adding or removing the bundle.
58
87
 
59
88
  ### Install from source
60
89
 
@@ -69,13 +98,20 @@ dsh plugin --profile web add "link:$PWD"
69
98
  dsh plugin --profile tui add "link:$PWD"
70
99
  ```
71
100
 
72
- Rebuild with `pnpm run build` after source changes, then restart the affected profiles. The bundle uses compiled JavaScript without a TypeScript loader. Keep the linked checkout at its registered path.
101
+ Rebuild with `pnpm run build` after source changes, then restart the affected
102
+ profiles. The bundle uses compiled JavaScript without a TypeScript loader. Keep
103
+ the linked checkout at its registered path.
73
104
 
74
105
  ### Optional profile overrides
75
106
 
76
- Defaults use the `opencode-go` and `openai-codex` routes, `OPENCODE_API_KEY`, the provider sign-in command `dsh-provider-extra-login`, and the fallback session ID `dsh-provider-extra`.
107
+ Defaults use the `opencode-go` and `openai-codex` routes, `OPENCODE_API_KEY`,
108
+ the provider sign-in command `dsh-provider-extra-login`, and the fallback
109
+ session ID `dsh-provider-extra`.
77
110
 
78
- To customize them, add an ID-targeted override to `$DSH_HOME/profiles/web/cordis.patch.yml`, `$DSH_HOME/profiles/tui/cordis.patch.yml`, or both. `DSH_HOME` defaults to `~/.dsh`.
111
+ To customize them, add an ID-targeted override to
112
+ `$DSH_HOME/profiles/web/cordis.patch.yml`,
113
+ `$DSH_HOME/profiles/tui/cordis.patch.yml`, or both. `DSH_HOME` defaults to
114
+ `~/.dsh`.
79
115
 
80
116
  ```yaml
81
117
  - id: dsh-provider-extra
@@ -93,11 +129,20 @@ To customize them, add an ID-targeted override to `$DSH_HOME/profiles/web/cordis
93
129
  # loginCommandName: dsh-provider-extra-login
94
130
  ```
95
131
 
96
- Preserve unrelated profile entries. Do not add a manual `insert` or `name`: the bundle owns plugin activation. Overrides can remain after removal without keeping the plugin active.
132
+ Preserve unrelated profile entries. Do not add a manual `insert` or `name`: the
133
+ bundle owns plugin activation. Overrides can remain after removal without
134
+ keeping the plugin active.
97
135
 
98
- If you used the earlier manual registration, replace its `insert` block with an ID-targeted override before running `add`. Keep your existing `config` values. A leftover manual insert can cause duplicate loading or keep the plugin active after `remove`.
136
+ If you used the earlier manual registration, replace its `insert` block with an
137
+ ID-targeted override before running `add`. Keep your existing `config` values. A
138
+ leftover manual insert can cause duplicate loading or keep the plugin active
139
+ after `remove`.
99
140
 
100
- Keep `opencode-go` and `openai-codex` out of the built-in `llm-pi-ai` provider configuration. A route can have only one adapter. A duplicate produces `DUPLICATE_ADAPTER`. The plugin logs the conflict and leaves that route with its existing owner. You can choose a different `routeId`, such as `opencode-go-session`, when you need both Go routes.
141
+ Keep `opencode-go` and `openai-codex` out of the built-in `llm-pi-ai` provider
142
+ configuration. A route can have only one adapter. A duplicate produces
143
+ `DUPLICATE_ADAPTER`. The plugin logs the conflict and leaves that route with its
144
+ existing owner. You can choose a different `routeId`, such as
145
+ `opencode-go-session`, when you need both Go routes.
101
146
 
102
147
  Start a profile with the same harness install that owns the profiles:
103
148
 
@@ -111,11 +156,21 @@ Select a model from the registered route in the model picker.
111
156
 
112
157
  ## OpenCode Go credentials and models
113
158
 
114
- Store the API key through the harness credential service, using the reference named by `apiKeyEnv`. Alternatively, supply that environment variable to the harness. Do not put keys in the patch file. `baseURL` and `headers` can override the gateway endpoint and add static headers. For the standard gateway, leave them unset.
159
+ Store the API key through the harness credential service, using the reference
160
+ named by `apiKeyEnv`. Alternatively, supply that environment variable to the
161
+ harness. Do not put keys in the patch file. `baseURL` and `headers` can override
162
+ the gateway endpoint and add static headers. For the standard gateway, leave
163
+ them unset.
115
164
 
116
- The plugin reuses `PiAiAdapter` and pi-ai's `opencode-go` catalog. It injects the routing header on both `prepareCall()` and direct stream dispatch. The request's session ID takes precedence over `fallbackSessionId` and static headers. Without a request ID or configured fallback, the plugin sends no session header.
165
+ The plugin reuses `PiAiAdapter` and pi-ai's `opencode-go` catalog. It injects
166
+ the routing header on both `prepareCall()` and direct stream dispatch. The
167
+ request's session ID takes precedence over `fallbackSessionId` and static
168
+ headers. Without a request ID or configured fallback, the plugin sends no
169
+ session header.
117
170
 
118
- The pinned catalog is extended with `deepseek-flash` (DeepSeek V4.1 Flash), cloned from `deepseek-v4-flash`. Add other models to the profile override without rebuilding or restarting:
171
+ The pinned catalog is extended with `deepseek-flash` (DeepSeek V4.1 Flash),
172
+ cloned from `deepseek-v4.1-flash`. Add other models to the profile override
173
+ without rebuilding or restarting:
119
174
 
120
175
  ```yaml
121
176
  - id: dsh-provider-extra
@@ -129,18 +184,29 @@ The pinned catalog is extended with `deepseek-flash` (DeepSeek V4.1 Flash), clon
129
184
  - example-go-other-model
130
185
  ```
131
186
 
132
- These identifiers are placeholders. Replace them with models your provider serves and templates from the installed catalog.
187
+ These identifiers are placeholders. Replace them with models your provider
188
+ serves and templates from the installed catalog.
133
189
 
134
- Each entry clones wire behavior from its template. Later entries win by ID. A catalog-owned ID is not replaced. An unknown template becomes a model diagnostic without disabling the route. The entry owns definitions for a declared exact selection.
190
+ Each entry clones wire behavior from its template. Later entries win by ID. A
191
+ catalog-owned ID is not replaced. An unknown template becomes a model diagnostic
192
+ without disabling the route. The entry owns definitions for a declared exact
193
+ selection.
135
194
 
136
- When models or codexModels declares an exact selection, that route resolves its models against the entry's extra-model declarations. An unknown selected ID rejects the entry before the route mounts. Later settings edits cannot replace or remove those selected model definitions.
195
+ When models or codexModels declares an exact selection, that route resolves its
196
+ models against the entry's extra-model declarations. An unknown selected ID
197
+ rejects the entry before the route mounts. Later settings edits cannot replace
198
+ or remove those selected model definitions.
137
199
 
138
- `models` serves and advertises exactly its listed IDs, in order. Leave it out to serve all resolved models.
139
- In additive mode, an empty declaration also means no selection; managed catalog arrays never have this expansion behavior.
200
+ `models` serves and advertises exactly its listed IDs, in order. Leave it out to
201
+ serve all resolved models.
202
+ In additive mode, an empty declaration also means no selection; managed catalog
203
+ arrays never have this expansion behavior.
140
204
 
141
205
  ## Codex models
142
206
 
143
- The Codex route serves pi-ai's installed `openai-codex` catalog for the signed-in subscription. Extend it the same way when the subscription serves an ID the installed catalog predates:
207
+ The Codex route serves pi-ai's installed `openai-codex` catalog for the
208
+ signed-in subscription. Extend it the same way when the subscription serves an
209
+ ID the installed catalog predates:
144
210
 
145
211
  ```yaml
146
212
  - id: dsh-provider-extra
@@ -156,25 +222,41 @@ The Codex route serves pi-ai's installed `openai-codex` catalog for the signed-i
156
222
 
157
223
  These identifiers are placeholders, not model recommendations.
158
224
 
159
- Unlike the Go route, these entries must name their `template`: Codex ships no default sibling, so a declaration that names none is reported as a model diagnostic instead of cloned from another vendor's catalog. Later entries win by ID, a catalog-owned ID is not replaced, and an unknown template becomes a diagnostic without disabling the route.
225
+ Unlike the Go route, these entries must name their `template`: Codex ships no
226
+ default sibling, so a declaration that names none is reported as a model
227
+ diagnostic instead of cloned from another vendor's catalog. Later entries win by
228
+ ID, a catalog-owned ID is not replaced, and an unknown template becomes a
229
+ diagnostic without disabling the route.
160
230
 
161
- Routes without models or codexModels continue to read extraModels or codexExtraModels from the settings section on each operation. Settings additions, metadata changes, and removals reach those unselected routes without a restart. A declared selection keeps its entry-owned model definitions instead.
231
+ Routes without models or codexModels continue to read extraModels or
232
+ codexExtraModels from the settings section on each operation. Settings
233
+ additions, metadata changes, and removals reach those unselected routes without
234
+ a restart. A declared selection keeps its entry-owned model definitions instead.
162
235
 
163
- `codexTransport` pins the transport pi-ai uses for this route: `sse`, `websocket`, `websocket-cached`, or `auto`. Leave it out and pi-ai chooses, which on a network that never lets the subscription's websocket continue past the first answer leaves the reply printed and the process waiting; pin `sse` there.
236
+ `codexTransport` pins the transport pi-ai uses for this route: `sse`,
237
+ `websocket`, `websocket-cached`, or `auto`. Leave it out and pi-ai chooses,
238
+ which on a network that never lets the subscription's websocket continue past
239
+ the first answer leaves the reply printed and the process waiting; pin `sse`
240
+ there.
164
241
 
165
242
  ## Service tiers
166
243
 
167
- Plugin-owned OpenAI and Codex routes expose service tier selection through the `providerServiceTiers` service.
244
+ Plugin-owned OpenAI and Codex routes expose service tier selection through the
245
+ `providerServiceTiers` service.
168
246
  Choices are `auto`, `default`, and `priority` (Fast).
169
- For Codex, Auto omits `service_tier` and lets the provider choose; it has the same wire behavior as Provider default but remains a distinct saved choice.
247
+ For Codex, Auto omits `service_tier` and lets the provider choose; it has the
248
+ same wire behavior as Provider default but remains a distinct saved choice.
170
249
  Native OpenAI routes continue to send `service_tier: "auto"` for Auto.
171
250
  Priority processing can increase usage cost and requires account access.
172
251
  The plugin does not offer `ultrafast` or `flex` for Codex.
173
252
 
174
253
  Interactive choices apply to one provider and model pair across profiles.
175
- The plugin atomically stores each choice under `$DSH_HOME/provider-extra-service-tiers/`, without editing configuration or duplicating the catalog.
254
+ The plugin atomically stores each choice under
255
+ `$DSH_HOME/provider-extra-service-tiers/`, without editing configuration or
256
+ duplicating the catalog.
176
257
  Menus and requests read the latest saved choice.
177
- Configured `serviceTierSelections` remain defaults until an interactive choice overrides them:
258
+ Configured `serviceTierSelections` remain defaults until an interactive choice
259
+ overrides them:
178
260
 
179
261
  ```yaml
180
262
  - id: dsh-provider-extra
@@ -185,8 +267,10 @@ Configured `serviceTierSelections` remain defaults until an interactive choice o
185
267
  tier: priority
186
268
  ```
187
269
 
188
- The selection reaches both stream entry points without changing authentication or transport.
189
- Managed catalog aliases support tiers when their source is `openai` or `openai-codex` and their protocol supports tier selection.
270
+ The selection reaches both stream entry points without changing authentication
271
+ or transport.
272
+ Managed catalog aliases support tiers when their source is `openai` or
273
+ `openai-codex` and their protocol supports tier selection.
190
274
  An OpenAI-compatible protocol alone does not enable tiers.
191
275
  Other sources and routes owned by another adapter do not advertise tiers.
192
276
  The provider still controls model support and account access.
@@ -197,12 +281,15 @@ Type `/service-tier` in the editor and select the command.
197
281
  Its popup offers Provider default, Auto, Standard, and Fast.
198
282
  The stock Model/Effort popup stays unchanged.
199
283
  Unsupported routes show an unavailable message and no selectable tiers.
200
- The command uses public npm DSH `0.2.0-rc.2` client services, without upstream patches or a custom React control.
284
+ The command uses public npm DSH `0.2.1-rc.2` client services, without upstream
285
+ patches or a custom React control.
201
286
 
202
287
  ### Headless
203
288
 
204
- The packaged [headless overlay](headless.patch.yml) requires the public npm DSH `0.2.0-rc.2` startup and request-scoping contracts.
205
- It replaces only startup parsing; the stock runner still owns execution and resume.
289
+ The packaged [headless overlay](headless.patch.yml) requires the public npm DSH
290
+ `0.2.1-rc.2` startup and request-scoping contracts.
291
+ It replaces only startup parsing; the stock runner still owns execution and
292
+ resume.
206
293
  Enable this provider plugin in the headless profile first.
207
294
  Pass the installed overlay path before headless options:
208
295
 
@@ -210,11 +297,13 @@ Pass the installed overlay path before headless options:
210
297
  dsh --profile headless --patch /path/to/dsh-provider-extra/headless.patch.yml --service-tier=fast "Reply with exactly pong"
211
298
  ```
212
299
 
213
- Alternatively, compose the overlay entries into your headless profile once, then omit `--patch`.
300
+ Alternatively, compose the overlay entries into your headless profile once, then
301
+ omit `--patch`.
214
302
  Do not apply that overlay to Web, Desktop, or TUI profiles.
215
303
  Stock headless startup alone does not recognize `--service-tier`.
216
304
 
217
- Accepted values are `auto`, `standard` (`default`), `fast` (`priority`), and `provider-default`.
305
+ Accepted values are `auto`, `standard` (`default`), `fast` (`priority`), and
306
+ `provider-default`.
218
307
  Without the flag, requests use the saved choice.
219
308
  `provider-default` suppresses it for this invocation without changing storage.
220
309
  Only the invoking root agent receives the override, including resumed requests.
@@ -229,27 +318,54 @@ The plugin registers `prefix+t` through the optional `tuiKeymaps` registry.
229
318
  The TUI owns generic key dispatch, not this binding or its behavior.
230
319
  Use `prefix+t` to open the tier picker independently.
231
320
  Rebind `keys.plugin.provider-extra.serviceTier` on the owning TUI row.
232
- On Config-backed profiles, put `keys` directly under that row's `config`, not under `settings`.
321
+ On Config-backed profiles, put `keys` directly under that row's `config`, not
322
+ under `settings`.
233
323
  Keep `sessionId` and the other launch fields when editing the row.
234
324
  Removing this provider plugin removes its shortcut and effort follow-up.
235
- Choose **provider default** to suppress both the saved tier and its configured fallback.
325
+ Choose **provider default** to suppress both the saved tier and its configured
326
+ fallback.
236
327
  Cancelling the tier picker does not change the confirmed effort.
237
328
  Writes that fail before atomic replacement preserve the previous tier.
238
- A connection or durability failure after replacement can leave the new tier visible; reopen the picker before retrying.
329
+ A connection or durability failure after replacement can leave the new tier
330
+ visible; reopen the picker before retrying.
239
331
  Cancelling an already-submitted save does not undo it.
240
- Shared saves require a DSH profile with a resolved shared home and a filesystem that supports private POSIX permissions and directory synchronization.
241
- Windows interactive persistence is unsupported; configured defaults and headless flags remain usable when no shared store exists.
242
- Unreadable or malformed records block tier reads rather than silently restoring paid defaults; repair or remove the affected record.
243
- With footer-hint support, explicit Auto and Fast appear beside effort, for example `(high · Fast)`.
332
+ Shared saves require a DSH profile with a resolved shared home and a filesystem
333
+ that supports private POSIX permissions and directory synchronization.
334
+ Windows interactive persistence is unsupported; configured defaults and headless
335
+ flags remain usable when no shared store exists.
336
+ Unreadable or malformed records block tier reads rather than silently restoring
337
+ paid defaults; repair or remove the affected record.
338
+ With footer-hint support, explicit Auto and Fast appear beside effort, for
339
+ example `(high · Fast)`.
244
340
  Standard and provider-default selections stay hidden.
245
341
  Provider default adds no `service_tier` field to normal requests.
246
342
  Existing caller options and payload hooks remain unchanged.
247
343
 
248
344
  ## Provider sign-in
249
345
 
250
- Sign in from the profile you are already using. The plugin registers a command in the harness command palette.
346
+ On the Web and Desktop Models page, this plugin renders a **Sign in** control
347
+ inside the eligible provider card, beside the adapter's own fields. It needs no
348
+ command palette, no restart, and no key entry: the host half lists the
349
+ authorization flows the installed harness exposes and relays one interactive
350
+ attempt (notices, links, verification codes, and questions) to the browser by
351
+ polling, and the client half registers into `settings.models.provider-card`
352
+ under the `llm-pi-ai` family.
353
+
354
+ Codex is the first offered provider: the card appears for the `openai-codex`
355
+ catalog route when its `llm-pi-ai` profile names no credential reference and
356
+ its native authentication reports OAuth with no environment key. `SIGN_IN_PROVIDERS`
357
+ in `src/tier-client.ts` is the allowlist to extend once another flow is proven.
358
+ The control shows whether a grant is already stored, offers browser or
359
+ device-code login exactly as pi-ai asks, and withdraws the attempt when the
360
+ panel closes; a grant committed mid-login still authenticates the route. The
361
+ same grant serves the CLI below, because both address
362
+ `llm-pi-ai/openai-codex`.
363
+
364
+ Sign in from the profile you are already using. The plugin registers a command
365
+ in the harness command palette.
251
366
  In additive mode, it offers providers with an installed interactive login.
252
- In managed mode, it offers only the routes and authentication methods selected by `catalog`.
367
+ In managed mode, it offers only the routes and authentication methods selected
368
+ by `catalog`.
253
369
 
254
370
  ```text
255
371
  /dsh-provider-extra-login [<id> [oauth|key] | status]
@@ -259,9 +375,12 @@ Omit the ID to pick a provider. Set `loginCommandName` to rename the command.
259
375
  Set `loginCommandEnabled: false` to disable it in either mode.
260
376
  The command needs a command registry and a session UI to ask sign-in questions.
261
377
 
262
- Managed IDs are exactly the `Config.catalog` route IDs, shown with their configured names.
263
- Additive IDs remain installed source provider IDs, including `opencode-go` when its configured route is aliased.
264
- With no method word, the command uses the only available method, or OAuth first when both are available.
378
+ Managed IDs are exactly the `Config.catalog` route IDs, shown with their
379
+ configured names.
380
+ Additive IDs remain installed source provider IDs, including `opencode-go` when
381
+ its configured route is aliased.
382
+ With no method word, the command uses the only available method, or OAuth first
383
+ when both are available.
265
384
  Use `oauth` or `key` to select a method explicitly.
266
385
  A managed `apiKeyRef` route offers only key entry, including XAI.
267
386
 
@@ -270,17 +389,28 @@ It never declares routes or changes Config, defaults, settings, or membership.
270
389
  Additive sign-in can declare an undeclared provider in `llm-pi-ai` settings.
271
390
  Credentials serve the next request without a restart.
272
391
 
273
- Missing or read-only credential stores refuse sign-in before any secret or OAuth prompt.
274
- API-key entry uses a secret-marked question and verifies the pending key before storage.
275
- A zero-model key route fails with `cannot verify this API key: no models are available for provider <route-id>`.
276
- That failure stores nothing. Success requires a readback from the effective credential store.
277
-
278
- Managed status prints `API key <ref> (not set|set from <source>)` for reference-backed routes.
392
+ Missing or read-only credential stores refuse sign-in before any secret or OAuth
393
+ prompt.
394
+ API-key entry uses a secret-marked question and verifies the pending key before
395
+ storage.
396
+ A zero-model key route fails with
397
+ `cannot verify this API key: no models are available for provider <route-id>`.
398
+ That failure stores nothing. Success requires a readback from the effective
399
+ credential store.
400
+
401
+ Managed status prints `API key <ref> (not set|set from <source>)` for
402
+ reference-backed routes.
279
403
  It never substitutes a provider record for an unresolved reference.
280
- Source-record mode reports `not signed in` or `signed in (api_key|oauth)` from `llm-pi-ai:<credentialProvider>`.
281
- Status and OAuth persistence do not check endpoint availability or account entitlement.
404
+ Source-record mode reports `not signed in` or `signed in (api_key|oauth)` from
405
+ `llm-pi-ai:<credentialProvider>`.
406
+ Status and OAuth persistence do not check endpoint availability or account
407
+ entitlement.
282
408
 
283
- Without a command palette — a headless composition, or a sign-in for a server you are not attached to — use the shipped bin instead. It signs into the Codex route only, and needs the same `DSH_HOME` as the harness plus a profile that has booted at least once, because that is what installs the tree the bin resolves the harness packages through:
409
+ Without a command palette — a headless composition, or a sign-in for a server
410
+ you are not attached to — use the shipped bin instead. It signs into the Codex
411
+ route only, and needs the same `DSH_HOME` as the harness plus a profile that has
412
+ booted at least once, because that is what installs the tree the bin resolves
413
+ the harness packages through:
284
414
 
285
415
  ```sh
286
416
  "$DSH_HOME/profiles/web/node_modules/.bin/dsh-provider-extra-login"
@@ -288,11 +418,18 @@ Without a command palette — a headless composition, or a sign-in for a server
288
418
  "$DSH_HOME/profiles/web/node_modules/.bin/dsh-provider-extra-login" --credentials-path /absolute/path/to/.credentials.yaml
289
419
  ```
290
420
 
291
- From a source checkout, `pnpm codex:login` runs the same entry point through the TypeScript loader.
421
+ From a source checkout, `pnpm codex:login` runs the same entry point through the
422
+ TypeScript loader.
292
423
 
293
- Choose device-code login for a headless host or browser login for a desktop. Follow the URL and prompts printed by pi-ai. The browser callback uses `localhost:1455`. The prompt also accepts a pasted redirect URL.
424
+ Choose device-code login for a headless host or browser login for a desktop.
425
+ Follow the URL and prompts printed by pi-ai. The browser callback uses
426
+ `localhost:1455`. The prompt also accepts a pasted redirect URL.
294
427
 
295
- The grant is stored in `$DSH_HOME/.credentials.yaml` by default. Writes use the harness document lock, and the running adapter reads the grant on the next request. Never commit the grant or include it in a bug report. Renaming `codexRouteId` changes the credential address, so keep the default unless a separate grant is intentional. Set `codexEnabled: false` to disable this route.
428
+ The grant is stored in `$DSH_HOME/.credentials.yaml` by default. Writes use the
429
+ harness document lock, and the running adapter reads the grant on the next
430
+ request. Never commit the grant or include it in a bug report. Renaming
431
+ `codexRouteId` changes the credential address, so keep the default unless a
432
+ separate grant is intentional. Set `codexEnabled: false` to disable this route.
296
433
 
297
434
  ## Development and verification
298
435
 
@@ -302,27 +439,59 @@ pnpm run check
302
439
  pnpm audit --audit-level high
303
440
  ```
304
441
 
305
- `check` runs type checking, source tests, the harness matrix guard, the build, integration tests, release guards, and the package smoke. `node tools/harness-matrix.mjs` reads the declared range, the verified releases, and what every harness package declares, and fails when the three disagree; `pnpm run matrix` is the same check.
306
- Package checks reject non-synthetic catalog/model declarations in shipped configuration and documentation.
307
- Development setup tests use synthetic credentials-free profiles; the setup helper stays outside the npm package. The plain-Node smoke test mounts both compiled routes in the real Cordis/LLM runtime. Two CLI tests exercise add, repeated add, profile overrides, and remove in disposable web/TUI profiles; they drive the registry CLI this repository develops against (`@deepseek-ai/dsh@0.2.0-rc.2`), so no harness checkout is needed.
308
-
309
- Tests use a local mock gateway or seeded grants. They require no API key, OAuth login, or paid provider requests.
310
-
311
- CI installs from the registry with read-only permissions and no account credentials, verifies dependency signatures and attestations, and runs the same checks. New dependency releases must be at least seven days old, and `pnpm-workspace.yaml` limits which lifecycle scripts may run; the harness vendor's own scope is excluded from that window, because a verified release is published inside it and the mount resolves that same vendor's packages (see [RELEASE.md](RELEASE.md#harness-matrix)).
312
-
313
- The package smoke test does not prove a real account can authenticate or a remote provider is available. To verify those, install a candidate into a profile built on the supported harness line and send one message through each configured route.
314
-
315
- Before sending a pull request, run the checks and describe the behavior changed. Report security problems privately to the repository maintainer, not in public issues. Remove keys, grants, conversation content, and machine-specific paths from shared logs.
442
+ `check` runs type checking, source tests, the harness matrix guard, the build,
443
+ integration tests, release guards, and the package smoke.
444
+ `node tools/harness-matrix.mjs` reads the declared range, the verified releases,
445
+ and what every harness package declares, and fails when the three disagree;
446
+ `pnpm run matrix` is the same check.
447
+ Package checks reject non-synthetic catalog/model declarations in shipped
448
+ configuration and documentation.
449
+ Development setup tests use synthetic credentials-free profiles; the setup
450
+ helper stays outside the npm package. The plain-Node smoke test mounts both
451
+ compiled routes in the real Cordis/LLM runtime. Two CLI tests exercise add,
452
+ repeated add, profile overrides, and remove in disposable web/TUI profiles; they
453
+ drive the registry CLI this repository develops against
454
+ (`@deepseek-ai/dsh@0.2.2-rc.5`), so no harness checkout is needed.
455
+
456
+ Tests use a local mock gateway or seeded grants. They require no API key, OAuth
457
+ login, or paid provider requests.
458
+
459
+ CI installs from the registry with read-only permissions and no account
460
+ credentials, verifies dependency signatures and attestations, and runs the same
461
+ checks. New dependency releases must be at least seven days old, and
462
+ `pnpm-workspace.yaml` limits which lifecycle scripts may run; a verified harness
463
+ release is published inside that window, so only the exact versions it resolves
464
+ are exempted, and only until they mature (see
465
+ [RELEASE.md](RELEASE.md#harness-matrix)).
466
+
467
+ The package smoke test does not prove a real account can authenticate or a
468
+ remote provider is available. To verify those, install a candidate into a
469
+ profile built on the supported harness line and send one message through each
470
+ configured route.
471
+
472
+ Before each push to `main`, run the checks and describe the behavior changed in
473
+ `CHANGELOG.md`. Report security problems privately to the repository maintainer,
474
+ not in public issues. Remove keys, grants, conversation content, and
475
+ machine-specific paths from shared logs.
316
476
 
317
477
  ## Releasing
318
478
 
319
- Published artefacts carry a provenance attestation, which only a CI provider can issue, so releases ship from the tag workflow rather than a laptop.
479
+ Published artefacts carry a provenance attestation, which only a CI provider can
480
+ issue, so releases ship from the tag workflow rather than a laptop.
320
481
 
321
- 1. Bump `version` in `package.json`, land it on `main` through a reviewed PR, and wait for CI to pass on the merged SHA.
322
- 2. Tag that SHA with a signed tag and push it. The tag ruleset admits repository admins only.
323
- 3. [`.github/workflows/release.yml`](.github/workflows/release.yml) re-runs the checks and the package smoke; the publish job then waits for a maintainer's approval on the `npm-release` environment before it publishes with OIDC trusted publishing and automatic provenance.
482
+ 1. Bump `version` in `package.json`, and push it to `main` after the local hooks
483
+ pass.
484
+ 2. Tag that SHA with a signed tag and push it. The tag ruleset admits repository
485
+ admins only.
486
+ 3. [`.github/workflows/release.yml`](.github/workflows/release.yml) re-runs the
487
+ checks and the package smoke; the publish job then publishes automatically
488
+ with OIDC trusted publishing and automatic provenance. Only an admin can push
489
+ a `v*` tag, so the signed tag push is the release approval.
324
490
 
325
- The workflow stores no npm token: the registry trusts `release.yml` on the `npm-release` environment, and [`scripts/npm/release.py`](scripts/npm/release.py) creates both the environment and that trust. The full runbook is [RELEASE.md](RELEASE.md).
491
+ The workflow stores no npm token: the registry trusts `release.yml` on the
492
+ `npm-release` environment, and
493
+ [`scripts/npm/release.py`](scripts/npm/release.py) creates both the environment
494
+ and that trust. The full runbook is [RELEASE.md](RELEASE.md).
326
495
 
327
496
  ## License
328
497
 
@@ -330,9 +499,21 @@ MIT
330
499
 
331
500
  ## Git hooks
332
501
 
333
- Checks run in tracked local Git hooks instead of push/PR CI. Run `scripts/setup-hooks` once after cloning; it points this clone's `core.hooksPath` at `.githooks`. Each hook runs the generic checks first (sign-off and commit message format, a gitleaks secret scan, and signed, signed-off commits on push), then this repository's checks in `.githooks/<hook>.d/` in name order. Install [gitleaks](https://github.com/gitleaks/gitleaks) first. Every check must pass before you push; never use `--no-verify`. Pre-push checks test exactly each pushed commit: in place only when it is the clean, unmodified checkout, otherwise in a temporary worktree of that commit.
502
+ Checks run in tracked local Git hooks instead of push/PR CI. Run
503
+ `scripts/setup-hooks` once after cloning; it points this clone's
504
+ `core.hooksPath` at `.githooks`. Each hook runs the generic checks first
505
+ (sign-off and commit message format, a gitleaks secret scan, and signed,
506
+ signed-off commits on push), then this repository's checks in
507
+ `.githooks/<hook>.d/` in name order. Install
508
+ [gitleaks](https://github.com/gitleaks/gitleaks) first. Every check must pass
509
+ before you push; never use `--no-verify`. Pre-push checks test exactly each
510
+ pushed commit: in place only when it is the clean, unmodified checkout,
511
+ otherwise in a temporary worktree of that commit.
334
512
 
335
513
  This repository's checks:
336
514
 
337
515
  - `pre-commit`: staged whitespace and conflict-marker check.
338
- - `pre-push`: `npm audit signatures`, `pnpm run check`, `pnpm audit --audit-level high`.
516
+ - `pre-push`: `npm audit signatures`, `pnpm run check`, the `catalog-setup`
517
+ tests against the real dogfood helper, `pnpm audit --audit-level high`. The
518
+ helper comes from the installed `dsh-tui-dogfood` skill or an absolute
519
+ `DSH_DOGFOOD_HELPER` path. A missing helper blocks the push.
package/cordis.patch.yml CHANGED
@@ -4,3 +4,6 @@
4
4
  name: '@sagmans/dsh-provider-extra'
5
5
  config:
6
6
  fallbackSessionId: dsh-provider-extra
7
+ # Models-page sign-in transport; independent of the route modes above.
8
+ - id: dsh-provider-extra-sign-in
9
+ name: '@sagmans/dsh-provider-extra/sign-in'