mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 17:17:38 +00:00
* refactor(codex): remove trust-grant code the ~/.codex reconcile left unused * refactor(codex): remove the native trust-grant host only tests reached Only WSL runs a grant session, so resolveNativeCodexTrustGrantHost, its timeout, the native host arm and buildNativeCodexBinaryStamp go. The ledger still parses a native stamp, so files an older build wrote keep loading. The grant suites now run on a WSL host with the guest probe stubbed. * docs(codex): name the live caller in the envToDelete comment * refactor(codex): the trust-grant host key and telemetry lane name the one host left Only WSL reaches the grant, always on the managed lane; the telemetry event keeps its shape. * refactor(codex): remove the unwired real-home lane gate * docs(codex): the trust-grant telemetry comment names the one surface that still grants
29 lines
1.3 KiB
TypeScript
29 lines
1.3 KiB
TypeScript
import { CapabilityProbeCache } from '../../shared/capability-probe-cache'
|
|
|
|
// Why: suppress a known-missing RPC surface without pinning it forever — an
|
|
// in-place codex upgrade during a long Orca session self-heals after the
|
|
// interval, mirroring GitCapabilityCache's rationale.
|
|
export const CODEX_APP_SERVER_CAPABILITY_RETRY_INTERVAL_MS = 30 * 60_000
|
|
export const CODEX_APP_SERVER_CAPABILITY_MAX_ENTRIES = 256
|
|
|
|
/** The WSL distro that runs the codex binary; each can carry a different codex. */
|
|
export type CodexAppServerHostKey = `wsl:${string}`
|
|
|
|
export function getCodexAppServerHostKey(host: { distro: string }): CodexAppServerHostKey {
|
|
return `wsl:${host.distro}`
|
|
}
|
|
|
|
/**
|
|
* Capability cache for the codex app-server trust-grant RPC pair. The grant
|
|
* client runs off the main thread's critical path, so two pane launches can
|
|
* probe the same host at once; the shared probe dedupe is what keeps a cold
|
|
* host to one app-server session instead of one per concurrent launch.
|
|
*/
|
|
export class CodexAppServerCapabilityCache extends CapabilityProbeCache<CodexAppServerHostKey> {
|
|
constructor() {
|
|
super(CODEX_APP_SERVER_CAPABILITY_RETRY_INTERVAL_MS, CODEX_APP_SERVER_CAPABILITY_MAX_ENTRIES)
|
|
}
|
|
}
|
|
|
|
export const codexAppServerCapabilityCache = new CodexAppServerCapabilityCache()
|