mirror of
https://github.com/stablyai/orca.git
synced 2026-11-04 11:07:42 +00:00
* fix(memory): bound session and lifecycle registries * fix(memory): bound transient filesystem registries * fix(memory): cap path and locale caches * fix(memory): bound runtime recovery registries * fix(memory): bound host mirror gap verdicts * fix(memory): bound shell startup env cache * fix(memory): bound gitlab host context cache * fix(memory): release removed ssh generations * fix(memory): expire cloud refresh replay guards * fix(memory): release retired plugin generations * fix(memory): bound plugin log key retention * fix(memory): bound automation authority generations * fix(memory): bound native chat enrichment cache * fix(memory): bound web session tracking generations * fix(memory): bound codex credential absence paths * fix(memory): bound WSL canonical path cache * fix(memory): bound sparse checkout cache * fix(memory): bound shared directory cache * fix(memory): bound advertised URL scan snapshots * fix(memory): bound automation manager cache * fix(memory): bound web session reorder intents * fix(memory): bound web session focus intents * fix(memory): bound web session handoffs * fix(memory): bound automation dispatch tokens * fix(memory): bound host mirror waiters * fix(memory): bound retained session activity * fix(memory): bound retained session activity * fix(memory): bound web session close intents * fix(memory): bound cloud session cache * fix(memory): bound WSL home cache * fix(memory): bound SSH capability cache * fix(memory): bound trust grant cooldowns * fix(memory): bound WSL auth drain state * fix(memory): bound Linear workspace credential cache * fix(memory): bound local Git capability cache * fix(memory): bound WSL Git environment cache * fix(memory): bound WSL Git environment cache * fix(memory): bound WSL preflight cache * fix(memory): keep hot cache entries warm * fix(memory): preserve generation fences across eviction * fix(memory): close remaining eviction fences * fix(memory): align evicted upstream generations * fix(memory): trim successful capability probes * fix(auth): retain expired refresh replay evidence --------- Co-authored-by: m4air <m4air@Mac.localdomain>
32 lines
1.4 KiB
TypeScript
32 lines
1.4 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
|
|
|
|
/** Execution host that runs the codex binary. WSL distros are isolated from
|
|
* the native host and from each other — each can carry a different codex. */
|
|
export type CodexAppServerHostKey = 'native' | `wsl:${string}`
|
|
|
|
export function getCodexAppServerHostKey(
|
|
host: { kind: 'native' } | { kind: 'wsl'; distro: string }
|
|
): CodexAppServerHostKey {
|
|
return host.kind === 'wsl' ? `wsl:${host.distro}` : 'native'
|
|
}
|
|
|
|
/**
|
|
* 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()
|