@shuind/dsh-codex-connect 0.0.0-stage → 0.2.1
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/INSTALL.md +349 -0
- package/LICENSE +202 -0
- package/MIGRATION.md +101 -0
- package/NOTICE +26 -0
- package/README.md +71 -2
- package/VERSIONING.md +69 -0
- package/cordis.patch.yml +9 -0
- package/docs/README.zh.md +3 -0
- package/docs/assets/composer-capabilities.jpg +0 -0
- package/docs/assets/en/hero.jpg +0 -0
- package/docs/assets/en/image-generation.png +0 -0
- package/docs/assets/en/model-selector.jpg +0 -0
- package/docs/assets/en/oauth-status.jpg +0 -0
- package/docs/assets/en/plugin-configuration.jpg +0 -0
- package/docs/assets/en/plugin-entry.jpg +0 -0
- package/docs/assets/hero.jpg +0 -0
- package/docs/assets/model-selector.jpg +0 -0
- package/docs/assets/oauth-status.jpg +0 -0
- package/docs/assets/plugin-configuration.jpg +0 -0
- package/docs/assets/zh/hero.jpg +0 -0
- package/docs/assets/zh/image-generation.png +0 -0
- package/docs/assets/zh/model-selector.jpg +0 -0
- package/docs/assets/zh/oauth-status.jpg +0 -0
- package/docs/assets/zh/plugin-configuration.jpg +0 -0
- package/docs/assets/zh/plugin-entry.jpg +0 -0
- package/docs/design.md +61 -0
- package/docs/design.zh.md +39 -0
- package/docs/licenses/pi-ai-oauth.txt +21 -0
- package/docs/licenses/standalone-cli.txt +115 -0
- package/docs/preflight-activity.md +42 -0
- package/docs/preflight-activity.zh.md +42 -0
- package/docs/quota-tool.md +46 -0
- package/docs/reference.md +240 -0
- package/docs/reference.zh.md +240 -0
- package/docs/skills/codex-quota-awareness/SKILL.md +12 -0
- package/lib/bin.js +2442 -0
- package/lib/client.js +6752 -0
- package/lib/index.d.ts +631 -0
- package/lib/index.js +7162 -0
- package/lib/models-DUIoH1lI.js +1763 -0
- package/lib/openai-codex-responses-CzSuDkhU.js +3452 -0
- package/package.json +234 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Bounded bili preflight activity
|
|
2
|
+
|
|
3
|
+
English | [中文](preflight-activity.zh.md)
|
|
4
|
+
|
|
5
|
+
This source change addresses [#340](https://github.com/franksong2702/dsh-codex-connect/issues/340): a bili proxy may spend longer than the ordinary five-minute stream idle interval compressing a request while sending `: bili-preflight` SSE comments. Comments are not model output. The integration remains disabled unless the operator explicitly trusts one proxy origin and supplies a finite total budget. Published Alpha 5 is immutable and does not contain this change.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
Add startup configuration to the existing plugin entry in the effective profile. Replace the example origin with the credential-free HTTP(S) proxy actually used by this plugin. `preflightActivity` is not a browser setting; it is validated when the plugin loads.
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
- id: llm-openai-codex
|
|
13
|
+
config:
|
|
14
|
+
enableProxy: true
|
|
15
|
+
proxyUrl: http://127.0.0.1:7890
|
|
16
|
+
preflightActivity:
|
|
17
|
+
protocol: bili-v1
|
|
18
|
+
trustedProxyOrigin: http://127.0.0.1:7890
|
|
19
|
+
maxDurationMs: 450000
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`maxDurationMs` is required: a positive safe integer no greater than `2147183647`. The upper bound reserves 300000 milliseconds for the Host's finite inner safety timer; it is not a recommended wait duration. Omit `preflightActivity` to retain the original behavior. Changes take effect on a subsequent operator-controlled plugin load; installing this patch does not change or restart any service automatically.
|
|
23
|
+
|
|
24
|
+
## Timing and trust
|
|
25
|
+
|
|
26
|
+
Activity requires explicit `preflightActivity` configuration and a successful SSE response with `x-bili-preflight: compressing`. The invocation must either acquire the configured proxy origin, or, when no plugin proxy was acquired, prove that the installed billion-context native fetch chain routed this response through that same configured origin. Native proof requires the installed flag, an own fetch-chain marker, a current native state object with an explicit-port numeric-loopback HTTP origin, and the exact nonredirected response URL produced by rewriting this request as `<origin>/bili/<input URL>`. Headers or the mere presence of billion-context do not authorize a route.
|
|
27
|
+
|
|
28
|
+
For native interception, configure `trustedProxyOrigin` to the active native proxy's exact origin, including its port; `enableProxy` is not required for this independently installed route. A dynamically assigned native port must match startup authorization. If the native proxy is reloaded or replaced, old responses lose heartbeat authority; a different port requires a subsequent operator-controlled plugin load with updated configuration. Omitting `preflightActivity` still disables the integration, even when the native interceptor is installed. A different acquired plugin proxy is never rescued by the native fallback.
|
|
29
|
+
|
|
30
|
+
Once admitted, the response header renews the outstanding idle read once. Subsequent activity requires a complete frame containing exactly `: bili-preflight` followed by an empty line. Fragmented LF, CRLF and CR line endings are accepted. Untrusted direct routes, another proxy, ordinary comments, partial frames and comments with extra fields do not renew idle time. Proxy trust does not change endpoint validation, redirect policy, TLS validation, credentials or direct-fallback policy; these headers are not proof of proxy identity on an untrusted route.
|
|
31
|
+
|
|
32
|
+
The ordinary idle interval remains 300000 milliseconds while an output read is outstanding. An accepted heartbeat renews only that idle interval. A separate absolute preflight budget starts at the first eligible response header and cannot be reset by retries or further heartbeats. A `data:` line or an oversized frame stops heartbeat recognition but does not erase the budget. The first converted Host chunk, EOF or iterator cleanup ends preflight timing. Consumer pauses between chunks are not provider idle time.
|
|
33
|
+
|
|
34
|
+
The plugin uses existing public provider authentication and stream-profile APIs, together with `dsh-timeout`; no Host fork or new upstream interface is required. Its timer starts after Host credential and attachment preparation. Only an opted-in profile gets an inner safety interval of `300000 + maxDurationMs`; the plugin wrapper still enforces the ordinary five-minute idle limit, including direct and noneligible responses. Each iterator has independent authority and timers, including repeated invocations of a prepared call.
|
|
35
|
+
|
|
36
|
+
Caller cancellation retains already-produced Host usage and aborted-finish chunks. A read that does not settle after cancellation is abandoned after one event-loop turn. Plugin-owned expiry remains `TIMEOUT`, even if the underlying provider later reports an aborted finish. Cleanup aborts the request, clears owned timers and detaches a nonsettling inner return. It cannot force arbitrary third-party callbacks to terminate. Response bytes and stream demand are preserved; no synthetic heartbeat is added to model output or conversation history.
|
|
37
|
+
|
|
38
|
+
## Verification and limits
|
|
39
|
+
|
|
40
|
+
`tests/preflight-*.spec.ts` exercises the unchanged oldest development Host with synthetic credentials, real SDK parsing, virtual time, fragmented frames, slow preparation, cancellation, total/idle limits and response demand. `tests/native-preflight.spec.ts` verifies the narrow installed-native authority contract, including exact real local-fetch response metadata, redirect rejection and authority replacement; the adapter tests cover configured native routing, default-off behavior, origin mismatch, stale authority, bounded heartbeats, cancellation and semantic idle restoration. `pnpm run check:dsh-matrix` installs the same packed plugin against every exact declared Host and runs six enabled/default-off cases per Host, including a response header at 299 seconds followed by the full 450-second budget and an enabled/disabled cancellation comparison. Only HTTP and proxy transport are replaced in those installed fixtures; no real provider request occurs.
|
|
41
|
+
|
|
42
|
+
These checks do not establish real bili, HTTPS CONNECT/TLS topology, Windows Desktop or account/model acceptance. The issue's separate post-cancellation HTTP 413 is not changed by this patch. Track native compatibility in #405; the separate HTTP 413 requires an upstream bili fix and live acceptance. Source merge and green CI are not a publication or a successful live conversation.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# 有界的 bili 预处理活动
|
|
2
|
+
|
|
3
|
+
[English](preflight-activity.md) | 中文
|
|
4
|
+
|
|
5
|
+
这项源码改动处理 [#340](https://github.com/franksong2702/dsh-codex-connect/issues/340):bili 代理压缩请求时可能超过普通流的五分钟空闲期限,同时持续发送 `: bili-preflight` SSE 注释。注释不是模型输出。只有运维者明确指定一个可信代理 origin 和有限总预算,才会启用此适配。已发布的 Alpha 5 保持不可变,不包含本次改动。
|
|
6
|
+
|
|
7
|
+
## 配置
|
|
8
|
+
|
|
9
|
+
在实际生效的 profile 中给已有插件条目添加启动配置。把示例地址换成插件实际使用、不带凭据的 HTTP(S) 代理 origin。`preflightActivity` 不是浏览器设置;插件加载时会校验它。
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
- id: llm-openai-codex
|
|
13
|
+
config:
|
|
14
|
+
enableProxy: true
|
|
15
|
+
proxyUrl: http://127.0.0.1:7890
|
|
16
|
+
preflightActivity:
|
|
17
|
+
protocol: bili-v1
|
|
18
|
+
trustedProxyOrigin: http://127.0.0.1:7890
|
|
19
|
+
maxDurationMs: 450000
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`maxDurationMs` 必填,必须是大于零且不超过 `2147183647` 的安全整数。上限为宿主内部的有限保险计时器预留 300000 毫秒,并不是建议的等待时长。省略 `preflightActivity` 即保留原有行为。修改会在之后由运维者控制的插件加载中生效;安装补丁不会自动修改或重启服务。
|
|
23
|
+
|
|
24
|
+
## 计时与信任
|
|
25
|
+
|
|
26
|
+
认可活动必须明确配置 `preflightActivity`,且成功的 SSE 响应带有 `x-bili-preflight: compressing`。本次调用必须取得配置中的代理 origin;若未取得插件代理,则必须证明已安装的 billion-context 原生 fetch 链确实将本次响应路由到同一配置 origin。原生证明要求安装标记、fetch 自身的链标记、当前原生状态对象中带显式端口的数字回环 HTTP origin,以及将本次请求改写为 `<origin>/bili/<input URL>` 后的精确未重定向响应 URL。只有响应头或仅安装了 billion-context 均不能授权路由。
|
|
27
|
+
|
|
28
|
+
使用原生拦截时,`trustedProxyOrigin` 必须填写当前原生代理的精确 origin(包括端口);这一独立安装的路由不要求 `enableProxy`。动态分配的端口必须匹配启动授权。原生代理重新加载或替换后,旧响应失去心跳授权;不同端口需要运维者在后续插件加载时更新配置。即使原生拦截已安装,省略 `preflightActivity` 仍会关闭适配。已经取得另一个插件代理时,不会通过原生回退绕过不匹配。
|
|
29
|
+
|
|
30
|
+
通过验证的响应头只续期当前空闲读取一次。随后必须是恰好由 `: bili-preflight` 和空行组成的完整帧才认可活动。允许分片的 LF、CRLF 和 CR 换行。不可信直连、其他代理、普通注释、不完整帧或包含其他字段的注释均不会续期。代理信任不会改变目标地址校验、重定向策略、TLS 校验、凭据或禁止静默直连回退的策略;不可信路由中的这些响应头不能证明代理身份。
|
|
31
|
+
|
|
32
|
+
等待输出读取时,普通空闲期限仍为 300000 毫秒。认可的心跳只续期这一空闲期限。另一个不可续期的预处理总预算从第一个符合条件的响应头开始,重试和后续心跳都不能重置。出现 `data:` 行或超长帧后停止识别心跳,但不会抹除总预算。宿主转换出的第一个数据块、EOF 或迭代器清理结束预处理计时。消费者在两次读取之间暂停,不算提供方空闲。
|
|
33
|
+
|
|
34
|
+
插件复用现有的公开提供方认证、流配置接口与 `dsh-timeout`,不需要 fork 宿主或新增上游接口。计时从宿主凭据与附件准备完成后开始。只有明确启用的 profile 才将内部保险期限设为 `300000 + maxDurationMs`;外层插件仍对普通请求强制执行五分钟空闲限制,包括直连与不符合条件的响应。每个迭代器的授权与计时独立,同一 prepared call 的重复调用也不共享。
|
|
35
|
+
|
|
36
|
+
用户取消时保留宿主已经产生的 usage 与 aborted-finish 数据块。取消后仍不结束的读取,最多等待一个事件循环轮次便停止等待。插件自己的期限先到时始终报告 `TIMEOUT`,不会被提供方随后产生的 aborted finish 改写。清理会取消请求、移除自身计时器,并停止等待卡住的内部 return;不能强迫任意第三方回调结束。响应字节和读取需求保持不变,不向模型输出或会话历史注入虚构心跳。
|
|
37
|
+
|
|
38
|
+
## 验证与限制
|
|
39
|
+
|
|
40
|
+
`tests/preflight-*.spec.ts` 在未修改的最旧开发宿主上使用虚构凭据、实际 SDK 解析和虚拟时间,覆盖分片帧、缓慢准备、取消、总预算/空闲期限与响应读取。`tests/native-preflight.spec.ts` 验证严格的原生安装授权契约,包括真实本地 fetch 的精确响应元数据、重定向拒绝与授权替换;适配器测试覆盖已配置原生路由、默认关闭、origin 不匹配、旧授权、有界心跳、取消以及模型输出后的空闲期限恢复。`pnpm run check:dsh-matrix` 对每个精确声明的宿主安装同一个插件包,每个宿主执行六项启用/默认关闭检查,包括第 299 秒到达的响应头之后仍有完整 450 秒预算,以及启用/关闭时的取消结果对照。已安装包检查只替换 HTTP 和代理传输,不调用真实提供方。
|
|
41
|
+
|
|
42
|
+
这些检查不代表真实 bili、HTTPS CONNECT/TLS 拓扑、Windows Desktop 或账户/模型验收。此补丁不处理 issue 中取消后另行发生的 HTTP 413。原生兼容性跟进 #405;独立的 HTTP 413 需要 bili 上游修复及真实场景验收。源码合并和绿色 CI 都不等于发布或真实对话成功。
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Model quota observation
|
|
2
|
+
|
|
3
|
+
`codex_connect_quota` lets a model inspect the shared Codex allowance without issuing a model request. It is disabled by default. This source capability requires a package containing it; older installed releases do not gain it automatically.
|
|
4
|
+
|
|
5
|
+
## Enable explicitly
|
|
6
|
+
|
|
7
|
+
Add the following inside the existing Codex Connect plugin row's `config` in your profile composition, then reload the plugin through the Host:
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
enableQuotaTool: true
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Omit the key or set it to `false` and reload to remove the tool. There is no custom settings-card toggle. Installation does not rewrite existing profiles or install a skill. Normal Host permission and cancellation rules still apply. The tool accepts only `{}`; it cannot select accounts/models or force a refresh.
|
|
14
|
+
|
|
15
|
+
## Read the result
|
|
16
|
+
|
|
17
|
+
An illustrative successful result is:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{"status":"available","updatedAt":1792674000000,"windows":[{"remainingPercent":25,"windowSeconds":18000,"resetAt":1792680000}]}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| Field | Meaning |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `status` | `available`: common windows were observed; `unknown`: no usable observation; `stale`: an observation expired or was invalidated. |
|
|
26
|
+
| `updatedAt` | Local successful-response observation time, Unix **milliseconds**, preserved on cache hits. Omitted when no reliable time is available. This is not the upstream data-generation time. |
|
|
27
|
+
| `windows` | Shared `codex` windows only. Empty for `unknown` and `stale`; an empty list is not zero or unlimited allowance. |
|
|
28
|
+
| `remainingPercent` | Observed percentage remaining, including a real `0` when reported. Not a token count, precise task budget or guarantee that a task can finish. |
|
|
29
|
+
| `windowSeconds` | Server-reported window duration in seconds. |
|
|
30
|
+
| `resetAt` | Optional server-reported reset time, Unix **seconds**. Omitted when unavailable. A reset time does not guarantee restored access. |
|
|
31
|
+
|
|
32
|
+
Separately metered models/features, spend limits, prepaid balances, account identifiers, labels, credentials, raw upstream responses and error details are excluded. Shared quota can coexist with a separate model limit or service restriction, so `available` does not establish model entitlement or sufficient capacity.
|
|
33
|
+
|
|
34
|
+
## Freshness, isolation and failure
|
|
35
|
+
|
|
36
|
+
Each call uses the account captured by existing authentication at call start. A concurrent account switch affects later calls; an in-flight result still describes the captured account. Conversations are not account-bound. Calls expose no account selector or identifier, so do not compare results across account changes as if they were one history.
|
|
37
|
+
|
|
38
|
+
The tool shares the existing bounded cache keyed by account and credential fingerprint, coalesces concurrent reads, and preserves its failure cooldowns. Successful observations are cached for 60 seconds with no background poller. An observation at least 60 seconds old, a window whose supplied reset time has passed, or revoked snapshot authority produces `stale` with no percentages. A failed refresh removes the old usable snapshot and returns `unknown`; it does not relabel old quota as fresh. Legacy Reserve settings cannot enable negotiation or polling.
|
|
39
|
+
|
|
40
|
+
Quota GETs use the existing proxy, bounded response parsing, 15-second request deadline and shared backend governor. Transient errors retain the existing jittered exponential cooldown (starting at 60 seconds, capped at 15 minutes); a longer `Retry-After` takes precedence. Reauthorization and non-retryable client failures require existing cache invalidation or renewed credentials. Repeated calls cannot bypass those cooldowns. Caller cancellation detaches the tool wait without cancelling a shared surviving consumer; plugin disposal cancels shared work.
|
|
41
|
+
|
|
42
|
+
Call at a resource checkpoint requested by the user or required by an already authorized workflow, rather than before every step. On `unknown`/`stale`, do not assume sufficient or exhausted quota or loop to force freshness. If quota actually blocks required work, preserve the user's goal and quality bar, report the blocker and incomplete validation, and leave a resumable checkpoint where appropriate. Do not skip tests, security checks or required work, silently lower quality, switch models/accounts or create schedules because of a percentage. Any such action needs its own authority.
|
|
43
|
+
|
|
44
|
+
An optional [quota-awareness skill example](skills/codex-quota-awareness/SKILL.md) can be copied deliberately into the user's Host-supported skills location or adapted into an authorized automation's instructions. It is documentation, not automatically registered repository guidance. No scheduler, automatic recovery or frozen Adaptive Task activation is included.
|
|
45
|
+
|
|
46
|
+
Verification uses temporary synthetic accounts and mocked upstream responses. It does not establish live-account behavior, Desktop native acceptance or quota accuracy at the service.
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Configuration, diagnostics, and recovery
|
|
2
|
+
|
|
3
|
+
English | [中文](reference.zh.md)
|
|
4
|
+
|
|
5
|
+
For installation and the verified release pairing, start with the [user guide](../README.md). This reference covers account behavior, optional capabilities, configuration, and diagnostic commands.
|
|
6
|
+
|
|
7
|
+
## Accounts, models, and quota
|
|
8
|
+
|
|
9
|
+
OAuth credentials are stored on the DSH host and used there to authenticate and send requests to OpenAI. The Models card and the Plugin configuration page share the same account state; selecting an account is not a per-session binding. **Manage accounts** can add, select, or remove accounts. Browser responses expose only plugin-generated account keys and masked labels, never OAuth tokens or raw OpenAI account ids.
|
|
10
|
+
|
|
11
|
+
Choose an `openai-codex` model in the normal Harness model picker. Model names remain canonical in every UI language. **More settings → Models** controls which models appear in discovery; hiding a model does not disable routing by its exact id.
|
|
12
|
+
|
|
13
|
+
The Codex catalog comes from the installed `@earendil-works/pi-ai` package, not a live query of the account's available models. DSH `0.1.2-rc.1` uses pi-ai `^0.84.2`, which lacks `gpt-6-astra`; Codex Connect supplies that definition. Published Alpha 4.35 is also verified with each exact DSH `0.1.5-alpha.1`, `0.1.5-rc.1`, and `0.1.5-rc.2` pairing using pi-ai `0.85.1`. Mixed host package versions and other DSH/pi-ai combinations remain unverified. With a native Astra entry, the plugin preserves its metadata and retains Low, Medium, High, Xhigh, and Max reasoning choices without modifying the installed catalog. Users do not need to upgrade pi-ai separately to select Astra. The exact verified pairs and acceptance limits are recorded in the release notes; dependency declarations alone do not establish verification. Neither catalog source proves account access.
|
|
14
|
+
|
|
15
|
+
- Adding an account leaves the current account usable while authorization is pending.
|
|
16
|
+
- Cancelling or timing out a new authorization preserves every existing account and closes accepted callback connections, including incomplete HTTP requests. After cancellation, the browser reads account labels and quota together before updating the view. Pending authorization expires after 10 minutes by default; `oauthTimeoutMs` accepts 1,000–1,800,000 milliseconds and is applied when the plugin loads.
|
|
17
|
+
- Switching accounts affects subsequent requests. A request captures its account before resolving authentication, so a concurrent switch cannot mix credentials. If that account becomes unavailable during authentication, the request fails and requires an explicit retry with the selected account.
|
|
18
|
+
- Quota, search, image generation and Auto-review keep that same account through token refresh. Each quota response pairs its usage and account labels from one snapshot; a concurrent switch may leave an older snapshot visible until the next refresh, but does not relabel its quota as another account's.
|
|
19
|
+
- Removing the active account requires selecting a replacement when another account remains. Removing the last account signs out; **Sign out all accounts** deletes all locally stored Codex credentials.
|
|
20
|
+
- Codex Connect does not rotate accounts automatically or fail over when a request is rejected.
|
|
21
|
+
|
|
22
|
+
Credential changes wait up to 20 seconds for the writer lock, allowing an in-progress token refresh to finish. A lock timeout fails the operation without deleting another writer's lock or changing stored accounts. A lock left behind by a crashed process requires operator recovery after confirming that no writer is running.
|
|
23
|
+
|
|
24
|
+
Request authentication failures use fixed messages without upstream response bodies or nested provider errors. A failed refresh preserves the stored credentials.
|
|
25
|
+
|
|
26
|
+
An explicit OAuth `invalid_grant` rejection during refresh shows the reauthorization prompt. Network failures, timeouts and server errors keep the account selected and show a quota error so you can retry; they do not delete credentials or start a new login.
|
|
27
|
+
|
|
28
|
+
For GPT Codex conversations, the Composer shows Fast Mode and quota:
|
|
29
|
+
|
|
30
|
+
**Source change, not yet published:** exact Codex `gpt-6-astra` and `gpt-6.1-sol` conversations have mutually exclusive Standard, Fast and Ultrafast choices. Ultrafast sends `service_tier: 'ultrafast'` after an explicit conversation choice or an explicitly configured startup preference, with unchanged model, reasoning and SSE transport. It starts off when the new preferences are omitted; legacy Fast booleans cannot seed Ultrafast. Every Codex GPT conversation shows the same Composer speed control; models outside those two exact names keep only the Ultrafast entry disabled. Model changes (including away/back), login/logout and account commands invalidate the paid choice; captured requests recheck their actual account, model and live selection before dispatch. Auxiliary compaction/title requests do not inherit Ultrafast. The old boolean Fast endpoint and saved Fast preferences remain supported; a legacy GET returns 409 while Ultrafast is selected rather than misreporting it as Standard.
|
|
31
|
+
|
|
32
|
+
**Source follow-up, not yet published:** the Composer renders this three-way choice as a single compact lightning-bolt button (the legacy Fast Mode button style) opening a Standard/Fast/Ultrafast menu built on the same anchored menu primitive as the Read Only/Workspace Write/Full Access permission toggle, instead of crowding the row with inline segmented buttons. The portaled list opens upward above the bottom Composer row, stays inside the viewport, and follows resizing and scrolling while open. The bolt and its hover title reflect the current mode; a small orange dot stands next to the bolt while Ultrafast is active. The menu marks the active choice without a standing text footer. A separate 32×32 information button beside Ultrafast toggles the full, unchanged quota disclosure above the choices; its explicitly bounded paragraph wraps without widening the approximately 144px card, which grows upward while keeping the bottom row in place. The disclosure remains linked to Ultrafast for screen readers even while visually hidden; the information button works with touch, Enter and Space without selecting a speed, remains available when Ultrafast is disabled, and collapses when the menu closes. Arrow keys include the information button, and Escape, Tab or an outside click closes the menu without selecting. A visually hidden status region announces the speed read and each write outcome. The button itself is disabled only while a read or write is in flight; while the shared account is busy or signed out only the Ultrafast entry is disabled with a short reason, so Fast and Standard remain selectable and account gating matches the previous Ultrafast-only behavior. Speed routes and request behavior are unchanged. The compact menu is the only Composer speed control for Codex GPT models: a model outside `gpt-6-astra` and `gpt-6.1-sol` keeps Standard and Fast selectable and disables only the Ultrafast entry. That entry's blocked reason (the model lacks Ultrafast support, not a missing account) is carried in the in-flow disclosure the information action reveals on touch and that `aria-describedby` links to, as well as in its hover title. No separate one-tap legacy Fast button or pinned disabled native button is rendered next to it.
|
|
33
|
+
|
|
34
|
+
Ultrafast consumes more quota. Official documentation distinguishes eligible Pro500 and Enterprise/Edu accounts from Pro100/200; this plugin does not infer entitlement from a plan name or cached catalog. Account eligibility and the actual served tier remain **unverified**, even after a successful response. A selected button is a request preference, not billing, speed or server acceptance proof. No private eligibility endpoint, additional OAuth permission, paid probe or entitlement cache is added. Generic 403/429/network failures do not establish ineligibility. The selector neither falls back nor replays failed requests; existing provider/Host retry policies continue to apply to the same requested tier. An uncertain control mutation can only be recovered through an explicit read, never an automatic POST replay. See [implementation and acceptance boundaries](agent-notes/ultrafast-conversation-speed.md).
|
|
35
|
+
|
|
36
|
+
- **Fast Mode** requests priority service (`service_tier: 'priority'`) for that conversation only. It is off by default and does not change the model or lower reasoning effort. The new-session and new-subagent Fast Mode defaults also leave effort unchanged. Actual speed and quota consumption depend on the service; a fixed speed multiplier is not guaranteed.
|
|
37
|
+
- The profile's **Fast Mode for new conversations** and **Fast Mode for new subagent conversations** settings are independent and both off by default. Each is applied only when a new session starts; changing either setting does not retroactively alter existing sessions or override a Composer choice. Per-conversation Fast Mode state is process-local, so resuming after a plugin restart returns that conversation to Standard speed; subsequent new sessions still use the saved profile defaults.
|
|
38
|
+
- **Source follow-up, not yet published:** `newSessionSpeedMode` and `newSubagentSpeedMode` independently accept `standard`, `fast` or `ultrafast`. An explicit value overrides the corresponding legacy Fast boolean; omission or `null` uses that preserved legacy preference. More settings offers both selectors and disables the corresponding legacy toggle while an explicit value is active. Each preference is captured only for a new startup session, never a resumed/existing session or a later profile edit. Ultrafast requires signing in before creating the session and applies only to the exact supported Codex models; other initial routes use Standard. It does not infer paid entitlement. A model or account change, including away/back, retires the old startup intent; manual Composer choices win even while an account read is pending. The first admitted Host route or the Composer's existing speed read binds the startup preference without an extra provider request. Missing sign-in on an eligible request fails explicitly and remains an error on retry until a manual/lifecycle change. See [startup default details](agent-notes/new-session-speed-defaults.md).
|
|
39
|
+
- **Quota bars** normally refresh every 60 seconds while signed in and the tab is visible (hidden tabs pause; failures back off) and show only the `5h` and `7d` windows returned by the server, with the exact remaining percentage and reset time. `gpt-5.3-codex-spark` uses its separate Spark bucket. Codex Connect never invents missing windows or suppresses returned windows based on a plan name.
|
|
40
|
+
|
|
41
|
+
<p align="center">
|
|
42
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/composer-capabilities.jpg" alt="Fast Mode and quota controls in the DeepSeek Harness Composer" width="820">
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
## Optional profile reasoning default
|
|
46
|
+
|
|
47
|
+
**Source change, not yet published:** set `reasoningEffort: max` (or another supported effort) on the Codex Connect plugin row, or use **Default reasoning effort** in More settings. This is a fallback only: an explicit Host request's reasoning effort wins. Omission preserves provider behavior, and `null` masks an inherited default. Saving a change affects newly prepared requests; a request already prepared keeps its profile snapshot. Fast/Ultrafast service tier, output limits and the chat model are unchanged.
|
|
48
|
+
|
|
49
|
+
`GET /plugins/dsh-codex-connect/models` now includes each model's actual Host `reasoning.efforts` and optional `reasoning.defaultEffort`, without reading credentials or querying account access. This metadata comes from the installed adapter, including supported additions to the static catalog. An unsupported configured effort does not hide a model: dispatch fails with `UNSUPPORTED_REASONING_EFFORT` before credential resolution or network activity. An explicit supported request effort can override that default. The profile accepts `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`; availability depends on the selected model. The Workflow `agent()` parameter allowlist is Host-owned and is not expanded by this plugin setting.
|
|
50
|
+
|
|
51
|
+
## Reasoning effort for ordinary subagents
|
|
52
|
+
|
|
53
|
+
With DSH `0.2.0-rc.2` or `0.2.1-alpha.1`, ordinary Harness subagents can request an explicit reasoning effort. Enable the Host's subagent model-selection setting, authorize the exact `openai-codex` / `gpt-6.1-sol` route, and start a fresh top-level conversation so it records that policy. The subagent tool must use a backend with `agentOptions` support, such as an in-process Harness backend or DSH SDK, and have `modelSelectionSettings: true`. External Codex, Claude Code and ACP backends do not support this selection interface.
|
|
54
|
+
|
|
55
|
+
Use `list_subagent_models` to inspect the authorized routes and advertised efforts, then pass `provider: "openai-codex"`, `model: "gpt-6.1-sol"`, and `reasoning_effort: "max"` in the ordinary `subagent` tool call, alongside its required task arguments. The allowed-model list contains provider/model pairs; effort is a separate per-call field validated against the selected model. The plugin's `/models` account-card response is not the Host's reasoning discovery interface. This does not enable the frozen Adaptive Task feature or require a plugin-wide effort default.
|
|
56
|
+
|
|
57
|
+
Workflow `agent()` is a separate Host interface: these exact DSH versions accept only `label`, `phase`, `schema`, `provider`, and `model`. They do not accept `reasoningEffort` or `reasoning_effort`; the ordinary subagent setting does not add those Workflow options. Model metadata and local route validation do not prove account entitlement.
|
|
58
|
+
|
|
59
|
+
## Request retry policy
|
|
60
|
+
|
|
61
|
+
The source configuration accepts an optional startup-only `retryPolicy` in the Codex Connect plugin row. This is not a new control in **More settings**. Reload the plugin through the Host after editing its configuration. Omit the key to retain the Host's current normal policy: five retries after the initial attempt, retryable codes `EMPTY_RESPONSE`, `RATE_LIMIT`, `SERVER`, `TIMEOUT`, and `TRANSPORT`, and backoff of 500 ms initially, capped at 10,000 ms, with a 0.1 jitter ratio.
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
retryPolicy:
|
|
65
|
+
mode: normal
|
|
66
|
+
maxRetries: 10
|
|
67
|
+
retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT]
|
|
68
|
+
backoff:
|
|
69
|
+
initialDelayMs: 1000
|
|
70
|
+
maxDelayMs: 20000
|
|
71
|
+
jitterRatio: 0.1
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This uses the installed Host's `RetryPolicySchema` and resolver. In `normal` mode, `maxRetries` is a nonnegative safe integer; zero disables policy retries. Codes must be a nonempty list of distinct nonempty strings. Backoff delays must be positive finite numbers no greater than 2,147,483,647 ms, with `initialDelayMs <= maxDelayMs`, and jitter must be between 0 and 1. Unknown policy/backoff keys and invalid active values fail loading rather than being silently ignored. Remove the key to restore defaults; do not use `null` as a policy.
|
|
75
|
+
|
|
76
|
+
The Host also supports explicit `mode: always` with `backoff`, which retries every model-request failure without a count limit until success, cancellation or disposal; it is never the default. In layered configurations, the Host ignores retained normal-only fields in `always` mode; they do not impose a retry limit. The Host retry plugin executes the registered policy. This setting neither installs/enables that plugin nor changes retries for OAuth, quota, Search, images or Auto-review. It does not bypass caller cancellation, request accounting, preflight deadlines or other Host limits. The policy is captured when the adapter is created; already prepared calls retain their captured policy.
|
|
77
|
+
|
|
78
|
+
More retries can produce more billable attempts and consume additional quota. A backoff schedule is not a total request deadline or a guaranteed outage-recovery window: request durations, provider delays, jitter, cancellation and other limits still apply. This source change is not included retroactively in the immutable Alpha 7 npm package, and synthetic checks do not establish live proxy/account recovery.
|
|
79
|
+
|
|
80
|
+
## Optional capabilities
|
|
81
|
+
|
|
82
|
+
Fresh installations register the model provider and leave every additional capability disabled:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
- id: llm-openai-codex
|
|
86
|
+
config:
|
|
87
|
+
enableSearch: false
|
|
88
|
+
enableReserveFallback: false
|
|
89
|
+
enableImageTool: false
|
|
90
|
+
enableImageGeneration: false
|
|
91
|
+
enableAutoReview: false
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Edit these options under **Settings → Plugins → Plugin configuration → Codex Connect** or **Settings → Models → Openai-Codex → More settings**. Changes are staged until **Save changes**. Saving commits edited fields together and preserves concurrent changes to untouched fields. A conflicting edit or failed save keeps your draft; discard it to reload the latest settings. Most settings affect only this plugin; enabling Codex Search also selects it as the active profile-wide search route.
|
|
95
|
+
|
|
96
|
+
### Proxy
|
|
97
|
+
|
|
98
|
+
**Removed.** This fork removes the standalone HTTP(S) proxy subsystem and uses the host network environment directly.
|
|
99
|
+
|
|
100
|
+
### Luna Reserve fallback
|
|
101
|
+
|
|
102
|
+
**Removed.** `enableReserveFallback` remains only as an inert compatibility field for old configurations. Valid legacy booleans are accepted but always resolve to `false`. They create no routing, dispatch permits, negotiation header, JWT entitlement parsing or background refresh. The settings UI no longer offers this switch.
|
|
103
|
+
|
|
104
|
+
Old `gpt-reserve` requests report that the feature has been removed before account resolution or network dispatch. Explicitly choose an ordinary model through the Host model picker to continue. If the Host cannot switch that conversation, preserve it and start a new conversation with the model you choose. The plugin never guesses a target, inherits old authority or changes accounts. Old private return files are not read, migrated or deleted.
|
|
105
|
+
|
|
106
|
+
The shared quota service, account UI and read-only quota tool retain account/credential-fingerprint-bound 60-second caching, coalesced GETs, independent caller cancellation, exponential failure cooldown/Retry-After, configuration invalidation and disposal cleanup. There is no background poller. Quota observations do not authorize model/account changes.
|
|
107
|
+
|
|
108
|
+
### Search and image tools
|
|
109
|
+
|
|
110
|
+
- `enableSearch: true` registers Codex as an available search provider and selects it for profile-wide searches. Disabling it unregisters the provider and restores the underlying Host route. A newer Host route selection is preserved; on the rc.2 source candidate, live Host selections take precedence without restarting the service.
|
|
111
|
+
- Search has a 30-second total deadline covering authentication, response headers and body reading. Responses larger than 1 MiB are rejected, and unfinished response bodies are cancelled on failure. Caller cancellation can end a search sooner.
|
|
112
|
+
- `enableImageTool: true` registers `view_image` on vision-capable models. Remote reads accept credential-free public HTTP(S) only and revalidate DNS and redirects.
|
|
113
|
+
- `enableImageGeneration: true` registers GPT Image generation and, in Alpha 4.48 builds, editing of explicitly selected session images. Prompt-only generation remains supported. Availability, dimensions, and quota remain account- and service-controlled.
|
|
114
|
+
- `imageModelHint` is an optional profile-scoped setting in Plugin configuration or the profile config. Empty sends `gpt-image-2` to match official Codex; empirical testing shows the Codex subscription endpoint routes requests to `GPT-Image-2.6 Sunburst` regardless of the client `model` field (for example, passing `gpt-image-2.6-flare` does not switch the backend model). To test overriding the request `model` field, enter a custom model slug (1–128 ASCII letters, digits, dots, underscores, or hyphens, starting with a letter or digit); clearing restores the default.
|
|
115
|
+
|
|
116
|
+
Generated originals are stored under `$DSH_HOME/dsh-codex-connect/images/v1`; the conversation receives a separate DSH attachment preview. The result card reports dimensions and file sizes and can download either representation. Originals are owner-only, integrity-checked, and available only to the creating session and forks that inherited the result. Disabling or uninstalling the plugin does not delete those files automatically.
|
|
117
|
+
|
|
118
|
+
**Development change, not yet released:** keep your current chat model, including DeepSeek, when using the enabled image tool. If the original is saved but its conversation preview cannot be saved, the result reports that condition and keeps **Download original** and **Modify this image** available. Continue from that stored result; regenerating is not required to retrieve it. Originals still require host image validation and session ownership. Cancellation and failed original persistence do not return a recoverable result. Existing installed releases keep their previous behavior.
|
|
119
|
+
|
|
120
|
+
<p align="center">
|
|
121
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/en/image-generation.png" alt="GPT Image result with prompt, download actions, and image details" width="780">
|
|
122
|
+
</p>
|
|
123
|
+
|
|
124
|
+
#### Image editing in Alpha 4.49
|
|
125
|
+
|
|
126
|
+
**Post-release review:** published Alpha 4.48 has two confirmed defects: a re-uploaded preview can select a historical original, and safe edit failure details are hidden. The fixes below apply to Alpha 4.49; the published 4.48 package is not changed or republished.
|
|
127
|
+
|
|
128
|
+
In Alpha 4.49, a complete `attachment` selector matched to an actual user upload selects that copy's bytes, even when its ID, filename and dimensions match a generated preview. A bare `attachmentId` shared by uploads and generated results fails with an ambiguity message; `assetId` continues to select the exact stored original. Re-uploaded copies remain usable after the historical original is deleted. The model receives the complete bounded reference next to each image; no user lookup of opaque IDs is required. Failed input selections display only fixed, allowlisted reasons and recovery guidance and do not offer an unchanged retry. Unrecognized service errors stay hidden behind a generic explanation.
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
With the existing image capability enabled, attach a target and optional references and describe their roles, for example: “Edit the first image; use only the colors of the second image and keep the subject.” You can also choose **Edit based on this image** on a previous result. The form waits for your instructions before submitting.
|
|
132
|
+
|
|
133
|
+
The tool `codex_connect_image_generate` accepts `{"operation":"edit","prompt":"change the background","target":{"attachmentId":"<exact session attachment ID>"},"references":[]}`. Each optional reference is `{"image":{"attachmentId":"<exact ID>"},"purpose":"colors only"}`. Stored original results can instead use `{"assetId":"<exact original ID>"}`. These placeholders are illustrative, not usable IDs or permission grants. Normal conversation users do not need to look up IDs: the model receives stable image handles.
|
|
134
|
+
|
|
135
|
+
Every edit preserves the old image and stores a new original, preview and source relation. Continue from the new result or select an older result to branch. Missing, inaccessible or ambiguous inputs fail without quietly dropping references or generating a replacement. Preview-only history requires an explicit lower-resolution choice. Editing sends only the selected images to the image service; the existing capability remains disabled by default.
|
|
136
|
+
|
|
137
|
+
The plugin accepts PNG, JPEG and WebP, with at most five inputs and stricter host limits where applicable. These are defensive limits, not a promise of backend entitlement. Output dimensions and preservation quality are service-controlled. Lost or uncertain requests are not automatically repeated; retrying can consume additional quota. See [the detailed contract and acceptance limits](experiments/issue-270-image-edit.md).
|
|
138
|
+
|
|
139
|
+
### Auto-review
|
|
140
|
+
|
|
141
|
+
`enableAutoReview: true` lets the Codex reviewer assess eligible Harness approval requests after DSH policy has determined that approval is required. First enablement requires confirmation because bounded recent approval context, tool arguments, working directory, and the planned action are sent to `chatgpt.com`. Hidden reasoning and stored credentials are excluded. Only a complete structured allow result authorizes one execution; ambiguity, malformed output, transport failure, and timeout return to human approval. See [Auto-review](auto-review.md) for the full decision and retry rules.
|
|
142
|
+
|
|
143
|
+
## Routing and configuration
|
|
144
|
+
|
|
145
|
+
Installing Codex Connect does not select a default model or search provider. Enabling Codex Search selects it while the capability remains enabled; select a default model separately only when intended. The equivalent configuration is:
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
- id: agent-default-model
|
|
149
|
+
config:
|
|
150
|
+
provider: openai-codex
|
|
151
|
+
model: gpt-5.6-sol
|
|
152
|
+
|
|
153
|
+
- id: llm-openai-codex
|
|
154
|
+
config:
|
|
155
|
+
enableSearch: true
|
|
156
|
+
searchMode: live
|
|
157
|
+
searchContextSize: medium
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The main plugin options are:
|
|
162
|
+
|
|
163
|
+
| Field | Default | Meaning |
|
|
164
|
+
|---|---:|---|
|
|
165
|
+
| `models` | full catalog | Visible Codex model ids; an empty array hides all entries |
|
|
166
|
+
| `contextWindowOverrides` | none | Per-model client context-budget overrides |
|
|
167
|
+
| `enableSearch` | `false` | Register Codex search and select it when the setting is saved |
|
|
168
|
+
| `enableReserveFallback` | `false` | Deprecated compatibility field; accepted but ignored after Reserve retirement |
|
|
169
|
+
| `enableImageTool` | `false` | Register `view_image` |
|
|
170
|
+
| `enableImageGeneration` | `false` | Register GPT Image generation and explicit editing in Alpha 4.48 |
|
|
171
|
+
| `imageModelHint` | empty | Optional unverified image route hint; empty keeps the default request |
|
|
172
|
+
| `enableAutoReview` | `false` | Review eligible approval requests with Codex |
|
|
173
|
+
| `searchModel` | `gpt-5.6-sol` | Model used by standalone search |
|
|
174
|
+
| `searchMode` | `cached` | `cached`, `indexed`, or `live` |
|
|
175
|
+
| `searchContextSize` | `medium` | `low`, `medium`, or `high` |
|
|
176
|
+
| `searchMaxOutputTokens` | `10000` | Positive integer output budget for search |
|
|
177
|
+
| `requestMetricsDirectory` | absent / off | Startup-only private absolute directory for [local request evidence](request-metrics.md); no telemetry upload |
|
|
178
|
+
| `enableQuotaTool` | `false` | Startup-only read-only `codex_connect_quota` tool; reload after editing profile configuration. See [quota observation](quota-tool.md). |
|
|
179
|
+
| `requestMetricsMaxBytes` | `16777216` | Startup-only per-process journal cap, integer `4096`–`67108864`; no directory means no collection |
|
|
180
|
+
|
|
181
|
+
Sol61 (`gpt-6.1-sol`) uses a 500,000-token base default for its missing entry or known stale bundled-static metadata. Explicit provider metadata and then user overrides take precedence; a reset returns to the effective base default. Its 872,000 local override ceiling and output limit are unchanged. This follows the [official Work/Codex product default](https://help.openai.com/en/articles/20001275-chatgpt-work-and-codex), not an endpoint capacity measurement. See the [source-calibration boundary](agent-notes/sol61-context-default.md). Host compression policy is unchanged, although its calculated budgets can reflect the larger context input.
|
|
182
|
+
|
|
183
|
+
`contextWindowOverrides` changes the client budget, not OpenAI's server capacity. Unknown model ids and values above the plugin's documented configuration ceiling fail explicitly. Use `null` for the whole field to mask inherited overrides, or `null` for one model to restore its catalog default while preserving other entries. Leave room for output and protocol overhead, and treat larger values as deployment-specific experiments rather than entitlement evidence. [Alpha design](design.md) documents the ownership and persistence rules.
|
|
184
|
+
|
|
185
|
+
## Diagnostics and recovery
|
|
186
|
+
|
|
187
|
+
### Local installation diagnostics
|
|
188
|
+
|
|
189
|
+
Published Alpha 4.33 can fail to list or prepare Codex models on DSH `0.1.5-rc.1` with `Cannot read properties of undefined (reading 'get')`. That host requires a per-model error index absent from the older plugin profile. Builds containing [the Issue #178 fix](https://github.com/franksong2702/dsh-codex-connect/issues/178) initialize the index; re-authorizing does not supply it. Choose an exact plugin release verified with your host version, not merely one with the same Alpha series.
|
|
190
|
+
|
|
191
|
+
Use the [direct installed-bin recipe](runtime-identity.md#direct-standalone-doctor) for package-manager-free `doctor --json`; `dsh plugin exec` itself may reconcile dependencies. Doctor reads local metadata without network access, not another process's live identity. Compatibility statuses mean: `compatible` matches the declared version requirements, not a behavioral test; `unverified` identifies undeclared/mixed versions, including peers disagreeing with an explicit DSH anchor; `unknown` means required version metadata is missing or unreadable; `incompatible` identifies a Node version outside the declared engine requirement. The aggregate prioritizes `incompatible`, then `unknown`, then `unverified`. Doctor exits `1` for non-compatible results, unsafe credential-file metadata, or unknown/mismatched plugin identity; missing credentials alone is not a failure. This does not authorize or recommend changing DSH.
|
|
192
|
+
|
|
193
|
+
For DSH `0.1.7-rc.1`, `plugin exec` starts a separate process without exposing the host's peer packages to ordinary module resolution. Alpha 4.43's CLI is self-contained, so all commands can start in that process. To make `doctor` assess the exact host package versions, pass `--install-anchor` with the absolute path to that DSH installation's `@deepseek-ai/dsh/package.json`; the flag reads package metadata only and does not print the path. Without an anchor, `doctor` reports `unknown` if it cannot resolve those versions; that is not evidence of runtime incompatibility. The installed-runtime checker independently starts DSH's own profile resolver before importing the plugin, preserving host package identity.
|
|
194
|
+
|
|
195
|
+
The normal update card checks only Codex Connect releases. It reuses successful plugin-version checks for up to 24 hours and retries unavailable checks every five minutes while mounted; a manual check bypasses the cache. It neither queries host compatibility nor recommends host upgrades or downgrades. An unlisted DSH/plugin combination requires verification, not an assumption of failure.
|
|
196
|
+
|
|
197
|
+
### Capability probes
|
|
198
|
+
|
|
199
|
+
The local capability report performs no network request. With valid local credentials and a supported invocation, `capabilities --probe` sends one fixed short request and may consume quota. `auto-review-probe` checks the OAuth reviewer route and its structured response only; it does not exercise the full Harness approval integration or execute the reviewed action. It may also send a request and consume quota when its preconditions are met:
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
dsh plugin --profile web exec dsh-codex-connect capabilities --model gpt-5.6-sol --json
|
|
203
|
+
dsh plugin --profile web exec dsh-codex-connect capabilities --model gpt-5.6-sol --probe --json
|
|
204
|
+
dsh plugin --profile web exec dsh-codex-connect auto-review-probe --json
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Probes use a direct connection unless `--proxy <http(s)-origin>` is supplied. `--timeout-ms <1..60000>` overrides the 30-second deadline. They do not follow redirects or retry, cap responses at 64 KiB, and do not refresh credentials. Results label each check `supported`, `rejected`, or `unknown`; a catalog entry alone never proves entitlement. Exit `0` means the command's required checks were supported, `1` means at least one was rejected, and `2` means evidence was unknown or the invocation was invalid. Reports omit credentials, account ids, paths, proxy origins, response ids, headers, and generated text.
|
|
208
|
+
|
|
209
|
+
### Remote browser authorization
|
|
210
|
+
|
|
211
|
+
OAuth routes accept loopback browsers by default. If DSH runs on another device in a trusted network, add the exact origin from the browser address bar on the DSH host:
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
dsh plugin --profile web exec dsh-codex-connect trust-origin http://192.168.1.20:3080
|
|
215
|
+
dsh plugin --profile web exec dsh-codex-connect trusted-origins
|
|
216
|
+
dsh plugin --profile web exec dsh-codex-connect untrust-origin http://192.168.1.20:3080
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Include the scheme and port, never a path, query, or fragment. Do not expose the OAuth route to the public Internet; use an SSH tunnel when the network is not trusted. The Web client displays these commands but never edits the allowlist.
|
|
220
|
+
|
|
221
|
+
The origin allowlist controls access to DSH; it does not forward OpenAI's localhost callback from your browser device to the DSH host. To finish a pending login without forwarding port 1455:
|
|
222
|
+
|
|
223
|
+
1. Start **Authorize** (or **Add account**) in the Models or plugin account settings and complete approval in the opened browser tab.
|
|
224
|
+
2. When redirected to `http://localhost:1455/auth/callback`, the remote browser may show a connection error. Copy the **complete URL from its address bar**, including the query string. Do not copy the initial authorization link or only the code.
|
|
225
|
+
3. Return to the same DSH account view, expand the optional manual callback form, paste the URL into its callback URL field, and submit it. The form is collapsed by default; normal automatic callback login is unchanged.
|
|
226
|
+
4. Wait for the account status to update. An invalid URL does not cancel the pending login; paste the correct current callback and retry. If authorization expired or was cancelled, start again and use the new flow's callback. After reloading the DSH page, use **Continue authorization** to rejoin a still-pending login.
|
|
227
|
+
|
|
228
|
+
The callback must match the pending flow's redirect URI and OAuth state; code-only input, missing or mismatched state, duplicate parameters, and reused callbacks are rejected. Submission uses the existing same-origin/trusted-origin checks and a bounded JSON POST. The pasted URL is not fetched, logged, or persisted by the plugin, and the input is cleared on submission. Tokens remain on the DSH host. Only paste into this dedicated field: the URL contains a short-lived credential and must not be shared in chat, issues, logs, or configuration. Use an SSH tunnel for untrusted networks; manual callback entry does not make an unauthenticated public DSH deployment safe or relax its origin policy.
|
|
229
|
+
|
|
230
|
+
### Migration and conflicts
|
|
231
|
+
|
|
232
|
+
If startup reports an `openai-codex` collision, inspect the effective configuration and remove only the confirmed legacy `dsh-codex` bundle or manual provider row. Do not delete credentials or unrelated providers. See [MIGRATION.md](../MIGRATION.md) for package migration and repair of Alpha 4.10 search histories.
|
|
233
|
+
|
|
234
|
+
OAuth is stored separately at `$DSH_HOME/.openai-codex-auth.json` (`~/.dsh` by default); `~/.codex/auth.json` is never copied or modified. Removing the package does not remove OAuth state. Run `logout` only when deleting credentials is intentional.
|
|
235
|
+
|
|
236
|
+
### Saved Task recovery on DSH alpha.3 (unreleased)
|
|
237
|
+
|
|
238
|
+
Exact `0.2.2-alpha.3` retains saved state inspection, authenticated Stop/manual takeover and existing strictly checked delegation-disable/archive exits. It rejects automatic routing, resume and evidence-child creation, including direct internal entry points. A stale client cannot reopen them. The public gate already rejects start/resume/upgrade/delegation grants on every Host; the prior fourteen Hosts keep their behavior.
|
|
239
|
+
|
|
240
|
+
Owner/session binding, spent counters, receipts and ledger data remain intact. Recovery never respawns a child or sends a model request. Manual takeover permits ordinary work under the explicitly selected model without refunding reservations. Cleanup requires actual Host ownership/liveness proof; live children, missing/corrupt state or unconfirmed delivery remain blocked. Cancellation signals and function return values are not delivery/archive proof. No old files are deleted, no account/model is guessed, and no runtime setting reopens automation.
|