@karlorz/codexhost-cli-linux-x64 0.22.0-0 → 0.22.0-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.
@@ -1 +1 @@
1
- "use strict";(()=>{var Dt="__codexhostCpaLiveVoiceHookV1",Ft=["chat","work-codex","work-grok"];var Ht="/Applications/ChatGPT.app",Lt=/(?:^|[\\/])WindowsApps[\\/]OpenAI\.(?:Codex|ChatGPT)_/i;function te(e){return typeof e!="string"||e.length===0?!1:e===Ht?!0:Lt.test(e)}function pe(e){return typeof e=="object"&&e!==null}function M(e){let t=e[Dt];return!pe(t)||t.enabled!==!0||typeof t.auditedDesktopVersion!="string"||typeof t.auditedAppInitialAsset!="string"?null:{enabled:!0,auditedDesktopVersion:t.auditedDesktopVersion,auditedAppInitialAsset:t.auditedAppInitialAsset,...typeof t.desktopPlatform=="string"?{desktopPlatform:t.desktopPlatform}:{},...typeof t.desktopVersion=="string"?{desktopVersion:t.desktopVersion}:{},...typeof t.desktopBuild=="string"?{desktopBuild:t.desktopBuild}:{},...typeof t.asarDigest=="string"?{asarDigest:t.asarDigest}:{},...typeof t.implementationRevision=="string"?{implementationRevision:t.implementationRevision}:{},...typeof t.desktopAppPath=="string"?{desktopAppPath:t.desktopAppPath}:{},...Array.isArray(t.voiceEvidence)?{voiceEvidence:t.voiceEvidence}:{},...fe(t.isolatedQualification)?{isolatedQualification:t.isolatedQualification}:{}}}function ue(e){return e==="chat"||e==="work-codex"||e==="work-grok"}function Nt(e){return e==="darwin"||e==="win32"||e==="linux"}function jt(e){if(typeof e!="string"||e.length===0)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function Oe(e){if(!pe(e))return;let t=e.paths!==void 0,o=e.path!==void 0,n;if(t){if(!Array.isArray(e.paths)||e.paths.length===0||e.paths.some(i=>!ue(i))||new Set(e.paths).size!==e.paths.length||(n=Ft.filter(i=>e.paths.includes(i)),n.length!==e.paths.length))return}else if(o){if(!ue(e.path))return;n=[e.path]}else return;if(!(o&&(!ue(e.path)||!n.includes(e.path))))return n}function Te(e){return Oe(e)??[]}function fe(e,t=Date.now()){if(!pe(e))return!1;let o=Oe(e);if(!o||o.length===0||typeof e.appPath=="string"&&te(e.appPath))return!1;let n=jt(e.expiresAt);return n===void 0||n<=t?!1:typeof e.run=="string"&&e.run.length>0&&Nt(e.desktopPlatform)&&typeof e.desktopVersion=="string"&&typeof e.desktopBuild=="string"&&typeof e.asarDigest=="string"&&typeof e.appPath=="string"&&typeof e.implementationRevision=="string"&&e.label==="unqualified-isolated"}function Mt(e){let t=e??(typeof performance>"u"?void 0:performance);if(!t)return[];let o=[],n=i=>{typeof i=="string"&&i&&o.push(i)};if(typeof t.getEntries=="function")for(let i of t.getEntries())n(i.name);else if(typeof t.getEntriesByType=="function")for(let i of t.getEntriesByType("resource"))n(i.name);return o}function De(e,t){let o=Mt(t);if(!e||!("querySelectorAll"in e))return o;for(let n of e.querySelectorAll('script[src], link[href], link[rel="modulepreload"], link[rel="preload"]')){let i=n.getAttribute("src")??n.getAttribute("href");i&&o.push(i)}return o}var Bt="codexhost.voice-routes-cache.v1",Wt="codexhost.cpa-live-voice.v1",Fe="codexhost.chat-live-voice.v1",qt=globalThis;function Gt(){return qt.__codexhostVoicePreferenceStateV1??={sharedRoutes:new WeakMap,gatewayReady:new WeakMap}}function zt(e){if(e===null||typeof e!="object")return;let t=e;if(!(t.chatExperience!=="chatgpt"&&t.chatExperience!=="codex"||t.chatConnection!=="desktop"&&t.chatConnection!=="gateway"||t.workConnection!=="desktop"&&t.workConnection!=="gateway"))return{chatExperience:t.chatExperience,chatConnection:t.chatConnection,workConnection:t.workConnection}}function me(e){let{sharedRoutes:t}=Gt(),o=t.get(e);if(o)return o;try{let n=e.localStorage,i=zt(JSON.parse(n?.getItem(Bt)??"null"));return i&&t.set(e,i),i}catch{return}}function he(e,t,o){let n=e.localStorage;if(!n)return o;try{let i=n.getItem(t);return o?i!=="0":i==="1"}catch{return o}}function He(e){let t=me(e);return t?t.chatExperience==="chatgpt":!he(e,Fe,!1)}function Yt(e){let t=me(e);return t?t.workConnection==="gateway":he(e,Wt,!0)}function Kt(e){let t=me(e);return t?t.chatExperience==="codex"&&t.chatConnection==="gateway":he(e,Fe,!1)}function ge(e){return Yt(e)}function Le(e){return Kt(e)}var Ne="codexhost/realtime/call",Qt=["openai-alpha","thread-id","session-id","originator","x-codex-turn-metadata"],Ut=new Set(Qt);function je(e){let t={};for(let[o,n]of Object.entries(e??{})){let i=o.toLowerCase();Ut.has(i)&&n.length>0&&n.length<=4096&&(t[i]=n)}return t}var Jt=/^[A-Za-z0-9_-]{1,128}$/u;function Me(e){return typeof e=="string"&&Jt.test(e)}function Be(e){let t=e.split(/[?#]/u)[0]??"";return/^[A-Za-z0-9_-]{1,128}$/u.test(t)?t:/\/(?:calls|live)\/([A-Za-z0-9_-]{1,128})$/u.exec(t)?.[1]}var ye="__codexhostChatVoiceDebug",Xt="codexhost.chat-voice-debug.v1";function F(e,t={}){let o={t:Date.now(),event:e,...t},n=globalThis,i=Array.isArray(n[ye])?n[ye]:[];for(i.push(o);i.length>40;)i.shift();n[ye]=i;try{n.localStorage?.setItem(Xt,JSON.stringify(i))}catch{}n.console?.info?.("[codexhost-chat-voice]",e,t)}function $t(e){return e!==null&&typeof e=="object"}var Zt="Host request timed out",eo="Local Host connection is unavailable",to="__codexhostVoiceHostV1";function oo(e=globalThis){let t=Reflect.get(e,to);if(!t||typeof t!="object")return null;let o=Reflect.get(t,"request");return typeof o=="function"?{request:o.bind(t)}:null}function no(e){return e==="config"||e==="request"||e==="transport"||e==="identity"||e==="cancel"?e:"rpc"}function be(e,t,o=Ne){let n=oo();return n?n.request(o,t).then(i=>i,i=>{let r=i instanceof Error?i.message:"";if(r===Zt||/timed out/i.test(r))throw F("gateway-create",{stage:"rpc",cause:"timeout"}),new Error("Voice gateway did not answer in time");if(r===eo)throw F("gateway-create",{stage:"rpc",cause:"host-unavailable"}),new Error("Voice gateway Host connection is unavailable");let a=i instanceof Error&&"stage"in i?no(i.stage):"rpc";throw F("gateway-create",{stage:a,cause:"failed"}),new Error("Configured voice gateway request failed")}):(F("gateway-create",{stage:"rpc",cause:"host-unavailable"}),Promise.reject(new Error("Voice gateway Host connection is unavailable")))}function io(e){if(e===null||typeof e!="object")throw new Error("Invalid voice gateway response");let t=e;if(typeof t.status!="number"||!Number.isInteger(t.status)||t.status<200||t.status>599||typeof t.body!="string"||t.headers===null||typeof t.headers!="object"||Array.isArray(t.headers))throw new Error("Invalid voice gateway response");let o={};for(let[n,i]of Object.entries(t.headers))typeof i=="string"&&(o[n]=i);return{status:t.status,body:t.body,headers:o}}function ro(e){let t=new Headers(e).get("x-codex-turn-metadata");if(!t)return"";try{let o=JSON.parse(t);return typeof o.backend_model_name=="string"?o.backend_model_name:""}catch{return""}}function ao(e){let t=e.toLowerCase();return t?t.startsWith("codexhost/")?!0:t.includes("codex")&&!t.includes("gpt-live"):!1}var oe,we="codexhost.voice-launch-experience.v1";function We(e){return e.localStorage}function so(e){try{let t=We(e)?.getItem(we);return t==="chat"||t==="work"||t==="codex"?t:void 0}catch{return}}function ne(e,t=globalThis){let o=$t(e)?e.productExperience:void 0;oe=o==="chat"||o==="work"||o==="codex"?o:void 0;try{let n=We(t);if(!n)return;oe?n.setItem(we,oe):n.removeItem(we)}catch{}}function co(e=globalThis){return oe??so(e)}function qe(e,t,o,n,i=()=>!1,r=()=>!1,a=()=>!1,c=()=>!1,d=()=>!0,l=()=>!0,u=p=>p==="chat"?"Chat voice is not qualified on this Desktop.":"Work voice is not qualified on this Desktop.",m=()=>!0,s=()=>!0,y=()=>!0){let p=e.fetch,f=async function(b,g){if(typeof b!="string"||b.split("?")[0]!=="/wham/realtime/calls"||g?.method!=="POST")return p.call(this,b,g);let x=co(),R=ro(g.headers),E=new Headers(g.headers).get("originator"),v=E==="codex_work_desktop"&&x!=="chat",T=c()&&o()&&x!=="chat",w=x==="chat"&&!v&&!T,k=v||T||!w&&(x==="work"||x==="codex"||ao(R)||r()),A=!w&&(R.startsWith("codexhost/")||a()),S=A?!0:k?o():i(),H=m(),z=A?d():k?l():w?H:!0,J=w&&y(),ee=J&&!S&&s()&&H,D;if(J&&!H||J&&!S&&!ee||w&&S&&!H?D="blocked":S?z?D="gateway":D="blocked":D="desktop",F("wham-create",{work:k,external:A,route:D,productExperience:x??"unset",originator:E??"unset",overlayWork:v,overlayHostCreate:T}),D==="blocked")throw w?new Error(H?"Native Chat voice is unavailable":u("chat")):new Error(u(A?"external":"work"));if(D==="desktop")return!A&&!k&&F("chat-native-passthrough",{hasThreadId:new Headers(g.headers).has("Thread-Id")}),p.call(this,b,g);if(typeof g.body!="string")throw new Error("Unsupported native voice call request");g.signal?.throwIfAborted();let N=crypto.randomUUID(),j=!1,Y=()=>{j||(j=!0,be(t,{operation:"cancel",requestId:N}).catch(()=>{}))};g.signal?.addEventListener("abort",Y,{once:!0});try{let h;try{h=io(await be(t,{operation:"create",requestId:N,body:g.body,headers:je(Object.fromEntries(new Headers(g.headers)))}))}catch(K){throw K instanceof Error&&K.message==="Invalid voice gateway response"&&F("gateway-create",{stage:"response",cause:"invalid"}),K}if(F("gateway-create",{stage:"status",status:h.status,ok:h.status>=200&&h.status<300}),g.signal?.aborted){let K=Be(h.headers.location??"");h.status>=200&&h.status<300&&Me(K)&&await be(t,{operation:"hangup",callId:K}),g.signal.throwIfAborted()}let V=new Response(h.status===204?null:h.body,{status:h.status,headers:h.headers});if(!V.ok)throw await n(V,b);return V}catch(h){throw Y(),h}finally{g.signal?.removeEventListener("abort",Y)}};return e.fetch=f,()=>{e.fetch===f&&(e.fetch=p)}}var lo="home-composer-mode-v1";function uo(e){let t=e.document;if(!t?.querySelectorAll)return!1;let o=n=>(n.getBoundingClientRect?.()??{width:0}).width>0&&!n.closest?.("[hidden], [inert]");return[...t.querySelectorAll("[data-codex-composer-root]")].some(o)&&![...t.querySelectorAll("[data-chatgpt-composer]")].some(o)}function po(e){let t=e.document;if(!t?.querySelectorAll)return!1;let o=t.querySelectorAll("button, [role='tab'], a"),n=!1,i=!1;for(let r of o){let a=(r.textContent??"").replace(/\s+/gu," ").trim();a!=="Chat"&&a!=="Work"||!(r.getAttribute("aria-selected")==="true"||r.getAttribute("aria-pressed")==="true"||r.getAttribute("data-state")==="active"||r.getAttribute("data-state")==="on")||(a==="Work"&&(n=!0),a==="Chat"&&(i=!0))}return n&&!i}function ve(e=globalThis){let t=e.localStorage;try{let o=t?.getItem(lo);if(o!=null&&o!==""){let n=o;if(o.startsWith("{")||o.startsWith('"')||o.startsWith("["))try{n=JSON.parse(o)}catch{n=o}if(n==="work")return!0;if(n==="chat")return!1}}catch{}return po(e)||uo(e)}var Ge="af0ca16ef25a57ae";var Ke="26.1027.61615",Qe="app-initial-18b189e867e7.js",Ue="start-voice-221a396d38a5.js",ze={initializeFrom:"initial",initialize:"oT",startShape:"module",voiceSessionSelector:"SPn",reactFactory:"FBt",reactDomFactory:"PNt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"MOr",CDr:"CDr",B1n:"B1n",SPn:"SPn",oTFrom:"initial",oT:"oT",aTFrom:"initial",aT:"aT",Ycr:"Ycr",Nir:"Nir",n0n:"n0n",Y1n:"Y1n",HJt:"HJt"},shared:{Qst:"Qst",FBt:"FBt",PNt:"PNt",Vot:"Vot"}},fo={initializeFrom:"primary",initialize:"Qp",startShape:"module",voiceSessionSelector:"etn",reactFactory:"pWt",reactDomFactory:"GFt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"p5n",CDr:"w6n",B1n:"_On",SPn:"etn",oTFrom:"primary",oT:"Qp",aTFrom:"primary",aT:"Zp",Ycr:"ofr",Nir:"yEn",n0n:"FOn",Y1n:"JOn",HJt:"Z6"},shared:{Qst:"klt",FBt:"pWt",PNt:"GFt",Vot:"_ct"}},mo={initializeFrom:"primary",initialize:"Yp",startShape:"module",voiceSessionSelector:"Xen",reactFactory:"pWt",reactDomFactory:"GFt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"l5n",CDr:"b6n",B1n:"pOn",SPn:"Xen",oTFrom:"primary",oT:"Yp",aTFrom:"primary",aT:"Jp",Ycr:"nfr",Nir:"hEn",n0n:"jOn",Y1n:"wOn",HJt:"J6"},shared:{Qst:"klt",FBt:"pWt",PNt:"GFt",Vot:"_ct"}},ho={initializeFrom:"primary",initialize:"gm",startShape:"module",voiceSessionSelector:"s$t",reactFactory:"OHt",reactDomFactory:"wPt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"x1n",CDr:"MQn",B1n:"Opn",SPn:"s$t",oTFrom:"primary",oT:"gm",aTFrom:"primary",aT:"hm",Ycr:"Zir",Nir:"ejn",n0n:"Kpn",Y1n:"zpn",HJt:"k3"},shared:{Qst:"uct",FBt:"OHt",PNt:"wPt",Vot:"ast"}},Ye={initializeFrom:"primary",initialize:"um",startShape:"entityBusiness",startT:"r",startN:"i",voiceSessionSelector:"qXt",reactFactory:"XVt",reactDomFactory:"KNt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"CQn",CDr:"PXn",B1n:"tdn",SPn:"qXt",oTFrom:"primary",oT:"um",aTFrom:"primary",aT:"lm",Ycr:"Xkn",Nir:"yAn",n0n:"ydn",Y1n:"fdn",HJt:"R2"},shared:{Qst:"Bst",FBt:"XVt",PNt:"KNt",Vot:"Fot"}},ie=[{platform:"darwin",version:Ke,initial:Qe,shared:"app-shared-601019a330d7.js",primary:"app-primary-75d53eef2374.js",start:Ue,prewarm:"voice-prewarm-a7cd5160219e.js",settings:"voice-settings-320cf1212f2c.js",roles:fo},{platform:"darwin",version:"26.1027.30824",initial:"app-initial-60f141238751.js",shared:"app-shared-7815d5a1a42a.js",primary:"app-primary-95a0e6d83f1e.js",start:"start-voice-4c77215aa289.js",prewarm:"voice-prewarm-e49220ad61bd.js",roles:mo},{platform:"darwin",version:"26.1023.51421",initial:"app-initial-bc8256c3cccb.js",shared:"app-shared-e9f258fd3588.js",primary:"app-primary-b7f335b763ca.js",start:"start-voice-a0564cefdc95.js",prewarm:"voice-prewarm-53aefded152c.js",settings:"voice-settings-1a9f68eb7ae8.js",roles:ho},{platform:"darwin",version:"26.1021.31345",initial:"app-initial-feb30b196d11.js",shared:"app-shared-2cae01273bae.js",primary:"app-primary-7d7313419f84.js",start:"entity-business-profile-reference-b68063dfc05d.js",prewarm:"voice-prewarm-d672f1245523.js",settings:"voice-settings-14000f5c9fc2.js",roles:Ye},{platform:"win32",version:"26.1021.31345",initial:"app-initial-438d1df57f70.js",shared:"app-shared-955d52676f9c.js",primary:"app-primary-844e405f2b90.js",start:"entity-business-profile-reference-241c52d811f4.js",prewarm:"voice-prewarm-8b47c50a17ae.js",settings:"voice-settings-b1c1633136a5.js",roles:Ye},{platform:"darwin",version:"26.1016.62342",initial:"app-initial-dddef47d6ef6.js",shared:"app-shared-fc3316d48427.js",start:"start-voice-7cbf0a39d53b.js",prewarm:"voice-prewarm-5d107129ac1c.js",roles:ze},{platform:"darwin",version:"26.1016.61520",initial:"app-initial-c95ddb62696e.js",shared:"app-shared-2eda13eb7044.js",start:"start-voice-18b08f0acdd7.js",prewarm:"voice-prewarm-94271e581c1b.js",roles:ze}],Je="26.1027.61615",Xe="app-initial-18b189e867e7.js",$e="app-shared-601019a330d7.js",Ze="avatar-overlay-native-page-920d05377bbe.js",re=[{platform:"darwin",version:Je,initial:Xe,shared:$e,overlay:Ze,init:"Adr",fetch:"Odr",fetchFrom:"initial",bridge:"LRt",services:"Vct",responseError:"Pdr",responseErrorFrom:"initial",capabilityInit:"Ler",capabilityFamily:"Ier",inferenceGateFamily:"Vfr"},{platform:"darwin",version:"26.1027.30824",initial:"app-initial-60f141238751.js",shared:"app-shared-7815d5a1a42a.js",overlay:"avatar-overlay-native-page-d9d400e751cd.js",init:"Edr",fetch:"wdr",fetchFrom:"initial",bridge:"LRt",services:"Vct",responseError:"Adr",responseErrorFrom:"initial",capabilityInit:"Ner",capabilityFamily:"Mer",inferenceGateFamily:"Lfr"},{platform:"darwin",version:"26.1023.51421",initial:"app-initial-bc8256c3cccb.js",shared:"app-shared-e9f258fd3588.js",overlay:"avatar-overlay-native-page-af6c3662f64f.js",init:"xir",fetch:"yir",fetchFrom:"initial",bridge:"QIt",services:"Sst",capabilityInit:"N4n",capabilityFamily:"M4n",inferenceGateFamily:"Par"},{platform:"darwin",version:"26.1021.31345",initial:"app-initial-feb30b196d11.js",shared:"app-shared-2cae01273bae.js",overlay:"avatar-overlay-native-page-d549db3706f1.js",fetch:"Htr",fetchFrom:"initial",bridge:"bIt",services:"Qot",capabilityInit:"l0n",capabilityFamily:"c0n",inferenceGateFamily:"Cnr"},{platform:"win32",version:"26.1021.31345",initial:"app-initial-438d1df57f70.js",shared:"app-shared-955d52676f9c.js",overlay:"avatar-overlay-native-page-1549fe5955e1.js",fetch:"Htr",fetchFrom:"initial",bridge:"bIt",services:"Qot",capabilityInit:"l0n",capabilityFamily:"c0n",inferenceGateFamily:"Cnr"},{platform:"darwin",version:"26.1016.62342",initial:"app-initial-dddef47d6ef6.js",shared:"app-shared-fc3316d48427.js",overlay:"avatar-overlay-native-page-ef8332c6a2fb.js",init:"Oit",fetch:"Eit",bridge:"AFt",responseError:"Mit",services:"ist",capabilityInit:"njr",capabilityFamily:"tjr",inferenceGateFamily:"uBr"},{platform:"darwin",version:"26.1016.61520",initial:"app-initial-c95ddb62696e.js",shared:"app-shared-2eda13eb7044.js",overlay:"avatar-overlay-native-page-fcc17283519a.js",init:"Oit",fetch:"Eit",bridge:"AFt",responseError:"Mit",services:"ist",capabilityInit:"njr",capabilityFamily:"tjr",inferenceGateFamily:"uBr"}],et="26.1007.30912",go="app-initial-6350d04672d0.js",B="26.1106.51428",L="348410.1a97dde15f.js",tt="530142.1e51e7f4b2.js",ot="586788.c871bb9b7d.js",yo=[157963,74692,198336,543449,904485,459859,822019,431137,108823,208490,384218,843292,652289,907652,796195,144338,140959,587936,904817,426774,452048,490954,445991,612928,42903,363341,997826,223736,21878,89655,333490,422391,792483,530142],bo={startModuleId:"j9r7",prewarmModuleId:"oWM3",appScopeModuleId:"OWtl",appScopeExport:"u",routeScopeModuleId:"Oj9r",routeScopeExport:"GD",composerScopeModuleId:"Sd8U",composerScopeExport:"PR",storeModuleId:"bgok",storeExport:"MH",runtimeModuleId:"cY1t",runtimeEnableExport:"Iy",runtimeLoaderExport:"Re",reactModuleId:"zd8w",reactDomModuleId:"CE87",startInitializeExport:"initializeVoiceSession",prewarmControllerExport:"VoiceInstantConnectCacheController",conversationModuleId:"MrGp",backendConversationExport:"jS",transcriptMappingExport:"Jv",currentNodeExport:"Od",locationModuleId:"nlNF",locationExport:"x2",navigationModuleId:"E8Sp",navigationExport:"oo",conversationPathModuleId:"jAnS",conversationPathExport:"mv"},P={fetchFactoryId:"GDNt",fetchExport:"_n",bridgeModuleId:"TL6G",bridgeExport:"O1",responseErrorModuleId:"eShZ",responseErrorExport:"s1",capabilityModuleId:"ChYf",capabilityExport:"G",inferenceGateModuleId:"OMIV",inferenceGateExport:"JW",voiceAccessModuleId:"eFn4",voiceAccessExport:"Y3"},nt={accessPolicy:"realtime-voice",enableStatsig:"2380644311",firstPartyStatsig:"3683713372",unsupportedAuthReason:"unsupported-auth",inAppVoiceFeature:"in_app_voice",capabilityFamilyKind:"readable-family",inferenceGateFamilyKind:"signal-family",accessAtomLibrary:"un",capabilityAtomLibrary:"i1",accessFactoryCache:"string"};function Q(e){return e.desktopVersion===B&&(e.desktopPlatform==="darwin"||e.desktopPlatform==="win32")}function U(e){return e.desktopVersion===B&&e.desktopPlatform==="darwin"}function wo(){let e=new Set([et,B]);for(let t of ie)e.add(t.version);for(let t of re)e.add(t.version);return[...e].sort()}var vo={workVersion:Je,workInitial:Xe,workShared:$e,overlayAsset:Ze,chatVersion:Ke,chatInitial:Qe,chatStart:Ue,hashedVersion:B,hashedRuntimeAsset:L,hashedStartAsset:tt,hashedPrewarmAsset:ot,historicalCpaVersion:et,historicalCpaInitial:go},mn={...vo,overlayHookDesktopVersions:wo()};function ko(e){if(e.desktopVersion){if(U(e))return"hashed";if(ie.some(t=>t.version===e.desktopVersion&&(e.desktopPlatform===void 0||t.platform===e.desktopPlatform)))return"named"}}function ke(e){if(!ko(e))return e.desktopVersion?e.desktopVersion===B&&e.desktopPlatform==="win32"?"Chat voice is not qualified on this Windows Desktop.":"Chat voice is not qualified on this Desktop.":"Chat voice is waiting for Desktop identity."}function ae(e){if(!U(e)&&!(e.desktopVersion!==void 0&&re.some(t=>t.version===e.desktopVersion&&(e.desktopPlatform===void 0||t.platform===e.desktopPlatform))))return e.desktopVersion?e.desktopVersion===B&&e.desktopPlatform==="win32"?"Work voice is not qualified on this Windows Desktop.":"Work voice is not qualified on this Desktop.":"Work voice is waiting for Desktop identity."}function it(e,t,o){return`${e}:${t??"unknown"}:${o??"unknown"}`}function Vo(e){let t=0xcbf29ce484222325n;for(let o=0;o<e.length;o+=1)t^=BigInt(e.charCodeAt(o)),t=t*0x100000001b3n&0xffffffffffffffffn;return t.toString(16).padStart(16,"0")}function Eo(e){return Vo(JSON.stringify(e))}function rt(){return[...ie.map(e=>({path:"chat",platform:e.platform,version:e.version})),...re.map(e=>({path:"work-codex",platform:e.platform,version:e.version}))]}function So(e,t,o){if(e==="chat"){if(Q({desktopVersion:o,desktopPlatform:t}))return{kind:"hashed-chat",platform:t,version:o,roles:bo,chunks:[...yo],webpack:L,start:tt,prewarm:ot};let i=ie.find(r=>r.platform===t&&r.version===o);return i?{kind:"named-chat",platform:i.platform,version:i.version,initial:i.initial,shared:i.shared,primary:i.primary??null,start:i.start,prewarm:i.prewarm,settings:i.settings??null,roles:i.roles}:void 0}let n=re.find(i=>i.platform===t&&i.version===o);if(n)return{kind:"named-work",platform:n.platform,version:n.version,initial:n.initial,shared:n.shared,overlay:n.overlay,init:n.init??null,fetch:n.fetch,fetchFrom:n.fetchFrom??null,bridge:n.bridge,services:n.services,responseError:n.responseError??null,responseErrorFrom:n.responseErrorFrom??null,capabilityInit:n.capabilityInit,capabilityFamily:n.capabilityFamily,inferenceGateFamily:n.inferenceGateFamily};if(Q({desktopVersion:o,desktopPlatform:t}))return{kind:"hashed-work",platform:t,version:o,overlay:P,webpack:L}}function Ve(e,t,o){let n=So(e,t,o);return n?Eo(n):void 0}function at(){return Ge}var xo=["structural","activation","connection","identity","speech","cleanup"],Co=xo;function st(e){return e!==null&&typeof e=="object"}function _(e){return Co.filter(t=>e.stages[t]!==!0)}function Se(e){return e==="chat"?"chat":"work"}function Ao(e){let t=it(Se(e.path),e.platform,e.desktopVersion);if(e.profileKey!==t)return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"evidence-profile-mismatch"};if(typeof e.implementationRevision!="string"||e.implementationRevision==="")return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"missing-implementation-revision"};if(e.policy!=="legacy-retained"&&e.implementationRevision!==at())return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"implementation-revision-mismatch"};if(e.policy!=="legacy-retained"&&(typeof e.desktopBuild!="string"||e.desktopBuild===""||typeof e.asarDigest!="string"||e.asarDigest===""))return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"missing-native-identity"};if(typeof e.profileDigest!="string"||e.profileDigest==="")return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"missing-profile-digest"};let o=Ve(Se(e.path),e.platform,e.desktopVersion);if(!o||e.profileDigest!==o)return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"stale-profile-digest"};if(e.startAcknowledged===!0&&e.connected!==!0)return{outcome:"incomplete",qualified:!1,missing:_(e).length>0?_(e):["connection"],reason:"start-acknowledged-without-connection"};if(e.path!=="chat"&&e.gatewayOwned!==!0&&e.stages.connection===!0)return{outcome:"incomplete",qualified:!1,missing:_(e).length>0?_(e):["connection"],reason:"route-only-without-connected-gateway"};if(e.speech?.attended===!0&&(!e.speech.witness||!e.speech.run))return{outcome:"incomplete",qualified:!1,missing:_(e).includes("speech")?_(e):["speech"],reason:"attended-speech-missing-provenance"};if(e.speech&&e.speech.attended!==!0)return{outcome:"incomplete",qualified:!1,missing:_(e),reason:"synthetic-speech-is-not-qualification"};let n=_(e);return n.length>0?{outcome:"incomplete",qualified:!1,missing:n,reason:`missing:${n.join(",")}`}:e.connected!==!0||e.conversationMatched!==!0||(e.path==="chat"?e.harnessMatched!==void 0&&e.harnessMatched!==!0:e.harnessMatched!==!0)||e.speech?.attended!==!0||e.speech.bothDirections!==!0||e.cleanup?.ended!==!0||e.cleanup.microphoneReleased!==!0?{outcome:"fail",qualified:!1,missing:[],reason:"required-assertions-failed"}:{outcome:"pass",qualified:!0,missing:[],reason:"qualified"}}function _o(e,t){return e.platform!==t.desktopPlatform||e.desktopVersion!==t.desktopVersion||e.implementationRevision!==t.implementationRevision?!1:e.policy==="legacy-retained"?!0:typeof e.desktopBuild!="string"||e.desktopBuild===""||typeof e.asarDigest!="string"||e.asarDigest===""||typeof t.desktopBuild!="string"||t.desktopBuild===""||typeof t.asarDigest!="string"||t.asarDigest===""||typeof t.implementationRevision!="string"||t.implementationRevision===""?!1:e.desktopBuild===t.desktopBuild&&e.asarDigest===t.asarDigest}function xe(e,t){return ct(t,e)}function ct(e,t){let o=t.isolatedQualification;return!fe(o)||!Te(o).includes(e)||te(o.appPath)||te(t.desktopAppPath)||o.desktopPlatform!==t.desktopPlatform?!1:o.desktopVersion===t.desktopVersion&&o.desktopBuild===t.desktopBuild&&o.asarDigest===t.asarDigest&&o.appPath===t.desktopAppPath&&o.implementationRevision===t.implementationRevision&&typeof t.desktopBuild=="string"&&t.desktopBuild!==""&&typeof t.asarDigest=="string"&&t.asarDigest!==""&&typeof t.desktopAppPath=="string"&&t.desktopAppPath!==""&&typeof t.implementationRevision=="string"&&t.implementationRevision!==""}function Ro(e,t){return e==="chat"?ke(t)??"Chat voice is not qualified on this Desktop.":ae(t)??"Work voice is not qualified on this Desktop."}function Ee(e,t,o){if(!t.desktopVersion||!t.desktopPlatform)return{enabled:!1,policy:"unreviewed",reason:"waiting-for-identity"};let n=o.filter(a=>a.path===e);if(n.length>0){let a=n.filter(d=>_o(d,t));if(a.length===0)return{enabled:!1,policy:"unreviewed",reason:"stale-or-wrong-platform-evidence"};for(let d of a){let l=Ao(d);if(!l.qualified)return{enabled:!1,policy:"unreviewed",reason:l.reason}}let c=a[0];if(!c)return{enabled:!1,policy:"unreviewed",reason:"missing-evidence"};if(!(Q(t)&&!U(t)))return{enabled:!0,policy:c.policy==="legacy-retained"?"legacy-retained":"reviewed"}}return Ve(Se(e),t.desktopPlatform,t.desktopVersion)?rt().find(a=>a.path===e&&a.platform===t.desktopPlatform&&a.version===t.desktopVersion)?{enabled:!0,policy:"legacy-retained",reason:"legacy-retained-named-profile"}:ct(e,t)?{enabled:!0,policy:"unreviewed",reason:"isolated-qualification"}:{enabled:!1,policy:"unreviewed",reason:"missing-evidence"}:{enabled:!1,policy:"unreviewed",reason:Ro(e,t)}}function lt(e){return st(e)?typeof e.profileKey=="string"&&typeof e.platform=="string"&&typeof e.desktopVersion=="string"&&typeof e.implementationRevision=="string"&&typeof e.profileDigest=="string"&&(e.path==="chat"||e.path==="work-codex"||e.path==="work-grok")&&st(e.stages):!1}function Io(e){return(e.voiceEvidence??[]).filter(lt)}function dt(e){let t=[...Io(e),...e.evidence&&lt(e.evidence)?[e.evidence]:[]],o=Ee("chat",e,t),n=Ee("work-codex",e,t),i=Ee("work-grok",e,t);return{chat:o,"work-codex":n,"work-grok":i,work:n}}function Po(e){return dt(e).chat.enabled}function W(e,t){return Oo(e,t).enabled}function Oo(e,t){let o=M(e);return o?dt(o)[t]:{enabled:!1,policy:"unreviewed",reason:ae({})??"Work voice is not qualified on this Desktop."}}function se(e,t){let o=M(e)??{};return ae(o)??"Work voice is not qualified on this Desktop."}function ut(e){let t=M(e)??{};return ke(t)??"Chat voice is not qualified on this Desktop."}function pt(e){let t=M(e);return t?Po(t):!1}var ce="__codexhostClientOwnedVoiceV1",ft="codexhost.voice-routes-cache.v1",To="codexhost.cpa-live-voice.v1",Do="codexhost.chat-live-voice.v1";function I(e){return e!==null&&typeof e=="object"}function Ae(e){try{return(e.location?.href??globalThis.location?.href??"").includes("avatar-overlay")}catch{return!1}}function Fo(e){let t=e.document;if(!t?.querySelectorAll)return;let o=r=>(r.getBoundingClientRect?.()??{width:0}).width>0&&!r.closest?.("[hidden], [inert]"),n=[...t.querySelectorAll("[data-chatgpt-composer]")].some(o),i=[...t.querySelectorAll("[data-codex-composer-root]")].some(o);if(n&&!i)return"chat";if(i&&!n)return"work"}function Ce(e){Ae(e)||ne({productExperience:Fo(e)??(ve(e)?"work":"chat")},e)}function Ho(e){return U(e)?!0:Q(e)?xe(e,"work-codex")||xe(e,"work-grok"):!1}function Lo(e){return Ho(e)}function mt(e,t){try{let o=JSON.parse(e.localStorage?.getItem(ft)??"null");return I(o)?o[t]:void 0}catch{return}}function No(e){try{let t=JSON.parse(e.localStorage?.getItem(ft)??"null");return I(t)?t.chatExperience:void 0}catch{return}}function ht(e,t,o){let n=e.localStorage;if(!n)return o;try{let i=n.getItem(t);return o?i!=="0":i==="1"}catch{return o}}function jo(e){let t=mt(e,"workConnection");return t!==void 0?t==="gateway":ht(e,To,!0)}function Mo(e){let t=No(e),o=mt(e,"chatConnection");return t!==void 0||o!==void 0?t==="codex"&&o==="gateway":ht(e,Do,!1)}function Bo(e){return e!==null&&(typeof e=="object"||typeof e=="function")?e:void 0}function gt(e){let t=Bo(e);if(!t)return e;let o=Reflect.get(t,"getInstance");return typeof o=="function"?o.call(t):t}function X(e){let t=gt(e);if(!(!I(t)||typeof t.fetch!="function"))return t}function Wo(e){let t=gt(e);if(!(!I(t)||typeof t.dispatchMessage!="function"||typeof t.subscribe!="function"))return t}function qo(e){return typeof e=="function"}function yt(e,t){return e.c?.[t]?.exports}function Re(e,t,o){let n=e.c,i=n?.[t];if(!(!n||!i||o(i.exports)))try{Reflect.deleteProperty(n,t)}catch{}}function _e(e,t){let o=yt(e,t);if(I(o)&&Object.keys(o).length>0)return o;try{return e(t)}catch{Re(e,t,n=>I(n)&&Object.keys(n).length>0);return}}function Go(e){let t=P.fetchFactoryId,o=P.fetchExport,n=yt(e,t);if(X(I(n)?n[o]:void 0))return n;if(Re(e,t,i=>!!X(I(i)?i[o]:void 0)),typeof e.m?.[t]!="function")return _e(e,t)}function zo(e,t){let o=e.m,n=P.fetchFactoryId,i=o?.[n];if(!o||typeof i!="function")return;let r=i.__codexhostVoiceFactory===!0&&typeof i.__codexhostVoiceOriginal=="function",a=r?i.__codexhostVoiceOriginal:i,c=r?i:function(d,l,u){try{return a.apply(this,[d,l,u])}finally{try{c.__codexhostVoiceSubscriber?.(l??d?.exports)}catch{}}};return c.__codexhostVoiceFactory=!0,c.__codexhostVoiceOriginal=a,c.__codexhostVoiceSubscriber=t,r||(o[n]=c),()=>{c.__codexhostVoiceSubscriber===t&&(Reflect.deleteProperty(c,"__codexhostVoiceSubscriber"),o[n]===c&&(o[n]=a))}}async function Yo(e){let o=(await e(`app://-/assets/${L}`))?.__webpack_require__;if(!qo(o))return null;let n=P,i=Go(o),r=X(I(i)?i[n.fetchExport]:void 0),a=_e(o,n.bridgeModuleId),c=Wo(I(a)?a[n.bridgeExport]:void 0),d=_e(o,n.responseErrorModuleId),l=I(d)?d[n.responseErrorExport]:void 0;return!c||typeof l!="function"?null:r?{client:r,bridge:c,responseError:l,require:o}:typeof o.m?.[P.fetchFactoryId]!="function"?null:{bridge:c,responseError:l,require:o}}function bt(e={}){let t=e.target??globalThis,o=t[ce];if(o)return o;let n=M(t);if(!n)return{status:"disabled",dispose(){}};if(!Lo(n))return{status:"unsupported",dispose(){}};let i=e.importModule??(R=>import(R)),r=!1,a,c,d,l,u=new WeakSet,m=Date.now(),s={assetSeen:!1,importStarted:!1,importResolved:!1,factoryHooked:!1,wrapperActive:!1},y=t.document,p=()=>Ce(t),f={status:"pending",activation:s,dispose(){r=!0,a!==void 0&&t.clearTimeout(a),c!==void 0&&t.clearTimeout(c),y?.removeEventListener?.("pointerdown",p,!0),l?.(),d?.(),t[ce]===f&&Reflect.deleteProperty(t,ce)}};t[ce]=f,y?.addEventListener?.("pointerdown",p,!0);let b=()=>{r||(Ce(t),c=t.setTimeout(b,250))};b();let g=(R,E,v)=>{if(u.has(R)){s.wrapperActive=!0,f.status="active";return}u.add(R);let T=qe(R,E,()=>jo(t),v,()=>Mo(t),()=>!Ae(t)&&ve(t),()=>!1,()=>Ae(t),()=>W(t,"work-grok"),()=>W(t,"work-codex"),k=>k==="chat"?ut(t):se(t,k==="external"?"work-grok":"work-codex"),()=>pt(t),()=>!1,()=>He(t)),w=d;d=()=>{T(),w?.()},s.wrapperActive=!0,f.status="active"},x=async()=>{if(r||s.wrapperActive&&s.factoryHooked)return;Ce(t);let E=De(t.document,t.performance).some(v=>v.includes(L));if(E&&(s.assetSeen=!0),E){s.importStarted=!0;try{let v=await Yo(i);if(r||!v)r||(s.importFailed="hashed-exports-missing");else{let T=k=>{if(r)return;let A=X(I(k)?k[P.fetchExport]:void 0);if(!A){v.require&&Re(v.require,P.fetchFactoryId,S=>!!X(I(S)?S[P.fetchExport]:void 0));return}g(A,v.bridge,v.responseError)};v.client&&(s.importResolved=!0,delete s.importFailed,g(v.client,v.bridge,v.responseError));let w=v.require?zo(v.require,T):void 0;w&&(l=w,s.importResolved=!0,s.factoryHooked=!0,delete s.importFailed)}if(s.wrapperActive||s.factoryHooked)return;s.importFailed="hashed-exports-missing"}catch{s.importFailed="hashed-import-failed"}}a=t.setTimeout(()=>{x()},Date.now()-m>=5e3?1e3:250)};return x(),f}function wt(e){let o=s=>typeof s=="object"&&s!==null?s:null,n=()=>{let s=globalThis;return typeof s.dispatchEvent=="function"&&typeof CustomEvent=="function"&&s.dispatchEvent(new CustomEvent("codexhost:react-fiber-walk-limit",{detail:{limit:2e5}})),[]},i=o(e);if(!i)return[];let r=[],a=new Set;for(let s=i;s;s=o(s.return)){if(a.has(s))return[];if(a.size>=2e5)return n();a.add(s),r.push(s)}let c=o(r.at(-1)?.stateNode);if(!c||!("current"in c))return r;let d=o(c.current);if(!d)return[];let l=o(i.alternate),u=[d];a.clear(),a.add(d);for(let s=r.length-2;s>=0;s-=1){let y=r[s],p=o(y?.alternate),f=o(u.at(-1)?.child),b=!1;for(;f&&!a.has(f)&&a.size<2e5;){if(a.add(f),f===y||f===p){b=!0;break}f=o(f.sibling)}if(!b||!f)break;u.push(f)}if(u.length===r.length&&(u.at(-1)===i||u.at(-1)===l))return u.reverse();let m=[{node:d,parent:null}];for(a.clear();m.length>0&&a.size<2e5;){let s=m.pop();if(!s)break;if(a.has(s.node))return[];if(a.add(s.node),s.node===i||s.node===l){let f=[];for(let b=s;b;b=b.parent)f.push(b.node);return f}let y=s.parent&&o(s.node.sibling);y&&m.push({node:y,parent:s.parent});let p=o(s.node.child);p&&m.push({node:p,parent:s})}return m.length>0?n():[]}var $=e=>e!==null&&typeof e=="object";function Ie(e,t,o=!1,n=!1){if(!$(e)||e.productExperience!=="work"&&e.productExperience!=="codex"&&e.productExperience!=="chat")return!1;if(e.source==="composer_button_existing_thread"){if(!$(e.locator)||e.locator.hostId!=="local")return!1}else if(e.source!=="composer_button_new_thread"||(e.hostId??"local")!=="local")return!1;if(e.productExperience==="chat")return o;let i=e.activeCollaborationMode,r=$(i)?i.settings:void 0,a=$(r)?r.model:void 0;return typeof a=="string"&&a.startsWith("codexhost/")?n:t||n}function vt(e,t){let o;return{async start(...n){let i=n[0],r=t.qualifies(i);if(!(t.configured?.(i)??r))return e(...n);if(!r)throw new Error(t.unavailable?.(i)??"Work voice is not qualified on this Desktop.");o&&(o.binding?.dispose(),o=void 0);let c={};o=c;let d=()=>o===c&&t.qualifies(n[0]);try{if(!await t.ready())throw new Error("Voice gateway is not ready");if(!d())throw new Error("Voice gateway start was cancelled");if(c.binding=await t.prepare(d),await t.committed(c.binding),!d())throw new Error("Voice gateway start was cancelled");if(!c.binding.current())throw new Error("Voice starter subscription changed");return ne(n[0]),await e(...n)}finally{c.binding?.dispose(),o===c&&(o=void 0)}},cancel(){o?.binding?.dispose(),o=void 0}}}function kt(e){let t=new Set;for(let o of e.querySelectorAll("[data-avatar-overlay-native-surface-id]")){let n=Object.getOwnPropertyNames(o).find(r=>r.startsWith("__reactFiber$")),i=wt(n&&Object.getOwnPropertyDescriptor(o,n)?.value);for(let r of i)$(r)&&t.add(r)}return t}var Ko="3683713372",C=e=>e!==null&&typeof e=="object",O=e=>C(e)&&typeof e.isLoading=="boolean"&&typeof e.isError=="boolean"&&typeof e.isCapable=="boolean",q=(e,t)=>e.isLoading===t.isLoading&&e.isError===t.isError&&e.isCapable===t.isCapable;function Qo(e,t,o){let n=i=>{let r=new Set,a=512,c=0,d=l=>{if(--a<0)throw new Error("Voice capability dependency limit");let u=e.get(l);if(l===o){if(c+=1,typeof u!="boolean")throw new Error("Voice inference gate unavailable");return i?!1:u}if(l.write||r.has(l))return u;if(typeof l.read!="function")throw new Error("Voice dependency unavailable");r.add(l);try{return l.read(d)}finally{r.delete(l)}};return{value:d(t),hits:c}};try{let i=e.get(t);if(!O(i)||i.isLoading||i.isError)return null;let r=n(!1);if(!O(r.value)||!q(i,r.value))return null;let a=n(!0);return a.hits>0&&O(a.value)&&!a.value.isLoading&&!a.value.isError?a.value:null}catch{return null}}function Et(e){return C(e)&&C(e.scope)&&typeof e.resolve=="function"}function Uo(e){return Et(e)&&e.kind==="readable-family"&&typeof e.read=="function"}function Jo(e){return Et(e)&&e.kind==="signal-family"}function Xo(e){return C(e)&&C(e.scope)&&(typeof e.cache=="string"||C(e.cache))&&typeof e.resolve=="function"&&typeof e.createSubscriberAtom=="function"&&typeof e.read!="function"&&e.kind==null}function St(e){let t=P,o,n,i;try{o=e(t.capabilityModuleId)}catch{return}try{n=e(t.inferenceGateModuleId)}catch{return}try{i=e(t.voiceAccessModuleId)}catch{return{reason:"access-shape"}}let r=C(o)?o[t.capabilityExport]:void 0,a=C(n)?n[t.inferenceGateExport]:void 0,c=C(i)?i[t.voiceAccessExport]:void 0;if(!(!Uo(r)||!Jo(a)))return Xo(c)?{family:r,gates:a,access:c}:{reason:"access-shape"}}function xt(e,t,o){try{let n=e.resolve(t,o);return C(n)&&typeof n.read=="function"&&!("atom"in n)?n:void 0}catch{return}}var $o={status:"allowed"};function Zo(e){return C(e)&&e.status==="denied"&&e.reason===nt.unsupportedAuthReason}function Ct(e,t,o){let n=i=>{let r=new Set,a=512,c=0,d=l=>{if(--a<0)throw new Error("Voice capability dependency limit");let u=e.get(l);if(l===o)return c+=1,i&&Zo(u)?$o:u;if(l.write||r.has(l))return u;if(typeof l.read!="function")throw new Error("Voice dependency unavailable");r.add(l);try{return l.read(d)}finally{r.delete(l)}};return{value:d(t),hits:c}};try{let i=e.get(t);if(!O(i)||i.isLoading||i.isError)return null;let r=n(!1);if(!O(r.value)||!q(i,r.value))return null;if(i.isCapable)return i;let a=n(!0);return a.hits>0&&O(a.value)&&!a.value.isLoading&&!a.value.isError&&a.value.isCapable?a.value:null}catch{return null}}function Vt(e){let t=[],o=new Set,n=e.memoizedState;for(;C(n)&&t.length<4096&&!o.has(n);)o.add(n),t.push(n),n=n.next;return n==null?t:[]}function At(e,t,o,n,i=!1,r=["voice.realtime","voice.thread"],a){let c=e(),d=[],l=[];try{for(let m of c){let s=Vt(m);for(let y of s){let[p,f]=Array.isArray(y.memoizedState)?y.memoizedState:[];if(!C(p)||!Array.isArray(f)||f.length!==5||f[3]!==t||!(f[1]instanceof Map)||f[2]!==void 0)continue;let b=f[1],g=b.get(t.scope.id),x=g?.familyBindings?.get(t);if(!g||!(x instanceof Map)||g.store!==p.store)continue;let R=[...x].filter(([,h])=>h.cacheKey===f[0]);if(R.length!==1||typeof R[0]?.[0]!="string")continue;let E=JSON.parse(R[0][0]);if(!C(E)||Object.keys(E).some(h=>h!=="name"&&h!=="hostId")||!r.some(h=>E.name===h)||i&&E.name!=="voice.realtime"||E.hostId!==void 0&&E.hostId!=="local"||E.name==="voice.thread"&&E.hostId!=="local")continue;let v=s.filter(h=>{let V=h.memoizedState;return Array.isArray(V)&&Array.isArray(V[1])&&V[1].length===2&&V[1][0]===p&&V[1][1]===void 0&&typeof V[0]?.getSnapshot=="function"});if(v.length!==1)throw new Error("Ambiguous voice subscription");let T=v[0],w=T.memoizedState[0],k=T.next?.queue,A=T.next?.next?.memoizedState,S=p.store,H=o.resolve(g,b,Ko)?.atom;if(!H||!k||!C(A)||!Array.isArray(A.deps)||A.deps[0]!==w.subscribe||typeof A.create!="function"||typeof k.getSnapshot!="function"||!O(S.get(p.atom))||!O(w.getSnapshot())||!O(k.getSnapshot())||!q(S.get(p.atom),w.getSnapshot())||!q(w.getSnapshot(),k.getSnapshot())||w.createRender?.()!=null)throw new Error("Unsupported voice subscription");for(let[h,V]of[[S,"sub"],[w,"getSnapshot"],[k,"getSnapshot"]])if(Object.getOwnPropertyDescriptor(h,V)?.writable!==!0)throw new Error("Voice subscription is not writable");let z,J=S.sub;try{S.sub=(h,V)=>{if(h!==p.atom||z)throw new Error("Unexpected voice subscription");return z=V,()=>{}},A.create()}finally{S.sub=J}if(!z)throw new Error("Voice listener unavailable");let ee=w.getSnapshot,D=k.getSnapshot,N,j=()=>{let h=ee.call(w);if(!n())return h;let V=a?a({native:h,store:S,atom:p.atom,gate:H,node:g,chain:b}):Qo(S,p.atom,H);return!V||!V.isCapable?h:((!N||!q(N,V))&&(N=V),N)};w.getSnapshot=j,k.getSnapshot=j;let Y=z;d.push(()=>{w.getSnapshot===j&&(w.getSnapshot=ee),k.getSnapshot===j&&(k.getSnapshot=D),Y()}),l.push({subscriber:w,signal:p,instance:k}),Y()}}if(!d.length)throw new Error("Owned voice capability unavailable");if(i&&d.length!==1)throw new Error("Ambiguous voice starter")}catch(m){for(let s of d.reverse())s();throw m}let u=({subscriber:m,instance:s})=>{try{let y=m.getSnapshot(),p=s.getSnapshot();return!O(y)||!O(p)||!q(y,p)?void 0:y}catch{return}};return{dispose(){for(let m of d.splice(0).reverse())m()},current(){let m=[...e()].flatMap(Vt);return l.every(s=>{let y=u(s);if(!y)return!1;let{subscriber:p,signal:f,instance:b}=s;return m.some(g=>{let x=g.next?.memoizedState;return Array.isArray(g.memoizedState)&&g.memoizedState[0]===p&&g.memoizedState[1]?.[0]===f&&g.next?.queue===b&&O(x)&&q(x,y)&&(!i||y.isCapable)})})},projectedCapable(){return l.length>0&&l.every(m=>u(m)?.isCapable===!0)}}}function le(e){try{let t=new URL(e);return t.pathname==="/avatar-overlay.html"?!0:t.searchParams.get("initialRoute")==="/avatar-overlay"}catch{return!1}}var G=e=>e!==null&&typeof e=="object",Z="__codexhostVoiceCapabilityV1",_t=1e3,Rt=50,It=40;function Pt(e){let t=e[Z];if(!(!G(t)||t.status!=="active"||typeof t.current!="function"||typeof t.dispose!="function"))return t}function Pe(e){let t=G(e)?e.activeCollaborationMode:void 0,o=G(t)?t.settings:void 0,n=G(o)?o.model:void 0;return typeof n=="string"&&n.startsWith("codexhost/")?"work-grok":"work-codex"}function en(e,t=()=>ge(e),o=()=>Le(e),n=()=>!1){return{configured:r=>Ie(r,t(),o(),n()||Pe(r)==="work-grok"),qualifies:r=>{let a=Pe(r);return Ie(r,a==="work-codex"&&t()&&W(e,"work-codex"),o(),a==="work-grok"&&W(e,"work-grok"))},unavailable:r=>se(e,Pe(r)),ready:async()=>{for(let r=0;r<It;r+=1){let a=e.__codexhostClientOwnedVoiceV1;if(G(a)&&a.status==="active"&&Pt(e)!==void 0)return!0;await new Promise(c=>e.setTimeout(c,Rt))}return!1},prepare:async()=>{let r=Pt(e);if(!r)throw new Error("Overlay voice capability is not ready");return{dispose(){},current:()=>e[Z]===r&&r.current()}},committed:async r=>{for(let a=0;a<It&&!r.current();a+=1)await new Promise(c=>e.setTimeout(c,Rt))}}}function Ot(e,t){let o=e.realtimeVoiceRuntime;if(!G(o)&&typeof o!="function")return;let n=Reflect.get(o,"registerRealtimeStarter"),i=Reflect.get(o,"unregisterRealtimeStarter");if(typeof n!="function")return;let r=new Set,a=en(t),c=new Proxy(o,{get(d,l,u){return l==="registerRealtimeStarter"?(m,s,...y)=>{if(typeof m!="function"||typeof s!="function")throw new Error("Voice starter callback unavailable");let p=vt(m,a);return r.add(p),Reflect.apply(n,o,[p.start,(...f)=>(p.cancel(),s(...f)),...y])}:l==="unregisterRealtimeStarter"&&typeof i=="function"?(...m)=>{for(let s of r)s.cancel();return r.clear(),Reflect.apply(i,o,m)}:Reflect.get(d,l,u)}});if(Reflect.set(e,"realtimeVoiceRuntime",c))return()=>{for(let d of r)d.cancel();r.clear(),e.realtimeVoiceRuntime===c&&(e.realtimeVoiceRuntime=o)}}function Tt(e,t){let o=e.location?.href??"";if(!le(o)||!e.document)return;let n=e.document,i=!1,r,a,c={status:"pending",reason:"access-replay",current:()=>a?.current()===!0,dispose(){i||(i=!0,r!==void 0&&e.clearTimeout(r),a?.dispose(),a=void 0,e[Z]===c&&Reflect.deleteProperty(e,Z))}};e[Z]=c;let d=()=>{let u=e.__codexhostClientOwnedVoiceV1;return G(u)&&u.status==="active"&&(ge(e)||W(e,"work-grok"))},l=()=>{if(i)return;let u=St(t);if(!u||"reason"in u){c.status="pending",r=e.setTimeout(l,_t);return}if(!a||!a.current()){a?.dispose(),a=void 0;try{let m=({store:s,atom:y,node:p,chain:f})=>{let b=xt(u.access,p,f);return b?Ct(s,y,b):null};a=At(()=>kt(n),u.family,u.gates,d,!0,["voice.realtime","voice.thread"],m)}catch{a=void 0}}a?.projectedCapable()===!0?c.status!=="active"&&(c.status="active",F("voice-capability",{status:"active",reason:"access-replay"})):c.status="pending",r=e.setTimeout(l,_t)};return l(),c.dispose}var de="__codexhostOverlayVoiceBootstrapV1",tn="hashed-overlay-voice-bootstrap-v1";function on(e,t={}){if(!le(e.location?.href??"")||!e.document)return;let o=Reflect.get(e,de);typeof o?.dispose=="function"?o.dispose():Reflect.get(e,"__codexhostClientOwnedVoiceV1")?.dispose?.();let n=[],i=!1,a={version:tn,dispose:()=>{if(!i){i=!0;for(let d of n.splice(0).reverse())try{d()}catch{}Reflect.get(e,de)===a&&Reflect.deleteProperty(e,de)}}};Reflect.set(e,de,a);let c=t.importRuntime??(d=>import(d));return queueMicrotask(()=>{if(i)return;let d=bt({target:e});n.push(()=>d.dispose()),c(`app://-/assets/${L}`).then(l=>{if(i)return;let u=l.__webpack_require__;if(typeof u!="function")return;let m=u("GaA7"),s=m&&typeof m=="object"?m.appServices:void 0;if(s&&typeof s=="object"){let p=Ot(s,e);p&&n.push(p)}let y=Tt(e,u);y&&n.push(y)}).catch(()=>{})}),a}on(globalThis);})();
1
+ "use strict";(()=>{var Ft="__codexhostCpaLiveVoiceHookV1",Ht=["chat","work-codex","work-grok"];var Lt="/Applications/ChatGPT.app",Nt=/(?:^|[\\/])WindowsApps[\\/]OpenAI\.(?:Codex|ChatGPT)_/i;function oe(e){return typeof e!="string"||e.length===0?!1:e===Lt?!0:Nt.test(e)}function fe(e){return typeof e=="object"&&e!==null}function M(e){let t=e[Ft];return!fe(t)||t.enabled!==!0||typeof t.auditedDesktopVersion!="string"||typeof t.auditedAppInitialAsset!="string"?null:{enabled:!0,auditedDesktopVersion:t.auditedDesktopVersion,auditedAppInitialAsset:t.auditedAppInitialAsset,...typeof t.desktopPlatform=="string"?{desktopPlatform:t.desktopPlatform}:{},...typeof t.desktopVersion=="string"?{desktopVersion:t.desktopVersion}:{},...typeof t.desktopBuild=="string"?{desktopBuild:t.desktopBuild}:{},...typeof t.asarDigest=="string"?{asarDigest:t.asarDigest}:{},...typeof t.implementationRevision=="string"?{implementationRevision:t.implementationRevision}:{},...typeof t.desktopAppPath=="string"?{desktopAppPath:t.desktopAppPath}:{},...Array.isArray(t.voiceEvidence)?{voiceEvidence:t.voiceEvidence}:{},...me(t.isolatedQualification)?{isolatedQualification:t.isolatedQualification}:{}}}function pe(e){return e==="chat"||e==="work-codex"||e==="work-grok"}function jt(e){return e==="darwin"||e==="win32"||e==="linux"}function Mt(e){if(typeof e!="string"||e.length===0)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function Te(e){if(!fe(e))return;let t=e.paths!==void 0,o=e.path!==void 0,n;if(t){if(!Array.isArray(e.paths)||e.paths.length===0||e.paths.some(r=>!pe(r))||new Set(e.paths).size!==e.paths.length||(n=Ht.filter(r=>e.paths.includes(r)),n.length!==e.paths.length))return}else if(o){if(!pe(e.path))return;n=[e.path]}else return;if(!(o&&(!pe(e.path)||!n.includes(e.path))))return n}function De(e){return Te(e)??[]}function me(e,t=Date.now()){if(!fe(e))return!1;let o=Te(e);if(!o||o.length===0||typeof e.appPath=="string"&&oe(e.appPath))return!1;let n=Mt(e.expiresAt);return n===void 0||n<=t?!1:typeof e.run=="string"&&e.run.length>0&&jt(e.desktopPlatform)&&typeof e.desktopVersion=="string"&&typeof e.desktopBuild=="string"&&typeof e.asarDigest=="string"&&typeof e.appPath=="string"&&typeof e.implementationRevision=="string"&&e.label==="unqualified-isolated"}function Bt(e){let t=e??(typeof performance>"u"?void 0:performance);if(!t)return[];let o=[],n=r=>{typeof r=="string"&&r&&o.push(r)};if(typeof t.getEntries=="function")for(let r of t.getEntries())n(r.name);else if(typeof t.getEntriesByType=="function")for(let r of t.getEntriesByType("resource"))n(r.name);return o}function Fe(e,t){let o=Bt(t);if(!e||!("querySelectorAll"in e))return o;for(let n of e.querySelectorAll('script[src], link[href], link[rel="modulepreload"], link[rel="preload"]')){let r=n.getAttribute("src")??n.getAttribute("href");r&&o.push(r)}return o}var Wt="codexhost.voice-routes-cache.v1",qt="codexhost.cpa-live-voice.v1",He="codexhost.chat-live-voice.v1",Gt=globalThis;function zt(){return Gt.__codexhostVoicePreferenceStateV1??={sharedRoutes:new WeakMap,gatewayReady:new WeakMap}}function Yt(e){if(e===null||typeof e!="object")return;let t=e;if(!(t.chatExperience!=="chatgpt"&&t.chatExperience!=="codex"||t.chatConnection!=="desktop"&&t.chatConnection!=="gateway"||t.workConnection!=="desktop"&&t.workConnection!=="gateway"))return{chatExperience:t.chatExperience,chatConnection:t.chatConnection,workConnection:t.workConnection}}function he(e){let{sharedRoutes:t}=zt(),o=t.get(e);if(o)return o;try{let n=e.localStorage,r=Yt(JSON.parse(n?.getItem(Wt)??"null"));return r&&t.set(e,r),r}catch{return}}function ye(e,t,o){let n=e.localStorage;if(!n)return o;try{let r=n.getItem(t);return o?r!=="0":r==="1"}catch{return o}}function Le(e){let t=he(e);return t?t.chatExperience==="chatgpt":!ye(e,He,!1)}function Kt(e){let t=he(e);return t?t.workConnection==="gateway":ye(e,qt,!0)}function Qt(e){let t=he(e);return t?t.chatExperience==="codex"&&t.chatConnection==="gateway":ye(e,He,!1)}function ge(e){return Kt(e)}function Ne(e){return Qt(e)}var je="codexhost/realtime/call",Ut=["openai-alpha","thread-id","session-id","originator","x-codex-turn-metadata"],Jt=new Set(Ut);function Me(e){let t={};for(let[o,n]of Object.entries(e??{})){let r=o.toLowerCase();Jt.has(r)&&n.length>0&&n.length<=4096&&(t[r]=n)}return t}var Xt=/^[A-Za-z0-9_-]{1,128}$/u;function Be(e){return typeof e=="string"&&Xt.test(e)}function We(e){let t=e.split(/[?#]/u)[0]??"";return/^[A-Za-z0-9_-]{1,128}$/u.test(t)?t:/\/(?:calls|live)\/([A-Za-z0-9_-]{1,128})$/u.exec(t)?.[1]}var be="__codexhostChatVoiceDebug",$t="codexhost.chat-voice-debug.v1";function F(e,t={}){let o={t:Date.now(),event:e,...t},n=globalThis,r=Array.isArray(n[be])?n[be]:[];for(r.push(o);r.length>40;)r.shift();n[be]=r;try{n.localStorage?.setItem($t,JSON.stringify(r))}catch{}n.console?.info?.("[codexhost-chat-voice]",e,t)}function Zt(e){return e!==null&&typeof e=="object"}var eo="Host request timed out",to="Local Host connection is unavailable",oo="__codexhostVoiceHostV1";function no(e=globalThis){let t=Reflect.get(e,oo);if(!t||typeof t!="object")return null;let o=Reflect.get(t,"request");return typeof o=="function"?{request:o.bind(t)}:null}function ro(e){return e==="config"||e==="request"||e==="transport"||e==="identity"||e==="cancel"?e:"rpc"}function we(e,t,o=je){let n=no();return n?n.request(o,t).then(r=>r,r=>{let i=r instanceof Error?r.message:"";if(i===eo||/timed out/i.test(i))throw F("gateway-create",{stage:"rpc",cause:"timeout"}),new Error("Voice gateway did not answer in time");if(i===to)throw F("gateway-create",{stage:"rpc",cause:"host-unavailable"}),new Error("Voice gateway Host connection is unavailable");let a=r instanceof Error&&"stage"in r?ro(r.stage):"rpc";throw F("gateway-create",{stage:a,cause:"failed"}),new Error("Configured voice gateway request failed")}):(F("gateway-create",{stage:"rpc",cause:"host-unavailable"}),Promise.reject(new Error("Voice gateway Host connection is unavailable")))}function io(e){if(e===null||typeof e!="object")throw new Error("Invalid voice gateway response");let t=e;if(typeof t.status!="number"||!Number.isInteger(t.status)||t.status<200||t.status>599||typeof t.body!="string"||t.headers===null||typeof t.headers!="object"||Array.isArray(t.headers))throw new Error("Invalid voice gateway response");let o={};for(let[n,r]of Object.entries(t.headers))typeof r=="string"&&(o[n]=r);return{status:t.status,body:t.body,headers:o}}function ao(e){let t=new Headers(e).get("x-codex-turn-metadata");if(!t)return"";try{let o=JSON.parse(t);return typeof o.backend_model_name=="string"?o.backend_model_name:""}catch{return""}}function so(e){let t=e.toLowerCase();return t?t.startsWith("codexhost/")?!0:t.includes("codex")&&!t.includes("gpt-live"):!1}var ne,ve="codexhost.voice-launch-experience.v1";function qe(e){return e.localStorage}function co(e){try{let t=qe(e)?.getItem(ve);return t==="chat"||t==="work"||t==="codex"?t:void 0}catch{return}}function re(e,t=globalThis){let o=Zt(e)?e.productExperience:void 0;ne=o==="chat"||o==="work"||o==="codex"?o:void 0;try{let n=qe(t);if(!n)return;ne?n.setItem(ve,ne):n.removeItem(ve)}catch{}}function lo(e=globalThis){return ne??co(e)}function Ge(e,t,o,n,r=()=>!1,i=()=>!1,a=()=>!1,c=()=>!1,u=()=>!0,d=()=>!0,p=m=>m==="chat"?"Chat voice is not qualified on this Desktop.":"Work voice is not qualified on this Desktop.",l=()=>!0,s=()=>!0,y=()=>!0){let m=e.fetch,f=async function(g,h){if(typeof g!="string"||g.split("?")[0]!=="/wham/realtime/calls"||h?.method!=="POST")return m.call(this,g,h);let V=lo(),x=ao(h.headers),E=new Headers(h.headers).get("originator"),v=E==="codex_work_desktop"&&V!=="chat",T=c()&&o()&&V!=="chat",w=V==="chat"&&!v&&!T,k=v||T||!w&&(V==="work"||V==="codex"||so(x)||i()),R=!w&&(x.startsWith("codexhost/")||a()),C=R?!0:k?o():r(),H=l(),Y=R?u():k?d():w?H:!0,X=w&&y(),te=X&&!C&&s()&&H,D;if(X&&!H||X&&!C&&!te||w&&C&&!H?D="blocked":C?Y?D="gateway":D="blocked":D="desktop",F("wham-create",{work:k,external:R,route:D,productExperience:V??"unset",originator:E??"unset",overlayWork:v,overlayHostCreate:T}),D==="blocked")throw w?new Error(H?"Native Chat voice is unavailable":p("chat")):new Error(p(R?"external":"work"));if(D==="desktop")return!R&&!k&&F("chat-native-passthrough",{hasThreadId:new Headers(h.headers).has("Thread-Id")}),m.call(this,g,h);if(typeof h.body!="string")throw new Error("Unsupported native voice call request");h.signal?.throwIfAborted();let N=crypto.randomUUID(),j=!1,K=()=>{j||(j=!0,we(t,{operation:"cancel",requestId:N}).catch(()=>{}))};h.signal?.addEventListener("abort",K,{once:!0});try{let b;try{b=io(await we(t,{operation:"create",requestId:N,body:h.body,headers:Me(Object.fromEntries(new Headers(h.headers)))}))}catch(Q){throw Q instanceof Error&&Q.message==="Invalid voice gateway response"&&F("gateway-create",{stage:"response",cause:"invalid"}),Q}if(F("gateway-create",{stage:"status",status:b.status,ok:b.status>=200&&b.status<300}),h.signal?.aborted){let Q=We(b.headers.location??"");b.status>=200&&b.status<300&&Be(Q)&&await we(t,{operation:"hangup",callId:Q}),h.signal.throwIfAborted()}let S=new Response(b.status===204?null:b.body,{status:b.status,headers:b.headers});if(!S.ok)throw await n(S,g);return S}catch(b){throw K(),b}finally{h.signal?.removeEventListener("abort",K)}};return e.fetch=f,()=>{e.fetch===f&&(e.fetch=m)}}var uo="home-composer-mode-v1";function po(e){let t=e.document;if(!t?.querySelectorAll)return!1;let o=n=>(n.getBoundingClientRect?.()??{width:0}).width>0&&!n.closest?.("[hidden], [inert]");return[...t.querySelectorAll("[data-codex-composer-root]")].some(o)&&![...t.querySelectorAll("[data-chatgpt-composer]")].some(o)}function fo(e){let t=e.document;if(!t?.querySelectorAll)return!1;let o=t.querySelectorAll("button, [role='tab'], a"),n=!1,r=!1;for(let i of o){let a=(i.textContent??"").replace(/\s+/gu," ").trim();a!=="Chat"&&a!=="Work"||!(i.getAttribute("aria-selected")==="true"||i.getAttribute("aria-pressed")==="true"||i.getAttribute("data-state")==="active"||i.getAttribute("data-state")==="on")||(a==="Work"&&(n=!0),a==="Chat"&&(r=!0))}return n&&!r}function ke(e=globalThis){let t=e.localStorage;try{let o=t?.getItem(uo);if(o!=null&&o!==""){let n=o;if(o.startsWith("{")||o.startsWith('"')||o.startsWith("["))try{n=JSON.parse(o)}catch{n=o}if(n==="work")return!0;if(n==="chat")return!1}}catch{}return fo(e)||po(e)}var ze="8c002fd4e12c0ecb";var Qe="26.1027.61615",Ue="app-initial-18b189e867e7.js",Je="start-voice-221a396d38a5.js",Ye={initializeFrom:"initial",initialize:"oT",startShape:"module",voiceSessionSelector:"SPn",reactFactory:"FBt",reactDomFactory:"PNt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"MOr",CDr:"CDr",B1n:"B1n",SPn:"SPn",oTFrom:"initial",oT:"oT",aTFrom:"initial",aT:"aT",Ycr:"Ycr",Nir:"Nir",n0n:"n0n",Y1n:"Y1n",HJt:"HJt"},shared:{Qst:"Qst",FBt:"FBt",PNt:"PNt",Vot:"Vot"}},mo={initializeFrom:"primary",initialize:"Qp",startShape:"module",voiceSessionSelector:"etn",reactFactory:"pWt",reactDomFactory:"GFt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"p5n",CDr:"w6n",B1n:"_On",SPn:"etn",oTFrom:"primary",oT:"Qp",aTFrom:"primary",aT:"Zp",Ycr:"ofr",Nir:"yEn",n0n:"FOn",Y1n:"JOn",HJt:"Z6"},shared:{Qst:"klt",FBt:"pWt",PNt:"GFt",Vot:"_ct"}},ho={initializeFrom:"primary",initialize:"Yp",startShape:"module",voiceSessionSelector:"Xen",reactFactory:"pWt",reactDomFactory:"GFt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"l5n",CDr:"b6n",B1n:"pOn",SPn:"Xen",oTFrom:"primary",oT:"Yp",aTFrom:"primary",aT:"Jp",Ycr:"nfr",Nir:"hEn",n0n:"jOn",Y1n:"wOn",HJt:"J6"},shared:{Qst:"klt",FBt:"pWt",PNt:"GFt",Vot:"_ct"}},yo={initializeFrom:"primary",initialize:"gm",startShape:"module",voiceSessionSelector:"s$t",reactFactory:"OHt",reactDomFactory:"wPt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"x1n",CDr:"MQn",B1n:"Opn",SPn:"s$t",oTFrom:"primary",oT:"gm",aTFrom:"primary",aT:"hm",Ycr:"Zir",Nir:"ejn",n0n:"Kpn",Y1n:"zpn",HJt:"k3"},shared:{Qst:"uct",FBt:"OHt",PNt:"wPt",Vot:"ast"}},Ke={initializeFrom:"primary",initialize:"um",startShape:"entityBusiness",startT:"r",startN:"i",voiceSessionSelector:"qXt",reactFactory:"XVt",reactDomFactory:"KNt",prewarmController:"VoiceInstantConnectCacheController",initial:{MOr:"CQn",CDr:"PXn",B1n:"tdn",SPn:"qXt",oTFrom:"primary",oT:"um",aTFrom:"primary",aT:"lm",Ycr:"Xkn",Nir:"yAn",n0n:"ydn",Y1n:"fdn",HJt:"R2"},shared:{Qst:"Bst",FBt:"XVt",PNt:"KNt",Vot:"Fot"}},ie=[{platform:"darwin",version:Qe,initial:Ue,shared:"app-shared-601019a330d7.js",primary:"app-primary-75d53eef2374.js",start:Je,prewarm:"voice-prewarm-a7cd5160219e.js",settings:"voice-settings-320cf1212f2c.js",roles:mo},{platform:"darwin",version:"26.1027.30824",initial:"app-initial-60f141238751.js",shared:"app-shared-7815d5a1a42a.js",primary:"app-primary-95a0e6d83f1e.js",start:"start-voice-4c77215aa289.js",prewarm:"voice-prewarm-e49220ad61bd.js",roles:ho},{platform:"darwin",version:"26.1023.51421",initial:"app-initial-bc8256c3cccb.js",shared:"app-shared-e9f258fd3588.js",primary:"app-primary-b7f335b763ca.js",start:"start-voice-a0564cefdc95.js",prewarm:"voice-prewarm-53aefded152c.js",settings:"voice-settings-1a9f68eb7ae8.js",roles:yo},{platform:"darwin",version:"26.1021.31345",initial:"app-initial-feb30b196d11.js",shared:"app-shared-2cae01273bae.js",primary:"app-primary-7d7313419f84.js",start:"entity-business-profile-reference-b68063dfc05d.js",prewarm:"voice-prewarm-d672f1245523.js",settings:"voice-settings-14000f5c9fc2.js",roles:Ke},{platform:"win32",version:"26.1021.31345",initial:"app-initial-438d1df57f70.js",shared:"app-shared-955d52676f9c.js",primary:"app-primary-844e405f2b90.js",start:"entity-business-profile-reference-241c52d811f4.js",prewarm:"voice-prewarm-8b47c50a17ae.js",settings:"voice-settings-b1c1633136a5.js",roles:Ke},{platform:"darwin",version:"26.1016.62342",initial:"app-initial-dddef47d6ef6.js",shared:"app-shared-fc3316d48427.js",start:"start-voice-7cbf0a39d53b.js",prewarm:"voice-prewarm-5d107129ac1c.js",roles:Ye},{platform:"darwin",version:"26.1016.61520",initial:"app-initial-c95ddb62696e.js",shared:"app-shared-2eda13eb7044.js",start:"start-voice-18b08f0acdd7.js",prewarm:"voice-prewarm-94271e581c1b.js",roles:Ye}],Xe="26.1027.61615",$e="app-initial-18b189e867e7.js",Ze="app-shared-601019a330d7.js",et="avatar-overlay-native-page-920d05377bbe.js",ae=[{platform:"darwin",version:Xe,initial:$e,shared:Ze,overlay:et,init:"Adr",fetch:"Odr",fetchFrom:"initial",bridge:"LRt",services:"Vct",responseError:"Pdr",responseErrorFrom:"initial",capabilityInit:"Ler",capabilityFamily:"Ier",inferenceGateFamily:"Vfr"},{platform:"darwin",version:"26.1027.30824",initial:"app-initial-60f141238751.js",shared:"app-shared-7815d5a1a42a.js",overlay:"avatar-overlay-native-page-d9d400e751cd.js",init:"Edr",fetch:"wdr",fetchFrom:"initial",bridge:"LRt",services:"Vct",responseError:"Adr",responseErrorFrom:"initial",capabilityInit:"Ner",capabilityFamily:"Mer",inferenceGateFamily:"Lfr"},{platform:"darwin",version:"26.1023.51421",initial:"app-initial-bc8256c3cccb.js",shared:"app-shared-e9f258fd3588.js",overlay:"avatar-overlay-native-page-af6c3662f64f.js",init:"xir",fetch:"yir",fetchFrom:"initial",bridge:"QIt",services:"Sst",capabilityInit:"N4n",capabilityFamily:"M4n",inferenceGateFamily:"Par"},{platform:"darwin",version:"26.1021.31345",initial:"app-initial-feb30b196d11.js",shared:"app-shared-2cae01273bae.js",overlay:"avatar-overlay-native-page-d549db3706f1.js",fetch:"Htr",fetchFrom:"initial",bridge:"bIt",services:"Qot",capabilityInit:"l0n",capabilityFamily:"c0n",inferenceGateFamily:"Cnr"},{platform:"win32",version:"26.1021.31345",initial:"app-initial-438d1df57f70.js",shared:"app-shared-955d52676f9c.js",overlay:"avatar-overlay-native-page-1549fe5955e1.js",fetch:"Htr",fetchFrom:"initial",bridge:"bIt",services:"Qot",capabilityInit:"l0n",capabilityFamily:"c0n",inferenceGateFamily:"Cnr"},{platform:"darwin",version:"26.1016.62342",initial:"app-initial-dddef47d6ef6.js",shared:"app-shared-fc3316d48427.js",overlay:"avatar-overlay-native-page-ef8332c6a2fb.js",init:"Oit",fetch:"Eit",bridge:"AFt",responseError:"Mit",services:"ist",capabilityInit:"njr",capabilityFamily:"tjr",inferenceGateFamily:"uBr"},{platform:"darwin",version:"26.1016.61520",initial:"app-initial-c95ddb62696e.js",shared:"app-shared-2eda13eb7044.js",overlay:"avatar-overlay-native-page-fcc17283519a.js",init:"Oit",fetch:"Eit",bridge:"AFt",responseError:"Mit",services:"ist",capabilityInit:"njr",capabilityFamily:"tjr",inferenceGateFamily:"uBr"}],tt="26.1007.30912",go="app-initial-6350d04672d0.js",B="26.1106.51428",L="348410.1a97dde15f.js",ot="530142.1e51e7f4b2.js",nt="586788.c871bb9b7d.js",bo=[157963,74692,198336,543449,904485,459859,822019,431137,108823,208490,384218,843292,652289,907652,796195,144338,140959,587936,904817,426774,452048,490954,445991,612928,42903,363341,997826,223736,21878,89655,333490,422391,792483,530142],wo={startModuleId:"j9r7",prewarmModuleId:"oWM3",appScopeModuleId:"OWtl",appScopeExport:"u",routeScopeModuleId:"Oj9r",routeScopeExport:"GD",composerScopeModuleId:"Sd8U",composerScopeExport:"PR",storeModuleId:"bgok",storeExport:"MH",runtimeModuleId:"cY1t",runtimeEnableExport:"Iy",runtimeLoaderExport:"Re",reactModuleId:"zd8w",reactDomModuleId:"CE87",startInitializeExport:"initializeVoiceSession",prewarmControllerExport:"VoiceInstantConnectCacheController",conversationModuleId:"MrGp",backendConversationExport:"jS",transcriptMappingExport:"Jv",currentNodeExport:"Od",locationModuleId:"nlNF",locationExport:"x2",navigationModuleId:"E8Sp",navigationExport:"oo",conversationPathModuleId:"jAnS",conversationPathExport:"mv"},P={fetchFactoryId:"GDNt",fetchExport:"_n",bridgeModuleId:"TL6G",bridgeExport:"O1",responseErrorModuleId:"eShZ",responseErrorExport:"s1",capabilityModuleId:"ChYf",capabilityExport:"G",inferenceGateModuleId:"OMIV",inferenceGateExport:"JW",voiceAccessModuleId:"eFn4",voiceAccessExport:"Y3"},rt={accessPolicy:"realtime-voice",enableStatsig:"2380644311",firstPartyStatsig:"3683713372",unsupportedAuthReason:"unsupported-auth",inAppVoiceFeature:"in_app_voice",capabilityFamilyKind:"readable-family",inferenceGateFamilyKind:"signal-family",accessAtomLibrary:"un",capabilityAtomLibrary:"i1",accessFactoryCache:"string"};function U(e){return e.desktopVersion===B&&(e.desktopPlatform==="darwin"||e.desktopPlatform==="win32")}function J(e){return e.desktopVersion===B&&e.desktopPlatform==="darwin"}function vo(){let e=new Set([tt,B]);for(let t of ie)e.add(t.version);for(let t of ae)e.add(t.version);return[...e].sort()}var ko={workVersion:Xe,workInitial:$e,workShared:Ze,overlayAsset:et,chatVersion:Qe,chatInitial:Ue,chatStart:Je,hashedVersion:B,hashedRuntimeAsset:L,hashedStartAsset:ot,hashedPrewarmAsset:nt,historicalCpaVersion:tt,historicalCpaInitial:go},bn={...ko,overlayHookDesktopVersions:vo()};function Vo(e){if(e.desktopVersion){if(J(e))return"hashed";if(ie.some(t=>t.version===e.desktopVersion&&(e.desktopPlatform===void 0||t.platform===e.desktopPlatform)))return"named"}}function Ve(e){if(!Vo(e))return e.desktopVersion?e.desktopVersion===B&&e.desktopPlatform==="win32"?"Chat voice is not qualified on this Windows Desktop.":"Chat voice is not qualified on this Desktop.":"Chat voice is waiting for Desktop identity."}function se(e){if(!J(e)&&!(e.desktopVersion!==void 0&&ae.some(t=>t.version===e.desktopVersion&&(e.desktopPlatform===void 0||t.platform===e.desktopPlatform))))return e.desktopVersion?e.desktopVersion===B&&e.desktopPlatform==="win32"?"Work voice is not qualified on this Windows Desktop.":"Work voice is not qualified on this Desktop.":"Work voice is waiting for Desktop identity."}function it(e,t,o){return`${e}:${t??"unknown"}:${o??"unknown"}`}function Eo(e){let t=0xcbf29ce484222325n;for(let o=0;o<e.length;o+=1)t^=BigInt(e.charCodeAt(o)),t=t*0x100000001b3n&0xffffffffffffffffn;return t.toString(16).padStart(16,"0")}function So(e){return Eo(JSON.stringify(e))}function at(){return[...ie.map(e=>({path:"chat",platform:e.platform,version:e.version})),...ae.map(e=>({path:"work-codex",platform:e.platform,version:e.version}))]}function xo(e,t,o){if(e==="chat"){if(U({desktopVersion:o,desktopPlatform:t}))return{kind:"hashed-chat",platform:t,version:o,roles:wo,chunks:[...bo],webpack:L,start:ot,prewarm:nt};let r=ie.find(i=>i.platform===t&&i.version===o);return r?{kind:"named-chat",platform:r.platform,version:r.version,initial:r.initial,shared:r.shared,primary:r.primary??null,start:r.start,prewarm:r.prewarm,settings:r.settings??null,roles:r.roles}:void 0}let n=ae.find(r=>r.platform===t&&r.version===o);if(n)return{kind:"named-work",platform:n.platform,version:n.version,initial:n.initial,shared:n.shared,overlay:n.overlay,init:n.init??null,fetch:n.fetch,fetchFrom:n.fetchFrom??null,bridge:n.bridge,services:n.services,responseError:n.responseError??null,responseErrorFrom:n.responseErrorFrom??null,capabilityInit:n.capabilityInit,capabilityFamily:n.capabilityFamily,inferenceGateFamily:n.inferenceGateFamily};if(U({desktopVersion:o,desktopPlatform:t}))return{kind:"hashed-work",platform:t,version:o,overlay:P,webpack:L}}function Ee(e,t,o){let n=xo(e,t,o);return n?So(n):void 0}function st(){return ze}var Co=["structural","activation","connection","identity","speech","cleanup"],Ao=Co;function ct(e){return e!==null&&typeof e=="object"}function _(e){return Ao.filter(t=>e.stages[t]!==!0)}function xe(e){return e==="chat"?"chat":"work"}function Ro(e){let t=it(xe(e.path),e.platform,e.desktopVersion);if(e.profileKey!==t)return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"evidence-profile-mismatch"};if(typeof e.implementationRevision!="string"||e.implementationRevision==="")return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"missing-implementation-revision"};if(e.policy!=="legacy-retained"&&e.implementationRevision!==st())return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"implementation-revision-mismatch"};if(e.policy!=="legacy-retained"&&(typeof e.desktopBuild!="string"||e.desktopBuild===""||typeof e.asarDigest!="string"||e.asarDigest===""))return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"missing-native-identity"};if(typeof e.profileDigest!="string"||e.profileDigest==="")return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"missing-profile-digest"};let o=Ee(xe(e.path),e.platform,e.desktopVersion);if(!o||e.profileDigest!==o)return{outcome:"mismatch",qualified:!1,missing:_(e),reason:"stale-profile-digest"};if(e.startAcknowledged===!0&&e.connected!==!0)return{outcome:"incomplete",qualified:!1,missing:_(e).length>0?_(e):["connection"],reason:"start-acknowledged-without-connection"};if(e.path!=="chat"&&e.gatewayOwned!==!0&&e.stages.connection===!0)return{outcome:"incomplete",qualified:!1,missing:_(e).length>0?_(e):["connection"],reason:"route-only-without-connected-gateway"};if(e.speech?.attended===!0&&(!e.speech.witness||!e.speech.run))return{outcome:"incomplete",qualified:!1,missing:_(e).includes("speech")?_(e):["speech"],reason:"attended-speech-missing-provenance"};if(e.speech&&e.speech.attended!==!0)return{outcome:"incomplete",qualified:!1,missing:_(e),reason:"synthetic-speech-is-not-qualification"};let n=_(e);return n.length>0?{outcome:"incomplete",qualified:!1,missing:n,reason:`missing:${n.join(",")}`}:e.connected!==!0||e.conversationMatched!==!0||(e.path==="chat"?e.harnessMatched!==void 0&&e.harnessMatched!==!0:e.harnessMatched!==!0)||e.speech?.attended!==!0||e.speech.bothDirections!==!0||e.cleanup?.ended!==!0||e.cleanup.microphoneReleased!==!0?{outcome:"fail",qualified:!1,missing:[],reason:"required-assertions-failed"}:{outcome:"pass",qualified:!0,missing:[],reason:"qualified"}}function _o(e,t){return e.platform!==t.desktopPlatform||e.desktopVersion!==t.desktopVersion||e.implementationRevision!==t.implementationRevision?!1:e.policy==="legacy-retained"?!0:typeof e.desktopBuild!="string"||e.desktopBuild===""||typeof e.asarDigest!="string"||e.asarDigest===""||typeof t.desktopBuild!="string"||t.desktopBuild===""||typeof t.asarDigest!="string"||t.asarDigest===""||typeof t.implementationRevision!="string"||t.implementationRevision===""?!1:e.desktopBuild===t.desktopBuild&&e.asarDigest===t.asarDigest}function Ce(e,t){return lt(t,e)}function lt(e,t){let o=t.isolatedQualification;return!me(o)||!De(o).includes(e)||oe(o.appPath)||oe(t.desktopAppPath)||o.desktopPlatform!==t.desktopPlatform?!1:o.desktopVersion===t.desktopVersion&&o.desktopBuild===t.desktopBuild&&o.asarDigest===t.asarDigest&&o.appPath===t.desktopAppPath&&o.implementationRevision===t.implementationRevision&&typeof t.desktopBuild=="string"&&t.desktopBuild!==""&&typeof t.asarDigest=="string"&&t.asarDigest!==""&&typeof t.desktopAppPath=="string"&&t.desktopAppPath!==""&&typeof t.implementationRevision=="string"&&t.implementationRevision!==""}function Io(e,t){return e==="chat"?Ve(t)??"Chat voice is not qualified on this Desktop.":se(t)??"Work voice is not qualified on this Desktop."}function Se(e,t,o){if(!t.desktopVersion||!t.desktopPlatform)return{enabled:!1,policy:"unreviewed",reason:"waiting-for-identity"};let n=o.filter(a=>a.path===e);if(n.length>0){let a=n.filter(u=>_o(u,t));if(a.length===0)return{enabled:!1,policy:"unreviewed",reason:"stale-or-wrong-platform-evidence"};for(let u of a){let d=Ro(u);if(!d.qualified)return{enabled:!1,policy:"unreviewed",reason:d.reason}}let c=a[0];if(!c)return{enabled:!1,policy:"unreviewed",reason:"missing-evidence"};if(!(U(t)&&!J(t)))return{enabled:!0,policy:c.policy==="legacy-retained"?"legacy-retained":"reviewed"}}return Ee(xe(e),t.desktopPlatform,t.desktopVersion)?at().find(a=>a.path===e&&a.platform===t.desktopPlatform&&a.version===t.desktopVersion)?{enabled:!0,policy:"legacy-retained",reason:"legacy-retained-named-profile"}:lt(e,t)?{enabled:!0,policy:"unreviewed",reason:"isolated-qualification"}:{enabled:!1,policy:"unreviewed",reason:"missing-evidence"}:{enabled:!1,policy:"unreviewed",reason:Io(e,t)}}function dt(e){return ct(e)?typeof e.profileKey=="string"&&typeof e.platform=="string"&&typeof e.desktopVersion=="string"&&typeof e.implementationRevision=="string"&&typeof e.profileDigest=="string"&&(e.path==="chat"||e.path==="work-codex"||e.path==="work-grok")&&ct(e.stages):!1}function Po(e){return(e.voiceEvidence??[]).filter(dt)}function ut(e){let t=[...Po(e),...e.evidence&&dt(e.evidence)?[e.evidence]:[]],o=Se("chat",e,t),n=Se("work-codex",e,t),r=Se("work-grok",e,t);return{chat:o,"work-codex":n,"work-grok":r,work:n}}function Oo(e){return ut(e).chat.enabled}function W(e,t){return To(e,t).enabled}function To(e,t){let o=M(e);return o?ut(o)[t]:{enabled:!1,policy:"unreviewed",reason:se({})??"Work voice is not qualified on this Desktop."}}function ce(e,t){let o=M(e)??{};return se(o)??"Work voice is not qualified on this Desktop."}function pt(e){let t=M(e)??{};return Ve(t)??"Chat voice is not qualified on this Desktop."}function ft(e){let t=M(e);return t?Oo(t):!1}var le="__codexhostClientOwnedVoiceV1",mt="codexhost.voice-routes-cache.v1",Do="codexhost.cpa-live-voice.v1",Fo="codexhost.chat-live-voice.v1";function I(e){return e!==null&&typeof e=="object"}function Re(e){try{return(e.location?.href??globalThis.location?.href??"").includes("avatar-overlay")}catch{return!1}}function Ho(e){let t=e.document;if(!t?.querySelectorAll)return;let o=i=>(i.getBoundingClientRect?.()??{width:0}).width>0&&!i.closest?.("[hidden], [inert]"),n=[...t.querySelectorAll("[data-chatgpt-composer]")].some(o),r=[...t.querySelectorAll("[data-codex-composer-root]")].some(o);if(n&&!r)return"chat";if(r&&!n)return"work"}function Ae(e){Re(e)||re({productExperience:Ho(e)??(ke(e)?"work":"chat")},e)}function Lo(e){return J(e)?!0:U(e)?Ce(e,"work-codex")||Ce(e,"work-grok"):!1}function No(e){return Lo(e)}function ht(e,t){try{let o=JSON.parse(e.localStorage?.getItem(mt)??"null");return I(o)?o[t]:void 0}catch{return}}function jo(e){try{let t=JSON.parse(e.localStorage?.getItem(mt)??"null");return I(t)?t.chatExperience:void 0}catch{return}}function yt(e,t,o){let n=e.localStorage;if(!n)return o;try{let r=n.getItem(t);return o?r!=="0":r==="1"}catch{return o}}function Mo(e){let t=ht(e,"workConnection");return t!==void 0?t==="gateway":yt(e,Do,!0)}function Bo(e){let t=jo(e),o=ht(e,"chatConnection");return t!==void 0||o!==void 0?t==="codex"&&o==="gateway":yt(e,Fo,!1)}function Wo(e){return e!==null&&(typeof e=="object"||typeof e=="function")?e:void 0}function gt(e){let t=Wo(e);if(!t)return e;let o=Reflect.get(t,"getInstance");return typeof o=="function"?o.call(t):t}function $(e){let t=gt(e);if(!(!I(t)||typeof t.fetch!="function"))return t}function qo(e){let t=gt(e);if(!(!I(t)||typeof t.dispatchMessage!="function"||typeof t.subscribe!="function"))return t}function Go(e){return typeof e=="function"}function bt(e,t){return e.c?.[t]?.exports}function Ie(e,t,o){let n=e.c,r=n?.[t];if(!(!n||!r||o(r.exports)))try{Reflect.deleteProperty(n,t)}catch{}}function _e(e,t){let o=bt(e,t);if(I(o)&&Object.keys(o).length>0)return o;try{return e(t)}catch{Ie(e,t,n=>I(n)&&Object.keys(n).length>0);return}}function zo(e){let t=P.fetchFactoryId,o=P.fetchExport,n=bt(e,t);if($(I(n)?n[o]:void 0))return n;if(Ie(e,t,r=>!!$(I(r)?r[o]:void 0)),typeof e.m?.[t]!="function")return _e(e,t)}function Yo(e,t){let o=e.m,n=P.fetchFactoryId,r=o?.[n];if(!o||typeof r!="function")return;let i=r.__codexhostVoiceFactory===!0&&typeof r.__codexhostVoiceOriginal=="function",a=i?r.__codexhostVoiceOriginal:r,c=i?r:function(u,d,p){try{return a.apply(this,[u,d,p])}finally{try{c.__codexhostVoiceSubscriber?.(d??u?.exports)}catch{}}};return c.__codexhostVoiceFactory=!0,c.__codexhostVoiceOriginal=a,c.__codexhostVoiceSubscriber=t,i||(o[n]=c),()=>{c.__codexhostVoiceSubscriber===t&&(Reflect.deleteProperty(c,"__codexhostVoiceSubscriber"),o[n]===c&&(o[n]=a))}}async function Ko(e){let o=(await e(`app://-/assets/${L}`))?.__webpack_require__;if(!Go(o))return null;let n=P,r=zo(o),i=$(I(r)?r[n.fetchExport]:void 0),a=_e(o,n.bridgeModuleId),c=qo(I(a)?a[n.bridgeExport]:void 0),u=_e(o,n.responseErrorModuleId),d=I(u)?u[n.responseErrorExport]:void 0;return!c||typeof d!="function"?null:i?{client:i,bridge:c,responseError:d,require:o}:typeof o.m?.[P.fetchFactoryId]!="function"?null:{bridge:c,responseError:d,require:o}}function wt(e={}){let t=e.target??globalThis,o=t[le];if(o)return o;let n=M(t);if(!n)return{status:"disabled",dispose(){}};if(!No(n))return{status:"unsupported",dispose(){}};let r=e.importModule??(x=>import(x)),i=!1,a,c,u,d,p=new WeakSet,l=Date.now(),s={assetSeen:!1,importStarted:!1,importResolved:!1,factoryHooked:!1,wrapperActive:!1},y=t.document,m=()=>Ae(t),f={status:"pending",activation:s,dispose(){i=!0,a!==void 0&&t.clearTimeout(a),c!==void 0&&t.clearTimeout(c),y?.removeEventListener?.("pointerdown",m,!0),d?.(),u?.(),t[le]===f&&Reflect.deleteProperty(t,le)}};t[le]=f,y?.addEventListener?.("pointerdown",m,!0);let g=()=>{i||(Ae(t),c=t.setTimeout(g,250))};g();let h=(x,E,v)=>{if(p.has(x)){s.wrapperActive=!0,f.status="active";return}p.add(x);let T=Ge(x,E,()=>Mo(t),v,()=>Bo(t),()=>!Re(t)&&ke(t),()=>!1,()=>Re(t),()=>W(t,"work-grok"),()=>W(t,"work-codex"),k=>k==="chat"?pt(t):ce(t,k==="external"?"work-grok":"work-codex"),()=>ft(t),()=>!1,()=>Le(t)),w=u;u=()=>{T(),w?.()},s.wrapperActive=!0,f.status="active"},V=async()=>{if(i||s.wrapperActive&&s.factoryHooked)return;Ae(t);let E=Fe(t.document,t.performance).some(v=>v.includes(L));if(E&&(s.assetSeen=!0),E){s.importStarted=!0;try{let v=await Ko(r);if(i||!v)i||(s.importFailed="hashed-exports-missing");else{let T=k=>{if(i)return;let R=$(I(k)?k[P.fetchExport]:void 0);if(!R){v.require&&Ie(v.require,P.fetchFactoryId,C=>!!$(I(C)?C[P.fetchExport]:void 0));return}h(R,v.bridge,v.responseError)};v.client&&(s.importResolved=!0,delete s.importFailed,h(v.client,v.bridge,v.responseError));let w=v.require?Yo(v.require,T):void 0;w&&(d=w,s.importResolved=!0,s.factoryHooked=!0,delete s.importFailed)}if(s.wrapperActive||s.factoryHooked)return;s.importFailed="hashed-exports-missing"}catch{s.importFailed="hashed-import-failed"}}a=t.setTimeout(()=>{V()},Date.now()-l>=5e3?1e3:250)};return V(),f}function vt(e){let o=s=>typeof s=="object"&&s!==null?s:null,n=()=>{let s=globalThis;return typeof s.dispatchEvent=="function"&&typeof CustomEvent=="function"&&s.dispatchEvent(new CustomEvent("codexhost:react-fiber-walk-limit",{detail:{limit:2e5}})),[]},r=o(e);if(!r)return[];let i=[],a=new Set;for(let s=r;s;s=o(s.return)){if(a.has(s))return[];if(a.size>=2e5)return n();a.add(s),i.push(s)}let c=o(i.at(-1)?.stateNode);if(!c||!("current"in c))return i;let u=o(c.current);if(!u)return[];let d=o(r.alternate),p=[u];a.clear(),a.add(u);for(let s=i.length-2;s>=0;s-=1){let y=i[s],m=o(y?.alternate),f=o(p.at(-1)?.child),g=!1;for(;f&&!a.has(f)&&a.size<2e5;){if(a.add(f),f===y||f===m){g=!0;break}f=o(f.sibling)}if(!g||!f)break;p.push(f)}if(p.length===i.length&&(p.at(-1)===r||p.at(-1)===d))return p.reverse();let l=[{node:u,parent:null}];for(a.clear();l.length>0&&a.size<2e5;){let s=l.pop();if(!s)break;if(a.has(s.node))return[];if(a.add(s.node),s.node===r||s.node===d){let f=[];for(let g=s;g;g=g.parent)f.push(g.node);return f}let y=s.parent&&o(s.node.sibling);y&&l.push({node:y,parent:s.parent});let m=o(s.node.child);m&&l.push({node:m,parent:s})}return l.length>0?n():[]}var Z=e=>e!==null&&typeof e=="object";function Pe(e,t,o=!1,n=!1){if(!Z(e)||e.productExperience!=="work"&&e.productExperience!=="codex"&&e.productExperience!=="chat")return!1;if(e.source==="composer_button_existing_thread"){if(!Z(e.locator)||e.locator.hostId!=="local")return!1}else if(e.source!=="composer_button_new_thread"||(e.hostId??"local")!=="local")return!1;if(e.productExperience==="chat")return o;let r=e.activeCollaborationMode,i=Z(r)?r.settings:void 0,a=Z(i)?i.model:void 0;return typeof a=="string"&&a.startsWith("codexhost/")?n:t||n}function kt(e,t){let o;return{async start(...n){let r=n[0],i=t.qualifies(r);if(!(t.configured?.(r)??i))return e(...n);if(!i)throw new Error(t.unavailable?.(r)??"Work voice is not qualified on this Desktop.");o&&(o.binding?.dispose(),o=void 0);let c={};o=c;let u=()=>o===c&&t.qualifies(n[0]);try{if(!await t.ready())throw new Error("Voice gateway is not ready");if(!u())throw new Error("Voice gateway start was cancelled");if(c.binding=await t.prepare(u),await t.committed(c.binding),!u())throw new Error("Voice gateway start was cancelled");if(!c.binding.current())throw new Error("Voice starter subscription changed");return re(n[0]),await e(...n)}finally{c.binding?.dispose(),o===c&&(o=void 0)}},cancel(){o?.binding?.dispose(),o=void 0}}}function Vt(e){let t=new Set;for(let o of e.querySelectorAll("[data-avatar-overlay-native-surface-id]")){let n=Object.getOwnPropertyNames(o).find(i=>i.startsWith("__reactFiber$")),r=vt(n&&Object.getOwnPropertyDescriptor(o,n)?.value);for(let i of r)Z(i)&&t.add(i)}return t}var Qo="3683713372",A=e=>e!==null&&typeof e=="object",O=e=>A(e)&&typeof e.isLoading=="boolean"&&typeof e.isError=="boolean"&&typeof e.isCapable=="boolean",q=(e,t)=>e.isLoading===t.isLoading&&e.isError===t.isError&&e.isCapable===t.isCapable;function Uo(e,t,o){let n=r=>{let i=new Set,a=512,c=0,u=d=>{if(--a<0)throw new Error("Voice capability dependency limit");let p=e.get(d);if(d===o){if(c+=1,typeof p!="boolean")throw new Error("Voice inference gate unavailable");return r?!1:p}if(d.write||i.has(d))return p;if(typeof d.read!="function")throw new Error("Voice dependency unavailable");i.add(d);try{return d.read(u)}finally{i.delete(d)}};return{value:u(t),hits:c}};try{let r=e.get(t);if(!O(r)||r.isLoading||r.isError)return null;let i=n(!1);if(!O(i.value)||!q(r,i.value))return null;let a=n(!0);return a.hits>0&&O(a.value)&&!a.value.isLoading&&!a.value.isError?a.value:null}catch{return null}}function St(e){return A(e)&&A(e.scope)&&typeof e.resolve=="function"}function Jo(e){return St(e)&&e.kind==="readable-family"&&typeof e.read=="function"}function Xo(e){return St(e)&&e.kind==="signal-family"}function $o(e){return A(e)&&A(e.scope)&&(typeof e.cache=="string"||A(e.cache))&&typeof e.resolve=="function"&&typeof e.createSubscriberAtom=="function"&&typeof e.read!="function"&&e.kind==null}function xt(e){let t=P,o,n,r;try{o=e(t.capabilityModuleId)}catch{return}try{n=e(t.inferenceGateModuleId)}catch{return}try{r=e(t.voiceAccessModuleId)}catch{return{reason:"access-shape"}}let i=A(o)?o[t.capabilityExport]:void 0,a=A(n)?n[t.inferenceGateExport]:void 0,c=A(r)?r[t.voiceAccessExport]:void 0;if(!(!Jo(i)||!Xo(a)))return $o(c)?{family:i,gates:a,access:c}:{reason:"access-shape"}}function Ct(e,t,o){try{let n=e.resolve(t,o);return A(n)&&typeof n.read=="function"&&!("atom"in n)?n:void 0}catch{return}}var Zo={status:"allowed"};function en(e){return A(e)&&e.status==="denied"&&e.reason===rt.unsupportedAuthReason}function At(e,t,o){let n=r=>{let i=new Set,a=512,c=0,u=d=>{if(--a<0)throw new Error("Voice capability dependency limit");let p=e.get(d);if(d===o)return c+=1,r&&en(p)?Zo:p;if(d.write||i.has(d))return p;if(typeof d.read!="function")throw new Error("Voice dependency unavailable");i.add(d);try{return d.read(u)}finally{i.delete(d)}};return{value:u(t),hits:c}};try{let r=e.get(t);if(!O(r)||r.isLoading||r.isError)return null;let i=n(!1);if(!O(i.value)||!q(r,i.value))return null;if(r.isCapable)return r;let a=n(!0);return a.hits>0&&O(a.value)&&!a.value.isLoading&&!a.value.isError&&a.value.isCapable?a.value:null}catch{return null}}function Et(e){let t=[],o=new Set,n=e.memoizedState;for(;A(n)&&t.length<4096&&!o.has(n);)o.add(n),t.push(n),n=n.next;return n==null?t:[]}function Rt(e,t,o,n,r=!1,i=["voice.realtime","voice.thread"],a){let c=e(),u=[],d=[];try{for(let l of c){let s=Et(l);for(let y of s){let[m,f]=Array.isArray(y.memoizedState)?y.memoizedState:[];if(!A(m)||!Array.isArray(f)||f.length!==5||f[3]!==t||!(f[1]instanceof Map)||f[2]!==void 0)continue;let g=f[1],h=g.get(t.scope.id),V=h?.familyBindings?.get(t);if(!h||!(V instanceof Map)||h.store!==m.store)continue;let x=[...V].filter(([,b])=>b.cacheKey===f[0]);if(x.length!==1||typeof x[0]?.[0]!="string")continue;let E=JSON.parse(x[0][0]);if(!A(E)||Object.keys(E).some(b=>b!=="name"&&b!=="hostId")||!i.some(b=>E.name===b)||r&&E.name!=="voice.realtime"||E.hostId!==void 0&&E.hostId!=="local"||E.name==="voice.thread"&&E.hostId!=="local")continue;let v=s.filter(b=>{let S=b.memoizedState;return Array.isArray(S)&&Array.isArray(S[1])&&S[1].length===2&&S[1][0]===m&&S[1][1]===void 0&&typeof S[0]?.getSnapshot=="function"});if(v.length!==1)throw new Error("Ambiguous voice subscription");let T=v[0],w=T.memoizedState[0],k=T.next?.queue,R=T.next?.next?.memoizedState,C=m.store,H=o.resolve(h,g,Qo)?.atom;if(!H||!k||!A(R)||!Array.isArray(R.deps)||R.deps[0]!==w.subscribe||typeof R.create!="function"||typeof k.getSnapshot!="function"||!O(C.get(m.atom))||!O(w.getSnapshot())||!O(k.getSnapshot())||!q(C.get(m.atom),w.getSnapshot())||!q(w.getSnapshot(),k.getSnapshot())||w.createRender?.()!=null)throw new Error("Unsupported voice subscription");for(let[b,S]of[[C,"sub"],[w,"getSnapshot"],[k,"getSnapshot"]])if(Object.getOwnPropertyDescriptor(b,S)?.writable!==!0)throw new Error("Voice subscription is not writable");let Y,X=C.sub;try{C.sub=(b,S)=>{if(b!==m.atom||Y)throw new Error("Unexpected voice subscription");return Y=S,()=>{}},R.create()}finally{C.sub=X}if(!Y)throw new Error("Voice listener unavailable");let te=w.getSnapshot,D=k.getSnapshot,N,j=()=>{let b=te.call(w);if(!n())return b;let S=a?a({native:b,store:C,atom:m.atom,gate:H,node:h,chain:g}):Uo(C,m.atom,H);return!S||!S.isCapable?b:((!N||!q(N,S))&&(N=S),N)};w.getSnapshot=j,k.getSnapshot=j;let K=Y;u.push(()=>{w.getSnapshot===j&&(w.getSnapshot=te),k.getSnapshot===j&&(k.getSnapshot=D),K()}),d.push({subscriber:w,signal:m,instance:k}),K()}}if(!u.length)throw new Error("Owned voice capability unavailable");if(r&&u.length!==1)throw new Error("Ambiguous voice starter")}catch(l){for(let s of u.reverse())s();throw l}let p=({subscriber:l,instance:s})=>{try{let y=l.getSnapshot(),m=s.getSnapshot();return!O(y)||!O(m)||!q(y,m)?void 0:y}catch{return}};return{dispose(){for(let l of u.splice(0).reverse())l()},current(){let l=[...e()].flatMap(Et);return d.every(s=>{let y=p(s);if(!y)return!1;let{subscriber:m,signal:f,instance:g}=s;return l.some(h=>{let V=h.next?.memoizedState;return Array.isArray(h.memoizedState)&&h.memoizedState[0]===m&&h.memoizedState[1]?.[0]===f&&h.next?.queue===g&&O(V)&&q(V,y)&&(!r||y.isCapable)})})},projectedCapable(){return d.length>0&&d.every(l=>p(l)?.isCapable===!0)}}}function de(e){try{let t=new URL(e);return t.pathname==="/avatar-overlay.html"?!0:t.searchParams.get("initialRoute")==="/avatar-overlay"}catch{return!1}}var G=e=>e!==null&&typeof e=="object",ee="__codexhostVoiceCapabilityV1",_t=1e3,It=50,Pt=40;function Ot(e){let t=e[ee];if(!(!G(t)||t.status!=="active"||typeof t.current!="function"||typeof t.dispose!="function"))return t}function Oe(e){let t=G(e)?e.activeCollaborationMode:void 0,o=G(t)?t.settings:void 0,n=G(o)?o.model:void 0;return typeof n=="string"&&n.startsWith("codexhost/")?"work-grok":"work-codex"}function tn(e,t=()=>ge(e),o=()=>Ne(e),n=()=>!1){return{configured:i=>Pe(i,t(),o(),n()||Oe(i)==="work-grok"),qualifies:i=>{let a=Oe(i);return Pe(i,a==="work-codex"&&t()&&W(e,"work-codex"),o(),a==="work-grok"&&W(e,"work-grok"))},unavailable:i=>ce(e,Oe(i)),ready:async()=>{for(let i=0;i<Pt;i+=1){let a=e.__codexhostClientOwnedVoiceV1;if(G(a)&&a.status==="active"&&Ot(e)!==void 0)return!0;await new Promise(c=>e.setTimeout(c,It))}return!1},prepare:async()=>{let i=Ot(e);if(!i)throw new Error("Overlay voice capability is not ready");return{dispose(){},current:()=>e[ee]===i&&i.current()}},committed:async i=>{for(let a=0;a<Pt&&!i.current();a+=1)await new Promise(c=>e.setTimeout(c,It))}}}function Tt(e,t){let o=e.realtimeVoiceRuntime;if(!G(o)&&typeof o!="function")return;let n=Reflect.get(o,"registerRealtimeStarter"),r=Reflect.get(o,"unregisterRealtimeStarter");if(typeof n!="function")return;let i=new Set,a=tn(t),c=new Proxy(o,{get(u,d,p){return d==="registerRealtimeStarter"?(l,s,...y)=>{if(typeof l!="function"||typeof s!="function")throw new Error("Voice starter callback unavailable");let m=kt(l,a);return i.add(m),Reflect.apply(n,o,[m.start,(...f)=>(m.cancel(),s(...f)),...y])}:d==="unregisterRealtimeStarter"&&typeof r=="function"?(...l)=>{for(let s of i)s.cancel();return i.clear(),Reflect.apply(r,o,l)}:Reflect.get(u,d,p)}});if(Reflect.set(e,"realtimeVoiceRuntime",c))return()=>{for(let u of i)u.cancel();i.clear(),e.realtimeVoiceRuntime===c&&(e.realtimeVoiceRuntime=o)}}function Dt(e,t){let o=e.location?.href??"";if(!de(o)||!e.document)return;let n=e.document,r=!1,i,a,c={status:"pending",reason:"access-replay",current:()=>a?.current()===!0,dispose(){r||(r=!0,i!==void 0&&e.clearTimeout(i),a?.dispose(),a=void 0,e[ee]===c&&Reflect.deleteProperty(e,ee))}};e[ee]=c;let u=()=>{let p=e.__codexhostClientOwnedVoiceV1;return G(p)&&p.status==="active"&&(ge(e)||W(e,"work-grok"))},d=()=>{if(r)return;let p=xt(t);if(!p||"reason"in p){c.status="pending",i=e.setTimeout(d,_t);return}if(!a||!a.current()){a?.dispose(),a=void 0;try{let l=({store:s,atom:y,node:m,chain:f})=>{let g=Ct(p.access,m,f);return g?At(s,y,g):null};a=Rt(()=>Vt(n),p.family,p.gates,u,!0,["voice.realtime","voice.thread"],l)}catch{a=void 0}}a?.projectedCapable()===!0?c.status!=="active"&&(c.status="active",F("voice-capability",{status:"active",reason:"access-replay"})):c.status="pending",i=e.setTimeout(d,_t)};return d(),c.dispose}var ue="__codexhostOverlayVoiceBootstrapV1",on="hashed-overlay-voice-bootstrap-v1",z="GaA7",nn=250;function rn(e){let t=e.c?.[z]?.exports;if(t===null||typeof t!="object")return;let o=Reflect.get(t,"appServices");return o!==null&&typeof o=="object"?o:void 0}function an(e,t){let o=e.m,n=o?Object.getOwnPropertyDescriptor(o,z):void 0;if(!o||n&&!("value"in n))return;let r=new WeakMap,i=[],a=!0,c=typeof n?.value=="function"?n.value:void 0,u,d=l=>{if(l===null||typeof l!="object")return;let s=r.get(l);if(s)return s;let y=new Proxy(l,{get(m,f,g){let h=Reflect.get(m,f,g);if(a&&f==="appServices"&&h!==null&&typeof h=="object")try{t(h)}catch{}return h}});return r.set(l,y),y};if(!Reflect.defineProperty(o,z,{configurable:!0,enumerable:n?.enumerable??!0,get:()=>{if(c)return u??=function(l,s,y){let m=d(s);if(m&&l!==null&&typeof l=="object"){let f=l;Reflect.set(f,"exports",m)&&i.push(()=>{f.exports===m&&Reflect.set(f,"exports",s)})}return Reflect.apply(c,this,[l,m??s,y])},u},set:l=>{c=typeof l=="function"?l:void 0,u=void 0}}))return;i.push(()=>{let l=c;l&&l!==n?.value?Reflect.defineProperty(o,z,{value:l,writable:!0,enumerable:!0,configurable:!0}):n?Reflect.defineProperty(o,z,n):Reflect.deleteProperty(o,z)});let p=e.c?.[z];if(p&&typeof p=="object"&&p.exports!=null){let l=p.exports,s=d(l);s&&s!==l&&Reflect.set(p,"exports",s)&&i.push(()=>{p.exports===s&&Reflect.set(p,"exports",l)})}return()=>{a=!1;for(let l of i.reverse())l()}}function sn(e,t={}){if(!de(e.location?.href??"")||!e.document)return;let o=Reflect.get(e,ue);typeof o?.dispose=="function"?o.dispose():Reflect.get(e,"__codexhostClientOwnedVoiceV1")?.dispose?.();let n=[],r=!1,a={version:on,dispose:()=>{if(!r){r=!0;for(let u of n.splice(0).reverse())try{u()}catch{}Reflect.get(e,ue)===a&&Reflect.deleteProperty(e,ue)}}};Reflect.set(e,ue,a);let c=t.importRuntime??(u=>import(u));return queueMicrotask(()=>{if(r)return;let u=wt({target:e});n.push(()=>u.dispose());let d,p;n.push(()=>{d!==void 0&&e.clearTimeout(d),p!==void 0&&e.clearTimeout(p)});let l,s=!1,y=new WeakSet,m=()=>{s||r||(s=!0,p=e.setTimeout(()=>{if(r||!l)return;let h=Dt(e,l);h&&n.push(h)},0))},f=h=>{if(r)return!1;if(y.has(h))return!0;let V=Tt(h,e);return V?(y.add(h),n.push(V),m(),!0):!1},g=async()=>{if(!r){try{if(!l){let V=await c(`app://-/assets/${L}`);if(r)return;let x=V.__webpack_require__;if(typeof x=="function"){l=x;let E=an(l,f);E&&n.push(E)}}let h=l?rn(l):void 0;if(h&&f(h))return}catch{}r||(d=e.setTimeout(()=>{g()},nn))}};g()}),a}sn(globalThis);})();
@@ -666,7 +666,7 @@
666
666
  }
667
667
 
668
668
  // src/renderer-voice-implementation-revision.generated.ts
669
- var VOICE_IMPLEMENTATION_REVISION = "af0ca16ef25a57ae";
669
+ var VOICE_IMPLEMENTATION_REVISION = "8c002fd4e12c0ecb";
670
670
 
671
671
  // src/renderer-voice-profiles.ts
672
672
  var NATIVE_CHAT_VOICE_VERSION = "26.1027.61615";
@@ -1,12 +1,12 @@
1
1
  {
2
- "implementationRevision": "af0ca16ef25a57ae",
2
+ "implementationRevision": "8c002fd4e12c0ecb",
3
3
  "reviewedEvidence": [
4
4
  {
5
5
  "profileKey": "chat:darwin:26.1106.51428",
6
6
  "platform": "darwin",
7
7
  "desktopVersion": "26.1106.51428",
8
8
  "path": "chat",
9
- "implementationRevision": "af0ca16ef25a57ae",
9
+ "implementationRevision": "8c002fd4e12c0ecb",
10
10
  "testedImplementationRevision": "5f84eb365e1b6736",
11
11
  "profileDigest": "257e2cb6360c49f7",
12
12
  "policy": "reviewed",
@@ -41,11 +41,11 @@
41
41
  "desktopVersion": "26.1106.51428",
42
42
  "desktopBuild": "26605",
43
43
  "asarDigest": "sha256:f50357bec2aa563f5a510ae7d1a343ca245040aae074fa79c8a22b6d39c7df0a",
44
- "implementationRevision": "af0ca16ef25a57ae",
44
+ "implementationRevision": "8c002fd4e12c0ecb",
45
45
  "testedImplementationRevision": "5f84eb365e1b6736",
46
46
  "reviewedAt": "2026-11-19",
47
47
  "reference": "docs/operations/cpa-live-voice-desktop-hook.md#reviewed-macos-activation",
48
- "basis": "Preserve the original attended speech and cleanup evidence at testedImplementationRevision. Development revision 0c3365a8fe85a79a on 26.1106.51428 build 26605 re-drove official Chat Start to End Voice and Work Codex plus selected Grok Start to Stop/mute with gateway HTTP 201. Current source adds committed-subscription readiness, selected-lane qualification, retry and owned disposal for overlay capability and WebFetch factory, and protects fresh Work starts from abandoned Chat cleanup. Focused regression tests cover these changes; fresh attended bidirectional speech remains attributed to the original tested revision. Compatibility carry-forward from 0114f1b1ec833935 to af0ca16ef25a57ae moves unchanged starter and subscription functions into schema-free modules, moves unchanged route-read helpers to their cache owner, and minifies only the overlay bootstrap. Native start, qualification, replay, cancellation and selected-Harness behavior remain unchanged. The build-time identity traversal now parses multiline import and re-export declarations, covering these extracted helpers and the existing local runtime graph; focused mutations verify changes invalidate the identity. Original attended speech and cleanup provenance is preserved; later live controls and gateway checks are recorded separately.",
48
+ "basis": "Preserve the original attended speech and cleanup evidence at testedImplementationRevision. Development revision 0c3365a8fe85a79a on 26.1106.51428 build 26605 re-drove official Chat Start to End Voice and Work Codex plus selected Grok Start to Stop/mute with gateway HTTP 201. Current source adds committed-subscription readiness, selected-lane qualification, retry and owned disposal for overlay capability and WebFetch factory, and protects fresh Work starts from abandoned Chat cleanup. Focused regression tests cover these changes; fresh attended bidirectional speech remains attributed to the original tested revision. Compatibility carry-forward from 0114f1b1ec833935 to af0ca16ef25a57ae moves unchanged starter and subscription functions into schema-free modules, moves unchanged route-read helpers to their cache owner, and minifies only the overlay bootstrap. Native start, qualification, replay, cancellation and selected-Harness behavior remain unchanged. The build-time identity traversal now parses multiline import and re-export declarations, covering these extracted helpers and the existing local runtime graph; focused mutations verify changes invalidate the identity. Original attended speech and cleanup provenance is preserved; later live controls and gateway checks are recorded separately. Scoped compatibility carry-forward from af0ca16ef25a57ae to 8c002fd4e12c0ecb repairs cold overlay bootstrap initialization: cache-only service discovery avoids an absent GaA7 require, and observation of the native factory/export read wraps starter registration before capability readiness. Disposal restores owned factory and cached exports. Actual Orca Codex review of the exact two-file repair passed the pinned cold document-start path on 2026-11-19; focused held-callback and disposal regressions pass. A development native cold-document reload mounts the overlay with active client/capability and no page or cached-module errors; one inline CSP console violation is retained. Already-held callbacks and retained pre-observation namespaces require a fresh native document initialization and are not retroactively intercepted. Clean published Work activation remains blocked by native screen-lock cancellation; no fresh attended speech or release acceptance is claimed. Original tested speech and cleanup revisions remain unchanged.",
49
49
  "nativeArchiveSha256": "3695c17edcab8d66c1e5f2faa03e07826a59a39bf78b369ec87854547d4843c1",
50
50
  "nativeIdentityDigestKind": "ElectronAsarIntegrity"
51
51
  }
@@ -55,7 +55,7 @@
55
55
  "platform": "darwin",
56
56
  "desktopVersion": "26.1106.51428",
57
57
  "path": "work-codex",
58
- "implementationRevision": "af0ca16ef25a57ae",
58
+ "implementationRevision": "8c002fd4e12c0ecb",
59
59
  "testedImplementationRevision": "f6f9c208ad38f922",
60
60
  "profileDigest": "585c26fefb43da96",
61
61
  "policy": "reviewed",
@@ -90,11 +90,11 @@
90
90
  "desktopVersion": "26.1106.51428",
91
91
  "desktopBuild": "26605",
92
92
  "asarDigest": "sha256:f50357bec2aa563f5a510ae7d1a343ca245040aae074fa79c8a22b6d39c7df0a",
93
- "implementationRevision": "af0ca16ef25a57ae",
93
+ "implementationRevision": "8c002fd4e12c0ecb",
94
94
  "testedImplementationRevision": "f6f9c208ad38f922",
95
95
  "reviewedAt": "2026-11-19",
96
96
  "reference": "docs/operations/cpa-live-voice-desktop-hook.md#reviewed-macos-activation",
97
- "basis": "Preserve the original attended speech and cleanup evidence at testedImplementationRevision. Development revision 0c3365a8fe85a79a on 26.1106.51428 build 26605 re-drove official Chat Start to End Voice and Work Codex plus selected Grok Start to Stop/mute with gateway HTTP 201. Current source adds committed-subscription readiness, selected-lane qualification, retry and owned disposal for overlay capability and WebFetch factory, and protects fresh Work starts from abandoned Chat cleanup. Focused regression tests cover these changes; fresh attended bidirectional speech remains attributed to the original tested revision. Compatibility carry-forward from 0114f1b1ec833935 to af0ca16ef25a57ae moves unchanged starter and subscription functions into schema-free modules, moves unchanged route-read helpers to their cache owner, and minifies only the overlay bootstrap. Native start, qualification, replay, cancellation and selected-Harness behavior remain unchanged. The build-time identity traversal now parses multiline import and re-export declarations, covering these extracted helpers and the existing local runtime graph; focused mutations verify changes invalidate the identity. Original attended speech and cleanup provenance is preserved; later live controls and gateway checks are recorded separately.",
97
+ "basis": "Preserve the original attended speech and cleanup evidence at testedImplementationRevision. Development revision 0c3365a8fe85a79a on 26.1106.51428 build 26605 re-drove official Chat Start to End Voice and Work Codex plus selected Grok Start to Stop/mute with gateway HTTP 201. Current source adds committed-subscription readiness, selected-lane qualification, retry and owned disposal for overlay capability and WebFetch factory, and protects fresh Work starts from abandoned Chat cleanup. Focused regression tests cover these changes; fresh attended bidirectional speech remains attributed to the original tested revision. Compatibility carry-forward from 0114f1b1ec833935 to af0ca16ef25a57ae moves unchanged starter and subscription functions into schema-free modules, moves unchanged route-read helpers to their cache owner, and minifies only the overlay bootstrap. Native start, qualification, replay, cancellation and selected-Harness behavior remain unchanged. The build-time identity traversal now parses multiline import and re-export declarations, covering these extracted helpers and the existing local runtime graph; focused mutations verify changes invalidate the identity. Original attended speech and cleanup provenance is preserved; later live controls and gateway checks are recorded separately. Scoped compatibility carry-forward from af0ca16ef25a57ae to 8c002fd4e12c0ecb repairs cold overlay bootstrap initialization: cache-only service discovery avoids an absent GaA7 require, and observation of the native factory/export read wraps starter registration before capability readiness. Disposal restores owned factory and cached exports. Actual Orca Codex review of the exact two-file repair passed the pinned cold document-start path on 2026-11-19; focused held-callback and disposal regressions pass. A development native cold-document reload mounts the overlay with active client/capability and no page or cached-module errors; one inline CSP console violation is retained. Already-held callbacks and retained pre-observation namespaces require a fresh native document initialization and are not retroactively intercepted. Clean published Work activation remains blocked by native screen-lock cancellation; no fresh attended speech or release acceptance is claimed. Original tested speech and cleanup revisions remain unchanged.",
98
98
  "nativeArchiveSha256": "3695c17edcab8d66c1e5f2faa03e07826a59a39bf78b369ec87854547d4843c1",
99
99
  "nativeIdentityDigestKind": "ElectronAsarIntegrity"
100
100
  },
@@ -105,7 +105,7 @@
105
105
  "platform": "darwin",
106
106
  "desktopVersion": "26.1106.51428",
107
107
  "path": "work-grok",
108
- "implementationRevision": "af0ca16ef25a57ae",
108
+ "implementationRevision": "8c002fd4e12c0ecb",
109
109
  "testedImplementationRevision": "5f84eb365e1b6736",
110
110
  "profileDigest": "585c26fefb43da96",
111
111
  "policy": "reviewed",
@@ -140,11 +140,11 @@
140
140
  "desktopVersion": "26.1106.51428",
141
141
  "desktopBuild": "26605",
142
142
  "asarDigest": "sha256:f50357bec2aa563f5a510ae7d1a343ca245040aae074fa79c8a22b6d39c7df0a",
143
- "implementationRevision": "af0ca16ef25a57ae",
143
+ "implementationRevision": "8c002fd4e12c0ecb",
144
144
  "testedImplementationRevision": "5f84eb365e1b6736",
145
145
  "reviewedAt": "2026-11-19",
146
146
  "reference": "docs/operations/cpa-live-voice-desktop-hook.md#reviewed-macos-activation",
147
- "basis": "Preserve the original attended speech and cleanup evidence at testedImplementationRevision. Development revision 0c3365a8fe85a79a on 26.1106.51428 build 26605 re-drove official Chat Start to End Voice and Work Codex plus selected Grok Start to Stop/mute with gateway HTTP 201. Current source adds committed-subscription readiness, selected-lane qualification, retry and owned disposal for overlay capability and WebFetch factory, and protects fresh Work starts from abandoned Chat cleanup. Focused regression tests cover these changes; fresh attended bidirectional speech remains attributed to the original tested revision. Compatibility carry-forward from 0114f1b1ec833935 to af0ca16ef25a57ae moves unchanged starter and subscription functions into schema-free modules, moves unchanged route-read helpers to their cache owner, and minifies only the overlay bootstrap. Native start, qualification, replay, cancellation and selected-Harness behavior remain unchanged. The build-time identity traversal now parses multiline import and re-export declarations, covering these extracted helpers and the existing local runtime graph; focused mutations verify changes invalidate the identity. Original attended speech and cleanup provenance is preserved; later live controls and gateway checks are recorded separately.",
147
+ "basis": "Preserve the original attended speech and cleanup evidence at testedImplementationRevision. Development revision 0c3365a8fe85a79a on 26.1106.51428 build 26605 re-drove official Chat Start to End Voice and Work Codex plus selected Grok Start to Stop/mute with gateway HTTP 201. Current source adds committed-subscription readiness, selected-lane qualification, retry and owned disposal for overlay capability and WebFetch factory, and protects fresh Work starts from abandoned Chat cleanup. Focused regression tests cover these changes; fresh attended bidirectional speech remains attributed to the original tested revision. Compatibility carry-forward from 0114f1b1ec833935 to af0ca16ef25a57ae moves unchanged starter and subscription functions into schema-free modules, moves unchanged route-read helpers to their cache owner, and minifies only the overlay bootstrap. Native start, qualification, replay, cancellation and selected-Harness behavior remain unchanged. The build-time identity traversal now parses multiline import and re-export declarations, covering these extracted helpers and the existing local runtime graph; focused mutations verify changes invalidate the identity. Original attended speech and cleanup provenance is preserved; later live controls and gateway checks are recorded separately. Scoped compatibility carry-forward from af0ca16ef25a57ae to 8c002fd4e12c0ecb repairs cold overlay bootstrap initialization: cache-only service discovery avoids an absent GaA7 require, and observation of the native factory/export read wraps starter registration before capability readiness. Disposal restores owned factory and cached exports. Actual Orca Codex review of the exact two-file repair passed the pinned cold document-start path on 2026-11-19; focused held-callback and disposal regressions pass. A development native cold-document reload mounts the overlay with active client/capability and no page or cached-module errors; one inline CSP console violation is retained. Already-held callbacks and retained pre-observation namespaces require a fresh native document initialization and are not retroactively intercepted. Clean published Work activation remains blocked by native screen-lock cancellation; no fresh attended speech or release acceptance is claimed. Original tested speech and cleanup revisions remain unchanged.",
148
148
  "nativeArchiveSha256": "3695c17edcab8d66c1e5f2faa03e07826a59a39bf78b369ec87854547d4843c1",
149
149
  "nativeIdentityDigestKind": "ElectronAsarIntegrity"
150
150
  },
@@ -22406,7 +22406,7 @@ th[aria-sort] .console-usage-sort__mark {
22406
22406
  }
22407
22407
 
22408
22408
  // src/renderer-voice-implementation-revision.generated.ts
22409
- var VOICE_IMPLEMENTATION_REVISION = "af0ca16ef25a57ae";
22409
+ var VOICE_IMPLEMENTATION_REVISION = "8c002fd4e12c0ecb";
22410
22410
 
22411
22411
  // src/renderer-voice-profiles.ts
22412
22412
  var NATIVE_CHAT_VOICE_VERSION = "26.1027.61615";