mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 09:02:11 +03:00
* Bypass proxy compaction for native Codex context
* Add native ChatGPT Web provider pipeline
* Add managed browser and tunnel deployment
* Add ChatGPT Web setup and doctor UI
* Document and test ChatGPT Web integration
* fix(security): register chatgpt-web-codex-doctor in LOCAL_ONLY_API_PATTERNS
The diagnostic route under /api/providers/{id}/chatgpt-web-codex-doctor
was not registered in the spawn-capable route guard. Adding it for
parity with the existing /login pattern.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
* fix(providers): route chatgpt-web-codex admin routes through a service boundary
The provider CRUD/doctor routes imported chatgpt-web-codex helpers
(finalizeValidatedChatGptWebCodexSecrets, encode/decodeChatGptWebCodexSecrets,
getChatGptWebCodexDoctorStatus) directly from open-sse/executors/**, which
no-restricted-imports (EXECUTOR_IMPORT_RESTRICTION) forbids for src/app/**
files — executor implementations must stay behind an open-sse handler or
service boundary.
Add open-sse/services/chatgptWebCodexAdmin.ts as a thin re-export boundary
(mirroring the existing tokenRefresh.ts re-export pattern) and import from
there instead. No behavior change.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
---------
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
22 lines
889 B
TypeScript
22 lines
889 B
TypeScript
/* Adapted from miuuyy/codex-chatgpt-web commit 55592fca0ba19a27f1b769cec8fff61ff340a785 (MIT). */
|
|
/**
|
|
* Bridge upstream stall budget: seconds of silence (no adapter events) before the
|
|
* Responses bridge emits `response.incomplete` / `upstream_stall_timeout`.
|
|
*
|
|
* Raised from 90s so long reasoning + large tool writes are not cut mid-turn.
|
|
* Hung streams still die; they just get a more realistic window.
|
|
*/
|
|
export const DEFAULT_STALL_TIMEOUT_SEC = 300;
|
|
|
|
/**
|
|
* Resolve the effective bridge stall deadline for a turn.
|
|
* - unset / non-finite config → {@link DEFAULT_STALL_TIMEOUT_SEC}
|
|
* - finite config → ceil, minimum 1
|
|
*/
|
|
export function resolveStallTimeoutSec(configuredSec: number | undefined): number {
|
|
if (typeof configuredSec === "number" && Number.isFinite(configuredSec)) {
|
|
return Math.max(1, Math.ceil(configuredSec));
|
|
}
|
|
return DEFAULT_STALL_TIMEOUT_SEC;
|
|
}
|