cuelo 0.7.1 → 0.8.0

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.
Files changed (186) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +9 -8
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +27 -3
  5. package/.next/react-loadable-manifest.json +13 -3
  6. package/.next/required-server-files.js +2 -2
  7. package/.next/required-server-files.json +2 -2
  8. package/.next/routes-manifest.json +6 -0
  9. package/.next/server/app/_global-error/page.js +3 -3
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  18. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/.next/server/app/_not-found/page.js +2 -2
  20. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/_not-found.html +1 -1
  22. package/.next/server/app/_not-found.rsc +3 -3
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  26. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/api/agent/[id]/account/route.js +1 -1
  30. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  31. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  32. package/.next/server/app/api/agent/[id]/route.js +1 -1
  33. package/.next/server/app/api/agent/new/route.js +1 -1
  34. package/.next/server/app/api/agent/running/route.js +1 -1
  35. package/.next/server/app/api/attachments/route.js +2 -2
  36. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  37. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  38. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  39. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  40. package/.next/server/app/api/auth/providers/route.js +1 -1
  41. package/.next/server/app/api/cwd/browse/route.js +1 -1
  42. package/.next/server/app/api/cwd/validate/route.js +1 -1
  43. package/.next/server/app/api/default-cwd/route.js +1 -1
  44. package/.next/server/app/api/display-settings/route.js +1 -1
  45. package/.next/server/app/api/document-text/route.js +2 -2
  46. package/.next/server/app/api/experiments/route.js +1 -1
  47. package/.next/server/app/api/file-index/route.js +1 -1
  48. package/.next/server/app/api/files/[...path]/route.js +1 -1
  49. package/.next/server/app/api/git/diff/route.js +1 -1
  50. package/.next/server/app/api/git/status/route.js +2 -2
  51. package/.next/server/app/api/gpt6/handles/route.js +1 -1
  52. package/.next/server/app/api/gpt6/reply/route.js +1 -1
  53. package/.next/server/app/api/gpt6/token/route.js +1 -1
  54. package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
  55. package/.next/server/app/api/home/route.js +1 -1
  56. package/.next/server/app/api/live/call/[callId]/route.js +1 -1
  57. package/.next/server/app/api/live/character-voice/route.js +1 -1
  58. package/.next/server/app/api/live/events/route.js +2 -2
  59. package/.next/server/app/api/live/offer/route.js +1 -1
  60. package/.next/server/app/api/live/voices/route.js +1 -1
  61. package/.next/server/app/api/lounge/events/route.js +2 -2
  62. package/.next/server/app/api/lounge/route.js +1 -1
  63. package/.next/server/app/api/mcp/route.js +2 -2
  64. package/.next/server/app/api/model-roles/route.js +1 -1
  65. package/.next/server/app/api/models/route.js +1 -1
  66. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  67. package/.next/server/app/api/models-config/discover/route.js +1 -1
  68. package/.next/server/app/api/models-config/route.js +3 -3
  69. package/.next/server/app/api/models-config/test/route.js +1 -1
  70. package/.next/server/app/api/plugins/route.js +1 -1
  71. package/.next/server/app/api/project-trust/route.js +1 -1
  72. package/.next/server/app/api/projects/route.js +2 -2
  73. package/.next/server/app/api/runs/[runId]/route.js +1 -1
  74. package/.next/server/app/api/runs/route.js +1 -1
  75. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  76. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  77. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  78. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  79. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  80. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  81. package/.next/server/app/api/sessions/route.js +1 -1
  82. package/.next/server/app/api/sessions/search/route.js +1 -1
  83. package/.next/server/app/api/settings/route.js +1 -1
  84. package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
  85. package/.next/server/app/api/skills/check/route.js +1 -1
  86. package/.next/server/app/api/skills/install/route.js +2 -2
  87. package/.next/server/app/api/skills/route.js +2 -2
  88. package/.next/server/app/api/skills/search/route.js +1 -1
  89. package/.next/server/app/api/skills/update/route.js +1 -1
  90. package/.next/server/app/api/theme/route.js +1 -1
  91. package/.next/server/app/api/tool-image/route.js +1 -1
  92. package/.next/server/app/api/update-maintenance/route.js +2 -2
  93. package/.next/server/app/api/updates/route.js +1 -1
  94. package/.next/server/app/api/web-access/recovery/route.js +1 -1
  95. package/.next/server/app/api/web-access/route.js +1 -1
  96. package/.next/server/app/api/web6/consults/route.js +1 -1
  97. package/.next/server/app/api/worktrees/route.js +1 -1
  98. package/.next/server/app/favicon.ico/route.js +1 -1
  99. package/.next/server/app/index.html +1 -1
  100. package/.next/server/app/index.rsc +7 -6
  101. package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -4
  102. package/.next/server/app/index.segments/_full.segment.rsc +7 -6
  103. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  104. package/.next/server/app/index.segments/_index.segment.rsc +3 -3
  105. package/.next/server/app/index.segments/_tree.segment.rsc +4 -3
  106. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  107. package/.next/server/app/office-preview/page.js +2 -0
  108. package/.next/server/app/office-preview/page.js.nft.json +1 -0
  109. package/.next/server/app/office-preview/page_client-reference-manifest.js +1 -0
  110. package/.next/server/app/office-preview.html +1 -0
  111. package/.next/server/app/office-preview.meta +16 -0
  112. package/.next/server/app/office-preview.rsc +20 -0
  113. package/.next/server/app/office-preview.segments/_full.segment.rsc +20 -0
  114. package/.next/server/app/office-preview.segments/_head.segment.rsc +6 -0
  115. package/.next/server/app/office-preview.segments/_index.segment.rsc +7 -0
  116. package/.next/server/app/office-preview.segments/_tree.segment.rsc +4 -0
  117. package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +7 -0
  118. package/.next/server/app/office-preview.segments/office-preview.segment.rsc +5 -0
  119. package/.next/server/app/page.js +19 -19
  120. package/.next/server/app/page.js.nft.json +1 -1
  121. package/.next/server/app/page_client-reference-manifest.js +1 -1
  122. package/.next/server/app/recover/page.js +2 -2
  123. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  124. package/.next/server/app/recover.html +1 -1
  125. package/.next/server/app/recover.rsc +3 -3
  126. package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
  127. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  128. package/.next/server/app/recover.segments/_index.segment.rsc +3 -3
  129. package/.next/server/app/recover.segments/_tree.segment.rsc +2 -2
  130. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  131. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  132. package/.next/server/app-paths-manifest.json +9 -8
  133. package/.next/server/chunks/205.js +3 -2
  134. package/.next/server/chunks/424.js +1 -1
  135. package/.next/server/chunks/5582.js +2 -2
  136. package/.next/server/chunks/58.js +353 -0
  137. package/.next/server/chunks/6429.js +1 -1
  138. package/.next/server/chunks/7362.js +1 -0
  139. package/.next/server/middleware-build-manifest.js +1 -1
  140. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  141. package/.next/server/pages/404.html +1 -1
  142. package/.next/server/pages/500.html +1 -1
  143. package/.next/server/server-reference-manifest.json +1 -1
  144. package/.next/static/chunks/1937.8900983e70e8e9dc.js +1 -0
  145. package/.next/static/chunks/{3308.34ea31e24088c85f.js → 3308.8b94b38809d1b8b6.js} +1 -1
  146. package/.next/static/chunks/4857.cb0735ea310a39f0.js +1 -0
  147. package/.next/static/chunks/52733464.85a1551044fef357.js +1 -0
  148. package/.next/static/chunks/6110-681afd060dde5270.js +1 -0
  149. package/.next/static/chunks/9304.1f940d490ea5c972.js +1 -0
  150. package/.next/static/chunks/app/{layout-ca001f1e875e854c.js → layout-6aa3580989aedade.js} +1 -1
  151. package/.next/static/chunks/app/office-preview/page-2151040877dfb7cd.js +1 -0
  152. package/.next/static/chunks/app/page-f6f024bab16a7232.js +22 -0
  153. package/.next/static/chunks/b536a0f1.f7e390612229faa9.js +342 -0
  154. package/.next/static/chunks/bd904a5c.b74776e0b23d0607.js +1 -0
  155. package/.next/static/chunks/f5ef5e1c.14b6095722ff4f0b.js +12 -0
  156. package/.next/static/chunks/{framework-32a7466d5cae4a81.js → framework-e405bc515d75023a.js} +1 -1
  157. package/.next/static/chunks/webpack-93d544f82f48c3fd.js +1 -0
  158. package/.next/static/css/67b6e19482963224.css +1 -0
  159. package/.next/static/css/829f44afcc3302e9.css +1 -0
  160. package/.next/static/css/abd3d00cca9457f7.css +1 -0
  161. package/.next/static/vaxcaBF-y6afdFHIrgeuN/_buildManifest.js +1 -0
  162. package/.next/trace +106 -105
  163. package/.next/trace-build +1 -1
  164. package/.next/types/app/office-preview/page.ts +87 -0
  165. package/.next/types/routes.d.ts +2 -1
  166. package/.next/types/validator.ts +9 -0
  167. package/README.md +10 -4
  168. package/Tools/CUELO_Setup/files/native-runtime-patch.js +5 -5
  169. package/Tools/OMP_Global_Config/agent/extensions/character-voice.ts +2 -2
  170. package/Tools/OMP_Global_Config/agent/extensions/jev-runtime.ts +22 -11
  171. package/Tools/OMP_Global_Config/agent/extensions/korean-reply-guard.ts +174 -0
  172. package/Tools/OMP_Global_Config/agent/extensions/lib/maker-routing.ts +43 -16
  173. package/Tools/OMP_Global_Config/agent/rules/verdict.md +3 -0
  174. package/Tools/OMP_Global_Config/agent/tools/git-finalizer/index.ts +45 -5
  175. package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +315 -40
  176. package/install.mjs +6 -2
  177. package/package.json +10 -7
  178. package/public/office3d/ASSETS.md +8 -0
  179. package/.next/static/chunks/2619.9aac8983f30c7c8a.js +0 -1
  180. package/.next/static/chunks/52733464.3870f99cc446f9ff.js +0 -1
  181. package/.next/static/chunks/app/page-ce1990eb55a57ad6.js +0 -22
  182. package/.next/static/chunks/webpack-13c58b226bf07c7e.js +0 -1
  183. package/.next/static/css/bb6b220f400250d8.css +0 -1
  184. package/.next/static/css/d0ec5531aef136d6.css +0 -1
  185. package/.next/static/vl7SKOdL2Zksd2mJ3tjOQ/_buildManifest.js +0 -1
  186. /package/.next/static/{vl7SKOdL2Zksd2mJ3tjOQ → vaxcaBF-y6afdFHIrgeuN}/_ssgManifest.js +0 -0
@@ -1,7 +1,7 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
- 4:I[57788,["7177","static/chunks/app/layout-ca001f1e875e854c.js"],"PwaRegistration"]
4
+ 4:I[57788,["7177","static/chunks/app/layout-6aa3580989aedade.js"],"PwaRegistration"]
5
5
  5:I[61304,[],"ClientPageRoot"]
6
6
  6:I[47480,["2937","static/chunks/app/recover/page-c0c40b3c215078a4.js"],"default"]
7
7
  9:I[90484,[],"OutletBoundary"]
@@ -10,9 +10,9 @@ d:I[90484,[],"ViewportBoundary"]
10
10
  f:I[90484,[],"MetadataBoundary"]
11
11
  11:I[27123,[],"default",1]
12
12
  :HL["/_next/static/css/2f46e0db0d4a3aed.css","style"]
13
- :HL["/_next/static/css/d0ec5531aef136d6.css","style"]
13
+ :HL["/_next/static/css/67b6e19482963224.css","style"]
14
14
  :HL["/_next/static/css/92023589aa455863.css","style"]
15
- 0:{"P":null,"c":["","recover"],"q":"","i":false,"f":[[["",{"children":["recover",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/d0ec5531aef136d6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/92023589aa455863.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,"$@c"]},null,false,null],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$L10"}]}]}],null]}],false]],"m":"$undefined","G":["$11",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"vl7SKOdL2Zksd2mJ3tjOQ"}
15
+ 0:{"P":null,"c":["","recover"],"q":"","i":false,"f":[[["",{"children":["recover",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/67b6e19482963224.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/92023589aa455863.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,"$@c"]},null,false,null],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$L10"}]}]}],null]}],false]],"m":"$undefined","G":["$11",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"vaxcaBF-y6afdFHIrgeuN"}
16
16
  12:[]
17
17
  c:"$W12"
18
18
  7:{}
@@ -3,4 +3,4 @@
3
3
  3:I[90484,[],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[86869,[],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#ffffff","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#16171b","media":"(prefers-color-scheme: dark)"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"CUELO"}],["$","meta","1",{"name":"description","content":"Web view for the omp (oh-my-pi) coding agent"}],["$","meta","2",{"name":"application-name","content":"CUELO"}],["$","link","3",{"rel":"manifest","href":"/manifest.webmanifest"}],["$","meta","4",{"name":"format-detection","content":"telephone=no"}],["$","meta","5",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"CUELO"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","link","8",{"rel":"icon","href":"/favicon.ico?bcf2d9369cb3cf33","type":"image/x-icon","sizes":"16x16"}],["$","link","9",{"rel":"icon","href":"/icons/icon-192.png","sizes":"192x192","type":"image/png"}],["$","link","10",{"rel":"apple-touch-icon","href":"/icons/apple-touch-icon.png","sizes":"180x180","type":"image/png"}],["$","$L5","11",{}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"vl7SKOdL2Zksd2mJ3tjOQ"}
6
+ 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#ffffff","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#16171b","media":"(prefers-color-scheme: dark)"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"CUELO"}],["$","meta","1",{"name":"description","content":"Web view for the omp (oh-my-pi) coding agent"}],["$","meta","2",{"name":"application-name","content":"CUELO"}],["$","link","3",{"rel":"manifest","href":"/manifest.webmanifest"}],["$","meta","4",{"name":"format-detection","content":"telephone=no"}],["$","meta","5",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"CUELO"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","link","8",{"rel":"icon","href":"/favicon.ico?bcf2d9369cb3cf33","type":"image/x-icon","sizes":"16x16"}],["$","link","9",{"rel":"icon","href":"/icons/icon-192.png","sizes":"192x192","type":"image/png"}],["$","link","10",{"rel":"apple-touch-icon","href":"/icons/apple-touch-icon.png","sizes":"180x180","type":"image/png"}],["$","$L5","11",{}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"vaxcaBF-y6afdFHIrgeuN"}
@@ -1,7 +1,7 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
- 4:I[57788,["7177","static/chunks/app/layout-ca001f1e875e854c.js"],"PwaRegistration"]
4
+ 4:I[57788,["7177","static/chunks/app/layout-6aa3580989aedade.js"],"PwaRegistration"]
5
5
  :HL["/_next/static/css/2f46e0db0d4a3aed.css","style"]
6
- :HL["/_next/static/css/d0ec5531aef136d6.css","style"]
7
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/d0ec5531aef136d6.css","precedence":"next"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}],["$","$L4",null,{}]]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"vl7SKOdL2Zksd2mJ3tjOQ"}
6
+ :HL["/_next/static/css/67b6e19482963224.css","style"]
7
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/67b6e19482963224.css","precedence":"next"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}],["$","$L4",null,{}]]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"vaxcaBF-y6afdFHIrgeuN"}
@@ -1,4 +1,4 @@
1
1
  :HL["/_next/static/css/2f46e0db0d4a3aed.css","style"]
2
- :HL["/_next/static/css/d0ec5531aef136d6.css","style"]
2
+ :HL["/_next/static/css/67b6e19482963224.css","style"]
3
3
  :HL["/_next/static/css/92023589aa455863.css","style"]
4
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"recover","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"vl7SKOdL2Zksd2mJ3tjOQ"}
4
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"recover","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"vaxcaBF-y6afdFHIrgeuN"}
@@ -4,7 +4,7 @@
4
4
  6:I[90484,[],"OutletBoundary"]
5
5
  7:"$Sreact.suspense"
6
6
  :HL["/_next/static/css/92023589aa455863.css","style"]
7
- 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/92023589aa455863.css","precedence":"next"}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"vl7SKOdL2Zksd2mJ3tjOQ"}
7
+ 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/92023589aa455863.css","precedence":"next"}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"vaxcaBF-y6afdFHIrgeuN"}
8
8
  4:{}
9
9
  5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
10
10
  8:null
@@ -2,4 +2,4 @@
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
4
  4:[]
5
- 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"vl7SKOdL2Zksd2mJ3tjOQ"}
5
+ 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"vaxcaBF-y6afdFHIrgeuN"}
@@ -26,8 +26,8 @@
26
26
  "/api/attachments/route": "app/api/attachments/route.js",
27
27
  "/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
28
28
  "/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
29
- "/api/agent/new/route": "app/api/agent/new/route.js",
30
29
  "/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
30
+ "/api/agent/new/route": "app/api/agent/new/route.js",
31
31
  "/api/auth/logout/[provider]/route": "app/api/auth/logout/[provider]/route.js",
32
32
  "/api/auth/providers/route": "app/api/auth/providers/route.js",
33
33
  "/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
@@ -47,14 +47,14 @@
47
47
  "/api/lounge/route": "app/api/lounge/route.js",
48
48
  "/api/model-roles/route": "app/api/model-roles/route.js",
49
49
  "/api/models-config/catalog/route": "app/api/models-config/catalog/route.js",
50
- "/api/models-config/discover/route": "app/api/models-config/discover/route.js",
51
50
  "/api/models-config/route": "app/api/models-config/route.js",
52
- "/api/models-config/test/route": "app/api/models-config/test/route.js",
53
- "/api/mcp/route": "app/api/mcp/route.js",
51
+ "/api/models-config/discover/route": "app/api/models-config/discover/route.js",
54
52
  "/api/models/route": "app/api/models/route.js",
53
+ "/api/mcp/route": "app/api/mcp/route.js",
54
+ "/api/models-config/test/route": "app/api/models-config/test/route.js",
55
55
  "/api/project-trust/route": "app/api/project-trust/route.js",
56
- "/api/plugins/route": "app/api/plugins/route.js",
57
56
  "/api/runs/[runId]/route": "app/api/runs/[runId]/route.js",
57
+ "/api/plugins/route": "app/api/plugins/route.js",
58
58
  "/api/runs/route": "app/api/runs/route.js",
59
59
  "/api/sessions/[id]/export/route": "app/api/sessions/[id]/export/route.js",
60
60
  "/api/sessions/route": "app/api/sessions/route.js",
@@ -65,13 +65,14 @@
65
65
  "/api/skills/install/route": "app/api/skills/install/route.js",
66
66
  "/api/skills/route": "app/api/skills/route.js",
67
67
  "/api/skills/update/route": "app/api/skills/update/route.js",
68
- "/api/theme/route": "app/api/theme/route.js",
69
68
  "/api/skills/search/route": "app/api/skills/search/route.js",
69
+ "/api/theme/route": "app/api/theme/route.js",
70
70
  "/api/updates/route": "app/api/updates/route.js",
71
71
  "/api/update-maintenance/route": "app/api/update-maintenance/route.js",
72
- "/api/web-access/recovery/route": "app/api/web-access/recovery/route.js",
73
72
  "/api/web-access/route": "app/api/web-access/route.js",
73
+ "/api/web-access/recovery/route": "app/api/web-access/recovery/route.js",
74
74
  "/api/web6/consults/route": "app/api/web6/consults/route.js",
75
75
  "/page": "app/page.js",
76
- "/recover/page": "app/recover/page.js"
76
+ "/recover/page": "app/recover/page.js",
77
+ "/office-preview/page": "app/office-preview/page.js"
77
78
  }
@@ -1,6 +1,7 @@
1
- "use strict";exports.id=205,exports.ids=[205],exports.modules={12370:(a,b,c)=>{c.d(b,{K:()=>e});var d=c(30638);async function e(a){let b,c=a.model?.provider;if(!c)return null;let e=(0,d.e$)(c);if(e)return e.alias;let f=d.o.filter(a=>a.provider===c&&void 0!==a.oauthPosition);if(0===f.length||!a.listCurrentProviderOAuthAccounts)return null;try{b=await a.listCurrentProviderOAuthAccounts()}catch{return null}if(!b||b.provider!==c||a.model?.provider!==c)return null;let g=b.accounts.filter(a=>!0===a.active);if(1!==g.length)return null;let h=Number.isInteger(g[0].position)?g[0].position:b.accounts.indexOf(g[0]);return f.find(a=>a.oauthPosition===h)?.alias??null}},20723:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OF:()=>n});var e=c(75199),f=c(33338),g=c(87576),h=a([e,f]);[e,f]=h.then?(await h)():h;let i=`wss://api.cartesia.ai/tts/websocket?cartesia_version=${f.Gt}`,j=/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7A3]/,k=/[\u3040-\u30FF]/,l=/[.!?…,;:]+["')\]]*\s+|[。!?、,;:\n]+\s*/g,m=(a,b)=>Reflect.construct(WebSocket,[a,{headers:{"X-API-Key":b},proxy:(0,e.getProxyForUrl)(f.iH,new URL(a))}]);class n{#a;#b;#c;#d;#e;#f;#g;#h;#i;#j;constructor(a){this.#e=[],this.#f=[],this.#h=0,this.#i=!1,this.#j=!1,this.#a=a,this.#c=a.voice,this.#b=a.openSocket??m}get epoch(){return this.#h}connect(){this.#k()}assistantText(a,b){if(this.#j)return;let c=this.#g;if(!c){var d;if(!a.trim())return;c={contextId:crypto.randomUUID(),voice:this.#c,language:(d=this.#a.defaultLanguage,j.test(a)?"ko":k.test(a)?"ja":d),sent:"",finalSent:!1,done:!1,buffered:[],submitted:!1},this.#f.push(c),this.#g=c}let e=a.startsWith(c.sent);if(b){this.#g=void 0;let b=e?a.slice(c.sent.length):"";b.trim()?this.#l(c,b,!1):(c.done=!0,this.#m());return}if(!e)return;let f=function(a,b){let c=b;l.lastIndex=b;for(let b=l.exec(a);b;b=l.exec(a)){let d=b.index+b[0].length;d<a.length&&(c=d)}if(c===b&&a.length-b>120){let d=a.lastIndexOf(" ",a.length-2);d>=b&&(c=d+1)}return c}(a,c.sent.length);f>c.sent.length&&this.#l(c,a.slice(c.sent.length,f),!0)}reset(){if(this.#j)return;for(let a of(this.#e=[],this.#f))!a.done&&a.submitted&&this.#n({context_id:a.contextId,cancel:!0});let a=this.#f.length>0;this.#f=[],this.#g=void 0,(a||this.#i)&&(this.#i=!1,this.#h+=1,this.#a.emit({type:"speech-reset",epoch:this.#h}))}setVoice(a){this.reset(),this.#c=a}close(){if(this.#j)return;this.#j=!0,this.#f=[],this.#g=void 0,this.#e=[];let a=this.#d;if(this.#d=void 0,a){a.onmessage=null,a.onclose=null,a.onerror=null;try{a.close(1e3,"call closed")}catch{}}}#l(a,b,c){a.sent+=b,c||(a.finalSent=!0);let{emotion:d,speed:e,volume:f}=a.voice.generation;this.#n({model_id:this.#a.model,transcript:b,voice:a.voice.voiceId,language:a.language,context_id:a.contextId,continue:c,output_format:{container:"raw",encoding:"pcm_s16le",sample_rate:g.SQ},generation_config:{speed:e,volume:f,...d?{emotion:d}:{}}})&&(a.submitted=!0)}#n(a){let b=JSON.stringify(a),c=this.#k();return c&&1===c.readyState?(c.send(b),!0):(this.#e.push(b),!1)}#k(){let a;if(this.#j)return;if(this.#d)return this.#d;try{a=this.#b(i,this.#a.apiKey)}catch(a){this.#o(`Cartesia 음성 연결을 열지 못했습니다 (${a instanceof Error?a.message:String(a)})`);return}this.#d=a;let b=!1;return a.onopen=()=>{b=!0;let c=this.#e;for(let b of(this.#e=[],c))a.send(b);for(let a of this.#f)a.sent&&(a.submitted=!0)},a.onmessage=a=>{"string"==typeof a.data&&this.#p(a.data)},a.onerror=()=>{b||this.#o("Cartesia 음성 연결에 실패했습니다.")},a.onclose=()=>{this.#d===a&&(this.#d=void 0,(!b||this.#e.length>0||this.#f.some(a=>!a.done))&&this.#o("Cartesia 음성 연결이 끊겼습니다."))},a}#p(a){let b;try{let c=JSON.parse(a);if("object"!=typeof c||null===c)return;b=c}catch{return}let c="string"==typeof b.context_id?b.context_id:void 0,d=c?this.#f.find(a=>a.contextId===c):void 0;if("error"===b.type){if(c&&!d)return;let a=[b.title,b.message].filter(a=>"string"==typeof a&&""!==a),e="number"==typeof b.status_code?` ${b.status_code}`:"";this.#o(`Cartesia${e}: ${a.join(": ")||"음성 생성 오류"}`);return}if(d&&("chunk"===b.type&&"string"==typeof b.data&&b.data&&(d===this.#f[0]?this.#q(b.data):d.buffered.push(b.data)),"done"===b.type||"chunk"===b.type&&!0===b.done)){if(!d.finalSent)return;d.done=!0,this.#m()}}#q(a){this.#i=!0,this.#a.emit({type:"speech",epoch:this.#h,audio:a})}#m(){for(;this.#f.length>0;){let a=this.#f[0];for(let b of a.buffered.splice(0))this.#q(b);if(!a.done)return;this.#f.shift()}}#o(a){this.#j||(this.close(),this.#a.onFatal((0,f.Y3)(a,this.#a.apiKey)))}}d()}catch(a){d(a)}})},60205:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$O:()=>K,P5:()=>L,ev:()=>z,p1:()=>Q,t6:()=>M});var e=c(29021),f=c(33873),g=c(21820),h=c(11746),i=c(75199),j=c(45157),k=c(34069),l=c(58505),m=c(96448),n=c(22514),o=c(81677),p=c(14882),q=c(56429),r=c(40402),s=c(38741),t=c(12370),u=c(10424),v=c(20723),w=c(87576),x=a([h,i,j,k,l,m,n,o,p,q,r,s,u,v]);[h,i,j,k,l,m,n,o,p,q,r,s,u,v]=x.then?(await x)():x;let N=`${j.CODEX_BASE_URL}/codex/realtime/calls?intent=quicksilver&architecture=avas`,O="openai-codex",P=/^rtc_[\w-]+$/;class Q extends Error{constructor(a,b,c){super(a),this.kind=b,this.status=c,this.name="LiveError"}}function y(){return globalThis.__liveCalls??=new Map,globalThis.__liveCalls}function z(){return{voices:o.LIVE_VOICE_OPTIONS.map(a=>({value:a.value,label:a.label})),defaultVoice:o.DEFAULT_LIVE_VOICE}}let R={ko:"MUST speak Korean by default, including the first greeting. Keep code identifiers, file paths, commands, and API names in their original form.","zh-CN":"MUST speak Simplified Chinese by default, including the first greeting. Keep code identifiers, file paths, commands, and API names in their original form.",en:"MUST speak English by default, including the first greeting."};function A(a){if("string"==typeof a)return a;if(!Array.isArray(a))return"";let b=[];for(let c of a)c&&"object"==typeof c&&"type"in c&&"text"===c.type&&"text"in c&&"string"==typeof c.text&&c.text&&b.push(c.text);return b.join("\n")}function B(a,b){for(let c of("transcript"===b.type&&(a.lastTranscript=b),a.listeners))try{c(b)}catch{}}function C(a,b){a.state!==b&&(a.state=b,B(a,{type:"state",state:b}))}function D(a,b,c,d,e){let f=(0,w.Yh)(a.transcripts[b],c,d,e);if(f)return a.transcripts[b]=f,f.text}function E(a,b,c){let d=a.activeDelegationId;if(d)for(let e of(0,n.chunkLiveContext)(b))!function(a,b){a.sendTail=a.sendTail.then(()=>{a.closed||a.sideband.readyState!==WebSocket.OPEN||a.sideband.send(JSON.stringify(b))}).catch(b=>{B(a,{type:"error",message:b instanceof Error?b.message:String(b)})})}(a,(0,n.buildDelegationContextAppend)(d,e,c?"commentary":void 0))}function F(a,b){if("character"!==a.voice.mode)return;let c=b=>{a.speechGen+=1,a.speech?.reset(),a.speech?.close(),a.speech=void 0,B(a,{type:"speech-error",message:b}),M(a.callId)};a.speechHold+=1,a.characterCheck=a.characterCheck.then(async()=>{if(a.closed||!a.speech||"character"!==a.voice.mode)return;let d=await (0,t.K)(b.inner);if(a.closed||!a.speech)return;if(!d)return void c("지금 Main 캐릭터를 확인하지 못해 다른 목소리로 말하지 않도록 통화를 끝냈습니다.");if(d===a.voice.alias)return;let e=await (0,u.KA)().planFor(d);if(!a.closed&&a.speech){if("ready"===e.kind&&e.apiKey===a.speechKey){a.speech.setVoice({voiceId:e.voiceId,generation:e.profile.generation}),a.voice={mode:"character",alias:d,tuning:e.profile.tuning},B(a,{type:"voice",voice:a.voice});return}c(`Main이 ${d}(으)로 바뀌었지만 그 캐릭터 통화 음성이 준비되지 않아 통화를 끝냈습니다.`)}}).catch(()=>{a.closed||c("Main 캐릭터를 확인하지 못해 통화를 끝냈습니다.")}).finally(()=>{a.speechHold-=1})}function G(a,b,c,d){if(!a.speech)return;if(a.assistantResponseOpen||(a.assistantResponseOpen=!0,F(a,b)),d&&(a.assistantResponseOpen=!1),0===a.speechHold)return void a.speech?.assistantText(c,d);let e=a.speechGen;a.speechHold+=1,a.characterCheck=a.characterCheck.then(()=>{a.speechHold-=1,a.closed||e!==a.speechGen||a.speech?.assistantText(c,d)})}async function H(a){let b=(0,q.A4)(a);if(b?.isAlive())return b;let c=await (0,r.os)(a);if(!c)throw new Q("Session not found","not-found",404);let{session:d}=await (0,q.OF)(a,c,void 0);return d}async function I(a,b){let c;try{c=await (0,m.generateCodexAttestation)()}catch{}let d=function(a){let b,c=(0,l.getPackageDir)();if(!c)throw Error("omp package assets are unavailable, so live instructions cannot be loaded.");let d=(0,e.readFileSync)((0,f.join)(c,"src","live","prompts","live-instructions.md"),"utf8"),h="user";try{let a=(0,g.userInfo)().username.trim();a&&(h=a)}catch{}let i=h.split(/[._\-\s]+/).find(a=>a.length>0)??"there";return k.prompt.render(d,{username:h,firstName:i})+((b=a&&Object.hasOwn(R,a)?R[a]:void 0)?`
1
+ "use strict";exports.id=205,exports.ids=[205],exports.modules={12370:(a,b,c)=>{c.d(b,{K:()=>e});var d=c(30638);async function e(a){let b,c=a.model?.provider;if(!c)return null;let e=(0,d.e$)(c);if(e)return e.alias;let f=d.o.filter(a=>a.provider===c&&void 0!==a.oauthPosition);if(0===f.length||!a.listCurrentProviderOAuthAccounts)return null;try{b=await a.listCurrentProviderOAuthAccounts()}catch{return null}if(!b||b.provider!==c||a.model?.provider!==c)return null;let g=b.accounts.filter(a=>!0===a.active);if(1!==g.length)return null;let h=Number.isInteger(g[0].position)?g[0].position:b.accounts.indexOf(g[0]);return f.find(a=>a.oauthPosition===h)?.alias??null}},20723:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OF:()=>n});var e=c(75199),f=c(33338),g=c(87576),h=a([e,f]);[e,f]=h.then?(await h)():h;let i=`wss://api.cartesia.ai/tts/websocket?cartesia_version=${f.Gt}`,j=/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7A3]/,k=/[\u3040-\u30FF]/,l=/[.!?…,;:]+["')\]]*\s+|[。!?、,;:\n]+\s*/g,m=(a,b)=>Reflect.construct(WebSocket,[a,{headers:{"X-API-Key":b},proxy:(0,e.getProxyForUrl)(f.iH,new URL(a))}]);class n{#a;#b;#c;#d;#e;#f;#g;#h;#i;#j;constructor(a){this.#e=[],this.#f=[],this.#h=0,this.#i=!1,this.#j=!1,this.#a=a,this.#c=a.voice,this.#b=a.openSocket??m}get epoch(){return this.#h}connect(){this.#k()}assistantText(a,b){if(this.#j)return;let c=this.#g;if(!c){var d;if(!a.trim())return;c={contextId:crypto.randomUUID(),voice:this.#c,language:(d=this.#a.defaultLanguage,j.test(a)?"ko":k.test(a)?"ja":d),sent:"",finalSent:!1,done:!1,buffered:[],submitted:!1},this.#f.push(c),this.#g=c}let e=a.startsWith(c.sent);if(b){this.#g=void 0;let b=e?a.slice(c.sent.length):"";b.trim()?this.#l(c,b,!1):(c.done=!0,this.#m());return}if(!e)return;let f=function(a,b){let c=b;l.lastIndex=b;for(let b=l.exec(a);b;b=l.exec(a)){let d=b.index+b[0].length;d<a.length&&(c=d)}if(c===b&&a.length-b>120){let d=a.lastIndexOf(" ",a.length-2);d>=b&&(c=d+1)}return c}(a,c.sent.length);f>c.sent.length&&this.#l(c,a.slice(c.sent.length,f),!0)}reset(){if(this.#j)return;for(let a of(this.#e=[],this.#f))!a.done&&a.submitted&&this.#n({context_id:a.contextId,cancel:!0});let a=this.#f.length>0;this.#f=[],this.#g=void 0,(a||this.#i)&&(this.#i=!1,this.#h+=1,this.#a.emit({type:"speech-reset",epoch:this.#h}))}setVoice(a){this.reset(),this.#c=a}close(){if(this.#j)return;this.#j=!0,this.#f=[],this.#g=void 0,this.#e=[];let a=this.#d;if(this.#d=void 0,a){a.onmessage=null,a.onclose=null,a.onerror=null;try{a.close(1e3,"call closed")}catch{}}}#l(a,b,c){a.sent+=b,c||(a.finalSent=!0);let{emotion:d,speed:e,volume:f}=a.voice.generation;this.#n({model_id:this.#a.model,transcript:b,voice:a.voice.voiceId,language:a.language,context_id:a.contextId,continue:c,output_format:{container:"raw",encoding:"pcm_s16le",sample_rate:g.SQ},generation_config:{speed:e,volume:f,...d?{emotion:d}:{}}})&&(a.submitted=!0)}#n(a){let b=JSON.stringify(a),c=this.#k();return c&&1===c.readyState?(c.send(b),!0):(this.#e.push(b),!1)}#k(){let a;if(this.#j)return;if(this.#d)return this.#d;try{a=this.#b(i,this.#a.apiKey)}catch(a){this.#o(`Cartesia 음성 연결을 열지 못했습니다 (${a instanceof Error?a.message:String(a)})`);return}this.#d=a;let b=!1;return a.onopen=()=>{b=!0;let c=this.#e;for(let b of(this.#e=[],c))a.send(b);for(let a of this.#f)a.sent&&(a.submitted=!0)},a.onmessage=a=>{"string"==typeof a.data&&this.#p(a.data)},a.onerror=()=>{b||this.#o("Cartesia 음성 연결에 실패했습니다.")},a.onclose=()=>{this.#d===a&&(this.#d=void 0,(!b||this.#e.length>0||this.#f.some(a=>!a.done))&&this.#o("Cartesia 음성 연결이 끊겼습니다."))},a}#p(a){let b;try{let c=JSON.parse(a);if("object"!=typeof c||null===c)return;b=c}catch{return}let c="string"==typeof b.context_id?b.context_id:void 0,d=c?this.#f.find(a=>a.contextId===c):void 0;if("error"===b.type){if(c&&!d)return;let a=[b.title,b.message].filter(a=>"string"==typeof a&&""!==a),e="number"==typeof b.status_code?` ${b.status_code}`:"";this.#o(`Cartesia${e}: ${a.join(": ")||"음성 생성 오류"}`);return}if(d&&("chunk"===b.type&&"string"==typeof b.data&&b.data&&(d===this.#f[0]?this.#q(b.data):d.buffered.push(b.data)),"done"===b.type||"chunk"===b.type&&!0===b.done)){if(!d.finalSent)return;d.done=!0,this.#m()}}#q(a){this.#i=!0,this.#a.emit({type:"speech",epoch:this.#h,audio:a})}#m(){for(;this.#f.length>0;){let a=this.#f[0];for(let b of a.buffered.splice(0))this.#q(b);if(!a.done)return;this.#f.shift()}}#o(a){this.#j||(this.close(),this.#a.onFatal((0,f.Y3)(a,this.#a.apiKey)))}}d()}catch(a){d(a)}})},60205:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$O:()=>O,P5:()=>P,ev:()=>z,p1:()=>U,t6:()=>Q});var e=c(29021),f=c(33873),g=c(21820),h=c(11746),i=c(75199),j=c(45157),k=c(34069),l=c(58505),m=c(96448),n=c(22514),o=c(81677),p=c(14882),q=c(56429),r=c(40402),s=c(38741),t=c(12370),u=c(10424),v=c(20723),w=c(87576),x=a([h,i,j,k,l,m,n,o,p,q,r,s,u,v]);[h,i,j,k,l,m,n,o,p,q,r,s,u,v]=x.then?(await x)():x;let R=`${j.CODEX_BASE_URL}/codex/realtime/calls?intent=quicksilver&architecture=avas`,S="openai-codex",T=/^rtc_[\w-]+$/;class U extends Error{constructor(a,b,c){super(a),this.kind=b,this.status=c,this.name="LiveError"}}function y(){return globalThis.__liveCalls??=new Map,globalThis.__liveCalls}function z(){return{voices:o.LIVE_VOICE_OPTIONS.map(a=>({value:a.value,label:a.label})),defaultVoice:o.DEFAULT_LIVE_VOICE}}let V={ko:"MUST speak Korean by default, including the first greeting. Keep code identifiers, file paths, commands, and API names in their original form.","zh-CN":"MUST speak Simplified Chinese by default, including the first greeting. Keep code identifiers, file paths, commands, and API names in their original form.",en:"MUST speak English by default, including the first greeting."};function A(a){let b=(0,l.getPackageDir)();if(!b)return a;let c=(0,e.readFileSync)((0,f.join)(b,"src","live","prompts","agent-final-message.md"),"utf8");return k.prompt.render(c,{message:a})}function B(a){if("string"==typeof a)return a;if(!Array.isArray(a))return"";let b=[];for(let c of a)c&&"object"==typeof c&&"type"in c&&"text"===c.type&&"text"in c&&"string"==typeof c.text&&c.text&&b.push(c.text);return b.join("\n")}function C(a,b){for(let c of("transcript"===b.type&&(a.lastTranscript=b),a.listeners))try{c(b)}catch{}}function D(a,b){a.state!==b&&(a.state=b,C(a,{type:"state",state:b}))}function E(a,b,c,d,e){let f=(0,w.Yh)(a.transcripts[b],c,d,e);if(f)return a.transcripts[b]=f,f.text}function F(a,b){a.sendTail=a.sendTail.then(()=>{a.closed||a.sideband.readyState!==WebSocket.OPEN||a.sideband.send(JSON.stringify(b))}).catch(b=>{C(a,{type:"error",message:b instanceof Error?b.message:String(b)})})}function G(a,b,c){let d=a.activeDelegationId;if(d)for(let e of(0,n.chunkLiveContext)(b))F(a,(0,n.buildDelegationContextAppend)(d,e,c?"commentary":void 0))}function H(a,b,c){for(let d of(0,n.chunkLiveContext)(b))F(a,(0,n.buildSessionContextAppend)(d,c))}function I(a){let b,c;if(a&&"object"==typeof a&&"role"in a){if("user"===a.role||"assistant"===a.role)b="user"===a.role?"User":"Assistant",c=B(a.content).trim();else{if("custom"!==a.role||a.customType!==w.BD)return;let d=(0,w.hw)(a.content,a.details);if(!d)return;b="user"===d.role?"User (voice)":"Assistant (voice)",c=d.text}if(c)return`${b}: ${c.length<=400?c:`${c.slice(0,400).trimEnd()}…`}`}}function J(a,b){if("character"!==a.voice.mode)return;let c=b=>{a.speechGen+=1,a.speech?.reset(),a.speech?.close(),a.speech=void 0,C(a,{type:"speech-error",message:b}),Q(a.callId)};a.speechHold+=1,a.characterCheck=a.characterCheck.then(async()=>{if(a.closed||!a.speech||"character"!==a.voice.mode)return;let d=await (0,t.K)(b.inner);if(a.closed||!a.speech)return;if(!d)return void c("지금 Main 캐릭터를 확인하지 못해 다른 목소리로 말하지 않도록 통화를 끝냈습니다.");if(d===a.voice.alias)return;let e=await (0,u.KA)().planFor(d);if(!a.closed&&a.speech){if("ready"===e.kind&&e.apiKey===a.speechKey){a.speech.setVoice({voiceId:e.voiceId,generation:e.profile.generation}),a.voice={mode:"character",alias:d,tuning:e.profile.tuning},C(a,{type:"voice",voice:a.voice});return}c(`Main이 ${d}(으)로 바뀌었지만 그 캐릭터 통화 음성이 준비되지 않아 통화를 끝냈습니다.`)}}).catch(()=>{a.closed||c("Main 캐릭터를 확인하지 못해 통화를 끝냈습니다.")}).finally(()=>{a.speechHold-=1})}function K(a,b,c,d){if(!a.speech)return;if(a.assistantResponseOpen||(a.assistantResponseOpen=!0,J(a,b)),d&&(a.assistantResponseOpen=!1),0===a.speechHold)return void a.speech?.assistantText(c,d);let e=a.speechGen;a.speechHold+=1,a.characterCheck=a.characterCheck.then(()=>{a.speechHold-=1,a.closed||e!==a.speechGen||a.speech?.assistantText(c,d)})}async function L(a){let b=(0,q.A4)(a);if(b?.isAlive())return b;let c=await (0,r.os)(a);if(!c)throw new U("Session not found","not-found",404);let{session:d}=await (0,q.OF)(a,c,void 0);return d}async function M(a,b){let c;try{c=await (0,m.generateCodexAttestation)()}catch{}let d=function(a){let b,c=(0,l.getPackageDir)();if(!c)throw Error("omp package assets are unavailable, so live instructions cannot be loaded.");let d=(0,e.readFileSync)((0,f.join)(c,"src","live","prompts","live-instructions.md"),"utf8"),h="user";try{let a=(0,g.userInfo)().username.trim();a&&(h=a)}catch{}let i=h.split(/[._\-\s]+/).find(a=>a.length>0)??"there";return k.prompt.render(d,{username:h,firstName:i})+((b=a&&Object.hasOwn(V,a)?V[a]:void 0)?`
2
2
 
3
3
  <language>
4
4
  ${b}
5
5
  If the user speaks a different language, MUST switch to that language for the rest of the call.
6
- </language>`:"")}(a.locale),p=a.voice?.trim()||o.DEFAULT_LIVE_VOICE,q=(0,i.wrapFetchForProxy)(fetch,O),{authStorage:r}=await (0,s.getOmpRuntime)();return await (0,h.withOAuthAccess)(r,O,async e=>{var f,g;let h,i,k=(f=a.sessionId,g=c,h={Authorization:`Bearer ${e.accessToken}`,"OpenAI-Alpha":"quicksilver=v2","User-Agent":`Codex Desktop/${j.CODEX_CLIENT_VERSION}`,"x-session-id":b,[j.OPENAI_HEADERS.ORIGINATOR]:"Codex Desktop",[j.OPENAI_HEADERS.VERSION]:j.CODEX_CLIENT_VERSION,[j.OPENAI_HEADERS.SCOPED_SESSION_ID]:f,[j.OPENAI_HEADERS.THREAD_ID]:f},(i=e.accountId??(0,j.getCodexAccountId)(e.accessToken))&&(h[j.OPENAI_HEADERS.ACCOUNT_ID]=i),g&&(h["x-oai-attestation"]=g),h),l=await q(N,{method:"POST",headers:{...k,Accept:"*/*","Content-Type":"application/json"},body:JSON.stringify({sdp:a.sdp,session:(0,n.buildLiveSessionPayload)(d,p)})}),m=await l.text();if(!l.ok){let a=m.trim().replaceAll(/\s+/g," ").slice(0,2048)||l.statusText;throw new Q(`Codex live signaling failed (${l.status}): ${a}`,"live-upstream",502)}if(!m.trim())throw new Q("Codex live signaling returned an empty SDP answer","live-upstream",502);let o=function(a){if(a)return a.split("?",1)[0]?.split("/").find(a=>P.test(a))}(l.headers.get("location"));if(!o)throw new Q("Codex live signaling returned no valid call ID","live-upstream",502);return{answer:m,callId:o,headers:k}},{sessionId:a.sessionId,isAuthError:h.isAuthRetryableError,missingAccessMessage:"No Codex OAuth credential is available for a live call."})}let S={ko:"ko",en:"en","zh-CN":"zh"};async function J(a){let b=await (0,t.K)(a.inner),c=await (0,u.KA)().planFor(b);return"no-key"===c.kind?{voice:{mode:"native",alias:b,reason:"no-key"}}:"not-ready"===c.kind?{voice:{mode:"native",alias:b,reason:b?"voice-not-ready":"character-unknown"}}:{voice:{mode:"character",alias:c.profile.alias,tuning:c.profile.tuning},ready:{apiKey:c.apiKey,model:c.model,voiceId:c.voiceId,generation:c.profile.generation}}}async function K(a){let b,c=await H(a.sessionId),{voice:d,ready:g}=await J(c),h=crypto.randomUUID(),{answer:j,callId:m,headers:o}=await I(a,h),q={callId:m,sessionId:a.sessionId,sideband:void 0,state:"connecting",listeners:new Set,detachAgent:()=>{},activeDelegationId:void 0,sendTail:Promise.resolve(),persistTail:Promise.resolve(),transcripts:{user:{text:"",final:!1},assistant:{text:"",final:!1}},lastTranscript:void 0,orphanTimer:void 0,closed:!1,voice:d,speech:void 0,speechKey:g?.apiKey,characterCheck:Promise.resolve(),speechHold:0,speechGen:0,assistantResponseOpen:!1},s=await function(a,b,c,d){let e=Reflect.construct(WebSocket,[a,{headers:b,proxy:(0,i.getProxyForUrl)(O,new URL(a))}]),{promise:f,resolve:g,reject:h}=Promise.withResolvers(),j=!1,k=setTimeout(()=>{j||(e.close(1e3,"connect timeout"),h(Error("Codex live sideband connection timed out")))},15e3);return e.onopen=()=>{j=!0,clearTimeout(k),g(e)},e.onerror=()=>{j||(clearTimeout(k),h(Error("Codex live sideband connection failed")))},e.onmessage=a=>{"string"==typeof a.data&&c(a.data)},e.onclose=a=>{(clearTimeout(k),j)?d(a.reason||`sideband closed (${a.code})`):h(Error(`Codex live sideband closed before connecting (${a.code})`))},f}(((b=new URL(`https://api.openai.com/v1/live/${encodeURIComponent(m)}`)).protocol="wss:",b.toString()),o,a=>{if(q.closed)return;let b=(0,w.PW)(a),d=b&&(0,n.parseLiveServerEvent)(b);b&&d&&function(a,b,c,d){var e,f;switch(c.type){case"session.started":C(a,"live");return;case"input_transcript.added":{let b=a.transcripts.user,e=D(a,"user",c.item.text,!1,d);if(!e)return;B(a,{type:"transcript",role:"user",text:e,final:!1});let f=void 0===d||void 0===b.itemId||d===b.itemId;if(a.assistantResponseOpen&&!b.final&&""!==b.text&&f&&e.startsWith(b.text))return;a.speechGen+=1,a.assistantResponseOpen=!1,a.speech?.reset();return}case"output_transcript.added":{let e=D(a,"assistant",c.item.text,!1,d);if(!e)return;B(a,{type:"transcript",role:"assistant",text:e,final:!1}),G(a,b,e,!1);return}case"turn.done":{let f=D(a,c.turn.role,c.turn.transcript,!0,d);if(!f)return;"assistant"===c.turn.role&&G(a,b,f,!0),e=c.turn.role,a.persistTail=a.persistTail.then(async()=>{let c={role:e},d=b.inner.sessionManager,g=(0,w.NR)(e,f),h="user"===e?"user":"agent",i=Date.now();b.inner.agent.appendMessage((0,p.createCustomMessage)(w.BD,g,!0,c,new Date(i).toISOString(),h)),d.appendCustomMessageEntry(w.BD,g,!0,c,h,i),await d.ensureOnDisk(),await d.flush(),(0,r.mD)(),B(a,{type:"transcript",role:e,text:f,final:!0})}).catch(b=>{B(a,{type:"error",message:b instanceof Error?b.message:String(b)}),C(a,"error")});return}case"delegation.created":{let d=c.item.content.filter(a=>"input_text"===a.type).map(a=>a.text).join("\n").trim();d&&(f=c.item.id,a.activeDelegationId=f,C(a,"working"),B(a,{type:"delegation",status:"started",request:d}),b.inner.sendCustomMessage({customType:p.LIVE_DELEGATION_MESSAGE_TYPE,content:d,display:!0,attribution:"agent"},{triggerTurn:!0}).catch(b=>{a.activeDelegationId=void 0,C(a,"live"),B(a,{type:"error",message:b instanceof Error?b.message:String(b)})}));return}case"error":B(a,{type:"error",message:c.message}),C(a,"error");return;default:return}}(q,c,d,(0,w.c$)(b))},a=>{q.closed||q.persistTail.then(()=>{q.closed||(B(q,{type:"error",message:a}),M(m))})});if(q.sideband=s,q.detachAgent=c.inner.subscribe(a=>{q.closed||("agent_end"===a.type&&!1!==a.isTerminal&&q.activeDelegationId&&F(q,c),function(a,b){if(a.activeDelegationId){if("message_end"===b.type){if("assistant"!==b.message.role||"toolUse"!==b.message.stopReason)return;let c=A(b.message.content).trim();c&&E(a,c,!0);return}if("agent_end"===b.type&&!1!==b.isTerminal){for(let c=b.messages.length-1;c>=0;c-=1){let d=b.messages[c];if(!d||"assistant"!==d.role)continue;let g=A(d.content).trim();if(g){E(a,function(a){let b=(0,l.getPackageDir)();if(!b)return a;let c=(0,e.readFileSync)((0,f.join)(b,"src","live","prompts","agent-final-message.md"),"utf8");return k.prompt.render(c,{message:a})}(g),!1);break}}a.activeDelegationId=void 0,B(a,{type:"delegation",status:"completed"}),C(a,"live")}}}(q,a))}),g){let b=a.locale;q.speech=new v.OF({apiKey:g.apiKey,model:g.model,voice:{voiceId:g.voiceId,generation:g.generation},defaultLanguage:b&&Object.hasOwn(S,b)?S[b]:"en",emit:a=>B(q,a),onFatal:a=>{q.closed||(B(q,{type:"speech-error",message:a}),M(m))}})}return y().set(m,q),q.orphanTimer=setTimeout(()=>void M(m),6e4),{callId:m,sdp:j,voice:d}}function L(a,b){let c=y().get(a);return!c||c.closed?null:(c.orphanTimer&&(clearTimeout(c.orphanTimer),c.orphanTimer=void 0),c.listeners.add(b),b({type:"state",state:c.state}),b({type:"voice",voice:c.voice}),c.lastTranscript&&b(c.lastTranscript),c.speech?.connect(),()=>{c.listeners.delete(b),c.listeners.size>0||c.closed||(c.orphanTimer=setTimeout(()=>void M(a),6e4))})}async function M(a){let b=y().get(a);if(!b)return!1;if(y().delete(a),b.closed)return!0;if(b.closed=!0,clearTimeout(b.orphanTimer),b.detachAgent(),b.speech?.close(),await b.persistTail,b.sideband.readyState===WebSocket.OPEN)try{b.sideband.send(JSON.stringify((0,n.buildSessionClose)()))}catch{}return C(b,"closed"),b.listeners.clear(),(b.sideband.readyState===WebSocket.OPEN||b.sideband.readyState===WebSocket.CONNECTING)&&b.sideband.close(1e3,"done"),!0}d()}catch(a){d(a)}})}};
6
+ </language>`:"")}(a.locale),p=a.voice?.trim()||o.DEFAULT_LIVE_VOICE,q=(0,i.wrapFetchForProxy)(fetch,S),{authStorage:r}=await (0,s.getOmpRuntime)();return await (0,h.withOAuthAccess)(r,S,async e=>{var f,g;let h,i,k=(f=a.sessionId,g=c,h={Authorization:`Bearer ${e.accessToken}`,"OpenAI-Alpha":"quicksilver=v2","User-Agent":`Codex Desktop/${j.CODEX_CLIENT_VERSION}`,"x-session-id":b,[j.OPENAI_HEADERS.ORIGINATOR]:"Codex Desktop",[j.OPENAI_HEADERS.VERSION]:j.CODEX_CLIENT_VERSION,[j.OPENAI_HEADERS.SCOPED_SESSION_ID]:f,[j.OPENAI_HEADERS.THREAD_ID]:f},(i=e.accountId??(0,j.getCodexAccountId)(e.accessToken))&&(h[j.OPENAI_HEADERS.ACCOUNT_ID]=i),g&&(h["x-oai-attestation"]=g),h),l=await q(R,{method:"POST",headers:{...k,Accept:"*/*","Content-Type":"application/json"},body:JSON.stringify({sdp:a.sdp,session:(0,n.buildLiveSessionPayload)(d,p)})}),m=await l.text();if(!l.ok){let a=m.trim().replaceAll(/\s+/g," ").slice(0,2048)||l.statusText;throw new U(`Codex live signaling failed (${l.status}): ${a}`,"live-upstream",502)}if(!m.trim())throw new U("Codex live signaling returned an empty SDP answer","live-upstream",502);let o=function(a){if(a)return a.split("?",1)[0]?.split("/").find(a=>T.test(a))}(l.headers.get("location"));if(!o)throw new U("Codex live signaling returned no valid call ID","live-upstream",502);return{answer:m,callId:o,headers:k}},{sessionId:a.sessionId,isAuthError:h.isAuthRetryableError,missingAccessMessage:"No Codex OAuth credential is available for a live call."})}let W={ko:"ko",en:"en","zh-CN":"zh"};async function N(a){let b=await (0,t.K)(a.inner),c=await (0,u.KA)().planFor(b);return"no-key"===c.kind?{voice:{mode:"native",alias:b,reason:"no-key"}}:"not-ready"===c.kind?{voice:{mode:"native",alias:b,reason:b?"voice-not-ready":"character-unknown"}}:{voice:{mode:"character",alias:c.profile.alias,tuning:c.profile.tuning},ready:{apiKey:c.apiKey,model:c.model,voiceId:c.voiceId,generation:c.profile.generation}}}async function O(a){let b,c=await L(a.sessionId),{voice:d,ready:e}=await N(c),f=crypto.randomUUID(),{answer:g,callId:h,headers:j}=await M(a,f),k={callId:h,sessionId:a.sessionId,sideband:void 0,state:"connecting",listeners:new Set,detachAgent:()=>{},activeDelegationId:void 0,sendTail:Promise.resolve(),persistTail:Promise.resolve(),transcripts:{user:{text:"",final:!1},assistant:{text:"",final:!1}},lastTranscript:void 0,orphanTimer:void 0,closed:!1,voice:d,speech:void 0,speechKey:e?.apiKey,characterCheck:Promise.resolve(),speechHold:0,speechGen:0,assistantResponseOpen:!1},l=await function(a,b,c,d){let e=Reflect.construct(WebSocket,[a,{headers:b,proxy:(0,i.getProxyForUrl)(S,new URL(a))}]),{promise:f,resolve:g,reject:h}=Promise.withResolvers(),j=!1,k=setTimeout(()=>{j||(e.close(1e3,"connect timeout"),h(Error("Codex live sideband connection timed out")))},15e3);return e.onopen=()=>{j=!0,clearTimeout(k),g(e)},e.onerror=()=>{j||(clearTimeout(k),h(Error("Codex live sideband connection failed")))},e.onmessage=a=>{"string"==typeof a.data&&c(a.data)},e.onclose=a=>{(clearTimeout(k),j)?d(a.reason||`sideband closed (${a.code})`):h(Error(`Codex live sideband closed before connecting (${a.code})`))},f}(((b=new URL(`https://api.openai.com/v1/live/${encodeURIComponent(h)}`)).protocol="wss:",b.toString()),j,a=>{if(k.closed)return;let b=(0,w.PW)(a),d=b&&(0,n.parseLiveServerEvent)(b);b&&d&&function(a,b,c,d){var e,f;switch(c.type){case"session.started":D(a,"live"),function(a,b){let c=[],d=0,e=b.inner.messages;for(let a=e.length-1;a>=0;a-=1){let b=I(e[a]);if(b){if(d+b.length>2400&&c.length>0)break;c.push(b),d+=b.length}}0!==c.length&&(c.reverse(),H(a,`Conversation in this session before the call, oldest first. Background for continuity only; do not read it aloud.
7
+ ${c.join("\n")}`,"commentary"))}(a,b);return;case"input_transcript.added":{let b=a.transcripts.user,e=E(a,"user",c.item.text,!1,d);if(!e)return;C(a,{type:"transcript",role:"user",text:e,final:!1});let f=void 0===d||void 0===b.itemId||d===b.itemId;if(a.assistantResponseOpen&&!b.final&&""!==b.text&&f&&e.startsWith(b.text))return;a.speechGen+=1,a.assistantResponseOpen=!1,a.speech?.reset();return}case"output_transcript.added":{let e=E(a,"assistant",c.item.text,!1,d);if(!e)return;C(a,{type:"transcript",role:"assistant",text:e,final:!1}),K(a,b,e,!1);return}case"turn.done":{let f=E(a,c.turn.role,c.turn.transcript,!0,d);if(!f)return;"assistant"===c.turn.role&&K(a,b,f,!0),e=c.turn.role,a.persistTail=a.persistTail.then(async()=>{let c="assistant"===e&&a.voice.alias?{role:e,speaker:{alias:a.voice.alias,mode:a.voice.mode}}:{role:e},d=b.inner.sessionManager,g=(0,w.NR)(e,f),h="user"===e?"user":"agent",i=Date.now();b.inner.agent.appendMessage((0,p.createCustomMessage)(w.BD,g,!0,c,new Date(i).toISOString(),h)),d.appendCustomMessageEntry(w.BD,g,!0,c,h,i),await d.ensureOnDisk(),await d.flush(),(0,r.mD)(),C(a,{type:"transcript",role:e,text:f,final:!0})}).catch(b=>{C(a,{type:"error",message:b instanceof Error?b.message:String(b)}),D(a,"error")});return}case"delegation.created":{let d=c.item.content.filter(a=>"input_text"===a.type).map(a=>a.text).join("\n").trim();d&&(f=c.item.id,a.activeDelegationId=f,D(a,"working"),C(a,{type:"delegation",status:"started",request:d}),b.inner.sendCustomMessage({customType:p.LIVE_DELEGATION_MESSAGE_TYPE,content:d,display:!0,attribution:"agent"},{triggerTurn:!0}).catch(b=>{a.activeDelegationId=void 0,D(a,"live"),C(a,{type:"error",message:b instanceof Error?b.message:String(b)})}));return}case"error":C(a,{type:"error",message:c.message}),D(a,"error");return;default:return}}(k,c,d,(0,w.c$)(b))},a=>{k.closed||k.persistTail.then(()=>{k.closed||(C(k,{type:"error",message:a}),Q(h))})});if(k.sideband=l,k.detachAgent=c.inner.subscribe(a=>{k.closed||("agent_end"===a.type&&!1!==a.isTerminal&&k.activeDelegationId&&J(k,c),function(a,b){if(!a.activeDelegationId){"agent_end"===b.type&&!1!==b.isTerminal&&function(a,b){let c="";for(let a=b.length-1;a>=0&&!c;a-=1){let d=b[a];d?.role==="assistant"&&(c=B(d.content).trim())}if(!c)return;let d=I(b.find(a=>a?.role==="user"));d&&H(a,`Typed in chat during the call. ${d}`,"commentary"),H(a,A(c))}(a,b.messages);return}if("message_end"===b.type){if("assistant"!==b.message.role||"toolUse"!==b.message.stopReason)return;let c=B(b.message.content).trim();c&&G(a,c,!0);return}if("agent_end"===b.type&&!1!==b.isTerminal){for(let c=b.messages.length-1;c>=0;c-=1){let d=b.messages[c];if(!d||"assistant"!==d.role)continue;let e=B(d.content).trim();if(e){G(a,A(e),!1);break}}a.activeDelegationId=void 0,C(a,{type:"delegation",status:"completed"}),D(a,"live")}}(k,a))}),e){let b=a.locale;k.speech=new v.OF({apiKey:e.apiKey,model:e.model,voice:{voiceId:e.voiceId,generation:e.generation},defaultLanguage:b&&Object.hasOwn(W,b)?W[b]:"en",emit:a=>C(k,a),onFatal:a=>{k.closed||(C(k,{type:"speech-error",message:a}),Q(h))}})}return y().set(h,k),k.orphanTimer=setTimeout(()=>void Q(h),6e4),{callId:h,sdp:g,voice:d}}function P(a,b){let c=y().get(a);return!c||c.closed?null:(c.orphanTimer&&(clearTimeout(c.orphanTimer),c.orphanTimer=void 0),c.listeners.add(b),b({type:"state",state:c.state}),b({type:"voice",voice:c.voice}),c.lastTranscript&&b(c.lastTranscript),c.speech?.connect(),()=>{c.listeners.delete(b),c.listeners.size>0||c.closed||(c.orphanTimer=setTimeout(()=>void Q(a),6e4))})}async function Q(a){let b=y().get(a);if(!b)return!1;if(y().delete(a),b.closed)return!0;if(b.closed=!0,clearTimeout(b.orphanTimer),b.detachAgent(),b.speech?.close(),await b.persistTail,b.sideband.readyState===WebSocket.OPEN)try{b.sideband.send(JSON.stringify((0,n.buildSessionClose)()))}catch{}return D(b,"closed"),b.listeners.clear(),(b.sideband.readyState===WebSocket.OPEN||b.sideband.readyState===WebSocket.CONNECTING)&&b.sideband.close(1e3,"done"),!0}d()}catch(a){d(a)}})}};
@@ -1,3 +1,3 @@
1
- "use strict";exports.id=424,exports.ids=[424],exports.modules={10424:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KA:()=>k});var e=c(33873),f=c(28967),g=c(38741),h=c(40402),i=c(63201),j=a([g,h,i]);[g,h,i]=j.then?(await j)():j;let l="cartesia",m={async read(){let{authStorage:a}=await (0,g.getOmpRuntime)(),b=a.credentials.get(l);return b?.type==="api_key"&&b.key?b.key:void 0},async write(a){let{authStorage:b}=await (0,g.getOmpRuntime)();await b.credentials.set(l,{type:"api_key",key:a,source:"login"}),(0,f.kn)(),(0,g.invalidateOmpRuntime)()},async remove(){let{authStorage:a}=await (0,g.getOmpRuntime)();await a.credentials.remove(l),(0,f.kn)(),(0,g.invalidateOmpRuntime)()}};function k(){return globalThis.__liveVoiceService??=(0,i.Im)({assetDir:(0,e.join)(process.cwd(),"public","audio","live"),stateFile:(0,e.join)((0,h.$M)(),"cuelo-live-voices.json"),keys:m}),globalThis.__liveVoiceService}d()}catch(a){d(a)}})},22691:(a,b,c)=>{c.d(b,{Lt:()=>d,Y3:()=>f});let d=["YUKI(유키)","ISANA(이사나)","MIO(미오)","RIN(린)","NOVA(노바)","SHION(시온)","HIKARI(히카리)"],e={"YUKI(유키)":"yuki","ISANA(이사나)":"isana","MIO(미오)":"mio","RIN(린)":"rin","NOVA(노바)":"nova","SHION(시온)":"shion","HIKARI(히카리)":"hikari"};function f(a){return a&&Object.hasOwn(e,a)?e[a]:null}},33338:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gt:()=>k,Y3:()=>g,eR:()=>j,iH:()=>l,pq:()=>m});var e=c(75199),f=a([e]);e=(f.then?(await f)():f)[0];let k="2026-08-14",l="cartesia";class m extends Error{constructor(a,b,c){super(a),this.kind=b,this.status=c,this.name="CartesiaError"}}function g(a,b){return b?a.replaceAll(b,"[redacted]"):a}async function h(a,b){var c;let d=g(await a.text().catch(()=>""),b),e=d.trim();try{let a=JSON.parse(d),b=[a.title,a.message,a.error].filter(a=>"string"==typeof a&&""!==a);b.length>0&&(e=b.join(": "))}catch{}return e=e.replaceAll(/\s+/g," ").slice(0,300)||g(a.statusText,b),new m(`Cartesia ${a.status}: ${e}`,(c=a.status,401===c?"auth":402===c||403===c?"plan":429===c?"rate":404===c?"not-found":c>=500?"ambiguous":"bad-request"),a.status)}function i(a){if("object"!=typeof a||null===a||"string"!=typeof a.id||""===a.id)return null;let b=[];if(Array.isArray(a.accents))for(let c of a.accents){if("object"!=typeof c||null===c)continue;let{accent:a,locale:d,is_native:e}=c;"string"==typeof a&&b.push({accent:a,..."string"==typeof d?{locale:d}:{},isNative:!0===e})}return{id:a.id,name:"string"==typeof a.name?a.name:"",description:"string"==typeof a.description?a.description:"",isOwner:!0===a.is_owner,accents:b}}function j(a,b=(0,e.wrapFetchForProxy)(fetch,l)){let c={Authorization:`Bearer ${a}`,"Cartesia-Version":k};async function d(e,f,g=3e4){let i;try{i=await b(`https://api.cartesia.ai${e}`,{...f,headers:{...c,...f.headers},signal:AbortSignal.timeout(g),cache:"no-store",redirect:"error"})}catch(b){let a=b instanceof Error?b.name:"network";throw new m(`Cartesia 요청이 끝나지 않았습니다 (${a})`,"ambiguous")}if(!i.ok)throw await h(i,a);try{return await i.json()}catch{throw new m("Cartesia 응답을 읽지 못했습니다","ambiguous",i.status)}}async function f(a,b,c){let e=i(await d(a,b,c));if(!e)throw new m("Cartesia가 voice id 없는 응답을 돌려줬습니다","ambiguous");return e}return{async verifyKey(){await d("/voices?limit=1&is_owner=true",{method:"GET"})},async listOwnedVoices(){let a,b=[];for(let c=0;c<50;c+=1){let c=new URLSearchParams({limit:String(100),is_owner:"true"});a&&c.set("starting_after",a);let e=await d(`/voices?${c}`,{method:"GET"}),f="object"==typeof e&&null!==e?e:{};if(!Array.isArray(f.data))throw new m("Cartesia voice 목록 형식이 올바르지 않습니다","ambiguous");for(let a of f.data){let c=i(a);c&&b.push(c)}if(!0!==f.has_more)return b;let g="string"==typeof f.next_page&&f.next_page?f.next_page:b.at(-1)?.id;if(!g||g===a)break;a=g}throw new m("Cartesia voice 목록을 끝까지 확인하지 못했습니다","ambiguous")},getVoice:a=>f(`/voices/${encodeURIComponent(a)}`,{method:"GET"}),cloneVoice(a){let b=new FormData;return b.set("clip",a.clip,a.fileName),b.set("name",a.name),b.set("description",a.description),b.set("language",a.language),b.set("accent",a.accent),b.set("access","private"),f("/voices/clone",{method:"POST",body:b},12e4)},addAccents:(a,b)=>f(`/voices/${encodeURIComponent(a)}/accents`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({accents:b})})}}d()}catch(a){d(a)}})},44309:(a,b,c)=>{c.d(b,{A5:()=>k,HH:()=>n,Jh:()=>l,f1:()=>e});var d=c(22691);let e="voices.json",f={"sonic-3.6":!0,"sonic-3.5":!0,"sonic-3":!0,"sonic-latest":!0},g=Object.fromEntries(["neutral","happy","excited","enthusiastic","elated","euphoric","triumphant","amazed","surprised","flirtatious","curious","content","peaceful","serene","calm","grateful","affectionate","trust","sympathetic","anticipation","mysterious","angry","mad","outraged","frustrated","agitated","threatened","disgusted","contempt","envious","sarcastic","ironic","sad","dejected","melancholic","disappointed","hurt","guilty","bored","tired","rejected","nostalgic","wistful","apologetic","hesitant","insecure","confused","resigned","anxious","panicked","alarmed","scared","proud","confident","distant","skeptical","contemplative","determined"].map(a=>[a,!0])),h=/^[a-z0-9][a-z0-9_-]*\.(?:wav|mp3|flac|ogg|webm)$/,i=/^[a-z]{2}$/,j=/^[a-z][a-z-]*$/,k={model:"",profiles:new Map},l=d.Lt.map(a=>({id:(0,d.Y3)(a),alias:a}));function m(a,b,c,d){return void 0===a?d:"number"!=typeof a||!Number.isFinite(a)||a<b||a>c?null:a}function n(a){if("object"!=typeof a||null===a)return k;let{version:b,provider:c,model:e,characters:l}=a;if(1!==b||"cartesia"!==c||"string"!=typeof e||!Object.hasOwn(f,e)||!Array.isArray(l))return k;let n=new Map;for(let a of l){let b=function(a){if("object"!=typeof a||null===a)return null;let{id:b,alias:c,reference:e,referenceLanguage:f,referenceAccent:k,addAccents:l,tuning:n}=a;if("string"!=typeof b||"string"!=typeof c||(0,d.Y3)(c)!==b||"string"!=typeof e||!h.test(e)||"string"!=typeof f||!i.test(f)||"string"!=typeof k||!j.test(k))return null;let o=void 0===l?[]:l;if(!Array.isArray(o)||!o.every(a=>"string"==typeof a&&j.test(a))||"accepted"!==n&&"provisional"!==n)return null;let p=function(a){if(void 0===a)return{speed:1,volume:1};if("object"!=typeof a||null===a)return null;let{emotion:b,speed:c,volume:d}=a,e=m(c,.6,1.5,1),f=m(d,.5,2,1);return null!==e&&null!==f&&(void 0===b||"string"==typeof b&&Object.hasOwn(g,b))?void 0===b?{speed:e,volume:f}:{emotion:b,speed:e,volume:f}:null}(a.generation);return p?{id:b,alias:c,reference:e,referenceLanguage:f,referenceAccent:k,addAccents:[...new Set(o)],generation:p,tuning:n}:null}(a);b&&!n.has(b.id)&&n.set(b.id,b)}return{model:e,profiles:n}}},63201:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Im:()=>o});var e=c(55511),f=c(29021),g=c(33873),h=c(8102),i=c(33338),j=c(44309),k=c(22691),l=a([i]);function m(a){return(0,e.createHash)("sha256").update(a).digest("hex").slice(0,16)}function n(a){return a instanceof Error?a.message:String(a)}function o(a){let b,c=a.client??(a=>(0,i.eR)(a)),d=new Map,l=null,o=null;function p(){try{return(0,j.HH)(JSON.parse((0,f.readFileSync)((0,g.join)(a.assetDir,j.f1),"utf8")))}catch{return j.A5}}function q(){if(!(0,f.existsSync)(a.stateFile))return{version:1,accounts:{}};let b=JSON.parse((0,f.readFileSync)(a.stateFile,"utf8"));if("object"!=typeof b||null===b)throw Error("통화 음성 상태 파일 형식이 올바르지 않습니다.");let{version:c,accounts:d}=b;if(1!==c||"object"!=typeof d||null===d)throw Error("통화 음성 상태 파일 형식이 올바르지 않습니다.");return b}function r(b,c,d){let e=q(),i=e.accounts[b]??{characters:{}},j=d({...i.characters[c]});return e.accounts[b]={...i,characters:{...i.characters,[c]:j}},(0,f.mkdirSync)((0,g.dirname)(a.stateFile),{recursive:!0,mode:448}),(0,h.$)(a.stateFile,`${JSON.stringify(e,null,2)}
1
+ "use strict";exports.id=424,exports.ids=[424],exports.modules={10424:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KA:()=>k});var e=c(33873),f=c(28967),g=c(38741),h=c(40402),i=c(63201),j=a([g,h,i]);[g,h,i]=j.then?(await j)():j;let l="cartesia",m={async read(){let{authStorage:a}=await (0,g.getOmpRuntime)(),b=a.credentials.get(l);return b?.type==="api_key"&&b.key?b.key:void 0},async write(a){let{authStorage:b}=await (0,g.getOmpRuntime)();await b.credentials.set(l,{type:"api_key",key:a,source:"login"}),(0,f.kn)(),(0,g.invalidateOmpRuntime)()},async remove(){let{authStorage:a}=await (0,g.getOmpRuntime)();await a.credentials.remove(l),(0,f.kn)(),(0,g.invalidateOmpRuntime)()}};function k(){return globalThis.__liveVoiceService??=(0,i.Im)({assetDir:(0,e.join)(process.cwd(),"public","audio","live"),stateFile:(0,e.join)((0,h.$M)(),"cuelo-live-voices.json"),keys:m}),globalThis.__liveVoiceService}d()}catch(a){d(a)}})},22691:(a,b,c)=>{c.d(b,{Lt:()=>d,Y3:()=>f});let d=["YUKI(유키)","ISANA(이사나)","MIO(미오)","RIN(린)","NOVA(노바)","SHION(시온)","HIKARI(히카리)"],e={"YUKI(유키)":"yuki","ISANA(이사나)":"isana","MIO(미오)":"mio","RIN(린)":"rin","NOVA(노바)":"nova","SHION(시온)":"shion","HIKARI(히카리)":"hikari"};function f(a){return a&&Object.hasOwn(e,a)?e[a]:null}},33338:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gt:()=>k,Y3:()=>g,eR:()=>j,iH:()=>l,pq:()=>m});var e=c(75199),f=a([e]);e=(f.then?(await f)():f)[0];let k="2026-08-14",l="cartesia";class m extends Error{constructor(a,b,c){super(a),this.kind=b,this.status=c,this.name="CartesiaError"}}function g(a,b){return b?a.replaceAll(b,"[redacted]"):a}async function h(a,b){var c;let d=g(await a.text().catch(()=>""),b),e=d.trim();try{let a=JSON.parse(d),b=[a.title,a.message,a.error].filter(a=>"string"==typeof a&&""!==a);b.length>0&&(e=b.join(": "))}catch{}return e=e.replaceAll(/\s+/g," ").slice(0,300)||g(a.statusText,b),new m(`Cartesia ${a.status}: ${e}`,(c=a.status,401===c?"auth":402===c||403===c?"plan":429===c?"rate":404===c?"not-found":c>=500?"ambiguous":"bad-request"),a.status)}function i(a){if("object"!=typeof a||null===a||"string"!=typeof a.id||""===a.id)return null;let b=[];if(Array.isArray(a.accents))for(let c of a.accents){if("object"!=typeof c||null===c)continue;let{accent:a,locale:d,is_native:e}=c;"string"==typeof a&&b.push({accent:a,..."string"==typeof d?{locale:d}:{},isNative:!0===e})}return{id:a.id,name:"string"==typeof a.name?a.name:"",description:"string"==typeof a.description?a.description:"",isOwner:!0===a.is_owner,accents:b}}function j(a,b=(0,e.wrapFetchForProxy)(fetch,l)){let c={Authorization:`Bearer ${a}`,"Cartesia-Version":k};async function d(e,f,g=3e4){let i;try{i=await b(`https://api.cartesia.ai${e}`,{...f,headers:{...c,...f.headers},signal:AbortSignal.timeout(g),cache:"no-store",redirect:"error"})}catch(b){let a=b instanceof Error?b.name:"network";throw new m(`Cartesia 요청이 끝나지 않았습니다 (${a})`,"ambiguous")}if(!i.ok)throw await h(i,a);try{return await i.json()}catch{throw new m("Cartesia 응답을 읽지 못했습니다","ambiguous",i.status)}}async function f(a,b,c){let e=i(await d(a,b,c));if(!e)throw new m("Cartesia가 voice id 없는 응답을 돌려줬습니다","ambiguous");return e}return{async verifyKey(){await d("/voices?limit=1&is_owner=true",{method:"GET"})},async listOwnedVoices(){let a,b=[];for(let c=0;c<50;c+=1){let c=new URLSearchParams({limit:String(100),is_owner:"true"});a&&c.set("starting_after",a);let e=await d(`/voices?${c}`,{method:"GET"}),f="object"==typeof e&&null!==e?e:{};if(!Array.isArray(f.data))throw new m("Cartesia voice 목록 형식이 올바르지 않습니다","ambiguous");for(let a of f.data){let c=i(a);c&&b.push(c)}if(!0!==f.has_more)return b;let g="string"==typeof f.next_page&&f.next_page?f.next_page:b.at(-1)?.id;if(!g||g===a)break;a=g}throw new m("Cartesia voice 목록을 끝까지 확인하지 못했습니다","ambiguous")},getVoice:a=>f(`/voices/${encodeURIComponent(a)}`,{method:"GET"}),cloneVoice(a){let b=new FormData;return b.set("clip",a.clip,a.fileName),b.set("name",a.name),b.set("description",a.description),b.set("language",a.language),b.set("accent",a.accent),b.set("access","private"),f("/voices/clone",{method:"POST",body:b},12e4)},addAccents:(a,b)=>f(`/voices/${encodeURIComponent(a)}/accents`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({accents:b})},12e4)}}d()}catch(a){d(a)}})},44309:(a,b,c)=>{c.d(b,{A5:()=>k,HH:()=>n,Jh:()=>l,f1:()=>e});var d=c(22691);let e="voices.json",f={"sonic-3.6":!0,"sonic-3.5":!0,"sonic-3":!0,"sonic-latest":!0},g=Object.fromEntries(["neutral","happy","excited","enthusiastic","elated","euphoric","triumphant","amazed","surprised","flirtatious","curious","content","peaceful","serene","calm","grateful","affectionate","trust","sympathetic","anticipation","mysterious","angry","mad","outraged","frustrated","agitated","threatened","disgusted","contempt","envious","sarcastic","ironic","sad","dejected","melancholic","disappointed","hurt","guilty","bored","tired","rejected","nostalgic","wistful","apologetic","hesitant","insecure","confused","resigned","anxious","panicked","alarmed","scared","proud","confident","distant","skeptical","contemplative","determined"].map(a=>[a,!0])),h=/^[a-z0-9][a-z0-9_-]*\.(?:wav|mp3|flac|ogg|webm)$/,i=/^[a-z]{2}$/,j=/^[a-z][a-z-]*$/,k={model:"",profiles:new Map},l=d.Lt.map(a=>({id:(0,d.Y3)(a),alias:a}));function m(a,b,c,d){return void 0===a?d:"number"!=typeof a||!Number.isFinite(a)||a<b||a>c?null:a}function n(a){if("object"!=typeof a||null===a)return k;let{version:b,provider:c,model:e,characters:l}=a;if(1!==b||"cartesia"!==c||"string"!=typeof e||!Object.hasOwn(f,e)||!Array.isArray(l))return k;let n=new Map;for(let a of l){let b=function(a){if("object"!=typeof a||null===a)return null;let{id:b,alias:c,reference:e,referenceLanguage:f,referenceAccent:k,addAccents:l,tuning:n}=a;if("string"!=typeof b||"string"!=typeof c||(0,d.Y3)(c)!==b||"string"!=typeof e||!h.test(e)||"string"!=typeof f||!i.test(f)||"string"!=typeof k||!j.test(k))return null;let o=void 0===l?[]:l;if(!Array.isArray(o)||!o.every(a=>"string"==typeof a&&j.test(a))||"accepted"!==n&&"provisional"!==n)return null;let p=function(a){if(void 0===a)return{speed:1,volume:1};if("object"!=typeof a||null===a)return null;let{emotion:b,speed:c,volume:d}=a,e=m(c,.6,1.5,1),f=m(d,.5,2,1);return null!==e&&null!==f&&(void 0===b||"string"==typeof b&&Object.hasOwn(g,b))?void 0===b?{speed:e,volume:f}:{emotion:b,speed:e,volume:f}:null}(a.generation);return p?{id:b,alias:c,reference:e,referenceLanguage:f,referenceAccent:k,addAccents:[...new Set(o)],generation:p,tuning:n}:null}(a);b&&!n.has(b.id)&&n.set(b.id,b)}return{model:e,profiles:n}}},63201:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Im:()=>o});var e=c(55511),f=c(29021),g=c(33873),h=c(8102),i=c(33338),j=c(44309),k=c(22691),l=a([i]);function m(a){return(0,e.createHash)("sha256").update(a).digest("hex").slice(0,16)}function n(a){return a instanceof Error?a.message:String(a)}function o(a){let b,c=a.client??(a=>(0,i.eR)(a)),d=new Map,l=null,o=null;function p(){try{return(0,j.HH)(JSON.parse((0,f.readFileSync)((0,g.join)(a.assetDir,j.f1),"utf8")))}catch{return j.A5}}function q(){if(!(0,f.existsSync)(a.stateFile))return{version:1,accounts:{}};let b=JSON.parse((0,f.readFileSync)(a.stateFile,"utf8"));if("object"!=typeof b||null===b)throw Error("통화 음성 상태 파일 형식이 올바르지 않습니다.");let{version:c,accounts:d}=b;if(1!==c||"object"!=typeof d||null===d)throw Error("통화 음성 상태 파일 형식이 올바르지 않습니다.");return b}function r(b,c,d){let e=q(),i=e.accounts[b]??{characters:{}},j=d({...i.characters[c]});return e.accounts[b]={...i,characters:{...i.characters,[c]:j}},(0,f.mkdirSync)((0,g.dirname)(a.stateFile),{recursive:!0,mode:448}),(0,h.$)(a.stateFile,`${JSON.stringify(e,null,2)}
2
2
  `),j}function s(b){let c,h=(0,g.join)(a.assetDir,b.reference);try{c=(0,f.statSync)(h)}catch{return null}if(!c.isFile())return null;let i=d.get(h);if(i&&i.mtimeMs===c.mtimeMs&&i.size===c.size)return i.sha256;let j=(0,e.createHash)("sha256").update((0,f.readFileSync)(h)).digest("hex");return d.set(h,{mtimeMs:c.mtimeMs,size:c.size,sha256:j}),j}function t(a,b){return!!(a?.voiceId&&a.accentsReady&&(a.imported||a.referenceSha256===b))}async function u(b){let d=b.trim();if(!d||/\s/.test(d))throw new i.pq("Cartesia API 키 형식이 올바르지 않습니다","bad-request");await c(d).verifyKey(),await a.keys.write(d),o=null}async function v(){if(b)throw Error("음성 준비가 진행 중이라 키를 지울 수 없습니다.");await a.keys.remove(),o=null}async function w(b,c,d,e,h,j){var k;let l,m=(k=d.id,`CUELO live voice ${k} ref:${e.slice(0,12)}`),o=r(c,d.id,a=>a.voiceId&&!a.imported&&a.referenceSha256!==e?{pendingCloneMarker:a.pendingCloneMarker}:{...a,error:void 0});if(!o.voiceId){let k=(await h()).find(a=>a.description.trim()===m);if(k)o=r(c,d.id,()=>({voiceId:k.id,referenceSha256:e}));else{let k=d.reference,l=new Blob([(0,f.readFileSync)((0,g.join)(a.assetDir,k))],{type:"audio/wav"});r(c,d.id,a=>({...a,pendingCloneMarker:m}));try{let a=await b.cloneVoice({clip:l,fileName:k,name:`CUELO ${d.alias}`,description:m,language:d.referenceLanguage,accent:d.referenceAccent});o=r(c,d.id,()=>({voiceId:a.id,referenceSha256:e}))}catch(b){if(!(b instanceof i.pq)||"ambiguous"!==b.kind)throw r(c,d.id,()=>({error:n(b)})),b;j();let a=(await h().catch(()=>[])).find(a=>a.description.trim()===m);if(!a)return void r(c,d.id,a=>({...a,error:`복제 결과를 확인하지 못했습니다. 다시 준비하면 계정 목록을 먼저 확인합니다. (${n(b)})`}));o=r(c,d.id,()=>({voiceId:a.id,referenceSha256:e}))}}}if(o.accentsReady||!o.voiceId)return;let p=o.voiceId;try{l=await b.getVoice(p)}catch(a){if(a instanceof i.pq&&"not-found"===a.kind)return void r(c,d.id,()=>({error:"Cartesia 계정에 이 voice가 없습니다. 다시 준비하면 새로 만듭니다."}));throw a}let q=d.addAccents.filter(a=>!l.accents.some(b=>b.accent===a));q.length>0&&(l=await b.addAccents(p,q));let s=d.addAccents.filter(a=>!l.accents.some(b=>b.accent===a));s.length>0?r(c,d.id,a=>({...a,error:`억양을 확인하지 못했습니다: ${s.join(", ")}`})):r(c,d.id,a=>({...a,accentsReady:!0,error:void 0}))}async function x(a){let b,d=c(a),e=m(a),f=p(),g=()=>b??=d.listOwnedVoices(),h=()=>{b=void 0};for(let{id:a}of j.Jh){let b=f.profiles.get(a),c=b?s(b):null;if(!b||!c)continue;let j=q().accounts[e]?.characters[a];if(!t(j,c)){l=a;try{await w(d,e,b,c,g,h)}catch(b){if(b instanceof i.pq&&("auth"===b.kind||"plan"===b.kind||"rate"===b.kind)){o="plan"===b.kind?`Cartesia 플랜이나 크레딧이 음성 복제를 허용하지 않습니다. 복제가 되는 플랜(Pro 이상)이 필요합니다. (${b.message})`:b.message;return}if(b instanceof i.pq&&"ambiguous"===b.kind){o=b.message;return}r(e,a,a=>({...a,error:n(b)}))}}}}async function y(){if(b)return;let{promise:c,resolve:d,reject:e}=Promise.withResolvers(),j=!1;b=c.then(x).catch(a=>{j||(o=n(a))}).finally(()=>{b=void 0,l=null});try{var k;let b,c,e=await a.keys.read();if(!e)throw new i.pq("Cartesia API 키가 없습니다","bad-request");k=m(e),c=(b=q()).accounts[k]??{characters:{}},b.accounts[k]={...c,acknowledgedAt:new Date().toISOString()},(0,f.mkdirSync)((0,g.dirname)(a.stateFile),{recursive:!0,mode:448}),(0,h.$)(a.stateFile,`${JSON.stringify(b,null,2)}
3
3
  `),o=null,d(e)}catch(a){throw j=!0,e(a),await b,a}}async function z(b){let c,d=await a.keys.read();if(!d)return{kind:"no-key"};let e=(0,k.Y3)(b);if(!b||!e)return{kind:"not-ready",alias:b??""};let f=p(),g=f.profiles.get(e),h=g?s(g):null;if(!g||!h)return{kind:"not-ready",alias:b};try{c=q().accounts[m(d)]?.characters[e]}catch{return{kind:"not-ready",alias:b}}return t(c,h)?{kind:"ready",apiKey:d,model:f.model,voiceId:c.voiceId,profile:g}:{kind:"not-ready",alias:b}}return{settings:async function(){let c=await a.keys.read(),d=p(),e=null,f=null;try{e=q()}catch(a){f=n(a)}let g=c&&e?e.accounts[m(c)]:void 0,h=j.Jh.map(({id:a,alias:c})=>{let e=d.profiles.get(a),f=e?s(e):null;if(!e||!f)return{id:a,alias:c,state:"missing-asset"};let h={id:a,alias:c,tuning:e.tuning},i=g?.characters[a];return b&&l===a?{...h,state:"preparing"}:t(i,f)?{...h,state:"ready"}:i?.pendingCloneMarker?{...h,state:"needs-check",...i.error?{error:i.error}:{}}:i?.error?{...h,state:"failed",error:i.error}:{...h,state:"not-prepared"}});return{configured:!!c,keyHint:c?c.length<=12?"••••":`${c.slice(0,7)}…${c.slice(-4)}`:null,preparing:!!b,acknowledgedAt:g?.acknowledgedAt??null,characters:h,lastError:f??o}},saveKey:u,removeKey:v,prepare:y,planFor:z,idle:()=>b??Promise.resolve()}}i=(l.then?(await l)():l)[0],d()}catch(a){d(a)}})}};
@@ -3,7 +3,7 @@ exports.id=5582,exports.ids=[5582],exports.modules={5908:(a,b,c)=>{"use strict";
3
3
  `);if(!a.startsWith(e,g))return null;let f=(g+=e.length)+d.textLength;if(f>a.length)return null;let h=a.slice(g,f);g=f;let i=(q=c,`
4
4
  --- End attached document ${q+1} ---`);if(!a.startsWith(i,g))return null;g+=i.length,j.push({name:d.name,mimeType:d.mimeType,size:d.size,text:h})}return g===a.length?{message:i,documents:j}:null}(a)?.message??a}let k="\x3c!-- omp-web-document-context-v1:",l=" --\x3e",m="User message:\n",n="\n\nAttached documents (locally extracted text supplied by the user):\n"},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>D,DK:()=>F,O5:()=>u,O8:()=>C,Uv:()=>I,dQ:()=>K,eP:()=>E,mD:()=>x,os:()=>A,u1:()=>B,wb:()=>w,zH:()=>t});var e=c(92582),f=c(48331),g=c(5969),h=c(29021),i=c(33873),j=c(53739),k=c(38741),l=c(12039),m=c(45902),n=c(24923),o=c(36208),p=c(87576),q=c(85821),r=c(77356),s=a([e,f,g,j,k]);async function t(a){let b=[...new Set(a.map(a=>a.cwd).filter(Boolean))],c=new Map;return await Promise.all(b.map(async a=>{c.set(a,await (0,n.KI)(a))})),a.map(a=>{let b=a.cwd?c.get(a.cwd):void 0;return{...a,projectRoot:b?.projectRoot??a.cwd,...b?.isWorktree&&b.branch?{worktreeBranch:b.branch}:{}}})}function u(a,b){let c=new Map(b.map(a=>[a.id,a]));for(let b of a)c.set(b.id,b);return[...c.values()].sort((a,b)=>b.modified.localeCompare(a.modified))}[e,f,g,j,k]=s.then?(await s)():s;let N="(no messages)";async function v(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set((0,m.$)(c.path),c.id);let c=a.map(a=>{C(a.id,a.path);let c=function(a){if(a.firstMessage&&a.firstMessage!==N)return a.firstMessage;if(!(a.size>4096))return null;let b=a.modified instanceof Date?a.modified:new Date(String(a.modified)),c=globalThis.__ompSessionFirstMessageCache??=new Map,d=(0,m.$)(a.path),e=c.get(d);if(e&&e.mtimeMs===b.getTime()&&e.size===a.size)return e.text;let f=function(a){let b;try{b=(0,h.openSync)(a,"r");let d=new TextDecoder,e=Buffer.alloc(65536),f="",g=0;for(;g<1048576;){let a=(0,h.readSync)(b,e,0,e.length,g);if(a<=0)break;g+=a;let i=(f+=d.decode(e.subarray(0,a),{stream:!0})).split("\n");for(let a of(f=i.pop()??"",i)){var c;let b;if(!a.includes('"role":"user"'))continue;try{b=JSON.parse(a)}catch{continue}if(!b||"object"!=typeof b||!("type"in b)||"message"!==b.type||!("message"in b))continue;let d=b.message;if(!d||"object"!=typeof d||!("role"in d)||"user"!==d.role)continue;let e=(c="content"in d?d.content:void 0,"string"==typeof c?c.trim():Array.isArray(c)?c.map(a=>a&&"object"==typeof a&&"type"in a&&"text"===a.type&&"text"in a&&"string"==typeof a.text?a.text:"").filter(Boolean).join(" ").trim():"");if(e)return e}}return null}catch{return null}finally{void 0!==b&&(0,h.closeSync)(b)}}(a.path);return c.set(d,{mtimeMs:b.getTime(),size:a.size,text:f}),f}(a);return{path:a.path,id:a.id,cwd:a.cwd,name:a.title,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:function(a){let b=a.modified instanceof Date?a.modified:new Date(String(a.modified)),c=Number.isFinite(b.getTime())?b.toISOString():String(a.modified),d=globalThis.__ompSessionActivityCache??=new Map,e=(0,m.$)(a.path),f=d.get(e);if(f&&f.mtimeMs===b.getTime()&&f.size===a.size)return f.at??c;let g=function(a){let b;try{b=(0,h.openSync)(a,"r");let c=(0,h.fstatSync)(b).size,d=Buffer.alloc(0),e=0,f=!1;for(;;){let a=e>0?d.lastIndexOf(10,e-1):-1;if(a<0&&c>0){if(!f&&d.length>=65536||d.length>=8388608)return null;let a=Math.min(65536,c),g=Buffer.alloc(a);c-=a,(0,h.readSync)(b,g,0,a,c),d=Buffer.concat([g,d]),e+=a;continue}let g=d.toString("utf8",a+1,e).trim();if(e=Math.max(a,0),g){if(!f&&!g.includes(j.SESSION_EXIT_CUSTOM_TYPE))return null;let a=JSON.parse(g);if(!a||"object"!=typeof a)return null;if("type"in a&&"custom"===a.type&&"customType"in a&&a.customType===j.SESSION_EXIT_CUSTOM_TYPE)f=!0;else{if(!f)return null;let b="timestamp"in a?a.timestamp:void 0;return"string"==typeof b&&Number.isFinite(Date.parse(b))?new Date(b).toISOString():null}}if(a<0)return null}}catch{return null}finally{void 0!==b&&(0,h.closeSync)(b)}}(a.path);return d.set(e,{mtimeMs:b.getTime(),size:a.size,at:g}),g??c}(a),messageCount:c?Math.max(a.messageCount,1):a.messageCount,firstMessage:(0,o.we)(c??"")||N,parentSessionId:a.parentSessionPath?b.get((0,m.$)(a.parentSessionPath)):void 0,transient:!1}});return t(c)}async function w(a={}){a.force&&x();let b=globalThis.__ompSessionListGeneration??0;if(globalThis.__ompSessionListCache&&Date.now()-globalThis.__ompSessionListCache.ts<O)return globalThis.__ompSessionListCache.data;if(globalThis.__ompSessionListPromise&&globalThis.__ompSessionListPromiseGeneration===b)return globalThis.__ompSessionListPromise;let c=v().then(a=>(globalThis.__ompSessionListGeneration??0)!==b?w():(globalThis.__ompSessionListCache={data:a,ts:Date.now()},a)).finally(()=>{globalThis.__ompSessionListPromise===c&&(globalThis.__ompSessionListPromise=void 0,globalThis.__ompSessionListPromiseGeneration=void 0)});return globalThis.__ompSessionListPromise=c,globalThis.__ompSessionListPromiseGeneration=b,c}let O=3e4;function x(){globalThis.__ompSessionListGeneration=(globalThis.__ompSessionListGeneration??0)+1,globalThis.__ompSessionListCache=void 0}function y(){return globalThis.__ompSessionPathCache||(globalThis.__ompSessionPathCache=new Map),globalThis.__ompSessionPathCache}function z(){return globalThis.__ompPathToSessionIdCache||(globalThis.__ompPathToSessionIdCache=new Map),globalThis.__ompPathToSessionIdCache}async function A(a){let b=y().get(a);return b&&(0,h.existsSync)(b)?b:(b&&D(a),await w(),y().get(a)??null)}async function B(a){let b=(0,m.$)(a),c=z().get(b);return c||(await w(),z().get(b))}function C(a,b){let c=(0,i.normalize)(b),d=(0,m.$)(c),e=y(),f=z(),g=e.get(a),h=g?(0,m.$)(g):void 0,j=f.get(d),k=j?e.get(j):void 0;h&&h!==d&&f.get(h)===a&&f.delete(h),j&&j!==a&&k&&(0,m.$)(k)===d&&e.delete(j),e.set(a,c),f.set(d,a)}function D(a){let b=y(),c=z(),d=b.get(a);b.delete(a);let e=d?(0,m.$)(d):void 0;e&&c.get(e)===a&&c.delete(e)}function E(a){let b=(0,h.openSync)(a,"r");try{let a=[],c=0,d=!1;for(;c<65536&&!d;){let e=Buffer.allocUnsafe(Math.min(4096,65536-c)),f=(0,h.readSync)(b,e,0,e.length,c);if(0===f)break;let g=e.subarray(0,f),i=g.indexOf(10);a.push(-1===i?g:g.subarray(0,i)),c+=f,d=-1!==i}if(!d&&c>=65536)return null;let e=Buffer.concat(a).toString("utf8").trimEnd();if(!e)return null;try{let a=JSON.parse(e);return"session"===a.type?a:null}catch{return null}}finally{(0,h.closeSync)(b)}}async function F(a){return(await e.SessionManager.open(a)).getEntries()}function G(a,b,c){if(null===c)return[];let d=(c?b.get(c):void 0)??a[a.length-1];if(!d)return[];let e=[],f=new Set,g=d;for(;g&&!f.has(g.id);)f.add(g.id),e.push(g),g=g.parentId?b.get(g.parentId):void 0;return e.reverse()}function H(a){let b=a.fallback??a.default;if(!b)return null;let c=b.indexOf("/");return c<=0?null:{provider:b.slice(0,c),modelId:b.slice(c+1)}}function I(a,b,c={}){let d=new Map;for(let b of a)d.set(b.id,b);let f=(0,e.buildSessionContext)(a,b,d,{transcript:!0,collapseCompactedHistory:!0}),g=[],h=[];for(let e of function(a,b,c){let d=G(a,b,c),e=-1;for(let a=d.length-1;a>=0;a--)if("compaction"===d[a].type){e=a;break}if(-1===e)return d;let f=d[e],g=[],h=!1;for(let a=0;a<e;a++)d[a].id===f.firstKeptEntryId&&(h=!0),h&&g.push(d[a]);return[...g,f,...d.slice(e+1)]}(a,d,b)){let a=function(a,b){switch(a.type){case"message":{let c=b.deferToolResultImages?function(a){if("toolResult"!==a.role)return a;let b=0,c=0,d=new Set,e=a.content.filter(a=>{let e=function(a){let b,c;if(!M(a)||"image"!==a.type||("string"==typeof a.data?(b=a.data,c="string"==typeof a.mimeType?a.mimeType:void 0):M(a.source)&&"base64"===a.source.type&&"string"==typeof a.source.data&&(b=a.source.data,c="string"==typeof a.source.media_type?a.source.media_type:void 0),!b))return null;let d=b.endsWith("==")?2:+!!b.endsWith("=");return{bytes:Math.max(0,Math.floor(3*b.length/4)-d),mime:c}}(a);return!e||(b+=1,c+=e.bytes,e.mime&&d.add(e.mime),!1)});if(0===b)return a;let f=d.size>0?`: ${[...d].join(", ")}`:"";return e.push({type:"text",text:`[${b} tool result image${1===b?"":"s"} omitted from initial history payload${f}, ~${c} bytes]`}),{...a,content:e}}((0,l.B)(a.message)):(0,l.B)(a.message);if(!b.deferThinking||"assistant"!==c.role)return c;return{...c,content:c.content.map(a=>"thinking"===a.type&&""!==a.thinking.trim()?{...a,thinking:"",deferred:!0}:a)}}case"compaction":return{role:"custom",customType:"compaction",content:a.summary,display:!0,details:{tokensBefore:a.tokensBefore,firstKeptEntryId:a.firstKeptEntryId},timestamp:L(a.timestamp)};case"branch_summary":if(!a.summary)return null;return{role:"user",content:`*The conversation briefly explored another branch and returned with this summary:*
5
5
 
6
- ${a.summary}`,timestamp:L(a.timestamp)};case"custom_message":if(a.customType===p.BD){let b=(0,p.hw)(a.content,a.details);if(b?.role==="user")return{role:"user",content:b.text,timestamp:L(a.timestamp)};if(b?.role==="assistant")return{role:"assistant",content:[{type:"text",text:b.text}],model:"Codex Live",provider:"openai-codex",stopReason:"stop",timestamp:L(a.timestamp)}}if(a.customType===q.gt){let b="string"==typeof a.content?a.content:a.content.map(a=>"text"===a.type?a.text:"").join("\n");if(b.trim())return{role:"assistant",content:[{type:"text",text:b}],model:q.$f,provider:"web6",stopReason:"stop",timestamp:L(a.timestamp)}}return{role:"custom",customType:a.customType,content:a.content,display:a.display,details:a.details,timestamp:L(a.timestamp)};default:return null}}(e,c);a&&(g.push(a),h.push(e.id))}return{messages:g,entryIds:h,thinkingLevel:f.thinkingLevel??"off",configuredThinkingLevel:f.configuredThinkingLevel??f.thinkingLevel??"off",thinkingCeiling:(0,r.hi)(G(a,d,b)),model:H(f.models)}}function J(a){if(M(a)&&"contextSnapshot"in a)return M(a.contextSnapshot)?a.contextSnapshot:void 0}async function K(a,b){let c,d,h,i=new Map;for(let b of a)i.set(b.id,b);let j=(0,e.buildSessionContext)(a,b,i),l=H(j.models);if(!l)return;try{let{modelRegistry:a}=await (0,k.getOmpRuntime)(),b=a.find(l.provider,l.modelId),e=b?.contextWindow;if("number"!=typeof e||!Number.isFinite(e)||e<=0)return;c=e,d=new f.Tokenizer(b)}catch{return}let m=G(a,i,b),n=-1;for(let a=m.length-1;a>=0;a-=1)if("compaction"===m[a].type){n=a;break}for(let a=m.length-1;a>n;a-=1){let b=m[a];if("message"!==b.type||"assistant"!==b.message.role)continue;let c=b.message,d=J(c);if("aborted"!==c.stopReason&&"error"!==c.stopReason&&c.usage&&(d||(0,g.hasContextTokenUsage)(c.usage))){h=c;break}}if(!h)return;let o=J(h),p=o?.promptTokens,q="number"==typeof p&&Number.isFinite(p)?p:(0,g.calculatePromptTokens)(h.usage);if(!Number.isFinite(q)||q<0)return;let r=j.messages,s=-1;for(let a=r.length-1;a>=0;a-=1){let b=r[a];if(b===h||"assistant"===b.role&&b.timestamp===h.timestamp){s=a;break}}let t=0;if(s>=0)for(let a=s+1;a<r.length;a+=1)t+=d.countMessage(r[a]);let u=Math.max(0,q+t);return{tokens:u,contextWindow:c,percent:u/c*100}}function L(a){let b=Date.parse(a);return Number.isNaN(b)?void 0:b}function M(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}d()}catch(a){d(a)}})},45902:(a,b,c)=>{"use strict";c.d(b,{$:()=>f});var d=c(76760),e=c.n(d);function f(a,b=process.platform){let c="win32"===b?e().win32.normalize(a):e().posix.normalize(a);return"win32"===b?c.toLowerCase():c}},77356:(a,b,c)=>{"use strict";c.d(b,{FR:()=>d,KE:()=>f,hi:()=>g});let d="cuelo-thinking-ceiling",e=["minimal","low","medium","high","xhigh","max"];function f(a){return"string"==typeof a&&e.includes(a)}function g(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if(c?.type!=="custom"||c.customType!==d)continue;let e=c.data?.ceiling;return f(e)?e:null}return null}},78335:()=>{},85821:(a,b,c)=>{"use strict";c.d(b,{$f:()=>f,Ro:()=>g,YA:()=>i,YO:()=>j,gt:()=>e,lN:()=>h,xI:()=>o});var d=c(77598);let e="gpt6-reply",f="ChatGPT 6PRO",g="gpt6-binding";function h(a,b){return`[6PRO 경유] 이 세션은 6PRO 연결번호 ${a}에 묶였다(만료 ${b}).
6
+ ${a.summary}`,timestamp:L(a.timestamp)};case"custom_message":if(a.customType===p.BD){let b=(0,p.hw)(a.content,a.details);if(b?.role==="user")return{role:"user",content:b.text,timestamp:L(a.timestamp)};if(b?.role==="assistant"){let c=(0,p.p8)(a.details);return{role:"assistant",content:[{type:"text",text:b.text}],model:"Codex Live",provider:"openai-codex",...c?{liveSpeaker:c}:{},stopReason:"stop",timestamp:L(a.timestamp)}}}if(a.customType===q.gt){let b="string"==typeof a.content?a.content:a.content.map(a=>"text"===a.type?a.text:"").join("\n");if(b.trim())return{role:"assistant",content:[{type:"text",text:b}],model:q.$f,provider:"web6",stopReason:"stop",timestamp:L(a.timestamp)}}return{role:"custom",customType:a.customType,content:a.content,display:a.display,details:a.details,timestamp:L(a.timestamp)};default:return null}}(e,c);a&&(g.push(a),h.push(e.id))}return{messages:g,entryIds:h,thinkingLevel:f.thinkingLevel??"off",configuredThinkingLevel:f.configuredThinkingLevel??f.thinkingLevel??"off",thinkingCeiling:(0,r.hi)(G(a,d,b)),model:H(f.models)}}function J(a){if(M(a)&&"contextSnapshot"in a)return M(a.contextSnapshot)?a.contextSnapshot:void 0}async function K(a,b){let c,d,h,i=new Map;for(let b of a)i.set(b.id,b);let j=(0,e.buildSessionContext)(a,b,i),l=H(j.models);if(!l)return;try{let{modelRegistry:a}=await (0,k.getOmpRuntime)(),b=a.find(l.provider,l.modelId),e=b?.contextWindow;if("number"!=typeof e||!Number.isFinite(e)||e<=0)return;c=e,d=new f.Tokenizer(b)}catch{return}let m=G(a,i,b),n=-1;for(let a=m.length-1;a>=0;a-=1)if("compaction"===m[a].type){n=a;break}for(let a=m.length-1;a>n;a-=1){let b=m[a];if("message"!==b.type||"assistant"!==b.message.role)continue;let c=b.message,d=J(c);if("aborted"!==c.stopReason&&"error"!==c.stopReason&&c.usage&&(d||(0,g.hasContextTokenUsage)(c.usage))){h=c;break}}if(!h)return;let o=J(h),p=o?.promptTokens,q="number"==typeof p&&Number.isFinite(p)?p:(0,g.calculatePromptTokens)(h.usage);if(!Number.isFinite(q)||q<0)return;let r=j.messages,s=-1;for(let a=r.length-1;a>=0;a-=1){let b=r[a];if(b===h||"assistant"===b.role&&b.timestamp===h.timestamp){s=a;break}}let t=0;if(s>=0)for(let a=s+1;a<r.length;a+=1)t+=d.countMessage(r[a]);let u=Math.max(0,q+t);return{tokens:u,contextWindow:c,percent:u/c*100}}function L(a){let b=Date.parse(a);return Number.isNaN(b)?void 0:b}function M(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}d()}catch(a){d(a)}})},45902:(a,b,c)=>{"use strict";c.d(b,{$:()=>f});var d=c(76760),e=c.n(d);function f(a,b=process.platform){let c="win32"===b?e().win32.normalize(a):e().posix.normalize(a);return"win32"===b?c.toLowerCase():c}},77356:(a,b,c)=>{"use strict";c.d(b,{FR:()=>d,KE:()=>f,hi:()=>g});let d="cuelo-thinking-ceiling",e=["minimal","low","medium","high","xhigh","max"];function f(a){return"string"==typeof a&&e.includes(a)}function g(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if(c?.type!=="custom"||c.customType!==d)continue;let e=c.data?.ceiling;return f(e)?e:null}return null}},78335:()=>{},85821:(a,b,c)=>{"use strict";c.d(b,{$f:()=>f,Ro:()=>g,YA:()=>i,YO:()=>j,gt:()=>e,lN:()=>h,xI:()=>o});var d=c(77598);let e="gpt6-reply",f="ChatGPT 6PRO",g="gpt6-binding";function h(a,b){return`[6PRO 경유] 이 세션은 6PRO 연결번호 ${a}에 묶였다(만료 ${b}).
7
7
 
8
8
  하네스 정책 \`mainLane.web6Consult\`에 따라 이 세션에서는 ChatGPT 6 Pro 상담 네 자리 중
9
9
  **발주 전 설계**와 **최종 판정 직전 상담** 둘이 자동으로 발동한다. 나머지 둘(경합 가설 판정,
@@ -11,4 +11,4 @@ ${a.summary}`,timestamp:L(a.timestamp)};case"custom_message":if(a.customType===p
11
11
 
12
12
  경로는 loopback shim이고 상담은 조언이다 — 분할\xb7진단\xb7판정은 그대로 Main이 소유한다.
13
13
  shim이 응답하지 않으면 막지 말고 기존 경로로 진행한 뒤 상담 없이 판정했음을 남긴다.`}class i extends Error{constructor(a,b){super(b),this.name="Gpt6Error",this.code=a}}function j(a){switch(a){case"unknown_handle":case"session_not_found":return 404;case"invalid_token":return 401;case"store_conflict":return 409;case"invalid_argument":return 400;default:return 500}}function k(a,b){if("string"!=typeof a||""===a.trim())throw new i("invalid_argument",`${b}는 비어 있지 않은 문자열이어야 합니다.`);return a.trim()}let l=/^[0-9a-f]{64}$/;function m(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex")}function n(a,b){if(""===a||!l.test(b))return!1;let c=(0,d.createHash)("sha256").update(a,"utf8").digest(),e=Buffer.from(b,"hex");return e.length===c.length&&(0,d.timingSafeEqual)(c,e)}function o(a){let b,c=null;function d(){return{schemaVersion:2,revision:0,tokenHash:"",handles:{}}}function g(){let e=a.readStore();if(null!==c&&e===b)return c;let f=function(a){let b;if(null===a||""===a.trim())return d();try{b=JSON.parse(a)}catch{throw new i("store_unreadable","핸들 저장소(gpt6-handles.json)를 JSON으로 읽을 수 없습니다.")}if(!b||"object"!=typeof b||Array.isArray(b))throw new i("store_unreadable","핸들 저장소(gpt6-handles.json)의 형식이 올바르지 않습니다.");let c=b;if(2!==c.schemaVersion)return d();let e={};if(c.handles&&"object"==typeof c.handles)for(let[a,b]of Object.entries(c.handles)){if(b&&"object"==typeof b)"string"==typeof b.sessionId&&"string"==typeof b.cwd&&"string"==typeof b.handleKeyHash&&l.test(b.handleKeyHash)&&(e[a]={handle:"string"==typeof b.handle?b.handle:a,cwd:b.cwd,sessionId:b.sessionId,instruction:"string"==typeof b.instruction?b.instruction:"",createdAt:"string"==typeof b.createdAt?b.createdAt:new Date(0).toISOString(),expiresAt:"string"==typeof b.expiresAt?b.expiresAt:new Date(0).toISOString(),revokedAt:"string"==typeof b.revokedAt?b.revokedAt:null,..."string"==typeof b.web6RequestId&&""!==b.web6RequestId.trim()?{web6RequestId:b.web6RequestId.trim()}:{},handleKeyHash:b.handleKeyHash})}return{schemaVersion:2,revision:"number"==typeof c.revision?c.revision:0,tokenHash:"string"==typeof c.tokenHash&&l.test(c.tokenHash)?c.tokenHash:"",handles:e}}(e);return b=e,c=f,f}function h(a){return Date.parse(a.revokedAt??a.expiresAt)}function j(a,b){return h(a)>b-864e5}function o(b){for(let c=0;c<2;c+=1){let c=g(),d=b(c);if(!function(a,b){for(let c of Object.keys(a.handles)){let d=a.handles[c];d&&!j(d,b)&&delete a.handles[c]}let c=Object.keys(a.handles).length-50;if(!(c<=0))for(let[d]of Object.entries(a.handles).filter(([,a])=>h(a)<=b).sort((a,b)=>h(a[1])-h(b[1]))){if(c<=0)break;delete a.handles[d],c-=1}}(c,a.now().getTime()),g().revision===c.revision)return c.revision+=1,a.writeStore(`${JSON.stringify(c,null,2)}
14
- `),d}throw new i("store_conflict","핸들 저장소가 다른 호출과 충돌했습니다. 잠시 뒤 다시 시도하세요.")}function p(a,b){let c=a.revokedAt?"revoked":Date.parse(a.expiresAt)<=b?"expired":"active";return{handle:a.handle,cwd:a.cwd,sessionId:a.sessionId,instruction:a.instruction,createdAt:a.createdAt,expiresAt:a.expiresAt,revokedAt:a.revokedAt,status:c}}async function q(b){let c=a.getSession(b),d=c?.isAlive()?c:await a.resumeSession(b);return d&&d.isAlive()?d:void 0}return{issueHandle:function(b){let c=k(b.cwd,"cwd"),d=k(b.sessionId,"sessionId"),e="string"==typeof b.instruction?b.instruction:"",f=void 0===b.web6RequestId?void 0:k(b.web6RequestId,"web6RequestId"),g=function(a){if(null==a)return 720;if("number"!=typeof a||!Number.isInteger(a))throw new i("invalid_argument","ttlMinutes는 정수여야 합니다.");if(a<1||a>10080)throw new i("invalid_argument","ttlMinutes는 1~10080 범위여야 합니다.");return a}(b.ttlMinutes),h=a.now().getTime();return o(b=>{let j=null;""===b.tokenHash&&(b.tokenHash=m(j=a.randomToken()));let k="";for(let c=0;c<20;c+=1){let c=`H-${a.randomHandleDigits()}`;if(!b.handles[c]){k=c;break}}if(""===k)throw new i("handle_exhausted","연결번호를 발급하지 못했습니다. 4자리 번호가 소진되었습니다.");let l=a.randomHandleKey(),n={handle:k,cwd:c,sessionId:d,instruction:e,createdAt:new Date(h).toISOString(),expiresAt:new Date(h+6e4*g).toISOString(),revokedAt:null,...void 0===f?{}:{web6RequestId:f},handleKeyHash:m(l)};return b.handles[k]=n,{...p(n,h),token:j,handleKey:l,startSentence:`OMP 연결번호 ${k}에 묶인 세션의 상담이다. 작업폴더는 ${c}다.`}})},listHandles:function(){let b=g(),c=a.now().getTime();return{handles:Object.values(b.handles).filter(a=>j(a,c)).map(a=>p(a,c)).sort((a,b)=>b.createdAt.localeCompare(a.createdAt)||a.handle.localeCompare(b.handle)),tokenPresent:""!==b.tokenHash}},revokeHandle:function(b){let c=k(b,"handle");return o(b=>{let d=b.handles[c];if(!d)throw new i("unknown_handle",`연결번호 ${c}를 찾을 수 없습니다.`);return d.revokedAt||(d.revokedAt=a.now().toISOString()),{handle:c,revoked:!0}})},rotateToken:function(b){return o(c=>{if(!n(b,c.tokenHash))throw new i("invalid_token","현재 토큰이 올바르지 않습니다. 회전에는 지금 쓰는 토큰이 필요합니다.");let d=a.randomToken();return c.tokenHash=m(d),{token:d,rotatedAt:a.now().toISOString()}})},acceptsToken:a=>n(a,g().tokenHash),publishReply:async function(a){let b=k(a.sessionId,"sessionId"),c=k(a.text,"text"),d="string"==typeof a.model&&""!==a.model.trim()?a.model.trim():f,g=await q(b);if(!g)throw new i("session_not_found",`세션 ${b}의 기록을 찾을 수 없습니다.`);return{published:!0,entryId:g.appendCustomMessage(e,c,!0,{source:f,model:d}),busy:g.isRunning()}}}}},87576:(a,b,c)=>{"use strict";c.d(b,{BD:()=>d,NR:()=>f,PW:()=>j,SQ:()=>l,Yh:()=>h,c$:()=>k,hw:()=>g});let d="live-transcript",e={user:"User (live voice):\n",assistant:"Voice assistant (live voice):\n"};function f(a,b){return`${e[a]}${b}`}function g(a,b){if(!b||"object"!=typeof b||!("role"in b))return null;let c=b.role;if("user"!==c&&"assistant"!==c||"string"!=typeof a)return null;let d=e[c];if(!a.startsWith(d))return null;let f=a.slice(d.length).trim();return f?{role:c,text:f}:null}function h(a,b,c,d){let e;if(b){if(a?.text)if(a.final)if(c){if(void 0!==d&&a.finalizedTurnIds?.has(d)||void 0===d&&b===a.text)return;e=b}else{if(void 0!==d&&void 0!==a.itemId&&d===a.itemId||void 0===d&&(b===a.text||a.text.endsWith(b)))return;e=b}else if(c){if(void 0!==d&&a.finalizedTurnIds?.has(d))return;e=a.text.startsWith(b)&&a.text.length>b.length?a.text:b}else e=b.startsWith(a.text)?b:a.text.endsWith(b)?a.text:a.text+b;else e=b;if(e=e.trim())return{text:e,final:c,itemId:c?a?.itemId:d??a?.itemId,finalizedTurnIds:c&&void 0!==d?(a?.finalizedTurnIds??new Set).add(d):a?.finalizedTurnIds}}}function i(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function j(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{return null}return i(b)?b:null}function k(a){let b="turn.done"===a.type?a.turn:"input_transcript.added"===a.type||"output_transcript.added"===a.type?a.item:void 0;if(!i(b))return;let c=b.id;return"string"==typeof c&&c?c:void 0}RegExp("^(?:아|어|음|응|네|자|그럼|이제|그만|좀)*(?:(?:통화|전화)(?:를|좀|그만)*)?(?:좀|그만)*(?:끊어|끊을게|끊자|끊겠습니다)(?:줘|주세요|요)?$|^(?:아|어|음|응|네|자|그럼|이제|그만|좀)*(?:통화|전화)(?:를|좀|그만)*(?:종료|종료해|종료할게|종료하자)(?:줘|주세요|요)?$","u");let l=24e3},96487:()=>{}};
14
+ `),d}throw new i("store_conflict","핸들 저장소가 다른 호출과 충돌했습니다. 잠시 뒤 다시 시도하세요.")}function p(a,b){let c=a.revokedAt?"revoked":Date.parse(a.expiresAt)<=b?"expired":"active";return{handle:a.handle,cwd:a.cwd,sessionId:a.sessionId,instruction:a.instruction,createdAt:a.createdAt,expiresAt:a.expiresAt,revokedAt:a.revokedAt,status:c}}async function q(b){let c=a.getSession(b),d=c?.isAlive()?c:await a.resumeSession(b);return d&&d.isAlive()?d:void 0}return{issueHandle:function(b){let c=k(b.cwd,"cwd"),d=k(b.sessionId,"sessionId"),e="string"==typeof b.instruction?b.instruction:"",f=void 0===b.web6RequestId?void 0:k(b.web6RequestId,"web6RequestId"),g=function(a){if(null==a)return 720;if("number"!=typeof a||!Number.isInteger(a))throw new i("invalid_argument","ttlMinutes는 정수여야 합니다.");if(a<1||a>10080)throw new i("invalid_argument","ttlMinutes는 1~10080 범위여야 합니다.");return a}(b.ttlMinutes),h=a.now().getTime();return o(b=>{let j=null;""===b.tokenHash&&(b.tokenHash=m(j=a.randomToken()));let k="";for(let c=0;c<20;c+=1){let c=`H-${a.randomHandleDigits()}`;if(!b.handles[c]){k=c;break}}if(""===k)throw new i("handle_exhausted","연결번호를 발급하지 못했습니다. 4자리 번호가 소진되었습니다.");let l=a.randomHandleKey(),n={handle:k,cwd:c,sessionId:d,instruction:e,createdAt:new Date(h).toISOString(),expiresAt:new Date(h+6e4*g).toISOString(),revokedAt:null,...void 0===f?{}:{web6RequestId:f},handleKeyHash:m(l)};return b.handles[k]=n,{...p(n,h),token:j,handleKey:l,startSentence:`OMP 연결번호 ${k}에 묶인 세션의 상담이다. 작업폴더는 ${c}다.`}})},listHandles:function(){let b=g(),c=a.now().getTime();return{handles:Object.values(b.handles).filter(a=>j(a,c)).map(a=>p(a,c)).sort((a,b)=>b.createdAt.localeCompare(a.createdAt)||a.handle.localeCompare(b.handle)),tokenPresent:""!==b.tokenHash}},revokeHandle:function(b){let c=k(b,"handle");return o(b=>{let d=b.handles[c];if(!d)throw new i("unknown_handle",`연결번호 ${c}를 찾을 수 없습니다.`);return d.revokedAt||(d.revokedAt=a.now().toISOString()),{handle:c,revoked:!0}})},rotateToken:function(b){return o(c=>{if(!n(b,c.tokenHash))throw new i("invalid_token","현재 토큰이 올바르지 않습니다. 회전에는 지금 쓰는 토큰이 필요합니다.");let d=a.randomToken();return c.tokenHash=m(d),{token:d,rotatedAt:a.now().toISOString()}})},acceptsToken:a=>n(a,g().tokenHash),publishReply:async function(a){let b=k(a.sessionId,"sessionId"),c=k(a.text,"text"),d="string"==typeof a.model&&""!==a.model.trim()?a.model.trim():f,g=await q(b);if(!g)throw new i("session_not_found",`세션 ${b}의 기록을 찾을 수 없습니다.`);return{published:!0,entryId:g.appendCustomMessage(e,c,!0,{source:f,model:d}),busy:g.isRunning()}}}}},87576:(a,b,c)=>{"use strict";c.d(b,{BD:()=>d,NR:()=>g,PW:()=>k,SQ:()=>m,Yh:()=>i,c$:()=>l,hw:()=>h,p8:()=>e});let d="live-transcript";function e(a){if(!a||"object"!=typeof a||!("speaker"in a))return;let b=a.speaker;if(!b||"object"!=typeof b)return;let{alias:c,mode:d}=b;if("string"==typeof c&&""!==c.trim()&&("character"===d||"native"===d))return{alias:c,mode:d}}let f={user:"User (live voice):\n",assistant:"Voice assistant (live voice):\n"};function g(a,b){return`${f[a]}${b}`}function h(a,b){if(!b||"object"!=typeof b||!("role"in b))return null;let c=b.role;if("user"!==c&&"assistant"!==c||"string"!=typeof a)return null;let d=f[c];if(!a.startsWith(d))return null;let e=a.slice(d.length).trim();return e?{role:c,text:e}:null}function i(a,b,c,d){let e;if(b){if(a?.text)if(a.final)if(c){if(void 0!==d&&a.finalizedTurnIds?.has(d)||void 0===d&&b===a.text)return;e=b}else{if(void 0!==d&&void 0!==a.itemId&&d===a.itemId||void 0===d&&(b===a.text||a.text.endsWith(b)))return;e=b}else if(c){if(void 0!==d&&a.finalizedTurnIds?.has(d))return;e=a.text.startsWith(b)&&a.text.length>b.length?a.text:b}else e=b.startsWith(a.text)?b:a.text.endsWith(b)?a.text:a.text+b;else e=b;if(e=e.trim())return{text:e,final:c,itemId:c?a?.itemId:d??a?.itemId,finalizedTurnIds:c&&void 0!==d?(a?.finalizedTurnIds??new Set).add(d):a?.finalizedTurnIds}}}function j(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function k(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{return null}return j(b)?b:null}function l(a){let b="turn.done"===a.type?a.turn:"input_transcript.added"===a.type||"output_transcript.added"===a.type?a.item:void 0;if(!j(b))return;let c=b.id;return"string"==typeof c&&c?c:void 0}RegExp("^(?:아|어|음|응|네|자|그럼|이제|일단|그만|좀)*(?:(?:통화|전화)(?:를|좀|그만)*)?(?:좀|그만)*(?:끊어|끊을게|끊자|끊겠습니다)(?:줘|주세요|요)?$|^(?:아|어|음|응|네|자|그럼|이제|일단|그만|좀)*(?:통화|전화)(?:를|좀|그만)*(?:종료|종료해|종료할게|종료하자)(?:줘|주세요|요)?$","u");let m=24e3},96487:()=>{}};